text:
.. include:: ../../../Includes.txt

.. _reference-reset:

=====
RESET
=====

Creates a reset button.

When activated, a reset button resets all controls to their initial values.

.. _reference-reset-accesskey:

accesskey
=========

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-accesskey`.

.. _reference-reset-alt:

alt
===

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-alt`.

.. _reference-reset-class:

class
=====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-class`.

.. _reference-reset-dir:

dir
===

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-dir`.

.. _reference-reset-disabled:

disabled
========

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-disabled`.

.. _reference-reset-id:

id
==

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-id`.

.. _reference-reset-label:

label
=====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-label`.

.. _reference-reset-lang:

lang
====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-lang`.

.. _reference-reset-layout:

layout
======

:aspect:`Description:`
    See general information for :ref:`reference-layout` and the :ref:`reference-layout-reset`
    specific information.

.. _reference-reset-name:

name
====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-name`.

.. _reference-reset-style:

style
=====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-style`.

.. _reference-reset-tabindex:

tabindex
========

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-tabindex`.

.. _reference-reset-title:

title
=====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-title`.

.. _reference-reset-type:

type
====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-type`.

:aspect:`Default:`
    reset

.. _reference-reset-value:

value
=====

:aspect:`Description:`
    See general information for  :ref:`reference-objects-attributes-value`.

[tsref:(cObject).FORM.FormObject.RESET]


text:
require 'open-uri'
host = "https://itunesconnect.apple.com"
url = host + open(host).read.match(/action="(\/WebObjects\/iTunesConnect.woa\/wo\/.*)"/)[1]
puts url

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>com.sibirjak.angara.resource - Angara Load Control 0.9.0</title>
<base target="classFrame">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">

Package com.sibirjak.angara.resource

Interfaces

ICallback

IDisplayAssetLoader

IResourceLoader

IResourceLoaderContainer

Classes

AbstractResourceLoader

Callback

LoadingError

ResourceLoaderEvent


text:
<?php
class date_helper {
	const MYSQL_DATETIME_FORMAT = 'Y-m-d H:i:s';
	const MYSQL_DATE_FORMAT = 'Y-m-d';
	const SCREENSHOT_DATE_FORMAT = 'Ymd';
	const GET_ONLY_YEAR = 'Y';

	/**
	 * Formatting according set format in wadmin config
	 * @param DATETIME $date
	 */
	static function short_date($date)
	{
		return self::get_date_in_format($date, Kohana::config('wadmin.short_date_format'));
	}

	static function mysql_datetime($date)
	{
		return self::get_date_in_format($date, self::MYSQL_DATETIME_FORMAT);
	}

	static function mysql_date($date)
	{
		return self::get_date_in_format($date, self::MYSQL_DATE_FORMAT);
	}

	static function screenshot_date($date)
	{
		return self::get_date_in_format($date, self::SCREENSHOT_DATE_FORMAT);
	}

	static function get_year($date)
	{
		return self::get_date_in_format($date, self::GET_ONLY_YEAR);
	}

	static function mysql_datetime_now()
	{
		$date_format = self::MYSQL_DATETIME_FORMAT;
		return date($date_format);
	}

	public static function get_date_in_format($date, $format)
	{
		if ($date == '')
		{
			return '';
		}
		return date($format, strtotime($date));
	}
}

?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>webapp-boilerplate</artifactId>
        <groupId>dantesun.github.io</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>core-services</artifactId>

    <dependencies>
        <dependency>
            <groupId>dantesun.github.io</groupId>
            <artifactId>core-models</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <!-- Enable logging using logback -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
        <!-- Enable the embedded remote shell-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-remote-shell</artifactId>
        </dependency>
        <!-- I don't like tomcat, use Jetty instead -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.hateoas</groupId>
            <artifactId>spring-hateoas</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>


text:
"""
Parser module specific to CASP-RR predictions
"""

__author__ = "Felix Simkovic"
__date__ = "03 Aug 2016"
__version__ = "0.13.3"

import collections
import re

from conkit.io._parser import ContactFileParser
from conkit.core.contact import Contact
from conkit.core.contactmap import ContactMap
from conkit.core.contactfile import ContactFile
from conkit.core.sequence import Sequence

# Credits to Stefan Seemayer - bits taken from PyMOL-RR
RE_PRFMAT = re.compile(r"PFRMAT\s+(RR)\s*$")
RE_TARGET = re.compile(r"^TARGET\s+(.*?)\s*$")
RE_AUTHOR = re.compile(r"^AUTHOR\s+(.*?)\s*$")
RE_REMARK = re.compile(r"^REMARK\s+(.*?)\s*$")
RE_METHOD = re.compile(r"^METHOD\s+(.*?)\s*$")
RE_MODEL = re.compile(r"^MODEL\s+(\w+)\s*$")
RE_SEQ = re.compile(r"^([A-Za-z\-]+)$")
RE_SPLIT = re.compile(r"\s+")
RE_RES = re.compile(r"([A-Za-z]+)([0-9]+)")
RE_ENDMDL = re.compile(r"^ENDMDL\s*$")
RE_END = re.compile(r"^END\s*$")

# Intermediate storage structures
ModelTemplate = collections.namedtuple("Model", ["id", "contacts", "sequence"])
ContactTemplate = collections.namedtuple(
    "Contact",
    ["res1_seq", "res2_seq", "lb", "ub", "raw_score", "res1_chain", "res2_chain", "res1_altseq", "res2_altseq"],
)

class CaspParser(ContactFileParser):
    """Parser class for CASP RR contact prediction file"""

    def __init__(self):
        super(CaspParser, self).__init__()

    def read(self, f_handle, f_id="casp"):
        """Read a contact file into a :obj:`~conkit.core.contactfile.ContactFile` instance

        Parameters
        ----------
        f_handle
           Open file handle [read permissions]
        f_id : str, optional
           Unique contact file identifier

        Returns
        -------
        :obj:`~conkit.core.contactfile.ContactFile`

        """
        lines = [l.strip() for l in f_handle.readlines()]
        contact_file = ContactFile(f_id)
        it = iter(lines)
        while True:
            try:
                line = next(it)
            except StopIteration:
                break
            if RE_PRFMAT.match(line):
                continue
            elif RE_TARGET.match(line):
                contact_file.remark = RE_TARGET.match(line).group(1)
            elif RE_AUTHOR.match(line):
                contact_file.author = RE_AUTHOR.match(line).group(1)
            elif RE_REMARK.match(line):
                contact_file.remark = RE_REMARK.match(line).group(1)
            elif RE_METHOD.match(line):
                contact_file.method = RE_METHOD.match(line).group(1)
            elif RE_MODEL.match(line):
                contact_map = ContactMap(RE_MODEL.match(line).group(1))
                seq_chunks = []
                while True:
                    try:
                        line = next(it)
                    except StopIteration:
                        break
                    if not line:
                        break
                    if RE_ENDMDL.match(line):
                        break
                    elif RE_END.match(line):
                        break
                    elif RE_SEQ.match(line):
                        seq_chunks.append(line)
                    else:
                        res1_entry, res2_entry, lb, ub, raw_score = RE_SPLIT.split(line)
                        # Split in case we have chain in inter-molecular scenarios
                        res1_split = RE_RES.split(res1_entry)
                        if len(res1_split) == 1:
                            res1_chain, res1_seq = "", res1_split[0]
                        elif len(res1_split) == 4:
                            res1_chain, res1_seq = res1_split[1], res1_split[2]
                        res2_split = RE_RES.split(res2_entry)
                        if len(res2_split) == 1:
                            res2_chain, res2_seq = "", res2_split[0]
                        elif len(res2_split) == 4:
                            res2_chain, res2_seq = res2_split[1], res2_split[2]
                        contact = Contact(
                            int(res1_seq), int(res2_seq), float(raw_score), distance_bound=(float(lb), float(ub))
                        )
                        contact.res1_chain = res1_chain
                        contact.res2_chain = res2_chain
                        contact.res1_altseq = int(res1_seq)
                        contact.res2_altseq = int(res2_seq)
                        contact_map.add(contact)
                if seq_chunks:
                    seq = "".join(seq_chunks)
                    sequence = Sequence("seq_{}".format(contact_map.id), seq)
                    contact_map.sequence = sequence
                    contact_map.set_sequence_register()
                contact_file.add(contact_map)
            elif RE_END.match(line):
                break
            else:
                raise ValueError("Unrecognized line type. Please report this issue")
        return contact_file

    def write(self, f_handle, hierarchy):
        """Write a contact file instance to to file

        Parameters
        ----------
        f_handle
           Open file handle [write permissions]
        hierarchy : :obj:`~conkit.core.contactfile.ContactFile`, :obj:`~conkit.core.contactmap.ContactMap`
                    or :obj:`~conkit.core.contact.Contact`

        """
        contact_file = self._reconstruct(hierarchy)
        content = "PFRMAT RR\n"
        if contact_file.target:
            content += "TARGET {}\n".format(contact_file.target)
        if contact_file.author:
            content += "AUTHOR {}\n".format(contact_file.author)
        if contact_file.remark:
            for remark in contact_file.remark:
                content += "REMARK {}\n".format(remark)
        if contact_file.method:
            for method in contact_file.method:
                content += "METHOD {}\n".format(method)
        for contact_map in contact_file:
            content += "MODEL  {}\n".format(contact_map.id)
            if isinstance(contact_map.sequence, Sequence):
                sequence = contact_map.sequence
                for i in range(0, sequence.seq_len, 50):
                    content += sequence.seq[i : i + 50] + "\n"
            # Casp Roll format specifies raw scores to be in [0, 1]
            if any(c.raw_score > 1.0 or c.raw_score < 0.0 for c in contact_map):
                contact_map.rescale(inplace=True)
            for contact in contact_map:
                s = "{res1_chain: <}{res1_seq: <4} {res2_chain: <}{res2_seq:<4} {lb: <3} {ub: <3} {raw_score: <.6f}\n"
                if contact.res1_chain == contact.res2_chain:
                    res1_chain = res2_chain = ""
                else:
                    res1_chain = contact.res1_chain
                    res2_chain = contact.res2_chain
                lb = int(contact.lower_bound) if float(contact.lower_bound).is_integer() else contact.lower_bound
                ub = int(contact.upper_bound) if float(contact.upper_bound).is_integer() else contact.upper_bound
                s = s.format(
                    res1_chain=res1_chain,
                    res1_seq=contact.res1_seq,
                    res2_chain=res2_chain,
                    res2_seq=contact.res2_seq,
                    lb=lb,
                    ub=ub,
                    raw_score=contact.raw_score,
                )
                content += s
            content += "ENDMDL\n"
        content += "END\n"
        f_handle.write(content)


text:
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>

  <title>SchemaSpy - pse.public</title>
  <link rel=stylesheet href='schemaSpy.css' type='text/css'>
  <meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>

Tables

Relationships

Constraints

Anomalies

Columns

Donate

  SchemaSpy Analysis of pse.public
  Generated by
SchemaSpy

Generated by SchemaSpy on Mon Dec 11 09:21 CET 2017

  Database Type: MySQL - 5.5.5-10.1.26-MariaDB

XML Representation
Insertion Order Deletion Order (for database loading/purging scripts)

<input type='checkbox' id='showTables' checked>
 <input type=checkbox id='showComments'>Comments

<colgroup>
<colgroup>
<colgroup>
<colgroup>
<colgroup>
<colgroup class='comment'>

  Table
  Children
  Parents
  Columns
  Rows
  Comments

  community
  2
  1
  5
  8

  contact

  1
  3
  60

  enumeration
  3

  2
  7

  enumeration_item

  2
  2
  20

  likes

  3
  3
  100

  post
  2
  3
  6
  200

  private_message

  2
  4
  60

  user_community

  2
  2
  44

  userprofile
  1

  14
  20

  users
  7
  1
  4
  20

    10 Tables

    45
    539

    0 Views

    0


text:
module.exports = function() {
  'use strict';

  return {
    /**
     * Your Trello developer API key
     *
     * Used to read info from your Trello board. Log in to Trello and visit the
     * Trello developer API keys page get get your key.
     *
     * @see https://trello.com/1/appKey/generate
     */
    trelloApiKey: 'b705841c7bbc5fe0a0c7df2a4663d280',

    /**
     * The Trello token authirizing `stello` to read your information
     *
     * After getting your API key visit:
     * https://trello.com/1/authorize?key=***YOUR-KEY***&name=stello&scope=read&expiration=never&response_type=token
     * To generate an everlasting read only token that `stello` can use to pull
     * down your site content.
     *
     * @see https://trello.com/docs/gettingstarted/authorize.html
     */
    trelloToken: '5dc81dc8e918d0773e79c2a1492b5b8096790f270127c3b456ca24eb0171f730',

    /**
     * URL to the board driving your stello site
     */
    trelloBoardUrl: 'https://trello.com/b/bkEURdPR/stello-demo-board'
  };
};


text:
package com.asakusafw.windgate.hadoopfs.ssh;

import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.ZipOutputStream;

/**
 * An {@link OutputStream} for single zip entry in {@link ZipOutputStream}.
 */
public class ZipEntryOutputStream extends OutputStream {

    private final ZipOutputStream zipped;

    private boolean closed = false;

    /**
     * Creates a new instance.
     * @param zipped target {@link ZipOutputStream}
     * @throws IllegalArgumentException if some parameters were {@code null}
     */
    public ZipEntryOutputStream(ZipOutputStream zipped) {
        if (zipped == null) {
            throw new IllegalArgumentException("zipped must not be null"); //$NON-NLS-1$
        }
        this.zipped = zipped;
    }

    @Override
    public void close() throws IOException {
        if (closed == false) {
            zipped.closeEntry();
        }
        closed = true;
    }

    @Override
    public void write(byte[] b) throws IOException {
        zipped.write(b);
    }

    @Override
    public void write(int b) throws IOException {
        zipped.write(b);
    }

    @Override
    public void flush() throws IOException {
        zipped.flush();
    }

    @Override
    public void write(byte[] b, int off, int len) throws IOException {
        zipped.write(b, off, len);
    }
}


text:
/**
 *  Point of contact for component modules
 *
 *  ie: import { CounterButton, InfoBar } from 'components';
 *
 */

export GithubButton from './GithubButton/GithubButton';
export Sidebar from './Sidebar/Sidebar';
export MaterialTitlePanel from './MaterialTitlePanel/MaterialTitlePanel';
export PageForm from './PageForm/PageForm';
export PageCards from './PageCards/PageCards';
export Posts from './Posts/Posts';
export PostForm from './PostForm/PostForm';
export Loader from './Loader/Loader';


text:
package org.apache.olingo.client.core.v4;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import java.io.IOException;
import java.io.InputStream;
import java.net.URI;

import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.client.api.domain.ClientEntitySet;
import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.client.api.serialization.ODataDeserializerException;
import org.junit.Test;

public class EntitySetTest extends AbstractTest {

  @Override
  protected ODataClient getClient() {
    return v4Client;
  }

  private void read(final ContentType contentType) throws IOException, ODataDeserializerException {
    final InputStream input = getClass().getResourceAsStream("Customers." + getSuffix(contentType));
    final ClientEntitySet entitySet = getClient().getBinder().getODataEntitySet(
        getClient().getDeserializer(contentType).toEntitySet(input));
    assertNotNull(entitySet);

    assertEquals(2, entitySet.getEntities().size());
    assertNull(entitySet.getNext());

    final ClientEntitySet written =
        getClient().getBinder().getODataEntitySet(new ResWrap<EntityCollection>((URI) null, null,
            getClient().getBinder().getEntitySet(entitySet)));
    assertEquals(entitySet, written);
  }

  @Test
  public void fromAtom() throws Exception {
    read(ContentType.APPLICATION_ATOM_XML);
  }

  @Test
  public void fromJSON() throws Exception {
    read(ContentType.JSON);
  }

  private void ref(final ContentType contentType) throws ODataDeserializerException {
    final InputStream input = getClass().getResourceAsStream("collectionOfEntityReferences." + getSuffix(contentType));
    final ClientEntitySet entitySet = getClient().getBinder().getODataEntitySet(
        getClient().getDeserializer(contentType).toEntitySet(input));
    assertNotNull(entitySet);

    for (ClientEntity entity : entitySet.getEntities()) {
      assertNotNull(entity.getId());
    }
    entitySet.setCount(entitySet.getEntities().size());

    final ClientEntitySet written =
        getClient().getBinder().getODataEntitySet(new ResWrap<EntityCollection>((URI) null, null,
            getClient().getBinder().getEntitySet(entitySet)));
    assertEquals(entitySet, written);
  }

  @Test
  public void atomRef() throws Exception {
    ref(ContentType.APPLICATION_ATOM_XML);
  }

  @Test
  public void jsonRef() throws Exception {
    ref(ContentType.JSON);
  }
}


text:
package com.stulsoft.pjava.basics.finalVar;

import java.util.function.Function;

/**
 * Playing with final and effectively final variables.
 *
 * @author Yuriy Stul
 */
public class FinalVarEx02 {
    private static void test1() {
        System.out.println("==>test1");
        FinalVarEx02 fv = new FinalVarEx02();
        int m = 123;    // Effectively final: no reassignment
        int r = fv.foo((s) -> s.length() + m);
        System.out.println("r=" + r);
        System.out.println("<==test1");
    }

    private static void test3() {
        System.out.println("==>test3");
        FinalVarEx02 fv = new FinalVarEx02();
        // Array 'm' is effectively final variable: we don't reassign reference to array - we change 0-th item
        int m[] = {123};
        int r = fv.foo((s) -> {
            m[0] += s.length();
            return m[0] + s.length();
        });
        System.out.println("r=" + r);
        System.out.println("<==test3");
    }

/*
Error: 'm' is neither final or effectively final
    private static void test2(){
        System.out.println("==>test2");
        FinalVarEx02 fv = new FinalVarEx02();
        int m = 123;
        int r = fv.foo((s)->{
            m += s.length();
            return m + s.length();
        });
        System.out.println("<==test2");
    }
*/

    private static void test4() {
        System.out.println("==>test4");
        FinalVarEx02 fv = new FinalVarEx02();
        // Array 'm' is final variable: we don't reassign reference to array - we change 0-th item
        final int m[] = {123};
        int r = fv.foo((s) -> {
            m[0] += s.length();
            return m[0] + s.length();
        });
        System.out.println("r=" + r);
        System.out.println("<==test4");
    }

    public static void main(String[] args) {
        System.out.println("==>main");
        test1();
        test3();
        test4();
        System.out.println("<==main");
    }

    private int foo(Function<String, Integer> f) {
        return f.apply("test");
    }

}


text:
#ifndef ALINOUS_COMPILE_SQL_ANALYZE_INDEXCONDITIONDETECTOR_H_
#define ALINOUS_COMPILE_SQL_ANALYZE_INDEXCONDITIONDETECTOR_H_
namespace alinous{namespace annotation{
class OneSource;
}}
namespace alinous {namespace compile {namespace sql {namespace analyze {
class IndexScanStrategy;}}}}

namespace alinous {namespace compile {namespace sql {namespace expression {
class ISQLExpression;}}}}

namespace alinous {namespace compile {namespace sql {namespace analyze {
class ScanTableMetadata;}}}}

namespace alinous {namespace compile {namespace sql {namespace expression {namespace blexp {
class AbstractSQLBooleanCollectionExpression;}}}}}

namespace alinous {namespace compile {namespace sql {namespace expression {namespace blexp {
class SQLAndExpression;}}}}}

namespace alinous {namespace compile {namespace sql {namespace expression {
class SQLParenthesisExpression;}}}}

namespace alinous {namespace compile {namespace sql {namespace expression {namespace blexp {
class SQLBoolSubExpression;}}}}}

namespace alinous {namespace system {
class AlinousException;}}

namespace java {namespace lang {
class IObject;
}}

namespace alinous {
class ThreadContext;
}

namespace alinous {namespace compile {namespace sql {namespace analyze {

using namespace ::alinous;
using namespace ::java::lang;
using ::java::util::Iterator;
using ::java::util::ArrayList;
using ::alinous::compile::sql::expression::ISQLExpression;
using ::alinous::compile::sql::expression::SQLParenthesisExpression;
using ::alinous::compile::sql::expression::blexp::AbstractSQLBooleanCollectionExpression;
using ::alinous::compile::sql::expression::blexp::SQLAndExpression;
using ::alinous::compile::sql::expression::blexp::SQLBoolSubExpression;
using ::alinous::system::AlinousException;

class IndexConditionDetector final : public virtual IObject {
public:
	IndexConditionDetector(const IndexConditionDetector& base) = default;
public:
	IndexConditionDetector(ThreadContext* ctx) throw() ;
	void __construct_impl(ThreadContext* ctx) throw() ;
	virtual ~IndexConditionDetector() throw();
	virtual void __releaseRegerences(bool prepare, ThreadContext* ctx) throw();
public:
	static IndexScanStrategy* detect(ISQLExpression* boolExpression, ScanTableMetadata* tableMetadata, bool debug, ThreadContext* ctx);
private:
	static void andExpression(SQLAndExpression* expression, IndexScanStrategy* indexes, ScanTableMetadata* tableMetadata, bool debug, ThreadContext* ctx);
	static void handleExpression(ISQLExpression* expression, IndexScanStrategy* indexes, ScanTableMetadata* tableMetadata, bool debug, ThreadContext* ctx);
public:
	static bool __init_done;
	static bool __init_static_variables();
public:
	static void __cleanUp(ThreadContext* ctx);
};

}}}}

#endif /* end of ALINOUS_COMPILE_SQL_ANALYZE_INDEXCONDITIONDETECTOR_H_ */


text:
<?php

namespace app\widgets;

use Yii;
use yii\db\Query;
use yii\helpers\Url;

class FilterTags extends \yii\base\Widget
{

    public function run()
    {
        //$request = Yii::$app->getRequest();
        $html = '
';
        $html .= '<input type="text" placeholder="Filter">';
        $html .= '
';

        echo $html;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="?android:attr/listPreferredItemHeightSmall"
	android:layout_centerVertical="true"
	android:paddingEnd="@dimen/margin_right"
	android:paddingLeft="@dimen/margin_left"
	android:paddingRight="@dimen/margin_right"
	android:paddingStart="@dimen/margin_left"
	android:background="@color/material_color_grey_50"
	android:elevation="2dp">

	<TextView
		android:id="@+id/title"
		style="@style/Base.TextAppearance.AppCompat.Title"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_gravity="center_vertical"
		tools:text="Title"/>

</FrameLayout>


text:
                            Setup Incentive

 Calculate Incentive

                                    Type
                                    Product
                                    Quanlity (Qty)
                                    Minimum
                                    Maximum
                                    Price/Qty (THB)

                                        <input type="text" ng-model="item.calType" style="border-style: none; text-align: left;">

                                        <input type="text" ng-model="item.calProd" style="border-style: none; text-align: left;">

                                        <input type="text" ng-model="item.calDesc1" style="border-style: none; text-align: center;">

                                        <input type="number" ng-model="item.calMin1" style="border-style: none; text-align: right;">

                                        <input type="number" ng-model="item.calMax1" style="border-style: none; text-align: right;">

                                        <input type="number" ng-model="item.calComm1" style="border-style: none; text-align: right;">

                          Add Incentive


text:
package com.junnanhao.samantha.info.adapter.holder;

import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.google.common.collect.ImmutableMap;
import com.junnanhao.samantha.model.entity.concept.ConceptDesc;
import com.junnanhao.samantha.model.entity.InfoBean;
import com.junnanhao.samantha.info.utils.Setter;

import static com.junnanhao.samanthaviews.R.layout.train_ticket_card;

/**
 * Created by Jonas on 2017/4/11.
 * hold train ticket views
 */

public class TicketViewHolder extends InfoBeanViewHolder {
    public TicketViewHolder(View itemView) {
        super(itemView);
    }

    @NonNull
    @Override
    protected ImmutableMap<String, Object> getViews() {
        return ImmutableMap.<String, Object>builder().build();
    }

    @NonNull
    @Override
    protected ImmutableMap<Long, Setter> getSetters() {
        return ImmutableMap.<Long, Setter>builder().build();
    }

    public void bindData(InfoBean bean) {

        TextView tvSetting = (TextView) findViewByResName(bean.type().ui().resNameEdit(), "id");
        if (tvSetting != null) {
            tvSetting.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                }
            });
        }

        if (bean.type().id().matches("1[0-9]*")) {
            tvDetailTitle.setText("火车票");
        }

        for (ConceptDesc description : bean.type().conceptDescs()) {
            String resName = description.identifier();
            String defType = description.resType();
            if (resName != null) {
                TextView tv = (TextView) findViewByResName(resName, defType);
                String value = bean.valueOfConcept(description.concept());
                if (tv != null && value != null) {
                    tv.setText(value);
                } else {
                    if (tv != null) {
                        tv.setVisibility(View.INVISIBLE);
                    }
                    if (tvSetting != null) {
                        tvSetting.setVisibility(View.VISIBLE);
                    }
                }
                if (description.concept().id() == 1) {
                    tvDetailTitleContent.setText(value);
                }
            }
        }
    }

    @Override
    public void clear() {

    }
}


text:
package org.kie.workbench.common.forms.adf.engine.shared.formGeneration.util.impl;

import org.kie.soup.commons.validation.PortablePreconditions;

public abstract class AbstractPropertyValueExtractor implements org.kie.workbench.common.forms.adf.engine.shared.formGeneration.util.PropertyValueExtractor {

    @Override
    public Object readPropertyValue(Object model,
                                    String propertyName) {
        PortablePreconditions.checkNotNull("model",
                                           model);
        PortablePreconditions.checkNotNull("propertyName",
                                           propertyName);

        return readValue(model,
                         propertyName);
    }

    protected abstract Object readValue(Object model,
                                        String propertyName);
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Mycosphaerella maxima Miles

### Remarks
null


text:
CREATE TABLE tbl1(a INTEGER PRIMARY KEY AUTOINCREMENT);
INSERT INTO tbl1 VALUES(10);


text:
require('Polycode/SceneMesh')

function SceneSprite() {
	if(arguments[0] != "__skip_ptr__") {
		this.__ptr = Polycode.SceneSprite()
	}
}

SceneSprite.prototype = Object.create(SceneMesh.prototype)

SceneSprite.prototype.getCurrentSprite = function() {
	var retVal = new Sprite("__skip_ptr__")
	retVal.__ptr = Polycode.SceneSprite_getCurrentSprite(this.__ptr)
	return retVal
}

SceneSprite.prototype.setSpriteByName = function(spriteName) {
	Polycode.SceneSprite_setSpriteByName(this.__ptr, spriteName)
}

SceneSprite.prototype.setCurrentFrame = function(frameIndex) {
	Polycode.SceneSprite_setCurrentFrame(this.__ptr, frameIndex)
}

SceneSprite.prototype.getCurrentFrame = function() {
	return Polycode.SceneSprite_getCurrentFrame(this.__ptr)
}

SceneSprite.prototype.Update = function(elapsed) {
	Polycode.SceneSprite_Update(this.__ptr, elapsed)
}

SceneSprite.prototype.getSpriteBoundingBox = function() {
	var retVal = new Vector3("__skip_ptr__")
	retVal.__ptr = Polycode.SceneSprite_getSpriteBoundingBox(this.__ptr)
	return retVal
}

SceneSprite.prototype.setPaused = function(val) {
	Polycode.SceneSprite_setPaused(this.__ptr, val)
}

SceneSprite.prototype.isPaused = function() {
	return Polycode.SceneSprite_isPaused(this.__ptr)
}

SceneSprite.prototype.setSprite = function(spriteEntry) {
	Polycode.SceneSprite_setSprite(this.__ptr, spriteEntry)
}

SceneSprite.prototype.setSpriteStateByName = function(name,startingFrame,playOnce) {
	Polycode.SceneSprite_setSpriteStateByName(this.__ptr, name, startingFrame, playOnce)
}

SceneSprite.prototype.getStartOnRandomFrame = function() {
	return Polycode.SceneSprite_getStartOnRandomFrame(this.__ptr)
}

SceneSprite.prototype.setStartOnRandomFrame = function(val) {
	Polycode.SceneSprite_setStartOnRandomFrame(this.__ptr, val)
}


text:
layout: post
date:	2011-06-08 00:46:00
title:  Hardly knew it....an earthquake
tags: [archived-posts]
categories: archives
permalink: /:categories/:year/:month/:day/:title/
---
According to the news report

 here

 and here

We had an earthquake in the St.Louis area this morning! I was awake, but I certainly didn't seem to feel anything...I guess I am not sensitive enough to feel the earth moving (though I *have* felt earlier tremors in Kolkata, and Bangalore, when usually people didn't believe me!)

Well, since the Richter scale is exponential, 3.9 is nothing much...thank goodness...it's nice to be able to read of such events in the news, and not have to experience them firsthand.


text:
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

"use strict";

const createMappingsSerializer = require("./createMappingsSerializer");

exports.getSourceAndMap = (inputSource, options) => {
	let code = "";
	let mappings = "";
	let sources = [];
	let sourcesContent = [];
	let names = [];
	const addMapping = createMappingsSerializer(options);
	const { source } = inputSource.streamChunks(
		Object.assign({}, options, { finalSource: true }),
		(
			chunk,
			generatedLine,
			generatedColumn,
			sourceIndex,
			originalLine,
			originalColumn,
			nameIndex
		) => {
			if (chunk !== undefined) code += chunk;
			mappings += addMapping(
				generatedLine,
				generatedColumn,
				sourceIndex,
				originalLine,
				originalColumn,
				nameIndex
			);
		},
		(sourceIndex, source, sourceContent) => {
			while (sources.length < sourceIndex) {
				sources.push(null);
			}
			sources[sourceIndex] = source;
			if (sourceContent !== undefined) {
				while (sourcesContent.length < sourceIndex) {
					sourcesContent.push(null);
				}
				sourcesContent[sourceIndex] = sourceContent;
			}
		},
		(nameIndex, name) => {
			while (names.length < nameIndex) {
				names.push(null);
			}
			names[nameIndex] = name;
		}
	);
	return {
		source: source !== undefined ? source : code,
		map:
			mappings.length > 0
				? {
						version: 3,
						file: "x",
						mappings,
						sources,
						sourcesContent:
							sourcesContent.length > 0 ? sourcesContent : undefined,
						names
				  }
				: null
	};
};

exports.getMap = (source, options) => {
	let mappings = "";
	let sources = [];
	let sourcesContent = [];
	let names = [];
	const addMapping = createMappingsSerializer(options);
	source.streamChunks(
		Object.assign({}, options, { source: false, finalSource: true }),
		(
			chunk,
			generatedLine,
			generatedColumn,
			sourceIndex,
			originalLine,
			originalColumn,
			nameIndex
		) => {
			mappings += addMapping(
				generatedLine,
				generatedColumn,
				sourceIndex,
				originalLine,
				originalColumn,
				nameIndex
			);
		},
		(sourceIndex, source, sourceContent) => {
			while (sources.length < sourceIndex) {
				sources.push(null);
			}
			sources[sourceIndex] = source;
			if (sourceContent !== undefined) {
				while (sourcesContent.length < sourceIndex) {
					sourcesContent.push(null);
				}
				sourcesContent[sourceIndex] = sourceContent;
			}
		},
		(nameIndex, name) => {
			while (names.length < nameIndex) {
				names.push(null);
			}
			names[nameIndex] = name;
		}
	);
	return mappings.length > 0
		? {
				version: 3,
				file: "x",
				mappings,
				sources,
				sourcesContent: sourcesContent.length > 0 ? sourcesContent : undefined,
				names
		  }
		: null;
};


text:
_{appName}: #{app.Name}, _{url}:

<input id="appUrl" name="Text1" type="text" style="width:420px;" value="#{app.Url}" />


text:
local lsp = require "lspconfig"
local m = require 'mapx'.setup { whichkey = true } --, global= true }

-- border
local border = {
  { "╭", "FloatBorder" }, { "─", "FloatBorder" }, { "╮", "FloatBorder" }, { "│", "FloatBorder" },
  { "╯", "FloatBorder" }, { "─", "FloatBorder" }, { "╰", "FloatBorder" }, { "│", "FloatBorder" },
}
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
  opts = opts or {}
  opts.border = opts.border or border
  return orig_util_open_floating_preview(contents, syntax, opts, ...)
end

-- signs
local signs = {
  Error = " ",
  Warning = " ",
  Hint = " ",
  Information = " "
}

for type, icon in pairs(signs) do
  local hl = "DiagnosticSign" .. type
  vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
local on_attach_vim = function(client, bufnr)
  require("aerial").on_attach(client, bufnr)
  -- require("lsp-status").on_attach(client)

  if client.server_capabilities.documentFormattingProvider then
    m.nnoremap("<leader>cf", function() vim.lsp.buf.formatting() end, "silent", "Format")
  end

  if client.server_capabilities.documentHighlightProvider  then
    vim.cmd([[
			augroup LSPDocumentHighlight
					au!
					autocmd CursorHold  <buffer> lua vim.lsp.buf.document_highlight()
					autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
					autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
				augroup END
			]])
  end
end

local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)

local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")

-- Setup servers
lsp.gopls.setup { on_attach = on_attach_vim, capabilities = capabilities,
  cmd = { "gopls", "serve" },
  settings = {
    gopls = {
      analyses = {
        unusedparams = true,
      },
      staticcheck = true,
      linksInHover = false,
      codelenses = {
        generate = true,
        gc_details = true,
        regenerate_cgo = true,
        tidy = true,
        upgrade_depdendency = true,
        vendor = true,
      },
      usePlaceholders = true,
    }
  } }
lsp.groovyls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.efm.setup { on_attach = on_attach_vim, capabilities = capabilities,
  init_options = { documentFormatting = true },
  filetypes = { "lua" },
  settings = { rootMarkers = { ".git/", "init.lua" },
    languages = { lua = { { formatCommand = "lua-format -i", formatStdin = true } } } }
}
lsp.jedi_language_server.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.jsonls.setup { on_attach = on_attach_vim, capabilities = capabilities, settings = {
  json = {
    schemas = require('schemastore').json.schemas(),
    validate = { enable = true },
  }
} }
lsp.cssls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.html.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.nimls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.perlls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.pylsp.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.rls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.rnix.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.tailwindcss.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.terraformls.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.tflint.setup { on_attach = on_attach_vim, capabilities = capabilities }
lsp.tsserver.setup { on_attach = on_attach_vim, capabilities = capabilities }

-- lsp.yamlls.setup{on_attach = on_attach_vim, capabilities = capabilities}
lsp.spectral.setup { on_attach = on_attach_vim, capabilities = capabilities,
  filetypes = { "yaml" },
  settings = { rootMarkers = { ".spectral.yaml", ".spectral.yml" } }
}
lsp.sumneko_lua.setup({ on_attach = on_attach_vim, capabilities = capabilities, settings = {
  Lua = {
    runtime = {
      -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
      version = 'LuaJIT',
      -- Setup your lua path
      path = runtime_path
    },
    diagnostics = {
      -- Get the language server to recognize the `vim` global
      globals = { 'vim', 'hs', 'luakit' }
    },
    workspace = {
      -- Make the server aware of Neovim runtime files
      library = {
        [vim.fn.expand("$VIMRUNTIME/lua")] = true,
        [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
        --          ["/Users/marcus/.hammerspoon/Spoons/EmmyLua.spoon/annotations"] = (vim.fn.has("macunix") == 1),
      }
    },
    maxPreload = 100000,
    preloadFileSize = 10000,
    -- Do not send telemetry data containing a randomized but unique identifier
    telemetry = { enable = false }
  },
},
  root_dir = function(fname)
    local root_pattern = lsp.util.root_pattern('.git', '*.rockspec', 'init.lua')(fname)

    if fname == vim.loop.os_homedir() then return nil end
    return root_pattern or fname
  end
})


text:
import logging
import stripe
from typing import Any, Dict, Optional, Tuple, cast

from django.core import signing
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.utils import timezone
from django.utils.translation import ugettext as _, ugettext as err_
from django.shortcuts import redirect, render
from django.urls import reverse
from django.conf import settings

from zerver.decorator import zulip_login_required, require_billing_access
from zerver.lib.json_encoder_for_html import JSONEncoderForHTML
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_error, json_success
from zerver.lib.validator import check_string, check_int, check_bool
from zerver.lib.timestamp import timestamp_to_datetime
from zerver.models import UserProfile, Realm
from corporate.lib.stripe import STRIPE_PUBLISHABLE_KEY, \
    stripe_get_customer, get_seat_count, \
    process_initial_upgrade, sign_string, \
    unsign_string, BillingError, process_downgrade, do_replace_payment_source, \
    MIN_INVOICED_LICENSES, DEFAULT_INVOICE_DAYS_UNTIL_DUE, \
    next_renewal_date, renewal_amount
from corporate.models import Customer, CustomerPlan, Plan, get_active_plan

billing_logger = logging.getLogger('corporate.stripe')

def unsign_seat_count(signed_seat_count: str, salt: str) -> int:
    try:
        return int(unsign_string(signed_seat_count, salt))
    except signing.BadSignature:
        raise BillingError('tampered seat count')

def check_upgrade_parameters(
        billing_modality: str, schedule: str, license_management: str, licenses: int,
        has_stripe_token: bool, seat_count: int) -> None:
    if billing_modality not in ['send_invoice', 'charge_automatically']:
        raise BillingError('unknown billing_modality')
    if schedule not in ['annual', 'monthly']:
        raise BillingError('unknown schedule')
    if license_management not in ['automatic', 'manual', 'mix']:
        raise BillingError('unknown license_management')

    if billing_modality == 'charge_automatically':
        if not has_stripe_token:
            raise BillingError('autopay with no card')

    min_licenses = seat_count
    if billing_modality == 'send_invoice':
        min_licenses = max(seat_count, MIN_INVOICED_LICENSES)
    if licenses is None or licenses < min_licenses:
        raise BillingError('not enough licenses',
                           _("You must invoice for at least {} users.".format(min_licenses)))

# Should only be called if the customer is being charged automatically
def payment_method_string(stripe_customer: stripe.Customer) -> str:
    stripe_source = stripe_customer.default_source
    # In case of e.g. an expired card
    if stripe_source is None:  # nocoverage
        return _("No payment method on file")
    if stripe_source.object == "card":
        return _("%(brand)s ending in %(last4)s" % {
            'brand': cast(stripe.Card, stripe_source).brand,
            'last4': cast(stripe.Card, stripe_source).last4})
    # There might be one-off stuff we do for a particular customer that
    # would land them here. E.g. by default we don't support ACH for
    # automatic payments, but in theory we could add it for a customer via
    # the Stripe dashboard.
    return _("Unknown payment method. Please contact %s." % (settings.ZULIP_ADMINISTRATOR,))  # nocoverage

@has_request_variables
def upgrade(request: HttpRequest, user: UserProfile,
            billing_modality: str=REQ(validator=check_string),
            schedule: str=REQ(validator=check_string),
            license_management: str=REQ(validator=check_string, default=None),
            licenses: int=REQ(validator=check_int, default=None),
            stripe_token: str=REQ(validator=check_string, default=None),
            signed_seat_count: str=REQ(validator=check_string),
            salt: str=REQ(validator=check_string)) -> HttpResponse:
    try:
        seat_count = unsign_seat_count(signed_seat_count, salt)
        if billing_modality == 'charge_automatically' and license_management == 'automatic':
            licenses = seat_count
        if billing_modality == 'send_invoice':
            schedule = 'annual'
            license_management = 'manual'
        check_upgrade_parameters(
            billing_modality, schedule, license_management, licenses,
            stripe_token is not None, seat_count)
        automanage_licenses = license_management in ['automatic', 'mix']

        billing_schedule = {'annual': CustomerPlan.ANNUAL,
                            'monthly': CustomerPlan.MONTHLY}[schedule]
        process_initial_upgrade(user, licenses, automanage_licenses, billing_schedule, stripe_token)
    except BillingError as e:
        if not settings.TEST_SUITE:  # nocoverage
            billing_logger.info(
                ("BillingError during upgrade: %s. user=%s, billing_modality=%s, schedule=%s, "
                 "license_management=%s, licenses=%s, has stripe_token: %s")
                % (e.description, user.id, billing_modality, schedule, license_management, licenses,
                   stripe_token is not None))
        return json_error(e.message, data={'error_description': e.description})
    except Exception as e:
        billing_logger.exception("Uncaught exception in billing: %s" % (e,))
        error_message = BillingError.CONTACT_SUPPORT
        error_description = "uncaught exception during upgrade"
        return json_error(error_message, data={'error_description': error_description})
    else:
        return json_success()

@zulip_login_required
def initial_upgrade(request: HttpRequest) -> HttpResponse:
    if not settings.BILLING_ENABLED:
        return render(request, "404.html")

    user = request.user
    customer = Customer.objects.filter(realm=user.realm).first()
    if customer is not None and CustomerPlan.objects.filter(customer=customer).exists():
        return HttpResponseRedirect(reverse('corporate.views.billing_home'))

    percent_off = 0
    if customer is not None and customer.default_discount is not None:
        percent_off = customer.default_discount

    seat_count = get_seat_count(user.realm)
    signed_seat_count, salt = sign_string(str(seat_count))
    context = {
        'publishable_key': STRIPE_PUBLISHABLE_KEY,
        'email': user.email,
        'seat_count': seat_count,
        'signed_seat_count': signed_seat_count,
        'salt': salt,
        'min_invoiced_licenses': max(seat_count, MIN_INVOICED_LICENSES),
        'default_invoice_days_until_due': DEFAULT_INVOICE_DAYS_UNTIL_DUE,
        'plan': "Zulip Standard",
        'page_params': JSONEncoderForHTML().encode({
            'seat_count': seat_count,
            'annual_price': 8000,
            'monthly_price': 800,
            'percent_off': float(percent_off),
        }),
    }  # type: Dict[str, Any]
    response = render(request, 'corporate/upgrade.html', context=context)
    return response

PLAN_NAMES = {
    Plan.CLOUD_ANNUAL: "Zulip Standard (billed annually)",
    Plan.CLOUD_MONTHLY: "Zulip Standard (billed monthly)",
}

@zulip_login_required
def billing_home(request: HttpRequest) -> HttpResponse:
    user = request.user
    customer = Customer.objects.filter(realm=user.realm).first()
    if customer is None:
        return HttpResponseRedirect(reverse('corporate.views.initial_upgrade'))
    if not CustomerPlan.objects.filter(customer=customer).exists():
        return HttpResponseRedirect(reverse('corporate.views.initial_upgrade'))

    if not user.is_realm_admin and not user.is_billing_admin:
        context = {'admin_access': False}  # type: Dict[str, Any]
        return render(request, 'corporate/billing.html', context=context)
    context = {'admin_access': True}

    stripe_customer = stripe_get_customer(customer.stripe_customer_id)
    plan = get_active_plan(customer)
    if plan is not None:
        plan_name = {
            CustomerPlan.STANDARD: 'Zulip Standard',
            CustomerPlan.PLUS: 'Zulip Plus',
        }[plan.tier]
        licenses = plan.licenses
        # Should do this in javascript, using the user's timezone
        renewal_date = '{dt:%B} {dt.day}, {dt.year}'.format(dt=next_renewal_date(plan))
        renewal_cents = renewal_amount(plan)
        charge_automatically = plan.charge_automatically
        if charge_automatically:
            payment_method = payment_method_string(stripe_customer)
        else:
            payment_method = 'Billed by invoice'
    # Can only get here by subscribing and then downgrading. We don't support downgrading
    # yet, but keeping this code here since we will soon.
    else:  # nocoverage
        plan_name = "Zulip Free"
        licenses = 0
        renewal_date = ''
        renewal_cents = 0
        payment_method = ''
        charge_automatically = False

    context.update({
        'plan_name': plan_name,
        'licenses': licenses,
        'renewal_date': renewal_date,
        'renewal_amount': '{:,.2f}'.format(renewal_cents / 100.),
        'payment_method': payment_method,
        'charge_automatically': charge_automatically,
        'publishable_key': STRIPE_PUBLISHABLE_KEY,
        'stripe_email': stripe_customer.email,
    })
    return render(request, 'corporate/billing.html', context=context)

@require_billing_access
def downgrade(request: HttpRequest, user: UserProfile) -> HttpResponse:  # nocoverage
    try:
        process_downgrade(user)
    except BillingError as e:
        return json_error(e.message, data={'error_description': e.description})
    return json_success()

@require_billing_access
@has_request_variables
def replace_payment_source(request: HttpRequest, user: UserProfile,
                           stripe_token: str=REQ("stripe_token", validator=check_string)) -> HttpResponse:
    try:
        do_replace_payment_source(user, stripe_token)
    except BillingError as e:
        return json_error(e.message, data={'error_description': e.description})
    return json_success()


text:
#include <aws/finspace/model/ListEnvironmentsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::finspace::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

ListEnvironmentsResult::ListEnvironmentsResult()
{
}

ListEnvironmentsResult::ListEnvironmentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

ListEnvironmentsResult& ListEnvironmentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("environments"))
  {
    Aws::Utils::Array<JsonView> environmentsJsonList = jsonValue.GetArray("environments");
    for(unsigned environmentsIndex = 0; environmentsIndex < environmentsJsonList.GetLength(); ++environmentsIndex)
    {
      m_environments.push_back(environmentsJsonList[environmentsIndex].AsObject());
    }
  }

  if(jsonValue.ValueExists("nextToken"))
  {
    m_nextToken = jsonValue.GetString("nextToken");

  }

  return *this;
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Revis. gen. pl. (Leipzig) 3: 476 (1898)

#### Original name
Septoria breviuscula Bubák & Dearn.

### Remarks
null


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v12/services/customer_feed_service.proto

package com.google.ads.googleads.v12.services;

public interface MutateCustomerFeedResultOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v12.services.MutateCustomerFeedResult)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * Returned for successful operations.
   *

   *
   * string resource_name = 1 [(.google.api.resource_reference) = { ... }
   * @return The resourceName.
   */
  java.lang.String getResourceName();
  /**
   *

   * Returned for successful operations.
   *

   *
   * string resource_name = 1 [(.google.api.resource_reference) = { ... }
   * @return The bytes for resourceName.
   */
  com.google.protobuf.ByteString
      getResourceNameBytes();

  /**
   *

   * The mutated customer feed with only mutable fields after mutate. The field
   * will only be returned when response_content_type is set to
   * "MUTABLE_RESOURCE".
   *

   *
   * .google.ads.googleads.v12.resources.CustomerFeed customer_feed = 2;
   * @return Whether the customerFeed field is set.
   */
  boolean hasCustomerFeed();
  /**
   *

   * The mutated customer feed with only mutable fields after mutate. The field
   * will only be returned when response_content_type is set to
   * "MUTABLE_RESOURCE".
   *

   *
   * .google.ads.googleads.v12.resources.CustomerFeed customer_feed = 2;
   * @return The customerFeed.
   */
  com.google.ads.googleads.v12.resources.CustomerFeed getCustomerFeed();
  /**
   *

   * The mutated customer feed with only mutable fields after mutate. The field
   * will only be returned when response_content_type is set to
   * "MUTABLE_RESOURCE".
   *

   *
   * .google.ads.googleads.v12.resources.CustomerFeed customer_feed = 2;
   */
  com.google.ads.googleads.v12.resources.CustomerFeedOrBuilder getCustomerFeedOrBuilder();
}


text:
struct segdesc {
  uint lim_15_0 : 16;  // Low bits of segment limit
  uint base_15_0 : 16; // Low bits of segment base address
  uint base_23_16 : 8; // Middle bits of segment base address
  uint type : 4;       // Segment type (see STS_ constants)
  uint s : 1;          // 0 = system, 1 = application
  uint dpl : 2;        // Descriptor Privilege Level
  uint p : 1;          // Present
  uint lim_19_16 : 4;  // High bits of segment limit
  uint avl : 1;        // Unused (available for software use)
  uint rsv1 : 1;       // Reserved
  uint db : 1;         // 0 = 16-bit segment, 1 = 32-bit segment
  uint g : 1;          // Granularity: limit scaled by 4K when set
  uint base_31_24 : 8; // High bits of segment base address
};

// Normal segment
#define SEG(type, base, lim, dpl) (struct segdesc)    \
{ ((lim) >> 12) & 0xffff, (uint)(base) & 0xffff,      \
  ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1,       \
  (uint)(lim) >> 28, 0, 0, 1, 1, (uint)(base) >> 24 }

#define SEG16(type, base, lim, dpl) (struct segdesc)  \
{ (lim) & 0xffff, (uint)(base) & 0xffff,              \
  ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1,       \
  (uint)(lim) >> 16, 0, 0, 1, 0, (uint)(base) >> 24 }

#define DPL_USER    0x3     // User DPL

// Application segment type bits
#define STA_X       0x8     // Executable segment
#define STA_E       0x4     // Expand down (non-executable segments)
#define STA_C       0x4     // Conforming code segment (executable only)
#define STA_W       0x2     // Writeable (non-executable segments)
#define STA_R       0x2     // Readable (executable segments)
#define STA_A       0x1     // Accessed

// System segment type bits
#define STS_T16A    0x1     // Available 16-bit TSS
#define STS_LDT     0x2     // Local Descriptor Table
#define STS_T16B    0x3     // Busy 16-bit TSS
#define STS_CG16    0x4     // 16-bit Call Gate
#define STS_TG      0x5     // Task Gate / Coum Transmitions
#define STS_IG16    0x6     // 16-bit Interrupt Gate
#define STS_TG16    0x7     // 16-bit Trap Gate
#define STS_T32A    0x9     // Available 32-bit TSS
#define STS_T32B    0xB     // Busy 32-bit TSS
#define STS_CG32    0xC     // 32-bit Call Gate
#define STS_IG32    0xE     // 32-bit Interrupt Gate
#define STS_TG32    0xF     // 32-bit Trap Gate

// Task state segment format
struct taskstate {
  uint link;         // Old ts selector
  uint esp0;         // Stack pointers and segment selectors
  ushort ss0;        //   after an increase in privilege level
  ushort padding1;
  uint *esp1;
  ushort ss1;
  ushort padding2;
  uint *esp2;
  ushort ss2;
  ushort padding3;
  void *cr3;         // Page directory base
  uint *eip;         // Saved state from last task switch
  uint eflags;
  uint eax;          // More saved state (registers)
  uint ecx;
  uint edx;
  uint ebx;
  uint *esp;
  uint *ebp;
  uint esi;
  uint edi;
  ushort es;         // Even more saved state (segment selectors)
  ushort padding4;
  ushort cs;
  ushort padding5;
  ushort ss;
  ushort padding6;
  ushort ds;
  ushort padding7;
  ushort fs;
  ushort padding8;
  ushort gs;
  ushort padding9;
  ushort ldt;
  ushort padding10;
  ushort t;          // Trap on task switch
  ushort iomb;       // I/O map base address
};

// Gate descriptors for interrupts and traps
struct gatedesc {
  uint off_15_0 : 16;   // low 16 bits of offset in segment
  uint cs : 16;         // code segment selector
  uint args : 5;        // # args, 0 for interrupt/trap gates
  uint rsv1 : 3;        // reserved(should be zero I guess)
  uint type : 4;        // type(STS_{TG,IG32,TG32})
  uint s : 1;           // must be 0 (system)
  uint dpl : 2;         // descriptor(meaning new) privilege level
  uint p : 1;           // Present
  uint off_31_16 : 16;  // high bits of offset in segment
};

// Set up a normal interrupt/trap gate descriptor.
// - istrap: 1 for a trap (= exception) gate, 0 for an interrupt gate.
//   interrupt gate clears FL_IF, trap gate leaves FL_IF alone
// - sel: Code segment selector for interrupt/trap handler
// - off: Offset in code segment for interrupt/trap handler
// - dpl: Descriptor Privilege Level -
//        the privilege level required for software to invoke
//        this interrupt/trap gate explicitly using an int instruction.
#define SETGATE(gate, istrap, sel, off, d)                \
{                                                         \
  (gate).off_15_0 = (uint) (off) & 0xffff;                \
  (gate).cs = (sel);                                      \
  (gate).args = 0;                                        \
  (gate).rsv1 = 0;                                        \
  (gate).type = (istrap) ? STS_TG32 : STS_IG32;           \
  (gate).s = 0;                                           \
  (gate).dpl = (d);                                       \
  (gate).p = 1;                                           \
  (gate).off_31_16 = (uint) (off) >> 16;                  \
}


text:
<?php declare(strict_types=1);

namespace Composer\Repository;

use Composer\Package\BasePackage;
use Composer\Package\PackageInterface;

/**
 * Composite repository.
 *
 * @author Beau Simensen <beau@dflydev.com>
 */
class CompositeRepository implements RepositoryInterface
{
    /**
     * List of repositories
     * @var RepositoryInterface[]
     */
    private $repositories;

    /**
     * Constructor
     * @param RepositoryInterface[] $repositories
     */
    public function __construct(array $repositories)
    {
        $this->repositories = [];
        foreach ($repositories as $repo) {
            $this->addRepository($repo);
        }
    }

    public function getRepoName(): string
    {
        return 'composite repo ('.implode(', ', array_map(static function ($repo): string {
            return $repo->getRepoName();
        }, $this->repositories)).')';
    }

    /**
     * Returns all the wrapped repositories
     *
     * @return RepositoryInterface[]
     */
    public function getRepositories(): array
    {
        return $this->repositories;
    }

    /**
     * @inheritDoc
     */
    public function hasPackage(PackageInterface $package): bool
    {
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            if ($repository->hasPackage($package)) {
                return true;
            }
        }

        return false;
    }

    /**
     * @inheritDoc
     */
    public function findPackage($name, $constraint): ?BasePackage
    {
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $package = $repository->findPackage($name, $constraint);
            if (null !== $package) {
                return $package;
            }
        }

        return null;
    }

    /**
     * @inheritDoc
     */
    public function findPackages($name, $constraint = null): array
    {
        $packages = [];
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $packages[] = $repository->findPackages($name, $constraint);
        }

        return $packages ? array_merge(...$packages) : [];
    }

    /**
     * @inheritDoc
     */
    public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = []): array
    {
        $packages = [];
        $namesFound = [];
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $result = $repository->loadPackages($packageNameMap, $acceptableStabilities, $stabilityFlags, $alreadyLoaded);
            $packages[] = $result['packages'];
            $namesFound[] = $result['namesFound'];
        }

        return [
            'packages' => $packages ? array_merge(...$packages) : [],
            'namesFound' => $namesFound ? array_unique(array_merge(...$namesFound)) : [],
        ];
    }

    /**
     * @inheritDoc
     */
    public function search(string $query, int $mode = 0, ?string $type = null): array
    {
        $matches = [];
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $matches[] = $repository->search($query, $mode, $type);
        }

        return \count($matches) > 0 ? array_merge(...$matches) : [];
    }

    /**
     * @inheritDoc
     */
    public function getPackages(): array
    {
        $packages = [];
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $packages[] = $repository->getPackages();
        }

        return $packages ? array_merge(...$packages) : [];
    }

    /**
     * @inheritDoc
     */
    public function getProviders($packageName): array
    {
        $results = [];
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $results[] = $repository->getProviders($packageName);
        }

        return $results ? array_merge(...$results) : [];
    }

    public function removePackage(PackageInterface $package): void
    {
        foreach ($this->repositories as $repository) {
            if ($repository instanceof WritableRepositoryInterface) {
                $repository->removePackage($package);
            }
        }
    }

    /**
     * @inheritDoc
     */
    public function count(): int
    {
        $total = 0;
        foreach ($this->repositories as $repository) {
            /* @var $repository RepositoryInterface */
            $total += $repository->count();
        }

        return $total;
    }

    /**
     * Add a repository.
     */
    public function addRepository(RepositoryInterface $repository): void
    {
        if ($repository instanceof self) {
            foreach ($repository->getRepositories() as $repo) {
                $this->addRepository($repo);
            }
        } else {
            $this->repositories[] = $repository;
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ETO;
using BSO;
using System.Data;

namespace CMS.Client.Admin
{
    public partial class listadmin : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["dll"] != null)
                NavigationTitle(Page.RouteData.Values["dll"].ToString());
            if (!IsPostBack)
            {
                ViewRoles();
                ViewAdmin();

            }
        }
        #region NavigationTitle
        private void NavigationTitle(string url)
        {
            ModulesBSO modulesBSO = new ModulesBSO();
            Modules modules = modulesBSO.GetModulesByUrl(url);
            imgIcon.ImageUrl = "~/Upload/Admin_Theme/Icons/" + modules.ModulesIcon;
            litModules.Text = modules.ModulesName;
        }
        #endregion

        #region ViewRoles
        public void ViewRoles()
        {
            ddlRoles.Items.Clear();
            RolesBSO rolesBSO = new RolesBSO();
            DataTable table = rolesBSO.GetAllRoles();
            DataView dataView = new DataView(table);
            dataView.RowFilter = "Roles_Name NOT IN ('adminsys32','Administrators')";
            DataTable dataTable = dataView.ToTable();

            commonBSO commonBSO = new commonBSO();
            commonBSO.FillToDropDown(ddlRoles, dataTable, "~~ Trong tất cả các nhóm ~~", "0", "Roles_Name", "Roles_ID", "");

        }
        #endregion

        #region ViewAdmin
        protected void ViewAdmin()
        {
            AdminBSO adminBSO = new AdminBSO();
            DataTable table = adminBSO.GetAllAdminRoles();
            DataView dataView = new DataView(table);
            //dataView.RowFilter = "Admin_Username <> 'administrator' and Admin_Username <> 'Administrator'";
            dataView.RowFilter = "Admin_Username not in ('administrator','Administrator')";
            dataView.Sort = "Admin_Username ASC";
            DataTable dataTable = dataView.ToTable();
            commonBSO commonBSO = new commonBSO();
            commonBSO.FillToGridView(grvAdmin, dataTable);
        }
        #endregion

        protected void grvAdmin_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                ImageButton image_del = (ImageButton)e.Row.FindControl("btn_delete");
                image_del.Attributes.Add("onclick", "javascript:return confirm('Bạn chắc chắn muốn xóa ??');");

            }
        }
        protected void grvAdmin_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string aId = e.CommandArgument.ToString();
            string aName = e.CommandName.ToLower();
            switch (aName)
            {
                case "user":
                    Response.Redirect("~/Admins/editadminaddroles/" + aId + "/Default.aspx");
                    break;
                case "edit":
                    Response.Redirect("~/Admins/editadmin/" + aId + "/Default.aspx");
                    break;
                case "delete":
                    AdminBSO adminBSO = new AdminBSO();
                    adminBSO.DeleteAdmin(aId);
                    ViewAdmin();
                    break;
            }
        }
        protected void grvAdmin_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {

        }
        protected void btn_search_Click(object sender, EventArgs e)
        {

            int cId = Convert.ToInt32(ddlRoles.SelectedValue);
            AdminBSO adminBSO = new AdminBSO();
            //DataTable table = adminBSO.AdminGetAllRolesByID(cId);

            DataTable dataTable = new DataTable();
            commonBSO commonBSO = new commonBSO();
            DataTable table = adminBSO.GetAllAdminRoles();
            DataView dataView = new DataView(table);
            //dataView.RowFilter = "Admin_Username <> 'administrator' and Admin_Username <> 'Administrator'";

            if (cId == 0)
            {
                dataView.RowFilter = "Admin_Username not in ('administrator','Administrator')";
                dataTable = dataView.ToTable();
                commonBSO.FillToGridView(grvAdmin, dataTable);
            }
            else
            {
                AdminRolesBSO adminRolesBSO = new AdminRolesBSO();
                string strUser = adminRolesBSO.GetAdminUserName1(cId);
                if (strUser != "")
                {
                    DataTable table1 = adminBSO.GetAdminBystrName(strUser);
                    commonBSO.FillToGridView(grvAdmin, table1);
                }

            }

        }

    }
}


text:
namespace UnrealCodeAnalyzer
{
	FVisitor::FVisitor(clang::ASTContext* Context, clang::StringRef InFile) :
		SourceManager(Context->getSourceManager())
	{ }

	bool FVisitor::VisitDeclRefExpr(clang::DeclRefExpr* Expression)
	{
		// Any usage of a named declaration - basically everything that causes compile time dependency.
		auto Decl = Expression->getFoundDecl();
		auto UsageLocation = Expression->getLocation();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCallExpr(clang::CallExpr* Expression)
	{
		auto Decl = Expression->getCalleeDecl();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCXXConstructExpr(clang::CXXConstructExpr* Expression)
	{
		auto Decl = Expression->getConstructor();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCXXDefaultInitExpr(clang::CXXDefaultInitExpr* Expression)
	{
		auto Decl = Expression->getField();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCXXDefaultArgExpr(clang::CXXDefaultArgExpr* Expression)
	{
		auto Decl = Expression->getParam();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCXXNewExpr(clang::CXXNewExpr* Expression)
	{
		auto Decl = Expression->getOperatorNew();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		Decl = Expression->getOperatorDelete();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitCXXDeleteExpr(clang::CXXDeleteExpr* Expression)
	{
		auto Decl = Expression->getOperatorDelete();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitMemberExpr(clang::MemberExpr* Expression)
	{
		auto Decl = Expression->getMemberDecl();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitSizeOfPackExpr(clang::SizeOfPackExpr* Expression)
	{
		auto Decl = Expression->getPack();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitSubstNonTypeTemplateParmExpr(clang::SubstNonTypeTemplateParmExpr* Expression)
	{
		auto Decl = Expression->getParameter();
		auto UsageLocation = Expression->getLocStart();
		ParseUsageOfDecl(Decl, UsageLocation);
		return true;
	}

	bool FVisitor::VisitDecl(clang::Decl* Declaration)
	{
		// Any declaration with a name: label, namespace alias, namespace, template, type, various forms of "using", value.
		auto SourceRange = Declaration->getSourceRange();
		auto Begin = SourceRange.getBegin();
		auto DecomposedLoc = SourceManager.getDecomposedLoc(Begin);
		auto Line = SourceManager.getLineNumber(DecomposedLoc.first, DecomposedLoc.second);
		auto Col = SourceManager.getColumnNumber(DecomposedLoc.first, DecomposedLoc.second);
		auto Filename = SourceManager.getFilename(Begin);
		auto Data= Filename.data();
		DeclToFilename.Add(Declaration, Data);
		return true;
	}

	void FVisitor::ParseUsageOfDecl(clang::Decl* Declaration, const clang::SourceLocation& UsageLocation)
	{
		if (!DeclToFilename.Contains(Declaration))
		{
			// There are various cases when NamedDecl isn't added to NamedDeclToFilename
			// but we can safely ignore all of them, since they don't cause compile time dependency.
			return;
		}

		auto ExpressionLocation = UsageLocation;
		auto ExpressionFileId = SourceManager.getFileID(ExpressionLocation);
		auto ExpressionFilename = FString(SourceManager.getFilename(SourceManager.getLocForStartOfFile(ExpressionFileId)).data());
		ExpressionFilename.ReplaceInline(TEXT("\\"), TEXT("/"));
		auto DeclarationLocation = Declaration->getLocation();
		auto DeclarationFileId = SourceManager.getFileID(DeclarationLocation);
		if (DeclarationFileId == ExpressionFileId)
		{
			// Don't add compiled file as a required include.
			return;
		}

		auto DeclarationFilename = FString(SourceManager.getFilename(DeclarationLocation).data());
		DeclarationFilename.ReplaceInline(TEXT("\\"), TEXT("/"));

		auto DecomposedExpressionLocation = SourceManager.getDecomposedLoc(ExpressionLocation);
		auto Line = SourceManager.getLineNumber(DecomposedExpressionLocation.first, DecomposedExpressionLocation.second);
		auto Col = SourceManager.getColumnNumber(DecomposedExpressionLocation.first, DecomposedExpressionLocation.second);

		auto DeclarationFilenameHash = FIncludeSetMapKeyFuncs::GetKeyHash(DeclarationFilename);
		auto ExpressionFilenameHash = FIncludeSetMapKeyFuncs::GetKeyHash(ExpressionFilename);

		GHashToFilename.Add(DeclarationFilenameHash, DeclarationFilename);
		GHashToFilename.Add(ExpressionFilenameHash, ExpressionFilename);

		if (!Includes.Contains(ExpressionFilenameHash))
		{
			Includes.Add(ExpressionFilenameHash, FIncludeSet());
		}
		if (!Includes.Contains(DeclarationFilenameHash))
		{
			Includes.Add(DeclarationFilenameHash, FIncludeSet());
		}

		Includes[ExpressionFilenameHash].Add(DeclarationFilenameHash);
	}

	bool FVisitor::VisitCXXRecordDecl(clang::CXXRecordDecl* Declaration)
	{
		if (!Declaration->getDefinition())
		{
			return true;
		}

		for (auto BaseDecl : Declaration->bases())
		{
			if (auto TypePtr = BaseDecl.getType().getTypePtr())
			{
				if (auto BaseClassDecl = TypePtr->getAsCXXRecordDecl())
				{
					ParseUsageOfDecl(BaseClassDecl, Declaration->getSourceRange().getBegin());
				}
			}
		}

		return true;
	}

	bool FVisitor::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl* Declaration)
	{
		for (int32 Index = 0, Size = Declaration->getTemplateInstantiationArgs().size(); Index < Size; ++Index)
		{
			auto Argument = Declaration->getTemplateInstantiationArgs().get(Index);
			if (Argument.getKind() == clang::TemplateArgument::ArgKind::Type)
			{
				if (auto TypePtr = Argument.getAsType().getTypePtr())
				{
					if (auto RecordDecl = TypePtr->getAsCXXRecordDecl())
					{
						ParseUsageOfDecl(RecordDecl, Declaration->getLocStart());
					}
				}
			}
		}
		return true;
	}

	bool FVisitor::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl* Declaration)
	{
		for (auto Spec : Declaration->specializations())
		{
			auto TemplateArguments = Spec->getTemplateSpecializationInfo()->TemplateArguments;

			for (int32 Index = 0, Size = TemplateArguments->size(); Index < Size; ++Index)
			{
				auto Argument = TemplateArguments->get(Index);
				if (Argument.getKind() == clang::TemplateArgument::ArgKind::Type)
				{
					if (auto TypePtr = Argument.getAsType().getTypePtr())
					{
						if (auto RecordDecl = TypePtr->getAsCXXRecordDecl())
						{
							ParseUsageOfDecl(RecordDecl, Declaration->getLocStart());
						}
					}
				}
			}
		}

		return true;
	}

	bool FVisitor::VisitVarTemplateDecl(clang::VarTemplateDecl* Declaration)
	{
		for (auto Spec : Declaration->specializations())
		{
			const auto& TemplateArguments = Spec->getTemplateArgs();

			for (int32 Index = 0, Size = TemplateArguments.size(); Index < Size; ++Index)
			{
				auto Argument = TemplateArguments.get(Index);
				if (Argument.getKind() == clang::TemplateArgument::ArgKind::Type)
				{
					if (auto TypePtr = Argument.getAsType().getTypePtr())
					{
						if (auto RecordDecl = TypePtr->getAsCXXRecordDecl())
						{
							ParseUsageOfDecl(RecordDecl, Declaration->getLocStart());
						}
					}
				}
			}
		}

		return true;
	}

}


text:
@implementation PooCleanCache
// 获取cachePath路径下文件夹大小

+ (NSString *)getCacheSize
{
    // 调试
#ifdef DEBUG
    // 如果文件夹不存在或者不是一个文件夹那么就抛出一个异常
    // 抛出异常会导致程序闪退,所以只在调试阶段抛出,发布阶段不要再抛了,不然极度影响用户体验
    BOOL isDirectory = NO;
    BOOL isExist = [fileManager fileExistsAtPath:cachePath isDirectory:&isDirectory];

    if (!isExist || !isDirectory)
    {
        NSException *exception = [NSException exceptionWithName:@"文件错误" reason:@"请检查你的文件路径!" userInfo:nil];
        [exception raise];
    }

    //发布
#else
#endif
    //获取"cachePath"文件夹下面的所有文件
    NSArray *subpathArray= [fileManager subpathsAtPath:cachePath];
    NSString *filePath = nil;
    long long totalSize = 0;

    for (NSString *subpath in subpathArray)
    {
        // 拼接每一个文件的全路径
        filePath =[cachePath stringByAppendingPathComponent:subpath];
        // isDirectory,是否是文件夹,默认不是
        BOOL isDirectory = NO;
        // isExist,判断文件是否存在
        BOOL isExist = [fileManager fileExistsAtPath:filePath isDirectory:&isDirectory];
        // 文件不存在,是文件夹,是隐藏文件都过滤
        if (!isExist || isDirectory || [filePath containsString:@".DS"]) continue;
        // attributesOfItemAtPath 只可以获得文件属性,不可以获得文件夹属性,这个也就是需要遍历文件夹里面每一个文件的原因
        long long fileSize = [[fileManager attributesOfItemAtPath:filePath error:nil] fileSize];
        totalSize += fileSize;
    }

    // 将文件夹大小转换为 M/KB/B
    NSString *totalSizeString = nil;

    if (totalSize > 1000 * 1000)
    {
        totalSizeString = [NSString stringWithFormat:@"%.1fM",totalSize / 1000.0f /1000.0f];
    }
    else if (totalSize > 1000)
    {
        totalSizeString = [NSString stringWithFormat:@"%.1fKB",totalSize / 1000.0f ];
    }
    else
    {
        totalSizeString = [NSString stringWithFormat:@"%.1fB",totalSize / 1.0f];
    }
    return totalSizeString;
}

// 清除cachePath文件夹下缓存大小
+ (BOOL)clearCaches {
    // 拿到cachePath路径的下一级目录的子文件夹
    // contentsOfDirectoryAtPath:error:递归
    // subpathsAtPath:不递归
    NSArray *subpathArray = [fileManager contentsOfDirectoryAtPath:cachePath error:nil];
    // 如果数组为空,说明没有缓存或者用户已经清理过,此时直接return
    if (subpathArray.count == 0)
    {
#ifdef DEBUG
        PNSLog(@"此缓存路径很干净,不需要再清理了");
#else
#endif
        return NO;
    }
    NSError *error = nil;
    NSString *filePath = nil;
    BOOL flag = NO;

    for (NSString *subpath in subpathArray)
    {
        filePath = [cachePath stringByAppendingPathComponent:subpath];

        if ([fileManager fileExistsAtPath:cachePath])
        {
            // 删除子文件夹
            BOOL isRemoveSuccessed = [fileManager removeItemAtPath:filePath error:&error];

            if (isRemoveSuccessed)
            { // 删除成功
                flag = YES;
            }
        }
    }

    if (NO == flag)
    {
#ifdef DEBUG
        PNSLog(@"提示:您已经清理了所有可以访问的文件,不可访问的文件无法删除");  // 调试阶段才打印
#else
#endif
    }
    return flag;
}

+ (long long)fileSizeAtPath:(NSString*)filePath
{
    NSFileManager* manager = [NSFileManager defaultManager];
    if ([manager fileExistsAtPath:filePath]){
        return [[manager attributesOfItemAtPath:filePath error:nil] fileSize];
    }
    return 0;
}

+ (float)folderSizeAtPath:(NSString *)folderPath
{
    NSFileManager* manager = [NSFileManager defaultManager];
    if (![manager fileExistsAtPath:folderPath]) return 0;
    NSEnumerator *childFilesEnumerator = [[manager subpathsAtPath:folderPath] objectEnumerator];
    NSString* fileName;
    long long folderSize = 0;
    while ((fileName = [childFilesEnumerator nextObject]) != nil)
    {
        NSString* fileAbsolutePath = [folderPath stringByAppendingPathComponent:fileName];
        folderSize += [PooCleanCache fileSizeAtPath:fileAbsolutePath];
    }
    return folderSize/(1024.0*1024.0);
}

+(BOOL)cleanDocumentAtPath:(NSString *)floderPath
{
    NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:floderPath];
    for (NSString *fileName in enumerator) {
        [[NSFileManager defaultManager] removeItemAtPath:[floderPath stringByAppendingPathComponent:fileName] error:nil];
    }

    if ([PooCleanCache folderSizeAtPath:floderPath] > 0) {
        return NO;
    }
    else
    {
        return YES;
    }
}

@end


text:
package com.mj.msort.mergesort.impl;

import com.mj.msort.Sort;
import com.mj.msort.spi.SortProvider;

public class MergeSortProvider implements SortProvider {

	private static final String name = "com.mj.msort.mergesort" ;

	public MergeSortProvider() {} ;

	public String getProviderName() {
		// TODO Auto-generated method stub
		return name;
	}

	public Sort getInstance() {
		// TODO Auto-generated method stub
		return new MergeSort();
	}

}


text:
package com.lightcrafts.mediax.jai;

import java.awt.Point;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;

/**
 * An interface defining a mechanism which may be used to create tiles
 * for an image.  Implementations of this interface might be based for
 * example on managing a pool of memory, recycling previously allocated
 * memory, or using an image as a backing store.
 *
 * @since JAI 1.1.2
 */
public interface TileFactory {
    /**
     * Returns a value indicating whether a tile returned by
     * createTile() might be created without allocating
     * new memory for the requisite data array.
     */
    boolean canReclaimMemory();

    /**
     * Returns true if this object can cache in main memory
     * any data arrays which might be made available for future use.
     */
    boolean isMemoryCache();

    /**
     * Returns the amount of memory currently being consumed by data
     * arrays cached within this object.  If this object does not cache
     * data arrays then this method will always return zero.
     *
     * @return The amount of memory used by internally cached data arrays,
     *         measured in bytes.
     */
    long getMemoryUsed();

    /**
     * Removes references to all internally cached data arrays, if any.
     * If such arrays are objects potentially subject to finalization,
     * then this should make them available for garbage collection
     * provided no references to them are held elsewhere.
     */
    void flush();

    // XXX Comment about optionally not clearing the data arrays?
    /**
     * Create a tile with the specified SampleModel and
     * location, possibly using a DataBuffer constructed
     * using a reclaimed data bank (array).  If it is not possible to
     * reclaim an array, a new one will be allocated so that a tile
     * is guaranteed to be generated.  If a reclaimed array is used
     * to create the tile, its elements should be set to zero before
     * the tile is returned to the caller.
     *
     * @param sampleModel The SampleModel to use in
     *        creating the WritableRaster.
     * @param location The location (minX, minY) of
     *        the WritableRaster; if null,
     *        (0, 0) will be used.
     * @return A WritableRaster which might have a
     *         DataBuffer created using a previously
     *         allocated array.
     * @throws IllegalArgumentionException if sampleModel
     *         is null.
     */
    WritableRaster createTile(SampleModel sampleModel, Point location);
}


text:
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)

require 'bundler/setup' # Set up gems listed in the Gemfile.

$:.unshift File.expand_path('../../../lib', __FILE__)


text:
var constants = require ('./constants');

module.exports = function (keyboard, mode, regions, period){
	if (!mode) mode = 'normal';
	if (typeof constants.modes[mode] === 'undefined') throw 'invalid mode';

  if (mode == 'wave' || mode == 'breathe') {
    if (period === undefined) {
      period = 2;
    }

    if (typeof regions === 'undefined')
      regions = 'blue';

    if (typeof regions !== 'object')
      regions = { left: regions, middle: regions, right: regions };

    /*
     * NOTES about period valies:
     * The period paramaters are how long (in seconds?) it will take each of the RGB
     * components of each keyboard area to complete a cycle. Setting them different
     * from each other creates an interesting effect, but not something I want to
     * support at the moment.
     * The total time to change the color of the area is the longest of the three period
     * values for an area.
     *
     * In breathe mode (area colors changing in parallel), the duration of the breathe
     * loop is the longest period of all three areas.
     * Each area will reach the peak of its primary and secondary colors in sync.
     * If one area is set to be much quicker than the others, you will see it turn
     * its primary color quickly and stay fully lit while the other two catch up,
     * then the quick area will quickly change to the secondary color and stay solid
     * ntil the other two catch up again, and so on.
     *
     * In wave mode (area colors changing in sequence), the duration of the wave loop
     * is the sum of the longest period in each area.
     * The keyboard will start with each area in its secondary color. The left area
     * will begin changing first, taking (period/2) seconds to reach full primary color.
     * At that point, it will start to fade back to its secondary color while the middle
     * section begins its transition to its primary color. This continues left-to-right
     * across the keyboard, and then starts over with the left fading to primary as the
     * right side fade back to secondary.
     * If you don't sync up the total period duration for each of the areas, some areas
     * will change faster than others. If the left area hasn't yet reached its peak
     * secondary color by time the right side hits its primary peak (signally the left
     * area's turn to fade to primary), the hardware realizes it has fallen behind and
     * stops the wave until the user issues the comand again.
     */

    var _regions = ['left', 'middle', 'right'];
    var Def = null;
    for(var k in _regions) {
      var _k = parseInt(k) *3;
      if (typeof regions[_regions[k]] !== 'undefined') {
        Def = getSettingsForRegion (regions[_regions[k]], _regions[k]);
        sendData (keyboard, _k + 1, Def.primary.color, Def.primary.level, 0);
        sendData (keyboard, _k + 2, Def.secondary.color, Def.secondary.level, 0);
        sendData (keyboard, _k + 3, period, period, period);
      } else {
        sendData (keyboard, _k + 1, 'off', 0, 0);
        sendData (keyboard, _k + 2, 'off', 0, 0);
        sendData (keyboard, _k + 3, period, period, period);
      }
    }
  }

  //Initalize the mode
  commit (keyboard, constants.modes[mode]);

  //Save the mode for reference
  keyboard.currentMode = mode;

	return keyboard;
};

function getSettingsForRegion (data, region) {
  var regionDef = null;

  switch (typeof data) {

    case 'string':
      if (typeof constants.colors[data] === 'undefined')
        throw 'invalid color for ' + region + ' region';

      regionDef = {
        primary: {color: constants.colors[data], level: 0},
        secondary: {color: constants.colors['off'], level: 0}
      };
      break;

    case 'number':
      if (data < 0 || data >= constants.colors.length)
        throw 'invalid color for ' + region + ' region';

      regionDef = {
        primary: {color: data, level: 0},
        secondary: {color: constants.colors['off'], level: 0}
      };

    case 'object':
      if (data.primary)
        regionDef = {primary: getColorIntensityLevel (data.primary, region, true)};
      else
        regionDef = {primary: getColorIntensityLevel (data, region, true)};

      if (data.secondary) {

        regionDef.secondary = getColorIntensityLevel (data.secondary, region);

        //Default to off if both settings are unset
        if (regionDef.secondary.color < 0 && regionDef.secondary.level < 0)
          regionDef.secondary = {color: constants.colors['off'], level: 0};

        //Default to primary settings if either are unset
        if (regionDef.secondary.color < 0)
          regionDef.secondary.color = regionDef.primary.color;

        if (regionDef.secondary.level < 0)
          regionDef.secondary.level = regionDef.primary.level;

      } else {
        //Default secondary to off if unset
        regionDef.secondary = {color: constants.colors['off'], level: 0};
      }
      break;

    default:
      throw 'invalid color for ' + region + ' region';
      break;
  }

  return regionDef;
}

function getColorIntensityLevel (data, region, isRequired) {
  var colorName, levelName;
  var colorId = -1, levelId = -1;

  switch (typeof data) {

    case 'string':
      colorName = data;
      break;

    case 'number':
      colorId = data;
      break;

    default:
      if (typeof data.color === 'string')
        colorName = data.color;
      else if (typeof data.color === 'number')
        colorId = data.color;
      break;
  }

  if (colorName) {
    if (typeof constants.colors[colorName] === 'undefined')
      throw 'invalid color for ' + region + ' region';
    colorId = constants.colors[colorName];
  }

  //Always invalid if color is above range. colorId < 0 should be allowed if the fields are not required
  if (colorId >= constants.colors.length || (isRequired && colorId < 0))
    throw 'invalid color for ' + region + ' region';

  if (data.intensity) {
    if (typeof data.intensity === 'string')
      levelName = data.intensity;
    else if (typeof data.intensity === 'number')
      levelId = data.intensity;
  }

  if (levelName) {
    if (typeof constants.levels[levelName] === 'undefined')
      throw 'invalid intensity for ' + region + ' region';
    levelId = constants.levels[levelName];
  }

  if (levelId >= constants.colors.length)
    throw 'invalid intensity for ' + region + ' region';

  if (isRequired && levelId < 0)
    levelId = 0;

  colorDef = {color: colorId, level: levelId};

  return colorDef;
}

function sendData (keyboard, val1, val2, val3, val4) {
    var data = new Buffer (8);

    data[0] = 1;
    data[1] = 2;
    data[2] = 67;
    data[3] = val1;
    data[4] = val2;
    data[5] = val3;
    data[6] = val4;
    data[7] = 236;

    keyboard.sendFeatureReport (data);
}

function commit (keyboard, mode) {
    var data = new Buffer (8);

    data[0] = 1;
    data[1] = 2;
    data[2] = 65;
    data[3] = mode;
    data[4] = 0;
    data[5] = 0;
    data[6] = 0;
    data[7] = 236;

    keyboard.sendFeatureReport (data);
}


text:
package com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.error_2_code_name_1.error_2_code_name_2;

import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.error_2_code_name_1.E2Name1Error;

import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.ErrorCode;

/**
 * Autogenerated by XGen4J on January 1, 0001.
 */
public abstract class E2Name2Error extends E2Name1Error {

    public static final ErrorCode CODE = new ErrorCode("error-2-code-name-2", 13, E2Name1Error.CODE);

}


text:
<?php

declare(strict_types=1);

namespace AdminPanel\Symfony\AdminBundleBundle\Tests\DataGrid\Extension\Symfony;

use AdminPanel\Symfony\AdminBundle\DataGrid\Extension\Symfony\FormExtension;
use Symfony\Component\Form\FormFactoryInterface;

class FormExtensionTest extends \PHPUnit_Framework_TestCase
{
    public function testSymfonyFormExtension()
    {
        $formFactory = $this->createMock(FormFactoryInterface::class);
        $extension = new FormExtension($formFactory);

        $this->assertFalse($extension->hasColumnType('foo'));
        $this->assertTrue($extension->hasColumnTypeExtensions('text'));
    }
}


text:
<?php
/*!
* Hybridauth
* https://hybridauth.github.io | https://github.com/hybridauth/hybridauth
*  (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html
*/

namespace Hybridauth\Exception;

/**
 *
 */
class InvalidAuthorizationStateException extends InvalidArgumentException implements ExceptionInterface
{
}


text:
namespace dialog::editor
{
	// This class is only invoked by RestrictEditor. RestrictEditor always passes an alloc parent.
	// So all memory detached from this class is owned by a parent and must not be freed manually
	static std::wstring SUBRESCLASS = L"ResSubResEditor"; // STRING_OK
	class ResSubResEditor : public CEditor
	{
	public:
		ResSubResEditor(
			_In_ CWnd* pParentWnd,
			_In_ std::shared_ptr<cache::CMapiObjects> lpMapiObjects,
			ULONG ulSubObject,
			_In_ const _SRestriction* lpRes,
			_In_ LPVOID lpAllocParent);

		void OnEditAction1() override;
		_Check_return_ LPSRestriction DetachModifiedSRestriction() noexcept;

	private:
		_Check_return_ ULONG HandleChange(UINT nID) override;

		LPVOID m_lpAllocParent;
		const _SRestriction* m_lpOldRes;
		LPSRestriction m_lpNewRes;
		std::shared_ptr<cache::CMapiObjects> m_lpMapiObjects{};
	};
} // namespace dialog::editor


text:
var microcule = require('../');
var express = require('express');
var app = express();

var logger = require('../lib/plugins/logger');
var mschema = require('../lib/plugins/mschema');
var bodyParser = require('../lib/plugins/bodyParser');
var sourceGithubGist = require('../lib/plugins/sourceGithubGist');
var sourceGithubRepo = require('../lib/plugins/sourceGithubRepo');
var spawn = require('../lib/plugins/spawn');

var handler = spawn({
  // code: nodeService,
  language: "javascript"
});

app.use(logger());

// source from github gist
app.use(sourceGithubGist({
  token: "1234",
  main: "echoHttpRequest.js",
  gistID: "357645b8a17daeb17458"
}));

app.use(mschema({
  "hello": {
    "type": "string",
    "required": true
  }
}));
app.use(handler);
app.use(function(req, res, next){
  // Note: It's most likely you will not be able to call res.end or res.write here,
  // as the microcule.plugins.spawn handler should end the response
  // Any middlewares places after microcule.plugins.spawn should be considered "post processing" logic
  console.log('post process service');
})

app.listen(3000, function () {
  console.log('server started on port 3000');
});


text:
namespace King.Service.Timing
{
    using System;

    /// <summary>
    /// Exponential Timing
    /// </summary>
    public class ExponentialTiming : CalculateTiming
    {
        #region Constructors
        /// <summary>
        /// Default Constructor
        /// </summary>
        /// <param name="minimumPeriodInSeconds">Minimum Period In Seconds</param>
        /// <param name="maximumPeriodInSeconds">Maximum Period In Seconds</param>
        public ExponentialTiming(int minimumPeriodInSeconds = BaseTimes.DefaultMinimumTiming, int maximumPeriodInSeconds = BaseTimes.DefaultMaximumTiming)
            :base(minimumPeriodInSeconds, maximumPeriodInSeconds)
        {
        }
        #endregion

        #region Methods
        /// <summary>
        /// Exponential strategy, within bounds
        /// </summary>
        /// <param name="attempts">attempts</param>
        /// <returns>timing</returns>
        public override double Get(ulong attempts)
        {
            if (0 == attempts)
            {
                return this.periodInSeconds.Minimum;
            }

            var current = ((Math.Pow(2, attempts) * .1d) * this.periodInSeconds.Minimum) + this.periodInSeconds.Minimum;
            return current < this.periodInSeconds.Maximum ? current : this.periodInSeconds.Maximum;
        }
        #endregion
    }
}


text:
package org.jsmart.zerocode.core.verification;

import org.jsmart.zerocode.core.domain.HostProperties;
import org.jsmart.zerocode.core.domain.JsonTestCase;
import org.jsmart.zerocode.core.tests.customrunner.TestOnlyZeroCodeUnitRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

@HostProperties(port=9998, context="/google-map-services")
@RunWith(TestOnlyZeroCodeUnitRunner.class)
public class ZeroCodeJUnitHostPortContextAnnotationTest {

    @JsonTestCase("01_verification_test_cases/08_get_with_inline_host_port_context.json")
    @Test
    public void willPickFromClassAnnotation_hostAndPortNContext() throws Exception {

    }

}