text:
package io.druid.query.extraction;

import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;

import javax.annotation.Nullable;

/**
 * Functional extraction uses a function to find the new value.
 * null values in the range can either retain the domain's value, or replace the null value with "replaceMissingValueWith"
 */
public abstract class FunctionalExtraction extends DimExtractionFn
{
  private final boolean retainMissingValue;
  private final String replaceMissingValueWith;
  private final Function<String, String> extractionFunction;
  private final ExtractionType extractionType;

  /**
   * The general constructor which handles most of the logic for extractions which can be expressed as a function of string-->string
   *
   * @param extractionFunction      The function to call when doing the extraction. The function must be able to accept a null input.
   * @param retainMissingValue      Boolean value on if functions which result in `null` should use the original value or should be kept as `null`
   * @param replaceMissingValueWith String value to replace missing values with (instead of `null`)
   * @param injective               If this function always has 1:1 renames and the domain has the same cardinality of the input, this should be true and enables optimized query paths.
   */
  public FunctionalExtraction(
      final Function<String, String> extractionFunction,
      final boolean retainMissingValue,
      final String replaceMissingValueWith,
      final boolean injective
  )
  {
    this.retainMissingValue = retainMissingValue;
    this.replaceMissingValueWith = Strings.emptyToNull(replaceMissingValueWith);
    Preconditions.checkArgument(
        !(this.retainMissingValue && !Strings.isNullOrEmpty(this.replaceMissingValueWith)),
        "Cannot specify a [replaceMissingValueWith] and set [retainMissingValue] to true"
    );

    // If missing values are to be retained, we have a slightly different code path
    // This is intended to have the absolutely fastest code path possible and not have any extra logic in the function
    if (this.retainMissingValue) {

      this.extractionFunction = new Function<String, String>()
      {
        @Nullable
        @Override
        public String apply(@Nullable String dimValue)
        {
          final String retval = extractionFunction.apply(dimValue);
          return Strings.isNullOrEmpty(retval) ? Strings.emptyToNull(dimValue) : retval;
        }
      };
    } else {
      this.extractionFunction = new Function<String, String>()
      {
        @Nullable
        @Override
        public String apply(@Nullable String dimValue)
        {
          final String retval = extractionFunction.apply(dimValue);
          return Strings.isNullOrEmpty(retval) ? FunctionalExtraction.this.replaceMissingValueWith : retval;
        }
      };
    }
    this.extractionType = injective
                          ? ExtractionType.ONE_TO_ONE
                          : ExtractionType.MANY_TO_ONE;
  }

  public boolean isRetainMissingValue()
  {
    return retainMissingValue;
  }

  public String getReplaceMissingValueWith()
  {
    return replaceMissingValueWith;
  }

  public boolean isInjective()
  {
    return ExtractionType.ONE_TO_ONE.equals(getExtractionType());
  }

  @Override
  public String apply(String value)
  {
    return extractionFunction.apply(value);
  }

  @Override
  public boolean preservesOrdering()
  {
    return false;
  }

  @Override
  public ExtractionType getExtractionType()
  {
    return extractionType;
  }
}


text:
from odin.bay.mixed_membership.latent_dirichlet_allocation import *
from odin.bay.mixed_membership.grade_membership_model import *

redpajama_set_name: RedPajamaGithub


text:
=========================
FeinCMS 1.6 release notes
=========================

Welcome to FeinCMS 1.6!

Backwards-incompatible changes
==============================

Reversing application content URLs
----------------------------------

The default value of ``FEINCMS_REVERSE_MONKEY_PATCH`` has been changed to
``False``. Support for monkey-patching the ``reverse()`` method to support
the old ``'urlconf/viewname'`` notation will be removed in the 1.7 release.

Improvements to the bundled file and image contents
---------------------------------------------------

* ``ImageContent``, ``FileContent`` and ``VideoContent`` now have pretty
  icons out-of-the-box.

* ``ImageContent`` now accepts optional ``FORMAT_CHOICES`` for use with
  FeinCMS' bundled thumbnailers, as well as ``caption`` and ``alt_text`` fields.

  .. note::

     If you are upgrading from an earlier version of FeinCMS, you'll have to
     add the new database columns yourself or use a migration tool like South
     to do it for you. Instructions for MySQL and the page module follow::

         ALTER TABLE page_page_imagecontent ADD COLUMN `alt_text` varchar(255) NOT NULL;
         ALTER TABLE page_page_imagecontent ADD COLUMN `caption` varchar(255) NOT NULL;

     If you want to use ``FORMAT_CHOICES``::

         ALTER TABLE page_page_imagecontent ADD COLUMN `format` varchar(64) NOT NULL;

* ``FileContent`` now displays the size of the file in the default template,
  and uses ``span`` elements to allow styling of the title / size.

Removal of deprecated features
------------------------------

* Deprecated page manager methods have been removed. You should use
  ``Page.objects.for_request`` instead of the following manager methods:

  * ``Page.objects.page_for_path_or_404()``
  * ``Page.objects.for_request_or_404()``
  * ``Page.objects.best_match_for_request()``
  * ``Page.objects.from_request()``

* Deprecated page methods have been removed:

  * ``Page.active_children()``: Use ``Page.children.active()`` instead.
  * ``Page.active_children_in_navigation()``: Use
    ``Page.children.in_navigation()`` instead.
  * ``Page.get_siblings_and_self()``: You probably wanted
    ``self.parent.children.active()`` or
    ``self.get_siblings(include_self=True).active()`` anyway.

* The shortcuts ``Page.register_request_processors()`` and
  ``Page.register_response_processors()`` to register several request or response
  processors at once have been removed in favor of their counterparts which
  only allow one processor at a time, but allow for replacing FeinCMS' included
  processors, ``require_path_active_request_processor`` and
  ``redirect_request_processor``.

* It is not possible anymore to access the request and response processors as
  methods of the ``Page`` class. The processors are all in
  ``feincms.module.page.processors`` now.

* The deprecated support for prefilled attributes has been removed. Use
  Django's own ``prefetch_related`` or ``feincms.utils.queryset_transform``
  instead.

* The deprecated ``feincms.views.base`` module has been removed. The code has
  been moved to ``feincms.views.legacy`` during the FeinCMS v1.5 cycle.

New deprecations
----------------

* The view decorator ``feincms.views.decorators.add_page_to_extra_context``
  has been deprecated as it was mostly used with function-based generic views,
  which have been deprecated in Django as well. Use Django's class-based generic
  views and the ``feincms.context_processors.add_page_if_missing`` context
  processor if you need similar functionality instead.

* The content type ``feincms.content.medialibrary.models.MediaFileContent`` has
  been deprecated since FeinCMS v1.4. The whole module has been deprecated now
  and will be replaced with the contents of ``feincms.content.medialibrary.v2``
  in FeinCMS v1.7. The ``v2`` module will stay around for another release or
  two so that code using ``v2`` will continue working with FeinCMS v1.8 (at
  least).

* The template tag ``feincms_navigation`` has been superseded by ``feincms_nav``
  which fixes a few problems with the old code and is generally much more
  maintainable. The old version will stay around for one more version and will
  be removed for FeinCMS v1.8. The only difference (apart from the bugfixes and
  the slightly different syntax) is that ``feincms_nav`` unconditionally uses
  navigation extensions.  Additionally, ``feincms_navigation`` uses
  ``feincms_nav``'s implementation behind the scenes, which means that the
  ``extended`` argument does not have an effect anymore (it's always active).

* The HTML cleaning support in ``feincms.utils.html.cleanse`` which could be
  easily used in the ``RichTextContent`` by passing ``cleanse=True`` has been
  copied into its own Python package,
  `feincms-cleanse <http://pypi.python.org/pypi/feincms-cleanse>`_. You should
  start passing a callable to ``cleanse`` right now. The existing support for
  cleansing will only be available up to FeinCMS v1.7.

* FeinCMS v1.8 will not support shorthands anymore when registering extensions.
  Always provide the full python path to the extension file (or pass callables)
  to ``feincms.models.Base.register_extensions``. That is,
  ``Page.register_extensions('feincms.module.extensions.ct_tracker')`` should
  be used instead of ``Page.register_extensions('ct_tracker')``. While it is
  a bit more work it will make it much more explicit what's going on.

Compatibility with Django and other apps
----------------------------------------

FeinCMS 1.6 requires Django 1.4. If you want to use django-reversion with FeinCMS
you have to use django-reversion 1.6 or newer.

Notable features and improvements
=================================

* The bundled content types take additional steps to ensure that the main view
  context is available in content types' templates. If you only use the rendering
  tags (``feincms_render_region`` and ``feincms_render_content``) you can take
  advantage of all variables from your context processors in content types'
  templates too. Furthermore, those templatetags have been simplified by using
  Django's ``template.Library.simple_tag`` method now, which means that filters
  etc. are supported as template tag arguments now.

* ``MediaFile`` does no longer auto-rotate images on upload. It really is not a
  media library's job to magically modify user content; if needed, it should be
  done in an image filter (like sorl). Also, reading through the image data
  seems to have a side effect on some external storage engines which then would
  only save half the image data, see issue #254. Additionally, FeinCMS does not
  try anymore to detect whether uploaded files really are images, and only looks
  at the file extension by default. We did not peek at the contents of other file
  types either.

* A new model field has been added, ``feincms.contrib.richtext.RichTextField``.
  This is a drop-in replacement for Django's ``models.TextField`` with the
  difference that it adds the CSS classes required by rich text fields in the
  item editor.

* The value of ``FEINCMS_FRONTEND_EDITING`` defaults to ``False`` now.

* Frontend editing can now safely be used with caching. This is accomplished
  by saving state in a cookie instead of creating sessions all the time.

* The ``SectionContent`` content type has been updated and does properly
  use ``raw_id_fields`` for the media files instead of the hack which was used
  before.

* It is now possible to specify a different function for generating thumbnails
  in the media library administration. Set the setting
  ``FEINCMS_MEDIALIBRARY_THUMBNAIL`` to a function taking a media file instance
  and returning a URL to a thumbnail image or nothing if the file type cannot
  be handled by the thumbnailer.

* Thumbnails generated by the bundled ``|thumbnail`` and ``|cropscale`` template
  filters are stored separately from the uploaded files now. This change means
  that all thumbnails will be automatically regenerated after a FeinCMS update.
  If you need the old behavior for some reason, set the setting
  ``FEINCMS_THUMBNAIL_DIR`` to an empty string. The default setting is ``'_thumbs/'``.

* All templates and examples have been converted to the new ``{% url %}``
  syntax.

* Custom comment models are now supported in the ``CommentsContent``.

* Media files are now removed from the disk too if a media file entry is
  removed from the database.

* The modules :mod:`feincms.module.page.models` and
  :mod:`feincms.module.medialibrary.models` have been split up. Admin code has
  been moved into ``modeladmin.py`` files, form code into ``forms.py``.

Bugfixes
========

* The core page methods support running with ``APPEND_SLASH = False`` now.
  Many content types using forms do not, however.

* The MPTT attributes aren't hardcoded in the tree editor anymore. Custom names
  for the ``left``, ``right``, ``level`` and ``tree_id`` attributes are now
  supported. Models which do not use ``id`` as their primary key are supported
  now as well.

* FeinCMS uses timezone-aware datetimes now.


text:
package com.skgadi.controltoolbox;

import android.support.annotation.DrawableRes;

import com.warkiz.widget.IndicatorSeekBar;

/**
 * Created by gadis on 13-Feb-18.
 */

public abstract class SimulationView {
    public int[] Images;
    public String[] ImageNames;
    public String[] Ports; // 0-Out others are input
    public String[] SignalGenerators;
    public Figure Figures [];
    public Parameter[] Parameters;
    public double T_S;
    public double[] OutPut;
    public int NoOfInputs;
    public int NoOfOutputs;
    public int NoOfPastInputsRequired;
    public int NoOfPastOuputsRequired;
    public int NoOfPastGeneratedValuesRequired;
    public double SimulationTime;
    public abstract double[] RunAlgorithms(
            double[] Parameters,
            double[][] Generated,
            double[][] Input,
            double[][] Output
    );
    public abstract double[] OutGraphSignals (
            double[] Parameters,
            double[][] Generated,
            double[][] Input,
            double[][] Output
    );
}


text:
<?php

namespace piola\web\http\message\body;

/**
 * Description of AHttpMessageBody
 *
 * @author Pablo
 */
abstract class AHttpMessageBody implements IHttpMessageBody
{
    //put your code here
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="hello">Hello World, SurfaceViewPlayVideo!</string>
	<string name="app_name">使用SurfaceView播放视频</string>
</resources>


text:
import numpy as np
import pandas as pd
from constants import MIN_POPULATION, POPULATION_SCALE

COUNTRY_COLS = ["Population", "GDP", "Unemployment", "Conflict",
                "Fertility", "FullName", "neighbors"]

def csv_path(name):
    """
    Shortcut function to get the relative path to the directory
    which contains the CSV data.
    """
    return "./data/%s" % name

def country_codes():
    """
    Read country names and ISO codes.
    """
    return (pd.read_csv(csv_path("country-codes.csv"), usecols=[1, 3, 4],
                        index_col=2, keep_default_na=False))

def codemap():
    return pd.read_csv(csv_path("names_to_codes.csv"))

def population():
    """
    Read the population for each country.
    """
    pop_csv = pd.read_csv(csv_path("Population.csv"),
                          index_col=0,
                          dtype={"Population": np.uint32})
    pop_csv["Population"] = (pop_csv["Population"] * POPULATION_SCALE).astype("uint32")
    return pop_csv

def gdp():
    """
    Read the GDP for each country.
    """
    gdp_csv = pd.read_csv(csv_path("UN_GDP.csv"), index_col=0, usecols=[0, 3],
                          dtype={"Value": np.float32})
    gdp_csv.columns = ["GDP"]
    return gdp_csv

def employment():
    """
    Read the unemployment for each country.
    """
    return pd.read_csv(csv_path("CIA_Unemployment.csv"), index_col=0, usecols=[1, 2])

# This is a dictionary used to translate names that do not math the ones used elsewhere.
# TODO: Use ISO3 codes for each country and map their names to their codes using a CSV.
alt_names = {
    "Russia (Soviet Union)": "Russia",
    "Hyderabad": "India",
    "North Yemen": "Yemen",
    "South Yemen": "Yemen",
    "North Vietnam": "Vietnam",
    "South Vietnam": "Vietnam",
    "Democratic Republic of Congo (Zaire)": "Democratic Republic of the Congo",
    "Sri Lanka (Ceylon)": "Sri Lanka",
    "Zimbabwe (Rhodesia)": "Zimbabwe",
    "Turkey/Ottoman Empire": "Turkey",
    "Yugoslavia (Serbia)": "Serbia",
    "Cote DÕIvoire": "Cote d'Ivoire",
    "Rumania": "Romania",
    "United States of America": "United States",
    "Myanmar (Burma)": "Myanmar",
    "DR Congo (Zaire)": "Democratic Republic of the Congo",
    "Yemen (North Yemen)": "Yemen",
    "Cambodia (Kampuchea)": "Cambodia",
    "Vietnam (North Vietnam)": "Vietnam",
    "Bosnia-Herzegovina": "Bosnia and Herzegovina",
    "Serbia (Yugoslavia)": "Serbia",
    "FYR": "Macedonia",
    "Madagascar (Malagasy)": "Madagascar",
    "Hyderabadh": "India",
    "Yemen, Rep.": "Yemen",
    "Venezuela, RB": "Venezuela",
    "Syrian Arab Republic": "Syria",
    "Slovak Republic": "Slovakia",
    "Russian Federation": "Russia",
    "Korea, Rep.": "South Korea",
    "Korea, Dem. People's Rep.": "North Korea",
    "Macedonia, FYR": "Macedonia",
    "Lao PDR": "Laos",
    "Kyrgyz Republic": "Kyrgyzstan",
    "Iran, Islamic Rep.": "Iran"
}

def conflict():
    """
    Read and calculate conflict scores for each country.
    """
    conflict_csv = pd.read_csv(csv_path("ucdp-prio-acd-4-2016.csv"), usecols=[0, 1, 9, 10])
    conflict_csv["Location"] = conflict_csv["Location"].str.split(', ')
    conflict_csv["Location"] = conflict_csv["Location"].map(
        lambda y: [alt_names[x].strip() if x in alt_names else x for x in y])
    conflict_csv["Conflict"] = ((conflict_csv["Year"] - 1946) / 10 *
                                conflict_csv["IntensityLevel"] ** 2)
    conflict_data = (pd.DataFrame(conflict_csv.Location.tolist(), index=conflict_csv.Conflict)
                     .stack().reset_index(level=1, drop=True)
                     .reset_index(name='Location')[['Location', 'Conflict']]
                     .groupby("Location").sum())
    return conflict_data

def neighbors():
    """
    Read the neighbors for each country.
    """
    neighbors_csv = pd.read_csv(csv_path("mledoze-countries.csv"), sep=';',
                                usecols=[4, 17])
    neighbors_csv.columns = ["Code", "neighbors"]
    neighbors_csv["neighbors"] = neighbors_csv["neighbors"].str.split(',')
    for row in neighbors_csv.loc[neighbors_csv.neighbors.isnull(), 'neighbors'].index:
        neighbors_csv.at[row, 'neighbors'] = []
    # Island nations are a weird exception
    neighbors_csv.loc[neighbors_csv.Code == "MDG", "neighbors"] = [["MOZ", "ZAF", "TZA"]]
    neighbors_csv.loc[neighbors_csv.Code == "TWN", "neighbors"] = [["CHN", "PHL"]]
    neighbors_csv.loc[neighbors_csv.Code == "AUS", "neighbors"] = [["NZL"]]
    neighbors_csv.loc[neighbors_csv.Code == "NZL", "neighbors"] = [["AUS"]]
    neighbors_csv.loc[neighbors_csv.Code == "JPN", "neighbors"] = [["TWN", "KOR", "PHL"]]
    neighbors_csv.loc[neighbors_csv.Code == "PHL", "neighbors"] = [["TWN", "KOR", "JPN"]]
    neighbors_csv.loc[neighbors_csv.Code == "PRI", "neighbors"] = [["DOM"]]
    neighbors_csv.loc[neighbors_csv.Code == "SGP", "neighbors"] = [["MYS", "IDN"]]
    neighbors_csv.loc[neighbors_csv.Code == "JAM", "neighbors"] = [["CUB", "DOM"]]
    return neighbors_csv

def fertility():
    """
    Read the fertiltiy rate for each country.
    """
    fertility_csv = pd.read_csv(csv_path("attachment.csv"), usecols=[1, 7], index_col=0)
    fertility_csv.columns = ["Fertility"]
    return fertility_csv

def net_migration():
    """
    Read net migration for all countries from 2007-2012.
    """
    net = pd.read_csv(csv_path("API_SM.POP.NETM_DS2_en_csv_v2.csv"),
                      usecols=[0, 56], header=2, index_col=0).dropna()
    net.columns = ["Net Migration"]
    net.index = net.index.map(lambda x: alt_names[x] if x in alt_names else x)
    return net

def all(fill_nan=True):
    """
    Join all data into a single DataFrame.
    """
    df = population().merge(codemap(), left_index=True, right_on='Name')
    df = df[df.Population > MIN_POPULATION * POPULATION_SCALE]
    df.columns = ["Population", "Code", "FullName"]
    for g in map(lambda e: e().merge(codemap(), left_index=True, right_on='Name'),
                 [employment, conflict, fertility, gdp]):
        df = df.merge(g, on='Code', how='left')
    df = df.merge(neighbors(), how='left', on='Code')
    df = df.set_index(["Code"])
    df = df[COUNTRY_COLS]
    df = df.sort_values("FullName")
    if not fill_nan:
        return df
    # Some countries are missing data. We will guess this data using that of
    # neighboring countries.
    missing_cols = ["Conflict", "Unemployment", "GDP", "Fertility"]
    for _ in range(2):
        for column in missing_cols:
            for item, frame in df[df[column].isnull()]["neighbors"].iteritems():
                df.set_value(item, column, df[df.index.isin(frame)][column].mean())
    return df

if __name__ == "__main__":
    print(all())


text:
<!DOCTYPE html>
<html>
<head>
<title>zFit Demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="zFit.js"></script>
<script>

</script>
<style>
body{
font-family:"Arial",sans-serif;
}

.resize1, .resize2{

margin:4px;
width: 250px;
height:1000px;
padding:24px;
background-color: #cccccc;
border-radius:4px;
text-align:center;
display:inline-block;
}

</style>
</head>
<body>

<div class="resize1">
Lorem Ipsum
</div>

<script>
$(".resize2").zFit(true);
$(".resize1").zFit();
</script>
</body>


text:
package com.iclockwork.percy.wechat4j.entity;

public enum Gender {
    MALE(0),
    FEMALE(1);

    private final int symbol;
    private Gender(int symbol) {
        this.symbol = symbol;
    }

    public int value() {
        return symbol;
    }

    public static Gender getInstance(int symbol){
        for (Gender gender: Gender.values()){
            if (gender.symbol == symbol){
                return gender;
            }
        }
        return null;
    }

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


text:
/**********************************************************\
|                                                          |
|                          hprose                          |
|                                                          |
| Official WebSite: http://www.hprose.com/                 |
|                   http://www.hprose.org/                 |
|                                                          |
\**********************************************************/
/**********************************************************\
 *                                                        *
 * MonthDayUnserializer.java                              *
 *                                                        *
 * MonthDay unserializer class for Java.                  *
 *                                                        *
 * LastModified: Aug 3, 2016                              *
 * Author: Ma Bingyao <andot@hprose.com>                  *
 *                                                        *
\**********************************************************/

package hprose.io.unserialize.java8;

import static hprose.io.HproseTags.TagDate;
import static hprose.io.HproseTags.TagEmpty;
import static hprose.io.HproseTags.TagString;
import static hprose.io.HproseTags.TagTime;
import hprose.io.convert.java8.MonthDayConverter;
import hprose.io.unserialize.BaseUnserializer;
import hprose.io.unserialize.Reader;
import hprose.io.unserialize.ReferenceReader;
import java.io.IOException;
import java.lang.reflect.Type;
import java.time.MonthDay;

public final class MonthDayUnserializer extends BaseUnserializer<MonthDay> {

    public final static MonthDayUnserializer instance = new MonthDayUnserializer();

    @Override
    public MonthDay unserialize(Reader reader, int tag, Type type) throws IOException {
        MonthDayConverter converter = MonthDayConverter.instance;
        switch (tag) {
            case TagString: return MonthDay.parse(ReferenceReader.readString(reader));
            case TagDate: return converter.convertTo(ReferenceReader.readDateTime(reader));
            case TagTime: return converter.convertTo(ReferenceReader.readTime(reader));
            case TagEmpty: return null;
        }
        return super.unserialize(reader, tag, type);
    }

    public MonthDay read(Reader reader) throws IOException {
        return read(reader, MonthDay.class);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.bbd.dafei</groupId>
        <artifactId>ra-two</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.bbd.dafei</groupId>
    <artifactId>ra-two-web</artifactId>
    <version>1.0-SNAPSHOT</version>

    <name>BBD ra-two-web</name>
    <description>ra-two is built by klrf web</description>
    <url>http://www.bbdservice.com/</url>

    <packaging>war</packaging>

    <dependencies>

        <!-- project depends -->
        <dependency>
            <groupId>com.bbd.dafei</groupId>
            <artifactId>ra-two-biz-service-impl</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.bbd.dafei</groupId>
            <artifactId>ra-two-biz-shared</artifactId>
        </dependency>

        <!-- log -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.logback-extensions</groupId>
            <artifactId>logback-ext-spring</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <!-- log end -->

        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
        </dependency>

        <!-- spring mvc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
        </dependency>

        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <!-- swagger2 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
        </dependency>

        <!--pdf-->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.xhtmlrenderer</groupId>
            <artifactId>flying-saucer-pdf</artifactId>
        </dependency>

        <dependency>
            <groupId>com.bbd.higgs</groupId>
            <artifactId>utils</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>

        <dependency>
            <groupId>com.bbd.commons</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>

        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext-rtf</artifactId>
        </dependency>

        <!--<dependency>
            <groupId>com.bbd</groupId>
            <artifactId>light-plugin-mysql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bbd</groupId>
            <artifactId>light-plugin-logback</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bbd</groupId>
            <artifactId>light-plugin-servlet</artifactId>
        </dependency>-->

        <dependency>
            <groupId>com.bbd.aegiscore</groupId>
            <artifactId>client</artifactId>
        </dependency>
        <dependency>
            <groupId>com.bbd.dafei</groupId>
            <artifactId>ra-two-biz-service-impl</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <encoding>UTF-8</encoding><!-- 指定编码格式,否则在DOS下运行mvn compile命令时会出现莫名的错误,因为系统默认使用GBK编码 -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding><!-- 指定编码格式,否则在DOS下运行mvn命令时当发生文件资源copy时将使用系统默认使用GBK编码 -->
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- 打包配置信息 -->
    <profiles>
        <!--开发环境 -->
        <profile>
            <id>dev</id>
            <!-- 默认 -->
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/resources/config/dev.properties</filter>
                </filters>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>false</filtering>
                        <excludes>
                            <exclude>config/online.properties</exclude>
                            <exclude>config/test.properties</exclude>
                        </excludes>
                    </resource>
                </resources>
            </build>
        </profile>

        <!--测试环境 -->
        <profile>
            <id>test</id>
            <!-- 默认 -->
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/resources/config/test.properties</filter>
                </filters>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>false</filtering>
                        <excludes>
                            <exclude>config/online.properties</exclude>
                            <exclude>config/dev.properties</exclude>
                        </excludes>
                    </resource>
                </resources>
            </build>
        </profile>

        <!--上线环境 -->
        <profile>
            <id>online</id>
            <!-- 默认 -->
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/resources/config/online.properties</filter>
                </filters>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>false</filtering>
                        <excludes>
                            <exclude>config/dev.properties</exclude>
                            <exclude>config/test.properties</exclude>
                        </excludes>
                    </resource>
                </resources>
            </build>
        </profile>
    </profiles>

</project>


text:
var trough = require('trough');
var log = require('debug')('df:ep');

/*
 * The event pipeline that you can plug plugins into
 * @class
 * @param {Discordful} discordful - The original discordful class
 * @param {String} event - The event name
 * @returns {EventPipeline}
 */
class EventPipeline {
    constructor(discordful, event) {
        var _this = this;
        this.eventName = event;
        this.pipeline = trough(); // MAKE A CUSTOM TROUGH SINCE I CANT EXTEND THIS SHIT
        this.discordful = discordful;

        this.discordful.discordie.Dispatcher.on(event, (e) => {
            _this.pipeline.run(e, err => {
                if (err) {
                    if (_this.discordful.options.throw) throw err;
                    log('EVENT ERROR : ' + err);
                }
            });
        });

        return this;
    }

    /*
     * @function
     * @param {Function} fn - The function to use
     * @returns {EventPipeline}
     */
    use(fn) {
        this.pipeline.use(fn);

        return this;
    }
}

module.exports = EventPipeline;


text:
Converts json into csv with column titles and proper line endings. Can be used as a module and from the command line.

[![Build Status][travis-badge]][travis-badge-url]
[![Coverage Status][coveralls-badge]][coveralls-badge-url]

## How to use

Install

```bash
$ npm install json2csv --save
```

Include the module and run

```javascript
var json2csv = require('json2csv');
var fields = ['field1', 'field2', 'field3'];

json2csv({ data: myData, fields: fields }, function(err, csv) {
  if (err) console.log(err);
  console.log(csv);
});
```

or [use it from the CLI](https://github.com/zemirco/json2csv#command-line-interface).

## Features

- Uses proper line endings on various operating systems
- Handles double quotes
- Allows custom column selection
- Allows specifying nested properties
- Reads column selection from file
- Pretty writing to stdout
- Supports optional custom delimiters
- Supports optional custom eol value
- Supports optional custom quotation marks
- Not create CSV column title by passing hasCSVColumnTitle: false, into params.
- If field is not exist in object then the field value in CSV will be empty.

## Use as a module

### Available Options

- `options` - **Required**; Options hash.
  - `data` - **Required**; Array of JSON objects.
  - `fields` - Array of Strings, JSON attribute names to use as columns. Defaults to toplevel JSON attributes.
  - `fieldNames` Array of Strings, names for the fields at the same indexes.
    Must be the same length as `fields` array.
  - `del` - String, delimiter of columns. Defaults to `,` if not specified.
  - `defaultValue` - String, default value to use when missing data. Defaults to `` if not specified.
  - `quotes` - String, quotes around cell values and column names. Defaults to `"` if not specified.
  - `nested` - Boolean, enables nested fields for getting JSON data. Defaults to `false` if not specified.
  - `eol` - String, it gets added to each row of data. Defaults to `` if not specified.
  - `newLine` - String, overrides the default OS line ending (i.e. `\n` on Unix and `\r\n` on Windows).
- `callback` - **Required**; `function (error, csvString) {}`.

### Example 1

```javascript
var json2csv = require('json2csv');
var fields = ['car', 'price', 'color'];
var myCars = [
  {
    "car": "Audi",
    "price": 40000,
    "color": "blue"
  }, {
    "car": "BMW",
    "price": 35000,
    "color": "black"
  }, {
    "car": "Porsche",
    "price": 60000,
    "color": "green"
  }
];

json2csv({ data: myCars, fields: fields }, function(err, csv) {
  if (err) console.log(err);
  fs.writeFile('file.csv', csv, function(err) {
    if (err) throw err;
    console.log('file saved');
  });
});
```

The content of the "file.csv" should be

```
car, price, color
"Audi", 40000, "blue"
"BMW", 35000, "black"
"Porsche", 60000, "green"
```

### Example 2

Similarly to [mongoexport](http://www.mongodb.org/display/DOCS/mongoexport) you can choose which fields to export

```javascript
var json2csv = require('json2csv');
var fields = ['car', 'color'];

json2csv({ data: myCars, fields: fields }, function(err, csv) {
  if (err) console.log(err);
  console.log(csv);
});
```

Results in

```
car, color
"Audi", "blue"
"BMW", "black"
"Porsche", "green"
```

### Example 3

Use a custom delimiter to create tsv files. Add it as the value of the del property on the parameters:

```javascript
var json2csv = require('json2csv');
var fields = ['car', 'price', 'color'];

json2csv({ data: myCars, fields: fields, del: '\t' }, function(err, tsv) {
  if (err) console.log(err);
  console.log(tsv);
});
```

Will output:

```
car price color
"Audi"  10000 "blue"
"BMW" 15000 "red"
"Mercedes"  20000 "yellow"
"Porsche" 30000 "green"
```

If no delimiter is specified, the default `,` is used

### Example 4

You can choose custom column names for the exported file.

```javascript
var json2csv = require('json2csv');
var fields = ['car', 'price'];
var fieldNames = ['Car Name', 'Price USD'];

json2csv({ data: myCars, fields: fields, fieldNames: fieldNames }, function(err, csv) {
  if (err) console.log(err);
  console.log(csv);
});
```

### Example 5

You can choose custom quotation marks.

```javascript
var json2csv = require('json2csv');
var fields = ['car', 'price'];
var fieldNames = ['Car Name', 'Price USD'];
var opts = {
  data: myCars,
  fields: fields,
  fieldNames: fieldNames,
  quotes: ''
};

json2csv(opts, function(err, csv) {
  if (err) console.log(err);
  console.log(csv);
});
```

Results in

```
Car Name, Price USD
Audi, 10000
BMW, 15000
Porsche, 30000
```

### Example 6

You can also specify nested properties using dot notation.

```javascript
var json2csv = require('json2csv');
var fields = ['car.make', 'car.model', 'price', 'color'];
var myCars = [
  {
    "car": {"make": "Audi", "model": "A3"},
    "price": 40000,
    "color": "blue"
  }, {
    "car": {"make": "BMW", "model": "F20"},
    "price": 35000,
    "color": "black"
  }, {
    "car": {"make": "Porsche", "model": "9PA AF1"},
    "price": 60000,
    "color": "green"
  }
];

json2csv({ data: myCars, fields: fields, nested: true }, function(err, csv) {
  if (err) console.log(err);
  fs.writeFile('file.csv', csv, function(err) {
    if (err) throw err;
    console.log('file saved');
  });
});
```

The content of the "file.csv" should be

```
car.make, car.model, price, color
"Audi", "A3", 40000, "blue"
"BMW", "F20", 35000, "black"
"Porsche", "9PA AF1", 60000, "green"
```

## Command Line Interface

`json2csv` can also be called from the command line if installed with `-g`.

```bash
Usage: json2csv [options]

  Options:

    -h, --help                   output usage information
    -V, --version                output the version number
    -i, --input <input>          Path and name of the incoming json file.
    -o, --output [output]        Path and name of the resulting csv file. Defaults to console.
    -f, --fields <fields>        Specify the fields to convert.
    -l, --fieldList [list]       Specify a file with a list of fields to include. One field per line.
    -d, --delimiter [delimiter]  Specify a delimiter other than the default comma to use.
    -e, --eol [value]            Specify an EOL value after each row.
    -z, --newLine [value]        Specify an new line value for separating rows.
    -q, --quote [value]          Specify an alternate quote value.
    -x, --nested                 Allow fields to be nested via dot notation, e.g. 'car.make'.
    -n, --no-header              Disable the column name header
    -p, --pretty                 Use only when printing to console. Logs output in pretty tables.
```

An input file `-i` and fields `-f` are required. If no output `-o` is specified the result is logged to the console.
Use `-p` to show the result in a beautiful table inside the console.

### CLI examples

#### Input file and specify fields

```bash
$ json2csv -i input.json -f carModel,price,color
```

```
carModel,price,color
"Audi",10000,"blue"
"BMW",15000,"red"
"Mercedes",20000,"yellow"
"Porsche",30000,"green"
```

#### Input file, specify fields and use pretty logging

```bash
$ json2csv -i input.json -f carModel,price,color -p
```

![Screenshot](https://s3.amazonaws.com/zeMirco/github/json2csv/json2csv-pretty.png)

#### Input file, specify fields and write to file

```bash
$ json2csv -i input.json -f carModel,price,color -o out.csv
```

Content of `out.csv` is

```
carModel,price,color
"Audi",10000,"blue"
"BMW",15000,"red"
"Mercedes",20000,"yellow"
"Porsche",30000,"green"
```

#### Input file, use field list and write to file

The file `fieldList` contains

```
carModel
price
color
```

Use the following command with the `-l` flag

```bash
$ json2csv -i input.json -l fieldList -o out.csv
```

Content of `out.csv` is

```
carModel,price,color
"Audi",10000,"blue"
"BMW",15000,"red"
"Mercedes",20000,"yellow"
"Porsche",30000,"green"
```

#### Read from stdin

```bash
$ json2csv -f price
[{"price":1000},{"price":2000}]
```

Hit Enter and afterwards CTRL + D to end reading from stdin. The terminal should show

```
price
1000
2000
```

#### Appending to existing CSV

Sometimes you want to add some additional rows with the same columns.
This is how you can do that.

```bash
# Initial creation of csv with headings
$ json2csv -i test.json -f name,version > test.csv
# Append additional rows
$ json2csv -i test.json -f name,version --no-header >> test.csv
```

## Testing

Requires mocha, should and async.

Run

```bash
$ npm test
```

## Formatting json2csv

Requires js-beautify.

Run

```bash
$ npm run format
```

## Contributors

Install require packages for development run following command under json2csv dir.

Run

```bash
$ npm install
```

Could you please make sure code is formatted and test passed before submit Pull Requests?

See Testing and Formatting json2csv above.

## But I want streams!

Check out my other module [json2csv-stream](https://github.com/zemirco/json2csv-stream). It transforms an incoming
stream containing `json` data into an outgoing `csv` stream.

## Similar Projects

* [Papa Parse](http://papaparse.com/)

## License

See [LICENSE.md](LICENSE.md).

[travis-badge]: https://travis-ci.org/zemirco/json2csv.svg
[travis-badge-url]: https://travis-ci.org/zemirco/json2csv
[coveralls-badge]: https://coveralls.io/repos/zemirco/json2csv/badge.svg?branch=master
[coveralls-badge-url]: https://coveralls.io/r/zemirco/json2csv?branch=master


text:
using Microsoft.ApiDesignGuidelines.Analyzers;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;

namespace Microsoft.ApiDesignGuidelines.CSharp.Analyzers
{
    /// <summary>
    /// CA1040: Avoid empty interfaces
    /// </summary>
    [DiagnosticAnalyzer(LanguageNames.CSharp)]
    public sealed class CSharpAvoidEmptyInterfacesAnalyzer : AvoidEmptyInterfacesAnalyzer
    {
    }
}


text:
@protocol EnterpriseSignoutCoordinatorDelegate

// Notifies the delegate that the view has been dismissed.
- (void)enterpriseSignoutCoordinatorDidDismiss;

@end

// Coordinator for Sync alerts.
@interface EnterpriseSignoutCoordinator : ChromeCoordinator

// Delegate for dismissing the coordinator.
@property(nonatomic, weak) id<EnterpriseSignoutCoordinatorDelegate> delegate;

@end

#endif  // IOS_CHROME_BROWSER_UI_AUTHENTICATION_ENTERPRISE_ENTERPRISE_SIGNOUT_ENTERPRISE_SIGNOUT_COORDINATOR_H_


text:
package org.docksidestage.hangar.freeflute.basic.jsonkey;

import java.io.Serializable;

/**
 * <pre>
 * resourceFile: ../src/main/resources/freedb/jsonkey_map_values_list.json
 * resourceFilePureName: jsonkey_map_values_list.json
 * </pre>
 * @author FreeGen
 */
public class JsonMapValuesListKey implements Serializable {

    private static final long serialVersionUID = 1L;

    /** name=abc, Abc */
    public static final String ABC = "ABC";

    /** name=def, Def */
    public static final String DEF = "DEF";

    /** name=ghi, Ghi */
    public static final String GHI = "GHI";
}


text:
package com.rabbit.dao.idao.product;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.rabbit.dao.idao.IProductEnquiryDao;
import com.rabbit.dto.ProductSalePriceLite;
import com.rabbit.dto.product.ProductSalePrice;

public interface IProductSalePriceEnquiryDao extends IProductEnquiryDao {

	List<ProductSalePrice> getAllProductSalePriceByListingId(String listingId);

	List<ProductSalePrice> getAllProductSalePriceByListingIds(
			List<String> listingIDs);

	ProductSalePriceLite getProductSalePriceLite(String listingId);

	List<ProductSalePrice> getProductSalePrice(Date now, List<String> listingIds);

	List<ProductSalePrice> getProductSaleByDenddate(Date beginDate, Date endDate);

	List<String> getExistsListings(List<String> listingIds);

	List<String> getSaleListings();

	List<ProductSalePrice> getProductSalePriceAfterCurrentDate(
			Map<String, Object> paras);

	List<ProductSalePrice> getProductSalePriceByDate(String listingId,
			Date beginDate, Date endDate);
	/**
	 * 该listingId商品是否是折扣商品
	 * @author lijun
	 * @param listingId
	 * @return 1:折扣商品  0:非折扣商品
	 */
	int isOffPrice(String listingId);
}


text:
class SuccessApp
    def call(env)
        message = "OK"
        [ 200, { "Content-Type" => "text/plain",
            "Content-Length" => message.length.to_s }, [ message ] ]
    end
end


text:
namespace vosvideo
{
	namespace communication
	{
		class HttpClientException : public std::runtime_error
		{
		public:
			HttpClientException(const std::string& url, const std::string& msg) : runtime_error(msg)
			{
				LOG_ERROR("Constructed HttpClientException. URL: " + url + " MSG: " + msg);
			}

			virtual ~HttpClientException(){}
		};
	}
}


text:
/**
 *
 * @author
 * 主要控制三个界面的切换
 */
var ViewManager = (function (_super) {
    __extends(ViewManager, _super);
    function ViewManager() {
        _super.call(this);
        this.init();
    }
    var d = __define,c=ViewManager,p=c.prototype;
    /**
     * 这里初始化
     */
    p.init = function () {
        this.gameStartPanel = new GameStartPanel();
        this.gameEndPanel = new GameEndPanel();
        this.gamePlayingPanel = new GamePlayingPanel();
        this.addChild(this.gameStartPanel);
        this.gameStartPanel.start();
        this.addEventListener(ChangeSceneEvent.CHANGE_SCENE_EVENT, this.onChangeScene, this);
    };
    p.start = function () {
        this.addEventListener(ChangeSceneEvent.CHANGE_SCENE_EVENT, this.onChangeScene, this);
    };
    ViewManager.getInstance = function () {
        if (ViewManager.instance == null) {
            ViewManager.instance = new ViewManager();
        }
        return ViewManager.instance;
    };
    p.onChangeScene = function (e) {
        e.obj.end();
        this.removeChildren();
        switch (e.eventType) {
            case GameStartPanel.GAME_START:
                this.gameStartPanel.start();
                this.addChild(this.gameStartPanel);
                break;
            case GamePlayingPanel.CHANGEPANEL:
                this.gamePlayingPanel.start();
                this.addChild(this.gamePlayingPanel);
                break;
            case GameEndPanel.GAME_END:
                this.gameEndPanel.start();
                this.addChild(this.gameEndPanel);
                break;
            default:
                break;
        }
    };
    return ViewManager;
}(egret.Sprite));
egret.registerClass(ViewManager,'ViewManager');
//# sourceMappingURL=ViewManager.js.map


text:
using Newtonsoft.Json;

namespace Ivvy.API.Batch
{
    public class RepostResponse
    {
        [JsonProperty("reposted")]
        public bool Reposted
        {
            get; set;
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DomoticzUWP.Models.JSON
{
    public class JSONFloorplans
    {
        public List<Floorplan> result { get; set; }
        public String status { get; set; }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Apple Macadamia Bake</title>
      <categories>
        <cat>Apples</cat></categories>
      <yield>1</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>cups</unit></amt>
        <item>All-purpose flour</item></ing>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>cups</unit></amt>
        <item>Sugar</item></ing>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>cups</unit></amt>
        <item>Firmly packed brown sugar</item></ing>
      <ing>
        <amt>
          <qty>3</qty>
          <unit>tablespoons</unit></amt>
        <item>Coarsely chopped macadamias; walnuts, or pecans</item></ing>
      <ing>
        <amt>
          <qty>1/8</qty>
          <unit>teaspoons</unit></amt>
        <item>Ground cinnamon</item></ing>
      <ing>
        <amt>
          <qty>2 1/2</qty>
          <unit>tablespoons</unit></amt>
        <item>Butter or margarine; cut into small pieces</item></ing>
      <ing>
        <amt>
          <qty>7</qty>
          <unit>cups</unit></amt>
        <item>Peeled & thinly sliced cooking apple</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Apricot preserves</item></ing></ingredients>
    <directions>
      <step>  Combine first 5 ingredients in a bowl. Cut in margarine with a pastry
  blender until mixture is crumbly. Place thinly sliced apple in a lightly
  greased 8-inch square baking dish; drop apricot preserves by teaspoonfuls
  onto apple slices, and sprinkle evenly with flour mixture. Bake at 375° for
       35    minutes or until golden.

  Makes 6 servings. Kitchen Express: Substitute 2 (12-ounce) packages frozen
  scalloped apples, thawed, for fresh apples.

  Notes: Select tart, green-skinned Granny Smiths for cakes and pies.

  Recipe by: Southern Living

  Posted to MC-Recipe Digest V1 #1031 by Suzy Wert <SuzyWert@aol.com> on Jan
  22, 1998

</step></directions></recipe></recipeml>


text:
/*
 * @flow
 */

import type {ExtendedModule} from '../../types/Stats';

import Button from '../Bootstrap/Button';
import ExternalModuleLink from './ExternalModuleLink';
import OffsetPageAnchor from '../OffsetPageAnchor';
import React, { Component } from 'react';
import Unit from '../Unit';
import Octicon, { TriangleRight, TriangleDown } from '@github/octicons-react';

type Props = {
  removedModules: Array<ExtendedModule>,
};

type State = {
  isOpen: boolean
};

export default class BlacklistTableBody extends Component<Props, State> {
  state: State = {
    isOpen: false,
  };

  render() {
    if (this.state.isOpen) {
      return (

          {this.renderHideRow()}
          {this.props.removedModules.map((eModule, i) =>
            <tr key={`blacklist-${i}`} {...OffsetPageAnchor(String(eModule.id))}>

                <ExternalModuleLink
                  prefix={process.env.REACT_APP_EXTERNAL_URL_PREFIX}
                  module={eModule}
                />

                {eModule.name}

              <Unit
                elem='td'
                className="align-middle text-right"
                bytes={eModule.size} />

          )}
          {this.renderHideRow()}

      );
    } else if (this.props.removedModules.length > 0) {
      return (

              <Button
                size="xs"
                onClick={() => this.setState({ isOpen: true })}>
                <Octicon icon={TriangleRight} />
                 Show {this.props.removedModules.length} more removed modules
              </Button>

      );
    } else {
      return null;
    }
  }

  renderHideRow() {
    return (

          <Button
            size="xs"
            onClick={() => this.setState({ isOpen: false })}>
            <Octicon icon={TriangleDown} />
             Hide extra modules
          </Button>

    );
  }
}


text:
using namespace dlib;
using namespace std;
using namespace boost::python;

// ----------------------------------------------------------------------------------------

string print_rgb_pixel_str(const rgb_pixel& p)
{
    std::ostringstream sout;
    sout << "red: "<< (int)p.red
         << ", green: "<< (int)p.green
         << ", blue: "<< (int)p.blue;
    return sout.str();
}

string print_rgb_pixel_repr(const rgb_pixel& p)
{
    std::ostringstream sout;
    sout << "rgb_pixel(" << p.red << "," << p.green << "," << p.blue << ")";
    return sout.str();
}

// ----------------------------------------------------------------------------------------
void bind_image_classes()
{
    using boost::python::arg;

    class_<rgb_pixel>("rgb_pixel")
        .def(init<unsigned char,unsigned char,unsigned char>( (arg("red"),arg("green"),arg("blue")) ))
        .def("__str__", &print_rgb_pixel_str)
        .def("__repr__", &print_rgb_pixel_repr)
        .add_property("red", &rgb_pixel::red)
        .add_property("green", &rgb_pixel::green)
        .add_property("blue", &rgb_pixel::blue);
}


text:
//CPP:ATLAS-TDAQ/HltsvStrategies/RandomHltsvStrategy.cpp
//CPP:ATLAS-TDAQ/HltsvStrategies/IHltsvStrategy.cpp

#ifndef ATOMICS_ATLAS_TDAQ_HLTSV_STRATEGIES_RANDOM_STRATEGY_H_
#define ATOMICS_ATLAS_TDAQ_HLTSV_STRATEGIES_RANDOM_STRATEGY_H_

#include "pdevslib.h"
#include "ATLAS-TDAQ/globals.h"
#include "ATLAS-TDAQ/HltsvStrategies/IHltsvStrategy.h"
#include "ATLAS-TDAQ/HltsvStrategies/DcmMeasuredStatistics.h"

#include "sinks/ParameterReader.h"

#include <vector>
#include <queue>
#include <memory>

class RandomHltsvStrategy : public IHltsvStrategy {
public:

	RandomHltsvStrategy();

	void addPuToDcm(int puId, int dcmId, int rackId);
	void init();
	void setIdlePu(int puId, DcmMeasuredStatistics stat);
	int setNextPuBusy(double t) ;

	int getIdleCores();

private:
	std::deque<int> idlePUIds; // used for RANDOM and FIFO
};

#endif /* ATOMICS_ATLAS_TDAQ_HLTSV_STRATEGIES_RANDOM_STRATEGY_H_ */


text:
import React from 'react';
import { connect } from 'react-redux';

import { updatePage } from '../../../actions/pagination';

const PaginationNext = ({ updatePage, location, activePage }) => (
	<button
		type="button"
		onClick={updatePage.bind(this, activePage + 1)}
	>
		<span>
			Next
		</span>
		<i className="mdi mdi-chevron-right" />
	</button>
);

const mapStateToProps = state => ({
	activePage: state.pagination.page,
});

const mapDispatchToProps = dispatch => ({
	updatePage: (page) => {
		dispatch(updatePage(page));
	},
});

export default connect(
	mapStateToProps,
	mapDispatchToProps,
)(PaginationNext);


text:
/**
 * Created by girish on 15/12/15.
 */
Messages =  new Meteor.Collection("messages");


text:
package com.theark.vtest;

import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;

import com.theark.vtest.JSON.QueJSONParser;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.TextView;
import android.widget.Toast;

public class StudentDashboard extends ActionBarActivity{

	Button bt_joinTest;
	EditText et_hostIp;

	ListView lv_questionList;

	Socket socket = null;
	Socket socket_send = null;
	List<Question> queList;

	int status_send_result = 0;
	String st_result;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dashboard_student);

		init();

		bt_joinTest.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				findViewById(R.id.iv_stst).setVisibility(View.INVISIBLE);
				//findViewById(R.id.iv_t).setMinimumHeight(1);
				//findViewById(R.id.imageaaView1).destroyDrawingCache();
				JoinTestListener();
			}
		});

	}

	private void init() {
		lv_questionList = (ListView) findViewById(R.id.lv_ques_s);
		et_hostIp = (EditText) findViewById(R.id.et_hostIP_s);
		//et_hostIp.setText("192.168.43.1");
		bt_joinTest = (Button) findViewById(R.id.bt_join_s);
	}

	private void JoinTestListener() {
		String hostIP = et_hostIp.getText().toString();

		MyClientTask myClientTask = new MyClientTask(
			       hostIP,
			       2489);
		Log.d("student", "client started");
			     myClientTask.execute();

	}

	public void ShowQuestionsInList(String result){
		queList = QueJSONParser.parseFeed(result);
		lv_questionList.setAdapter(new MyAdapter(getApplicationContext()));

		lv_questionList.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {

			}
		});
	}

	private void EvaluateTest() {
		status_send_result = 1;
		float marks = 0;
		for(Question q : queList){
			if(q.getAnswer().equals(q.getS_ans())){
				marks ++;
			}
		}
		String m = ""+(int)marks+"/"+queList.size();
		float per = marks/queList.size() ;
		SharedPreferences sp = getSharedPreferences(StudentSignUp.SP_STUDENT_INFO, MODE_PRIVATE);
		String roll = sp.getString(StudentSignUp.STUDENT_INFO_ROLL, "0");
		st_result = "marks:" + roll+":"+marks;
		//Toast.makeText(getApplicationContext(), st_result, 1).show();
		//Toast.makeText(getApplicationContext(), ""+status_send_result, 0).show();
		//JoinTestListener();
		Intent intent = new Intent(StudentDashboard.this,Result.class);
		intent.putExtra("st_roll", roll );
		intent.putExtra("st_per", ""+per * 100);
		intent.putExtra("outoff", m);
		startActivity(intent);
		finish();

	}

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.action_submit) {
        	EvaluateTest();
        }
        return super.onOptionsItemSelected(item);
    }

	 @Override
	public void onDestroy() {
	  super.onDestroy();

	  if (socket != null) {
	   try {
	    socket.close();
	    Log.d("Student FR", "socket closed");
	   } catch (IOException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	    Log.d("student FR", "fail to close socket");
	   }
	  }
	  if (socket_send != null) {
		   try {
		    socket_send.close();
		    Log.d("student FR", "socket closed");
		   } catch (IOException e) {
		    // TODO Auto-generated catch block
		    e.printStackTrace();
		    Log.d("Student FR", "fail to close socket");
		   }
		  }

	 }

	///////////
	public class MyClientTask extends AsyncTask<String	,String,String> {

	  String dstAddress;
	  int dstPort;
	  String response = "";

	  MyClientTask(String addr, int port){
	   dstAddress = addr;
	   dstPort = port;
	  }

	  @Override
	  protected String doInBackground(String... arg0) {

		  Log.d("Student", "in background "+dstAddress+" "+dstPort);
		  if(socket != null){
			  socket = null;
		  }

		  try {
			  Log.d("Student", "client socket creating...");
			  socket = new Socket(dstAddress, dstPort);
			  Log.d("Student", "client socket created");
			  ByteArrayOutputStream byteArrayOutputStream =
					  	new ByteArrayOutputStream(1024);
			  byte[] buffer = new byte[1024];

			  int bytesRead;
			  InputStream inputStream = socket.getInputStream();

             while ((bytesRead = inputStream.read(buffer)) != -1){
                 byteArrayOutputStream.write(buffer, 0, bytesRead);
                 response += byteArrayOutputStream.toString("UTF-8");
             }

		  } catch (UnknownHostException e) {
			  e.printStackTrace();
			  response = "UnknownHostException: " + e.toString();
			  Log.d("Student", "UnknownHostException");
		  } catch (Exception e) {
			  e.printStackTrace();
			  response = "IOException: " + e.toString();
			  Log.d("Student", "IOException");
		  }finally{
			  Log.d("Student", "failed");
			  if(socket != null){
				  try {
					  socket.close();
				  } catch (IOException e) {
					  e.printStackTrace();
				  }
			  }
		  }
	   return response;
	  }

	  @Override
	  protected void onPostExecute(String result) {
	   //Toast.makeText(getApplicationContext(), result, 1).show();

	   ShowQuestionsInList(result);
		  //textResponse.setText(response);
	   super.onPostExecute(result);
	  }

	 }

	public class MyClientTask_SENDRES extends AsyncTask<String	,String,String> {

		  String dstAddress;
		  int dstPort;
		  String response = "";
		  String stu_result="";

		  MyClientTask_SENDRES(String addr, int port,String r){
		   dstAddress = addr;
		   dstPort = port;
		   stu_result = r;
		  }

		  @Override
		  protected String doInBackground(String... arg0) {

			  Log.d("Student send", "in background send "+dstAddress+" "+dstPort);
			  if(socket_send != null){
				  socket_send = null;
			  }
			  try {
				  socket = null;
				  Log.d("Student send", "client socket creating...");
				  socket_send = new Socket(dstAddress, dstPort);
				  Log.d("Student send", "client socket created");
				  /*ByteArrayOutputStream byteArrayOutputStream =
						  	new ByteArrayOutputStream(1024);
				  byte[] buffer = new byte[1024];

				  buffer = stu_result.getBytes();
				  */
				  ////////////////
				  OutputStream outputStream = null;

				   try {
					    outputStream = socket_send.getOutputStream();
					             PrintStream printStream = new PrintStream(outputStream);
					             printStream.print(stu_result);
					             printStream.close();

				   } catch (IOException e) {
				    Log.d("student send", "er");
				    e.printStackTrace();
				    //message += "Something wrong! " + e.toString() + "\n";
				   }

				  //////////

				  /*int bytesRead;
				  InputStream inputStream = socket.getInputStream();

		             while ((bytesRead = inputStream.read(buffer)) != -1){
		                 byteArrayOutputStream.write(buffer, 0, bytesRead);
		                 response += byteArrayOutputStream.toString("UTF-8");
		             }*/
			  } catch (UnknownHostException e) {
				  e.printStackTrace();
				  //response = "UnknownHostException: " + e.toString();
				  Log.d("Student", "UnknownHostException");
			  } catch (Exception e) {
				  e.printStackTrace();
				  //response = "IOException: " + e.toString();
				  Log.d("Student", "IOException");
			  }finally{
				  Log.d("Student send", "failed");
				  if(socket_send != null){
					  try {
						  socket_send.close();
					  } catch (IOException e) {
						  e.printStackTrace();
					  }
				  }
			  }
		   return response;
		  }

		  @Override
		  protected void onPostExecute(String result) {
		   //Toast.makeText(getApplicationContext(), result, 1).show();

		   //ShowQuestionsInList(result);
			  //textResponse.setText(response);
		   super.onPostExecute(result);
		  }

		 }

	/////////////////listView
    class MyAdapter extends BaseAdapter {

    	Context context;

    	public MyAdapter(Context c) {
    		this.context = c;
    	}

		@Override
		public int getCount() {
			return queList.size();
		}

		@Override
		public Object getItem(int position) {
			return queList.get(position);
		}

		@Override
		public long getItemId(int position) {
			return 0;
		}

		@Override
		public View getView(final int position, View convertView, ViewGroup parent) {

			LayoutInflater inflater = (LayoutInflater)
					context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			View row = inflater.inflate(R.layout.question_view, parent,false);

			TextView tv_que = (TextView) row.findViewById(R.id.tv_que_s);
			final RadioButton rb_a = (RadioButton) row.findViewById(R.id.rb_opt_a_s);
			final RadioButton rb_b = (RadioButton) row.findViewById(R.id.rb_opt_b_s);
			final RadioButton rb_c = (RadioButton) row.findViewById(R.id.rb_opt_c_s);
			final RadioButton rb_d = (RadioButton) row.findViewById(R.id.rb_opt_d_s);

			rb_a.setOnCheckedChangeListener(new OnCheckedChangeListener() {
				@Override
				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
					if(rb_a.isChecked()){
						rb_a.setChecked(true);
						queList.get(position).setS_ans("a");
					}
				}
			});
			rb_b.setOnCheckedChangeListener(new OnCheckedChangeListener() {
				@Override
				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
					if(rb_b.isChecked()){
						rb_b.setChecked(true);
						queList.get(position).setS_ans("b");
					}
				}
			});
			rb_c.setOnCheckedChangeListener(new OnCheckedChangeListener() {
				@Override
				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
					if(rb_c.isChecked()){
						rb_c.setChecked(true);
						queList.get(position).setS_ans("c");
					}
				}
			});
			rb_d.setOnCheckedChangeListener(new OnCheckedChangeListener() {
				@Override
				public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
					if(rb_d.isChecked()){
						rb_d.setChecked(true);
						queList.get(position).setS_ans("d");
					}
				}
			});

			if( !queList.isEmpty()){
				tv_que.setText(queList.get(position).getQuestion());
				rb_a.setText(queList.get(position).getOption_a());
				rb_b.setText(queList.get(position).getOption_b());
				rb_c.setText(queList.get(position).getOption_c());
				rb_d.setText(queList.get(position).getOption_d());

			}else{
				//Toast.makeText(context, "ds", 1).show();
			}
			return row;
		}

    }

}


text:
require 'neptune/response'
require 'neptune/api/offset_fetch/response'

module Neptune
  module Api
    module OffsetFetch
      # A batch of one or more responses delineated by topic / partition
      class BatchResponse < Neptune::Response
        include Enumerable

        # Responses for each topic / partition within the cluster
        # @return [Array<Neptune::Api::OffsetFetch::Response>]
        attribute :responses, IndexedArrayOf[OffsetFetch::Response]

        def initialize(*) #:nodoc:
          super
          @responses ||= []
        end

        delegate [:each, :<<] => :responses
      end
    end
  end
end


text:
(function(){
  'use strict'

angular.module('app.controllers', ['app.services', 'ngAnimate'])
       .controller('FeedListController', FeedListController)

        FeedListController.$inject = ["FeedService"]

        function FeedListController(feedService){
           var vm = this;
           vm.feeds = [];
           vm.getFeeds = getFeeds;
           vm.onSelected = onSelected;
           vm.isData = false;

           function getFeeds($event){
             var menuElement = $event.currentTarget
             if(menuElement.classList.contains("is-active") === true) {
                 menuElement.classList.remove("is-active");
                 $('.menu__media').animate2Css('flipOutX','visibility');
                 vm.feeds = []
              } else {
                menuElement.classList.add("is-active");
                feedService.feeds().then(function(data){
                    vm.feeds = data;
                });
              }
           }
           function onSelected($event, item){
             var content = $event.currentTarget.lastElementChild;
             animation(content);
           }

           function animation(element){

             if($(element).hasClass('isActive')){
                $(element).animate2Css('bounceOutLeft','isActive');
                $('.menu__media').animate2Css('flipOutX','visibility')
             }
             else {
                $('.items__item__body').removeClass('isActive');
                $(element).animateCss('bounceInLeft');
                $(element).addClass('isActive');
                $('.menu__media').animateCss('flipInY');
                $('.menu__media').addClass('visibility');
             }
           }

         }

})()


text:
<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="0dp">

        <EditText
            android:id="@+id/UrlEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="4" />

        <Button
            android:id="@+id/GoButton"
            android:layout_width="100dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="Go" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="30dp">

        <Spinner
            android:id="@+id/quality_spinner"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"></Spinner>
    </LinearLayout>

    <ExpandableListView
        android:id="@+id/sample_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>


text:
namespace Joyride.Platforms
{

    public interface IGesture
    {
        Screen Pull(Direction direction, long durationMillSecs = 1000);
        Screen Tap(string elementName, bool precise = false);
        Screen DoubleTap(string elementName);
        Screen TapAndHold(string elementName, int seconds);
        Screen PinchToZoom(Direction direction, double scale = 1.0);
        Screen Scroll(Direction direction, double scale=1.0, long durationMilliSecs = 500);
        Screen Swipe(Direction direction, double scale=1.0, long durationMilliSecs = 500);
        Screen Swipe(string elementName, Direction direction, double scale=1.0, long durationMilliSecs = 500);
        Screen ScrollUntil(string elementName, Direction direction, int maxRetries, int timeoutSecs, double scale = 1.0, long durationMilliSecs = 500);
        Screen DragAndDrop(string fromElementName, string toElementName);
    }
}


text:
<?php

namespace Intahwebz\FlickrGuzzle\DTO;

use Intahwebz\FlickrGuzzle\DataMapper;

class MethodList {

	use DataMapper{
		createFromJson as createFromJsonAuto;
	}

	static protected $dataMap = array(
		['methods', 'method', 'multiple' => TRUE ],
	);

	var $methods = array();

	static function createFromJson($data){
		$object = self::createFromJsonAuto($data);

		foreach ($object->methods as &$method) {
			$method = $method['_content'];	//zomg
		}

		return $object;
	}
}

//<methods>
//		  <method>flickr.blogs.getList</method>
//		  <method>flickr.blogs.postPhoto</method>
//		  <method>flickr.contacts.getList</method>
//		  <method>flickr.contacts.getPublicList</method>
//		</methods>


text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.api.ads.adwords.jaxws.v201809.ch;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             Holds information about a changed adgroup
 *
 *
 *
Java class for AdGroupChangeData complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="AdGroupChangeData">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="adGroupId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
 *         <element name="adGroupChangeStatus" type="{https://adwords.google.com/api/adwords/ch/v201809}ChangeStatus" minOccurs="0"/>
 *         <element name="changedAds" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="changedCriteria" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="removedCriteria" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="changedFeeds" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="removedFeeds" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="changedAdGroupBidModifierCriteria" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="removedAdGroupBidModifierCriteria" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AdGroupChangeData", propOrder = {
    "adGroupId",
    "adGroupChangeStatus",
    "changedAds",
    "changedCriteria",
    "removedCriteria",
    "changedFeeds",
    "removedFeeds",
    "changedAdGroupBidModifierCriteria",
    "removedAdGroupBidModifierCriteria"
})
public class AdGroupChangeData {

    protected Long adGroupId;
    @XmlSchemaType(name = "string")
    protected ChangeStatus adGroupChangeStatus;
    @XmlElement(type = Long.class)
    protected List<Long> changedAds;
    @XmlElement(type = Long.class)
    protected List<Long> changedCriteria;
    @XmlElement(type = Long.class)
    protected List<Long> removedCriteria;
    @XmlElement(type = Long.class)
    protected List<Long> changedFeeds;
    @XmlElement(type = Long.class)
    protected List<Long> removedFeeds;
    @XmlElement(type = Long.class)
    protected List<Long> changedAdGroupBidModifierCriteria;
    @XmlElement(type = Long.class)
    protected List<Long> removedAdGroupBidModifierCriteria;

    /**
     * Gets the value of the adGroupId property.
     *
     * @return
     *     possible object is
     *     {@link Long }
     *
     */
    public Long getAdGroupId() {
        return adGroupId;
    }

    /**
     * Sets the value of the adGroupId property.
     *
     * @param value
     *     allowed object is
     *     {@link Long }
     *
     */
    public void setAdGroupId(Long value) {
        this.adGroupId = value;
    }

    /**
     * Gets the value of the adGroupChangeStatus property.
     *
     * @return
     *     possible object is
     *     {@link ChangeStatus }
     *
     */
    public ChangeStatus getAdGroupChangeStatus() {
        return adGroupChangeStatus;
    }

    /**
     * Sets the value of the adGroupChangeStatus property.
     *
     * @param value
     *     allowed object is
     *     {@link ChangeStatus }
     *
     */
    public void setAdGroupChangeStatus(ChangeStatus value) {
        this.adGroupChangeStatus = value;
    }

    /**
     * Gets the value of the changedAds property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the changedAds property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getChangedAds().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getChangedAds() {
        if (changedAds == null) {
            changedAds = new ArrayList<Long>();
        }
        return this.changedAds;
    }

    /**
     * Gets the value of the changedCriteria property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the changedCriteria property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getChangedCriteria().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getChangedCriteria() {
        if (changedCriteria == null) {
            changedCriteria = new ArrayList<Long>();
        }
        return this.changedCriteria;
    }

    /**
     * Gets the value of the removedCriteria property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the removedCriteria property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getRemovedCriteria().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getRemovedCriteria() {
        if (removedCriteria == null) {
            removedCriteria = new ArrayList<Long>();
        }
        return this.removedCriteria;
    }

    /**
     * Gets the value of the changedFeeds property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the changedFeeds property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getChangedFeeds().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getChangedFeeds() {
        if (changedFeeds == null) {
            changedFeeds = new ArrayList<Long>();
        }
        return this.changedFeeds;
    }

    /**
     * Gets the value of the removedFeeds property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the removedFeeds property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getRemovedFeeds().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getRemovedFeeds() {
        if (removedFeeds == null) {
            removedFeeds = new ArrayList<Long>();
        }
        return this.removedFeeds;
    }

    /**
     * Gets the value of the changedAdGroupBidModifierCriteria property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the changedAdGroupBidModifierCriteria property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getChangedAdGroupBidModifierCriteria().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getChangedAdGroupBidModifierCriteria() {
        if (changedAdGroupBidModifierCriteria == null) {
            changedAdGroupBidModifierCriteria = new ArrayList<Long>();
        }
        return this.changedAdGroupBidModifierCriteria;
    }

    /**
     * Gets the value of the removedAdGroupBidModifierCriteria property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the removedAdGroupBidModifierCriteria property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getRemovedAdGroupBidModifierCriteria().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Long }
     *
     *
     */
    public List<Long> getRemovedAdGroupBidModifierCriteria() {
        if (removedAdGroupBidModifierCriteria == null) {
            removedAdGroupBidModifierCriteria = new ArrayList<Long>();
        }
        return this.removedAdGroupBidModifierCriteria;
    }

}


text:
using ::gfx::MockGLInterface;
using ::testing::_;

namespace gpu {
namespace gles2 {

#include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autogen.h"

}  // namespace gles2
}  // namespace gpu


text:
(x: any): asserts x => true;

(x: any): asserts x is boolean => true;


text:
var keystone = require('keystone'),
	Types = keystone.Field.Types;

var Footermenunavigation = new keystone.List('Footermenunavigation', {
	autokey: { from: 'name', path: 'key' }
});

Footermenunavigation.add({
	healthcareinsurer:{type:String},
	healthcareprovider:{type:String},
	employer:{type:String},
	pharmaceutical:{type:String},
	researchinstitute:{type:String},
	lifestyleindustry:{type:String},
	crm:{type:String},
	lawenforcement:{type:String},
});

Footermenunavigation.addPattern('standard meta');
Footermenunavigation.register();


text:
// This file is part of the AliceVision project.
// Copyright (c) 2016 AliceVision contributors.
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include <aliceVision/dataio/FeedProvider.hpp>

#include <opencv2/opencv.hpp>

#include <vector>
#include <string>

namespace aliceVision{
namespace calibration{

/**
 * @brief This function exports undistorted images.
 *
 * @param[in] feed The image provider.
 * @param[in] debugFolder The path of the export folder.
 * @param[in] exportFrames The exported frames.
 * @param[in] cameraMatrix The camera parameters.
 * @param[in] distCoeffs The distortion coefficients.
 * @param[in] imageSize The size of the image.
 * @param[in] suffix The suffix of the filename.
 */
void exportImages(aliceVision::dataio::FeedProvider& feed,
                  const std::string& debugFolder,
                  const std::vector<std::size_t>& exportFrames,
                  const cv::Mat& cameraMatrix,
                  const cv::Mat& distCoeffs,
                  const cv::Size& imageSize,
                  const std::string& suffix = "_undistort.png");

/**
 * @brief This debug function lets the user to see the undistorted images.
 *
 * @param[in] debugSelectedImgFolder The path of the export folder for selected images.
 * @param[in] debugRejectedImgFolder The path of the export folder for rejected images.
 * @param[in] feed The image provider.
 * @param[in] calibInputFrames The ids of images used for the calibration.
 * @param[in] rejectedInputFrames The ids of the images with a detected calibration pattern rejected by the iterative optimization loop.
 * @param[in] unusedImagesIndexes The image indexes not selected during the first selection based on distribution in images.
 * @param[in] cameraMatrix The camera parameters.
 * @param[in] distCoeffs The distortion coefficients.
 * @param[in] imageSize The size of the image.
 */
void exportDebug(const std::string& debugSelectedImgFolder,
                 const std::string& debugRejectedImgFolder,
                 aliceVision::dataio::FeedProvider& feed,
                 const std::vector<std::size_t>& calibInputFrames,
                 const std::vector<std::size_t>& rejectedInputFrames,
                 const std::vector<std::size_t>& unusedImagesIndexes,
                 const cv::Mat& cameraMatrix,
                 const cv::Mat& distCoeffs,
                 const cv::Size& imageSize);

/**
 * @brief This function saves the parameters' camera into a txt file.
 *
 * @param[in] imageSize The size of the image.
 * @param[in] cameraMatrix The calibration matrix K of the camera.
 * @param[in] distCoeffs The distortion coefficients.
 * @param[out] filename The name of the camera parameters file.
 */
void saveCameraParamsToPlainTxt(const cv::Size& imageSize,
                                const cv::Mat& cameraMatrix,
                                const cv::Mat& distCoeffs,
                                const std::string& filename);

/**
 * @brief This function saves some parameters' camera into a txt file.
 *
 * @param[in] filename The name of the camera parameters file.
 * @param[in] imageSize The size of the image.
 * @param[in] boardSize The size of the calibration pattern.
 * @param[in] squareSize The distance between two points of the calibration pattern.
 * @param[in] aspectRatio The aspect ratio of the image.
 * @param[in] cvCalibFlags The Calibration flags.
 * @param[in] cameraMatrix The camera parameters.
 * @param[in] distCoeffs The distortion coefficients.
 * @param[in] rvecs Rotation of the camera of each image.
 * @param[in] tvecs Position of the camera of each image.
 * @param[in] reprojErrs The reprojection errors for each image.
 * @param[in] imagePoints Coordinates of the 2D points in each image of the sequence.
 * @param[in] totalAvgErr The average of the reprojection errors.
 */
void saveCameraParams(const std::string& filename,
                      const cv::Size& imageSize, const cv::Size& boardSize,
                      float squareSize, float aspectRatio, int cvCalibFlags,
                      const cv::Mat& cameraMatrix, const cv::Mat& distCoeffs,
                      const std::vector<cv::Mat>& rvecs, const std::vector<cv::Mat>& tvecs,
                      const std::vector<float>& reprojErrs,
                      const std::vector<std::vector<cv::Point2f> >& imagePoints,
                      double totalAvgErr);

}//namespace calibration
}//namespace aliceVision


text:
<?xml version="1.0"?>
<exslt:function xmlns:exslt="http://exslt.org/documentation"
               version="1" module="date" status="new">

<exslt:name>add</exslt:name>

<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:dc="http://purl.org/dc/elements/1.1/"
                 ID="date:add">
   <dc:subject>EXSLT</dc:subject>
   <dc:subject>date</dc:subject>
   <dc:subject>add</dc:subject>
   <exslt:revision>
      <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                       xmlns:dc="http://purl.org/dc/elements/1.1/"
                       ID="date:add.1">
         <exslt:version>1</exslt:version>
         <dc:creator email="mail@jenitennison.com"
                     url="http://www.jenitennison.com/">
            Jeni Tennison
         </dc:creator>
         <dc:date>2001-05-12</dc:date>
         <dc:description xmlns="http://www.w3.org/1999/xhtml">
            Returns the date/time resulting from adding a duration to a date/time.
         </dc:description>
      </rdf:Description>
   </exslt:revision>
</rdf:Description>

<exslt:doc xmlns:html="http://www.w3.org/1999/xhtml"
           xmlns="">

         The date:add function returns the date/time resulting from adding a duration to a date/time.

         The first argument must be right-truncated date/time strings in one of the formats defined in [XML Schema Part 2: Datatypes].  The permitted formats are as follows:

            xs:dateTime (<var>CCYY</var>-<var>MM</var>-<var>DD</var>T<var>hh</var>:<var>mm</var>:<var>ss</var>)

            xs:date (<var>CCYY</var>-<var>MM</var>-<var>DD</var>)

            xs:gYearMonth (<var>CCYY</var>-<var>MM</var>)

            xs:gYear (<var>CCYY</var>)

         The second argument is a string in the format defined for xs:duration in [3.2.6 duration] of [XML Schema Part 2: Datatypes].

         The return value is a right-truncated date/time strings in one of the formats defined in [XML Schema Part 2: Datatypes] and listed above.

         The date/time string passed as the first argument must be adjusted with the following steps before the duration is added to it.

            If the date/time string is in xs:gYear format and the duration string has a non-zero value for months, days, hours, minutes or seconds, then the date/time string is converted to xs:gYearMonth format by inserting the string -01 between the year and the time zone (if one is specified) and the next step is applied.

            If the date/time string is in xs:gYearMonth format and the duration string has a non-zero value for days, hours, minutes or seconds, then the date/time string is converted to xs:date format by inserting the string -01 between the month and the time zone (if one is specified) and the next step is applied.

            If the date/time string is in xs:date format and the duration string has a non-zero value for hours, minutes or seconds, then the date/time string is converted to xs:dateTime format by inserting the string T00:00:00 between the date and the time zone (if one is specified).

         Thus, given the following call:

date:add('2001-05', 'P3D5H')

         The date/time is converted to 2001-05-01T00:00:00 before the duration is added, and the result is therefore 2001-05-04T05:00:00.

         On the other hand, given the following call:

date:add('2001-05', 'P3Y')

         No adjustment is made to the date/time before the duration is added, and the result is therefore 2004-05.

</exslt:doc>

<exslt:definition xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <exslt:return type="string" />
   <exslt:arg name="date-time" type="string"
              optional="no" />
   <exslt:arg name="duration" type="string"
              optional="no" />
</exslt:definition>

<exslt:implementations />

<exslt:use-cases />

</exslt:function>


text:
using namespace std::chrono;
using namespace std;

class FPLOG_API Queue_Controller
{
    public:

        class Algo
        {
            public:

                struct Result
                {
                    size_t current_size = 0;
                    size_t removed_count = 0;
                };

                struct Fallback_Options
                {
                    enum Type
                    {
                        Remove_Newest = 765,
                        Remove_Oldest
                    };
                };

                Algo(queue<string*>& mq, size_t max_size, size_t current_size = 0): mq_(mq), max_size_(max_size), current_size_(static_cast<int>(current_size)){}
                virtual Result process_queue(size_t current_size) = 0;

            private:

                Algo();

            protected:

                queue<string*>& mq_;
                size_t max_size_;
                int current_size_;
        };

        class FPLOG_API Remove_Oldest: public Algo
        {
            public:

                    Remove_Oldest(Queue_Controller& qc): Algo(qc.mq_, qc.max_size_, qc.mq_size_) {}
                    Result process_queue(size_t current_size);
        };

        class FPLOG_API Remove_Newest;
        class FPLOG_API Remove_Newest_Below_Priority;
        class FPLOG_API Remove_Oldest_Below_Priority;

        Queue_Controller(size_t size_limit = 20000000, size_t timeout = 30000);

        bool empty();
        string *front();
        void pop();
        void push(string *str);

        void change_algo(std::shared_ptr<Algo> algo, Algo::Fallback_Options::Type fallback_algo);
        void change_params(size_t size_limit, size_t timeout);

        //configuration params as follows:
        //max_queue_size = [any positive integer]
        //emergency_timeout = [any positive integer]
        //emergency_algo = one of { remove_oldest, remove_newest, remove_oldest_below_prio, remove_newest_below_prio }
        //emergency_fallback_algo = one of { remove_oldest, remove_newest }
        //emergency_prio = use one of the fplog::Prio constants //only needed if algo is based on prio
        void apply_config(const fplog::Transport_Interface::Params& config);

    private:

        int mq_size_ = 0;
        size_t max_size_ = 0;

        queue<string*> mq_;

        std::shared_ptr<Algo> algo_;
        std::shared_ptr<Algo> algo_fallback_;

        size_t emergency_time_trigger_ = 0;
        time_point<system_clock, system_clock::duration> timer_start_;

        bool state_of_emergency();
        void handle_emergency();

        std::shared_ptr<Algo> make_algo(const std::string& name, const std::string& param);
};

class Queue_Controller::Remove_Newest: public Algo
{
    public:

            Remove_Newest(Queue_Controller& qc): Algo(qc.mq_, qc.max_size_, qc.mq_size_) {}
            Result process_queue(size_t current_size);
};

namespace fplog
{
    class Priority_Filter;
};

class Queue_Controller::Remove_Newest_Below_Priority: public Algo
{
    public:

            Remove_Newest_Below_Priority(Queue_Controller& qc, const char* prio, bool inclusive = false):
            Algo(qc.mq_, qc.max_size_, qc.mq_size_), prio_(prio), inclusive_(inclusive) { make_filter(); }
            //~Remove_Newest_Below_Priority(){}

            Result process_queue(size_t current_size);

    private:

            Remove_Newest_Below_Priority();
            void make_filter();

            std::string prio_;
            bool inclusive_;

            std::shared_ptr<fplog::Priority_Filter> filter_;
};

class Queue_Controller::Remove_Oldest_Below_Priority: public Algo
{
    public:

            Remove_Oldest_Below_Priority(Queue_Controller& qc, const char* prio, bool inclusive = false):
            Algo(qc.mq_, qc.max_size_, qc.mq_size_), prio_(prio), inclusive_(inclusive) { make_filter(); }
            //~Remove_Oldest_Below_Priority(){}

            Result process_queue(size_t current_size);

    private:

            Remove_Oldest_Below_Priority();
            void make_filter();

            std::string prio_;
            bool inclusive_;

            std::shared_ptr<fplog::Priority_Filter> filter_;
};


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

namespace SnakeBattleNet.Core.Prototypes
{
    /// <summary>
    /// Represents a snake from user perspective.
    /// </summary>
    public class Snake
    {
        public int Id { get; internal set; }
        public List<MindChip> MindChips { get; set; }
        public Passport Passport { get; set; }
        public Version Version { get; set; }
    }
}


text:
/* eslint-disable import/prefer-default-export */

export {default as App} from './App';
export {default as Routes} from './Routes';
export {default as StyledSnackbarProvider} from './StyledSnackbarProvider';