text:
<?php

require_once("guiconfig.inc");
require_once("rrd.inc");
require_once("system.inc");
require_once("interfaces.inc");
require_once("plugins.inc.d/ntpd.inc");

$a_ntpd = &config_read_array('ntpd');

$copy_fields = [
    'clientmode',
    'clockstats',
    'interface',
    'kod',
    'limited',
    'leapsec',
    'logpeer',
    'logsys',
    'loopstats',
    'nomodify',
    'nopeer',
    'noquery',
    'noserve',
    'notrap',
    'orphan',
    'peerstats',
    'statsgraph',
];

if ($_SERVER['REQUEST_METHOD'] === 'GET') {
    $pconfig = array();

    foreach ($copy_fields as $fieldname) {
        if (isset($a_ntpd[$fieldname])) {
            $pconfig[$fieldname] = $a_ntpd[$fieldname];
        }
    }

    // base64 encoded
    $pconfig['leapsec'] = base64_decode(chunk_split($pconfig['leapsec']));

    // array types
    $pconfig['interface'] = !empty($pconfig['interface']) ? explode(",", $pconfig['interface']) : array();

    // text types
    $pconfig['custom_options'] = !empty($a_ntpd['custom_options']) ? $a_ntpd['custom_options'] : '';

    // parse timeservers
    $pconfig['timeservers_host'] = array();
    $pconfig['timeservers_noselect'] = array();
    $pconfig['timeservers_prefer'] = array();
    $pconfig['timeservers_iburst'] = array();
    if (!empty($config['system']['timeservers'])) {
        $pconfig['timeservers_noselect'] = !empty($a_ntpd['noselect']) ? explode(' ', $a_ntpd['noselect']) : array();
        $pconfig['timeservers_prefer'] = !empty($a_ntpd['prefer']) ? explode(' ', $a_ntpd['prefer']) : array();
        $pconfig['timeservers_iburst'] = !empty($a_ntpd['iburst']) ? explode(' ', $a_ntpd['iburst']) : array();
        $pconfig['timeservers_host'] = explode(' ', $config['system']['timeservers']);
    }
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $pconfig = $_POST;
    $input_errors = array();
    if (!empty($pconfig['orphan']) && ($pconfig['orphan'] < 0 || $pconfig['orphan'] > 15 || !is_numeric($pconfig['orphan']))) {
        $input_errors[] = gettext("Orphan mode must be a value between 0..15");
    }
    $prev_opt = !empty($a_ntpd['custom_options']) ? $a_ntpd['custom_options'] : "";
    if ($prev_opt != str_replace("\r\n", "\n", $pconfig['custom_options']) && !userIsAdmin($_SESSION['Username'])) {
        $input_errors[] = gettext('Advanced options may only be edited by system administrators due to the increased possibility of privilege escalation.');
    }

    // swap fields, really stupid field usage which we are not going to change now....
    foreach (array('kod', 'limited', 'nomodify', 'nopeer', 'notrap') as $fieldname) {
        $pconfig[$fieldname] = empty($pconfig[$fieldname]);
    }

    if (count($input_errors) == 0) {
        // copy fields
        foreach ($copy_fields as $fieldname) {
            if (!empty($pconfig[$fieldname])) {
                $a_ntpd[$fieldname] = $pconfig[$fieldname];
            } elseif (isset($a_ntpd[$fieldname])) {
                unset($a_ntpd[$fieldname]);
            }
        }

        // list types
        $config['system']['timeservers'] = trim(implode(' ', $pconfig['timeservers_host']));
        $a_ntpd['noselect'] = !empty($pconfig['timeservers_noselect']) ? trim(implode(' ', $pconfig['timeservers_noselect'])) : null;
        $a_ntpd['prefer'] = !empty($pconfig['timeservers_prefer']) ? trim(implode(' ', $pconfig['timeservers_prefer'])) : null;
        $a_ntpd['iburst'] = !empty($pconfig['timeservers_iburst']) ? trim(implode(' ', $pconfig['timeservers_iburst'])) : null;
        $a_ntpd['interface'] = !empty($pconfig['interface']) ? implode(',', $pconfig['interface']) : null;

        // unset empty
        foreach (array('noselect', 'prefer', 'iburst', 'interface') as $fieldname) {
            if (empty($a_ntpd[$fieldname])) {
                unset($a_ntpd[$fieldname]);
            }
        }

        if (empty($config['system']['timeservers'])) {
            unset($config['system']['timeservers']);
        }

        if (!empty($pconfig['leapsec'])) {
            $a_ntpd['leapsec'] = base64_encode($a_ntpd['leapsec']);
        } elseif(isset($a_ntpd['leapsec'])) {
            unset($a_ntpd['leapsec']);
        }

        if (!empty($pconfig['custom_options'])) {
            $a_ntpd['custom_options'] = str_replace("\r\n", "\n", $pconfig['custom_options']);
        } elseif (isset($a_ntpd['custom_options'])) {
            unset($a_ntpd['custom_options']);
        }

        if (is_uploaded_file($_FILES['leapfile']['tmp_name'])) {
            $a_ntpd['leapsec'] = base64_encode(file_get_contents($_FILES['leapfile']['tmp_name']));
        }

        write_config("Updated NTP Server Settings");

        rrd_configure();
        ntpd_configure_do();
        system_cron_configure();

        header(url_safe('Location: /services_ntpd.php'));
        exit;
    }
}

$service_hook = 'ntpd';
legacy_html_escape_form_data($pconfig);

include("head.inc");

?>

<?php include("fbegin.inc"); ?>

      <?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>

          <form method="post" name="iform" id="iform" enctype="multipart/form-data" accept-charset="utf-8">

                      <?=gettext("NTP Server Configuration"); ?>

                      <?=gettext("full help"); ?>

                     <?=gettext('Time servers') ?>

                            <?=gettext("Network"); ?>
                            <?=gettext("Prefer"); ?>
                            <?=gettext("Iburst"); ?>
                            <?=gettext("Do not use"); ?>

<?php
                        if (count($pconfig['timeservers_host']) == 0 ) {
                            $pconfig['timeservers_host'][] = "";
                        }
                        foreach($pconfig['timeservers_host'] as $item_idx => $timeserver):?>

                              <input name="timeservers_host[]" type="text" value="<?=$timeserver;?>" />

                              <input name="timeservers_prefer[]" class="ts_checkbox" type="checkbox" value="<?=$timeserver;?>" <?= !empty($pconfig['timeservers_prefer']) && in_array($timeserver, $pconfig['timeservers_prefer']) ? 'checked="checked"' : '' ?>/>

                              <input name="timeservers_iburst[]" class="ts_checkbox" type="checkbox" value="<?=$timeserver;?>" <?= !empty($pconfig['timeservers_iburst']) && in_array($timeserver, $pconfig['timeservers_iburst']) ? 'checked="checked"' : '' ?>/>

                              <input name="timeservers_noselect[]" class="ts_checkbox" type="checkbox" value="<?=$timeserver;?>" <?= !empty($pconfig['timeservers_noselect']) && in_array($timeserver,  $pconfig['timeservers_noselect']) ? 'checked="checked"' : '' ?>/>

<?php
                        endforeach;?>

                        <?=gettext('For best results three to five servers should be configured here.'); ?>
                        <?=gettext('When no servers are specified NTP will be completely disabled.'); ?>

                        <?= gettext('The "prefer" option indicates that NTP should favor the use of this server more than all others.') ?>

                        <?= gettext('The "iburst" option enables faster clock synchronisation on startup at the expense of the peer.') ?>

                        <?= gettext('The "do not use" option indicates that NTP should not use this server for time, but stats for this server will be collected and displayed.') ?>

                     <?=gettext('Client mode') ?>

                      <input name="clientmode" type="checkbox" id="clientmode" <?=!empty($pconfig['clientmode']) ? ' checked="checked"' : '' ?> />
                      <?= gettext('Quit NTP server immediately after time synchronisation') ?>

                     <?=gettext('Interfaces') ?>

<?php
                    $interfaces = get_configured_interface_with_descr();
                    $carplist = get_configured_carp_interface_list();
                    foreach ($carplist as $cif => $carpip) {
                        $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")";
                    }
                    $aliaslist = get_configured_ip_aliases_list();
                    foreach ($aliaslist as $aliasip => $aliasif) {
                        $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
                    }?>
                      <select id="interface" name="interface[]" multiple="multiple" class="selectpicker" title="<?= html_safe(gettext('All (recommended)')) ?>">
<?php
                      foreach ($interfaces as $iface => $ifacename):
                          if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) {
                              continue;
                          }?>
                          <option value="<?=$iface;?>" <?= !empty($pconfig['interface']) && in_array($iface, $pconfig['interface']) ? 'selected="selected"' : '' ?>>
                              <?=htmlspecialchars($ifacename);?>
                          </option>
<?php
                      endforeach;?>
                      </select>

                        <?=gettext("Interfaces without an IP address will not be shown."); ?>

<?=gettext("Selecting no interfaces will listen on all interfaces with a wildcard."); ?>

<?=gettext("Selecting all interfaces will explicitly listen on only the interfaces/IPs specified."); ?>

                     <?=gettext('Orphan mode') ?>

                      <input name="orphan" type="text" value="<?=$pconfig['orphan']?>" placeholder="12" />

                        <?=gettext("(0-15)");?>

                        <?=gettext("Orphan mode allows the system clock to be used when no other clocks are available. The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough to insure that any other servers available to clients are preferred over this server."); ?>

                     <?=gettext('NTP graphs') ?>

                      <input name="statsgraph" type="checkbox" id="statsgraph" <?=!empty($pconfig['statsgraph']) ? " checked=\"checked\"" : ""; ?> />
                      <?= gettext('Enable RRD graphs of NTP statistics') ?>

                     <?=gettext('Syslog logging') ?>

                      <input name="logpeer" type="checkbox" <?=!empty($pconfig['logpeer']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable logging of peer messages"); ?>

                      <input name="logsys" type="checkbox" <?=!empty($pconfig['logsys']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable logging of system messages"); ?>

                        <?=gettext("These options enable additional messages from NTP to be written to the System Log");?> (<?=gettext("Status > System Logs > NTP"); ?>).

                     <?=gettext('Statistics logging') ?>

                        <input class="btn btn-default btn-xs" id="showstatisticsbox" type="button" value="<?= html_safe(gettext('Advanced')) ?>" /> - <?=gettext("Show statistics logging options");?>

                      <?= gettext("These options will create persistent daily log files in /var/log/ntp.") ?>

                      <input name="clockstats" type="checkbox" id="clockstats"<?=!empty($pconfig['clockstats']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable logging of reference clock statistics"); ?>

                      <input name="loopstats" type="checkbox" id="loopstats"<?=!empty($pconfig['loopstats']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable logging of clock discipline statistics"); ?>

                      <input name="peerstats" type="checkbox" id="peerstats"<?=!empty($pconfig['peerstats']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable logging of NTP peer statistics"); ?>

                     <?=gettext('Access restrictions') ?>

                      <input type="button" id="showrestrictbox" class="btn btn-default btn-xs" value="<?= html_safe(gettext('Advanced')) ?>" /> - <?=gettext("Show access restriction options");?>

                      <?=gettext("These options control access to NTP."); ?>

                      <input name="kod" type="checkbox" id="kod"<?=empty($pconfig['kod']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable Kiss-o'-death packets"); ?>

                      <input name="limited" type="checkbox" id="limited"<?=empty($pconfig['limited']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Enable Rate limiting"); ?>

                      <input name="nomodify" type="checkbox" id="nomodify"<?=empty($pconfig['nomodify']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc"); ?>

                      <input name="noquery" type="checkbox" id="noquery"<?=!empty($pconfig['noquery']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Disable ntpq and ntpdc queries"); ?>

                      <input name="noserve" type="checkbox" id="noserve"<?=!empty($pconfig['noserve']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Disable all except ntpq and ntpdc queries"); ?>

                      <input name="nopeer" type="checkbox" id="nopeer"<?=empty($pconfig['nopeer']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Deny packets that attempt a peer association"); ?>

                      <input name="notrap" type="checkbox" id="notrap"<?=empty($pconfig['notrap']) ? " checked=\"checked\"" : ""; ?> />
                      <?=gettext("Deny mode 6 control message trap service"); ?>

                     <?=gettext('Leap seconds') ?>

                        <input type="button" id="showleapsecbox" class="btn btn-default btn-xs" value="<?= html_safe(gettext('Advanced')) ?>" /> - <?=gettext("Show Leap second configuration");?>

                        <?=gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?>
                        <?=gettext("Normally this is only useful if this server is a stratum 1 time server.");?>

                        <?=gettext("Enter Leap second configuration as text:");?>

                        <textarea name="leapsec" cols="65" rows="7"><?=$pconfig['leapsec'];?></textarea>

                        <?=gettext("Or");?>, <?=gettext("select a file to upload:");?>
                        <input type="file" name="leapfile"/>

                     <?=gettext("Advanced");?>

                      <div id="showadvbox" <?=!empty($pconfig['custom_options']) ? "style='display:none'" : ""; ?>>
                        <input type="button" class="btn btn-default btn-xs" id="show_advanced_ntpd" value="<?= html_safe(gettext('Advanced')) ?>" /> - <?=gettext("Show advanced option");?>

                      <div id="showadv" <?=empty($pconfig['custom_options']) ? "style='display:none'" : ""; ?>>
                        <?=gettext("Advanced");?>

                        <textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=$pconfig['custom_options'];?></textarea>

                        <?=gettext("This option will be removed in the future due to being insecure by nature. In the mean time only full administrators are allowed to change this setting.");?>

                        <?= gettext('Enter any additional options you would like to add to the network time configuration here, separated by a space or newline.') ?>

                    <input name="Submit" type="submit" class="btn btn-primary" value="<?=html_safe(gettext('Save'));?>" />

          </form>

<?php include("foot.inc"); ?>


text:
package org.apache.commons.math4.legacy.distribution;

import org.apache.commons.statistics.distribution.NormalDistribution;
import org.apache.commons.math4.legacy.linear.RealMatrix;
import org.apache.commons.rng.simple.RandomSource;
import org.apache.commons.math4.legacy.stat.correlation.Covariance;

import java.util.Random;

import org.junit.Assert;
import org.junit.Test;

/**
 * Test cases for {@link MultivariateNormalDistribution}.
 */
public class MultivariateNormalDistributionTest {
    /**
     * Test the ability of the distribution to report its mean value parameter.
     */
    @Test
    public void testGetMean() {
        final double[] mu = { -1.5, 2 };
        final double[][] sigma = { { 2, -1.1 },
                                   { -1.1, 2 } };
        final MultivariateNormalDistribution d = new MultivariateNormalDistribution(mu, sigma);

        final double[] m = d.getMeans();
        for (int i = 0; i < m.length; i++) {
            Assert.assertEquals(mu[i], m[i], 0);
        }
    }

    /**
     * Test the ability of the distribution to report its covariance matrix parameter.
     */
    @Test
    public void testGetCovarianceMatrix() {
        final double[] mu = { -1.5, 2 };
        final double[][] sigma = { { 2, -1.1 },
                                   { -1.1, 2 } };
        final MultivariateNormalDistribution d = new MultivariateNormalDistribution(mu, sigma);

        final RealMatrix s = d.getCovariances();
        final int dim = d.getDimension();
        for (int i = 0; i < dim; i++) {
            for (int j = 0; j < dim; j++) {
                Assert.assertEquals(sigma[i][j], s.getEntry(i, j), 0);
            }
        }
    }

    /**
     * Test the accuracy of sampling from the distribution.
     */
    @Test
    public void testSampling() {
        final double[] mu = { -1.5, 2 };
        final double[][] sigma = { { 2, -1.1 },
                                   { -1.1, 2 } };
        final MultivariateNormalDistribution d = new MultivariateNormalDistribution(mu, sigma);
        final MultivariateRealDistribution.Sampler sampler =
            d.createSampler(RandomSource.WELL_19937_C.create(50));

        final int n = 500000;
        final double[][] samples = AbstractMultivariateRealDistribution.sample(n, sampler);

        final int dim = d.getDimension();
        final double[] sampleMeans = new double[dim];

        for (int i = 0; i < samples.length; i++) {
            for (int j = 0; j < dim; j++) {
                sampleMeans[j] += samples[i][j];
            }
        }

        final double sampledValueTolerance = 1e-2;
        for (int j = 0; j < dim; j++) {
            sampleMeans[j] /= samples.length;
            Assert.assertEquals(mu[j], sampleMeans[j], sampledValueTolerance);
        }

        final double[][] sampleSigma = new Covariance(samples).getCovarianceMatrix().getData();
        for (int i = 0; i < dim; i++) {
            for (int j = 0; j < dim; j++) {
                Assert.assertEquals(sigma[i][j], sampleSigma[i][j], sampledValueTolerance);
            }
        }
    }

    /**
     * Test the accuracy of the distribution when calculating densities.
     */
    @Test
    public void testDensities() {
        final double[] mu = { -1.5, 2 };
        final double[][] sigma = { { 2, -1.1 },
                                   { -1.1, 2 } };
        final MultivariateNormalDistribution d = new MultivariateNormalDistribution(mu, sigma);

        final double[][] testValues = { { -1.5, 2 },
                                        { 4, 4 },
                                        { 1.5, -2 },
                                        { 0, 0 } };
        final double[] densities = new double[testValues.length];
        for (int i = 0; i < densities.length; i++) {
            densities[i] = d.density(testValues[i]);
        }

        // From dmvnorm function in R 2.15 CRAN package Mixtools v0.4.5
        final double[] correctDensities = { 0.09528357207691344,
                                            5.80932710124009e-09,
                                            0.001387448895173267,
                                            0.03309922090210541 };

        for (int i = 0; i < testValues.length; i++) {
            Assert.assertEquals(correctDensities[i], densities[i], 1e-16);
        }
    }

    /**
     * Test the accuracy of the distribution when calculating densities.
     */
    @Test
    public void testUnivariateDistribution() {
        final double[] mu = { -1.5 };
        final double[][] sigma = { { 1 } };

        final MultivariateNormalDistribution multi = new MultivariateNormalDistribution(mu, sigma);

        final NormalDistribution uni = NormalDistribution.of(mu[0], sigma[0][0]);
        final Random rng = new Random();
        final int numCases = 100;
        final double tol = Math.ulp(1d);
        for (int i = 0; i < numCases; i++) {
            final double v = rng.nextDouble() * 10 - 5;
            Assert.assertEquals(uni.density(v), multi.density(new double[] { v }), tol);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
API_ACCOUNT_NAME = 'LancasterUniversity'
# This is the gnip API endpoint
API_ENDPOINT = "https://historical.gnip.com/accounts/#{API_ACCOUNT_NAME}/"

# (Don't edit below here)
# =========================================================
# Support procedures
#

EXAMPLE_JOB = 'ewogICAgInB1Ymxpc2hlciIgICAgIDogInR3aXR0ZXIiLAogICAgInN0cmVhbVR5cGUiICAgIDogInRyYWNrIiwKICAgICJkYXRhRm9ybWF0IiAgICA6ICJhY3Rpdml0eS1zdHJlYW1zIiwKICAgICJmcm9tRGF0ZSIgICAgICA6ICIyMDE2MDExMzAwMDAiLAogICAgInRvRGF0ZSIgICAgICAgIDogIjIwMTYwMTEzMDEwMCIsCiAgICAidGl0bGUiICAgICAgICAgOiAiVGVzdCBqb2IiLAogICAgInJ1bGVzIiA6IFsKICAgICAgICB7IlZhbHVlIjogInRlYXBvdCJ9IAogICAgXQp9Cgo='

require 'json'
require 'net/http'
require 'uri'
require 'base64'
require 'openssl'
require 'zlib'
require 'resolv-replace.rb' # Use a ruby DNS resolver

# Make a HTTP request to a JSON API,
# returning the result as an object
def get_json(endpoint, username = nil, password = nil, endpoint_stub = API_ENDPOINT)
  uri = URI("#{endpoint_stub}#{endpoint}")

  res = ''
  Net::HTTP.start(uri.host, uri.port,
                  :use_ssl => uri.scheme == 'https',
                  :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
    req = Net::HTTP::Get.new(uri.request_uri)
    req['Content-Type'] = 'application/json'
    req.basic_auth(username, password) if username && password

    res = http.request(req)
  end

  JSON.parse(res.body.to_s)
end

# Make a HTTP PUT request
def put_json(endpoint, payload, username = nil, password = nil, endpoint_stub = API_ENDPOINT)
  uri = URI("#{endpoint_stub}#{endpoint}")

  res = ''
  Net::HTTP.start(uri.host, uri.port,
                  :use_ssl => uri.scheme == 'https',
                  :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
    req = Net::HTTP::Put.new(uri.request_uri)
    req['Content-Type'] = 'application/json'
    req.basic_auth(username, password) if username && password
    req.body = payload.to_json

    res = http.request(req)
  end

  JSON.parse(res.body.to_s)
end

# make a POST request
def post_json(endpoint, payload, username = nil, password = nil, endpoint_stub = API_ENDPOINT)
  uri = URI("#{endpoint_stub}#{endpoint}")

  res = ''
  Net::HTTP.start(uri.host, uri.port,
                  :use_ssl => uri.scheme == 'https',
                  :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
    req = Net::HTTP::Post.new(uri.request_uri)
    req.basic_auth(username, password) if username && password
    req['Content-Type'] = 'application/json'
    req.body = payload.to_json

    res = http.request(req)
  end

  JSON.parse(res.body.to_s)
end

# Retrieve a job from a UUID
def get_job(uuid, username, password)
  jobs = get_json('jobs.json', username, password)
  job = jobs['jobs'].find { |j| j['uuid'] == uuid }

  if job['jobURL']
    job.merge!(get_json(job['jobURL'], username, password, ''))
  end

  fail "Could not find job with UUID=#{uuid}" unless job
  job
end

# Turn a hash into a human-readable description
def summarise_job(job, indent = 0)
  s = StringIO.new
  s.puts "Gnip ID:    #{job['uuid'] || '(no ID yet)'}"
  s.puts "Title:      \"#{job['title']}\""
  s.puts "From #{job['fromDate']} to #{job['toDate']}"
  s.puts "Publisher:  #{job['publisher']}"
  s.puts "Rules:      #{job['rules']}" if job['rules']
  # s.puts "URL:        #{job['jobURL']}" if job['jobURL']
  s.puts "Requested:  by #{job['requestedBy']} at #{job['requestedAt']}" if job['requestedBy']
  s.puts "Status:     #{job['status']}: #{job['statusMessage']}" if job['status']
  s.puts "Completion: #{job['percentComplete']}%" if job['percentComplete']

  if job['quote']
    s.puts "Estimate:   #{job['quote']['estimatedActivityCount']} activities"
    s.puts "            #{job['quote']['estimatedDurationHours']} hours"
    s.puts "            #{job['quote']['estimatedFileSizeMb']} MB"
    s.puts "            expires at #{job['quote']['expiresAt']}"
  end
  if job['results']
    r = job['results']
    s.puts "Results:    #{r['activityCount']} activities"
    s.puts "            #{r['fileSizeMb']} MB (#{r['fileCount']} files)"
    s.puts "            Completed #{r['completedAt']}, expires #{r['expiresAt']}"
  end

  str = ''
  s.string.lines.each do |l|
    str += (' ' * indent) + l
  end

  str
end

# List jobs currently active for the
def list_jobs(username, password, uuid = nil)
  jobs = get_json('jobs.json', username, password)
  puts ""
  jobs["jobs"].each do |job|
    next if uuid && job['uuid'] != uuid
    if job['jobURL']
      job.merge!(get_json(job['jobURL'], username, password, ''))
    end
    puts summarise_job(job, 2)
    puts ""
  end
  del = jobs['delivered']
  puts "#{del['jobCount']} jobs, #{del['activityCount']} activities delivered since #{del['since']}"
end

# Post a new job
def new_job(job, username, password)
  puts "Requesting quote for job:"
  puts JSON.pretty_generate(job)
  puts ""
  res = post_json('jobs.json', job, username, password)
  if res['error'] || res['status'] == 'error'
    puts "Job rejected (error #{res['status']}): #{res['error'] || res['reason']}"
    return
  end

  puts "Gnip's job desc:"
  puts summarise_job(res)
end

# Accept a job
def start_job(uuid, username, password, accept = true)
  puts "#{accept ? 'Accept' : 'Reject'}ing job #{uuid}"

  # Retrieve job
  job = get_job(uuid, username, password)
  puts "Job info:"
  puts summarise_job(job, 2)
  puts ""

  if job['status'] == 'rejected'
    puts "Job has already been rejected."
    return
  end

  # Tell thingy to do start things.
  payload = {"status" => (accept ? "accept" : "reject")}
  res = put_json(job['jobURL'], payload, username, password, '')

  puts "Job status: #{res['status']}: #{res['statusMessage']}"
end

# Download stuff from a job
def download_job(uuid, out_fn, username, password)
  puts "Downloading data from job #{uuid} to #{out_fn}"
  fail "Output file exists!" if File.exist?(out_fn)

  job = get_job(uuid, username, password)
  puts "Job info:"
  puts summarise_job(job, 2)
  puts ""

  # Download stuff.
  puts "Retrieving index..."
  index = get_json(job['results']['dataURL'], username, password, '')

  num_files = index['urlCount']
  puts "Retrieving #{num_files} files..."

  i = 0
  File.open(out_fn, 'w') do |out|
    index['urlList'].each do |url|
      i += 1
      print " #{i} / #{num_files} (#{((i.to_f / num_files.to_f) * 100.0).round(2)}%)      \r"

      begin
        # RAW HTTP get request
        res = Net::HTTP.get(URI(url))
        zlibr = Zlib::GzipReader.new(StringIO.new(res.to_s))
        out.puts zlibr.read
      rescue StandardError => e
        print "\n*** ERR on file #{i}, URL: #{url}\n"
      end

    end # /url iteration
  end # /file handle

  print "Done\n"
end

# =========================================================
# Entry point
subcommand = ARGV.shift
if !subcommand || subcommand.downcase == 'help'

  warn "USAGE: #{$0} SUBCOMMAND [ARGS]"
  warn ""
  warn "Available subcommands:"
  warn "  list UNAME PASS [JOB_ID]: list all current jobs.  Optional filter"
  warn "  new JOB_FILE UNAME PASS: get a quote for a new job"
  warn "  accept JOB_ID UNAME PASS: accept (start) a quoted job"
  warn "  reject JOB_ID UNAME PASS: reject a quoted job"
  warn "  download JOB_ID OUT_FILE UNAME PASS: download files from a completed job to DIR"
  warn "  help : show this help"
  warn ""
  warn "To configure this script, edit the constants"
  warn "at the top of the file."
  warn ""
  warn "Job file format"
  warn "---------------"
  warn "Job files are JSON, following the gnip request"
  warn "format, e.g.: "
  warn Base64.decode64(EXAMPLE_JOB)

  exit(1)
end
subcommand = subcommand.to_sym

case subcommand
  when :list
    uname = ARGV.shift
    pass = ARGV.shift
    uuid = ARGV.shift
    list_jobs(uname, pass, uuid)
  when :new
    job = JSON.parse(File.read(ARGV.shift))
    uname = ARGV.shift
    pass = ARGV.shift
    new_job(job, uname, pass)
  when :accept
    uuid = ARGV.shift
    uname = ARGV.shift
    pass = ARGV.shift
    start_job(uuid, uname, pass, true)
  when :reject
    uuid = ARGV.shift
    uname = ARGV.shift
    pass = ARGV.shift
    start_job(uuid, uname, pass, false)
  when :download
    uuid = ARGV.shift
    out_fn = ARGV.shift
    uname = ARGV.shift
    pass = ARGV.shift
    download_job(uuid, out_fn, uname, pass)
  else
    warn "Unknown subcommand: '#{subcommand}'"
end


text:
let app: angular.IModule = angular.module('at', ['blockUI']);

app.config((blockUIConfig: angular.blockUI.BlockUIConfig) => {
    blockUIConfig.message = 'Please stop clicking!';
    blockUIConfig.delay = 100;
    blockUIConfig.template = '
{{ state | json }}
';
    blockUIConfig.templateUrl = 'my-templates/block-ui-overlay.html';
    blockUIConfig.autoBlock = false;
    blockUIConfig.resetOnException = false;
    blockUIConfig.autoInjectBodyBlock = false;
    blockUIConfig.cssClass = 'block-ui my-custom-class';
    blockUIConfig.blockBrowserNavigation = true;

    blockUIConfig.requestFilter = (config) => {
        if (config.url.match(/^\/api\/quote($|\/).*/)) {
            return false;
        }
        return true;
    };

    blockUIConfig.requestFilter = (config) => {
        if (config.url.match(/^\/api\/quote($|\/).*/)) {
            return 'Hello World';
        }
        return 'Loading...';
    };
});

app.controller('Ctrl', ($scope: ng.IScope, blockUI: angular.blockUI.BlockUIService) => {
    blockUI.start();
    blockUI.start('Hello');
    blockUI.start({});
    blockUI.start({message: 'World'});
    blockUI.start({delay: 100});

    blockUI.stop();
    blockUI.reset();
    blockUI.message("Hello Types");
    blockUI.done(() => {
        console.log("blockUI stopped");
    });
    const b: boolean = blockUI.isBlocking();

    const myBlockUI = blockUI.instances.get("myBlockUI");
    myBlockUI.start();
    myBlockUI.reset();
    myBlockUI.stop();
});


text:
layout: post
title: Sexy as hell busty black teen pinklipz riding
titleinfo: pornvd
desc: Watch Sexy as hell busty black teen pinklipz riding. Pornhub is the ultimate xxx porn and sex site.
---

Sexy as hell busty black teen pinklipz riding

Watch Sexy as hell busty black teen pinklipz riding. Pornhub is the ultimate xxx porn and sex site.


text:
.class Lcom/nineoldandroids/animation/i;
.super Lcom/nineoldandroids/animation/Keyframe;

# instance fields
.field d:I

# direct methods
.method constructor <init>(F)V
    .locals 1

    invoke-direct {p0}, Lcom/nineoldandroids/animation/Keyframe;-><init>()V

    iput p1, p0, Lcom/nineoldandroids/animation/i;->a:F

    sget-object v0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    iput-object v0, p0, Lcom/nineoldandroids/animation/i;->b:Ljava/lang/Class;

    return-void
.end method

.method constructor <init>(FI)V
    .locals 1

    invoke-direct {p0}, Lcom/nineoldandroids/animation/Keyframe;-><init>()V

    iput p1, p0, Lcom/nineoldandroids/animation/i;->a:F

    iput p2, p0, Lcom/nineoldandroids/animation/i;->d:I

    sget-object v0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    iput-object v0, p0, Lcom/nineoldandroids/animation/i;->b:Ljava/lang/Class;

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/nineoldandroids/animation/i;->c:Z

    return-void
.end method

# virtual methods
.method public a()I
    .locals 1

    iget v0, p0, Lcom/nineoldandroids/animation/i;->d:I

    return v0
.end method

.method public b()Lcom/nineoldandroids/animation/i;
    .locals 3

    new-instance v0, Lcom/nineoldandroids/animation/i;

    invoke-virtual {p0}, Lcom/nineoldandroids/animation/i;->getFraction()F

    move-result v1

    iget v2, p0, Lcom/nineoldandroids/animation/i;->d:I

    invoke-direct {v0, v1, v2}, Lcom/nineoldandroids/animation/i;-><init>(FI)V

    invoke-virtual {p0}, Lcom/nineoldandroids/animation/i;->getInterpolator()Landroid/view/animation/Interpolator;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/nineoldandroids/animation/i;->setInterpolator(Landroid/view/animation/Interpolator;)V

    return-object v0
.end method

.method public synthetic clone()Lcom/nineoldandroids/animation/Keyframe;
    .locals 1

    invoke-virtual {p0}, Lcom/nineoldandroids/animation/i;->b()Lcom/nineoldandroids/animation/i;

    move-result-object v0

    return-object v0
.end method

.method public getValue()Ljava/lang/Object;
    .locals 1

    iget v0, p0, Lcom/nineoldandroids/animation/i;->d:I

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method public setValue(Ljava/lang/Object;)V
    .locals 2

    if-eqz p1, :cond_0

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    const-class v1, Ljava/lang/Integer;

    if-ne v0, v1, :cond_0

    check-cast p1, Ljava/lang/Integer;

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

    move-result v0

    iput v0, p0, Lcom/nineoldandroids/animation/i;->d:I

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/nineoldandroids/animation/i;->c:Z

    :cond_0
    return-void
.end method


text:
[![Build Status](https://travis-ci.org/hmlb/user-bundle.svg)](https://travis-ci.org/hmlb/user-bundle)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d9c4ff88-b36e-4401-9b3c-44e2132fc6ed/big.png)](https://insight.sensiolabs.com/projects/d9c4ff88-b36e-4401-9b3c-44e2132fc6ed)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hmlb/user-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hmlb/user-bundle/?branch=master)

This bundle implements simple user registration, login and password change and recovery in Symfony2 projects.

It is meant to have the same features as the FOSUserBundle but with an opinionated domain driven design, using CQRS command bus architecture.

See [hmlb/DDD](https://github.com/hmlb/ddd) for details about domain driven design implementation and  [hmlb/DDD-bundle](https://github.com/hmlb/ddd-bundle) for its integration with symfony 2 and doctrine ORM/ODM.

This library is used in production applications but is still under development and is not yet clearly documented.

## License

hmlb/user-bundle is available under the MIT License.


text:
SYNONYM

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

#### Published in
Acta Mycologica, Warszawa 9(1): 119 (1973)

#### Original name
Misgomyces flexus T. Majewski, 1973

### Remarks
null


text:
@interface CardMatchingGame : NSObject

//Card Matching Game States
typedef enum {
    MATCH_NOT_CHECKED_YET,
    MATCH_SUCCESS,
    MATCH_FAILED,
} matchState;

//Designated Initializer
-(instancetype)initWithCardCount:(NSUInteger)count
                       usingDeck:(Deck *)deck;

//Instance Methods
-(Card *)cardAtIndex:(NSUInteger)index;
-(void)chooseCardAtIndex:(NSUInteger)index;

//Property
@property(nonatomic, readonly) NSInteger score;
@property (nonatomic) NSInteger gameMode;
@property (nonatomic) matchState currentMatchState;
@property (nonatomic, strong, readonly) NSMutableArray* cardsInvolved;

@end


text:
package net.jworkflow.primitives;

import java.util.Date;
import net.jworkflow.kernel.interfaces.StepBody;
import net.jworkflow.kernel.models.ExecutionResult;
import net.jworkflow.kernel.models.StepExecutionContext;

public class WaitFor implements StepBody {

    public String eventKey;
    public String eventName;
    public Date effectiveDate;
    public Object eventData;

    @Override
    public ExecutionResult run(StepExecutionContext context) {

        if (!context.getExecutionPointer().eventPublished) {
            return ExecutionResult.waitForEvent(eventName, eventKey, effectiveDate);
        }

        eventData = context.getExecutionPointer().eventData;
        return ExecutionResult.next();
    }
}


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

using System;
using System.Collections.Immutable;
using System.ComponentModel.Composition;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.Text;
using Microsoft.CodeAnalysis.ValueTracking;
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.LanguageServices.Setup;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Utilities;
using Roslyn.Utilities;
using IAsyncServiceProvider = Microsoft.VisualStudio.Shell.IAsyncServiceProvider;
using Task = System.Threading.Tasks.Task;

namespace Microsoft.VisualStudio.LanguageServices.ValueTracking
{
    [Export(typeof(ICommandHandler))]
    [ContentType(ContentTypeNames.RoslynContentType)]
    [Name(PredefinedCommandHandlerNames.ShowValueTracking)]
    internal class ValueTrackingCommandHandler : ICommandHandler<ValueTrackingEditorCommandArgs>
    {
        private readonly IAsyncServiceProvider _serviceProvider;
        private readonly IThreadingContext _threadingContext;
        private readonly ClassificationTypeMap _typeMap;
        private readonly IClassificationFormatMapService _classificationFormatMapService;
        private readonly IGlyphService _glyphService;
        private readonly IEditorFormatMapService _formatMapService;
        private readonly IGlobalOptionService _globalOptions;
        private readonly IUIThreadOperationExecutor _threadOperationExecutor;
        private readonly IAsynchronousOperationListener _listener;

        [ImportingConstructor]
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
        public ValueTrackingCommandHandler(
            SVsServiceProvider serviceProvider,
            IThreadingContext threadingContext,
            ClassificationTypeMap typeMap,
            IClassificationFormatMapService classificationFormatMapService,
            IGlyphService glyphService,
            IEditorFormatMapService formatMapService,
            IGlobalOptionService globalOptions,
            IAsynchronousOperationListenerProvider listenerProvider,
            IUIThreadOperationExecutor threadOperationExecutor)
        {
            _serviceProvider = (IAsyncServiceProvider)serviceProvider;
            _threadingContext = threadingContext;
            _typeMap = typeMap;
            _classificationFormatMapService = classificationFormatMapService;
            _glyphService = glyphService;
            _formatMapService = formatMapService;
            _globalOptions = globalOptions;
            _threadOperationExecutor = threadOperationExecutor;
            _listener = listenerProvider.GetListener(FeatureAttribute.ValueTracking);
        }

        public string DisplayName => "Go to value tracking";

        public CommandState GetCommandState(ValueTrackingEditorCommandArgs args)
            => CommandState.Available;

        public bool ExecuteCommand(ValueTrackingEditorCommandArgs args, CommandExecutionContext executionContext)
        {
            using var logger = Logger.LogBlock(FunctionId.ValueTracking_Command, CancellationToken.None, LogLevel.Information);

            var cancellationToken = executionContext.OperationContext.UserCancellationToken;
            var caretPosition = args.TextView.GetCaretPoint(args.SubjectBuffer);
            if (!caretPosition.HasValue)
            {
                return false;
            }

            var textSpan = new TextSpan(caretPosition.Value.Position, 0);
            var sourceTextContainer = args.SubjectBuffer.AsTextContainer();
            var document = sourceTextContainer.GetOpenDocumentInCurrentContext();
            if (document is null)
            {
                return false;
            }

            _threadingContext.JoinableTaskFactory.RunAsync(async () =>
                {
                    var service = document.Project.Solution.Workspace.Services.GetRequiredService<IValueTrackingService>();
                    var items = await service.TrackValueSourceAsync(textSpan, document, cancellationToken).ConfigureAwait(false);
                    if (items.Length == 0)
                    {
                        return;
                    }

                    await ShowToolWindowAsync(args.TextView, document, items, cancellationToken).ConfigureAwait(false);
                });

            return true;
        }

        private async Task ShowToolWindowAsync(ITextView textView, Document document, ImmutableArray<ValueTrackedItem> items, CancellationToken cancellationToken)
        {
            var toolWindow = await GetOrCreateToolWindowAsync(textView, cancellationToken).ConfigureAwait(false);
            if (toolWindow?.ViewModel is null)
            {
                return;
            }

            var classificationFormatMap = _classificationFormatMapService.GetClassificationFormatMap(textView);
            var solution = document.Project.Solution;
            var valueTrackingService = solution.Workspace.Services.GetRequiredService<IValueTrackingService>();
            var rootItemMap = items.GroupBy(i => i.Parent, resultSelector: (key, items) => (parent: key, children: items));

            using var _ = CodeAnalysis.PooledObjects.ArrayBuilder<TreeItemViewModel>.GetInstance(out var rootItems);

            foreach (var (parent, children) in rootItemMap)
            {
                if (parent is null)
                {
                    foreach (var child in children)
                    {
                        var root = await ValueTrackedTreeItemViewModel.CreateAsync(
                            solution, child, children: ImmutableArray<TreeItemViewModel>.Empty, toolWindow.ViewModel, _glyphService, valueTrackingService, _globalOptions, _threadingContext, _listener, _threadOperationExecutor, cancellationToken).ConfigureAwait(false);
                        rootItems.Add(root);
                    }
                }
                else
                {
                    using var _1 = CodeAnalysis.PooledObjects.ArrayBuilder<TreeItemViewModel>.GetInstance(out var childItems);
                    foreach (var child in children)
                    {
                        var childViewModel = await ValueTrackedTreeItemViewModel.CreateAsync(
                            solution, child, children: ImmutableArray<TreeItemViewModel>.Empty, toolWindow.ViewModel, _glyphService, valueTrackingService, _globalOptions, _threadingContext, _listener, _threadOperationExecutor, cancellationToken).ConfigureAwait(false);
                        childItems.Add(childViewModel);
                    }

                    var root = await ValueTrackedTreeItemViewModel.CreateAsync(
                        solution, parent, childItems.ToImmutable(), toolWindow.ViewModel, _glyphService, valueTrackingService, _globalOptions, _threadingContext, _listener, _threadOperationExecutor, cancellationToken).ConfigureAwait(false);
                    rootItems.Add(root);
                }
            }

            await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            toolWindow.ViewModel.Roots.Clear();
            foreach (var root in rootItems)
            {
                toolWindow.ViewModel.Roots.Add(root);
            }

            await ShowToolWindowAsync(cancellationToken).ConfigureAwait(true);
        }

        private async Task ShowToolWindowAsync(CancellationToken cancellationToken)
        {
            var roslynPackage = await RoslynPackage.GetOrLoadAsync(_threadingContext, _serviceProvider, cancellationToken).ConfigureAwait(false);
            Contract.ThrowIfNull(roslynPackage);

            await roslynPackage.ShowToolWindowAsync(
                    typeof(ValueTrackingToolWindow),
                    0,
                    true,
                    roslynPackage.DisposalToken).ConfigureAwait(false);
        }

        private async Task<ValueTrackingToolWindow?> GetOrCreateToolWindowAsync(ITextView textView, CancellationToken cancellationToken)
        {
            var roslynPackage = await RoslynPackage.GetOrLoadAsync(_threadingContext, _serviceProvider, cancellationToken).ConfigureAwait(false);
            if (roslynPackage is null)
            {
                return null;
            }

            await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            if (ValueTrackingToolWindow.Instance is null)
            {
                var factory = roslynPackage.GetAsyncToolWindowFactory(Guids.ValueTrackingToolWindowId);

                var viewModel = new ValueTrackingTreeViewModel(_classificationFormatMapService.GetClassificationFormatMap(textView), _typeMap, _formatMapService);

                factory.CreateToolWindow(Guids.ValueTrackingToolWindowId, 0, viewModel);
                await factory.InitializeToolWindowAsync(Guids.ValueTrackingToolWindowId, 0);

                // FindWindowPaneAsync creates an instance if it does not exist
                ValueTrackingToolWindow.Instance = (ValueTrackingToolWindow)await roslynPackage.FindWindowPaneAsync(
                    typeof(ValueTrackingToolWindow),
                    0,
                    true,
                    roslynPackage.DisposalToken).ConfigureAwait(false);
            }

            // This can happen if the tool window was initialized outside of this command handler. The ViewModel
            // still needs to be initialized but had no necessary context. Provide that context now in the command handler.
            if (ValueTrackingToolWindow.Instance.ViewModel is null)
            {
                ValueTrackingToolWindow.Instance.ViewModel = new ValueTrackingTreeViewModel(_classificationFormatMapService.GetClassificationFormatMap(textView), _typeMap, _formatMapService);
            }

            return ValueTrackingToolWindow.Instance;
        }
    }
}


text:
[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=PDF.co%20Web%20API%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=PDF.co%20Web%20API%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Explore Source Code Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://app.pdf.co/signup?utm_source=github-readme)
[Security](https://pdf.co/security)
[Explore Web API Documentation](https://apidocs.pdf.co?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=NEwNs2b9YN8](https://www.youtube.com/watch?v=NEwNs2b9YN8)

<!-- code block begin -->

##### **Tutorial.txt:**

```
1. For this demo we already have input source configured. It can be anything based on requirement. We have selected PDF.co as input app and selected "PDF Filler" as preferred event. This "PDF Filler" event can add multiple text or images PDF document.
[Screenshot_1.png]

2. As we can see in screenshot, we have provided various PDF.co configuration options. In "Direct Link to Source PDF", we have provided input file which will be processed. In "Text Objects" we have provided input text in pre-defined format such as X location, Y location, page index, input text, font size, font family, etc. After that we've provided output file name.
[Screenshot_2.png]

3. Now we're ready to send input request to PDF.co. We're shown input request data here. If it looks good then we'll proceed with "TEST & REVIEW".
[Screenshot_3.png]"

4. Once response received from PDF.co, we can see output contains URL which contains processed output file.
[Screenshot_4.png]

5. This is how output file looks like. In top-left corner it contains text "Hello World!" like we've specified in input request.
[Screenshot_5.png]

6. Let's proceed with saving resulting file to Dropbox. Here we've selected input app as "Dropbox" and event as "Upload File".
[Screenshot_6.png]

7. With Dropbox account is added, it's time to configure upload details. In field for "Folder", we've specified output Dropbox folder name. In "File" field, we've specified output file URL from PDF.co response. Then we've provided input fields like whether overwrite enabled, output file name and lastly extension of output file.
[Screenshot_7.png]

8. We're ready send request for save file to Dropbox. We're presented with request data before sending to Dropbox API. If it looks good then we can proceed with "TEST & REVIEW".
[Screenshot_8.png]

9. Here's how successful Dropbox file save request's response data looks like.
[Screenshot_9.png]

10. In Dropbox output folder we can find new output file successfully saved.
[Screenshot_10.png]
```

<!-- code block end -->


text:
function [array] = interpolatePos(array, interDistThreshold)

% The script will linearly interpolate the flies' position between points
% as long as the fly doesn't move that much (interDistThreshold) between
% frames.

%iterate through datapoints for all four position columns
interpolationNumber = 0;
for dim = 2:2:size(array,2)-1
    numPoint = 1;
    while numPoint < size(array,1)
        point = array(numPoint,dim);
        % If it encounters an NaN, find the last point that was not an
        % NaN and the next point that is not an NaN.
        if ((isnan(point) == true) && (numPoint ~= 1))
            lastIdx = numPoint - 1;
            lastPoint = array(lastIdx,dim:(dim+1));
            nextIdx = find(~isnan(array(numPoint:size(array,1),dim)) ,1,'first') + numPoint - 1;
            if isempty(nextIdx)
                break
            end
            nextPoint = array(nextIdx,dim:(dim+1));
            diff = nextIdx - numPoint;

            %check to make sure that the values aren't too far apart to
            %interpolate, then replace bad values!
            interPDist = pdist2(lastPoint,nextPoint);
            if interPDist <= interDistThreshold
                for badFrameNum =  1:diff
                    array((lastIdx + badFrameNum),dim:(dim+1)) = ...
                        lastPoint + ( (nextPoint - lastPoint) * badFrameNum/(diff+1));
                end
                interpolationNumber = interpolationNumber + diff;
            end

            % Keep track of how many frames we've interpolated and skip
            % to next non-NaN value.
            numPoint = nextIdx;

        elseif ((isnan(point) == true) && (numPoint == 1))
            numPoint = find(~isnan(array(:,dim)), 1,'first');
        else
            numPoint = numPoint + 1;
        end
    end
end
disp(strcat(num2str(interpolationNumber), {' '}, 'points recovered through interpolation.'))

return;


text:
@interface RKRequest (Internals)
- (BOOL)prepareURLRequest;
- (void)didFailLoadWithError:(NSError *)error;
- (void)finalizeLoad:(BOOL)successful;
@end


text:
tahiti-dropdown-select {
    display: block;
    margin-bottom: 22px;
    margin-right: 11px;
}

.tahiti-dropdown-select__container {
    padding: 0 11px;
}

.tahiti-dropdown-select__content {
    display: block;
    position: relative;
    width: 100%;
    height: 33px;
    padding: 0;
}

.tahiti-dropdown-select__cover {
    display: block;
    position: relative;
    width: 99px;
    line-height: 31px;
    padding: 0 11px;
    border: 1px solid black;
}

.tahiti-dropdown-select__cover:after {
    display: block;
    content: '▼';
    text-align: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 31px;
    height: 31px;
    background: #961326;
    color: white;
}

.tahiti-dropdown-select__control {
    display: block;
    position: absolute;
    width: 97px;
    left: 1px;
    top: 0;
    opacity: 0;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.tahiti-dropdown-select__cover,
.tahiti-dropdown-select__control {
    height: 33px;
}

.tahiti-dropdown-select__cover--large {
    width: 199px;
}

.tahiti-dropdown-select__control--large {
    width: 197px;
}

@media only screen and (max-width: 767px) {

    .tahiti-dropdown-select__control,
    .tahiti-dropdown-select__control--large {
        font-size: 50px;
    }

}


text:
<?php

class Google_Service_DLP_GooglePrivacyDlpV2beta1BigQueryOptions extends Google_Collection
{
  protected $collection_key = 'identifyingFields';
  protected $identifyingFieldsType = 'Google_Service_DLP_GooglePrivacyDlpV2beta1FieldId';
  protected $identifyingFieldsDataType = 'array';
  protected $tableReferenceType = 'Google_Service_DLP_GooglePrivacyDlpV2beta1BigQueryTable';
  protected $tableReferenceDataType = '';

  /**
   * @param Google_Service_DLP_GooglePrivacyDlpV2beta1FieldId
   */
  public function setIdentifyingFields($identifyingFields)
  {
    $this->identifyingFields = $identifyingFields;
  }
  /**
   * @return Google_Service_DLP_GooglePrivacyDlpV2beta1FieldId
   */
  public function getIdentifyingFields()
  {
    return $this->identifyingFields;
  }
  /**
   * @param Google_Service_DLP_GooglePrivacyDlpV2beta1BigQueryTable
   */
  public function setTableReference(Google_Service_DLP_GooglePrivacyDlpV2beta1BigQueryTable $tableReference)
  {
    $this->tableReference = $tableReference;
  }
  /**
   * @return Google_Service_DLP_GooglePrivacyDlpV2beta1BigQueryTable
   */
  public function getTableReference()
  {
    return $this->tableReference;
  }
}


text:
package org.paolomoz.zehnkampf.utils;

import junit.framework.TestCase;

public class TestServerArguments extends TestCase {

	String[] args1 = { "7070", "3", "/some/path" };
	String[] args2 = { "7070", "xx", "/some/path" };
	String[] args3 = { "yyyy", "3", "/some/path" };
	String[] args4 = { "7070", "3" };
	ServerArguments serverArgs;
	int port;
	int tpSize;
	String docRootPath;

	public void testGetValidArgumentNumber() throws Exception {
		// Test against args1: regular arguments
		serverArgs = new ServerArguments(args1);
		port = serverArgs.getPort();
		assertEquals(7070, port);
		tpSize = serverArgs.getTpSize();
		assertEquals(3, tpSize);
		docRootPath = serverArgs.getDocRootPath();
		assertEquals("/some/path", docRootPath);
	}

	public void testInvalidThreadPoolSizeNumber() throws Exception {
		// test against args2: invalid thread pool size number
		serverArgs = new ServerArguments(args2);
		port = serverArgs.getPort();
		assertEquals(7070, port);
		try {
			tpSize = serverArgs.getTpSize();
			assertEquals(10, tpSize);
		} catch (Exception e) {
		}
		docRootPath = serverArgs.getDocRootPath();
		assertEquals("/some/path", docRootPath);
	}

	public void testInvalidPortNumber() throws Exception {
		// test against args3: invalid port number
		serverArgs = new ServerArguments(args3);
		try {
			port = serverArgs.getPort();
			assertEquals(8000, port);
		} catch (Exception e) {
		}
		tpSize = serverArgs.getTpSize();
		assertEquals(3, tpSize);
		docRootPath = serverArgs.getDocRootPath();
		assertEquals("/some/path", docRootPath);
	}

	public void testInvalidArgumentsNumber() throws Exception {
		// test against args4: invalid number of arguments
		serverArgs = new ServerArguments(args4);
		port = serverArgs.getPort();
		assertEquals(8000, port);
		tpSize = serverArgs.getTpSize();
		assertEquals(10, tpSize);
		docRootPath = serverArgs.getDocRootPath();
		assertEquals("/var/www/", docRootPath);
	}

}


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

#include "ray/gcs/gcs_server/gcs_object_manager.h"

#include "ray/gcs/pb_util.h"

namespace ray {

namespace gcs {

void GcsObjectManager::HandleGetObjectLocations(
    const rpc::GetObjectLocationsRequest &request, rpc::GetObjectLocationsReply *reply,
    rpc::SendReplyCallback send_reply_callback) {
  ObjectID object_id = ObjectID::FromBinary(request.object_id());
  RAY_LOG(DEBUG) << "Getting object locations, job id = " << object_id.TaskId().JobId()
                 << ", object id = " << object_id;
  auto object_locations = GetObjectLocations(object_id);
  for (auto &node_id : object_locations) {
    rpc::ObjectTableData object_table_data;
    object_table_data.set_manager(node_id.Binary());
    reply->add_object_table_data_list()->CopyFrom(object_table_data);
  }
  RAY_LOG(DEBUG) << "Finished getting object locations, job id = "
                 << object_id.TaskId().JobId() << ", object id = " << object_id;
  GCS_RPC_SEND_REPLY(send_reply_callback, reply, Status::OK());
}

void GcsObjectManager::HandleGetAllObjectLocations(
    const rpc::GetAllObjectLocationsRequest &request,
    rpc::GetAllObjectLocationsReply *reply, rpc::SendReplyCallback send_reply_callback) {
  RAY_LOG(DEBUG) << "Getting all object locations.";
  absl::MutexLock lock(&mutex_);
  for (auto &item : object_to_locations_) {
    rpc::ObjectLocationInfo object_location_info;
    object_location_info.set_object_id(item.first.Binary());
    for (auto &node_id : item.second) {
      rpc::ObjectTableData object_table_data;
      object_table_data.set_manager(node_id.Binary());
      object_location_info.add_locations()->CopyFrom(object_table_data);
    }
    reply->add_object_location_info_list()->CopyFrom(object_location_info);
  }
  RAY_LOG(DEBUG) << "Finished getting all object locations.";
  GCS_RPC_SEND_REPLY(send_reply_callback, reply, Status::OK());
}

void GcsObjectManager::HandleAddObjectLocation(
    const rpc::AddObjectLocationRequest &request, rpc::AddObjectLocationReply *reply,
    rpc::SendReplyCallback send_reply_callback) {
  ObjectID object_id = ObjectID::FromBinary(request.object_id());
  ClientID node_id = ClientID::FromBinary(request.node_id());
  RAY_LOG(DEBUG) << "Adding object location, job id = " << object_id.TaskId().JobId()
                 << ", object id = " << object_id << ", node id = " << node_id;
  AddObjectLocationInCache(object_id, node_id);

  auto on_done = [this, object_id, node_id, reply,
                  send_reply_callback](const Status &status) {
    if (status.ok()) {
      RAY_CHECK_OK(gcs_pub_sub_->Publish(
          OBJECT_CHANNEL, object_id.Hex(),
          gcs::CreateObjectLocationChange(node_id, true)->SerializeAsString(), nullptr));
      RAY_LOG(DEBUG) << "Finished adding object location, job id = "
                     << object_id.TaskId().JobId() << ", object id = " << object_id
                     << ", node id = " << node_id << ", task id = " << object_id.TaskId();
    } else {
      RAY_LOG(ERROR) << "Failed to add object location: " << status.ToString()
                     << ", job id = " << object_id.TaskId().JobId()
                     << ", object id = " << object_id << ", node id = " << node_id;
    }
    // We should only reply after the update is written to storage.
    // So, if GCS server crashes before writing storage, GCS client will retry this
    // request.
    GCS_RPC_SEND_REPLY(send_reply_callback, reply, status);
  };

  absl::MutexLock lock(&mutex_);
  auto object_location_set =
      GetObjectLocationSet(object_id, /* create_if_not_exist */ false);
  auto object_table_data_list = GenObjectTableDataList(*object_location_set);
  Status status =
      gcs_table_storage_->ObjectTable().Put(object_id, *object_table_data_list, on_done);
  if (!status.ok()) {
    on_done(status);
  }
}

void GcsObjectManager::HandleRemoveObjectLocation(
    const rpc::RemoveObjectLocationRequest &request,
    rpc::RemoveObjectLocationReply *reply, rpc::SendReplyCallback send_reply_callback) {
  ObjectID object_id = ObjectID::FromBinary(request.object_id());
  ClientID node_id = ClientID::FromBinary(request.node_id());
  RAY_LOG(DEBUG) << "Removing object location, job id = " << object_id.TaskId().JobId()
                 << ", object id = " << object_id << ", node id = " << node_id;
  RemoveObjectLocationInCache(object_id, node_id);

  auto on_done = [this, object_id, node_id, reply,
                  send_reply_callback](const Status &status) {
    if (status.ok()) {
      RAY_CHECK_OK(gcs_pub_sub_->Publish(
          OBJECT_CHANNEL, object_id.Hex(),
          gcs::CreateObjectLocationChange(node_id, false)->SerializeAsString(), nullptr));
      RAY_LOG(DEBUG) << "Finished removing object location, job id = "
                     << object_id.TaskId().JobId() << ", object id = " << object_id
                     << ", node id = " << node_id;
    } else {
      RAY_LOG(ERROR) << "Failed to remove object location: " << status.ToString()
                     << ", job id = " << object_id.TaskId().JobId()
                     << ", object id = " << object_id << ", node id = " << node_id;
    }
    // We should only reply after the update is written to storage.
    // So, if GCS server crashes before writing storage, GCS client will retry this
    // request.
    GCS_RPC_SEND_REPLY(send_reply_callback, reply, status);
  };

  absl::MutexLock lock(&mutex_);
  auto object_location_set =
      GetObjectLocationSet(object_id, /* create_if_not_exist */ false);
  Status status;
  if (object_location_set != nullptr) {
    auto object_table_data_list = GenObjectTableDataList(*object_location_set);
    status = gcs_table_storage_->ObjectTable().Put(object_id, *object_table_data_list,
                                                   on_done);
  } else {
    status = gcs_table_storage_->ObjectTable().Delete(object_id, on_done);
  }

  if (!status.ok()) {
    on_done(status);
  }
}

void GcsObjectManager::AddObjectsLocation(
    const ClientID &node_id, const absl::flat_hash_set<ObjectID> &object_ids) {
  // TODO(micafan) Optimize the lock when necessary.
  // Maybe use read/write lock. Or reduce the granularity of the lock.
  absl::MutexLock lock(&mutex_);

  auto *objects_on_node = GetObjectSetByNode(node_id, /* create_if_not_exist */ true);
  objects_on_node->insert(object_ids.begin(), object_ids.end());

  for (const auto &object_id : object_ids) {
    auto *object_locations =
        GetObjectLocationSet(object_id, /* create_if_not_exist */ true);
    object_locations->emplace(node_id);
  }
}

void GcsObjectManager::AddObjectLocationInCache(const ObjectID &object_id,
                                                const ClientID &node_id) {
  absl::MutexLock lock(&mutex_);

  auto *objects_on_node = GetObjectSetByNode(node_id, /* create_if_not_exist */ true);
  objects_on_node->emplace(object_id);

  auto *object_locations =
      GetObjectLocationSet(object_id, /* create_if_not_exist */ true);
  object_locations->emplace(node_id);
}

absl::flat_hash_set<ClientID> GcsObjectManager::GetObjectLocations(
    const ObjectID &object_id) {
  absl::MutexLock lock(&mutex_);

  auto *object_locations = GetObjectLocationSet(object_id);
  if (object_locations) {
    return *object_locations;
  }
  return absl::flat_hash_set<ClientID>{};
}

void GcsObjectManager::OnNodeRemoved(const ClientID &node_id) {
  absl::MutexLock lock(&mutex_);

  ObjectSet objects_on_node;
  auto it = node_to_objects_.find(node_id);
  if (it != node_to_objects_.end()) {
    objects_on_node.swap(it->second);
    node_to_objects_.erase(it);
  }

  if (objects_on_node.empty()) {
    return;
  }

  for (const auto &object_id : objects_on_node) {
    auto *object_locations = GetObjectLocationSet(object_id);
    if (object_locations) {
      object_locations->erase(node_id);
      if (object_locations->empty()) {
        object_to_locations_.erase(object_id);
      }
    }
  }
}

void GcsObjectManager::RemoveObjectLocationInCache(const ObjectID &object_id,
                                                   const ClientID &node_id) {
  absl::MutexLock lock(&mutex_);

  auto *object_locations = GetObjectLocationSet(object_id);
  if (object_locations) {
    object_locations->erase(node_id);
    if (object_locations->empty()) {
      object_to_locations_.erase(object_id);
    }
  }

  auto *objects_on_node = GetObjectSetByNode(node_id);
  if (objects_on_node) {
    objects_on_node->erase(object_id);
    if (objects_on_node->empty()) {
      node_to_objects_.erase(node_id);
    }
  }
}

GcsObjectManager::LocationSet *GcsObjectManager::GetObjectLocationSet(
    const ObjectID &object_id, bool create_if_not_exist) {
  LocationSet *object_locations = nullptr;

  auto it = object_to_locations_.find(object_id);
  if (it != object_to_locations_.end()) {
    object_locations = &it->second;
  } else if (create_if_not_exist) {
    auto ret = object_to_locations_.emplace(std::make_pair(object_id, LocationSet{}));
    RAY_CHECK(ret.second);
    object_locations = &(ret.first->second);
  }

  return object_locations;
}

GcsObjectManager::ObjectSet *GcsObjectManager::GetObjectSetByNode(
    const ClientID &node_id, bool create_if_not_exist) {
  ObjectSet *objects_on_node = nullptr;

  auto it = node_to_objects_.find(node_id);
  if (it != node_to_objects_.end()) {
    objects_on_node = &it->second;
  } else if (create_if_not_exist) {
    auto ret = node_to_objects_.emplace(std::make_pair(node_id, ObjectSet{}));
    RAY_CHECK(ret.second);
    objects_on_node = &(ret.first->second);
  }
  return objects_on_node;
}

std::shared_ptr<ObjectTableDataList> GcsObjectManager::GenObjectTableDataList(
    const GcsObjectManager::LocationSet &location_set) const {
  auto object_table_data_list = std::make_shared<ObjectTableDataList>();
  for (auto &node_id : location_set) {
    object_table_data_list->add_items()->set_manager(node_id.Binary());
  }
  return object_table_data_list;
}

void GcsObjectManager::LoadInitialData(const EmptyCallback &done) {
  RAY_LOG(INFO) << "Loading initial data.";
  auto callback = [this, done](
                      const std::unordered_map<ObjectID, ObjectTableDataList> &result) {
    absl::flat_hash_map<ClientID, ObjectSet> node_to_objects;
    for (auto &item : result) {
      auto object_list = item.second;
      for (int index = 0; index < object_list.items_size(); ++index) {
        node_to_objects[ClientID::FromBinary(object_list.items(index).manager())].insert(
            item.first);
      }
    }

    for (auto &item : node_to_objects) {
      AddObjectsLocation(item.first, item.second);
    }
    RAY_LOG(INFO) << "Finished loading initial data.";
    done();
  };
  RAY_CHECK_OK(gcs_table_storage_->ObjectTable().GetAll(callback));
}

}  // namespace gcs

}  // namespace ray


text:
pdir_t init_page_directory ALIGN(PAGE_SIZE);
ptab_t kptab[KERNEL_NUM_TABLES] ALIGN(PAGE_SIZE);

//page which will next be mapped to kernel addr space on alloc
static uint32_t kernel_next_page;
static DEFINE_SPINLOCK(map_lock);

static inline phys_addr_t do_user_get_page(thread_t *task, uint32_t diridx, uint32_t tabidx) {
    ptab_t *tab = dir_get_tab(task->arch.dir, diridx);
    return tab ? tabentry_get_phys(tab, tabidx) : 0;
}

page_t * user_get_page(thread_t *task, void *virt) {
    phys_addr_t phys = do_user_get_page(task, addr_to_diridx(virt), addr_to_tabidx(virt));
    return phys ? phys_to_page(phys) : NULL;
}

static inline void do_user_map_page(thread_t *task, uint32_t diridx, uint32_t tabidx, phys_addr_t phys) {
    pdir_t *dir = task->arch.dir;
    ptab_t *tab = dir_get_tab(dir, diridx);
    if(!tab) {
        page_t *table_page = alloc_page(ALLOC_ZERO);
        phys_addr_t tab_phys = page_to_phys(table_page);

        direntry_set(dir, diridx, tab_phys, MMUFLAG_PRESENT | MMUFLAG_WRITABLE | MMUFLAG_USER);
        tab = page_to_virt(table_page);
    }

    tabentry_set(tab, tabidx, phys, MMUFLAG_PRESENT | MMUFLAG_WRITABLE | MMUFLAG_USER);
}

void user_map_page(thread_t *task, void *virt, phys_addr_t phys) {
    do_user_map_page(task, addr_to_diridx(virt), addr_to_tabidx(virt), phys);

    if(task == current) {
        invlpg(virt);
    }
}

void user_map_pages(thread_t *task, void *virt, phys_addr_t phys, uint32_t num) {
    for(uint32_t i = 0; i < num; i++) {
        uint32_t off = i * PAGE_SIZE;
        user_map_page(task, virt + off, phys + off);
    }
}

page_t * user_alloc_page(thread_t *task, void *virt, uint32_t flags) {
    page_t *page = alloc_page(flags);
    user_map_page(current, virt, page_to_phys(page));
    return page;
}

void copy_mem(thread_t *to, thread_t *from) {
    for (uint32_t i = 0; i < NUM_ENTRIES - KERNEL_NUM_TABLES; i++) {
        ptab_t *tab = dir_get_tab(from->arch.dir, i);
        if(tab) {
            for (uint32_t j = 0; j < NUM_ENTRIES; j++) {
                if(tabentry_get_flags(tab, j) & MMUFLAG_PRESENT) {
                    void *dst = kmalloc(PAGE_SIZE);
                    void *src = phys_to_virt(tabentry_get_phys(tab, j));
                    memcpy(dst, src, PAGE_SIZE);

                    do_user_map_page(to, i, j, virt_to_phys(dst));
                }
            }
        }
    }
}

static inline void map_kernel_page(uint32_t page_idx, uint32_t phys) {
    uint32_t diridx = page_idx / NUM_ENTRIES;
    uint32_t tabidx = page_idx % NUM_ENTRIES;
    tabentry_set(&kptab[diridx], tabidx, phys, MMUFLAG_WRITABLE | MMUFLAG_PRESENT);
}

static inline void * get_next_virt(uint32_t phys) {
    return (void *) ((kernel_next_page * PAGE_SIZE) + VIRTUAL_BASE + paddr_to_pageoff(phys));
}

static inline void do_map_page(phys_addr_t phys) {
    void *virt = get_next_virt(0);
    kernel_next_page++;
    uint32_t idx = addr_to_diridx(virt) - addr_to_diridx((void *) VIRTUAL_BASE);
    tabentry_set(&kptab[idx], addr_to_tabidx(virt), phys, MMUFLAG_WRITABLE | MMUFLAG_PRESENT);
    invlpg(virt);
}

void * map_page(phys_addr_t phys) {
    return map_pages(phys, 1);
}

void * map_pages(phys_addr_t phys, uint32_t pages) {
    uint32_t flags;
    spin_lock_irqsave(&map_lock, &flags);

    void *virt = get_next_virt(phys);
    for(uint32_t i = 0; i < pages; i++) {
        do_map_page(phys + (PAGE_SIZE * i));
    }

    spin_unlock_irqstore(&map_lock, flags);

    return virt;
}

static inline phys_addr_t kvirt_to_phys(void *kaddr) {
    BUG_ON(((uint32_t) kaddr) < VIRTUAL_BASE);
    return ((uint32_t) kaddr) - VIRTUAL_BASE;
}

void build_page_dir(pdir_t *dir) {
    for (uint32_t i = 0; i < NUM_ENTRIES - KERNEL_NUM_TABLES; i++) {
        direntry_clear(dir, i);
    }

    uint32_t baseoff = VIRTUAL_BASE / PAGE_SIZE / NUM_ENTRIES;
    for (uint32_t i = 0; i < KERNEL_NUM_TABLES; i++) {
        phys_addr_t phys = kvirt_to_phys(&kptab[i]);
        direntry_set(dir, i + baseoff, phys, MMUFLAG_PRESENT | MMUFLAG_WRITABLE);
    }
}

void * __init mmu_init(phys_addr_t kernel_end, phys_addr_t malloc_start) {
    kernel_next_page = 0;

    //Map 0xC0000000->0x00000000, 0xC0001000->0x00001000, etc. over the whole
    //kernel image. Then map the page_t struct array just after the kernel
    //image.
    map_pages(0, DIV_UP(kernel_end, PAGE_SIZE));
    void *pages = map_pages(malloc_start, MALLOC_NUM_PAGES);

    //Build the temporary page directory for all processors.
    build_page_dir(&init_page_directory);

    //Here we go!
    loadcr3(kvirt_to_phys(&init_page_directory));

    //Immediately fix the pointers to the console and symbol tables.
    bios_early_remap();
    console_early_remap();
    debug_remap();

    return pages;
}


text:
namespace Painting {

class Layer : public QGraphicsPixmapItem
{
public:
    Layer(const QSize &size,
          const QColor &fillColor,
          QGraphicsItem *parent = nullptr);

private:
    QPixmap mPixmap;
};

} // namespace Painting

#endif // PAINTING_LAYER_H


text:
package com.microsoft.graph.http;

import java.io.IOException;
import java.util.Objects;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;

import javax.annotation.Nonnull;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

/**
 * Wraps the HTTP execution in a future, not public by intention
 */
class CoreHttpCallbackFutureWrapper implements Callback {
    final CompletableFuture<Response> future = new CompletableFuture<>();
    public CoreHttpCallbackFutureWrapper(@Nonnull final Call call) {
        Objects.requireNonNull(call);
        future.whenComplete((r, ex) -> {
            if (ex != null && (ex instanceof InterruptedException || ex instanceof CancellationException)) {
                call.cancel();
            }
        });
    }
	@Override
	public void onFailure(Call arg0, IOException arg1) {
		future.completeExceptionally(arg1);
	}

	@Override
	public void onResponse(Call arg0, Response arg1) throws IOException {
		future.complete(arg1);
	}

}


text:
package org.apache.tez.dag.app.dag.impl;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;

import java.util.LinkedList;
import java.util.List;

import org.apache.tez.dag.api.InputDescriptor;
import org.apache.tez.dag.api.VertexManagerPluginContext;
import org.apache.tez.runtime.api.Event;
import org.apache.tez.runtime.api.events.InputConfigureVertexTasksEvent;
import org.apache.tez.runtime.api.events.InputDataInformationEvent;
import org.junit.Test;

public class TestRootInputVertexManager {

  @Test(timeout = 5000)
  public void testEventsFromMultipleInputs() {

    VertexManagerPluginContext context = mock(VertexManagerPluginContext.class);
    doReturn("vertex1").when(context).getVertexName();
    doReturn(1).when(context).getVertexNumTasks(eq("vertex1"));

    RootInputVertexManager rootInputVertexManager = new RootInputVertexManager(context);
    rootInputVertexManager.initialize();

    InputDescriptor id1 = mock(InputDescriptor.class);
    List<Event> events1 = new LinkedList<Event>();
    InputDataInformationEvent diEvent11 = InputDataInformationEvent.createWithSerializedPayload(0,
        null);
    events1.add(diEvent11);
    rootInputVertexManager.onRootVertexInitialized("input1", id1, events1);
    // All good so far, single input only.

    InputDescriptor id2 = mock(InputDescriptor.class);
    List<Event> events2 = new LinkedList<Event>();
    InputDataInformationEvent diEvent21 = InputDataInformationEvent.createWithSerializedPayload(0,
        null);
    events2.add(diEvent21);
    try {
      // Should fail due to second input
      rootInputVertexManager.onRootVertexInitialized("input2", id2, events2);
      fail("Expecting failure in case of multiple inputs attempting to send events");
    } catch (IllegalStateException e) {
      assertTrue(e.getMessage().startsWith(
          "RootInputVertexManager cannot configure multiple inputs. Use a custom VertexManager"));
    }
  }

  @Test(timeout = 5000)
  public void testConfigureFromMultipleInputs() {

    VertexManagerPluginContext context = mock(VertexManagerPluginContext.class);
    doReturn("vertex1").when(context).getVertexName();
    doReturn(-1).when(context).getVertexNumTasks(eq("vertex1"));

    RootInputVertexManager rootInputVertexManager = new RootInputVertexManager(context);
    rootInputVertexManager.initialize();

    InputDescriptor id1 = mock(InputDescriptor.class);
    List<Event> events1 = new LinkedList<Event>();
    InputConfigureVertexTasksEvent diEvent11 = InputConfigureVertexTasksEvent.create(1, null,
        null);
    events1.add(diEvent11);
    rootInputVertexManager.onRootVertexInitialized("input1", id1, events1);
    // All good so far, single input only.

    InputDescriptor id2 = mock(InputDescriptor.class);
    List<Event> events2 = new LinkedList<Event>();
    InputConfigureVertexTasksEvent diEvent21 = InputConfigureVertexTasksEvent.create(1, null,
        null);
    events2.add(diEvent21);
    try {
      // Should fail due to second input
      rootInputVertexManager.onRootVertexInitialized("input2", id2, events2);
      fail("Expecting failure in case of multiple inputs attempting to send events");
    } catch (IllegalStateException e) {
      assertTrue(e.getMessage().startsWith(
          "RootInputVertexManager cannot configure multiple inputs. Use a custom VertexManager"));
    }
  }

}


text:
<!DOCTYPE html>

<title>PySWMM Input</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<link rel="stylesheet" href="http://openlayers.org/en/v3.8.2/css/ol.css" type="text/css">

    <form class="form-inline">
      <button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off" id="type">
  Enable Drawing
  </button>
    </form>


text:
package godwarf

import (
	"bytes"
	"compress/zlib"
	"debug/elf"
	"debug/macho"
	"debug/pe"
	"encoding/binary"
	"fmt"
	"io"
)

// GetDebugSectionElf returns the data contents of the specified debug
// section, decompressing it if it is compressed.
// For example GetDebugSectionElf("line") will return the contents of
// .debug_line, if .debug_line doesn't exist it will try to return the
// decompressed contents of .zdebug_line.
func GetDebugSectionElf(f *elf.File, name string) ([]byte, error) {
	sec := f.Section(".debug_" + name)
	if sec != nil {
		return sec.Data()
	}
	sec = f.Section(".zdebug_" + name)
	if sec == nil {
		return nil, fmt.Errorf("could not find .debug_%s section", name)
	}
	b, err := sec.Data()
	if err != nil {
		return nil, err
	}
	return decompressMaybe(b)
}

// GetDebugSectionPE returns the data contents of the specified debug
// section, decompressing it if it is compressed.
// For example GetDebugSectionPE("line") will return the contents of
// .debug_line, if .debug_line doesn't exist it will try to return the
// decompressed contents of .zdebug_line.
func GetDebugSectionPE(f *pe.File, name string) ([]byte, error) {
	sec := f.Section(".debug_" + name)
	if sec != nil {
		return peSectionData(sec)
	}
	sec = f.Section(".zdebug_" + name)
	if sec == nil {
		return nil, fmt.Errorf("could not find .debug_%s section", name)
	}
	b, err := peSectionData(sec)
	if err != nil {
		return nil, err
	}
	return decompressMaybe(b)
}

func peSectionData(sec *pe.Section) ([]byte, error) {
	b, err := sec.Data()
	if err != nil {
		return nil, err
	}
	if 0 < sec.VirtualSize && sec.VirtualSize < sec.Size {
		b = b[:sec.VirtualSize]
	}
	return b, nil
}

// GetDebugSectionMacho returns the data contents of the specified debug
// section, decompressing it if it is compressed.
// For example GetDebugSectionMacho("line") will return the contents of
// __debug_line, if __debug_line doesn't exist it will try to return the
// decompressed contents of __zdebug_line.
func GetDebugSectionMacho(f *macho.File, name string) ([]byte, error) {
	sec := f.Section("__debug_" + name)
	if sec != nil {
		return sec.Data()
	}
	sec = f.Section("__zdebug_" + name)
	if sec == nil {
		return nil, fmt.Errorf("could not find .debug_%s section", name)
	}
	b, err := sec.Data()
	if err != nil {
		return nil, err
	}
	return decompressMaybe(b)
}

func decompressMaybe(b []byte) ([]byte, error) {
	if len(b) < 12 || string(b[:4]) != "ZLIB" {
		// not compressed
		return b, nil
	}

	dlen := binary.BigEndian.Uint64(b[4:12])
	dbuf := make([]byte, dlen)
	r, err := zlib.NewReader(bytes.NewBuffer(b[12:]))
	if err != nil {
		return nil, err
	}
	if _, err := io.ReadFull(r, dbuf); err != nil {
		return nil, err
	}
	if err := r.Close(); err != nil {
		return nil, err
	}
	return dbuf, nil
}


text:
#import <UIKit/UIKit.h>

#import "BLKFlexibleHeightBarBehaviorDefiner.h"
#import "BLKFlexibleHeightBarSubviewLayoutAttributes.h"
#import "UIView+BLKFlexibleHeightBarSubview.h"

/**
 The `BLKFlexibleHeightBar` class is responsible for adjusting the layout attributes (i.e. frame, transform, alpha) of its subviews depending on its current height.

 The height of the bar is not set directy by adjusting the bar's frame. Rather, height adjustments are made by setting the `progress` property of the bar. The progress property represents how much the bar has shrunk, with 0% progress being the bar's full height and 100% progress being the bar's minimum height.

 `BLKFlexibleHeightBar` is designed to support any shrinking / growing behavior. For example, Safari's shrinking header and Facebook's shrinking header behave differently. Bar behaviors can be mix and matched (and hot swapped) by setting the bar's `behaviorDefiner` property.
 */

@interface BLKFlexibleHeightBar : UIView

/**
 The current progress, representing how much the bar has shrunk. progress == 0.0 puts the bar at its maximum height. progress == 1.0 puts the bar at its minimum height. The default value is 0.0.
 @warning `progress` is bounded between 0.0 and 1.0 inclusive unless the bar's `behaviorDefiner` instance has its `elasticMaximumHeightAtTop` set to YES.
 */
@property (nonatomic) CGFloat progress;

/**
 The non-negative maximum height for the bar. The default value is 44.0.
 */
@property (nonatomic) CGFloat maximumBarHeight;

/**
 The non-negative minimum height for the bar. The default value is 20.0.
 */
@property (nonatomic) CGFloat minimumBarHeight;

/**
 The behavior definer for the bar. Behavior definers are instances of `BLKFlexibleHeightBarBehaviorDefiner.` Behavior definers can be changed at run time to provide a different behavior.
 */
@property (nonatomic) BLKFlexibleHeightBarBehaviorDefiner *behaviorDefiner;

@end


text:
/**
 */
package org.wso2.developerstudio.datamapper.impl;

import static org.wso2.developerstudio.datamapper.impl.DataMapperImplConstants.PATTERN_TAG;
import static org.wso2.developerstudio.datamapper.impl.DataMapperImplConstants.RESULT_TAG;
import static org.wso2.developerstudio.datamapper.impl.DataMapperImplConstants.VALUE_TAG;

import java.util.ArrayList;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.wso2.developerstudio.datamapper.DataMapperOperatorType;
import org.wso2.developerstudio.datamapper.DataMapperPackage;
import org.wso2.developerstudio.datamapper.SchemaDataType;
import org.wso2.developerstudio.datamapper.StartsWith;

/**
 *
 * An implementation of the model object 'Starts With'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link org.wso2.developerstudio.datamapper.impl.StartsWithImpl#getPattern Pattern}

 *
{@link org.wso2.developerstudio.datamapper.impl.StartsWithImpl#isGetPatternFromInput Get Pattern From Input}

 *

 *
 * @generated
 */
public class StartsWithImpl extends OperatorImpl implements StartsWith {
	/**
	 * The default value of the '{@link #getPattern() Pattern}' attribute.
	 *
	 *
	 * @see #getPattern()
	 * @generated
	 * @ordered
	 */
	protected static final String PATTERN_EDEFAULT = "{$Pattern}";
	/**
	 * The cached value of the '{@link #getPattern() Pattern}' attribute.
	 *
	 *
	 * @see #getPattern()
	 * @generated
	 * @ordered
	 */
	protected String pattern = PATTERN_EDEFAULT;
	/**
	 * The default value of the '{@link #isGetPatternFromInput() Get Pattern From Input}' attribute.
	 *
	 *
	 * @see #isGetPatternFromInput()
	 * @generated
	 * @ordered
	 */
	protected static final boolean GET_PATTERN_FROM_INPUT_EDEFAULT = true;
	/**
	 * The cached value of the '{@link #isGetPatternFromInput() Get Pattern From Input}' attribute.
	 *
	 *
	 * @see #isGetPatternFromInput()
	 * @generated
	 * @ordered
	 */
	protected boolean getPatternFromInput = GET_PATTERN_FROM_INPUT_EDEFAULT;

	/**
	 *
	 *
	 * @generated NOT
	 */
	protected StartsWithImpl() {
		super();
		setDefaultInputConnectors(2);
		setDefaultOutputConnectors(1);
		setInputSizeFixed(true);
		setOutputSizeFixed(true);
		getInputVariableTypes().put(0, new ArrayList<SchemaDataType>());
		getOutputVariableTypes().put(0, new ArrayList<SchemaDataType>());
		getInputVariableTypes().get(0).add(SchemaDataType.STRING);
		getOutputVariableTypes().get(0).add(SchemaDataType.BOOLEAN);
		setOperatorType(DataMapperOperatorType.STARTS_WITH);
		getInputLabelList().add(VALUE_TAG);
		getInputLabelList().add(PATTERN_TAG);
		getOutputLabelList().add(RESULT_TAG);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return DataMapperPackage.Literals.STARTS_WITH;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public String getPattern() {
		return pattern;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setPattern(String newPattern) {
		String oldPattern = pattern;
		pattern = newPattern;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, DataMapperPackage.STARTS_WITH__PATTERN, oldPattern, pattern));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean isGetPatternFromInput() {
		return getPatternFromInput;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setGetPatternFromInput(boolean newGetPatternFromInput) {
		boolean oldGetPatternFromInput = getPatternFromInput;
		getPatternFromInput = newGetPatternFromInput;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, DataMapperPackage.STARTS_WITH__GET_PATTERN_FROM_INPUT, oldGetPatternFromInput, getPatternFromInput));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case DataMapperPackage.STARTS_WITH__PATTERN:
				return getPattern();
			case DataMapperPackage.STARTS_WITH__GET_PATTERN_FROM_INPUT:
				return isGetPatternFromInput();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case DataMapperPackage.STARTS_WITH__PATTERN:
				setPattern((String)newValue);
				return;
			case DataMapperPackage.STARTS_WITH__GET_PATTERN_FROM_INPUT:
				setGetPatternFromInput((Boolean)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case DataMapperPackage.STARTS_WITH__PATTERN:
				setPattern(PATTERN_EDEFAULT);
				return;
			case DataMapperPackage.STARTS_WITH__GET_PATTERN_FROM_INPUT:
				setGetPatternFromInput(GET_PATTERN_FROM_INPUT_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case DataMapperPackage.STARTS_WITH__PATTERN:
				return PATTERN_EDEFAULT == null ? pattern != null : !PATTERN_EDEFAULT.equals(pattern);
			case DataMapperPackage.STARTS_WITH__GET_PATTERN_FROM_INPUT:
				return getPatternFromInput != GET_PATTERN_FROM_INPUT_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (pattern: ");
		result.append(pattern);
		result.append(", getPatternFromInput: ");
		result.append(getPatternFromInput);
		result.append(')');
		return result.toString();
	}

} //StartsWithImpl


text:
import { parse } from 'halfred'; // require('halfred');
let resource = parse({foo: "bar", "_links": { "self": { href: "fooo" }}});
console.log(resource);

let allLinks = resource.allLinks();
for (let key in allLinks) {
  let link = allLinks[key];

  console.log(link[0].href);
}


text:
id PyObjCObj_GetNativeObj(PyObject* obj) {
	if(!obj) return nil;
	if(!PyObjCObject_Check(obj)) return nil;
	return PyObjCObject_GetObject(obj);
}

PyObject* PyObjCObj_NewNative(id obj) {
	return PyObjCObject_New(obj, PyObjCObject_kDEFAULT, YES);
}

PyObject* PyObjCObj_IdToPy(id obj) {
	return PyObjC_IdToPython(obj);
}


text:
require "omise/list"

module Omise
  class Search < List
    def self.execute(attributes = {})
      new resource("/search", attributes).get(attributes)
    end
  end
end


text:
require('colors');
var _ = require('lodash');

var config = require('../config/config');

// create a noop (no operation) function for when loggin is disabled
var noop = function(){};
// check if loggin is enabled in the config
// if it is, then use console.log
// if not then noop
var consoleLog = config.logging ? console.log.bind(console) : noop;

var logger = {
  log: function() {
    var tag = '[ ✨ LOG ✨ ]'.green;
    // arguments is an array like object with all the passed
    // in arguments to this function
    var args = _.toArray(arguments)
      .map(function(arg) {
        if(typeof arg === 'object') {
          // turn the object to a string so we
          // can log all the properties and color it
          var string = JSON.stringify(arg, null, 2);
          return tag + '  ' + string.cyan;
        } else {
          return tag + '  ' + arg.cyan;
        }
      });

    // call either console.log or noop here
    // with the console object as the context
    // and the new colored args :)
    consoleLog.apply(console, args);
  },

  error: function() {
    var args = _.toArray(arguments)
      .map(function(arg) {
        arg = arg.stack || arg;
        var name = arg.name || '[ ❌ ERROR ❌ ]';
        var log = name.yellow + '  ' + arg.red;
        return log;
      });

    consoleLog.apply(console, args);
  }
};

module.exports = logger;


text:
<?php

namespace Google\Service\Compute;

class AutoscalingPolicyCustomMetricUtilization extends \Google\Model
{
  /**
   * @var string
   */
  public $filter;
  /**
   * @var string
   */
  public $metric;
  public $singleInstanceAssignment;
  public $utilizationTarget;
  /**
   * @var string
   */
  public $utilizationTargetType;

  /**
   * @param string
   */
  public function setFilter($filter)
  {
    $this->filter = $filter;
  }
  /**
   * @return string
   */
  public function getFilter()
  {
    return $this->filter;
  }
  /**
   * @param string
   */
  public function setMetric($metric)
  {
    $this->metric = $metric;
  }
  /**
   * @return string
   */
  public function getMetric()
  {
    return $this->metric;
  }
  public function setSingleInstanceAssignment($singleInstanceAssignment)
  {
    $this->singleInstanceAssignment = $singleInstanceAssignment;
  }
  public function getSingleInstanceAssignment()
  {
    return $this->singleInstanceAssignment;
  }
  public function setUtilizationTarget($utilizationTarget)
  {
    $this->utilizationTarget = $utilizationTarget;
  }
  public function getUtilizationTarget()
  {
    return $this->utilizationTarget;
  }
  /**
   * @param string
   */
  public function setUtilizationTargetType($utilizationTargetType)
  {
    $this->utilizationTargetType = $utilizationTargetType;
  }
  /**
   * @return string
   */
  public function getUtilizationTargetType()
  {
    return $this->utilizationTargetType;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AutoscalingPolicyCustomMetricUtilization::class, 'Google_Service_Compute_AutoscalingPolicyCustomMetricUtilization');


text:
package repo

import (
	"fmt"

	"code.gitea.io/gitea/models"
	"code.gitea.io/gitea/modules/context"
	api "code.gitea.io/sdk/gitea"
)

// NewCommitStatus creates a new CommitStatus
func NewCommitStatus(ctx *context.APIContext, form api.CreateStatusOption) {
	sha := ctx.Params("sha")
	if len(sha) == 0 {
		sha = ctx.Params("ref")
	}
	if len(sha) == 0 {
		ctx.Error(400, "ref/sha not given", nil)
		return
	}
	status := &models.CommitStatus{
		State:       models.CommitStatusState(form.State),
		TargetURL:   form.TargetURL,
		Description: form.Description,
		Context:     form.Context,
	}
	if err := models.NewCommitStatus(ctx.Repo.Repository, ctx.User, sha, status); err != nil {
		ctx.Error(500, "NewCommitStatus", err)
		return
	}

	newStatus, err := models.GetCommitStatus(ctx.Repo.Repository, sha, status)
	if err != nil {
		ctx.Error(500, "GetCommitStatus", err)
		return
	}
	ctx.JSON(201, newStatus.APIFormat())
}

// GetCommitStatuses returns all statuses for any given commit hash
func GetCommitStatuses(ctx *context.APIContext) {
	sha := ctx.Params("sha")
	if len(sha) == 0 {
		sha = ctx.Params("ref")
	}
	if len(sha) == 0 {
		ctx.Error(400, "ref/sha not given", nil)
		return
	}
	repo := ctx.Repo.Repository

	page := ctx.ParamsInt("page")

	statuses, err := models.GetCommitStatuses(repo, sha, page)
	if err != nil {
		ctx.Error(500, "GetCommitStatuses", fmt.Errorf("GetCommitStatuses[%s, %s, %d]: %v", repo.FullName(), sha, page, err))
	}

	apiStatuses := make([]*api.Status, 0, len(statuses))
	for _, status := range statuses {
		apiStatuses = append(apiStatuses, status.APIFormat())
	}

	ctx.JSON(200, apiStatuses)
}

type combinedCommitStatus struct {
	State      models.CommitStatusState `json:"state"`
	SHA        string                   `json:"sha"`
	TotalCount int                      `json:"total_count"`
	Statuses   []*api.Status            `json:"statuses"`
	Repo       *api.Repository          `json:"repository"`
	CommitURL  string                   `json:"commit_url"`
	URL        string                   `json:"url"`
}

// GetCombinedCommitStatus returns the combined status for any given commit hash
func GetCombinedCommitStatus(ctx *context.APIContext) {
	sha := ctx.Params("sha")
	if len(sha) == 0 {
		sha = ctx.Params("ref")
	}
	if len(sha) == 0 {
		ctx.Error(400, "ref/sha not given", nil)
		return
	}
	repo := ctx.Repo.Repository

	page := ctx.ParamsInt("page")

	statuses, err := models.GetLatestCommitStatus(repo, sha, page)
	if err != nil {
		ctx.Error(500, "GetLatestCommitStatus", fmt.Errorf("GetLatestCommitStatus[%s, %s, %d]: %v", repo.FullName(), sha, page, err))
		return
	}

	if len(statuses) == 0 {
		ctx.Status(200)
		return
	}

	retStatus := &combinedCommitStatus{
		SHA:        sha,
		TotalCount: len(statuses),
		Repo:       repo.APIFormat(ctx.Repo.AccessMode),
		URL:        "",
	}

	retStatus.Statuses = make([]*api.Status, 0, len(statuses))
	for _, status := range statuses {
		retStatus.Statuses = append(retStatus.Statuses, status.APIFormat())
		if status.State.IsWorseThan(retStatus.State) {
			retStatus.State = status.State
		}
	}

	ctx.JSON(200, retStatus)
}


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

    <string name="app_name">Bitland-demo-views</string>
    <string name="menu_settings">Settings</string>
    <string name="hello_world">Hello world!</string>
    <string name="title_activity_d__bitmap">D_Bitmap</string>
    <string name="title_activity_d__layer_drawable">D_LayerDrawable</string>
    <string name="title_activity_d__state_list_drawable_ctivity">D_StateListDrawable_ctivity</string>
    <string name="title_activity_d__level_drawable">D_LevelDrawable</string>
    <string name="title_activity_d__transition_drawable">D_TransitionDrawable</string>
    <string name="title_activity_d__inset_drawable">D_InsetDrawable</string>
    <string name="title_activity_d__clip_drawable">D_ClipDrawable</string>
    <string name="title_activity_d__scale_drawable">D_ScaleDrawable</string>
    <string name="title_activity_d__rotate_drawable">D_RotateDrawable</string>
    <string name="title_activity_d__gradient_drawable">D_GradientDrawable</string>
    <string name="title_activity_d__custom_drawable">D_CustomDrawable</string>
    <string name="title_activity_v__image_view__scale_type">V_ImageView_ScaleType</string>
    <string name="title_activity_layout__dp__calculator">Layout_Dp_Calculator</string>
    <string name="title_activity_mesure_test">MesureTestActivity</string>
    <string name="title_activity_events">EventsActivity</string>
    <string name="title_activity_test_custom_view_group">TestCustomViewGroupActivity</string>
    <string name="title_activity_draw2_d">Draw2DActivity</string>

</resources>


text:
Rails.application.routes.draw do

  mount Whodunnit::Engine => "/whodunnit"
end


text:
<package>
  <name>dumbo_controller_config</name>
  <version>0.0.1</version>
  <description>Configuration files for Dumbo's controllers.</description>
  <license>BSD</license>

  <url type="website">http://ros.org/wiki/dumbo_controller_config</url>

  <author email="fevb@kth.se">Francisco Vina</author>
  <maintainer email="fevb@kth.se">Francisco Vina</maintainer>

  <buildtool_depend>catkin</buildtool_depend>

  <run_depend>dumbo_hardware_interface</run_depend>
  <run_depend>dumbo_hw_control_loop</run_depend>
  <run_depend>ros_controllers</run_depend>

</package>


text:
package com.iluwatar.factorykit;

/**
 * Interface representing weapon.
 */
public interface Weapon {
}


text:
package org.smartloli.kafka.eagle.common.domain;

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

import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;

/**
 * @author smartloli.
 *
 *         Created by Feb 28, 2017
 */
public class KafkaSqlDomain {

	private List<Integer> partition = new ArrayList<>();
	private String sql;
	private String metaSql;
	private JSONObject schema = new JSONObject();
	private String tableName;
	private String topic;
	private boolean status;
	private List<HostsDomain> seeds = new ArrayList<>();

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String getMetaSql() {
		return metaSql;
	}

	public void setMetaSql(String metaSql) {
		this.metaSql = metaSql;
	}

	public List<HostsDomain> getSeeds() {
		return seeds;
	}

	public void setSeeds(List<HostsDomain> seeds) {
		this.seeds = seeds;
	}

	public JSONObject getSchema() {
		return schema;
	}

	public void setSchema(JSONObject schema) {
		this.schema = schema;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public List<Integer> getPartition() {
		return partition;
	}

	public void setPartition(List<Integer> partition) {
		this.partition = partition;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return new Gson().toJson(this);
	}

}