text:
const forbidWildcardSubscriptionOnRoot = {
  incoming: (message, callback) => {
    if (message.channel === '/meta/subscribe') {
      if (message.subscription === '/*' || message.subscription === '/**') {
        message.error = 'Wildcard subscription on root is forbidden';
      }
    }
    callback(message);
  }
}

module.exports = {forbidWildcardSubscriptionOnRoot};


text:
/*
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

#include "BCD.h"

bool test(unsigned int lno,
          float vectorInValue,
          BCDFormatSign vectorInFormatSign,
          unsigned int vectorInPrecision,
          float vectorInAccuracy,
          char* vectorOut)
{

    BCD* dst = BCDCreate(8,8);
    if (dst){

        if (0 == BCDSetFloat(dst,vectorInValue)){

            char* string = BCDToString(dst,
                                       vectorInFormatSign,
                                       vectorInPrecision,
                                       vectorInAccuracy);
            if (string){

                //BCDDebugPrint(stderr,dst);

                if (0 == strcmp(string,vectorOut)){

                    free(string);
                    BCDDestroy(dst);
                    return true;
                }
                else {
                    fprintf(stderr,"%d\tFAILURE value: %f, sign: %d, prec: %d, acc: %f, expected: %s, result: %s\n\n",lno,vectorInValue,vectorInFormatSign,vectorInPrecision,vectorInAccuracy,vectorOut,string);

                    free(string);
                    BCDDestroy(dst);
                    return false;
                }
            }
            else {
                BCDDestroy(dst);
                fprintf(stderr,"test error from BCDToString\n");
                return false;
            }
        }
        else {
            BCDDestroy(dst);
            fprintf(stderr,"test error from BCDSetFloat\n");
            return false;
        }
    }
    else {
        fprintf(stderr,"test error from BCDCreate\n");
        return false;
    }
}

/*
 * Read input test vector file, "test.in".
 */
int main(int argc, char** argv){

    FILE* fin = fopen("test.in","r");
    if (fin){

        /*
         * Test Vector File Format
         *
         * Line terminal (CRLF) or (LF).
         * Line comment starts with '#'.
         *
         * Space separated line of "%f %u %u %f %s" as...
         */
        float vectorInValue;
        BCDFormatSign vectorInFormatSign;
        unsigned int vectorInPrecision;
        float vectorInAccuracy;
        char vectorOut[128];

        /*
         * Process test vectors
         */
        char linin[128];
        bool comment = false;
        unsigned int rc, lno = 0, vector = 0, success = 0, failure = 0;

        do {
            /*
             * Read test vector
             */
            lno += 1;
            comment = false;
            {
                char ch;
                unsigned int cc = 0;
                memset(linin,0,128);
                while (0 < (rc = fread(&ch,1,1,fin))){

                    if ('\r' == ch)
                        continue;
                    else if ('\n' == ch)
                        break;
                    else if ('#' == ch){
                        linin[cc++] = ch;
                        comment = true;
                    }
                    else if (128 <= cc){

                        fprintf(stderr,"%s: error: file 'test.in' input line #%d too long.\n",argv[0],lno);
                        return 1;
                    }
                    else
                        linin[cc++] = ch;
                }
            }
            /*
             * Evaluate test vector
             */
            if (*linin){
                if (comment){

                    fprintf(stderr,"%d\t%s\n",lno,linin);
                }
                else {
                    fprintf(stderr,"%d\t%s\n",lno,linin);

                    if (5 == sscanf(linin,"%f %u %u %f %128s",&vectorInValue,&vectorInFormatSign,&vectorInPrecision,&vectorInAccuracy,vectorOut)){

                        if (test(lno,
                                 vectorInValue,
                                 vectorInFormatSign,
                                 vectorInPrecision,
                                 vectorInAccuracy,
                                 vectorOut))
                            {
                                success += 1;
                            }
                        else {

                            failure += 1;
                        }
                    }
                }
            }
        }
        while (rc);

        return failure;
    }
    else {
        fprintf(stderr,"%s: error: opening test vector 'test.in'\n",argv[0]);
        return 1;
    }
}

redpajama_set_name: RedPajamaGithub


text:
Haraka - a Node.js Mail Server
------------------------------

Haraka is an SMTP server which uses a plugin architecture to implement most
of its functionality. It uses a highly scalable event model to be able to
cope with thousands of concurrent connections. Plugins are written in
Javascript using [Node.js][1], and as such perform extremely quickly. The
core Haraka framework is capable of processing thousands of messages per
second on the right hardware.

Haraka can be used either as an inbound SMTP server, and is designed with
good anti-spam protections in mind (see the `plugins` directory), or it can
be used as an outbound mail server - the most common way of doing this is by
running it on port 587 with an "auth" plugin to authenticate your users.

A full mail system for end users is vastly complicated, and so Haraka makes
no attempt to be an IMAP server, figure out where mails should be delivered,
or implement any of the functionality of a mail store. As such it is common
to have a backend mail server which Haraka delivers to for that sort of
functionality - Exchange, Postfix, Dovecot or Courier would be examples of
such systems.

Haraka does have a scalable outbound mail delivery engine built in. Any mail
marked as `relaying` (such as via an `auth` plugin) will automatically be
queued for outbound delivery.

### Join the Mailing List

To get started with Haraka and ask questions about it, please join the
mailing list: mailto:haraka-sub@harakamail.com - the mailing list is
implemented as a Haraka plugin.

### Screencast

[Getting started with Haraka][2]

### Why Use Haraka?

Haraka's primary purpose is to provide you with a much easier to extend
mail server than most available SMTP servers out there such as Postfix,
Exim or Microsoft Exchange, yet while still running those systems for their
excellent ability to deliver mail to users.

The plugin system makes it trivial to code new features. A typical example
might be to provide qmail-like extended addresses to an Exchange system,
whereby you could receive mail as `user-anywordshere@domain.com`, and yet
still have it correctly routed to `user@domain.com`. This is a few lines of
code in Haraka, or maybe someone has already written this plugin.

Plugins are already provided for running mail through SpamAssassin, checking
for known bad HELO patterns, checking DNS Blocklists, and watching for
violators of the SMTP protocol via the "early_talker" plugin.

Furthermore Haraka comes with a simple plugin called "graph" which shows you
real-time charts of which plugins rejected the most mail, allowing you to
easily fine-tune your list of plugins to more effectively stop spam.

### Installing Haraka

Haraka is written in Javascript and requires [node.js][1] to run.

Installation is very simple via [npm][2]:

    $ npm install -g Haraka

That will provide you with a `haraka` binary which allows you to setup the
service.

### Running Haraka

Setting up Haraka is simple. Firstly we need to create the service:

    $ haraka -i /path/to/haraka_test

That creates the directory `haraka_test` and creates `config` and `plugin`
directories in there, and automatically sets the host name used by Haraka
to the output of the `hostname` command.

This assumes that `hostname` gives you the correct host you want to receive
mail for. If not, edit the `config/host_list` file. For example if you want
to receive mail addressed to `user@domain.com`, add `domain.com` to the
`config/host_list` file.

Finally just start Haraka:

    $ haraka -c /path/to/haraka_test

And it will run.

However the big thing you want to do next is to edit the `config/plugins`
file. This determines what plugins run in Haraka, and controls the overall
behaviour of the server. By default the server is setup to receive mails for
domains in `host_list` and deliver them via `qmail-queue`. Queueing to
qmail is likely not what you need unless you have qmail installed, so this is
likely the first thing you want to change.

Each plugin has documentation available via `haraka -h plugins/<name>`.
Look there for information about how each plugin is configured, edit your
`config/plugins` file, restart Haraka and enjoy!

Feel free to write to the mailing list with any questions. Or use github
"Issues".

### Running from git

If you are unable to use npm to install Haraka, you can run from git by
following these steps:

First clone the repository:

    $ git clone https://github.com/baudehlo/Haraka.git
    $ cd Haraka

Edit `config/plugins` and `config/smtp.ini` to specify the plugins and
config you want.

Finally run Haraka:

    $ node haraka.js

### Performance

Haraka is fast, due to the nature of using the v8 Javascript engine, and
it is scalable due to using async I/O everywhere. On my local system I have
managed to scale it up to 5000 emails per second (with minimal plugins).

I welcome other performance evaluations.

### License and Author

Haraka is MIT licensed - see the LICENSE file for details.

Haraka is a project started by Matt Sergeant, a 10 year veteran of the email
and anti-spam world. Previous projects have been the project leader for
SpamAssassin and a hacker on Qpsmtpd, a perl based mail server which is
quite similar to Haraka (but not as fast due to perl being slower than
Javascript).

[1]: http://nodejs.org/
[2]: http://youtu.be/6twKXMAsPsw


text:
import java.util.ArrayList;
import java.util.List;

public class Main {
  public List<Integer> testFindFirstIfPresent(List<List<String>> data) {
    List<Integer> result = new ArrayList<>();
    if (!data.isEmpty()) {
      for (List<String> list : da<caret>ta) {
        for (String str : list) {
          if (!str.isEmpty()) {
            result.add(str.length());
            return result;
          }
        }
      }
    }
    return result;
  }

}


text:
package org.optaplanner.examples.travelingtournament.app;

import org.optaplanner.examples.common.app.CommonApp;
import org.optaplanner.examples.common.persistence.AbstractSolutionExporter;
import org.optaplanner.examples.common.persistence.AbstractSolutionImporter;
import org.optaplanner.examples.travelingtournament.domain.TravelingTournament;
import org.optaplanner.examples.travelingtournament.persistence.TravelingTournamentExporter;
import org.optaplanner.examples.travelingtournament.persistence.TravelingTournamentImporter;
import org.optaplanner.examples.travelingtournament.persistence.TravelingTournamentXmlSolutionFileIO;
import org.optaplanner.examples.travelingtournament.swingui.TravelingTournamentPanel;
import org.optaplanner.persistence.common.api.domain.solution.SolutionFileIO;

/**
 * WARNING: This is an old, complex, tailored example. You're probably better off with one of the other examples.
 */
public class TravelingTournamentApp extends CommonApp<TravelingTournament> {

    public static final String SOLVER_CONFIG =
            "org/optaplanner/examples/travelingtournament/solver/travelingTournamentSolverConfig.xml";

    public static final String DATA_DIR_NAME = "travelingtournament";

    public static void main(String[] args) {
        prepareSwingEnvironment();
        new TravelingTournamentApp().init();
    }

    public TravelingTournamentApp() {
        super("Traveling tournament",
                "Official competition name: TTP - Traveling tournament problem\n\n" +
                        "Assign sport matches to days. Minimize the distance travelled.",
                SOLVER_CONFIG, DATA_DIR_NAME,
                TravelingTournamentPanel.LOGO_PATH);
    }

    @Override
    protected TravelingTournamentPanel createSolutionPanel() {
        return new TravelingTournamentPanel();
    }

    @Override
    public SolutionFileIO<TravelingTournament> createSolutionFileIO() {
        return new TravelingTournamentXmlSolutionFileIO();
    }

    @Override
    protected AbstractSolutionImporter[] createSolutionImporters() {
        return new AbstractSolutionImporter[] {
                new TravelingTournamentImporter()
        };
    }

    @Override
    protected AbstractSolutionExporter createSolutionExporter() {
        return new TravelingTournamentExporter();
    }

}


text:
package org.apache.flink.table.planner.plan.nodes.exec.stream;

import org.apache.flink.table.api.TableConfig;
import org.apache.flink.table.api.TableEnvironment;
import org.apache.flink.table.planner.utils.StreamTableTestUtil;
import org.apache.flink.table.planner.utils.TableTestBase;

import org.junit.Before;
import org.junit.Test;

/** Test json serialization for sort limit. */
public class SortLimitJsonPlanTest extends TableTestBase {

    private StreamTableTestUtil util;
    private TableEnvironment tEnv;

    @Before
    public void setup() {
        util = streamTestUtil(TableConfig.getDefault());
        tEnv = util.getTableEnv();

        String srcTableDdl =
                "CREATE TABLE MyTable (\n"
                        + "  a bigint,\n"
                        + "  b int not null,\n"
                        + "  c varchar,\n"
                        + "  d timestamp(3)\n"
                        + ") with (\n"
                        + "  'connector' = 'values',\n"
                        + "  'bounded' = 'false')";
        tEnv.executeSql(srcTableDdl);
    }

    @Test
    public void testSortLimit() {
        String sinkTableDdl =
                "CREATE TABLE MySink (\n"
                        + "  a bigint,\n"
                        + "  b bigint\n"
                        + ") with (\n"
                        + "  'connector' = 'values',\n"
                        + "  'sink-insert-only' = 'false',\n"
                        + "  'table-sink-class' = 'DEFAULT')";
        tEnv.executeSql(sinkTableDdl);
        String sql = "insert into MySink SELECT a, a from MyTable order by b limit 10";
        util.verifyJsonPlan(sql);
    }
}


text:
namespace mesos {
namespace internal {
namespace slave {

// Forward declaration.
class NoopResourceEstimatorProcess;

// A noop resource estimator which tells the master that no resource
// on the slave can be oversubscribed. Using this resource estimator
// will effectively turn off the oversubscription on the slave.
class NoopResourceEstimator : public mesos::slave::ResourceEstimator
{
public:
  ~NoopResourceEstimator() override;

  Try<Nothing> initialize(
      const lambda::function<process::Future<ResourceUsage>()>& usage) override;

  process::Future<Resources> oversubscribable() override;

protected:
  process::Owned<NoopResourceEstimatorProcess> process;
};

} // namespace slave {
} // namespace internal {
} // namespace mesos {

#endif // __SLAVE_RESOURCE_ESTIMATORS_NOOP_HPP__


text:
@interface CoreDataStack (Common)
//查询
- (NSManagedObject *)findUniqueEntityWithUniqueKey:(NSString *)key value:(id)value entityName:(NSString *)entityName;
- (NSArray *)fetchObjectsWithUniqueKey:(NSString *)uniqueKey value:(id)value entityName:(NSString *)entityName sortKey:(NSString *)sortKey;
- (NSDate *)dateFromString:(NSString *)dateStr;
- (NSArray *)fetchObjectsWithPredicate:(NSPredicate *)pre sortDescriptors:(NSArray *)sortDescriptors entityName:(NSString *)entityName;
@end


text:
CREATE TABLE PARTY_ENTITY(
        ID BIGINT NOT NULL,
        TYPE_ID BIGINT,
        NAME VARCHAR(100),
	REF VARCHAR(100),
	SCOPE_ID VARCHAR(50),
        CONSTRAINT PK_PARTY_ENTITY PRIMARY KEY(ID),
        CONSTRAINT FK_PARTY_ENTITY_TYPE FOREIGN KEY(TYPE_ID) REFERENCES PARTY_TYPE(ID)
) ENGINE=INNODB CHARSET=UTF8;

CREATE INDEX I_PARTY_ENTITY_REFERENCE_TYPE ON PARTY_ENTITY(REF, TYPE_ID);

CREATE INDEX I_PARTY_ENTITY_NAME ON PARTY_ENTITY(NAME);


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BufferStrategy_1 = require("../BufferStrategy");
class UInt16Strategy {
    static supports(template) {
        if (typeof (template) !== 'string') {
            return false;
        }
        const typeOptions = BufferStrategy_1.BufferStrategy.getTypeOptions(template);
        return typeOptions.type === 'uint16';
    }
    static encode(value, template, codec) {
        const typeOptions = BufferStrategy_1.BufferStrategy.getTypeOptions(template);
        codec.uint16(value, typeOptions.littleEndian);
    }
    static decode(template, codec) {
        return codec.decode(BufferStrategy_1.BufferStrategy.getTypeOptions(template));
    }
}
exports.default = UInt16Strategy;


text:
class AddTwilioErrorCodeToCalls < ActiveRecord::Migration[4.2]
  def change
    add_column :calls, :twilio_error_code, :integer
  end
end


text:
<nav-bar></nav-bar>
<main>
  <div class="container" style="margin-top:120px;">
    <router-outlet></router-outlet>
  </div>
</main>
<ngrx-store-log-monitor toggleCommand="ctrl-h" positionCommand="ctrl-m"></ngrx-store-log-monitor>


text:
using Calculator.Contract;

namespace Calculator.WebService;

public class SumOfIntegersWebService : ISumOfIntegers
{
    public int Sum(AddRequest request)
    {
        return request.X + request.Y;
    }
}


text:
{% load staticfiles i18n %}

    <data class="row">

{% trans 'Provided by Ontario Immigrant Network' %}
 {% trans 'Contacts' %}
                    {% trans 'Privacy Policy' %}
                    {% trans 'Supporters' %}

    </data>

{% trans 'Contact Us' %}

{% trans 'Email' %} - fly@oinweb.ca

{% trans 'Twitter' %} - @oinweb

{% trans 'Website' %} - oinweb.ca

        <button data-role="button" class="ui-btn ui-corner-all ui-shadow ui-btn-b" onclick="$('#contacts3-popup').popup('close');">{% trans 'Close' %}</button>

{% trans 'Privacy Statement' %}

{% trans 'Introduction' %}

{% trans 'Ontario Immigrant Network maintains this web site to help the public find information about its services. Ontario Immigrant Network is committed to ensuring your privacy while you visit the site.' %}

{% trans 'Links to other sites' %}

{% trans 'The Ontario Immigrant Network web site provides links to other sites that may be of interest. This privacy statement covers the main Ontario Immigrant Network web site and those of Ontario Immigrant Network business units ONLY and not the web sites of other organizations. Each organization's web site may have a different privacy statement depending on the nature of its site. You should review the privacy statement each time you submit personal information on a web site.' %}

{% trans 'Collection of information' %}

{% trans 'The only information collected that is used to identify you is information you give voluntarily. When you submit a question or comment, you may be asked for your name, e-mail address, or other information. This information is only used to process and respond to your question or comment. This information is not disclosed except to authorized personnel who need it to answer your question. In transit, the information that you send may not be secure. If you would prefer to raise a comment or question in person, please call Ontario Immigrant Network at 519-521-3135.' %}

{% trans 'Security' %}

{% trans 'Ontario Immigrant Network computer system uses software to monitor unauthorized attempts to upload or change information, or damage the service we provide. No attempt is made to identify users or their usage patterns except during investigations.' %}

        <button data-role="button" class="ui-btn ui-corner-all ui-shadow ui-btn-b" onclick="$('#privacy3-popup').popup('close');">{% trans 'Close' %}</button>

{% trans 'FLY was made possible by:' %}

        <button data-role="button" class="ui-btn ui-corner-all ui-shadow ui-btn-b" onclick="$('#supporters3-popup').popup('close');">{% trans 'Close' %}</button>


text:
*  Better validation for email configuration
*  Add better handling for SMTP errors
*  unit testing- STARTED
** Need some sort of mock testing framework for SMTP messages
* add support for adding directories
* add size limits/checking for attachments
* reconfigure the way mailer sends message, queue messages up THEN send


text:
/**
 * @file
 */

#include <dds/core/status/Status.hpp>
#include <dds/core/status/State.hpp>

namespace dds
{
namespace core
{
namespace status
{

// 0
template <>
StatusMask get_status<InconsistentTopicStatus>()
{
    return StatusMask::inconsistent_topic();
}
// 1
template <>
StatusMask get_status<OfferedDeadlineMissedStatus>()
{
    return StatusMask::offered_deadline_missed();
}
// 2
template <>
StatusMask get_status<RequestedDeadlineMissedStatus>()
{
    return StatusMask::requested_deadline_missed();
}
// 5
template <>
StatusMask get_status<OfferedIncompatibleQosStatus>()
{
    return StatusMask::offered_incompatible_qos();
}
// 6
template <>
StatusMask get_status<RequestedIncompatibleQosStatus>()
{
    return StatusMask::requested_incompatible_qos();
}
// 7
template <>
StatusMask get_status<SampleLostStatus>()
{
    return StatusMask::sample_lost();
}
// 8
template <>
StatusMask get_status<SampleRejectedStatus>()
{
    return StatusMask::sample_rejected();
}

// 9
template <>
StatusMask get_status<DataOnReadersStatus>()
{
    return StatusMask::data_on_readers();
}

// 10
template <>
StatusMask get_status<DataAvailableStatus>()
{
    return StatusMask::data_available();
}

// 11
template <>
StatusMask get_status<LivelinessLostStatus>()
{
    return StatusMask::liveliness_lost();
}

// 12
template <>
StatusMask get_status<LivelinessChangedStatus>()
{
    return StatusMask::liveliness_changed();
}

// 13
template <>
StatusMask get_status<PublicationMatchedStatus>()
{
    return StatusMask::publication_matched();
}

// 14
template <>
StatusMask get_status<SubscriptionMatchedStatus>()
{
    return StatusMask::subscription_matched();
}

}
}
}


text:
namespace content {

namespace {
const char kCommentToken = '#';
const char kMarkSkipFile[] = "#<skip";
const char kSignalDiff[] = "*";
const char kMarkEndOfFile[] = "<-- End-of-file -->";
}  // namespace

DumpAccessibilityTestHelper::DumpAccessibilityTestHelper(
    AccessibilityTestExpectationsLocator* test_locator)
    : test_locator_(test_locator) {}

base::FilePath DumpAccessibilityTestHelper::GetExpectationFilePath(
    const base::FilePath& test_file_path) {
  base::ScopedAllowBlockingForTesting allow_blocking;
  base::FilePath expected_file_path;

  // Try to get version specific expected file.
  base::FilePath::StringType expected_file_suffix =
      test_locator_->GetVersionSpecificExpectedFileSuffix();
  if (expected_file_suffix != FILE_PATH_LITERAL("")) {
    expected_file_path = base::FilePath(
        test_file_path.RemoveExtension().value() + expected_file_suffix);
    if (base::PathExists(expected_file_path))
      return expected_file_path;
  }

  // If a version specific file does not exist, get the generic one.
  expected_file_suffix = test_locator_->GetExpectedFileSuffix();
  expected_file_path = base::FilePath(test_file_path.RemoveExtension().value() +
                                      expected_file_suffix);
  if (base::PathExists(expected_file_path))
    return expected_file_path;

  // If no expected file could be found, display error.
  LOG(INFO) << "File not found: " << expected_file_path.LossyDisplayName();
  LOG(INFO) << "To run this test, create "
            << expected_file_path.LossyDisplayName()
            << " (it can be empty) and then run this test "
            << "with the switch: --"
            << switches::kGenerateAccessibilityTestExpectations;
  return base::FilePath();
}

base::Optional<std::vector<std::string>>
DumpAccessibilityTestHelper::LoadExpectationFile(
    const base::FilePath& expected_file) {
  base::ScopedAllowBlockingForTesting allow_blocking;

  std::string expected_contents_raw;
  base::ReadFileToString(expected_file, &expected_contents_raw);

  // Tolerate Windows-style line endings (\r\n) in the expected file:
  // normalize by deleting all \r from the file (if any) to leave only \n.
  std::string expected_contents;
  base::RemoveChars(expected_contents_raw, "\r", &expected_contents);

  if (!expected_contents.compare(0, strlen(kMarkSkipFile), kMarkSkipFile)) {
    return base::nullopt;
  }

  std::vector<std::string> expected_lines =
      base::SplitString(expected_contents, "\n", base::KEEP_WHITESPACE,
                        base::SPLIT_WANT_NONEMPTY);

  return expected_lines;
}

bool DumpAccessibilityTestHelper::ValidateAgainstExpectation(
    const base::FilePath& test_file_path,
    const base::FilePath& expected_file,
    const std::vector<std::string>& actual_lines,
    const std::vector<std::string>& expected_lines) {
  // Output the test path to help anyone who encounters a failure and needs
  // to know where to look.
  LOG(INFO) << "Testing: "
            << test_file_path.NormalizePathSeparatorsTo('/').LossyDisplayName();
  LOG(INFO) << "Expected output: "
            << expected_file.NormalizePathSeparatorsTo('/').LossyDisplayName();

  // Perform a diff (or write the initial baseline).
  std::vector<int> diff_lines = DiffLines(expected_lines, actual_lines);
  bool is_different = diff_lines.size() > 0;
  if (is_different) {
    std::string diff;

    // Mark the expected lines which did not match actual output with a *.
    diff += "* Line Expected\n";
    diff += "- ---- --------\n";
    for (int line = 0, diff_index = 0;
         line < static_cast<int>(expected_lines.size()); ++line) {
      bool is_diff = false;
      if (diff_index < static_cast<int>(diff_lines.size()) &&
          diff_lines[diff_index] == line) {
        is_diff = true;
        ++diff_index;
      }
      diff += base::StringPrintf("%1s %4d %s\n", is_diff ? kSignalDiff : "",
                                 line + 1, expected_lines[line].c_str());
    }
    diff += "\nActual\n";
    diff += "------\n";
    diff += base::JoinString(actual_lines, "\n");
    diff += "\n";

    // This is used by rebase_dump_accessibility_tree_test.py to signify
    // the end of the file when parsing the actual output from remote logs.
    diff += kMarkEndOfFile;
    diff += "\n";
    LOG(ERROR) << "Diff:\n" << diff;
  } else {
    LOG(INFO) << "Test output matches expectations.";
  }

  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
          switches::kGenerateAccessibilityTestExpectations)) {
    base::ScopedAllowBlockingForTesting allow_blocking;
    std::string actual_contents_for_output =
        base::JoinString(actual_lines, "\n") + "\n";
    CHECK(base::WriteFile(expected_file, actual_contents_for_output));
    LOG(INFO) << "Wrote expectations to: " << expected_file.LossyDisplayName();
  }

  return !is_different;
}

std::vector<int> DumpAccessibilityTestHelper::DiffLines(
    const std::vector<std::string>& expected_lines,
    const std::vector<std::string>& actual_lines) {
  int actual_lines_count = actual_lines.size();
  int expected_lines_count = expected_lines.size();
  std::vector<int> diff_lines;
  int i = 0, j = 0;
  while (i < actual_lines_count && j < expected_lines_count) {
    if (expected_lines[j].size() == 0 ||
        expected_lines[j][0] == kCommentToken) {
      // Skip comment lines and blank lines in expected output.
      ++j;
      continue;
    }

    if (actual_lines[i] != expected_lines[j])
      diff_lines.push_back(j);
    ++i;
    ++j;
  }

  // Report a failure if there are additional expected lines or
  // actual lines.
  if (i < actual_lines_count) {
    diff_lines.push_back(j);
  } else {
    while (j < expected_lines_count) {
      if (expected_lines[j].size() > 0 &&
          expected_lines[j][0] != kCommentToken) {
        diff_lines.push_back(j);
      }
      j++;
    }
  }

  // Actual file has been fully checked.
  return diff_lines;
}

}  // namespace content


text:
<?php
namespace TYPO3\Flow\Persistence\Doctrine\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
 * FLOW3 Migration
 */
class Version20110613223837 extends AbstractMigration
{
    /**
     * @param Schema $schema
     * @return void
     */
    public function up(Schema $schema)
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");

        $this->addSql("CREATE TABLE flow3_resource_resourcepointer (hash VARCHAR(255) NOT NULL, PRIMARY KEY(hash)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("CREATE TABLE flow3_resource_resource (flow3_persistence_identifier VARCHAR(40) NOT NULL, flow3_resource_resourcepointer VARCHAR(255) DEFAULT NULL, filename VARCHAR(255) DEFAULT NULL, fileextension VARCHAR(255) DEFAULT NULL, INDEX IDX_11FFD19FD0275681 (flow3_resource_resourcepointer), PRIMARY KEY(flow3_persistence_identifier)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("CREATE TABLE flow3_security_account (flow3_persistence_identifier VARCHAR(40) NOT NULL, party_abstractparty VARCHAR(40) DEFAULT NULL, accountidentifier VARCHAR(255) DEFAULT NULL, authenticationprovidername VARCHAR(255) DEFAULT NULL, credentialssource VARCHAR(255) DEFAULT NULL, creationdate DATETIME DEFAULT NULL, expirationdate DATETIME DEFAULT NULL, roles LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)', INDEX IDX_44D0753B38110E12 (party_abstractparty), PRIMARY KEY(flow3_persistence_identifier)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("CREATE TABLE flow3_resource_securitypublishingconfiguration (flow3_persistence_identifier VARCHAR(40) NOT NULL, allowedroles LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(flow3_persistence_identifier)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("CREATE TABLE flow3_policy_role (identifier VARCHAR(255) NOT NULL, PRIMARY KEY(identifier)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("ALTER TABLE flow3_resource_resource ADD CONSTRAINT flow3_resource_resource_ibfk_1 FOREIGN KEY (flow3_resource_resourcepointer) REFERENCES flow3_resource_resourcepointer(hash)");
    }

    /**
     * @param Schema $schema
     * @return void
     */
    public function down(Schema $schema)
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");

        $this->addSql("ALTER TABLE flow3_resource_resource DROP FOREIGN KEY flow3_resource_resource_ibfk_1");
        $this->addSql("DROP TABLE flow3_resource_resourcepointer");
        $this->addSql("DROP TABLE flow3_resource_resource");
        $this->addSql("DROP TABLE flow3_security_account");
        $this->addSql("DROP TABLE flow3_resource_securitypublishingconfiguration");
        $this->addSql("DROP TABLE flow3_policy_role");
    }
}


text:
package org.springframework.cloud.servicebroker.model.binding;

import java.util.HashMap;
import java.util.Map;

import com.jayway.jsonpath.DocumentContext;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.jupiter.api.Test;

import org.springframework.cloud.servicebroker.JsonUtils;

import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.cloud.servicebroker.JsonPathAssert.assertThat;
import static org.springframework.cloud.servicebroker.model.binding.VolumeMount.DeviceType.SHARED;
import static org.springframework.cloud.servicebroker.model.binding.VolumeMount.Mode.READ_ONLY;

class VolumeMountTest {

	@Test
	void volumeMountIsBuiltWithDefaults() {
		VolumeMount mount = VolumeMount.builder()
				.build();

		assertThat(mount.getDriver()).isNull();
		assertThat(mount.getContainerDir()).isNull();
		assertThat(mount.getMode()).isNull();
		assertThat(mount.getDeviceType()).isNull();
		assertThat(mount.getDevice()).isNull();

		DocumentContext json = JsonUtils.toJsonPath(mount);

		assertThat(json).hasNoPath("$.driver");
		assertThat(json).hasNoPath("$.container_dir");
		assertThat(json).hasNoPath("$.mode");
		assertThat(json).hasNoPath("$.device_type");
		assertThat(json).hasNoPath("$.device");
	}

	@Test
	void volumeMountIsBuiltWithAllValues() {
		Map<String, Object> config = new HashMap<>();
		config.put("config3", "value3");
		config.put("config4", true);

		VolumeMount mount = VolumeMount.builder()
				.driver("test-driver")
				.containerDir("/data/images")
				.mode(READ_ONLY)
				.deviceType(SHARED)
				.device(SharedVolumeDevice.builder()
						.volumeId("volume-id")
						.mountConfig("config1", "value1")
						.mountConfig("config2", 2)
						.mountConfig(config)
						.build())
				.build();

		assertThat(mount.getDriver()).isEqualTo("test-driver");
		assertThat(mount.getContainerDir()).isEqualTo("/data/images");
		assertThat(mount.getMode()).isEqualTo(READ_ONLY);
		assertThat(mount.getDeviceType()).isEqualTo(SHARED);

		SharedVolumeDevice device = (SharedVolumeDevice) mount.getDevice();
		assertThat(device.getVolumeId()).isEqualTo("volume-id");
		assertThat(device.getMountConfig()).hasSize(4);
		assertThat(device.getMountConfig().get("config1")).isEqualTo("value1");
		assertThat(device.getMountConfig().get("config2")).isEqualTo(2);
		assertThat(device.getMountConfig().get("config3")).isEqualTo("value3");
		assertThat(device.getMountConfig().get("config4")).isEqualTo(true);

		DocumentContext json = JsonUtils.toJsonPath(mount);

		assertThat(json).hasPath("$.driver").isEqualTo("test-driver");
		assertThat(json).hasPath("$.container_dir").isEqualTo("/data/images");
		assertThat(json).hasPath("$.mode").isEqualTo("r");
		assertThat(json).hasPath("$.device_type").isEqualTo("shared");
		assertThat(json).hasPath("$.device.volume_id").isEqualTo("volume-id");
		assertThat(json).hasPath("$.device.mount_config.config1").isEqualTo("value1");
		assertThat(json).hasPath("$.device.mount_config.config2").isEqualTo(2);
		assertThat(json).hasPath("$.device.mount_config.config3").isEqualTo("value3");
		assertThat(json).hasPath("$.device.mount_config.config4").isEqualTo(true);
	}

	@Test
	void equalsAndHashCode() {
		EqualsVerifier
				.forClass(VolumeMount.class)
				.verify();
	}

}


text:
Nginx 1.10.3

## supported env vars

example:
    docker run -it --rm -e NFQ_DOCUMENT_ROOT='/home/project/src/web' [this_image]

### NFQ_DOCUMENT_ROOT (optional)

Sets nginx document root to specified path.

default value: /var/www

### NFQ_RELOAD_PORT (optional)

Port number that will reload configuration files after connection.
Used for dynamic site configuration loading or ssl sertificates update

default value: 1024

### NFQ_FASTCGI_HOST (optional)

Host to forward php files execution to. To disable fastcgi support provide
either value 'false' or set an empty value to this variable.

default value: fastcgi


text:
package org.apache.drill.exec.planner.logical;

import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptPlanner;
import org.apache.calcite.plan.RelTraitSet;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.core.JoinInfo;
import org.apache.calcite.rel.core.JoinRelType;
import org.apache.calcite.rel.metadata.RelMetadataQuery;
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.util.Pair;
import org.apache.drill.common.expression.FieldReference;
import org.apache.drill.common.logical.data.Join;
import org.apache.drill.common.logical.data.JoinCondition;
import org.apache.drill.common.logical.data.LogicalOperator;
import org.apache.drill.common.logical.data.LogicalSemiJoin;
import org.apache.drill.exec.planner.common.DrillJoinRelBase;
import org.apache.drill.shaded.guava.com.google.common.collect.Lists;
import org.apache.drill.shaded.guava.com.google.common.base.Preconditions;

import java.util.ArrayList;
import java.util.List;

public class DrillSemiJoinRel extends DrillJoinRelBase implements DrillJoin, DrillRel {

  public DrillSemiJoinRel(
          RelOptCluster cluster,
          RelTraitSet traitSet,
          RelNode left,
          RelNode right,
          RexNode condition,
          List<Integer> leftKeys,
          List<Integer> rightKeys) {
    super(cluster,
          traitSet,
          left,
          right,
          condition,
          JoinRelType.SEMI);
    this.leftKeys = leftKeys;
    this.rightKeys = rightKeys;
  }

  public static DrillSemiJoinRel create(RelNode left, RelNode right, RexNode condition,
                                        List<Integer> leftKeys, List<Integer> rightKeys) {
    final RelOptCluster cluster = left.getCluster();
    return new DrillSemiJoinRel(cluster, cluster.traitSetOf(DrillRel.DRILL_LOGICAL), left,
            right, condition, leftKeys, rightKeys);
  }

  @Override
  public DrillSemiJoinRel copy(RelTraitSet traitSet, RexNode condition,
                                 RelNode left, RelNode right, JoinRelType joinType, boolean semiJoinDone) {
    Preconditions.checkArgument(joinType == JoinRelType.SEMI);
    final JoinInfo joinInfo = JoinInfo.of(left, right, condition);
    Preconditions.checkArgument(joinInfo.isEqui());
    return new DrillSemiJoinRel(getCluster(), traitSet, left, right, condition,
            joinInfo.leftKeys, joinInfo.rightKeys);
  }

  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    List<String> fields = new ArrayList<>();
    fields.addAll(getInput(0).getRowType().getFieldNames());
    fields.addAll(getInput(1).getRowType().getFieldNames());
    Preconditions.checkArgument(DrillJoinRel.isUnique(fields));
    final int leftCount = left.getRowType().getFieldCount();
    final List<String> leftFields = fields.subList(0, leftCount);
    final List<String> rightFields = fields.subList(leftCount, leftCount + right.getRowType().getFieldCount());

    final LogicalOperator leftOp = DrillJoinRel.implementInput(implementor, 0, 0, left, this, fields);
    final LogicalOperator rightOp = DrillJoinRel.implementInput(implementor, 1, leftCount, right, this, fields);

    Join.Builder builder = Join.builder();
    builder.type(joinType);
    builder.left(leftOp);
    builder.right(rightOp);
    List<JoinCondition> conditions = Lists.newArrayList();
    for (Pair<Integer, Integer> pair : Pair.zip(leftKeys, rightKeys)) {
      conditions.add(new JoinCondition(DrillJoinRel.EQUALITY_CONDITION,
              new FieldReference(leftFields.get(pair.left)), new FieldReference(rightFields.get(pair.right))));
    }

    return new LogicalSemiJoin(leftOp, rightOp, conditions, joinType);
  }

  // This method is the same as in Calcite and is here to ensure SemiJoin's behavior
  @Override
  public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
    return planner.getCostFactory().makeTinyCost();
  }
}


text:
package com.maxifier.mxcache.asm;
/**
 * This is dummy class. It is needed only because we want maven-javadoc-plugin
 * to generate javadoc jar. But it doesn't do it if the project contains no source code.
 * So I added this empty class for this purpose.
 */
public class Dummy {
}


text:
CMEditor is a simple way to use the popular CodeMirror web editor in grails applications. You can use it to edit pretty much anything that can be mapped to a file-like object. I.e. something with a filename and text-content.

This is its demo application. You can find the actual plugin at [http://github.com/RRZE-PP/grails-cmeditor](http://github.com/RRZE-PP/grails-cmeditor)

##Non-interactive demo
![Recorded demo](https://raw.githubusercontent.com/RRZE-PP/grails-cmeditor-demo/master/example.gif)

##Running the interactive demo

1. Check out the repo
	```
	git clone git@github.com:RRZE-PP/grails-cmeditor-demo.git
	```
2. If you want to use the latest development version of the plugin, check it out next to the demo application (optional)
	```
	git clone git@github.com:RRZE-PP/grails-cmeditor.git cmeditor
	```
3. Run the application (currently only grails <= 2.5 )
	```
	cd grails-cmeditor-demo;
	grails run-app
	```


text:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
  <sitemap>
    <loc>http://www.cheaplocaldeals.com/sitemaps/advertiser_sitemap.xml</loc>
  </sitemap>
  <sitemap>
    <loc>http://www.cheaplocaldeals.com/sitemaps/cities_sitemap.xml</loc>
  </sitemap>
  <sitemap>
    <loc>http://www.cheaplocaldeals.com/sitemaps/state_xml_sitemap.deal</loc>
  </sitemap>
</sitemapindex>


text:
function net = rbfsetfw(net, scale)
%RBFSETFW Set basis function widths of RBF.
%
%	Description
%	NET = RBFSETFW(NET, SCALE) sets the widths of the basis functions of
%	the RBF network NET. If Gaussian basis functions are used, then the
%	variances are set to the largest squared distance between centres if
%	SCALE is non-positive and SCALE times the mean distance of each
%	centre to its nearest neighbour if SCALE is positive.  Non-Gaussian
%	basis functions do not have a width.
%
%	See also
%	RBFTRAIN, RBFSETBF, GMMEM
%

%	Copyright (c) Ian T Nabney (1996-2001)

% Set the variances to be the largest squared distance between centres
if strcmp(net.actfn, 'gaussian')
   cdist = dist2(net.c, net.c);
   if scale > 0.0
      % Set variance of basis to be scale times average
      % distance to nearest neighbour
      cdist = cdist + realmax*eye(net.nhidden);
      widths = scale*mean(min(cdist));
   else
      widths = max(max(cdist));
   end
   net.wi = widths * ones(size(net.wi));
end


text:
package com.opengamma.financial.analytics.model.volatility.local.deprecated;

import java.util.List;

import com.opengamma.engine.function.config.AbstractFunctionConfigurationBean;
import com.opengamma.engine.function.config.FunctionConfiguration;
import com.opengamma.engine.function.config.FunctionConfigurationSource;

/**
 * Function repository configuration source for the functions contained in this package.
 */
public class DeprecatedFunctions extends AbstractFunctionConfigurationBean {

  /**
   * Default instance of a repository configuration source exposing the functions from this package.
   */
  public static final FunctionConfigurationSource DEFAULT = (new DeprecatedFunctions()).getObjectCreating();

  @Override
  protected void addAllConfigurations(final List<FunctionConfiguration> functions) {
    // TODO: add functions
  }

}


text:
.class Landroid/widget/DoubleDigitManager;
.super Ljava/lang/Object;
.source "DoubleDigitManager.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/widget/DoubleDigitManager$CallBack;
    }
.end annotation

# instance fields
.field private intermediateDigit:Ljava/lang/Integer;

.field private final mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

.field private final timeoutInMillis:J

# direct methods
.method public constructor <init>(JLandroid/widget/DoubleDigitManager$CallBack;)V
    .locals 0
    .parameter "timeoutInMillis"
    .parameter "callBack"

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

    .line 40
    iput-wide p1, p0, Landroid/widget/DoubleDigitManager;->timeoutInMillis:J

    .line 41
    iput-object p3, p0, Landroid/widget/DoubleDigitManager;->mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

    .line 42
    return-void
.end method

.method static synthetic access$000(Landroid/widget/DoubleDigitManager;)Ljava/lang/Integer;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    return-object v0
.end method

.method static synthetic access$002(Landroid/widget/DoubleDigitManager;Ljava/lang/Integer;)Ljava/lang/Integer;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-object p1, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    return-object p1
.end method

.method static synthetic access$100(Landroid/widget/DoubleDigitManager;)Landroid/widget/DoubleDigitManager$CallBack;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

    return-object v0
.end method

# virtual methods
.method public reportDigit(I)V
    .locals 5
    .parameter "digit"

    .prologue
    const/4 v4, 0x0

    .line 49
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    if-nez v0, :cond_1

    .line 50
    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    iput-object v0, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    .line 52
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    new-instance v1, Landroid/widget/DoubleDigitManager$1;

    invoke-direct {v1, p0}, Landroid/widget/DoubleDigitManager$1;-><init>(Landroid/widget/DoubleDigitManager;)V

    iget-wide v2, p0, Landroid/widget/DoubleDigitManager;->timeoutInMillis:J

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 61
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

    invoke-interface {v0, p1}, Landroid/widget/DoubleDigitManager$CallBack;->singleDigitIntermediate(I)Z

    move-result v0

    if-nez v0, :cond_0

    .line 66
    iput-object v4, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    .line 67
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

    invoke-interface {v0, p1}, Landroid/widget/DoubleDigitManager$CallBack;->singleDigitFinal(I)V

    .line 72
    :cond_0
    :goto_0
    return-void

    .line 69
    :cond_1
    iget-object v0, p0, Landroid/widget/DoubleDigitManager;->mCallBack:Landroid/widget/DoubleDigitManager$CallBack;

    iget-object v1, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    invoke-interface {v0, v1, p1}, Landroid/widget/DoubleDigitManager$CallBack;->twoDigitsFinal(II)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 70
    iput-object v4, p0, Landroid/widget/DoubleDigitManager;->intermediateDigit:Ljava/lang/Integer;

    goto :goto_0
.end method


text:
import Categories, { getCategories, getCategoriesAsOptions } from './modules.js';

import './server/load_categories.js';

export { getCategories, getCategoriesAsOptions };
export default Categories;


text:
using System;
using System.Threading;

class OpenMutexPos
{
    Mutex mut;
    ManualResetEvent mre;

    public OpenMutexPos()
    {
        mre = new ManualResetEvent(false);
    }

    public static int Main()
    {
        OpenMutexPos omp = new OpenMutexPos();
        return omp.Run();
    }

    private int Run()
    {
        int iRet = -1;
        string sName = Common.GetUniqueName();
        // Basic test, not owned
        using(mut = new Mutex(false, sName))
        {
            Thread t = new Thread(new ThreadStart(OwnMutex));
            t.Start();
            mre.WaitOne();
            try
            {
                Mutex mut1 = Mutex.OpenExisting(sName);
                mut1.WaitOne();
                mut1.ReleaseMutex();
                iRet = 100;
            }
            catch (Exception ex)
            {
                Console.WriteLine("Unexpected exception thrown: " +
                    ex.ToString());
            }
        }

        Console.WriteLine(100 == iRet ? "Test Passed" : "Test Failed");
        return iRet;
    }

    private void OwnMutex()
    {
        mut.WaitOne();
        mre.Set();
        Thread.Sleep(3000);
        mut.ReleaseMutex();
    }
}


text:
<?php

namespace Ironpinguin\HttpClientBundle;

use Ironpinguin\HttpClientBundle\Adapter\Adapter;

class Client
{

    const AUTH_BASIC  = 'basic';
    const AUTH_DIGEST = 'digest';

    /**
     * @var Adapter
     */
    protected $_adapter;

    /**
     * @var array
     */
    protected $_config = array(
        'adapter'           => 'Adapter\Curl',
        'connectTimeout'   => 10,
        'timeout'           => 0,
        'protocolVersion'  => '1.1',
        'bufferSize'       => 16384,

        'proxyHost'        => '',
        'proxyPort'        => 0,
        'proxyUser'        => '',
        'proxyPassword'    => '',
        'proxyAuthScheme' => self::AUTH_BASIC,
        'proxyType'        => 'http',

        'sslVerifyPeer'   => true,
        'sslVerifyHost'   => true,
        'sslCafile'        => null,
        'sslCapath'        => null,
        'sslLocalCert'    => null,
        'sslPassphrase'    => null,

        'digestCompatIe'  => false,

        'followRedirects'  => false,
        'maxRedirects'     => 5,
        'strictRedirects'  => false
    );

    /**
     * @param array $config
     */
    public function setConfig(array $config)
    {
        $this->_config = $config;
    }

    public function getConfig()
    {
        return $this->_config;
    }

    public function setAdapter($adapter)
    {
        if ($adapter instanceof Adapter)
        {
            $this->_adapter = $adapter;
        }
        elseif (is_string($adapter))
        {
            $this->_config['adapter'] = $adapter;
            $this->_adapter = $this->_loadAdapter($adapter);
        }
        else
        {
            throw new \Exception("No Adapter class or String with adapter name given");
        }
    }

    /**
     * @param string $adapter
     * @throws \Exception
     * @return Adapter
     */
    private function _loadAdapter($adapter)
    {
        try
        {
            $adapterInstance = new $adapter($this->_config);
            if ($adapterInstance instanceof Adapter)
            {
                return $adapterInstance;
            }
            else
            {
                throw new \Exception("Given class {$adapter} is not a adapter class");
            }
        }
        catch (\Exception $e)
        {
            throw new \Exception("Given adapter class {$adapter} not found");
        }
    }

    public function send($request = null)
    {
        if ($request == null)
        {
            //TODO implement a Request object generator
            throw new \Exception("Request generator is not implemented yet!");
        }

        if(!($this->_adapter instanceof Adapter))
        {
            $this->_loadAdapter($this->_config['adapter']);
        }

        $response = $this->_adapter->send($request);

        return $response;
    }

}


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace USF\IdM;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
/**
 * Description of ImportCommand
 *
 * @author james
 */
class ImportAccountsCommand extends Command {
    public function __construct() {
        $this->usfARMImportFileProcessor = new \USF\IdM\UsfARMImportFileProcessor();
        parent::__construct();
    }
    protected function configure() {
        $this->setName("import:accounts")
            ->setDescription("Imports accounts from line feed separated json account objects.")
            ->addArgument('fileName',InputArgument::OPTIONAL,'What is the accounts filename?')
            ->addOption('type',null,InputOption::VALUE_REQUIRED,'Provide the system type')
            ->addOption('in',null,InputOption::VALUE_NONE,'Provide STDIN')
            ->setHelp("Usage: <info>php console.php import:accounts <env></info>");
    }
    protected function execute(InputInterface $input, OutputInterface $output) {
        if($filePath = $input->getArgument('fileName')) {
            if (\file_exists($filePath)) {
                $output->writeln("Importing accounts from ".$input->getOption('type').": Started at ".date("F j, Y, g:i a"));
                $output->writeln($this->usfARMImportFileProcessor->parseFileByType($filePath,'accounts',$input->getOption('type')));
                $output->writeln("Importing accounts from ".$input->getOption('type').": Ended at ".date("F j, Y, g:i a"));
            } else {
                $output->writeln("ERROR: File does not exist!");
            }
        } else {
            $output->writeln($this->usfARMImportFileProcessor->importAccount(\json_decode(\file_get_contents("php://stdin"),true))->encode());
        }
    }

}


text:
#ifndef IncludeGuard__FW1_FW1Precompiled_h
#define IncludeGuard__FW1_FW1Precompiled_h

#define NOMINMAX
#include <D3D11.h>
#include <D3DCompiler.h>
#include <DWrite.h>
#include <intrin.h>
#include <string>
#include <vector>
#include <map>
#include <stack>
#include <cfloat>
#include <cmath>
#include <algorithm>

#include "FW1CompileSettings.h"
#include "FW1FontWrapper.h"

#endif// IncludeGuard__FW1_FW1Precompiled_h


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

<!-- The main build file. It merely imports the other files in the 'ant' directory. -->

<project name="GoldenGATE-Editor" default="all" basedir="." >
	<include file="ant/config.ant" />
	<include file="ant/dir.ant" />
	<include file="ant/javac.ant" />
	<include file="ant/dist.ant" />
	<include file="ant/import.ant" />

	<target name="all" depends="dirs,clean,jars,compile,zips">
		<!--<input message="Press Enter to start Tomcat.." />-->
	</target>

	<target name="clean" description="remove all auto generated files" >
		<antcall target="dir.clean" />
	</target>

	<target name="jars" description="get base jar files" >
		<antcall target="import.fetch" />
	</target>

	<target name="dirs" description="remove all auto generated files" >
		<antcall target="dir.mkdirs" />
	</target>

	<target name="compile" description="do the compilation" >
		<antcall target="javac.compile" />
	</target>

	<target name="zips" description="pack the jar files" >
		<antcall target="dir.copy" />
		<antcall target="dist.zips" />
	</target>
</project>


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

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListEndpointConfigsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The field to sort results by. The default is CreationTime.
     *

     */
    private String sortBy;
    /**
     *

     * The sort order for results. The default is Descending.
     *

     */
    private String sortOrder;
    /**
     *

     * If the result of the previous ListEndpointConfig request was truncated, the response includes a
     * NextToken. To retrieve the next set of endpoint configurations, use the token in the next request.
     *

     */
    private String nextToken;
    /**
     *

     * The maximum number of training jobs to return in the response.
     *

     */
    private Integer maxResults;
    /**
     *

     * A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains
     * the specified string.
     *

     */
    private String nameContains;
    /**
     *

     * A filter that returns only endpoint configurations created before the specified time (timestamp).
     *

     */
    private java.util.Date creationTimeBefore;
    /**
     *

     * A filter that returns only endpoint configurations with a creation time greater than or equal to the specified
     * time (timestamp).
     *

     */
    private java.util.Date creationTimeAfter;

    /**
     *

     * The field to sort results by. The default is CreationTime.
     *

     *
     * @param sortBy
     *        The field to sort results by. The default is CreationTime.
     * @see EndpointConfigSortKey
     */

    public void setSortBy(String sortBy) {
        this.sortBy = sortBy;
    }

    /**
     *

     * The field to sort results by. The default is CreationTime.
     *

     *
     * @return The field to sort results by. The default is CreationTime.
     * @see EndpointConfigSortKey
     */

    public String getSortBy() {
        return this.sortBy;
    }

    /**
     *

     * The field to sort results by. The default is CreationTime.
     *

     *
     * @param sortBy
     *        The field to sort results by. The default is CreationTime.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see EndpointConfigSortKey
     */

    public ListEndpointConfigsRequest withSortBy(String sortBy) {
        setSortBy(sortBy);
        return this;
    }

    /**
     *

     * The field to sort results by. The default is CreationTime.
     *

     *
     * @param sortBy
     *        The field to sort results by. The default is CreationTime.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see EndpointConfigSortKey
     */

    public ListEndpointConfigsRequest withSortBy(EndpointConfigSortKey sortBy) {
        this.sortBy = sortBy.toString();
        return this;
    }

    /**
     *

     * The sort order for results. The default is Descending.
     *

     *
     * @param sortOrder
     *        The sort order for results. The default is Descending.
     * @see OrderKey
     */

    public void setSortOrder(String sortOrder) {
        this.sortOrder = sortOrder;
    }

    /**
     *

     * The sort order for results. The default is Descending.
     *

     *
     * @return The sort order for results. The default is Descending.
     * @see OrderKey
     */

    public String getSortOrder() {
        return this.sortOrder;
    }

    /**
     *

     * The sort order for results. The default is Descending.
     *

     *
     * @param sortOrder
     *        The sort order for results. The default is Descending.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrderKey
     */

    public ListEndpointConfigsRequest withSortOrder(String sortOrder) {
        setSortOrder(sortOrder);
        return this;
    }

    /**
     *

     * The sort order for results. The default is Descending.
     *

     *
     * @param sortOrder
     *        The sort order for results. The default is Descending.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrderKey
     */

    public ListEndpointConfigsRequest withSortOrder(OrderKey sortOrder) {
        this.sortOrder = sortOrder.toString();
        return this;
    }

    /**
     *

     * If the result of the previous ListEndpointConfig request was truncated, the response includes a
     * NextToken. To retrieve the next set of endpoint configurations, use the token in the next request.
     *

     *
     * @param nextToken
     *        If the result of the previous ListEndpointConfig request was truncated, the response includes
     *        a NextToken. To retrieve the next set of endpoint configurations, use the token in the next
     *        request.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * If the result of the previous ListEndpointConfig request was truncated, the response includes a
     * NextToken. To retrieve the next set of endpoint configurations, use the token in the next request.
     *

     *
     * @return If the result of the previous ListEndpointConfig request was truncated, the response
     *         includes a NextToken. To retrieve the next set of endpoint configurations, use the token in
     *         the next request.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * If the result of the previous ListEndpointConfig request was truncated, the response includes a
     * NextToken. To retrieve the next set of endpoint configurations, use the token in the next request.
     *

     *
     * @param nextToken
     *        If the result of the previous ListEndpointConfig request was truncated, the response includes
     *        a NextToken. To retrieve the next set of endpoint configurations, use the token in the next
     *        request.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListEndpointConfigsRequest withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     *

     * The maximum number of training jobs to return in the response.
     *

     *
     * @param maxResults
     *        The maximum number of training jobs to return in the response.
     */

    public void setMaxResults(Integer maxResults) {
        this.maxResults = maxResults;
    }

    /**
     *

     * The maximum number of training jobs to return in the response.
     *

     *
     * @return The maximum number of training jobs to return in the response.
     */

    public Integer getMaxResults() {
        return this.maxResults;
    }

    /**
     *

     * The maximum number of training jobs to return in the response.
     *

     *
     * @param maxResults
     *        The maximum number of training jobs to return in the response.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListEndpointConfigsRequest withMaxResults(Integer maxResults) {
        setMaxResults(maxResults);
        return this;
    }

    /**
     *

     * A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains
     * the specified string.
     *

     *
     * @param nameContains
     *        A string in the endpoint configuration name. This filter returns only endpoint configurations whose name
     *        contains the specified string.
     */

    public void setNameContains(String nameContains) {
        this.nameContains = nameContains;
    }

    /**
     *

     * A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains
     * the specified string.
     *

     *
     * @return A string in the endpoint configuration name. This filter returns only endpoint configurations whose name
     *         contains the specified string.
     */

    public String getNameContains() {
        return this.nameContains;
    }

    /**
     *

     * A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains
     * the specified string.
     *

     *
     * @param nameContains
     *        A string in the endpoint configuration name. This filter returns only endpoint configurations whose name
     *        contains the specified string.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListEndpointConfigsRequest withNameContains(String nameContains) {
        setNameContains(nameContains);
        return this;
    }

    /**
     *

     * A filter that returns only endpoint configurations created before the specified time (timestamp).
     *

     *
     * @param creationTimeBefore
     *        A filter that returns only endpoint configurations created before the specified time (timestamp).
     */

    public void setCreationTimeBefore(java.util.Date creationTimeBefore) {
        this.creationTimeBefore = creationTimeBefore;
    }

    /**
     *

     * A filter that returns only endpoint configurations created before the specified time (timestamp).
     *

     *
     * @return A filter that returns only endpoint configurations created before the specified time (timestamp).
     */

    public java.util.Date getCreationTimeBefore() {
        return this.creationTimeBefore;
    }

    /**
     *

     * A filter that returns only endpoint configurations created before the specified time (timestamp).
     *

     *
     * @param creationTimeBefore
     *        A filter that returns only endpoint configurations created before the specified time (timestamp).
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListEndpointConfigsRequest withCreationTimeBefore(java.util.Date creationTimeBefore) {
        setCreationTimeBefore(creationTimeBefore);
        return this;
    }

    /**
     *

     * A filter that returns only endpoint configurations with a creation time greater than or equal to the specified
     * time (timestamp).
     *

     *
     * @param creationTimeAfter
     *        A filter that returns only endpoint configurations with a creation time greater than or equal to the
     *        specified time (timestamp).
     */

    public void setCreationTimeAfter(java.util.Date creationTimeAfter) {
        this.creationTimeAfter = creationTimeAfter;
    }

    /**
     *

     * A filter that returns only endpoint configurations with a creation time greater than or equal to the specified
     * time (timestamp).
     *

     *
     * @return A filter that returns only endpoint configurations with a creation time greater than or equal to the
     *         specified time (timestamp).
     */

    public java.util.Date getCreationTimeAfter() {
        return this.creationTimeAfter;
    }

    /**
     *

     * A filter that returns only endpoint configurations with a creation time greater than or equal to the specified
     * time (timestamp).
     *

     *
     * @param creationTimeAfter
     *        A filter that returns only endpoint configurations with a creation time greater than or equal to the
     *        specified time (timestamp).
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListEndpointConfigsRequest withCreationTimeAfter(java.util.Date creationTimeAfter) {
        setCreationTimeAfter(creationTimeAfter);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSortBy() != null)
            sb.append("SortBy: ").append(getSortBy()).append(",");
        if (getSortOrder() != null)
            sb.append("SortOrder: ").append(getSortOrder()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken()).append(",");
        if (getMaxResults() != null)
            sb.append("MaxResults: ").append(getMaxResults()).append(",");
        if (getNameContains() != null)
            sb.append("NameContains: ").append(getNameContains()).append(",");
        if (getCreationTimeBefore() != null)
            sb.append("CreationTimeBefore: ").append(getCreationTimeBefore()).append(",");
        if (getCreationTimeAfter() != null)
            sb.append("CreationTimeAfter: ").append(getCreationTimeAfter());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListEndpointConfigsRequest == false)
            return false;
        ListEndpointConfigsRequest other = (ListEndpointConfigsRequest) obj;
        if (other.getSortBy() == null ^ this.getSortBy() == null)
            return false;
        if (other.getSortBy() != null && other.getSortBy().equals(this.getSortBy()) == false)
            return false;
        if (other.getSortOrder() == null ^ this.getSortOrder() == null)
            return false;
        if (other.getSortOrder() != null && other.getSortOrder().equals(this.getSortOrder()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        if (other.getMaxResults() == null ^ this.getMaxResults() == null)
            return false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
            return false;
        if (other.getNameContains() == null ^ this.getNameContains() == null)
            return false;
        if (other.getNameContains() != null && other.getNameContains().equals(this.getNameContains()) == false)
            return false;
        if (other.getCreationTimeBefore() == null ^ this.getCreationTimeBefore() == null)
            return false;
        if (other.getCreationTimeBefore() != null && other.getCreationTimeBefore().equals(this.getCreationTimeBefore()) == false)
            return false;
        if (other.getCreationTimeAfter() == null ^ this.getCreationTimeAfter() == null)
            return false;
        if (other.getCreationTimeAfter() != null && other.getCreationTimeAfter().equals(this.getCreationTimeAfter()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getSortBy() == null) ? 0 : getSortBy().hashCode());
        hashCode = prime * hashCode + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
        hashCode = prime * hashCode + ((getNameContains() == null) ? 0 : getNameContains().hashCode());
        hashCode = prime * hashCode + ((getCreationTimeBefore() == null) ? 0 : getCreationTimeBefore().hashCode());
        hashCode = prime * hashCode + ((getCreationTimeAfter() == null) ? 0 : getCreationTimeAfter().hashCode());
        return hashCode;
    }

    @Override
    public ListEndpointConfigsRequest clone() {
        return (ListEndpointConfigsRequest) super.clone();
    }

}


text:
package org.apache.flex.compiler.internal.codegen.js.goog;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

import java.io.File;
import java.util.List;

import org.apache.flex.compiler.driver.IBackend;
import org.apache.flex.compiler.internal.driver.js.goog.GoogBackend;
import org.apache.flex.compiler.internal.test.ASTestBase;
import org.apache.flex.utils.FilenameNormalization;
import org.junit.Test;

/**
 * This class tests the production of valid 'goog' JS code from an external
 * project.
 *
 * @author Erik de Bruin
 */
public class TestGoogProject extends ASTestBase
{

    private static String projectDirPath = "goog/projects";

    @Test
    public void test_imports()
    {
        String testDirPath = projectDirPath + "/imports";

        String fileName = "Case";

        List<String> compiledFileNames = compileProject(fileName, testDirPath);

        assertProjectOut(compiledFileNames, testDirPath);
    }

    @Override
    protected void addSourcePaths(List<File> sourcePaths)
    {
        sourcePaths.add(new File(FilenameNormalization.normalize("test-files"
                + File.separator + projectDirPath + "/imports")));

        super.addSourcePaths(sourcePaths);
    }

    @Override
    protected IBackend createBackend()
    {
        return new GoogBackend();
    }

    protected void assertProjectOut(List<String> compiledFileNames,
            String testDirPath)
    {
    	if (compiledFileNames.size() == 0)
    	{
    		assertThat("No Compiled files", is("Compiled Files"));
    		return;
    	}
        for (String compiledFileName : compiledFileNames)
        {
            String compiledFilePath = tempDir.getAbsolutePath()
                    + File.separator + testDirPath + File.separator
                    + compiledFileName + "_output" + "."
                    + backend.getOutputExtension();
            String compiledResult = readCodeFile(new File(compiledFilePath));

            //System.out.println(compiledResult);

            String expectedFilePath = new File("test-files").getAbsolutePath()
                    + File.separator + testDirPath + File.separator
                    + compiledFileName + "_result" + "."
                    + backend.getOutputExtension();
            String expectedResult = readCodeFile(new File(expectedFilePath));

            assertThat(compiledResult, is(expectedResult));
        }
    }

}


text:
(async function() {
  TestRunner.addResult(`Tests the Timeline API instrumentation of a DOM Dispatch (mousedown)\n`);
  await TestRunner.loadLegacyModule('timeline'); await TestRunner.loadTestModule('performance_test_runner');
  await TestRunner.showPanel('timeline');
  await TestRunner.loadHTML(`
      <div id="testTarget" style="width:400px; height:400px;">
      Test Mouse Target
      </div>
    `);
  await TestRunner.evaluateInPagePromise(`
      function handleMouseDown(event)
      {
          console.timeStamp("Handling mousedown");
      }

      function performActions()
      {
          var target = document.getElementById("testTarget");
          target.addEventListener("mousedown", handleMouseDown, true);
          var rect = target.getBoundingClientRect();

          // Simulate the mouse down over the target to trigger an EventDispatch
          if (window.eventSender) {
              eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.height / 2);
              eventSender.mouseDown();
          }
      }
  `);

  PerformanceTestRunner.performActionsAndPrint('performActions()', 'EventDispatch');
})();


text:
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _

class AdminDocsConfig(AppConfig):
    name = 'django.contrib.admindocs'
    verbose_name = _("Administrative Documentation")


text:
<bill session="110" type="h" number="4046" updated="2009-01-09T01:18:19-05:00">
	<status><introduced date="1193889600" datetime="2007-11-01"/></status>

	<introduced date="1193889600" datetime="2007-11-01"/>
	<titles>
		<title type="short" as="introduced">Student Disability Fairness Act</title>
		<title type="official" as="introduced">To amend the Higher Education Act of 1965 to require the Department of Education to accept certifications of permanent and total disability by the Department of Veterans Affairs for the purpose of student loan discharge.</title>
	</titles>
	<sponsor id="412231"/>
	<cosponsors>
		<cosponsor id="400659" joined="2007-11-01"/>
	</cosponsors>
	<actions>
		<action date="1193889600" datetime="2007-11-01"><text>Referred to the House Committee on Education and Labor.</text></action>
		<action date="1200373200" datetime="2008-01-15"><text>Referred to the Subcommittee on Higher Education, Lifelong Learning, and Competitiveness.</text></action>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>

	11/1/2007--Introduced.
Student Disability Fairness Act - Amends the Higher Education Act of 1965 to require the Secretary of Education to accept certifications by the Department of Veterans Affairs that student borrowers are permanently and totally disabled as sufficient documentation for the discharge of their loans under part B (Federal Family Education Loan Program) of title IV of the Act.

</bill>


text:
package com.github.mikephil.charting.utils;

import android.content.res.Resources;
import android.graphics.Color;

import java.util.ArrayList;
import java.util.List;

/**
 * Class that holds predefined color integer arrays (e.g.
 * ColorTemplate.VORDIPLOM_COLORS) and convenience methods for loading colors
 * from resources.
 *
 * @author Philipp Jahoda
 */
public class ColorTemplate {

    /**
     * an "invalid" color that indicates that no color is set
     */
    public static final int COLOR_NONE = 0x00112233;

    /**
     * this "color" is used for the Legend creation and indicates that the next
     * form should be skipped
     */
    public static final int COLOR_SKIP = 0x00112234;

    /**
     * THE COLOR THEMES ARE PREDEFINED (predefined color integer arrays), FEEL
     * FREE TO CREATE YOUR OWN WITH AS MANY DIFFERENT COLORS AS YOU WANT
     */
    public static final int[] LIBERTY_COLORS = {
            Color.rgb(207, 248, 246), Color.rgb(148, 212, 212), Color.rgb(136, 180, 187),
            Color.rgb(118, 174, 175), Color.rgb(42, 109, 130)
    };
    public static final int[] JOYFUL_COLORS = {
            Color.rgb(217, 80, 138), Color.rgb(254, 149, 7), Color.rgb(254, 247, 120),
            Color.rgb(106, 167, 134), Color.rgb(53, 194, 209)
    };
    public static final int[] PASTEL_COLORS = {
            Color.rgb(64, 89, 128), Color.rgb(149, 165, 124), Color.rgb(217, 184, 162),
            Color.rgb(191, 134, 134), Color.rgb(179, 48, 80)
    };
    public static final int[] COLORFUL_COLORS = {
            Color.rgb(193, 37, 82), Color.rgb(255, 102, 0), Color.rgb(245, 199, 0),
            Color.rgb(106, 150, 31), Color.rgb(179, 100, 53)
    };
    public static final int[] VORDIPLOM_COLORS = {
            Color.rgb(192, 255, 140), Color.rgb(255, 247, 140), Color.rgb(255, 208, 140),
            Color.rgb(140, 234, 255), Color.rgb(255, 140, 157)
    };
    public static final int[] MATERIAL_COLORS = {
            rgb("#2ecc71"), rgb("#f1c40f"), rgb("#e74c3c"), rgb("#3498db")
    };

    /**
     * Converts the given hex-color-string to rgb.
     *
     * @param hex
     * @return
     */
    public static int rgb(String hex) {
        int color = (int) Long.parseLong(hex.replace("#", ""), 16);
        int r = (color >> 16) & 0xFF;
        int g = (color >> 8) & 0xFF;
        int b = (color >> 0) & 0xFF;
        return Color.rgb(r, g, b);
    }

    /**
     * Returns the Android ICS holo blue light color.
     *
     * @return
     */
    public static int getHoloBlue() {
        return Color.rgb(51, 181, 229);
    }

    public static int getColorWithAlphaComponent(int color, int alpha) {
        return (color & 0xffffff) | ((alpha & 0xff) << 24);
    }

    /**
     * turn an array of resource-colors (contains resource-id integers) into an
     * array list of actual color integers
     *
     * @param r
     * @param colors an integer array of resource id's of colors
     * @return
     */
    public static List<Integer> createColors(Resources r, int[] colors) {

        List<Integer> result = new ArrayList<Integer>();

        for (int i : colors) {
            result.add(r.getColor(i));
        }

        return result;
    }

    /**
     * Turns an array of colors (integer color values) into an ArrayList of
     * colors.
     *
     * @param colors
     * @return
     */
    public static List<Integer> createColors(int[] colors) {

        List<Integer> result = new ArrayList<Integer>();

        for (int i : colors) {
            result.add(i);
        }

        return result;
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<title>DO-WHILE EXAMPLES</title>
<meta name="keywords" content="examples, do-while, do-while examples, C++, C++ examples" />
<meta name="description" content="6 examples about C++ do-while statement."/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<meta name="robots" content="index, follow" />
<meta name="revisit-after" content="30 days" />
<meta name="generator" content="S5" />
<meta name="version" content="S5 1.1" />
<meta name="presdate" content="20130601" />
<meta name="author" content="Кирил Иларионов" />

<meta name="defaultView" content="slideshow" />

<link rel="stylesheet" href="../../../../ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="../../../../ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="../../../../ui/default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="../../../../ui/default/opera.css" type="text/css" media="projection" id="operaFix" />

Bulgaria / June 2013 / k.ilarionov at gmail.com

C++ DO-WHILE EXAMPLES

ПРИМЕРИ за DO-WHILE

Пример 1 - Да се отпечатат целите числа от 1 до 15 включително;

Пример 2 - Да се отпечатат четните числа от 1 до 15;

Пример 3 - Въвежда се цяло число n. Да се отпечатат n на брой звездички;

Пример 4 - Въвежда се цяло число n. Да се отпечатат  в обратен ред цифрите му;

Пример 5 - Въвежда се цяло число n. Да се отпечата  сумата от цифрите му;

Пример 6 - Въвежда се цяло число n. Да се отпечата  най-малката от цифрите му.

Изход


text:
package com.google.devtools.kythe.platform.java.filemanager;

import com.google.devtools.kythe.proto.Analysis;
import com.google.devtools.kythe.proto.Analysis.CompilationUnit;
import com.google.devtools.kythe.proto.Analysis.CompilationUnit.FileInput;
import java.util.LinkedList;
import java.util.List;
import junit.framework.TestCase;

/** Tests {@link CompilationUnitFileTree}. */
public class CompilationUnitFileTreeTest extends TestCase {
  public void testRelPath() {
    Iterable<CompilationUnit.FileInput> fi = createDummyFileInput("foo/bar/baz");
    CompilationUnitFileTree cuft = new CompilationUnitFileTree(fi);
    assertEquals("dummy digest for foo/bar/baz", cuft.lookup("foo/bar/baz"));
    assertEquals("<dir>", cuft.lookup("foo/bar"));
  }

  public void testAbsPath() {
    Iterable<CompilationUnit.FileInput> fi = createDummyFileInput("/foo/bar/baz");
    CompilationUnitFileTree cuft = new CompilationUnitFileTree(fi);
    assertEquals("dummy digest for /foo/bar/baz", cuft.lookup("/foo/bar/baz"));
    assertEquals("<dir>", cuft.lookup("/foo/bar"));
  }

  private List<FileInput> createDummyFileInput(String path) {
    List<FileInput> ret = new LinkedList<>();
    ret.add(
        CompilationUnit.FileInput.newBuilder()
            .setInfo(
                Analysis.FileInfo.newBuilder()
                    .setPath(path)
                    .setDigest("dummy digest for " + path)
                    .build())
            .build());
    return ret;
  }
}


text:
using System;

namespace jbb
{
	public class JBTeam
	{
		public string Name { get; set;}
		public string Title { get; set;}
		public string Desc { get; set;}
		public string PicURL { get; set;}

		public override string ToString ()
		{
			return String.Format ("{0}, {1}, {2}, {3}", Name, Title, Desc, PicURL);
		}

	}

	public class MyStaffRootObject
	{
		public JBTeam[] staffs { get; set; }
	}
}


text:
import getStyleComputedProperty from './getStyleComputedProperty';
import getBordersSize from './getBordersSize';
import getWindowSizes from './getWindowSizes';
import getScroll from './getScroll';
import getClientRect from './getClientRect';
import isIE from './isIE';

/**
 * Get bounding client rect of given element
 * @method
 * @memberof Popper.Utils
 * @param {HTMLElement} element
 * @return {Object} client rect
 */
export default function getBoundingClientRect(element) {
  let rect = {};

  // IE10 10 FIX: Please, don't ask, the element isn't
  // considered in DOM in some circumstances...
  // This isn't reproducible in IE10 compatibility mode of IE11
  try {
    if (isIE(10)) {
      rect = element.getBoundingClientRect();
      const scrollTop = getScroll(element, 'top');
      const scrollLeft = getScroll(element, 'left');
      rect.top += scrollTop;
      rect.left += scrollLeft;
      rect.bottom += scrollTop;
      rect.right += scrollLeft;
    }
    else {
      rect = element.getBoundingClientRect();
    }
  }
  catch(e){}

  const result = {
    left: rect.left,
    top: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top,
  };

  // subtract scrollbar size from sizes
  const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
  const width =
    sizes.width || element.clientWidth || result.width;
  const height =
    sizes.height || element.clientHeight || result.height;

  let horizScrollbar = element.offsetWidth - width;
  let vertScrollbar = element.offsetHeight - height;

  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
  // we make this check conditional for performance reasons
  if (horizScrollbar || vertScrollbar) {
    const styles = getStyleComputedProperty(element);
    horizScrollbar -= getBordersSize(styles, 'x');
    vertScrollbar -= getBordersSize(styles, 'y');

    result.width -= horizScrollbar;
    result.height -= vertScrollbar;
  }

  return getClientRect(result);
}


text:
// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
  // **optional** default: `{}`
  // override vscode settings
  // Notice: It only affects the settings used by Vetur.
  settings: {
    "vetur.useWorkspaceDependencies": true,
    "vetur.experimental.templateInterpolationService": true
  },
  // **optional** default: `[{ root: './' }]`
  // support monorepos
  projects: [
    {
      // **required**
      // Where is your project?
      // It is relative to `vetur.config.js`.
      root: './src/client',
      // **optional** default: `'package.json'`
      // Where is `package.json` in the project?
      // We use it to determine the version of vue.
      // It is relative to root property.
      package: '../../package.json',
      // **optional**
      // Where is TypeScript config file in the project?
      // It is relative to root property.
      tsconfig: './tsconfig.json',
      // **optional** default: `'./.vscode/vetur/snippets'`
      // Where is vetur custom snippets folders?
      snippetFolder: './.vscode/vetur/snippets',
      // **optional** default: `[]`
      // Register globally Vue component glob.
      // If you set it, you can get completion by that components.
      // It is relative to root property.
      // Notice: It won't actually do it. You need to use `require.context` or `Vue.component`
      globalComponents: [
        './src/clients/components/global/*.vue'
      ]
    }
  ]
}


text:
package com.google.cloud.talent.v4beta1;

import com.google.api.gax.core.NoCredentialsProvider;
import com.google.api.gax.grpc.testing.LocalChannelProvider;
import com.google.api.gax.grpc.testing.MockGrpcService;
import com.google.api.gax.grpc.testing.MockServiceHelper;
import java.io.IOException;
import java.util.Arrays;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;

@javax.annotation.Generated("by GAPIC")
public class CompletionClientTest {
  private static MockCompanyService mockCompanyService;
  private static MockCompletion mockCompletion;
  private static MockEventService mockEventService;
  private static MockJobService mockJobService;
  private static MockProfileService mockProfileService;
  private static MockResumeService mockResumeService;
  private static MockTenantService mockTenantService;
  private static MockServiceHelper serviceHelper;
  private CompletionClient client;
  private LocalChannelProvider channelProvider;

  @BeforeClass
  public static void startStaticServer() {
    mockCompanyService = new MockCompanyService();
    mockCompletion = new MockCompletion();
    mockEventService = new MockEventService();
    mockJobService = new MockJobService();
    mockProfileService = new MockProfileService();
    mockResumeService = new MockResumeService();
    mockTenantService = new MockTenantService();
    serviceHelper =
        new MockServiceHelper(
            "in-process-1",
            Arrays.<MockGrpcService>asList(
                mockCompanyService,
                mockCompletion,
                mockEventService,
                mockJobService,
                mockProfileService,
                mockResumeService,
                mockTenantService));
    serviceHelper.start();
  }

  @AfterClass
  public static void stopServer() {
    serviceHelper.stop();
  }

  @Before
  public void setUp() throws IOException {
    serviceHelper.reset();
    channelProvider = serviceHelper.createChannelProvider();
    CompletionSettings settings =
        CompletionSettings.newBuilder()
            .setTransportChannelProvider(channelProvider)
            .setCredentialsProvider(NoCredentialsProvider.create())
            .build();
    client = CompletionClient.create(settings);
  }

  @After
  public void tearDown() throws Exception {
    client.close();
  }
}


text:
using System.Reflection;
using System.Resources;

[assembly: AssemblyTitle( "Microsoft Azure Key Vault Extensions Library" )]
[assembly: AssemblyDescription( "Provides extended capabilities for Azure Key Vault." )]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Azure .NET SDK")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]


text:
package pulse

import (
	"errors"
	"io"
	"net/http"
	"net/url"
	"os"
	"path/filepath"
)

// ArtifactFetcher is type for fetching artifacts based on info from BuildArtifact type
type ArtifactFetcher struct {
	Client        *http.Client
	tok, dir, url string
}

var errEmptyRes = errors.New("fakerpc: empty response")

// NewArtifactFetcher returns new ArtifactFetcher
func NewArtifactFetcher(url, tok, dir string) *ArtifactFetcher {
	return &ArtifactFetcher{Client: &http.Client{}, tok: tok, dir: dir, url: url}
}

// Fetch prepares file paths to save artifact files and calls downloadFile
func (af *ArtifactFetcher) Fetch(a *BuildArtifact, project string) (err error) {
	var link string
	if link, err = url.QueryUnescape(a.Permalink); err != nil {
		return err
	}
	basepath := filepath.Join(af.dir, project, a.Stage, a.Command, a.Name)
	urls := af.buildURLs(link, a.Files)
	for i := range a.Files {
		path := filepath.Join(basepath, filepath.Dir(a.Files[i]))

		if _, err = os.Stat(path); os.IsNotExist(err) {
			if err = os.MkdirAll(path, 0755); err != nil {
				return err
			}
		}
		if err = af.fetchSingle(filepath.Join(path, filepath.Base(a.Files[i])), urls[i]); err != nil {
			return err
		}
	}
	return nil
}

// buildURLs builds URLs to download files within artifact
func (af *ArtifactFetcher) buildURLs(link string, files []string) []string {
	links := make([]string, len(files))
	for i := range files {
		links[i] = af.url + filepath.Join(link, files[i])
	}
	return links
}

// fetchSingle downloads file from url and saves it as filename
func (af *ArtifactFetcher) fetchSingle(filename string, url string) error {
	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		return err
	}
	req.Header.Add("PULSE_API_TOKEN", af.tok)
	resp, err := af.Client.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	if resp.ContentLength == 0 {
		return errEmptyRes
	}
	file, err := os.Create(filename)
	if err != nil {
		return err
	}
	defer file.Close()

	if _, err := io.Copy(file, resp.Body); err != nil {
		return err
	}

	return nil
}