text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
    <!-- From: file:/tmp/tmp-deduplicated2024522587944169504/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/genfiles/java/com/google/android/gmscore/integ/client/cast/framework/res/values-lv/cast_strings.xml -->
    <eat-comment/>
    <string msgid="366047012176970604" name="cast_casting_to_device">"Notiek apraide ierīcē %s"</string>
    <string msgid="2888745622334830481" name="cast_closed_captions">"Slēgtie paraksti"</string>
    <string msgid="4476421850100851087" name="cast_closed_captions_unavailable">"Slēgtie paraksti nav pieejami"</string>
    <string msgid="4431992200264667209" name="cast_disconnect">"Pārtraukt savienojumu"</string>
    <string msgid="8886260998635257149" name="cast_expanded_controller_background_image">"Albuma noformējums"</string>
    <string msgid="7334411994450681286" name="cast_expanded_controller_loading">"Notiek ielāde…"</string>
    <string msgid="7884080323096468593" name="cast_forward">"Pārtīt"</string>
    <string msgid="6424889955881797947" name="cast_forward_10">"Pārtīt par desmit sekundēm"</string>
    <string msgid="7868672855975238403" name="cast_forward_30">"Pārtīt par trīsdesmit sekundēm"</string>
    <string msgid="6885943100773268783" name="cast_intro_overlay_button_text">"@android:string/ok"</string>
    <string msgid="5637297909372905371" name="cast_mute">"Izslēgt skaņu"</string>
    <string msgid="5308503786390460607" name="cast_pause">"Pauzēt"</string>
    <string msgid="5906987965619702702" name="cast_play">"Atskaņot"</string>
    <string msgid="1739665135565985480" name="cast_rewind">"Attīt atpakaļ"</string>
    <string msgid="6432793028560778843" name="cast_rewind_10">"Attīt atpakaļ par desmit sekundēm"</string>
    <string msgid="4677199707225681325" name="cast_rewind_30">"Attīt atpakaļ par trīsdesmit sekundēm"</string>
    <string msgid="9078075166993780241" name="cast_seek_bar">"Atskaņošanas meklēšanas vadīkla"</string>
    <string msgid="3991548379225047363" name="cast_skip_next">"Pāriet uz nākamo vienumu"</string>
    <string msgid="8369073097776576935" name="cast_skip_prev">"Pāriet uz iepriekšējo vienumu"</string>
    <string msgid="9191388946729723891" name="cast_stop">"Apturēt"</string>
    <string msgid="1219622777438777099" name="cast_stop_live_stream">"Apturēt tiešraides straumi"</string>
    <string msgid="4250321332248956563" name="cast_tracks_chooser_dialog_audio">"Skaņa"</string>
    <string msgid="1162380934229249476" name="cast_tracks_chooser_dialog_cancel">"Atcelt"</string>
    <string msgid="3012268736704635952" name="cast_tracks_chooser_dialog_default_track_name">"<ns1:g id="POSITION">%1$d</ns1:g>. ieraksts"</string>
    <string msgid="5563446400083425854" name="cast_tracks_chooser_dialog_no_audio_tracks">"Nav pieejamu audio ierakstu"</string>
    <string msgid="7413336699113748535" name="cast_tracks_chooser_dialog_no_text_tracks">"Nav pieejamu teksta ierakstu"</string>
    <string msgid="2332432312191219516" name="cast_tracks_chooser_dialog_no_tracks_available">"Nav pieejamu ierakstu"</string>
    <string msgid="1176688358580178396" name="cast_tracks_chooser_dialog_none">"Nav"</string>
    <string msgid="3804878371876790270" name="cast_tracks_chooser_dialog_ok">"Labi"</string>
    <string msgid="2454147715032376208" name="cast_tracks_chooser_dialog_subtitles">"Subtitri"</string>
    <string msgid="2913461521603516868" name="cast_unmute">"Ieslēgt skaņu"</string>
</resources>


text:
<?php

/*
 * This file is part of Sulu.
 *
 * (c) MASSIVE ART WebServices GmbH
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Sulu\Component\Rest;

use Sulu\Component\Rest\Exception\MissingParameterException;
use Sulu\Component\Rest\Exception\ParameterDataTypeException;
use Symfony\Component\HttpFoundation\Request;

/**
 * handles request parameters.
 */
trait RequestParametersTrait
{
    /**
     * returns request parameter with given name.
     *
     * @param Request $request
     * @param string  $name
     * @param bool    $force   TRUE if value is mandatory
     * @param mixed   $default value if parameter not exists
     *
     * @throws MissingParameterException parameter is mandatory but does not exists
     *
     * @return string
     */
    protected function getRequestParameter(Request $request, $name, $force = false, $default = null)
    {
        $value = $request->get($name, $default);
        if ($force && $value === null) {
            throw new MissingParameterException(get_class($this), $name);
        }

        return $value;
    }

    /**
     * returns request parameter as boolean 'true' => true , 'false' => false.
     *
     * @param Request $request
     * @param string  $name
     * @param bool    $force   TRUE if value is mandatory
     * @param bool    $default value if parameter not exists
     *
     * @throws MissingParameterException  parameter is mandatory but does not exists
     * @throws ParameterDataTypeException parameter hast the wrong data type
     *
     * @return bool
     */
    protected function getBooleanRequestParameter($request, $name, $force = false, $default = null)
    {
        $value = $this->getRequestParameter($request, $name, $force, $default);
        if ($value === 'true' || $value === true) {
            $value = true;
        } elseif ($value === 'false' || $value === false) {
            $value = false;
        } elseif ($force && $value !== true && $value !== false) {
            throw new ParameterDataTypeException(get_class($this), $name);
        } else {
            $value = $default;
        }

        return $value;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.jboss.migration.wfly10.config.task.subsystem.ejb3;

import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.operations.common.Util;
import org.jboss.dmr.ModelNode;
import org.jboss.migration.core.env.TaskEnvironment;
import org.jboss.migration.core.task.ServerMigrationTaskResult;
import org.jboss.migration.core.task.TaskContext;
import org.jboss.migration.wfly10.config.management.ManageableServerConfiguration;
import org.jboss.migration.wfly10.config.management.SubsystemResource;
import org.jboss.migration.wfly10.config.task.management.subsystem.UpdateSubsystemResourceSubtaskBuilder;

import static org.jboss.as.controller.PathElement.pathElement;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;

/**
 * A task which changes EJB3 remote service, if presence in config, to ref the HTTP Remoting Conector.
 * @author emmartins
 */
public class RefHttpRemotingConnectorInEJB3Remote<S> extends UpdateSubsystemResourceSubtaskBuilder<S> {

    public static final String TASK_NAME = "activate-ejb3-remoting-http-connector";

    public RefHttpRemotingConnectorInEJB3Remote() {
        subtaskName(TASK_NAME);
    }

    @Override
    protected ServerMigrationTaskResult updateConfiguration(ModelNode config, S source, SubsystemResource subsystemResource, TaskContext context, TaskEnvironment taskEnvironment) {
        if (!config.hasDefined(SERVICE,"remote")) {
            return ServerMigrationTaskResult.SKIPPED;
        }
        final PathAddress subsystemPathAddress = subsystemResource.getResourcePathAddress();
        final ManageableServerConfiguration configurationManagement = subsystemResource.getServerConfiguration();
        // /subsystem=ejb3/service=remote:write-attribute(name=connector-ref,value=http-remoting-connector)
        final ModelNode op = Util.createEmptyOperation(WRITE_ATTRIBUTE_OPERATION,  subsystemPathAddress.append(pathElement(SERVICE,"remote")));
        op.get(NAME).set("connector-ref");
        op.get(VALUE).set("http-remoting-connector");
        configurationManagement.executeManagementOperation(op);
        context.getLogger().debugf("EJB3 subsystem's remote service configured to use HTTP Remoting connector.");
        return ServerMigrationTaskResult.SUCCESS;
    }
}


text:
title: 'How to Send from Multisig Account'
taxonomy:
    category:
        - docs
---

## How to send XEM from a multi-signature Account
Now that you created a multi-signature account we need to use it, what better way than to send some XEM! So the **signer1** account wants to spend some money from the multi-signature account, you can do this by clicking **Send** in the top panel and subsequently by clicking **Multisig**. From the **signer1** account you can fill in the recipient, the amount and click **Send**, as illustrated in Figure 8.

![](10VDShM.png)

However, as you can see in Figure 9, the Dashboard shows the unconfirmed transaction waiting for approval. Because we constructed the contract such that both **signer1** and **signer2** need to confirm the transaction we need to wait for **signer2** to login to his account and confirm the transaction by cosigning it. **Signer2** can do this by clicking on the **Unconfirmed** tab in his dashboard and then clicking on the transaction waiting for cosigning entering the password and clicking send.

![](G4N2FxY.png)


text:
cask 'neat' do
  version '1.5.2.11'
  sha256 'c00a69a137b0515e621abe3df939c3469b30e6f0480c5c2aec71df4f770b9374'

  # neatsupport.wpengine.com was verified as official when first introduced to the cask
  url 'https://neatsupport.wpengine.com/wp-content/uploads/helpcenter/software/Neat-Mac.dmg'
  appcast 'https://s3.amazonaws.com/helium-updater/Autoupdate/UPDATE.XML'
  name 'Neat'
  homepage 'https://www.neat.com/'

  auto_updates true

  installer script: {
                      executable: "#{staged_path}/Neat-Installer.app/Contents/MacOS/installbuilder.sh",
                      args:       ['--mode', 'unattended'],
                      sudo:       true,
                    }

  uninstall quit:   'com.neat.helium',
            script: {
                      executable: '/Applications/The Neat Company/Neat Smart Organization System/uninstall.app/Contents/MacOS/installbuilder.sh',
                      args:       ['--mode', 'unattended'],
                      sudo:       true,
                    }

  zap trash: [
               '~/Neat-Helium-Logs',
               '~/Library/Application Support/Neat',
               '~/Library/Caches/Neat',
               '~/Library/Preferences/com.neat.helium.plist',
               '~/Library/Saved Application State/com.neat.helium.savedState',
             ]
end


text:
A Grunt multitask for accessing the file copying and syncing capabilities of the rsync command line utility. Uses the [rsyncwrapper](https://github.com/jedrichards/rsyncwrapper) npm module for the core functionality.

### Release notes

- `>= 0.3.0` Updated to `rsyncwrapper 0.1.0`. Some changes under the hood there, so a minor version bump seems appropriate. `src` values that include wildcards should now be properly expanded by the shell.
- `>= 0.2.0` Updated task to properly use the config [options](http://gruntjs.com/configuring-tasks#options) object
- `>= 0.1.0` Grunt `0.4` compatibility
- `<= 0.0.5` Initial releases, Grunt `0.3` compatible

If you're upgrading to Grunt `v0.4` you shouldn't need to make any changes to your existing `grunt-rsync` task config, just be sure to `npm install` the latest version. But be sure to place an issue if you have any problems.

### Prerequisites

A reasonably modern version of rsync (>=`v2.6.9`) in your `PATH`.

### Installation

    $ npm install grunt-rsync

### Usage

Add a `rsync` object to your Grunt config and `grunt.loadNpmTasks("grunt-rsync")`.

All options defined in the config are passed verbatim to [rsyncwrapper](https://github.com/jedrichards/rsyncwrapper), so check that project's readme for more details on the possible options.

For example, the following task config defines three targets. The `dist` target could be used to create a distribution of a website ready for deployment, excluding files related to Git and uncompiled SCSS. The `stage` and `prod` targets could be used to copy the distribution to the relevant remote hosts over ssh.

(Note: `grunt-rsync` now uses the normalised target/task-level options as described in [here](http://gruntjs.com/configuring-tasks#options).)

```javascript
rsync: {
    options: {
        args: ["--verbose"],
        exclude: [".git*","*.scss","node_modules"],
        recursive: true
    },
    dist: {
        options: {
            src: "./",
            dest: "../dist"
        }
    },
    stage: {
        options: {
            src: "../dist/",
            dest: "/var/www/site",
            host: "user@staging-host",
            syncDestIgnoreExcl: true
        }
    },
    prod: {
        options: {
            src: "../dist/",
            dest: "/var/www/site",
            host: "user@live-host",
            syncDestIgnoreExcl: true
        }
    }
}
```

### Wildcards, exclude patterns, globbing etc.

Any wildcards expansions and/or exclude patterns and globbing of paths are handled either by the shell or rsync itself. So importantly this task does **not** use Grunt's in-built path expanding and globbing.

For more information on rsync's syntax check the [rsync manpages](http://linux.die.net/man/1/rsync).

For information about how this task's options relate to rsync's functionality check [rsyncwrapper](https://github.com/jedrichards/rsyncwrapper).

### Testing

Basic tests are run on [Vows Async BDD](http://vowsjs.org/) via this package's Gruntfile. To test `grunt-rsync` clone the repo and install the devDependancies:

    $ npm install --dev
    $ npm test


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

<!DOCTYPE article SYSTEM "../JATS-journalpublishing-oasis-article1-mathml3.dtd">

<front>

<journal-meta>
<journal-id>MRKP</journal-id>
<journal-title-group>
<journal-title>Markup Languages: Theory and Practice</journal-title>
</journal-title-group>
<issn>xxx</issn>
<publisher><publisher-name>xxx</publisher-name>
</publisher>
</journal-meta>

Table Test

<title-group>

Table Article

</title-group>
<pub-date iso-8601-date="2004">
<year>2004</year>
</pub-date>

</front>

This is a paragraph

This following is an OASIS/CALS table, inside a
Table Wrapper %lt;table-wrap> wrapper.

Table 1

<title id="dalc">OASIS Table</title>

Additional caption material

<oasis:table id="dale" xmlns:oasis="http://www.niso.org/standards/z39-96/ns/oasis-exchange/table">
<oasis:tgroup cols="3" id="dalf">
<oasis:colspec colnum="1" colname="col1" colwidth="2*" colsep="1" rowsep="1" align="left" id="dalg"/>
<oasis:colspec colnum="2" colname="col2" colwidth="4*" colsep="1" rowsep="1" align="left"/>
<oasis:colspec colnum="3" colname="col3" colwidth="*" colsep="1" rowsep="1" align="right"/>
<oasis:tbody id="dalh">
<oasis:row id="dali">
<oasis:entry id="dalj">A cell! <bold>the very first cell</bold></oasis:entry>
<oasis:entry>Another cell with a
<list list-type="ordered" id="dalk">
<list-item id="dall">
List item the first
</list-item>
<list-item>
List item the second
</list-item>
<list-item>
List item the third
</list-item>
</list></oasis:entry>
<oasis:entry>Still a third></oasis:entry>
</oasis:row>
<oasis:row>
<oasis:entry>2 A cell!</oasis:entry>
<oasis:entry namest="col2" nameend="col3">A spanning Entry</oasis:entry>
</oasis:row>
</oasis:tbody>
</oasis:tgroup>
</oasis:table>

Table 1

<title id="dalp">XHTML Table</title>

Additional caption material

A cell!
Another
Still a third> with a <chem-struct> chem chem</chem-struct>

2 A cell!
An xref: See the statement below.
2 Still a third>

And here be MathML: EM4 cells, stably transfected with Flag-HA-DAT, Myc-His-DAT,
or both, were reacted with cross-linker and solubilized in Triton X-100
as above. There is no reason to have this formula,
'bold-italic'<inline-formula>

</inline-formula> here. Five microliters of
anti-Myc 9E10 (Santa Cruz Biotechnology) was added to 1.0 ml of Triton
X-100 extracts, and the mixture was incubated for 1 h at 4°C.
Twenty microliters of rec-protein G Sepharose (Zymed) was added, and the
mixture was incubated for 1 h at 4°C, washed three times in 0.5
ml of lysis buffer, and eluted in 45 μl of 2× Laemmli
sample buffer without reducing agent.

And here be MathML: EM4 cells, stably transfected with Flag-HA-DAT, Myc-His-DAT,
or both, were reacted with cross-linker and solubilized in Triton X-100
as above. There is no reason to have this formula,
'bold-italic'<inline-formula>

<mml:math>
<mml:semantics>
<mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi>
<mml:mrow><mml:mn>10</mml:mn></mml:mrow></mml:msub><mml:mo>=
</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow>
<mml:mfrac><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn>2</mml:mn></mml:msub>
</mml:mrow><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn>1</mml:mn>
</mml:msub></mml:mrow></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow>
</mml:mrow><mml:mrow><mml:mn>10</mml:mn><mml:mo>/</mml:mo><mml:msub><mml:mi>T
</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>
T</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:msup></mml:mrow>
<mml:annotation>Required: content unknown</mml:annotation>
</mml:semantics></mml:math></inline-formula> here. Five microliters of
anti-Myc 9E10 (Santa Cruz Biotechnology) was added to 1.0 ml of Triton
X-100 extracts, and the mixture was incubated for 1 h at 4°C.
Twenty microliters of rec-protein G Sepharose (Zymed) was added, and the
mixture was incubated for 1 h at 4°C, washed three times in 0.5
ml of lysis buffer, and eluted in 45 μl of 2× Laemmli
sample buffer without reducing agent.


text:
// @remove-on-eject-begin

// @remove-on-eject-end
'use strict';

const autoprefixer = require('autoprefixer');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const paths = require('./paths');
const getClientEnvironment = require('./env');

// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
const publicPath = paths.servedPath;
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = publicPath.slice(0, -1);
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);

// Assert this just to be safe.
// Development builds of React are slow and not intended for production.
if (env.stringified['process.env'].NODE_ENV !== '"production"') {
  throw new Error('Production builds must have NODE_ENV=production.');
}

// Note: defined here because it will be used more than once.
const cssFilename = 'static/css/[name].[contenthash:8].css';

// ExtractTextPlugin expects the build output to be flat.
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
// However, our output is structured with css, js and media folders.
// To have this structure working with relative paths, we have to use custom options.
const extractTextPluginOptions = shouldUseRelativeAssetPaths
  ? // Making sure that the publicPath goes back to to build folder.
    { publicPath: Array(cssFilename.split('/').length).join('../') }
  : {};

// This is the production configuration.
// It compiles slowly and is focused on producing a fast and minimal bundle.
// The development configuration is different and lives in a separate file.
module.exports = {
  // Don't attempt to continue if there are any errors.
  bail: true,
  // We generate sourcemaps in production. This is slow but gives good results.
  // You can exclude the *.map files from the build during deployment.
  devtool: 'source-map',
  // In production, we only want to load the polyfills and the app code.
  entry: [require.resolve('./polyfills'), paths.appIndexJs],
  output: {
    // The build folder.
    path: paths.appBuild,
    // Generated JS file names (with nested folders).
    // There will be one main bundle, and one file per asynchronous chunk.
    // We don't currently advertise code splitting but Webpack supports it.
    filename: 'static/js/[name].[chunkhash:8].js',
    chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
    // We inferred the "public path" (such as / or /my-project) from homepage.
    publicPath: publicPath,
  },
  resolve: {
    // This allows you to set a fallback for where Webpack should look for modules.
    // We read `NODE_PATH` environment variable in `paths.js` and pass paths here.
    // We placed these paths second because we want `node_modules` to "win"
    // if there are any conflicts. This matches Node resolution mechanism.
    // https://github.com/facebookincubator/create-react-app/issues/253
    modules: ['node_modules', paths.appNodeModules].concat(paths.nodePaths),
    // These are the reasonable defaults supported by the Node ecosystem.
    // We also include JSX as a common component filename extension to support
    // some tools, although we do not recommend using it, see:
    // https://github.com/facebookincubator/create-react-app/issues/290
    extensions: ['.js', '.json', '.jsx'],
    alias: {
      // Support React Native Web
      // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
      'react-native': 'react-native-web',
    },
  },
  // @remove-on-eject-begin
  // Resolve loaders (webpack plugins for CSS, images, transpilation) from the
  // directory of `react-scripts` itself rather than the project directory.
  resolveLoader: {
    modules: [
      paths.ownNodeModules,
      // Lerna hoists everything, so we need to look in our app directory
      paths.appNodeModules,
    ],
  },
  // @remove-on-eject-end
  module: {
    rules: [
      // Disable require.ensure as it's not a standard language feature.
      { parser: { requireEnsure: false } },
      // First, run the linter.
      // It's important to do this before Babel processes the JS.
      {
        test: /\.(js|jsx)$/,
        enforce: 'pre',
        use: [
          {
            // @remove-on-eject-begin
            // Point ESLint to our predefined config.
            options: {
              // TODO: consider separate config for production,
              // e.g. to enable no-console and no-debugger only in production.
              baseConfig: {
                extends: ['react-app'],
              },
              useEslintrc: false,
            },
            // @remove-on-eject-end
            loader: 'eslint-loader',
          },
        ],
        include: paths.appSrc,
      },
      // ** ADDING/UPDATING LOADERS **
      // The "url" loader handles all assets unless explicitly excluded.
      // The `exclude` list *must* be updated with every change to loader extensions.
      // When adding a new loader, you must add its `test`
      // as a new entry in the `exclude` list in the "url" loader.

      // "file" loader makes sure those assets end up in the `build` folder.
      // When you `import` an asset, you get its filename.
      {
        exclude: [
          /\.html$/,
          /\.(js|jsx)$/,
          /\.css$/,
          /\.json$/,
          /\.bmp$/,
          /\.gif$/,
          /\.jpe?g$/,
          /\.png$/,
        ],
        loader: 'file-loader',
        options: {
          name: 'static/media/[name].[hash:8].[ext]',
        },
      },
      // "url" loader works just like "file" loader but it also embeds
      // assets smaller than specified size as data URLs to avoid requests.
      {
        test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: 'static/media/[name].[hash:8].[ext]',
        },
      },
      // Process JS with Babel.
      {
        test: /\.(js|jsx)$/,
        include: paths.appSrc,
        loader: 'babel-loader',
        // @remove-on-eject-begin
        options: {
          babelrc: false,
          presets: [require.resolve('babel-preset-react-app')],
        },
        // @remove-on-eject-end
      },
      // The notation here is somewhat confusing.
      // "postcss" loader applies autoprefixer to our CSS.
      // "css" loader resolves paths in CSS and adds assets as dependencies.
      // "style" loader normally turns CSS into JS modules injecting <style>,
      // but unlike in development configuration, we do something different.
      // `ExtractTextPlugin` first applies the "postcss" and "css" loaders
      // (second argument), then grabs the result CSS and puts it into a
      // separate file in our build process. This way we actually ship
      // a single CSS file in production instead of JS code injecting <style>
      // tags. If you use code splitting, however, any async bundles will still
      // use the "style" loader inside the async code so CSS from them won't be
      // in the main CSS file.
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract(
          Object.assign(
            {
              fallback: 'style-loader',
              use: [
                {
                  loader: 'css-loader',
                  options: {
                    importLoaders: 1,
                  },
                },
                {
                  loader: 'postcss-loader',
                  options: {
                    ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
                    plugins: () => [
                      autoprefixer({
                        browsers: [
                          '>1%',
                          'last 4 versions',
                          'Firefox ESR',
                          'not ie < 9', // React doesn't support IE8 anyway
                        ],
                      }),
                    ],
                  },
                },
              ],
            },
            extractTextPluginOptions
          )
        ),
        // Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
      },
      // ** STOP ** Are you adding a new loader?
      // Remember to add the new extension(s) to the "url" loader exclusion list.
    ],
  },
  plugins: [
    // Makes some environment variables available in index.html.
    // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
    // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
    // In production, it will be an empty string unless you specify "homepage"
    // in `package.json`, in which case it will be the pathname of that URL.
    new InterpolateHtmlPlugin(env.raw),
    // Generates an `index.html` file with the <script> injected.
    new HtmlWebpackPlugin({
      inject: true,
      template: paths.appHtml,
      minify: {
        removeComments: true,
        collapseWhitespace: true,
        removeRedundantAttributes: true,
        useShortDoctype: true,
        removeEmptyAttributes: true,
        removeStyleLinkTypeAttributes: true,
        keepClosingSlash: true,
        minifyJS: true,
        minifyCSS: true,
        minifyURLs: true,
      },
    }),
    // Makes some environment variables available to the JS code, for example:
    // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
    // It is absolutely essential that NODE_ENV was set to production here.
    // Otherwise React will be compiled in the very slow development mode.
    new webpack.DefinePlugin(env.stringified),
    // Minify the code.
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
      },
      output: {
        comments: false,
      },
      sourceMap: true,
    }),
    // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
    new ExtractTextPlugin({
      filename: cssFilename,
    }),
    // Generate a manifest file which contains a mapping of all asset filenames
    // to their corresponding output file so that tools can pick it up without
    // having to parse `index.html`.
    new ManifestPlugin({
      fileName: 'asset-manifest.json',
    }),
  ],
  // Some libraries import Node modules but don't use them in the browser.
  // Tell Webpack to provide empty mocks for them so importing them works.
  node: {
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
  },
};


text:
<?php

/*
 * (c) Kévin Dunglas <dunglas@gmail.com>
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Application\PlanningBundle\Form;

use Symfony\Component\Form\TextField;

/**
 * SpecialTestForm.
 *
 * @author Kévin Dunglas <dunglas@gmail.com>
 */
class SpecialTestForm extends TestForm {
    public function configure()
    {
        parent::configure();

        $this->add(new TextField('description'));
    }
}


text:
package org.tiwonk.rest.example.person.client;

import com.google.gwt.core.client.JavaScriptObject;

public class PersonRef extends JavaScriptObject {

  protected PersonRef() {}

  public final native String getUri() /*-{
    return this["@id"];
  }-*/;

  public final native void setUri(String uri) /*-{
    this["@id"] = uri;
  }-*/;

}


text:
r"""Implement a MSM class that builds a Markov state models from
microstate trajectories automatically computes important properties
and provides them for later access.

.. moduleauthor:: F. Noe <frank DOT noe AT fu-berlin DOT de>

"""

from __future__ import absolute_import
from six.moves import range

__docformat__ = "restructuredtext en"

import numpy as _np

from pyemma.msm.models.msm import MSM as _MSM
from pyemma.util import types as _types

class HMSM(_MSM):
    r""" Hidden Markov model on discrete states.

    Parameters
    ----------
    hmm : :class:`DiscreteHMM <bhmm.DiscreteHMM>`
        Hidden Markov Model

    """

    def __init__(self, P, pobs, pi=None, dt_model='1 step'):
        """

        Parameters
        ----------
        Pcoarse : ndarray (m,m)
            coarse-grained or hidden transition matrix

        Pobs : ndarray (m,n)
            observation probability matrix from hidden to observable discrete states

        dt_model : str, optional, default='1 step'
            time step of the model

        """
        # construct superclass and check input
        _MSM.__init__(self, P, dt_model=dt_model)
        self.set_model_params(pobs=pobs, pi=pi, dt_model=dt_model)

    def set_model_params(self, P=None, pobs=None, pi=None, reversible=None, dt_model='1 step', neig=None):
        """

        Parameters
        ----------
        P : ndarray(m,m)
            coarse-grained or hidden transition matrix

        pobs : ndarray (m,n)
            observation probability matrix from hidden to observable discrete
            states

        pi : ndarray(m), optional, default=None
            stationary or distribution. Can be optionally given in case if
            it was already computed, e.g. by the estimator.

        dt_model : str, optional, default='1 step'
            time step of the model

        neig : int or None
            The number of eigenvalues / eigenvectors to be kept. If set to
            None, all eigenvalues will be used.

        """
        _MSM.set_model_params(self, P=P, pi=pi, reversible=reversible, dt_model=dt_model, neig=neig)
        # set P and derived quantities if available
        if pobs is not None:
            # check and save copy of output probability
            assert _types.is_float_matrix(pobs), 'pobs is not a matrix of floating numbers'
            assert _np.allclose(pobs.sum(axis=1), 1), 'pobs is not a stochastic matrix'
            self._nstates_obs = pobs.shape[1]
            self.update_model_params(pobs=pobs)

    @property
    def observation_probabilities(self):
        r""" returns the output probability matrix

        Returns
        -------
        Pout : ndarray (m,n)
            output probability matrix from hidden to observable discrete states

        """
        return self.pobs

    @property
    def nstates_obs(self):
        return self.observation_probabilities.shape[1]

    @property
    def lifetimes(self):
        r""" Lifetimes of states of the hidden transition matrix

        Returns
        -------
        l : ndarray(nstates)
            state lifetimes in units of the input trajectory time step,
            defined by :math:`-tau / ln | p_{ii} |, i = 1,...,nstates`, where
            :math:`p_{ii}` are the diagonal entries of the hidden transition matrix.

        """
        return -self._timeunit_model.dt / _np.log(_np.diag(self.transition_matrix))

    def transition_matrix_obs(self, k=1):
        """ Computes the transition matrix between observed states

        Transition matrices for longer lag times than the one used to
        parametrize this HMSM can be obtained by setting the k option.
        Note that a HMSM is not Markovian, thus we cannot compute transition
        matrices at longer lag times using the Chapman-Kolmogorow equality.
        I.e.:

        .. math::
            P (k \tau) \neq P^k (\tau)

        This function computes the correct transition matrix using the
        metastable (coarse) transition matrix :math:`P_c` as:

        .. math::
            P (k \tau) = {\Pi}^-1 \chi^{\top} ({\Pi}_c) P_c^k (\tau) \chi

        where :math:`\chi` is the output probability matrix, :math:`\Pi_c` is
        a diagonal matrix with the metastable-state (coarse) stationary
        distribution and :math:`\Pi` is a diagonal matrix with the
        observable-state stationary distribution.

        Parameters
        ----------
        k : int, optional, default=1
            Multiple of the lag time for which the
            By default (k=1), the transition matrix at the lag time used to
            construct this HMSM will be returned. If a higher power is given,

        """
        Pi_c = _np.diag(self.stationary_distribution)
        P_c = self.transition_matrix
        P_c_k = _np.linalg.matrix_power(P_c, k)  # take a power if needed
        B = self.observation_probabilities
        C = _np.dot(_np.dot(B.T, Pi_c), _np.dot(P_c_k, B))
        P = C / C.sum(axis=1)[:, None]  # row normalization
        return P

    @property
    def stationary_distribution_obs(self):
        return _np.dot(self.stationary_distribution, self.observation_probabilities)

    @property
    def eigenvectors_left_obs(self):
        return _np.dot(self.eigenvectors_left(), self.observation_probabilities)

    @property
    def eigenvectors_right_obs(self):
        return _np.dot(self.metastable_memberships, self.eigenvectors_right())

    def propagate(self, p0, k):
        """ Propagates the initial distribution p0 k times

        Computes the product

        .. math:
            p_k = p_0^T P^k

        If the lag time of transition matrix :math:`P` is :math:`\tau`, this
        will provide the probability distribution at time :math:`k \tau`.

        Parameters
        ----------
        p0 : ndarray(n)
            Initial distribution. Vector of size of the active set.

        k : int
            Number of time steps

        Returns
        ----------
        pk : ndarray(n)
            Distribution after k steps. Vector of size of the active set.

        """
        p0 = _types.ensure_ndarray(p0, ndim=1, kind='numeric')
        assert _types.is_int(k) and k>=0, 'k must be a non-negative integer'
        if k == 0:  # simply return p0 normalized
            return p0 / p0.sum()

        micro = False
        # are we on microstates space?
        if len(p0) == self.nstates_obs:
            micro = True
            # project to hidden and compute
            p0 = _np.dot(self.observation_probabilities, p0)

        self._ensure_eigendecomposition(self.nstates)
        from pyemma.util.linalg import mdot
        pk = mdot(p0.T, self.eigenvectors_right(), _np.diag(_np.power(self.eigenvalues(), k)), self.eigenvectors_left())

        if micro:
            pk = _np.dot(pk, self.observation_probabilities)  # convert back to microstate space

        # normalize to 1.0 and return
        return pk / pk.sum()

    # ================================================================================================================
    # Experimental properties: Here we allow to use either coarse-grained or microstate observables
    # ================================================================================================================

    def expectation(self, a):
        a = _types.ensure_float_vector(a, require_order=True)
        # are we on microstates space?
        if len(a) == self.nstates_obs:
            # project to hidden and compute
            a = _np.dot(self.observation_probabilities, a)
        # now we are on macrostate space, or something is wrong
        if len(a) == self.nstates:
            return _MSM.expectation(self, a)
        else:
            raise ValueError('observable vector a has size %s which is incompatible with both hidden (%s) '
                             'and observed states (%s)' % (len(a), self.nstates, self.nstates_obs))

    def correlation(self, a, b=None, maxtime=None, k=None, ncv=None):
        # basic checks for a and b
        a = _types.ensure_ndarray(a, ndim=1, kind='numeric')
        b = _types.ensure_ndarray_or_None(b, ndim=1, kind='numeric', size=len(a))
        # are we on microstates space?
        if len(a) == self.nstates_obs:
            a = _np.dot(self.observation_probabilities, a)
            if b is not None:
                b = _np.dot(self.observation_probabilities, b)
        # now we are on macrostate space, or something is wrong
        if len(a) == self.nstates:
            return _MSM.correlation(self, a, b=b, maxtime=maxtime)
        else:
            raise ValueError('observable vectors have size %s which is incompatible with both hidden (%s)'
                             ' and observed states (%s)' % (len(a), self.nstates, self.nstates_obs))

    def fingerprint_correlation(self, a, b=None, k=None, ncv=None):
        # basic checks for a and b
        a = _types.ensure_ndarray(a, ndim=1, kind='numeric')
        b = _types.ensure_ndarray_or_None(b, ndim=1, kind='numeric', size=len(a))
        # are we on microstates space?
        if len(a) == self.nstates_obs:
            a = _np.dot(self.observation_probabilities, a)
            if b is not None:
                b = _np.dot(self.observation_probabilities, b)
        # now we are on macrostate space, or something is wrong
        if len(a) == self.nstates:
            return _MSM.fingerprint_correlation(self, a, b=b)
        else:
            raise ValueError('observable vectors have size %s which is incompatible with both hidden (%s)'
                             ' and observed states (%s)' % (len(a), self.nstates, self.nstates_obs))

    def relaxation(self, p0, a, maxtime=None, k=None, ncv=None):
        # basic checks for a and b
        p0 = _types.ensure_ndarray(p0, ndim=1, kind='numeric')
        a = _types.ensure_ndarray(a, ndim=1, kind='numeric', size=len(p0))
        # are we on microstates space?
        if len(a) == self.nstates_obs:
            p0 = _np.dot(self.observation_probabilities, p0)
            a = _np.dot(self.observation_probabilities, a)
        # now we are on macrostate space, or something is wrong
        if len(a) == self.nstates:
            return _MSM.relaxation(self, p0, a, maxtime=maxtime)
        else:
            raise ValueError('observable vectors have size %s which is incompatible with both hidden (%s)'
                             ' and observed states (%s)' % (len(a), self.nstates, self.nstates_obs))

    def fingerprint_relaxation(self, p0, a, k=None, ncv=None):
        # basic checks for a and b
        p0 = _types.ensure_ndarray(p0, ndim=1, kind='numeric')
        a = _types.ensure_ndarray(a, ndim=1, kind='numeric', size=len(p0))
        # are we on microstates space?
        if len(a) == self.nstates_obs:
            p0 = _np.dot(self.observation_probabilities, p0)
            a = _np.dot(self.observation_probabilities, a)
        # now we are on macrostate space, or something is wrong
        if len(a) == self.nstates:
            return _MSM.fingerprint_relaxation(self, p0, a)
        else:
            raise ValueError('observable vectors have size %s which is incompatible with both hidden (%s)'
                             ' and observed states (%s)' % (len(a), self.nstates, self.nstates_obs))

    def pcca(self, m):
        raise NotImplementedError('PCCA is not meaningful for Hidden Markov models. ' +
                                  'If you really want to do this, initialize an MSM with the HMSM transition matrix.')

    # ================================================================================================================
    # Metastable state stuff is overwritten, because we now have the HMM output probability matrix
    # ================================================================================================================

    @property
    def metastable_memberships(self):
        """ Computes the memberships of observable states to metastable sets by
            Bayesian inversion as described in [1]_.

        Returns
        -------
        M : ndarray((n,m))
            A matrix containing the probability or membership of each
            observable state to be assigned to each metastable or hidden state.
            The row sums of M are 1.

        References
        ----------
        .. [1] F. Noe, H. Wu, J.-H. Prinz and N. Plattner: Projected and hidden
            Markov models for calculating kinetics and metastable states of
            complex molecules. J. Chem. Phys. 139, 184114 (2013)

        """
        A = _np.dot(_np.diag(self.stationary_distribution), self.observation_probabilities)
        M = _np.dot(A, _np.diag(1.0/self.stationary_distribution_obs)).T
        # renormalize
        M /= M.sum(axis=1)[:, None]
        return M

    @property
    def metastable_distributions(self):
        """ Returns the output probability distributions. Identical to
            :meth:`observation_probability`

        Returns
        -------
        Pout : ndarray (m,n)
            output probability matrix from hidden to observable discrete states

        See also
        --------
        observation_probability

        """
        return self.observation_probabilities

    @property
    def metastable_sets(self):
        """ Computes the metastable sets of observable states within each
            metastable set

        This is only recommended for visualization purposes. You *cannot*
        compute any actual quantity of the coarse-grained kinetics without
        employing the fuzzy memberships!

        Returns
        -------
        A list of length equal to metastable states. Each element is an array
        with observable state indexes contained in it

        """
        res = []
        assignment = self.metastable_assignments
        for i in range(self.nstates):
            res.append(_np.where(assignment == i)[0])
        return res

    @property
    def metastable_assignments(self):
        """ Computes the assignment to metastable sets for observable states

        This is only recommended for visualization purposes. You *cannot*
        compute any actual quantity of the coarse-grained kinetics without
        employing the fuzzy memberships!

        Returns
        -------
        For each observable state, the metastable state it is located in.

        """
        return _np.argmax(self.observation_probabilities, axis=0)


text:
<!doctype html>

  <title>rpc_client</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

For testing worker-based channels

<input
 ID="theArg1" type="text" maxlength="8"
></input>
+
<input
 ID="theArg2" type="text" maxlength="8"
></input>
<button
 ID="theTrigger"
 type="button" onclick="theTrigger_onclick()"
>trigger-rpc</button>


text:
import {Component} from 'angular2/core';
import {CORE_DIRECTIVES} from 'angular2/common';

import {TAB_DIRECTIVES} from '../../ng2-bootstrap';
import {AccordionDemo} from './accordion/accordion-demo';

let name = 'Accordion';
let src = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/accordion/';
// webpack html imports
let doc = require('../../components/accordion/readme.md');
let titleDoc = require('../../components/accordion/title.md');
let ts = require('!!prismjs?lang=typescript!./accordion/accordion-demo.ts');
let html = require('!!prismjs?lang=markup!./accordion/accordion-demo.html');

@Component({
  selector: 'accordion-section',
  template: `

${name}(src)

${titleDoc}

Example

        <accordion-demo></accordion-demo>

      <tabset>
        <tab heading="Markup">

${html}

        </tab>
        <tab heading="TypeScript">

${ts}

        </tab>
      </tabset>

API

${doc}

  `,
  directives: [AccordionDemo, TAB_DIRECTIVES, CORE_DIRECTIVES]
})
export class AccordionSection {
}


text:
package build

import (
	"fmt"

	"github.com/docker/distribution/reference"
	"github.com/docker/docker/api/types"
	"github.com/docker/docker/api/types/backend"
	"github.com/docker/docker/builder"
	"github.com/docker/docker/builder/fscache"
	"github.com/docker/docker/image"
	"github.com/docker/docker/pkg/stringid"
	"github.com/pkg/errors"
	"golang.org/x/net/context"
)

// ImageComponent provides an interface for working with images
type ImageComponent interface {
	SquashImage(from string, to string) (string, error)
	TagImageWithReference(image.ID, reference.Named) error
}

// Builder defines interface for running a build
type Builder interface {
	Build(context.Context, backend.BuildConfig) (*builder.Result, error)
}

// Backend provides build functionality to the API router
type Backend struct {
	builder        Builder
	fsCache        *fscache.FSCache
	imageComponent ImageComponent
}

// NewBackend creates a new build backend from components
func NewBackend(components ImageComponent, builder Builder, fsCache *fscache.FSCache) (*Backend, error) {
	return &Backend{imageComponent: components, builder: builder, fsCache: fsCache}, nil
}

// Build builds an image from a Source
func (b *Backend) Build(ctx context.Context, config backend.BuildConfig) (string, error) {
	options := config.Options
	tagger, err := NewTagger(b.imageComponent, config.ProgressWriter.StdoutFormatter, options.Tags)
	if err != nil {
		return "", err
	}

	build, err := b.builder.Build(ctx, config)
	if err != nil {
		return "", err
	}

	var imageID = build.ImageID
	if options.Squash {
		if imageID, err = squashBuild(build, b.imageComponent); err != nil {
			return "", err
		}
		if config.ProgressWriter.AuxFormatter != nil {
			if err = config.ProgressWriter.AuxFormatter.Emit(types.BuildResult{ID: imageID}); err != nil {
				return "", err
			}
		}
	}

	stdout := config.ProgressWriter.StdoutFormatter
	fmt.Fprintf(stdout, "Successfully built %s\n", stringid.TruncateID(imageID))
	err = tagger.TagImages(image.ID(imageID))
	return imageID, err
}

// PruneCache removes all cached build sources
func (b *Backend) PruneCache(ctx context.Context) (*types.BuildCachePruneReport, error) {
	size, err := b.fsCache.Prune(ctx)
	if err != nil {
		return nil, errors.Wrap(err, "failed to prune build cache")
	}
	return &types.BuildCachePruneReport{SpaceReclaimed: size}, nil
}

func squashBuild(build *builder.Result, imageComponent ImageComponent) (string, error) {
	var fromID string
	if build.FromImage != nil {
		fromID = build.FromImage.ImageID()
	}
	imageID, err := imageComponent.SquashImage(build.ImageID, fromID)
	if err != nil {
		return "", errors.Wrap(err, "error squashing image")
	}
	return imageID, nil
}


text:
__THREAD___

{ type: 'result:push', data: { a : 10, b : 'Foo'}}}
{ type: 'result:pull', data: {uuid: '2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3'}}}

{ type: 'job:push', data: { a: 10, b: 20, c: 50} }}

{ type: 'job:pull', data: {uuid: 'c25945fcf5508f52661464831d54de84a228bad76a9474222fb2aa1d7a7d5850'}}}
{ type: 'job:pull' });}

{ type: 'file:pull', data: {uri: 'https://dl.dropboxusercontent.com/u/959008/webstorm.pdf'} }}
{ type: 'file:pull', data: {name: 'webstorm'} }}

{ type: 'file:push', data: {} }}

__Peer__

___Internal___
                peers.on('peer:connect', peerConnectedHandler);
                peers.on('peer:message', peerMessageHandler);
                peers.on('peer:disconnect', peerDisconnectHandler);
                peers.on('peer:timeout', peerTimeoutHandler);

___External___
{ type: 'file:list:pull'}
{ type: 'file:list:push', list: list}
{ type: 'file:pull', uuid: uuid}
{ type: 'file:push', uuid: uuid, chunk: chunk, pos: pos}

{ type: 'node:list:pull'}
{ type: 'node:list:push', list: list}
{ type: 'node:pull', uuid: uuid}
{ type: 'node:push', node: node}

{ type: 'peer:list:pull'}
{ type: 'peer:pull', uuid: uuid}
{ type: 'peer:push', peer: peer}
{ type: 'job:list:pull'}
{ type: 'job:list:push', list: list}
{ type: 'job:pull', uuid: uuid}

{ type: 'job:push', job: job}
{ type: 'result:list:pull'}
{ type: 'result:list:push', list: list)}
{ type: 'result:pull', uuid: uuid}
{ type: 'result:push', result: result}

{ type: 'broadcast:result:found, data: data}
{ type: 'broadcast:result:update, data: data}

{ type: 'broadcast:job:lock, data: data}
{ type: 'broadcast:job:unlock, data: data}
{ type: 'broadcast:job:finish, data: data}

__Node__

__External__

___Outgoing___
'peer:auth', {uuid: settings.uuid, location: location}
'peer:offer', {uuid: settings.uuid, targetPeerUuid: targetPeerUuid, offer: offer, location: location}
'peer:answer', {uuid: settings.uuid, targetPeerUuid: targetPeerUuid, answer: answer}
'peer:candidate', {uuid: settings.uuid, targetPeerUuid: targetPeerUuid, candidate: candidate}
'peer:list', {projectUuid: project.uuid}

__Incoming___
('peer:offer', {nodeUuid: self.uuid, targetPeerUuid: data.data.targetPeerUuid, offer: data.data.offer, location: data.data.location});
('peer:answer', {nodeUuid: self.uuid, targetPeerUuid: data.data.targetPeerUuid, answer: data.data.answer});
('peer:candidate', {nodeUuid: self.uuid, targetPeerUuid: data.data.targetPeerUuid, candidate: data.data.candidate});
'peer:list', {projectUuid: project.uuid}, true);
{cmd: 'peer:auth', data: {success: true|false}


text:
package com.alibaba.nacos.auth.context;

import com.alibaba.nacos.plugin.auth.api.IdentityContext;
import com.alibaba.nacos.auth.config.AuthConfigs;
import com.alibaba.nacos.plugin.auth.constant.Constants;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class HtppIdentityContextBuilderTest {

    private static final String TEST_PLUGIN = "test";

    private static final String IDENTITY_TEST_KEY = "identity-test-key";

    private static final String IDENTITY_TEST_VALUE = "identity-test-value";

    @Mock
    private AuthConfigs authConfigs;

    @Mock
    private HttpServletRequest request;

    @Mock
    private Enumeration<String> headerNames;

    @Mock
    private Enumeration<String> parameterNames;

    private HttpIdentityContextBuilder identityContextBuilder;

    @Before
    public void setUp() throws Exception {
        identityContextBuilder = new HttpIdentityContextBuilder(authConfigs);
        when(authConfigs.getNacosAuthSystemType()).thenReturn(TEST_PLUGIN);
    }

    @Test
    public void testBuildWithoutPlugin() {
        mockHeader(true);
        mockParameter(true);
        when(authConfigs.getNacosAuthSystemType()).thenReturn("non-exist");
        IdentityContext actual = identityContextBuilder.build(request);
        assertNull(actual.getParameter(IDENTITY_TEST_KEY));
    }

    @Test
    public void testBuildWithHeader() {
        mockHeader(true);
        mockParameter(false);
        IdentityContext actual = identityContextBuilder.build(request);
        assertEquals(IDENTITY_TEST_VALUE, actual.getParameter(IDENTITY_TEST_KEY));
        assertEquals("1.1.1.1", actual.getParameter(Constants.Identity.REMOTE_IP));
    }

    @Test
    public void testBuildWithParameter() {
        mockHeader(false);
        mockParameter(true);
        IdentityContext actual = identityContextBuilder.build(request);
        assertEquals(IDENTITY_TEST_VALUE, actual.getParameter(IDENTITY_TEST_KEY));
    }

    private void mockHeader(boolean contained) {
        when(request.getHeaderNames()).thenReturn(headerNames);
        if (contained) {
            when(headerNames.hasMoreElements()).thenReturn(true, false);
            when(headerNames.nextElement()).thenReturn(IDENTITY_TEST_KEY, (String) null);
            when(request.getHeader(IDENTITY_TEST_KEY)).thenReturn(IDENTITY_TEST_VALUE);
            when(request.getHeader(Constants.Identity.X_REAL_IP)).thenReturn("1.1.1.1");
        }
    }

    private void mockParameter(boolean contained) {
        when(request.getParameterNames()).thenReturn(parameterNames);
        if (contained) {
            when(parameterNames.hasMoreElements()).thenReturn(true, false);
            when(parameterNames.nextElement()).thenReturn(IDENTITY_TEST_KEY, (String) null);
            when(request.getParameter(IDENTITY_TEST_KEY)).thenReturn(IDENTITY_TEST_VALUE);
        }
    }
}


text:
import type { Element, AnyNode } from 'domhandler';
import type { Cheerio } from '../cheerio.js';
/**
 * Get the value of a style property for the first element in the set of matched elements.
 *
 * @category CSS
 * @param names - Optionally the names of the properties of interest.
 * @returns A map of all of the style properties.
 * @see {@link https://api.jquery.com/css/}
 */
export declare function css<T extends AnyNode>(this: Cheerio<T>, names?: string[]): Record<string, string> | undefined;
/**
 * Get the value of a style property for the first element in the set of matched elements.
 *
 * @category CSS
 * @param names - The name of the property.
 * @returns The property value for the given name.
 * @see {@link https://api.jquery.com/css/}
 */
export declare function css<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined;
/**
 * Set one CSS property for every matched element.
 *
 * @category CSS
 * @param prop - The name of the property.
 * @param val - The new value.
 * @returns The instance itself.
 * @see {@link https://api.jquery.com/css/}
 */
export declare function css<T extends AnyNode>(this: Cheerio<T>, prop: string, val: string | ((this: Element, i: number, style: string) => string | undefined)): Cheerio<T>;
/**
 * Set multiple CSS properties for every matched element.
 *
 * @category CSS
 * @param map - A map of property names and values.
 * @returns The instance itself.
 * @see {@link https://api.jquery.com/css/}
 */
export declare function css<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string>): Cheerio<T>;
//# sourceMappingURL=css.d.ts.map


text:
module.exports = {
  /**
   * Application configuration section
   * http://pm2.keymetrics.io/docs/usage/application-declaration/
   */
  apps : [

    // First application
    {
      name      : 'simplemean',
      script    : 'server.js',
      env: {
        COMMON_VARIABLE: 'true'
      },
      env_production : {
        NODE_ENV: 'production'
      }
    }
  ],

  /**
   * Deployment section
   * http://pm2.keymetrics.io/docs/usage/deployment/
   */
  deploy : {
    production : {
      user : 'node',
      host : 'test.futuristicblanket.com',
      ref  : 'origin/master',
      repo : 'git@github.com:repo.git',
      path : '/var/www/production',
      'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'
    },
  }
};


text:
const {
  assertThrows
} = Assert;

// B.2.3.1 String.prototype.substr: Missing ReturnIfAbrupt after step 2
// https://bugs.ecmascript.org/show_bug.cgi?id=3710

assertThrows(TypeError, () => String.prototype.substr.call(void 0));
assertThrows(TypeError, () => String.prototype.substr.call(null));

class Err extends Error { }
assertThrows(Err, () => String.prototype.substr.call({
  toString() { throw new Err }
}));
assertThrows(Err, () => String.prototype.substr.call({
  toString() { throw new Err },
  valueOf: null
}));
assertThrows(Err, () => String.prototype.substr.call({
  toString: null,
  valueOf() { throw new Err }
}));


text:
namespace vg {
namespace unittest {
using namespace std;
using namespace vg::io;

// We have a tiny function to get virtual offsets, based on the block's start
// offset in the file, and the offset in the block
static int64_t vo(size_t block_start, size_t offset) {
    return (block_start << 16) | (0xFFFF & offset);
}

TEST_CASE("a BlockedGzipOutputStream can write to a stringstream", "[bgzip]") {
    stringstream datastream;

    SECTION("when wrapped manually") {
        // Wrap the stream as an hFILE
        hFILE* wrapped = hfile_wrap((std::ostream&)datastream);
        REQUIRE(wrapped != nullptr);
        // Give ownership of it to a BGZF that writes
        BGZF* bgzf_handle = bgzf_hopen(wrapped, "w");
        REQUIRE(bgzf_handle != nullptr);
        // Give ownership of the BGZF to a BlockedGzipOutputStream
        BlockedGzipOutputStream bgzip_out(bgzf_handle);

        REQUIRE(bgzip_out.Tell() == vo(0, 0));

        char* buffer;
        int buffer_size;
        REQUIRE(bgzip_out.Next((void**)&buffer, &buffer_size));

        REQUIRE(buffer_size >= 5);
        buffer[0] = 'C';
        buffer[1] = 'a';
        buffer[2] = 'n';
        buffer[3] = 'd';
        buffer[4] = 'y';

        bgzip_out.BackUp(buffer_size - 5);

        REQUIRE(bgzip_out.Tell() == vo(0, 5));
    }

    SECTION("when wrapped automatically") {
        BlockedGzipOutputStream bgzip_out(datastream);

        REQUIRE(bgzip_out.Tell() == vo(0, 0));

        char* buffer;
        int buffer_size;
        REQUIRE(bgzip_out.Next((void**)&buffer, &buffer_size));

        REQUIRE(buffer_size >= 5);
        buffer[0] = 'C';
        buffer[1] = 'a';
        buffer[2] = 'n';
        buffer[3] = 'd';
        buffer[4] = 'y';

        bgzip_out.BackUp(buffer_size - 5);

        REQUIRE(bgzip_out.Tell() == vo(0, 5));
    }

    // We must have written something (compressed data) to the stream
    REQUIRE(datastream.str().size() != 0);

}

TEST_CASE("BlockedGzipOutputStream can write to the same stream multiple times", "[bgzip]") {

    stringstream datastream;

    {
        // Write the first block
        BlockedGzipOutputStream bgzip_out(datastream);

        REQUIRE(bgzip_out.Tell() == vo(0, 0));

        char* buffer;
        int buffer_size;
        REQUIRE(bgzip_out.Next((void**)&buffer, &buffer_size));

        REQUIRE(buffer_size >= 5);
        buffer[0] = 'C';
        buffer[1] = 'a';
        buffer[2] = 'n';
        buffer[3] = 'd';
        buffer[4] = 'y';

        bgzip_out.BackUp(buffer_size - 5);

        REQUIRE(bgzip_out.Tell() == vo(0, 5));
    }

    // Now the stream goes away. The BGZF must be gone, so all the data must be done.

    size_t data_size = datastream.str().size();

    {
        // We have to be creating a new block now
        BlockedGzipOutputStream bgzip_out(datastream);

        // Make sure the stream reports that it is starting a block at the position the file is at, and not at 0.
        REQUIRE(bgzip_out.Tell() == vo(data_size, 0));

        char* buffer;
        int buffer_size;
        REQUIRE(bgzip_out.Next((void**)&buffer, &buffer_size));

        REQUIRE(buffer_size >= 5);
        buffer[0] = 'D';
        buffer[1] = 'a';
        buffer[2] = 'n';
        buffer[3] = 'd';
        buffer[4] = 'y';

        bgzip_out.BackUp(buffer_size - 5);

        REQUIRE(bgzip_out.Tell() == vo(data_size, 5));
    }

    REQUIRE(datastream.str().size() == data_size * 2);

}

TEST_CASE("BlockedGzipOutputStream produces EOF markers on demand", "[bgzip]") {
    stringstream s1;
    stringstream s2;

    {
        // Make some streams
        BlockedGzipOutputStream bs1(s1);
        BlockedGzipOutputStream bs2(s2);

        // Fake some writes
        char* data;
        int size;
        bs1.Next((void**)&data, &size);
        for (size_t i = 0; i < size; i++) {
            data[i] = 0;
        }

        bs2.Next((void**)&data, &size);
        for (size_t i = 0; i < size; i++) {
            data[i] = 0;
        }

        // Only give one an EOF
        bs2.EndFile();
    }

    // Make sure the extra 28-byte EOF marker is present
    REQUIRE(s2.str().length() == s1.str().length() + 28);
}

}

}


text:
.. _datasets:

.. ipython:: python
   :suppress:

   import numpy as np
   np.set_printoptions(suppress=True)

The Datasets Package
====================

Original Proposal
~~~~~~~~~~~~~~~~~

The idea for a datasets package was originally proposed by David Cournapeau and
can be found :ref:`here <dataset_proposal>` with updates by me (Skipper
Seabold).

Available Datasets
~~~~~~~~~~~~~~~~~~

.. toctree::
   :maxdepth: 1
   :glob:

   generated/*

Main Usage
~~~~~~~~~~

To load a dataset do the following

.. ipython:: python

   import scikits.statsmodels.api as sm
   data = sm.datasets.longley.load()

The `Dataset` object follows the bunch pattern as explain in the
:ref:`proposal <dataset_proposal>`.

Most datasets have two attributes of particular interest to users for examples

.. ipython:: python

   data.endog
   data.exog

Univariate datasets, however, do not have an `exog` attribute. You can find
out the variable names by doing

.. ipython:: python

   data.endog_name
   data.exog_name

If the dataset does not have a clear interpretation of what should be an
`endog` and `exog`, then you can always access the `data` or `raw_data`
attributes. This is the case for the `macrodata` dataset, which is a collection
of US macroeconomic data rather than a dataset with a specific example in mind.
The `data` attribute contains a record array of the full dataset and the
`raw_data` attribute contains an ndarray with the names of the columns given
by the `names` attribute.

.. ipython:: python

   type(data.data)
   type(data.raw_data)
   data.names

Loading data as pandas objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For many users it may be preferable to get the datasets as a pandas DataFrame or
Series object. Each of the dataset modules is equipped with a ``load_pandas``
method which returns a ``Dataset`` instance with the data as pandas objects:

.. ipython:: python

   data = sm.datasets.longley.load_pandas()
   data.exog
   data.endog

With pandas integration in the estimation classes, the metadata will be attached
to model results:

.. ipython:: python

   y, x = data.endog, data.exog
   res = sm.OLS(y, x).fit()
   res.params
   res.summary()

Extra Information
~~~~~~~~~~~~~~~~~

If you want to know more about the dataset itself, you can access the
following, again using the Longley dataset as an example ::

    >>> dir(sm.datasets.longley)[:6]
    ['COPYRIGHT', 'DESCRLONG', 'DESCRSHORT', 'NOTE', 'SOURCE', 'TITLE']

How to Add a Dataset
~~~~~~~~~~~~~~~~~~~~

See the :ref:`notes on adding a dataset <add_data>`.


text:
const BruttoBug = function (x, y) {
    BruttoBug.prototype.act = function () {
        console.log(`TRACER hello from act`);
        this.foo();
    }
}

BruttoBug.prototype.foo = function () {
    console.log(`TRACER hello from foo`);
}

export { BruttoBug };


text:
<title>
Inside Socialist Worker
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

April 8, 2005 | Issue 538

SW SPECIAL FEATURES

Counter-recruitment fight spreads

As it struggles to meet its recruitment targets, the military's biggest hurdle may be coming from the very same young people that it is targeting.

The lessons of McCarthyism

It isn't hard to draw the link from the terrible days of the McCarthyite witch-hunts of radicals to the political climate in the U.S.today.

Phil Gasper: "There are a lot of parallels with today"

The left and the Democratic Party:

With or against?

David Swanson of the Progressive Democrats of America and Lance Selfa of Socialist Worker debate whether the Democratic Party can be reformed.

WHAT WE THINK

Behind the maneuvers in Iraq

A government made to order

The maneuvers over Iraq's next government have further exposed the U.S. power play in last January's elections--and highlighted Washington's long-term plans to dominate Iraq.

The death of a reactionary

The media haze can't change what Pope John Paul II was in real life--a reactionary who saw his mission as defending the most backward traditions of the Catholic Church.

INTERNATIONAL NEWS

The humanitarian cover for the brutal embargo of Iraq

The real oil-for-food scandal

The real scandal never had anything to do with Kofi Annan or kickbacks in the UN humanitarian assistance program in Iraq during the 1990s.

NATIONAL NEWS

Confrontation at the Arizona border

Vigilantes take aim at immigrants

Volunteers of the Minuteman Project who descended on southern Arizona are the latest anti-immigrant vigilantes out to "patrol the border."

Corporate America makes a windfall off "investment" in Washington

How big business buys the politicians

If you run a big corporation, you don't just get what you pay for from Washington. You get much, much more than you pay for.

WMD report lets Bush off the hook

A bipartisan commission laid the blame for the scandal over Iraq's non-existent "weapons of mass destruction" on the CIA, letting the Bush administration off the hook.

COLUMNS

WHAT DO SOCIALISTS SAY?

Liberal allies of the right in Schiavo case

Right-wingers flocked to exploit the Terri Schiavo case. But in the days before Schiavo's death, some of the biggest news was made by people who consider themselves progressives.

ON THE PICKET LINE

Old guard leaders negotiate concessionary contract

Vote no on UTLA contract

The proposed deal negotiated by outgoing officials is an insult to all United Teachers of Los Angeles members and ought to be rejected when it goes to a ratification vote.

Labor in brief

Wisconsin state workers; Defend Social Security; Diamond Walnut

NEWS OF OUR STRUGGLE

Report singles out left-wing professor

Scapegoated at Columbia

An investigation into alleged anti-Semitism at Columbia University has rejected bogus charges made by pro-Israel students--but made a scapegoat of professor Joseph Massad.

Campaign defends rights of CCNY activists

Some 50 people attended a town hall meeting at the City College of New York to defend three students and one staff member punished for protesting military recruitment on campus.

News and reports

Stop racism at McDonald's; No to war and occupation

VIEWS AND VOICES

Why the Democrats take progressives for granted

Don't just blame the Democrats

Progressives need to recognize they can't blame just the Democrats--it is the liberals who supported a candidate for president who opposed progressives on many issues.

OBITUARY: WILL MILLER

One of the heroes of our movement

Will combined a tremendous, almost encyclopedic, memory of history with a tireless commitment to struggling for a better world.

Views in brief

Media bow to "right to life"; "Liberty" for corporations; Thanks for your paper; What "turning point" in Iraq?

REVIEWS

Documentary follows U.S. troops in Baghdad

A much-needed view inside today's Iraq

Gunner Palace points the cameras inside Iraq to shed light where it is desperately needed.

The foul anatomy of a fascist rally

The disturbing documentary The Letter follows some of the 1,100 refugees fleeing violence in Somalia, as they settle in an almost all-white city in Maine.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
package com.vmware.vim25;

/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/

@SuppressWarnings("all")
public class ConcurrentAccess extends VimFault {
}


text:
require File.expand_path('../boot', __FILE__)

require "action_controller/railtie"
require "rails/test_unit/railtie"
require 'sprockets/railtie'

Bundler.require
require "browserify-rails"

module Dummy
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    # Enable the asset pipeline
    config.assets.enabled = true

    # Add CoffeeScript support
    config.browserify_rails.commandline_options = "-t coffeeify --extension=\".js.coffee\""
  end
end


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

namespace FormManager\Groups;

use FormManager\Inputs\Radio;

/**
 * Class representing a group of input[type="radio"] elements
 */
class RadioGroup extends InputGroup
{
    public function __construct(iterable $radios = [])
    {
        foreach ($radios as &$radio) {
            if (is_string($radio)) {
                $radio = new Radio($radio);
            }
        }

        parent::__construct($radios);
    }

    public function offsetSet($value, $radio)
    {
        if (!($radio instanceof Radio)) {
            throw new InvalidArgumentException(
                sprintf('The element "%s" must be an instance of %s (%s)', $value, Radio::class, gettype($radio))
            );
        }

        parent::offsetSet($value, $radio);
    }
}


text:
require File.expand_path('../application', __FILE__)

# Initialize the Rails application.
SOSWeb::Application.initialize!


text:
/* File: IOsystem.h
 * -----------------
 */
#ifndef _iosystem_h
#define _iosystem_h

#include <list>
#include <cstdio>

#include "Operation.h"
using namespace std;

class IOsystem{
public:
	/* Constructors */
	IOsystem();

	/* Member Functions */
	void addEvent(Operation oper);
	void setEvent(int t);
	Operation getEvent();
	void deleteEvent();
	bool isEmpty();
	void setFinish();
	void printFinish();
	void printSum(int curTime, int totalMove);

	/* Helper Functions */
	int getSize();

private:
	list<Operation> m_list;
	list<Operation> m_finish;
	list<Operation>::iterator m_it;
};
#endif


text:
package message

import (
	"errors"
	"github.com/bixi/kylin/utility"
	"io"
	"strings"
	"sync"
)

type Transporter interface {
	Start() error
	Stop() error
	Send(message interface{})
	WaitForDone()
}

type transporter struct {
	sync.Mutex
	done         chan struct{}
	encoder      Encoder
	decoder      Decoder
	dispatcher   Dispatcher
	errorHandler ErrorHandler
	sendbox      utility.NonblockingChan
	isRunning    bool
	isStopped    bool
}

func NewTransporter(encoder Encoder,
	decoder Decoder,
	dispatcher Dispatcher,
	errorHandler ErrorHandler) Transporter {
	var t transporter
	t.encoder = encoder
	t.decoder = decoder
	t.dispatcher = dispatcher
	t.errorHandler = errorHandler
	t.sendbox = utility.NewNonblockingChan(128)
	return &t
}

func (t *transporter) Start() error {
	t.Lock()
	defer t.Unlock()
	if t.isRunning {
		return errors.New("transporter is running.")
	}

	t.isRunning = true
	t.done = make(chan struct{}, 1)

	//sending goroutine
	go func() {
		for message := range t.sendbox.In {
			err := t.encoder.Encode(message)
			if err != nil {
				t.handleError(err)
				break
			}
		}
		close(t.done)
	}()

	//receving goroutine
	go func() {
		for {
			var message interface{}
			err := t.decoder.Decode(&message)
			if err == nil {
				t.dispatcher.Dispatch(message)
			} else {
				t.handleError(err)
				t.Stop()
				return
			}
		}
	}()

	return nil
}

func (t *transporter) Send(message interface{}) {
	defer recover()
	t.sendbox.Out <- message
}

func (t *transporter) Stop() error {
	t.Lock()
	defer t.Unlock()
	if t.isStopped {
		return errors.New("transporter has stopped.")
	}
	t.isStopped = true
	t.sendbox.Close()
	return nil
}

func (t *transporter) WaitForDone() {
	defer recover()
	<-t.done

}

func shouldReport(err error) bool {
	if err == nil {
		return false
	}
	if err == io.EOF {
		return false
	}
	if strings.Contains(err.Error(), "use of closed network connection") {
		return false
	}
	return true
}

func (t *transporter) handleError(err error) {
	if t.errorHandler != nil {
		if shouldReport(err) {
			t.errorHandler.OnError(err)
		}
	}
}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>DLNA Test: MediaContainer - createFolder basic</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="http://01org.github.io/cloud-dleyna/mediaserver.html#widl-MediaContainer-createFolder-Promise-DOMString-title">


text:
package org.febit.lang;

/**
 *
 * @author zqq90
 */
public class IdentityKeyValue<K, V> {

    private final IdentityMap<K, V> values;
    private final IdentityMap<V, K> keys;

    public IdentityKeyValue() {
        values = new IdentityMap<>();
        keys = new IdentityMap<>();
    }

    public IdentityKeyValue(int initialCapacity) {
        values = new IdentityMap<>(initialCapacity);
        keys = new IdentityMap<>(initialCapacity);
    }

    public K getKeyByValue(V value) {
        return keys.get(value);
    }

    public V getValueByKey(K key) {
        return values.get(key);
    }

    public void put(K key, V value) {
        values.put(key, value);
        keys.put(value, key);
    }

    public void removeByKey(K key) {
        final V value = values.get(key);
        keys.remove(value);
        values.remove(key);
    }

    public void removeByValue(V value) {
        final K key = keys.get(value);
        keys.remove(value);
        values.remove(key);
    }
}


text:
package com.jcwhatever.phantom.entities;

import com.comphenix.protocol.PacketType.Play.Server;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketContainer;
import com.jcwhatever.nucleus.collections.players.PlayerSet;
import com.jcwhatever.nucleus.managed.entity.ITrackedEntity;
import com.jcwhatever.nucleus.providers.npc.Npcs;
import com.jcwhatever.nucleus.utils.entity.EntityUtils;
import com.jcwhatever.phantom.IViewable;
import com.jcwhatever.phantom.PhantomPackets;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

import javax.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

/**
 * Represents a single entity whose visibility is
 * being manipulated.
 */
public class PhantomEntity implements IViewable {

    private ITrackedEntity _trackedEntity;
    private PhantomEntitiesManager _manager;
    private PlayerSet _viewers;
    private ViewPolicy _viewPolicy = ViewPolicy.WHITELIST;

    /**
     * Constructor.
     *
     * @param manager  The owning manager.
     * @param entity   The entity to encapsulate.
     */
    public PhantomEntity (PhantomEntitiesManager manager, Entity entity) {
        _manager = manager;

        _trackedEntity = EntityUtils.trackEntity(entity);

        updateLocalPlayers();
    }

    /**
     * Get the owning manager.
     */
    public PhantomEntitiesManager getManager() {
        return _manager;
    }

    /**
     * Get the encapsulated entity.
     */
    @Nullable
    public Entity getEntity() {
        return _trackedEntity.getEntity();
    }

    /**
     * Get the tracked entity.
     */
    public ITrackedEntity getTrackedEntity() {
        return _trackedEntity;
    }

    /**
     * Get the entity ID.
     */
    public int getId() {
        Entity entity = getEntity();
        if (entity == null)
            return -1;

        return entity.getEntityId();
    }

    @Override
    public ViewPolicy getViewPolicy() {
        return _viewPolicy;
    }

    @Override
    public void setViewPolicy(ViewPolicy viewPolicy) {
        if (_viewPolicy == viewPolicy)
            return;

        _viewPolicy = viewPolicy;

        switch (viewPolicy) {
            case WHITELIST:
                showToViewers(_viewers);
                break;
            case BLACKLIST:
                hideFromViewers(_viewers);
                break;
            default:
                throw new AssertionError();
        }
    }

    @Override
    public boolean canSee(Player player) {
        boolean hasViewer = hasViewer(player);
        return (_viewPolicy == ViewPolicy.BLACKLIST && !hasViewer) ||
                (_viewPolicy == ViewPolicy.WHITELIST && hasViewer);
    }

    @Override
    public boolean hasViewer(Player player) {
        return _viewers != null &&
                _viewers.contains(player);
    }

    @Override
    public boolean addViewer(Player player) {
        initViewers();

        boolean add = _viewers.add(player);

        switch (_viewPolicy) {
            case WHITELIST:
                showTo(player);
                break;
            case BLACKLIST:
                hideFrom(player);
                break;
            default:
                throw new AssertionError();
        }

        return add;
    }

    @Override
    public boolean removeViewer(Player player) {
        if (_viewers == null)
            return false;

        if (!_viewers.remove(player)) {
            return false;
        }

        switch (_viewPolicy) {
            case WHITELIST:
                hideFrom(player);
                break;
            case BLACKLIST:
                showTo(player);
                break;
            default:
                throw new AssertionError();
        }

        return true;
    }

    @Override
    public void clearViewers() {
        if (_viewers == null)
            return;

        List<Player> viewers = new ArrayList<>(_viewers);

        _viewers.clear();

        refreshView(viewers);
    }

    @Override
    public List<Player> getViewers() {
        if (_viewers == null)
            return new ArrayList<>(0);

        return new ArrayList<>(_viewers);
    }

    @Override
    public void refreshView() {
        refreshView(new ArrayList<Player>(_viewers));
    }

    public void refreshView(List<Player> viewers) {

        if (_viewers == null)
            return;

        switch (_viewPolicy) {
            case WHITELIST:
                hideFromViewers(viewers);
                break;
            case BLACKLIST:
                showToViewers(viewers);
                break;
            default:
                throw new AssertionError();
        }
    }

    private void initViewers() {
        if (_viewers != null)
            return;

        _viewers = new PlayerSet(PhantomPackets.getPlugin());
    }

    private void showTo(Player player) {
        Entity entity = getEntity();

        if (entity == null || !entity.isValid())
            return;

        if (!player.getWorld().equals(entity.getWorld()))
            return;

        ProtocolLibrary.getProtocolManager()
                .updateEntity(entity, Arrays.asList(player));
    }

    private void showToViewers(Collection<Player> viewers) {

        Entity entity = getEntity();

        if (entity == null || !entity.isValid())
            return;

        if (viewers == null || viewers.isEmpty())
            return;

        List<Player> players = new ArrayList<>(viewers.size());
        for (Player player : viewers) {

            if (!player.getWorld().equals(entity.getWorld()))
                continue;

            players.add(player);
        }

        if (players.isEmpty())
            return;

        ProtocolLibrary.getProtocolManager()
                .updateEntity(entity, players);
    }

    private void hideFrom(Player player) {

        Entity entity = getEntity();
        if (entity == null || entity.isDead())
            return;

        PacketContainer destroyPacket = getDestroyPacket();

        try {
            ProtocolLibrary.getProtocolManager()
                    .sendServerPacket(player, destroyPacket);
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }

    private void hideFromViewers(Collection<Player> viewers) {
        Entity entity = getEntity();

        if (entity == null || entity.isDead())
            return;

        if (viewers == null || viewers.isEmpty())
            return;

        sendDestroyPacket(viewers);
    }

    private void updateLocalPlayers() {

        Entity entity = getEntity();

        if (entity == null || entity.isDead())
            return;

        World world = _trackedEntity.getWorld();

        for (Player player : world.getPlayers()) {

            if (Npcs.isNpc(player))
                continue;

            if (canSee(player)) {
                showTo(player);
            }
            else {
                hideFrom(player);
            }
        }
    }

    void sendDestroyPacket(Collection<Player> viewers) {
        PacketContainer destroyPacket = getDestroyPacket();

        try {
            for (Player player : viewers) {
                ProtocolLibrary.getProtocolManager()
                        .sendServerPacket(player, destroyPacket);
            }
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }

    void sendDestroyPacket(Player viewer) {
        PacketContainer destroyPacket = getDestroyPacket();

        try {
            ProtocolLibrary.getProtocolManager()
                    .sendServerPacket(viewer, destroyPacket);
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }

    @Nullable
    private PacketContainer getDestroyPacket() {

        Entity entity = getEntity();

        if (entity == null || entity.isDead())
            return null;

        PacketContainer destroyEntity = new PacketContainer(Server.ENTITY_DESTROY);
        destroyEntity.getIntegerArrays().write(0, new int[] { entity.getEntityId() });

        return destroyEntity;
    }
}


text:
package org.apache.ignite.spi.metric.jmx;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanInfo;
import org.apache.ignite.internal.processors.metric.impl.MetricUtils;
import org.apache.ignite.spi.metric.BooleanMetric;
import org.apache.ignite.spi.metric.DoubleMetric;
import org.apache.ignite.spi.metric.HistogramMetric;
import org.apache.ignite.spi.metric.IntMetric;
import org.apache.ignite.spi.metric.LongMetric;
import org.apache.ignite.spi.metric.Metric;
import org.apache.ignite.spi.metric.ObjectMetric;
import org.apache.ignite.spi.metric.ReadOnlyMetricManager;
import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;

import static java.util.Arrays.binarySearch;
import static org.apache.ignite.internal.processors.metric.impl.MetricUtils.HISTOGRAM_NAME_DIVIDER;
import static org.apache.ignite.internal.processors.metric.impl.MetricUtils.INF;
import static org.apache.ignite.internal.processors.metric.impl.MetricUtils.histogramBucketNames;

/**
 * MBean for exporting values of metric registry.
 */
public class MetricRegistryMBean extends ReadOnlyDynamicMBean {
    /** Metric registry. */
    ReadOnlyMetricRegistry mreg;

    /**
     * @param mreg Metric registry.
     */
    public MetricRegistryMBean(ReadOnlyMetricRegistry mreg) {
        this.mreg = mreg;
    }

    /** {@inheritDoc} */
    @Override public Object getAttribute(String attribute) {
        if (attribute.equals("MBeanInfo"))
            return getMBeanInfo();

        Metric metric = mreg.findMetric(attribute);

        if (metric == null)
            return searchHistogram(attribute, mreg);

        if (metric instanceof BooleanMetric)
            return ((BooleanMetric)metric).value();
        else if (metric instanceof DoubleMetric)
            return ((DoubleMetric)metric).value();
        else if (metric instanceof IntMetric)
            return ((IntMetric)metric).value();
        else if (metric instanceof LongMetric)
            return ((LongMetric)metric).value();
        else if (metric instanceof ObjectMetric)
            return ((ObjectMetric)metric).value();

        throw new IllegalArgumentException("Unknown metric class. " + metric.getClass());
    }

    /** {@inheritDoc} */
    @Override public MBeanInfo getMBeanInfo() {
        Iterator<Metric> iter = mreg.iterator();

        List<MBeanAttributeInfo> attributes = new ArrayList<>();

        iter.forEachRemaining(metric -> {
            if (metric instanceof HistogramMetric) {
                String[] names = histogramBucketNames((HistogramMetric)metric);

                assert names.length == ((HistogramMetric)metric).value().length;

                for (String name : names) {
                    String n = name.substring(mreg.name().length() + 1);

                    attributes.add(new MBeanAttributeInfo(
                        n,
                        Long.class.getName(),
                        metric.description() != null ? metric.description() : n,
                        true,
                        false,
                        false));
                }
            }
            else {
                attributes.add(new MBeanAttributeInfo(
                    metric.name().substring(mreg.name().length() + 1),
                    metricClass(metric),
                    metric.description() != null ? metric.description() : metric.name(),
                    true,
                    false,
                    false));
            }

        });

        return new MBeanInfo(
            ReadOnlyMetricManager.class.getName(),
            mreg.name(),
            attributes.toArray(new MBeanAttributeInfo[attributes.size()]),
            null,
            null,
            null);
    }

    /**
     * @param metric Metric.
     * @return Class of metric value.
     */
    private String metricClass(Metric metric) {
        if (metric instanceof BooleanMetric)
            return Boolean.class.getName();
        else if (metric instanceof DoubleMetric)
            return Double.class.getName();
        else if (metric instanceof IntMetric)
            return Integer.class.getName();
        else if (metric instanceof LongMetric)
            return Long.class.getName();
        else if (metric instanceof ObjectMetric)
            return ((ObjectMetric)metric).type().getName();

        throw new IllegalArgumentException("Unknown metric class. " + metric.getClass());
    }

    /**
     * Parse attribute name for a histogram and search it's value.
     *
     * @param name Attribute name.
     * @param mreg Metric registry to search histogram in.
     * @return Specific bucket value or {@code null} if not found.
     * @see MetricUtils#histogramBucketNames(HistogramMetric)
     */
    public static Long searchHistogram(String name, ReadOnlyMetricRegistry mreg) {
        int highBoundIdx;

        boolean isInf = name.endsWith(INF);

        if (isInf)
            highBoundIdx = name.length() - 4;
        else {
            highBoundIdx = name.lastIndexOf(HISTOGRAM_NAME_DIVIDER);

            if (highBoundIdx == -1)
                return null;
        }

        int lowBoundIdx = name.lastIndexOf(HISTOGRAM_NAME_DIVIDER, highBoundIdx - 1);

        if (lowBoundIdx == -1)
            return null;

        Metric m = mreg.findMetric(name.substring(0, lowBoundIdx));

        if (!(m instanceof HistogramMetric))
            return null;

        HistogramMetric h = (HistogramMetric)m;

        long[] bounds = h.bounds();
        long[] values = h.value();

        long lowBound;

        try {
            lowBound = Long.parseLong(name.substring(lowBoundIdx + 1, highBoundIdx));
        }
        catch (NumberFormatException e) {
            return null;
        }

        if (isInf) {
            if (bounds[bounds.length - 1] == lowBound)
                return values[values.length - 1];

            return null;
        }

        long highBound;

        try {
            highBound = Long.parseLong(name.substring(highBoundIdx + 1));
        }
        catch (NumberFormatException e) {
            return null;
        }

        int idx = binarySearch(bounds, highBound);

        if (idx < 0)
            return null;

        if ((idx == 0 && lowBound != 0) || (idx != 0 && bounds[idx - 1] != lowBound))
            return null;

        return values[idx];
    }
}


text:
import * as actions from './authActions';
// import {AuthWrapper, Login, Register} from './components';
import * as constants from './authConstants';
import reducer from './authReducer';
//import { epic } from './authEpic';

export default { actions, /*components,*/ constants, reducer/*, epic*/ };


text:
<#
.Synopsis
   Moves messages from one RabbitMQ Queue to another.

.DESCRIPTION
   The Move-RabbitMQMessage cmdlet allows to move messages from one RabbitMQ queue to another.
   Both source and destination queues must be in the same Virtual Host.
   The "exchange" and "routing_key" properties on moved messages will ba changed.

   Moving messages is done by publishing source message on the destination queue and removing it from source queue.

   The cmdlet is not designed to be used on sensitive data.

   WARNING
     This operation is not transactional and may result in not all messages being moved or some messages being duplicated.
     Also, if there are new messages published to the source queue or messages are consumed, then the operation may fail with unexpected result.
     Because of the nature of moving messages, this operation may change order of messages in the destination queue.

   To move messages on remote server you need to provide -ComputerName parameter.

   The cmdlet is using REST Api provided by RabbitMQ Management Plugin. For more information go to: https://www.rabbitmq.com/management.html

   To support requests using default virtual host (/), the cmdlet will temporarily disable UnEscapeDotsAndSlashes flag on UriParser. For more information check get-help about_UnEsapingDotsAndSlashes.

.EXAMPLE
   Move-RabbitMQMessage vh1 q1 q2

   Moves all messages from q1 to q2 on Virtual Host vh1.

.EXAMPLE
   Move-RabbitMQMessage vh1 q1 q2 5

   Moves first 5 messages from q1 to q2 on Virtual Host vh1.

.EXAMPLE
   Move-RabbitMQMessage -VirtualHost vh1 -$SourceQueueName q1 -$DestinationQueueName q2 -Count 5

   Moves first 5 messages from q1 to q2 on Virtual Host vh1.

.INPUTS

.LINK
    https://www.rabbitmq.com/management.html - information about RabbitMQ management plugin.
#>
function Move-RabbitMQMessage
{
    [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')]
    Param
    (
        # Name of the virtual host to filter channels by.
        [parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true, Position=0)]
        [Alias("vh", "vhost")]
        [string]$VirtualHost = $defaultVirtualhost,

        # Name of RabbitMQ Queue from which messages should be copied.
        [parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=1)]
        [Alias("from", "fromQueue")]
        [string]$SourceQueueName,

        # Name of RabbitMQ Queue to which messages should be copied.
        [parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=2)]
        [Alias("to", "toQueue")]
        [string]$DestinationQueueName,

        # If specified, gives the number of messages to copy.
        [parameter(ValueFromPipelineByPropertyName=$true, Position=3)]
        [int]$Count,

        # Name of the computer hosting RabbitMQ server. Defalut value is localhost.
        [parameter(ValueFromPipelineByPropertyName=$true, Position=4)]
        [Alias("HostName", "hn", "cn")]
        [string]$BaseUri = $defaultComputerName,

        # Credentials to use when logging to RabbitMQ server.
        [Parameter(Mandatory=$false)]
        [PSCredential]$Credentials = $defaultCredentials
    )

    Begin
    {
        $cnt = 0

        $exchange = Get-RabbitMQQueueBinding -VirtualHost $VirtualHost -Name $DestinationQueueName -Credentials $Credentials | ? source -ne "" | select -First 1
    }
    Process
    {
        $s = @{$true=$Count;$false='all'}[$Count -gt 0]
        if ($pscmdlet.ShouldProcess("server: $BaseUri/$VirtualHost", "Move $s messages from queue $SourceQueueName to queue $DestinationQueueName."))
        {
            $m = Get-RabbitMQMessage -Credentials $Credentials -VirtualHost $VirtualHost -Name $SourceQueueName
            $c = $m.message_count + 1

            if ($Count -eq 0 -or $Count -gt $c ) { $Count = $c }
            Write-Verbose "There are $Count messages to be copied."

            for ($i = 1; $i -le $Count; $i++)
            {
                # get message to be copies, but do not remove it from the server yet.
                $m = Get-RabbitMQMessage -Credentials $Credentials -VirtualHost $VirtualHost -Name $SourceQueueName

                # publish message to copying exchange, this will publish it onto dest queue as well as src queue.
                Add-RabbitMQMessage -Credentials $Credentials -VirtualHost $VirtualHost -ExchangeName $exchange.source -RoutingKey $exchange.routing_key -Payload $m.payload -Properties $m.properties

                # remove message from src queue. It has been published step earlier.
                $m = Get-RabbitMQMessage -Credentials $Credentials -VirtualHost $VirtualHost -Name $SourceQueueName -Remove

                Write-Verbose "published message $i out of $Count"
                $cnt++
            }
        }
    }
    End
    {
        Write-Verbose "`r`nMoved $cnt messages from queue $SourceQueueName to queue $DestinationQueueName."
    }
}