text:
require File.expand_path("../../spec_helper", __FILE__)

module Selenium
  module WebDriver
    module Firefox

      describe Profile do
        let(:profile) { Profile.new }

        def read_generated_prefs(from = nil)
          prof = from || profile()
          dir = prof.layout_on_disk

          File.read(File.join(dir, 'user.js'))
        end

        it "should set additional preferences" do
          profile['foo.number'] = 123
          profile['foo.boolean'] = true
          profile['foo.string'] = "bar"

          string = read_generated_prefs
          expect(string).to include('user_pref("foo.number", 123)')
          expect(string).to include('user_pref("foo.boolean", true)')
          expect(string).to include(%{user_pref("foo.string", "bar")})
        end

        it "should be serializable to JSON" do
          profile['foo.boolean'] = true

          new_profile = Profile.from_json(profile.to_json)
          string = read_generated_prefs(new_profile)
          expect(string).to include('user_pref("foo.boolean", true)')
        end

        it "should not let user override defaults" do
          profile['app.update.enabled'] = true

          string = read_generated_prefs
          expect(string).to include('user_pref("app.update.enabled", false)')
        end

        it "should properly handle escaped characters" do
          profile['foo'] = 'C:\\r\\n'

          string = read_generated_prefs
          expect(string).to include('user_pref("foo", "C:\\\\r\\\\n");')
        end

        it "should let the user override some specific prefs" do
          profile["browser.startup.page"] = "http://example.com"

          string = read_generated_prefs
          expect(string).to include(%Q{user_pref("browser.startup.page", "http://example.com")})
        end

        it "should raise an error if the value given is not a string, number or boolean" do
          expect { profile['foo.bar'] = [] }.to raise_error(TypeError)
        end

        it "should raise an error if the value is already stringified" do
          expect { profile['foo.bar'] = '"stringified"' }.to raise_error(ArgumentError)
        end

        it "should enable secure SSL" do
          profile.secure_ssl = true

          string = read_generated_prefs
          expect(string).to include('user_pref("webdriver_accept_untrusted_certs", false)')
        end

        it "should disable secure SSL" do
          profile.secure_ssl = false

          string = read_generated_prefs
          expect(string).to include('user_pref("webdriver_accept_untrusted_certs", true)')
        end

        it "should change the setting for untrusted certificate issuer" do
          profile.assume_untrusted_certificate_issuer = false

          string = read_generated_prefs
          expect(string).to include('user_pref("webdriver_assume_untrusted_issuer", false)')
        end

        it "can configure a manual proxy" do
          proxy = Proxy.new(
            :http     => "foo:123",
            :ftp      => "bar:234",
            :ssl      => "baz:345",
            :no_proxy => "localhost"
          )

          profile.proxy = proxy
          string = read_generated_prefs

          expect(string).to include('user_pref("network.proxy.http", "foo")')
          expect(string).to include('user_pref("network.proxy.http_port", 123)')

          expect(string).to include('user_pref("network.proxy.ftp", "bar")')
          expect(string).to include('user_pref("network.proxy.ftp_port", 234)')

          expect(string).to include('user_pref("network.proxy.ssl", "baz")')
          expect(string).to include('user_pref("network.proxy.ssl_port", 345)')

          expect(string).to include('user_pref("network.proxy.no_proxies_on", "localhost")')
          expect(string).to include('user_pref("network.proxy.type", 1)')
        end

        it "can configure a PAC proxy" do
          profile.proxy = Proxy.new(:pac => "http://foo/bar.pac")
          string = read_generated_prefs

          expect(string).to include('user_pref("network.proxy.autoconfig_url", "http://foo/bar.pac")')
          expect(string).to include('user_pref("network.proxy.type", 2)')
        end

        it "can configure an auto-detected proxy" do
          profile.proxy = Proxy.new(:auto_detect => true)
          string = read_generated_prefs

          expect(string).to include('user_pref("network.proxy.type", 4)')
        end

        it "should be able to use the same profile more than once" do
          profile['browser.startup.homepage'] = url_for("formPage.html")

          begin
            driver_one = WebDriver.for(:firefox, :profile => profile)
            driver_two = WebDriver.for(:firefox, :profile => profile)
          ensure
            driver_one.quit if driver_one
            driver_two.quit if driver_two
          end
        end

      end
    end # Firefox
  end # WebDriver
end # Selenium


text:
Banshee
=======

Banshee is a real-time anomalies(outliers) detection system for periodic
metrics.

[![Build Status](https://travis-ci.org/eleme/banshee.svg?branch=master)](https://travis-ci.org/eleme/banshee)
[![GoDoc](https://godoc.org/github.com/eleme/banshee?status.svg)](https://godoc.org/github.com/eleme/banshee)
[![Join the chat at https://gitter.im/eleme/banshee](https://badges.gitter.im/eleme/banshee.svg)](https://gitter.im/eleme/banshee?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

![snap-01](docs/snap/01.png)

Case
----

For example, a website api's response time is reported to banshee from statsd
every 10 seconds:

```
20, 21, 21, 22, 23, 19, 18, 21, 22, 20, ..., 300
```

The latest `300` will be catched.

Features
--------

* Designed for periodic metrics.
* Dynamic threshold analyzation via 3-sigma.
* Also supports fixed-threshold alert option.
* Provides an alert rule management panel.
* No extra storage services required.

Requirements
------------

1. Go >= 1.5.
2. Node and gulp.
3. [Statsd](https://github.com/etsy/statsd).

It is strongly recommended to use statsd as banshee client.

Build
-----

1. Clone this repo and checkout to the latest release.
2. Build binary via `make`.
3. Build static files via `make static`.

Usage
-----

```bash
$ ./banshee -c <config-filename>
```

Example configuration file is [config/exampleConfig.yaml](config/exampleConfig.yaml).

Statsd Integration
------------------

1. Install [statsd-banshee](https://www.npmjs.com/package/statsd-banshee) to forward
   metrics to banshee.

   ```bash
   $ cd path/to/statsd
   $ npm install statsd-banshee
   ```

2. Add `statsd-banshee` to statsd backends in config.js:

   ```js
	{
	, backends: ['statsd-banshee']
	, bansheeHost: 'localhost'
	, bansheePort: 2015
	}
   ```

Supported Metrics
-----------------

* timers: `timer.mean_90.*`, `timer.upper_90.*`, `timer.count_ps.*`.
* counters: `counter.*`.
* gauge: `gauge.*`.

Detection should work for any metric delimited by dots, but above types are better
supported and are also recommended to use as banshee input.

*Statsd-banshee would format banshee metric names before data sent out.*

Web Panel Manual
----------------

Welcome to checkout the web panel manuals: [English](docs/web-manual.md), [简体中文](docs/web-manual.zh.md).

Deployment
----------

Banshee is a single-host program, its detection is fast enough in our case,
we don't have a plan to expand it now.

We are using a Python script ([deploy.py](deploy.py) via [fabric](http://www.fabfile.org/))
to deploy it to remote host:

```
python deploy.py -u hit9 -H remote-host:22 --remote-path "/service/banshee"
```

Upgrade
-------

Just pull the latest [tag release](https://github.com/eleme/banshee/releases).
*Please don't use master branch directly, checkout to a tag instead.*

Generally we won't release not-backward-compatiable versions, if any, related notes
would be added to the [changelog](changelog).

Alert Command
-------------

Banshee requires a command, normally a script to send alert messages.

It should be called from command line like this:

```bash
$ ./alert-command <JSON-String>
```

The JSON string example can be found at [alerter/exampleCommand/echo.go](alerter/exampleCommand/echo.go).

Philosophy
----------

But how do you really analyze the anomalous metrics? Via 3-sigma:

```python
>>> import numpy as np
>>> x = np.array([40, 52, 63, 44, 54, 43, 67, 54, 49, 45, 48, 54, 57, 43, 58])
>>> mean = np.mean(x)
>>> std = np.std(x)
>>> (80 - mean) / (3 * std)
1.2608052883472445 # anomaly, too big
>>> (20 - mean) / (3 * std)
-1.3842407711224991 # anomaly, too small
```

For further implementation introduction, please checkout [docs/algorithms.md](docs/algorithms.md).

Network Protocol
----------------

If you are using [statsd](https://github.com/etsy/statsd) as banshee client, please
checkout [statsd-banshee](https://www.npmjs.com/package/statsd-banshee).

The network protocol is line based:

```
<NAME> <STAMP> <VALUE> '\n'
```

Where the `NAME` should be a string, `STAMP` should be a timestamp integer in seconds, and
the `VALUE` should be a float number.

Web HTTP API
------------

Please checkout [docs/web-api.md](docs/web-api.md).

Docker Image
------------

Please checkout [docker/README.md](docker).

Authors
-------

Thanks to our [contributors](https://github.com/eleme/banshee/graphs/contributors).

License
-------

MIT Copyright (c) 2015 - 2016 Eleme, Inc.

redpajama_set_name: RedPajamaGithub


text:
"""Config flow to configure the Nuki integration."""
from collections.abc import Mapping
import logging
from typing import Any

from pynuki import NukiBridge
from pynuki.bridge import InvalidCredentialsException
from requests.exceptions import RequestException
import voluptuous as vol

from homeassistant import config_entries
from homeassistant.components import dhcp
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TOKEN
from homeassistant.data_entry_flow import FlowResult

from .const import DEFAULT_PORT, DEFAULT_TIMEOUT, DOMAIN
from .helpers import CannotConnect, InvalidAuth, parse_id

_LOGGER = logging.getLogger(__name__)

USER_SCHEMA = vol.Schema(
    {
        vol.Required(CONF_HOST): str,
        vol.Optional(CONF_PORT, default=DEFAULT_PORT): vol.Coerce(int),
        vol.Required(CONF_TOKEN): str,
    }
)

REAUTH_SCHEMA = vol.Schema({vol.Required(CONF_TOKEN): str})

async def validate_input(hass, data):
    """Validate the user input allows us to connect.

    Data has the keys from USER_SCHEMA with values provided by the user.
    """

    try:
        bridge = await hass.async_add_executor_job(
            NukiBridge,
            data[CONF_HOST],
            data[CONF_TOKEN],
            data[CONF_PORT],
            True,
            DEFAULT_TIMEOUT,
        )

        info = await hass.async_add_executor_job(bridge.info)
    except InvalidCredentialsException as err:
        raise InvalidAuth from err
    except RequestException as err:
        raise CannotConnect from err

    return info

class NukiConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
    """Nuki config flow."""

    def __init__(self):
        """Initialize the Nuki config flow."""
        self.discovery_schema = {}
        self._data = {}

    async def async_step_user(self, user_input=None):
        """Handle a flow initiated by the user."""
        return await self.async_step_validate(user_input)

    async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult:
        """Prepare configuration for a DHCP discovered Nuki bridge."""
        await self.async_set_unique_id(discovery_info.hostname[12:].upper())

        self._abort_if_unique_id_configured()

        self.discovery_schema = vol.Schema(
            {
                vol.Required(CONF_HOST, default=discovery_info.ip): str,
                vol.Required(CONF_PORT, default=DEFAULT_PORT): int,
                vol.Required(CONF_TOKEN): str,
            }
        )

        return await self.async_step_validate()

    async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult:
        """Perform reauth upon an API authentication error."""
        self._data = entry_data

        return await self.async_step_reauth_confirm()

    async def async_step_reauth_confirm(self, user_input=None):
        """Dialog that inform the user that reauth is required."""
        errors = {}
        if user_input is None:
            return self.async_show_form(
                step_id="reauth_confirm", data_schema=REAUTH_SCHEMA
            )

        conf = {
            CONF_HOST: self._data[CONF_HOST],
            CONF_PORT: self._data[CONF_PORT],
            CONF_TOKEN: user_input[CONF_TOKEN],
        }

        try:
            info = await validate_input(self.hass, conf)
        except CannotConnect:
            errors["base"] = "cannot_connect"
        except InvalidAuth:
            errors["base"] = "invalid_auth"
        except Exception:  # pylint: disable=broad-except
            _LOGGER.exception("Unexpected exception")
            errors["base"] = "unknown"

        if not errors:
            existing_entry = await self.async_set_unique_id(
                parse_id(info["ids"]["hardwareId"])
            )
            if existing_entry:
                self.hass.config_entries.async_update_entry(existing_entry, data=conf)
                self.hass.async_create_task(
                    self.hass.config_entries.async_reload(existing_entry.entry_id)
                )
                return self.async_abort(reason="reauth_successful")
            errors["base"] = "unknown"

        return self.async_show_form(
            step_id="reauth_confirm", data_schema=REAUTH_SCHEMA, errors=errors
        )

    async def async_step_validate(self, user_input=None):
        """Handle init step of a flow."""

        errors = {}
        if user_input is not None:
            try:
                info = await validate_input(self.hass, user_input)
            except CannotConnect:
                errors["base"] = "cannot_connect"
            except InvalidAuth:
                errors["base"] = "invalid_auth"
            except Exception:  # pylint: disable=broad-except
                _LOGGER.exception("Unexpected exception")
                errors["base"] = "unknown"

            if "base" not in errors:
                bridge_id = parse_id(info["ids"]["hardwareId"])
                await self.async_set_unique_id(bridge_id)
                self._abort_if_unique_id_configured()
                return self.async_create_entry(title=bridge_id, data=user_input)

        data_schema = self.discovery_schema or USER_SCHEMA
        return self.async_show_form(
            step_id="user", data_schema=data_schema, errors=errors
        )


text:
package org.apache.logging.slf4j;

import java.io.Serializable;

import org.apache.logging.log4j.junit.LoggerContextRule;
import org.junit.ClassRule;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.logging.log4j.SerializableMatchers.serializesRoundTrip;
import static org.junit.Assert.*;

/**
 *
 */
public class SerializeTest {

    private static final String CONFIG = "log4j-test1.xml";

    @ClassRule
    public static final LoggerContextRule CTX = new LoggerContextRule(CONFIG);

    Logger logger = LoggerFactory.getLogger("LoggerTest");

    @Test
    public void testLogger() throws Exception {
        assertThat((Serializable) logger, serializesRoundTrip());
    }
}


text:
set :application, 'DevpanelZabbix'
set :repo_url, 'git@github.com:freeminder/devpanel_zabbix.git'

set :bundle_without, ["development", "test"]
set :stages, ["staging", "production"]
set :default_stage, "production"
set :passenger_restart_with_touch, true

# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call

# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/srv/www/devpanel_zabbix'

# Default value for :scm is :git
set :scm, :git

# Default value for :format is :pretty
# set :format, :pretty

# Default value for :log_level is :debug
# set :log_level, :debug

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
set :linked_files, %w{config/database.yml config/local_env.yml config/secrets.yml}

# Default value for linked_dirs is []
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for keep_releases is 5
set :keep_releases, 5

namespace :deploy do

  desc 'Migrate DB'
  task :migrate do
    on roles(:app), in: :groups, limit: 3, wait: 10 do
      within release_path do
        execute :rake, 'db:migrate'
      end
    end
  end

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :publishing, :migrate
  after :publishing, :restart

end


text:
namespace kudu {

class MonoDelta;

namespace cluster {
class ExternalTabletServer;
}

namespace tserver {

class TabletServerServiceProxy;

// Integration test for the raft consensus implementation.
// Uses the whole tablet server stack with ExternalMiniCluster.
class RaftConsensusITestBase : public TabletServerIntegrationTestBase {
 public:
  // Behavior for the tablet server hosting the fall-behind-WAL-GC replica.
  enum BehindWalGcBehavior {
    STOP_CONTINUE,    // Send SIGSTOP and then SIGCONT to the affected tserver.
    SHUTDOWN_RESTART, // Shutdown and then restart the affected tserver.
    SHUTDOWN,         // Shutdown the affected tserver, don't start it back up.
    DO_NOT_TAMPER,    // Leave the affected tserver alone, running or not.
  };

  RaftConsensusITestBase();

  void SetUp() override;

  void ScanReplica(TabletServerServiceProxy* replica_proxy,
                   std::vector<std::string>* results);

  void InsertTestRowsRemoteThread(uint64_t first_row,
                                  uint64_t count,
                                  uint64_t num_batches,
                                  const std::vector<CountDownLatch*>& latches);
 protected:
  // Retrieve the current term of the first tablet on this tablet server.
  static Status GetTermMetricValue(cluster::ExternalTabletServer* ts,
                                   int64_t* term);

  // Flags needed for CauseFollowerToFallBehindLogGC() to work well.
  static void AddFlagsForLogRolls(std::vector<std::string>* extra_tserver_flags);

  // Pause/shutdown the tserver hosting one of the follower tablet replicas and
  // write enough data to the remaining replicas to cause log GC. Then
  // resume/restart/leave-shutdown the affected tserver. On success,
  // 'leader_uuid' will be set to the UUID of the leader, 'orig_term'
  // will be set to the term of the leader before un-pausing the follower and
  // 'fell_behind_uuid' will be set to the UUID of the follower that was
  // paused/shutdown and caused to fall behind. These can be used for
  // verification purposes. The optional 'tserver_behavior' dictates what
  // whether the affected tserver will be paused/resumed, shutdown/restarted,
  // and so on.
  //
  // Certain flags should be set. You can add the required flags with
  // AddFlagsForLogRolls() before starting the cluster.
  void CauseFollowerToFallBehindLogGC(
      const itest::TabletServerMap& tablet_servers,
      std::string* leader_uuid = nullptr,
      int64_t* orig_term = nullptr,
      std::string* fell_behind_uuid = nullptr,
      BehindWalGcBehavior tserver_behavior = BehindWalGcBehavior::STOP_CONTINUE,
      const MonoDelta& pre_workload_delay = {});

  // Same as above, but the follower to fail is chosen in advance.
  void CauseSpecificFollowerToFallBehindLogGC(
      const itest::TabletServerMap& tablet_servers,
      const std::string& follower_uuid_to_fail,
      std::string* leader_uuid = nullptr,
      int64_t* orig_term = nullptr,
      BehindWalGcBehavior tserver_behavior = BehindWalGcBehavior::STOP_CONTINUE,
      const MonoDelta& pre_workload_delay = {});

  CountDownLatch inserters_;
};

}  // namespace tserver
}  // namespace kudu


text:
using System;
using Untech.SharePoint.Common.CodeAnnotations;
using Untech.SharePoint.Common.MetaModels;
using Untech.SharePoint.Common.Utils;

namespace Untech.SharePoint.Common.Data.Mapper
{
	/// <summary>
	/// Represents SP field accessor.
	/// </summary>
	/// <typeparam name="TSPItem">SP List Item type, i.e. SPListItem for SSOM, ListItem for CSOM.</typeparam>
	public abstract class StoreAccessor<TSPItem> : IFieldAccessor<TSPItem>
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="StoreAccessor{TSPItem}"/>
		/// </summary>
		/// <param name="field">Metadata of the field that should be associated with that accessor.</param>
		/// <exception cref="ArgumentNullException"><paramref name="field"/> is null.</exception>
		protected StoreAccessor([NotNull]MetaField field)
		{
			Guard.CheckNotNull(nameof(field), field);

			Field = field;
		}

		/// <summary>
		/// Gets <see cref="MetaField"/> associated with current accessor.
		/// </summary>
		[NotNull]
		protected MetaField Field { get; }

		/// <summary>
		/// Gets a value indicating whether the value can be read by <see cref="IFieldAccessor{T}.GetValue"/> method.
		/// </summary>
		public bool CanGetValue => true;

		/// <summary>
		/// Gets a value indicating whether the value can be set by <see cref="IFieldAccessor{T}.SetValue"/> method.
		/// </summary>
		public bool CanSetValue => !Field.ReadOnly && !Field.IsCalculated;

		/// <summary>
		/// Gets the value from the specified instance.
		/// </summary>
		/// <param name="instance">Value source instance.</param>
		/// <returns>Value of the field.</returns>
		public abstract object GetValue(TSPItem instance);

		/// <summary>
		/// Sets the value for the specified instance.
		/// </summary>
		/// <param name="instance">Value destination instance.</param>
		/// <param name="value">Value to set.</param>
		public abstract void SetValue(TSPItem instance, object value);
	}
}


text:
package org.smarti18n.vaadin.utils;

import org.smarti18n.models.Message;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import com.vaadin.server.StreamResource;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.function.Supplier;

public class JsonExportStreamSource implements StreamResource.StreamSource {

    private final Supplier<Collection<? extends Message>> supplier;
    private final Supplier<Locale> locale;

    public JsonExportStreamSource(final Supplier<Collection<? extends Message>> supplier, final Supplier<Locale> locale) {
        this.supplier = supplier;
        this.locale = locale;
    }

    @Override
    public InputStream getStream() {
            final Map<String,String> map = new HashMap<>();
            supplier.get()
                    .forEach(message -> {
                        final String key = message.getKey();
                        final String translation = message.getTranslation(locale.get());

                        map.put(key, translation);
                    });

        try {
            final ObjectMapper objectMapper = new ObjectMapper();

            final byte[] bytes = objectMapper.writeValueAsBytes(map);

            return new ByteArrayInputStream(bytes);
        } catch (JsonProcessingException e) {
            throw new IllegalStateException(e);
        }
    }
}


text:
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Thread#priority" do
  before :each do
    @current_priority = Thread.current.priority
    ThreadSpecs.clear_state
    @thread = Thread.new { Thread.pass until ThreadSpecs.state == :exit }
    Thread.pass until @thread.alive?
  end

  after :each do
    ThreadSpecs.state = :exit
    @thread.join
  end

  it "inherits the priority of the current thread while running" do
    @thread.alive?.should be_true
    @thread.priority.should == @current_priority
  end

  it "maintain the priority of the current thread after death" do
    ThreadSpecs.state = :exit
    @thread.join
    @thread.alive?.should be_false
    @thread.priority.should == @current_priority
  end

  it "returns an integer" do
    @thread.priority.should be_kind_of(Integer)
  end
end

describe "Thread#priority=" do
  before :each do
    ThreadSpecs.clear_state
    @thread = Thread.new { Thread.pass until ThreadSpecs.state == :exit }
    Thread.pass until @thread.alive?
  end

  after :each do
    ThreadSpecs.state = :exit
    @thread.join
  end

  describe "when set with an integer" do
    it "returns an integer" do
      value = (@thread.priority = 3)
      value.should == 3
    end

    it "clamps the priority to -3..3" do
      @thread.priority = 42
      @thread.priority.should == 3
      @thread.priority = -42
      @thread.priority.should == -3
    end
  end

  describe "when set with a non-integer" do
    it "raises a type error" do
      ->{ @thread.priority = Object.new }.should raise_error(TypeError)
    end
  end

  it "sets priority even when the thread has died" do
    thread = Thread.new {}
    thread.join
    thread.priority = 3
    thread.priority.should == 3
  end
end


text:
/* This file has been automatically generated; do not edit */

package org.meshpoint.anode.stub.gen.platform;

public class Org_webinos_api_DeviceAPIError {

	private static Object[] __args = new Object[0];

	public static Object[] __getArgs() { return __args; }

	static Object __invoke(org.webinos.api.DeviceAPIError inst, int opIdx, Object[] args) {
		return inst.getMessage();
	}

	static Object __get(org.webinos.api.DeviceAPIError inst, int attrIdx) {
		Object result = null;
		switch(attrIdx) {
		case 0: /* ABORT_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.ABORT_ERR);
			break;
		case 1: /* DOMSTRING_SIZE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.DOMSTRING_SIZE_ERR);
			break;
		case 2: /* HIERARCHY_REQUEST_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.HIERARCHY_REQUEST_ERR);
			break;
		case 3: /* INDEX_SIZE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INDEX_SIZE_ERR);
			break;
		case 4: /* INUSE_ATTRIBUTE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INUSE_ATTRIBUTE_ERR);
			break;
		case 5: /* INVALID_ACCESS_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_ACCESS_ERR);
			break;
		case 6: /* INVALID_CHARACTER_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_CHARACTER_ERR);
			break;
		case 7: /* INVALID_ERROR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_ERROR);
			break;
		case 8: /* INVALID_MODIFICATION_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_MODIFICATION_ERR);
			break;
		case 9: /* INVALID_STATE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_STATE_ERR);
			break;
		case 10: /* INVALID_VALUES_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.INVALID_VALUES_ERR);
			break;
		case 11: /* IO_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.IO_ERR);
			break;
		case 12: /* NAMESPACE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NAMESPACE_ERR);
			break;
		case 13: /* NETWORK_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NETWORK_ERR);
			break;
		case 14: /* NOT_AVAILABLE_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NOT_AVAILABLE_ERR);
			break;
		case 15: /* NOT_FOUND_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NOT_FOUND_ERR);
			break;
		case 16: /* NOT_SUPPORTED_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NOT_SUPPORTED_ERR);
			break;
		case 17: /* NO_DATA_ALLOWED_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NO_DATA_ALLOWED_ERR);
			break;
		case 18: /* NO_MODIFICATION_ALLOWED_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.NO_MODIFICATION_ALLOWED_ERR);
			break;
		case 19: /* SECURITY_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.SECURITY_ERR);
			break;
		case 20: /* SYNTAX_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.SYNTAX_ERR);
			break;
		case 21: /* TIMEOUT_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.TIMEOUT_ERR);
			break;
		case 22: /* TYPE_MISMATCH_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.TYPE_MISMATCH_ERR);
			break;
		case 23: /* UNKNOWN_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.UNKNOWN_ERR);
			break;
		case 24: /* VALIDATION_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.VALIDATION_ERR);
			break;
		case 25: /* WRONG_DOCUMENT_ERR */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)org.webinos.api.DeviceAPIError.WRONG_DOCUMENT_ERR);
			break;
		case 26: /* code */
			result = org.meshpoint.anode.js.JSValue.asJSNumber((long)inst.code);
			break;
		case 27: /* message */
			result = inst.message;
			break;
		default:
		}
		return result;
	}

	static void __set(org.webinos.api.DeviceAPIError inst, int attrIdx, Object val) {
		switch(attrIdx) {
		case 26: /* code */
			inst.code = (int)((org.meshpoint.anode.js.JSValue)val).longValue;
			break;
		case 27: /* message */
			inst.message = (String)val;
			break;
		default:
			throw new UnsupportedOperationException();
		}
	}

}


text:
import http from 'http'
import _debug from 'debug'
import app from './app'
import { initializeDb, disconnect } from './helpers/db/mysql'
import config from './config'

const debug = _debug('bear:server')

const PORT = config.server.port
const HOST = config.server.host

const server = http.createServer(app)

// connect to db
initializeDb()
  .then(() => {
    console.log('Database connected successfully')
    server.listen(PORT, HOST)

    server.on('listening', () => {
      const address = server.address()
      console.log(
        '🚀  Starting server on %s:%s',
        address.address,
        address.port,
      )
    })

    server.on('error', (err) => {
      console.log(`⚠  ${err}`)
      throw err
    })
  })
  .catch((err) => {
    console.log(err)
    // console.log(err)
    process.exit(1)
  })

process.on('SIGINT', () => {
  console.log('shutting down!')
  disconnect() // 关闭mysql
  server.close()
  process.exit()
})

process.on('uncaughtException', (error) => {
  console.log(`uncaughtException: ${error.message}`)
  console.log(error.stack)
  debug(error.stack)
  process.exit(1)
})


text:
package com.xero.api.client;

import org.junit.*;

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;

import com.xero.api.ApiClient;
import com.xero.models.accounting.*;

import org.threeten.bp.*;
import java.io.IOException;

import java.io.IOException;

public class AccountingApiTaxRatesTest {

  ApiClient defaultClient;
  AccountingApi accountingApi;
  String accessToken;
  String xeroTenantId;

  private static boolean setUpIsDone = false;

  @Before
  public void setUp() {
    // Set Access Token and Tenant Id
    accessToken = "123";
    xeroTenantId = "xyz";

    // Init AccountingApi client
    // NEW Sandbox for API Mocking
    defaultClient =
        new ApiClient(
            "https://xero-accounting.getsandbox.com:443/api.xro/2.0", null, null, null, null);
    accountingApi = AccountingApi.getInstance(defaultClient);

    // ADDED TO MANAGE RATE LIMITS while using SwaggerHub to mock APIs
    if (setUpIsDone) {
      return;
    }

    try {
      System.out.println("Sleep for 60 seconds");
      Thread.sleep(60);
    } catch (InterruptedException e) {
      System.out.println(e);
    }
    // do the setup
    setUpIsDone = true;
  }

  public void tearDown() {
    accountingApi = null;
    defaultClient = null;
  }

  @Test
  public void createTaxRatesTest() throws IOException {
    System.out.println("@Test - createTaxRates");
    TaxRates taxRates = new TaxRates();
    TaxRates response = accountingApi.createTaxRates(accessToken, xeroTenantId, taxRates);

    assertThat(response.getTaxRates().get(0).getName(), is(equalTo("SDKTax29067")));
    assertThat(response.getTaxRates().get(0).getTaxType(), is(equalTo("TAX002")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getName(),
        is(equalTo("State Tax")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getRate(), is(equalTo(2.25)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsCompound(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsNonRecoverable(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getStatus(),
        is(equalTo(com.xero.models.accounting.TaxRate.StatusEnum.ACTIVE)));
    assertThat(
        response.getTaxRates().get(0).getReportTaxType(),
        is(equalTo(com.xero.models.accounting.TaxRate.ReportTaxTypeEnum.INPUT)));
    assertThat(response.getTaxRates().get(0).getCanApplyToAssets(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToEquity(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToExpenses(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToLiabilities(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToRevenue(), is(equalTo(false)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate(), is(equalTo(2.25)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate().toString(), is(equalTo("2.25")));
    assertThat(response.getTaxRates().get(0).getEffectiveRate(), is(equalTo(2.25)));
    assertThat(response.getTaxRates().get(0).getEffectiveRate().toString(), is(equalTo("2.25")));
    // System.out.println(response.getTaxRates().get(0).toString());
  }

  @Test
  public void getTaxRatesTest() throws IOException {
    System.out.println("@Test - getTaxRates");
    String where = null;
    String order = null;
    String taxType = null;
    TaxRates response = accountingApi.getTaxRates(accessToken, xeroTenantId, where, order, taxType);

    assertThat(response.getTaxRates().get(0).getName(), is(equalTo("15% GST on Expenses")));
    assertThat(response.getTaxRates().get(0).getTaxType(), is(equalTo("INPUT2")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getName(), is(equalTo("GST")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getRate(), is(equalTo(15.0)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsCompound(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsNonRecoverable(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getStatus(),
        is(equalTo(com.xero.models.accounting.TaxRate.StatusEnum.ACTIVE)));
    assertThat(
        response.getTaxRates().get(0).getReportTaxType(),
        is(equalTo(com.xero.models.accounting.TaxRate.ReportTaxTypeEnum.INPUT)));
    assertThat(response.getTaxRates().get(0).getCanApplyToAssets(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToEquity(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToExpenses(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToLiabilities(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToRevenue(), is(equalTo(false)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate(), is(equalTo(15.0)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate().toString(), is(equalTo("15.0")));
    assertThat(response.getTaxRates().get(0).getEffectiveRate(), is(equalTo(15.0)));
    assertThat(response.getTaxRates().get(0).getEffectiveRate().toString(), is(equalTo("15.0")));
    // System.out.println(response.getTaxRates().get(0).toString());
  }

  @Test
  public void updateTaxRateTest() throws IOException {
    System.out.println("@Test - updateTaxRate");
    TaxRates taxRates = new TaxRates();
    TaxRates response = accountingApi.updateTaxRate(accessToken, xeroTenantId, taxRates);

    assertThat(response.getTaxRates().get(0).getName(), is(equalTo("SDKTax29067")));
    assertThat(response.getTaxRates().get(0).getTaxType(), is(equalTo("TAX002")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getName(),
        is(equalTo("State Tax")));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getRate(), is(equalTo(2.25)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsCompound(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getTaxComponents().get(0).getIsNonRecoverable(),
        is(equalTo(false)));
    assertThat(
        response.getTaxRates().get(0).getStatus(),
        is(equalTo(com.xero.models.accounting.TaxRate.StatusEnum.DELETED)));
    assertThat(
        response.getTaxRates().get(0).getReportTaxType(),
        is(equalTo(com.xero.models.accounting.TaxRate.ReportTaxTypeEnum.INPUT)));
    assertThat(response.getTaxRates().get(0).getCanApplyToAssets(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToEquity(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToExpenses(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToLiabilities(), is(equalTo(true)));
    assertThat(response.getTaxRates().get(0).getCanApplyToRevenue(), is(equalTo(false)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate(), is(equalTo(2.25)));
    assertThat(response.getTaxRates().get(0).getDisplayTaxRate().toString(), is(equalTo("2.25")));
    assertThat(response.getTaxRates().get(0).getEffectiveRate(), is(equalTo(2.25)));
    assertThat(response.getTaxRates().get(0).getEffectiveRate().toString(), is(equalTo("2.25")));
    // System.out.println(response.getTaxRates().get(0).toString());
  }
}


text:
class algICP_StdICP_Mesh : public algICP_StdICP, public algPDTree_CP_Mesh
{
  //
  // This class implements the standard ICP algorithm for
  //  a mesh target shape.
  //

  //--- Algorithm Parameters ---//

  //--- Algorithm Methods ---//

public:

  // constructor
  algICP_StdICP_Mesh(PDTree_Mesh *pTree, vctDynamicVector<vct3> &samplePts)
    : algICP_StdICP(pTree, samplePts),
    algPDTree_CP_Mesh(pTree)
  {}

  // destructor
  virtual ~algICP_StdICP_Mesh() {}

};

#endif


text:
using System;

namespace YesSql.Storage
{
    public class DocumentIdentity : IIdentityEntity
    {
        public DocumentIdentity(long id, object entity)
        {
            Id = id;
            Entity = entity;
            EntityType = entity.GetType();
        }

        public DocumentIdentity(long id, Type type)
        {
            Id = id;
            Entity = null;
            EntityType = type;
        }

        public long Id { get; set; }
        public object Entity { get; set; }
        public Type EntityType { get; set; }
    }
}


text:
@interface KKWeakProxy : NSProxy

+ (instancetype)proxyForTarget:(id)target;

@end


text:
package joshie.mariculture.core.tile;

import java.util.ArrayList;

import joshie.mariculture.api.core.Environment.Temperature;
import joshie.mariculture.api.core.recipes.FuelInfo;
import joshie.mariculture.api.core.recipes.RecipeSmelter;
import joshie.mariculture.api.core.MaricultureHandlers;
import joshie.mariculture.core.config.Machines.MachineSettings;
import joshie.mariculture.core.gui.feature.FeatureEject.EjectSetting;
import joshie.mariculture.core.gui.feature.FeatureNotifications.NotificationType;
import joshie.mariculture.core.gui.feature.FeatureRedstone.RedstoneMode;
import joshie.mariculture.core.helpers.FluidHelper;
import joshie.mariculture.core.helpers.cofh.BlockHelper;
import joshie.mariculture.core.lib.MachineMultiMeta;
import joshie.mariculture.core.lib.MachineSpeeds;
import joshie.mariculture.core.lib.MetalRates;
import joshie.mariculture.core.network.PacketHandler;
import joshie.mariculture.core.tile.base.TileMultiMachineTank;
import joshie.mariculture.core.util.IHasNotification;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;

public class TileCrucible extends TileMultiMachineTank implements IHasNotification {
    private static final int MAX_TEMP = 25000;
    private int temp;
    private boolean canFuel;
    private int cooling;
    private double melting_modifier = 1.0D;

    public TileCrucible() {
        max = MachineSpeeds.getCrucibleSpeed();
        inventory = new ItemStack[9];
        needsInit = true;
    }

    private static final int liquid_in = 3;
    private static final int liquid_out = 4;
    private static final int[] in = new int[] { 5, 6 };
    private static final int fuel = 7;
    private static final int out = 8;

    @Override
    public int[] getInputSlots() {
        return in;
    }

    @Override
    public int[] getAccessibleSlotsFromSide(int side) {
        return new int[] { 3, 4, 5, 6, 7, 8 };
    }

    @Override
    public void setInventorySlotContents(int slot, ItemStack stack) {
        super.setInventorySlotContents(slot, stack);
        canWork = canWork();
    }

    @Override
    public boolean canInsertItem(int slot, ItemStack stack, int side) {
        if (FluidHelper.isFluidOrEmpty(stack)) return slot == liquid_in;
        if (MaricultureHandlers.crucible.getFuelInfo(stack) != null) return slot == fuel;
        return slot == 5 || slot == 6;
    }

    @Override
    public boolean canExtractItem(int slot, ItemStack stack, int side) {
        return slot == out || slot == liquid_out;
    }

    @Override
    public EjectSetting getEjectType() {
        return EjectSetting.ITEMNFLUID;
    }

    @Override
    public boolean isNotificationVisible(NotificationType type) {
        return false;
    }

    @Override
    public boolean canWork() {
        return hasTemperature() && hasItem() && rsAllowsWork() && hasRoom();
    }

    private boolean hasTemperature() {
        return temp > 0;
    }

    private boolean hasItem() {
        return inventory[in[0]] != null || inventory[in[1]] != null;
    }

    private boolean hasRoom() {
        return canMelt(0) || canMelt(1);
    }

    private boolean areStacksEqual(ItemStack stack1, ItemStack stack2) {
        return stack1.getItem() == stack2.getItem() && stack1.getItemDamage() == stack2.getItemDamage();
    }

    @Override
    public void updateMasterMachine() {
        if (!worldObj.isRemote) {
            heatUp();
            coolDown();
            if (canWork) {
                processed += speed * 50 * melting_modifier;
                if (processed >= max) {
                    processed = 0;
                    if (canWork()) {
                        if (canMelt(0)) {
                            melt(0);
                        }
                        if (canMelt(1)) {
                            melt(1);
                        }
                    }

                    canWork = canWork();
                }
            } else {
                processed = 0;
            }

            if (processed <= 0) {
                processed = 0;
            }

            if (onTick(100) && tank.getFluidAmount() > 0 && RedstoneMode.canWork(this, mode) && EjectSetting.canEject(setting, EjectSetting.FLUID)) {
                helper.ejectFluid(new int[] { 5000, MetalRates.BLOCK, 1000, MetalRates.ORE, MetalRates.INGOT, MetalRates.NUGGET, 1 });
            }
        }
    }

    @Override
    public void updateSlaveMachine() {
        if (onTick(100)) {
            TileCrucible mstr = (TileCrucible) getMaster();
            if (mstr != null && mstr.tank.getFluidAmount() > 0 && RedstoneMode.canWork(this, mstr.mode) && EjectSetting.canEject(mstr.setting, EjectSetting.FLUID)) {
                helper.ejectFluid(new int[] { 5000, MetalRates.BLOCK, 1000, MetalRates.ORE, MetalRates.INGOT, MetalRates.NUGGET, 1 });
            }
        }
    }

    private class FuelHandler {
        private int usedHeat;
        private int tick;
        private FuelInfo info;

        private void read(NBTTagCompound nbt) {
            if (nbt.getBoolean("HasHandler")) {
                info = new FuelInfo();
                info.read(nbt);
            }
        }

        private void write(NBTTagCompound nbt) {
            if (info != null) {
                nbt.setBoolean("HasHandler", true);
                info.write(nbt);
            }
        }

        private void set(FuelInfo info) {
            this.info = info;
            tick = 0;
            usedHeat = 0;
        }

        private int getMaxTempPer(int purity) {
            return info.maxTempPer * (purity + 1);
        }

        private int tick(int temp, int purity) {
            int realUsed = usedHeat * 2000 / MAX_TEMP;
            int realTemp = temp * 2000 / MAX_TEMP;

            tick++;

            if (realUsed < getMaxTempPer(purity) && realTemp < info.maxTemp) {
                temp += heat / 3 + 1;
                usedHeat += heat / 3 + 1;
            }

            if (realUsed >= getMaxTempPer(purity) || tick >= info.ticksPer) {
                info = null;
                if (canFuel()) {
                    fuelHandler.set(getInfo());
                } else {
                    fuelHandler.set(null);
                }
            }

            return temp;
        }
    }

    private FuelHandler fuelHandler;

    private boolean canFuel() {
        if (fuelHandler.info != null) return false;
        if (!rsAllowsWork()) return false;
        if (MaricultureHandlers.crucible.getFuelInfo(inventory[fuel]) != null) return true;
        TileEntity tile = BlockHelper.getAdjacentTileEntity(this, ForgeDirection.DOWN);
        if (tile instanceof IFluidHandler) {
            FluidStack fluid = ((IFluidHandler) tile).drain(ForgeDirection.UP, 10, false);
            if (fluid != null && fluid.getFluid() != null) {
                return MaricultureHandlers.crucible.getFuelInfo(fluid) != null;
            }
        }

        return false;
    }

    private void heatUp() {
        if (fuelHandler == null) {
            fuelHandler = new FuelHandler();
        }

        if (onTick(20)) {
            canFuel = canFuel();
        }

        if (canFuel) {
            fuelHandler.set(getInfo());
            canFuel = false;
        }

        if (fuelHandler.info != null) {
            temp = Math.min(MAX_TEMP, fuelHandler.tick(temp, purity));
            if (temp >= MAX_TEMP) {
                temp = MAX_TEMP;
            }
        }
    }

    private void coolDown() {
        if (cooling <= 0) {
            cooling = Math.max(1, Temperature.getCoolingSpeed(MaricultureHandlers.environment.getBiomeTemperature(worldObj, xCoord, yCoord, zCoord)));
        }

        if (onTick(20)) {
            temp -= cooling;

            if (temp <= 0) {
                temp = 0;
            }
        }
    }

    public FuelInfo getInfo() {
        FuelInfo info = MaricultureHandlers.crucible.getFuelInfo(inventory[fuel]);
        if (info == null) {
            TileEntity tile = BlockHelper.getAdjacentTileEntity(this, ForgeDirection.DOWN);
            if (tile instanceof IFluidHandler) {
                FluidStack fluid = ((IFluidHandler) tile).drain(ForgeDirection.UP, 10, true);
                if (fluid != null) {
                    return MaricultureHandlers.crucible.getFuelInfo(fluid);
                }
            }
        } else {
            decrStackSize(fuel, 1);
        }

        return info;
    }

    private boolean canMelt(int slot) {
        int other = slot == 0 ? 1 : 0;
        RecipeSmelter recipe = MaricultureHandlers.crucible.getResult(inventory[in[slot]], inventory[in[other]], getTemperatureScaled(2000), MaricultureHandlers.upgrades.hasUpgrade("ethereal", this));
        if (recipe == null) return false;
        int fluidAmount = recipe.fluid.amount;
        FluidStack fluid = recipe.fluid.copy();
        fluid.amount = fluidAmount;
        if (tank.fill(fluid, false) < fluid.amount) return false;
        boolean ret = recipe.output == null || setting.canEject(EjectSetting.ITEM);
        if (ret == false) {
            ret = inventory[out] == null || areStacksEqual(inventory[out], recipe.output) && inventory[out].stackSize + recipe.output.stackSize <= inventory[out].getMaxStackSize();
        }

        if (ret == true) {
            int realTemp = temp * 2000 / MAX_TEMP;
            int max_temp = 2000 - recipe.temp;
            melting_modifier = 1.0D + Math.min(realTemp, max_temp) * 3.333333D / 2000;
            return true;
        } else return false;
    }

    private void melt(int slot) {
        int other = slot == 0 ? 1 : 0;
        RecipeSmelter recipe = MaricultureHandlers.crucible.getResult(inventory[in[slot]], inventory[in[other]], getTemperatureScaled(2000), MaricultureHandlers.upgrades.hasUpgrade("ethereal", this));
        if (recipe == null) return;
        decrStackSize(in[slot], recipe.input.stackSize);
        int fluidAmount = recipe.fluid.amount;
        FluidStack fluid = recipe.fluid.copy();
        fluid.amount = fluidAmount;
        tank.fill(fluid, true);
        if (recipe.output != null && recipe.chance > 0) {
            if (worldObj.rand.nextInt(recipe.chance) == 0) {
                helper.insertStack(recipe.output.copy(), new int[] { out });
            }
        }

    }

    // Gui Data
    @Override
    public void setGUIData(int id, int value) {
        super.setGUIData(id, value);
        int realID = id - offset;
        switch (realID) {
            case 0:
                temp = value;
            case 1:
                burnHeight = value;
        }
    }

    private int burnHeight = 0;

    public int getBurnTimeRemainingScaled() {
        return burnHeight;
    }

    @Override
    public ArrayList<Integer> getGUIData() {
        ArrayList<Integer> list = super.getGUIData();
        list.add(temp);
        if (fuelHandler.info != null) {
            burnHeight = 11 - fuelHandler.tick * 12 / fuelHandler.info.ticksPer;
            list.add(burnHeight);
        } else {
            list.add(0);
        }

        return list;
    }

    public int getTemperatureScaled(int i) {
        return temp * i / MAX_TEMP;
    }

    public String getRealTemperature() {
        return "" + temp * 2000 / MAX_TEMP;
    }

    public int getFluidAmount(String name, int amount) {
        if (name.startsWith("ore")) {
            amount += (purity * MachineSettings.PURITY);
        }

        return amount;
    }

    @Override
    public void readFromNBT(NBTTagCompound nbt) {
        super.readFromNBT(nbt);
        temp = nbt.getInteger("Temperature");
        canFuel = nbt.getBoolean("CanFuel");
        fuelHandler = new FuelHandler();
        fuelHandler.read(nbt);
        cooling = nbt.getInteger("CoolingSpeed");
        melting_modifier = nbt.getDouble("MeltingModifier");
    }

    @Override
    public void writeToNBT(NBTTagCompound nbt) {
        super.writeToNBT(nbt);
        nbt.setInteger("CoolingSpeed", cooling);
        nbt.setInteger("Temperature", temp);
        nbt.setDouble("MeltingModifier", melting_modifier);
        nbt.setBoolean("CanFuel", canFuel);
        if (fuelHandler != null) {
            fuelHandler.write(nbt);
        }
    }

    // Master stuff
    @Override
    public void onBlockPlaced() {
        onBlockPlaced(xCoord, yCoord, zCoord);
        PacketHandler.updateRender(this);
    }

    private void onBlockPlaced(int x, int y, int z) {
        if (isPart(xCoord, yCoord + 1, zCoord) && !isPart(xCoord, yCoord - 1, zCoord) && !isPart(xCoord, yCoord + 2, zCoord)) {
            MultiPart mstr = new MultiPart(xCoord, yCoord, zCoord);
            ArrayList<MultiPart> parts = new ArrayList<MultiPart>();
            parts.add(setAsSlave(mstr, xCoord, yCoord + 1, zCoord));
            setAsMaster(mstr, parts);
        }

        if (isPart(xCoord, yCoord - 1, zCoord) && !isPart(xCoord, yCoord + 1, zCoord) && !isPart(xCoord, yCoord - 2, zCoord)) {
            MultiPart mstr = new MultiPart(xCoord, yCoord - 1, zCoord);
            ArrayList<MultiPart> parts = new ArrayList<MultiPart>();
            parts.add(setAsSlave(mstr, xCoord, yCoord, zCoord));
            setAsMaster(mstr, parts);
        }
    }

    @Override
    public boolean isPart(int x, int y, int z) {
        return worldObj.getBlock(x, y, z) == getBlockType() && worldObj.getBlockMetadata(x, y, z) == MachineMultiMeta.CRUCIBLE & !isPartnered(x, y, z);
    }
}


text:
import pytest

import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.wcs import WCS

from ..base_conversions import UnitConverter

from ._testing_data import hdr

def test_UnitConverter_nowcs():
    '''
    Only pixel to pixel conversions
    '''

    convert = UnitConverter()

    twopix = 2 * u.pix

    assert convert.to_pixel(twopix) == twopix
    assert convert.to_pixel_area(twopix**2) == twopix**2

    with pytest.raises(AttributeError):
        convert.ang_size

    with pytest.raises(AttributeError):
        convert.from_pixel(twopix, u.deg)

    with pytest.raises(AttributeError):
        convert.to_angular(twopix)

def test_UnitConverter_nodistance():

    mywcs = WCS(hdr)

    convert = UnitConverter(mywcs)

    assert convert.ang_size.value == np.abs(hdr['CDELT2'])
    assert convert.ang_size.unit == mywcs.wcs.cunit[0]

    twopix_ang = np.abs(hdr['CDELT2']) * 2 * u.deg
    assert convert.to_pixel(twopix_ang).value == 2.

    assert convert.to_pixel_area(twopix_ang**2) == 4 * u.pix**2

    assert convert.from_pixel(2 * u.pix, u.deg) == twopix_ang
    assert convert.to_angular(2 * u.pix, u.deg) == twopix_ang

    # Round trip
    assert convert.to_pixel(convert.from_pixel(2 * u.pix, u.deg)) == 2 * u.pix
    assert convert.to_pixel(convert.to_angular(2 * u.pix, u.deg)) == 2 * u.pix

    assert convert.from_pixel(convert.to_pixel(twopix_ang), u.deg) == twopix_ang
    assert convert.to_angular(convert.to_pixel(twopix_ang), u.deg) == twopix_ang

    # Physical conversions should fail
    with pytest.raises(AttributeError):
        convert.from_pixel(2 * u.pix, u.pc)
    with pytest.raises(AttributeError):
        assert convert.to_physical(2 * u.pix, u.pc)

def test_UnitConverter():

    mywcs = WCS(hdr)

    distance = 250 * u.pc

    convert = UnitConverter(mywcs, distance=distance)

    assert convert.ang_size.value == np.abs(hdr['CDELT2'])
    assert convert.ang_size.unit == mywcs.wcs.cunit[0]

    twopix_ang = np.abs(hdr['CDELT2']) * 2 * u.deg
    twopix_phys = twopix_ang.to(u.rad).value * distance
    assert convert.to_pixel(twopix_ang).value == 2.
    npt.assert_allclose(convert.to_pixel(twopix_phys).value, 2.)

    assert convert.to_pixel_area(twopix_ang**2) == 4 * u.pix**2
    npt.assert_allclose(convert.to_pixel_area(twopix_phys**2).value, 4.)

    assert convert.from_pixel(2 * u.pix, u.deg) == twopix_ang
    assert convert.to_angular(2 * u.pix, u.deg) == twopix_ang

    npt.assert_allclose(convert.from_pixel(2 * u.pix, u.pc), twopix_phys)
    npt.assert_allclose(convert.to_physical(2 * u.pix, u.pc), twopix_phys)

    # Round trip
    assert convert.to_pixel(convert.from_pixel(2 * u.pix, u.deg)) == 2 * u.pix
    assert convert.to_pixel(convert.to_angular(2 * u.pix, u.deg)) == 2 * u.pix

    assert convert.from_pixel(convert.to_pixel(twopix_ang), u.deg) == twopix_ang
    assert convert.to_angular(convert.to_pixel(twopix_ang), u.deg) == twopix_ang

    assert convert.to_pixel(convert.from_pixel(2 * u.pix, u.pc)) == 2 * u.pix
    assert convert.to_pixel(convert.to_physical(2 * u.pix, u.pc)) == 2 * u.pix

    assert convert.from_pixel(convert.to_pixel(twopix_phys), u.pc) == twopix_phys
    assert convert.to_physical(convert.to_pixel(twopix_phys), u.pc) == twopix_phys

@pytest.mark.xfail(raises=u.UnitConversionError)
def test_UnitConverter_bad_distance_unit():

    mywcs = WCS(hdr)

    distance = 250 * u.K

    UnitConverter(mywcs, distance=distance)

@pytest.mark.xfail(raises=TypeError)
def test_UnitConverter_bad_angular_unit():

    mywcs = WCS(hdr)

    convert = UnitConverter(mywcs)

    assert convert.to_pixel(np.abs(hdr['CDELT2']) * 2).value == 2.


text:
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../../..'

export const run = editor => {
  Transforms.delete(editor, { unit: 'character', reverse: true })
}
export const input = (
  <editor>
    <block>
      one
      <inline>two</inline>
      a<cursor />
    </block>
  </editor>
)
export const output = (
  <editor>
    <block>
      one
      <inline>two</inline>
      <cursor />
    </block>
  </editor>
)


text:
<!doctype html>

	<meta charset="utf-8">
	<title><?php echo lang("update_account_demo"); ?> | Flexi Auth | <?php echo lang("a_user_authentication_library"); ?></title>
	<meta name="description" content="Flexi Auth, the user authentication library designed for developers."/>
	<meta name="keywords" content="demo, Flexi Auth, user authentication, Codeigniter"/>
	<?php $this->load->view('includes/head'); ?>

	<?php $this->load->view('includes/header'); ?>

	<?php $this->load->view('includes/demo_header'); ?>

<?php echo lang("public_update_account_details"); ?>

The data saved within user accounts typically consists of two primary types, data that is essential for user authentication and then user profile data.

The essential user authentication data consists of information like a users email address and password that are required by users to securely log into their account. In addition to this, the flexi auth library can also automatically save and manage user data like IP addresses, last login dates etc.

As for the user profile data, flexi auth allows you to save and relate whatever data you require to the users account, whether that data is all stored in the same table, or via multiple tables. The design of the database schema is up to you.

This demo includes two example tables to store user data, a user profile table for the users name and contact details, and an address table so the user can save and relate an <a href="<?php echo $base_url;?>auth_public/manage_address_book">address book to their account.

<?php echo lang("update_account_details"); ?>

				<a href="<?php echo $base_url;?>auth_public/change_password"><?php echo lang("change_password"); ?>

			<?php if (! empty($message)) { ?>

					<?php echo $message; ?>

			<?php } ?>

				<?php echo form_open(current_url());	?>
					<fieldset>
						<legend><?php echo lang("personal_details"); ?></legend>

								<?php echo lang("first_name"); ?>:
								<input type="text" id="first_name" name="update_first_name" value="<?php echo set_value('update_first_name',$user['upro_first_name']);?>"/>

								<?php echo lang("last_name"); ?>:
								<input type="text" id="last_name" name="update_last_name" value="<?php echo set_value('update_last_name',$user['upro_last_name']);?>"/>

					</fieldset>

					<fieldset>
						<legend><?php echo lang("contact_details"); ?></legend>

								<?php echo lang("phone_number"); ?>:
								<input type="text" id="phone_number" name="update_phone_number" value="<?php echo set_value('update_phone_number',$user['upro_phone']);?>"/>

								<?php $newsletter = ($user['upro_newsletter'] == 1) ;?>
								<?php echo lang("subscribe_to_newsletter"); ?>:
								<input type="checkbox" id="newsletter" name="update_newsletter" value="1" <?php echo set_checkbox('update_newsletter',1,$newsletter); ?>/>

					</fieldset>

					<fieldset>
						<legend><?php echo lang("login_details"); ?></legend>

								Email:
								<input type="text" id="email" name="update_email" value="<?php echo set_value('update_email',$user[$this->flexi_auth->db_column('user_acc', 'email')]);?>" class="tooltip_trigger"
									title="Set an email address that can be used to login with."
								/>

									Note: This method simply updates the users email address, if you want to verify the user has spelt their new email address correctly, you can send them a verification email to their new email address.

									<a href="<?php echo $base_url;?>auth_public/update_email">Click here to see an example of updating a users email via email verification.

								<?php echo lang("username"); ?>:
								<input type="text" id="username" name="update_username" value="<?php echo set_value('update_username',$user[$this->flexi_auth->db_column('user_acc', 'username')]);?>" class="tooltip_trigger"
									title="Set a username that can be used to login with."
								/>

								<?php echo lang("password"); ?>:
								<a href="<?php echo $base_url;?>auth_public/change_password"><?php echo lang("click_here_to_change_your_password"); ?>

					</fieldset>

					<fieldset>
						<legend><?php echo lang("update_account"); ?></legend>

Important Note

								The data saved via this demo is available for anyone else using the demo to see, therefore, it is recommended you do not include any personal details. All data that is saved via this demo, is completely wiped every few hours.

								<?php echo lang("update_account"); ?>:
								<input type="submit" name="update_account" id="submit" value="<?php echo lang("submit"); ?>" class="link_button large"/>

					</fieldset>
				<?php echo form_close();?>

	<?php $this->load->view('includes/footer'); ?>

<?php $this->load->view('includes/scripts'); ?>


text:
package fr.jmini.htmlchecker.rules.impl;

import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.selesse.jxlint.model.rules.LintError;
import com.selesse.jxlint.model.rules.LintRule;
import com.selesse.jxlint.model.rules.Severity;
import com.selesse.jxlint.utils.FileUtils;

import net.htmlparser.jericho.Source;

public abstract class AbstractJerichoRule extends LintRule {
  private static final Logger LOG = LoggerFactory.getLogger(AbstractJerichoRule.class);

  public AbstractJerichoRule(String name, String summary, Severity severity, Enum<?> category) {
    super(name, summary, "", severity, category);
    setDetailedDescription(getMarkdownDescription());
  }

  @Override
  public List<File> getFilesToValidate() {
    return FileUtils.allFilesMatching(getSourceDirectory(), ".*\\.html");
  }

  @Override
  public List<LintError> getLintErrors(File file) {
    try {
      Source source = new Source(file);
      return computeLintErrors(source, file);
    }
    catch (IOException e) {
      LOG.error("Error reading file", e);
    }
    return Collections.emptyList();
  }

  protected Optional<LintError> createLintError(File file, String errorMessage, int lineNumber) {
    return Optional.of(LintError.with(this, file)
        .andErrorMessage(errorMessage)
        .andLineNumber(lineNumber)
        .create());
  }

  protected abstract List<LintError> computeLintErrors(Source source, File file);
}


text:
![Quasar Framework logo](https://cdn.quasar.dev/logo-v2/header.png)

# Quasar Framework

> Build high-performance VueJS user interfaces in record time: responsive Single Page Apps, SSR Apps, PWAs, Browser extensions, Hybrid Mobile Apps and Electron Apps. If you want, all using the same codebase!

[![Join the chat at https://chat.quasar.dev](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://chat.quasar.dev)

[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)

## Scaffolding app

This app is used to scaffold Quasar CLI project folders.

```bash
yarn create quasar
# or:
npm init quasar
```

## Supporting Quasar
Quasar Framework is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/rstoenescu/quasar-framework/blob/dev/backers.md).

**Please read our manifest on [Why donations are important](https://quasar.dev/why-donate)**. If you'd like to become a donator, check out [Quasar Framework's Donator campaign](https://donate.quasar.dev).

## Documentation

Head on to the Quasar Framework official website: [https://quasar.dev](https://quasar.dev)

## Stay in Touch

For latest releases and announcements, follow on Twitter: [@quasarframework](https://twitter.com/quasarframework)

## Chat Support

Ask questions at the official community Discord server: [https://chat.quasar.dev](https://chat.quasar.dev)

## Community Forum

Ask questions at the official community forum: [https://forum.quasar.dev](https://forum.quasar.dev)

## Contributing

I'm excited if you want to contribute to Quasar under any form (report bugs, write a plugin, fix an issue, write a new feature). Please read the [Contributing Guide](../CONTRIBUTING.md).

## Semver
Quasar is following [Semantic Versioning 2.0](https://semver.org/).

## License

Copyright (c) 2015-present Razvan Stoenescu

[MIT License](http://en.wikipedia.org/wiki/MIT_License)


text:
class EventFilterTest: public CppUnit::TestCase
{
public:
	EventFilterTest(const std::string& name);
	~EventFilterTest();

	void testIsGreaterThanFilter();
	void testIsGreaterThanOrEqualToFilter();
	void testIsLessThanFilter();
	void testIsLessThanOrEqualToFilter();
	void testLogicalOrFilter();
	void testLogicalAndFilter();
	void testLogicalXorFilter();
	void testMinimumDeltaFilter();
	void testMinimumIntervalFilter();
	void testMinimumIntervalOrDeltaFilter();
	void testHysteresisFilter();

	void setUp();
	void tearDown();

	static CppUnit::Test* suite();
};

#endif // EventFilterTest_INCLUDED


text:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
       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. See accompanying LICENSE file.
          -->

<!-- Put site-specific property overrides in this file. -->

<configuration>

  <property>
    <!-- Indicate we want to actually use YARN -->
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
  <property>
    <!-- Map-Reduce Job History host -->
    <name>mapreduce.jobhistory.address</name>
    <value>___MRJOBHISTORYIP___:10020</value>
  </property>
  <property>
    <name>mapred.task.timeout</name>
    <value>1800000</value> <!-- 30 minutes -->
  </property>

</configuration>


text:
<ruleset name="Aucklandairport.co.nz">
  <target host="aucklandairport.co.nz" />
  <target host="www.aucklandairport.co.nz" />

  <rule from="^http:" to="https:" />
</ruleset>


text:
name(smtp).
title('An (E)SMTP client for sending mail').
version('1.0.0').
keywords([smtp, mail, sendmail]).
author('Jan Wielemaker', 'J.Wielemaker@vu.nl').
home('https://github.com/JanWielemaker/smtp').
download('https://github.com/JanWielemaker/smtp/releases/*.zip').


text:
<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat licenses this file to you 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.

-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>zipImage</id>
  <formats>
    <format>zip</format>
  </formats>

  <fileSets>
    <fileSet>
      <directory>target/jube</directory>
      <outputDirectory>/</outputDirectory>
      <excludes>
        <exclude>**/*.sh</exclude>
        <exclude>**/*.bat</exclude>
        <exclude>bin/**</exclude>
      </excludes>
    </fileSet>

    <!-- Copy over bin/* scripts separately to get the correct file mode -->
    <fileSet>
      <directory>target/jube</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>bin/*</include>
        <include>**/*.sh</include>
      </includes>
      <excludes>
        <exclude>bin/create</exclude>
      </excludes>
      <lineEnding>unix</lineEnding>
      <fileMode>0755</fileMode>
    </fileSet>
    <fileSet>
      <directory>target/jube</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>**/*.bat</include>
      </includes>
      <lineEnding>dos</lineEnding>
      <fileMode>0755</fileMode>
    </fileSet>

    <fileSet>
      <directory>target/jube</directory>
      <outputDirectory>/</outputDirectory>
      <lineEnding>unix</lineEnding>
      <fileMode>0644</fileMode>
      <directoryMode>0775</directoryMode>
      <excludes>
        <exclude>**/*.png</exclude>
        <exclude>**/*.jpg</exclude>
        <exclude>**/*.jpeg</exclude>
        <exclude>**/*.gif</exclude>
      </excludes>
    </fileSet>

    <fileSet>
      <directory>target/jube</directory>
      <outputDirectory>/</outputDirectory>
      <fileMode>0644</fileMode>
      <directoryMode>0775</directoryMode>
      <includes>
        <include>**/*.png</include>
        <include>**/*.jpg</include>
        <include>**/*.jpeg</include>
        <include>**/*.gif</include>
      </includes>
    </fileSet>
  </fileSets>

</assembly>


text:
 /**
  * @filedescription Model for Stats
  */

'use strict';

module.exports = function() {
  return {
    // distance in meters the player has walked
    distance: 0,

    // zombie head count
    zombiesShot: 0,

    // shots fired
    shotsFired: 0,

    // number of player deaths
    deaths: 0,

    // count of shots that hit a zombie
    zombieHit: 0,

    // count of headshots (currently a zombie can only be killed by headshots,
    // expect this number to equal zombiesShot)
    headShots: 0
  }
};


text:
(function() {

  var
    $id = document.getElementById.bind(document),
    counter = 0,
    $bnr = $id('bnr'),
    $animEnd = $id('anim-end');

  function bnrAddClass() {
    $bnr.classList.add('anim');
  }

  bnrAddClass();

  // 'polyfill' - w sensie czy nie prefix
  $animEnd.addEventListener('animationend', function() {
    counter++;
    if (counter === 2) {
      counter = 0;
      $bnr.classList.remove('anim');
      setTimeout(bnrAddClass, 50);
    }
  });

}());


text:
To regenerate certificates, use [this](https://github.com/conjurdemos/dap-intro/tree/master/tools/simple-certificates)
tool:
```sh-session
$ ./generate_certificates 1 conjur-https
```

Copy the following:
- `certificates/ca-chain.cert.pem` -> `ca.crt`
- `certificates/nodes/conjur-https.mycompany.local/conjur-https.mycompany.local.cert.pem` -> `conjur.crt`
- `certificates/nodes/conjur-https.mycompany.local/conjur-https.mycompany.local.key.pem` -> `conjur.key`


text:
package org.mifos.application.surveys.business;

import java.util.Date;

import org.mifos.application.ppi.business.PPIChoice;
import org.mifos.application.surveys.exceptions.SurveyExceptionConstants;
import org.mifos.application.surveys.helpers.AnswerType;
import org.mifos.framework.exceptions.ApplicationException;
import org.mifos.framework.exceptions.InvalidDateException;
import org.mifos.framework.util.helpers.DateUtils;

public class SurveyResponse implements Comparable<SurveyResponse> {
    private int responseId;

    private SurveyInstance instance;

    private SurveyQuestion surveyQuestion;

    private String freetextValue;

    private Date dateValue;

    private QuestionChoice choiceValue;

    private String multiSelectValue;

    private Double numberValue;

    public SurveyResponse(SurveyInstance instance, SurveyQuestion question) {
        setInstance(instance);
        setSurveyQuestion(question);
    }

    public SurveyResponse() {
    }

    public Question getQuestion() {
        if (getSurveyQuestion() == null)
            return null;
        return getSurveyQuestion().getQuestion();
    }

    public void setQuestion(Question question) {
        getSurveyQuestion().setQuestion(question);
    }

    public SurveyInstance getInstance() {
        return instance;
    }

    public void setInstance(SurveyInstance instance) {
        this.instance = instance;
    }

    public int getResponseId() {
        return responseId;
    }

    public void setResponseId(int responseId) {
        this.responseId = responseId;
    }

    public QuestionChoice getChoiceValue() {
        return choiceValue;
    }

    public void setChoiceValue(QuestionChoice choice) throws ApplicationException {
        if (getQuestion().getAnswerTypeAsEnum() != AnswerType.CHOICE) {
            throw new ApplicationException(SurveyExceptionConstants.WRONG_RESPONSE_TYPE);
        }
        this.choiceValue = choice;
    }

    public void setMultiSelectValue(String multiSelectValue) {
        this.multiSelectValue = multiSelectValue;
    }

    public String getMultiSelectValue() {
        return multiSelectValue;
    }

    public Date getDateValue() {
        return dateValue;
    }

    public void setDateValue(Date dateValue) throws ApplicationException {
        if (dateValue != null && getQuestion().getAnswerTypeAsEnum() != AnswerType.DATE) {
            throw new ApplicationException(SurveyExceptionConstants.WRONG_RESPONSE_TYPE);
        }
        this.dateValue = dateValue;
    }

    public String getFreetextValue() {
        return freetextValue;
    }

    public void setFreetextValue(String freetextValue) throws ApplicationException {
        if (freetextValue != null && getQuestion().getAnswerTypeAsEnum() != AnswerType.FREETEXT) {
            throw new ApplicationException(SurveyExceptionConstants.WRONG_RESPONSE_TYPE);
        }
        this.freetextValue = freetextValue;
    }

    public Double getNumberValue() {
        return numberValue;
    }

    public void setNumberValue(Double numberValue) throws ApplicationException {
        if (numberValue != null && getQuestion().getAnswerTypeAsEnum() != AnswerType.NUMBER) {
            throw new ApplicationException(SurveyExceptionConstants.WRONG_RESPONSE_TYPE);
        }
        this.numberValue = numberValue;
    }

    public Object getValue() {
        AnswerType answerType = getQuestion().getAnswerTypeAsEnum();

        if (answerType == AnswerType.FREETEXT) {
            return getFreetextValue();
        }

        else if (answerType == AnswerType.NUMBER) {
            return getNumberValue();
        }

        else if (answerType == AnswerType.DATE) {
            return getDateValue();
        }

        else if (answerType == AnswerType.CHOICE) {
            return getChoiceValue();
        }

        else {
            return null;
        }
    }

    @Override
    public String toString() {
        AnswerType answerType = getQuestion().getAnswerTypeAsEnum();

        if (answerType == AnswerType.FREETEXT) {
            return getFreetextValue();
        }

        else if (answerType == AnswerType.NUMBER) {
            return Double.toString(numberValue);
        }

        else if (answerType == AnswerType.DATE) {
            return DateUtils.makeDateAsSentFromBrowser(getDateValue());
        }

        else if (answerType == AnswerType.CHOICE) {
            return Integer.toString(getChoiceValue().getChoiceId());
        }

        else if (answerType == AnswerType.MULTISELECT) {
            return multiSelectValue;
        }

        else {
            return null;
        }
    }

    public void setStringValue(String value) throws ApplicationException, InvalidDateException {
        if (getQuestion() == null || getQuestion().getAnswerTypeAsEnum() == null) {
            throw new ApplicationException(SurveyExceptionConstants.NO_ANSWER_TYPE_YET);
        }

        AnswerType answerType = getQuestion().getAnswerTypeAsEnum();
        if (answerType == AnswerType.FREETEXT) {
            setFreetextValue(value);

        } else if (answerType == AnswerType.MULTISELECT) {
            setMultiSelectValue(value);
        } else if (answerType == AnswerType.DATE) {
            setDateValue(DateUtils.getDate(value));
        } else if (answerType == AnswerType.NUMBER) {
            double numberValue = Double.parseDouble(value);
            setNumberValue(numberValue);
        } else if (answerType == AnswerType.DATE) {
            Date dateValue = DateUtils.getDateAsSentFromBrowser(value);
            setDateValue(dateValue);
        } else if (answerType == AnswerType.CHOICE) {
            int choiceId = Integer.parseInt(value);
            QuestionChoice choice = null;
            for (QuestionChoice qc : getQuestion().getChoices()) {
                if (qc.getChoiceId() == choiceId) {
                    choice = qc;
                    break;
                }
            }
            if (choice == null)
                throw new ApplicationException(SurveyExceptionConstants.NOT_CHOICE_TYPE);

            setChoiceValue(choice);
        }
    }

    public void setValue(Object value) throws ApplicationException {

        if (getQuestion() == null || getQuestion().getAnswerTypeAsEnum() == null) {
            throw new ApplicationException(SurveyExceptionConstants.NO_ANSWER_TYPE_YET);
        }

        AnswerType answerType = getQuestion().getAnswerTypeAsEnum();

        try {
            if (answerType == AnswerType.FREETEXT) {
                setFreetextValue((String) value);
            }

            else if (answerType == AnswerType.DATE) {
                setDateValue((Date) value);
            }

            else if (answerType == AnswerType.NUMBER) {
                setNumberValue((Double) value);
            }

            else if (answerType == AnswerType.CHOICE) {
                setChoiceValue((QuestionChoice) value);
            }

            else if (answerType == AnswerType.MULTISELECT) {
                setMultiSelectValue((String) value);
            }
        } catch (ClassCastException e) {
            throw new ApplicationException(SurveyExceptionConstants.WRONG_RESPONSE_TYPE);
        }
    }

    public void setSurveyQuestion(SurveyQuestion surveyQuestion) {
        this.surveyQuestion = surveyQuestion;
    }

    public SurveyQuestion getSurveyQuestion() {
        return surveyQuestion;
    }

    @Override
    public final boolean equals(Object o) {
        if (o == null) {
            return false;
        }

        if (!(o instanceof SurveyResponse)) {
            return false;
        }

        SurveyResponse response = (SurveyResponse) o;
        return response.getResponseId() == responseId;
    }

    @Override
    public int hashCode() {
        return new Integer(responseId).hashCode();
    }

    public int compareTo(SurveyResponse o) {
        return getSurveyQuestion().compareTo(o.getSurveyQuestion());
    }

    /**
     * this method is added to test PpiSurveyInstance.computeScore That method
     * needs to query each response for its points. TODO: This needs to be
     * cleaned up so that the method is queried only for PpiSurveyInstances.
     */
    public int getPoints() {
        PPIChoice choice = (PPIChoice) getChoiceValue();
        return choice.getPoints();
    }
}


text:
package fake_operationq

import (
	"sync"

	"code.cloudfoundry.org/operationq"
)

type FakeOperation struct {
	KeyStub        func() string
	keyMutex       sync.RWMutex
	keyArgsForCall []struct{}
	keyReturns     struct {
		result1 string
	}
	ExecuteStub        func()
	executeMutex       sync.RWMutex
	executeArgsForCall []struct{}
}

func (fake *FakeOperation) Key() string {
	fake.keyMutex.Lock()
	fake.keyArgsForCall = append(fake.keyArgsForCall, struct{}{})
	fake.keyMutex.Unlock()
	if fake.KeyStub != nil {
		return fake.KeyStub()
	} else {
		return fake.keyReturns.result1
	}
}

func (fake *FakeOperation) KeyCallCount() int {
	fake.keyMutex.RLock()
	defer fake.keyMutex.RUnlock()
	return len(fake.keyArgsForCall)
}

func (fake *FakeOperation) KeyReturns(result1 string) {
	fake.KeyStub = nil
	fake.keyReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeOperation) Execute() {
	fake.executeMutex.Lock()
	fake.executeArgsForCall = append(fake.executeArgsForCall, struct{}{})
	fake.executeMutex.Unlock()
	if fake.ExecuteStub != nil {
		fake.ExecuteStub()
	}
}

func (fake *FakeOperation) ExecuteCallCount() int {
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	return len(fake.executeArgsForCall)
}

var _ operationq.Operation = new(FakeOperation)


text:
{% extends "base.html" %}

{% block breadcrumbs %}
    {{ block.super }}
    » Resources
    » {{ tag }}
{% endblock %}

{% block content %}

        {% if resources %}
            {% for resource in resources %}

                {{ resource.title }}

            {% endfor %}

        {% else %}

No resources available.

        {% endif %}

{% endblock %}


text:
@class DXTableModel;

@interface DXTableViewSourceOptions : NSObject

@property (nonatomic, unsafe_unretained) Class cellClass;

@end

@interface DXTableViewSource : NSObject <UITableViewDataSource, UITableViewDelegate>

// sets tableView delegate and dataSource to self and registers cell resources (classes and nibs) provided by tableModel.
- (instancetype)initWithTableView:(UITableView *)tableView
                       tableModel:(DXTableModel *)tableModel
                          options:(DXTableViewSourceOptions *)options;

@end


text:
'use strict';

function initializePDFJS(callback) {
  Promise.all(['pdfjs/display/global', 'pdfjs-test/unit/annotation_spec', 'pdfjs-test/unit/api_spec', 'pdfjs-test/unit/bidi_spec', 'pdfjs-test/unit/cff_parser_spec', 'pdfjs-test/unit/cmap_spec', 'pdfjs-test/unit/crypto_spec', 'pdfjs-test/unit/document_spec', 'pdfjs-test/unit/dom_utils_spec', 'pdfjs-test/unit/evaluator_spec', 'pdfjs-test/unit/fonts_spec', 'pdfjs-test/unit/function_spec', 'pdfjs-test/unit/metadata_spec', 'pdfjs-test/unit/murmurhash3_spec', 'pdfjs-test/unit/network_spec', 'pdfjs-test/unit/parser_spec', 'pdfjs-test/unit/primitives_spec', 'pdfjs-test/unit/stream_spec', 'pdfjs-test/unit/type1_parser_spec', 'pdfjs-test/unit/ui_utils_spec', 'pdfjs-test/unit/unicode_spec', 'pdfjs-test/unit/util_spec'].map(function (moduleName) {
    return SystemJS.import(moduleName);
  })).then(function (modules) {
    var displayGlobal = modules[0];
    displayGlobal.PDFJS.workerSrc = '../../src/worker_loader.js';
    displayGlobal.PDFJS.pdfjsNext = true;
    callback();
  });
}
(function () {
  window.jasmine = jasmineRequire.core(jasmineRequire);
  jasmineRequire.html(jasmine);
  var env = jasmine.getEnv();
  var jasmineInterface = jasmineRequire.interface(jasmine, env);
  extend(window, jasmineInterface);
  var queryString = new jasmine.QueryString({
    getWindowLocation: function getWindowLocation() {
      return window.location;
    }
  });
  var catchingExceptions = queryString.getParam('catch');
  env.catchExceptions(typeof catchingExceptions === 'undefined' ? true : catchingExceptions);
  var throwingExpectationFailures = queryString.getParam('throwFailures');
  env.throwOnExpectationFailure(throwingExpectationFailures);
  var random = queryString.getParam('random');
  env.randomizeTests(random);
  var seed = queryString.getParam('seed');
  if (seed) {
    env.seed(seed);
  }
  var htmlReporter = new jasmine.HtmlReporter({
    env: env,
    onRaiseExceptionsClick: function onRaiseExceptionsClick() {
      queryString.navigateWithNewParam('catch', !env.catchingExceptions());
    },
    onThrowExpectationsClick: function onThrowExpectationsClick() {
      queryString.navigateWithNewParam('throwFailures', !env.throwingExpectationFailures());
    },
    onRandomClick: function onRandomClick() {
      queryString.navigateWithNewParam('random', !env.randomTests());
    },
    addToExistingQueryString: function addToExistingQueryString(key, value) {
      return queryString.fullStringWithNewParam(key, value);
    },
    getContainer: function getContainer() {
      return document.body;
    },
    createElement: function createElement() {
      return document.createElement.apply(document, arguments);
    },
    createTextNode: function createTextNode() {
      return document.createTextNode.apply(document, arguments);
    },
    timer: new jasmine.Timer()
  });
  env.addReporter(htmlReporter);
  if (queryString.getParam('browser')) {
    var testReporter = new TestReporter(queryString.getParam('browser'), queryString.getParam('path'));
    env.addReporter(testReporter);
  }
  var specFilter = new jasmine.HtmlSpecFilter({
    filterString: function filterString() {
      return queryString.getParam('spec');
    }
  });
  env.specFilter = function (spec) {
    return specFilter.matches(spec.getFullName());
  };
  jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
  var currentWindowOnload = window.onload;
  window.onload = function () {
    if (currentWindowOnload) {
      currentWindowOnload();
    }
    initializePDFJS(function () {
      htmlReporter.initialize();
      env.execute();
    });
  };
  function extend(destination, source) {
    for (var property in source) {
      destination[property] = source[property];
    }
    return destination;
  }
})();


text:
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
source /usr/local/etc/bash_completion.d/git-flow-completion.bash

GIT_PS1_SHOWDIRTYSTATE=true

# See http://stackoverflow.com/questions/4133904/ps1-line-with-git-current-branch-and-colors
function color_my_prompt {
    local __user_and_host="\[\033[01;32m\]\u@\h"
    local __cur_location="\[\033[01;34m\]\w"
    local __git_branch_color="\[\033[31m\]"
    local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E  s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
    local __prompt_tail="\[\033[35m\]$"
    local __last_color="\[\033[00m\]"
    export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color "
}
color_my_prompt


text:
(function() {
  var MemoryWidget = function(widget) {
    BaseWidget.call(this, widget);
  };
  MemoryWidget.prototype = Object.create(BaseWidget.prototype);

  MemoryWidget.prototype.getTitle = function() {
    return "Used Memory";
  };

  MemoryWidget.prototype.getWidthClass = function() {
    return "one";
  };

  MemoryWidget.prototype.initialize = function(history) {
    this.addData({
      memory: history.memory[history.memory.length - 1]
    });
  };

  MemoryWidget.prototype.addData = function(data) {
    if (!data.memory) {
      return;
    }

    var usedMemMB =
      Math.floor((data.memory.total - data.memory.free) / 1000000);
    var totalMemMB = Math.floor(data.memory.total / 1000000);

    this.div.innerText =
      "Used Memory: " + usedMemMB + "MB / " + totalMemMB + "MB";
  };

  window.MemoryWidget = MemoryWidget;
})();


text:
package org.zaproxy.addon.network.internal.server.http.handlers;

import java.net.Socket;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.core.proxy.ArrangeableProxyListener;
import org.parosproxy.paros.core.proxy.ConnectRequestProxyListener;
import org.parosproxy.paros.core.proxy.OverrideMessageProxyListener;
import org.parosproxy.paros.core.proxy.ProxyListener;
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.HttpRequestHeader;
import org.zaproxy.addon.network.server.HttpMessageHandler;
import org.zaproxy.addon.network.server.HttpMessageHandlerContext;
import org.zaproxy.zap.PersistentConnectionListener;

/**
 * Handler that notifies core proxy listeners.
 *
 *
Notifies the following listeners:
 *
 *

 *
{@link ConnectRequestProxyListener}
 *
{@link OverrideMessageProxyListener}
 *
{@link ProxyListener}
 *

 *
 * It also exposes the {@link PersistentConnectionListener}.
 */
@SuppressWarnings("deprecation")
public class LegacyProxyListenerHandler extends org.parosproxy.paros.core.proxy.ProxyServer
        implements HttpMessageHandler {

    private static final Logger LOGGER = LogManager.getLogger(LegacyProxyListenerHandler.class);

    private final List<ConnectRequestProxyListener> connectRequestProxyListeners;
    private final List<OverrideMessageProxyListener> overrideMessageProxyListeners;
    private final List<ProxyListener> proxyListeners;
    private final List<PersistentConnectionListener> persistentConnectionListeners;
    private final Comparator<ArrangeableProxyListener> listenersComparator;

    /** Constructs a {@code LegacyProxyListenerHandler} with no listeners. */
    public LegacyProxyListenerHandler() {
        connectRequestProxyListeners = Collections.synchronizedList(new ArrayList<>());
        overrideMessageProxyListeners = Collections.synchronizedList(new ArrayList<>());
        proxyListeners = Collections.synchronizedList(new ArrayList<>());
        persistentConnectionListeners = Collections.synchronizedList(new ArrayList<>());

        listenersComparator =
                (o1, o2) ->
                        Integer.compare(
                                o1.getArrangeableListenerOrder(), o2.getArrangeableListenerOrder());
    }

    @Override
    public void addConnectRequestProxyListener(ConnectRequestProxyListener listener) {
        connectRequestProxyListeners.add(listener);
    }

    @Override
    public void removeConnectRequestProxyListener(ConnectRequestProxyListener listener) {
        connectRequestProxyListeners.remove(listener);
    }

    @Override
    public void addOverrideMessageProxyListener(OverrideMessageProxyListener listener) {
        overrideMessageProxyListeners.add(listener);
        Collections.sort(overrideMessageProxyListeners, listenersComparator);
    }

    @Override
    public void removeOverrideMessageProxyListener(OverrideMessageProxyListener listener) {
        overrideMessageProxyListeners.remove(listener);
    }

    @Override
    public void addProxyListener(ProxyListener listener) {
        proxyListeners.add(listener);
        Collections.sort(proxyListeners, listenersComparator);
    }

    @Override
    public void removeProxyListener(ProxyListener listener) {
        proxyListeners.remove(listener);
    }

    @Override
    public void addPersistentConnectionListener(PersistentConnectionListener listener) {
        persistentConnectionListeners.add(listener);
        Collections.sort(persistentConnectionListeners, listenersComparator);
    }

    @Override
    public void removePersistentConnectionListener(PersistentConnectionListener listener) {
        persistentConnectionListeners.remove(listener);
    }

    @Override
    public void handleMessage(HttpMessageHandlerContext ctx, HttpMessage message) {
        if (ctx.isExcluded()) {
            return;
        }

        boolean request = ctx.isFromClient();
        if (HttpRequestHeader.CONNECT.equals(message.getRequestHeader().getMethod())) {
            if (!request) {
                return;
            }

            synchronized (connectRequestProxyListeners) {
                for (ConnectRequestProxyListener listener : connectRequestProxyListeners) {
                    handleErrors(
                            () -> {
                                listener.receivedConnectRequest(message);
                                return null;
                            },
                            null);
                }
            }
            return;
        }

        synchronized (overrideMessageProxyListeners) {
            boolean overridden = false;
            for (OverrideMessageProxyListener listener : overrideMessageProxyListeners) {
                if (request) {
                    overridden =
                            handleErrors(() -> listener.onHttpRequestSend(message), overridden);
                } else {
                    overridden =
                            handleErrors(
                                    () -> listener.onHttpResponseReceived(message), overridden);
                }

                if (overridden) {
                    ctx.overridden();
                    return;
                }
            }
        }

        synchronized (proxyListeners) {
            boolean forward = true;
            for (ProxyListener listener : proxyListeners) {
                if (request) {
                    forward = handleErrors(() -> listener.onHttpRequestSend(message), forward);
                } else {
                    forward = handleErrors(() -> listener.onHttpResponseReceive(message), forward);
                }

                if (!forward) {
                    ctx.close();
                    return;
                }
            }
        }
    }

    private static <T> T handleErrors(Callable<T> runnable, T fallbackValue) {
        try {
            return runnable.call();
        } catch (Throwable e) {
            LOGGER.error("An error occurred while notifying a listener:", e);
        }
        return fallbackValue;
    }

    /**
     * Notifies the {@code PersistentConnectionListener}s.
     *
     * @param message the message.
     * @param inSocket the connection from the client.
     * @param method the method used to send the message.
     * @return {@code true} if the connection should be kept open, {@code false} otherwise.
     */
    public boolean notifyPersistentConnectionListener(
            HttpMessage message, Socket inSocket, org.zaproxy.zap.ZapGetMethod method) {
        synchronized (persistentConnectionListeners) {
            for (PersistentConnectionListener listener : persistentConnectionListeners) {
                if (handleErrors(
                        () -> listener.onHandshakeResponse(message, inSocket, method), false)) {
                    return true;
                }
            }
        }
        return false;
    }
}


text:
package org.springframework.cloud.netflix.ribbon.okhttp;

import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.ClassPathExclusions;
import org.springframework.cloud.FilteredClassPathRunner;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory;
import org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration;
import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.instanceOf;

/**
 * @author Ryan Baxter
 */
@RunWith(FilteredClassPathRunner.class)
@ClassPathExclusions({"spring-retry-*.jar", "spring-boot-starter-aop-*.jar"})
public class SpringRetryDisableOkHttpClientTests {

	private ConfigurableApplicationContext context;

	@Before
	public void setUp() {
		context = new SpringApplicationBuilder().web(false).properties("ribbon.okhttp.enabled=true")
				.sources(RibbonAutoConfiguration.class,LoadBalancerAutoConfiguration.class, RibbonClientConfiguration.class).run();

	}

	@After
	public void tearDown() {
		if(context != null) {
			context.close();
		}
	}

	@Test
	public void testLoadBalancedRetryFactoryBean() throws Exception {
		Map<String, LoadBalancedRetryPolicyFactory> factories =  context.getBeansOfType(LoadBalancedRetryPolicyFactory.class);
		assertThat(factories.values(), hasSize(1));
		assertThat(factories.values().toArray()[0], instanceOf(LoadBalancedRetryPolicyFactory.NeverRetryFactory.class));
		Map<String, OkHttpLoadBalancingClient> clients =  context.getBeansOfType(OkHttpLoadBalancingClient.class);
		assertThat(clients.values(), hasSize(1));
		assertThat(clients.values().toArray()[0], instanceOf(OkHttpLoadBalancingClient.class));
	}
}


text:
package net.sf.mmm.client.ui.api.aria.attribute;

import net.sf.mmm.client.ui.api.aria.datatype.AriaAutocomplete;

/**
 * This interface gives read and write access to the {@link #getAutocomplete() autocomplete} attribute of an
 * object.
 *
 * @author Joerg Hohwiller (hohwille at users.sourceforge.net)
 * @since 1.0.0
 */
public abstract interface AttributeWriteAriaAutocomplete extends AttributeReadAriaAutocomplete {

  /**
   * This method sets the {@link #getAutocomplete() autocomplete} attribute of this object.
   *
   * @param autocomplete is the new value of {@link #getAutocomplete()}. May be null to unset.
   */
  void setAutocomplete(AriaAutocomplete autocomplete);

}