text:
{{ with .Site.BaseURL }}<link rel="shortcut icon" href="{{ . }}img/favicon.ico">{{ end }}
<noscript id="deferred-styles">
    <link
          type="text/css"
          rel="stylesheet"
          href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
          integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
          crossorigin="anonymous"
     />
{{ with .Site.Params.highlight.style }}
<link
    type="text/css"
    rel="stylesheet"
    href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/{{ . }}.min.css"
    crossorigin="anonymous"
/>
{{ else }}
<link
    type="text/css"
    rel="stylesheet"
    href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css"
    integrity="sha256-Zd1icfZ72UBmsId/mUcagrmN7IN5Qkrvh75ICHIQVTk="
    crossorigin="anonymous"
/>
{{ end }}
</noscript>
{{ if .RSSLink }}
<link
    rel="alternate"
    href="{{ .RSSLink }}"
    type="application/rss+xml"
    title="{{ .Site.Title }}"
/>
{{ end }}
<link rel="author" href="humans.txt" />


text:
// Copyright (c) Richard Dingwall, Arjen Post. See LICENSE in the project root for license information.

using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using Xunit;

namespace ProtoBuf.Data.Tests
{
    public partial class RecordReaderTests
    {
        public class TheReadRecordMethod : RecordReaderTests
        {
            [Fact]
            public void ShouldAcceptTrailingFieldHeaders()
            {
                // Arrange
                var stream = new MemoryStream();

                using (var writer = new ProtoWriter(stream, null, null))
                {
                    ProtoWriter.WriteFieldHeader(1, WireType.StartGroup, writer);

                    var resultToken = ProtoWriter.StartSubItem(0, writer);

                    ProtoWriter.WriteFieldHeader(2, WireType.StartGroup, writer);

                    var columnToken = ProtoWriter.StartSubItem(1, writer);

                    ProtoWriter.WriteFieldHeader(1, WireType.String, writer);
                    ProtoWriter.WriteString("foo", writer);
                    ProtoWriter.WriteFieldHeader(2, WireType.Variant, writer);
                    ProtoWriter.WriteInt32((int)3, writer);

                    ProtoWriter.EndSubItem(columnToken, writer);

                    ProtoWriter.WriteFieldHeader(3, WireType.StartGroup, writer);

                    var recordToken = ProtoWriter.StartSubItem(1, writer);

                    ProtoWriter.WriteFieldHeader(1, WireType.Variant, writer);
                    ProtoWriter.WriteInt32((int)1, writer);
                    ProtoWriter.WriteFieldHeader(2, WireType.Variant, writer);
                    ProtoWriter.WriteInt32((int)1, writer);

                    ProtoWriter.EndSubItem(recordToken, writer);

                    ProtoWriter.EndSubItem(resultToken, writer);
                }

                stream.Position = 0;

                var dataReader = new ProtoDataReader(stream);

                // Assert
                dataReader.Read();
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>OpenContracts.eu</title>
    <meta name="description" content="Information on government purchases and contracts from all member states of the European Union.">
    {% assets filters="less,cssmin,cssrewrite,datauri", output="gen/style.css",
      "vendor/bootstrap/less/bootstrap.less",
      "vendor/font-awesome/less/font-awesome.less",
      "style/style.less" %}
        <link type="text/css" href="{{ ASSET_URL }}" rel="stylesheet">
    {% endassets %}

    <link rel="shortcut icon" href="opennews-favicon.ico" type="image/x-icon" />

      {% block content %}
         - No Content -
      {% endblock %}

            OpenContracts.eu: government purchases from the member states of the European Union.

             GitHub ·
            Issues ·
            pudo.org ·
            Knight-Mozilla OpenNews.

  {% assets filters="uglifyjs", output="gen/app.js",
        "vendor/jquery/jquery.js" %}

  {% endassets %}


text:
module Main where

import Exercises.ChapterOneToFive

main :: IO ()
main = interact qsort


text:
using System.Windows;

namespace Matrix.views.Pedagogy
{

    /// <summary>
    ///
    /// </summary>
    public partial class PedagogyD
    {
        /// <summary>
        ///
        /// </summary>
        public PedagogyD ( )
        {
            InitializeComponent ();
        }

        private void BackBut_Click ( object sender, RoutedEventArgs e )
        {
            NavigationService?.Navigate (new HomePage ());
        }
    }
}


text:
@protocol ExportXMLHttpRequest <JSExport>

@property NSString* responseText;
@property JSValue* onload;
@property JSValue* onerror;

-(instancetype)init;

-(void)open:(NSString*)httpMethod :(NSString*)url :(bool)async;
-(void)send;

@end

@interface ModuleXMLHttpRequest: NSObject <ExportXMLHttpRequest>

@end


text:
title: "Teaching attention, part 4 / N: Soft Attention"
date: 2019-08-20 09:04 -4
---

There is more to memory than compression. A reduction of information can have
*structure* -- for example, in a gaussian mixture model, the sufficient
statistics have are the means within each cluster. Depending on which cluster
you might be visiting, you might focus on a different one of the means. A good
compression should induce an effortless way of searching through different parts
of a summary. In essence,

> Good models let us navigate information.

In deep learning, this process of navigating information is called "attending
to" different inputs. We'll illustrate a canonical attention mechanism in the
context of sentence translation, but it's worth noting that the principle
applies to many settings with structured outputs (like graphs), where the
influences from input to output are somehow localized.

In the abstract, sentence translation is a prediction problem where the inputs
are sequences and the outputs are also sequences. The input and output are the
same sentence in a source and a target language, respectively. Each element of
the sequence is a word in the sentence. Words can be represented either by
one-hot encodings from some vocabulary (usually, the words in a corpus above
some minimum frequency), or by embeddings derived from some previously trained
model on another corpus. This is illustrated in the figure below.

Once you make the leap into representing words as numerical vectors, it's
natural to think of sentences as curves in some high-dimensional space. The two
sentences are just two curves in two spaces, and you need to learn to predict
the second from the first. The reason this problem is doable is because, after
seeing enough training examples, you might associated certain subsequences (mini
curve shapes) in the source space with subsequences in the target space.

### Sequence-to-Sequence Architecture

I'm tempted to call the first approach to this problem the "naive approach,"
except that it doesn't feel right to call something naive that was
state-of-the-art only a couple of years ago [1].

The idea is to build a link between the two sequence shapes, using an
appropriate learned representation. You can think of it as a two step process,

(1) Build a memory of the first sequence, which you'll be able to refer to later
on.
(2) Learn to associate the memory of the first sequence with a reasonable shape
for the second.

Step (1) is done with an RNN encoder, just like what we've been exploring in the
previous posts. The final state $$h_{T}$$ (the final green bar) gives a succint
representation of the entire sequence (the red dots). More than being an
unsupervised representation, it's one that's been tailored exactly for the
problem of decoding into the target language.

The second step is also accomplished by an RNN, but with a a couple twists. As
in usual RNNs, you build up a summary, let's call it $$\tilde{h}_t$$, based on the
previous timepoints summary, and also a new input, the previous target word
$$y_t$$. The idea is that the summary is giving a sense of what the sequence means
so far, which is useful for figuring out how it will evolve (certain shapes are
much more common than others). The first twist is that you also are allowed to
look at the summary the source sequence, the original $$h_T$$ (practically, this
is just another linear input to the RNN unit).

The second twist is that the inputs are not properly specified, because they
aren't actually available at test time. If you knew $$y_t$$, you wouldn't need to
bother with prediction in the first place! Instead, you should build a separate
prediction model from $$\tilde{h}_t$$ to $$\hat{y}$$ and use the predictions for the
actual inputs (an alternative, called "teacher-forcing," uses the real $$y_t$$
during training time, can have advantages, but comes with it's own issues). This
process is illustrated below. The dashed line are the predictions that you have
access to, and the length of the yellow curves gives a sense of the loss.

### Attention

The decoding process above puts a lot of burden on the final encoded $$h_T$$ from
the first sequence. This seems easily avoidable -- it's not like we need to
throw away all the previous summaries because of computational constraints.
Moreover, you would expect that the summaries $$h_t$$ and $$\tilde{h}_t$$ might be
closely related in timepoints that are close together. The beginning of the
source and target sentences should mean essentially the same thing, even though
they are in different languages.

Soft attention is the name of a type of learning module designed directly around
this observation [2]. The idea is to use a different summary at each step of
decoding. Instead of only ever using $$h_T$$, we're allowed to use some
combination $$\sum_{i} \alpha_i h_i$$ of the encoder summaries, where the weights
$$\alpha_i$$ depend on the timepoint of the decoder. These weights are illustrated
by the pink distributions in the figure below.

At the next timepoint, the attetion distribution is free to change, according to
the new position of the decoder. This extra degree of flexibility -- the fact
that the RNN decoder has access to different encoder summaries at different
timepoints, not just the unchanging $$h_T$$ -- is the property that distinguishes
a decoder with an attetion mechanism from a ordinary decoder. A updated attetion
distribution, associated with the next decoder timepoint, is show in the figure
below.

Exercise: Write out pseudocode for the forwards pass of a sequece-to-sequece
model with an attetion mechanism in the decoder.

How does the model know what $$\alpha_i$$ distributions are most appropriate for
the different sentences? After all, it must be learned from the data, somehow.
There is no single consensus on how to define these weights, and many papers
have been written specifically around novel proposals for guiding attention
effectively. That said, two approaches are representative of a wide class of
mechanisms [3],

* Local attention: At step $$t$$ in decoding, define $$\alpha_i \propto
  \exp\left(w_1^{T} \tilde{h}_t, \dots, w_T^{T}\tilde{h}_t\right)$$. Or, in pseudocode,
  the $$\alpha$$ vector can be computed as `a = softmax(l(h_t))` where `l =
  nn.linear(dim(h_t), T)`.
* Content-based attention: At step $$t$$ in decoding, define $$\alpha_i \propto
  \exp\left(h_1^{T}\tilde{h}_t, \dots, h_T^{T}\tilde{h}_t\right)$$. In
  pseudocode, this is `a = softmax(H_enc @ h_t)` where `H_enc` is formed by
  stacking the summaries $$h_1, \dots, h_T$$ as rows.

The main difference is that local attention does not refer to the encoder
summaries $$h_t$$. It puts high mass on some parts of the source sentence
depending solely on the state of the decoder $$\tilde{h}_t$$. The decoder
summaries tend to reflect, in some of their coordinates, how far along into the
target sentence they are. So, these attention distributions tend to just place
high mass on timepoints in the encoder close to the current timepoint in the
decoder.

The content-based attention mechanism, on the other hand, allots weight
$$\alpha_i$$ according to how similar the source and target encodings are (a large
inner product corresponds to a small angle). This means that if there is are words
in the source sentence that have similar meaning $$h_t$$ to the current decoder
summary, $$\tilde{h}_t$$, then those words will be upweighted, no matter their
position in the sentence. This is qualitatively illustrated in the figure below.
The content-based approach places high mass near the end of the encoder
sentence, because it is close (in the embedding space), to the meaning at the
decoder timepoint. This is in spite of the fact that those words occur at a
timepoint very different than the current decoder timepoint.

### Discussion

No matter how we define the $$\alpha_i$$'s, the fact that we learn them has a nice
consequence: for free, we've learned a soft-alignment between the source and
target sentence. At any timepoint in decoding, the encodings with high
$$\alpha_i$$ are said to "softly-align" to that timepoint. In this way, you might
notice "inversions," where the decoder doesn't just proceed linearly down the
encoder, placing all mass on $$h_t$$ when decoding $$\tilde{h}_t$$. This is common
in translation between languages that put adjectives before / after nouns, for
example.

A final observation -- including this mechanism is especially beneficial when
working with long sentences. This is phenomenon documented in the literature
[2], and it makes sense in retrospect: long sentences are more suceptible to the
vanishing gradient problem, and even with gating, the final $$h_T$$ tends to
mostly reflect cotributions from the end of the source sentence. A approach with
an attetion mechaism, in contrast, can always draw on summaries taken near the
start of the sentence, by putting most of the mass of the $$\alpha_i$$ there.

Finally, while we've focused on attention in a sequence to sequence context,
it's worth noting that these principles extend much more generally. Whenever you
have a structured output or collection of tasks, it's possible to refer to
summaries selectively, attending to only those that are most relevant for the
current element in the more complex structure / collection. For example, in a
graph problem, only the nearby nodes might be worth attending to. The general
takeaway is that, whenever you might be able to exploit specific structure in
the relationship between summaries $h_t$, you can design an attention mechanism
that makes learning from them simpler.

Exercise Solution:

```
// Encode
all_h = []
for t in range(T):
  h = rnn_encoder(x[t], h[t - 1])
  all_h.append(h)

// Decode with attention
h_tilde, y_hat = all_h[-1], []
for t in range(T_prime):
  y_hat.append(pred(h_tilde))
  alpha = attn_weights(y_hat[-1], h_tilde, all_h)
  h_tilde = rnn_decoder(y_hat[-1], h_tilde, alpha * all_h)
```

[1] Sutskever, I., Vinyals, O., & Le, Q. V. (2014). Sequence to sequence learning with neural networks. In Advances in neural information processing systems (pp. 3104-3112).

[2] Bahdanau, D., Cho, K., & Bengio, Y. (2014). Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.

[3] Luong, M. T., Pham, H., & Manning, C. D. (2015). Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025.


text:
local oo    = require("oo")
local bt    = require("bt")
local types = require("types")

--[[
	Base class for composite behaviours
]]

local Composite = oo.class("bt.Composite", bt.Behaviour)

function Composite.new(children, self, klass)
    self = self or {}
    Composite.super.new(self, klass or Composite)
    self._children = types.List.new()
    if children then
    	self:add(unpack(children))
    end
    return self
end

function Composite._onInitialize(self)
	self._current = 1
end

function Composite.add(self, ...)
    local children = {...}
    for k,b in pairs(children) do
        self._children:push_back(b)
        b._parent = self
    end
end

function Composite.remove(self, ...)
    local children = {...}
    for k,b in pairs(children) do
    	--b:abort()
        self._children:remove(b)
    end
end

function Composite.clear(self, ...)
    -- TODO
end

return Composite


text:
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Overlays;
using osu.Game.Overlays.Mods;

namespace osu.Game.Tests.Visual.UserInterface
{
    [TestFixture]
    public class TestSceneDifficultyMultiplierDisplay : OsuTestScene
    {
        [Cached]
        private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);

        [Test]
        public void TestDifficultyMultiplierDisplay()
        {
            DifficultyMultiplierDisplay multiplierDisplay = null;

            AddStep("create content", () => Child = multiplierDisplay = new DifficultyMultiplierDisplay
            {
                Anchor = Anchor.Centre,
                Origin = Anchor.Centre
            });

            AddStep("set multiplier below 1", () => multiplierDisplay.Current.Value = 0.5);
            AddStep("set multiplier to 1", () => multiplierDisplay.Current.Value = 1);
            AddStep("set multiplier above 1", () => multiplierDisplay.Current.Value = 1.5);

            AddSliderStep("set multiplier", 0, 2, 1d, multiplier =>
            {
                if (multiplierDisplay != null)
                    multiplierDisplay.Current.Value = multiplier;
            });
        }
    }
}


text:
import os

from django.core.management.base import BaseCommand
from django.utils import translation
import requests

ZANATA_LOCALES_URL = ("https://translate.openstack.org/rest/project"
                      "/horizon/version/master/locales")
DOMAINS = ['django', 'djangojs']
MODULES = ['horizon', 'openstack_dashboard']
PROJECT = 'horizon'
BRANCH = 'master',
POFILE = "{module}/locale/{locale}/LC_MESSAGES/{domain}.po"
POFILE_URL = ("https://translate.openstack.org/rest/file/translation/{project}"
              "/{branch}/{language}/po?docId={module}%2Flocale%2F{domain}")

class Command(BaseCommand):
    help = ("Pull a translation catalog from Zanata "
            "(https://translate.openstack.org) for all languages or a "
            "specified language")

    def _get_language_codes(self):
        zanata_locales = requests.get(ZANATA_LOCALES_URL).json()
        return [x['localeId'] for x in zanata_locales]

    def add_arguments(self, parser):
        language_codes = self._get_language_codes()

        parser.add_argument('-l', '--language', choices=language_codes,
                            metavar='LANG',
                            default=language_codes, nargs='+',
                            help=("The language code(s) to pull language "
                                  "catalogs for. The default is all "
                                  "languages. Available languages are: %s"
                                  % ', '.join(sorted(language_codes))))
        parser.add_argument('-p', '--project', type=str, default=PROJECT,
                            help=("The name of the project to extract "
                                  "strings from e.g. 'horizon'. The default "
                                  "is 'horizon'"))
        parser.add_argument('-m', '--module', type=str, nargs='+',
                            default=MODULES,
                            help=("The target python module(s) to extract "
                                  "strings from e.g. 'openstack_dashboard'. "
                                  "The default modules are 'horizon' and "
                                  "'openstack_dashboard'"))
        parser.add_argument('-b', '--branch', type=str, default=BRANCH,
                            help=("The branch of the project to extract "
                                  "strings from e.g. 'horizon'. The default "
                                  "is 'master'"))

    def handle(self, *args, **options):
        for module in options['module']:
            for domain in DOMAINS:
                for language in options['language']:
                    locale = translation.to_locale(language)

                    pofile = POFILE.format(module=module,
                                           locale=locale,
                                           domain=domain)

                    pofile_dir = os.path.dirname(pofile)
                    if not os.path.exists(pofile_dir):
                        os.makedirs(pofile_dir)

                    new_po = requests.get((POFILE_URL).format(
                        language=language,
                        project=options['project'],
                        branch=options['branch'],
                        module=module,
                        domain=domain))

                    # Ensure to use UTF-8 encoding
                    new_po.encoding = 'utf-8'

                    with open(pofile, 'w+') as f:
                        f.write(new_po.text.encode('utf-8'))


text:
layout: post
date: '2015-12-05'
title: "Watters - Wtoo Wtoo Maids Dress 575 Sleeveless Short/Mini Aline/Princess"
category: Watters - Wtoo
tags: [Watters - Wtoo,Wtoo,Aline/Princess ,Strapless,Short/Mini,Sleeveless]
---
### Watters - Wtoo Wtoo Maids Dress 575
Just **$199.99**
###   Sleeveless Short/Mini Aline/Princess

BRANDS	Wtoo

Silhouette	Aline/Princess

Neckline	Strapless

Hemline/Train	Short/Mini

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/watters-wtoo/14696-watters-dress-575.html](https://www.readybrides.com/en/watters-wtoo/14696-watters-dress-575.html)


text:
describe('eventify.listen()', function () {

  var obj, otherObj;

  beforeEach(function () {

    obj = {};
    otherObj = {};

    eventify(obj, 'namespace').define('onSomeEvent');
    eventify(otherObj).define('afterRamadan');
  });

  [true, false, 1.323, 100, 'hello'].forEach(function (v) {
    it('throws an exception is passed a ' + (typeof v) + ' value: ' + v, function () {
      expect(function () {
        eventify.listen(v);
      }).toThrow(v + ' (' + (typeof v) + ') is not a valid listener');
    });
  });

  describe('listening with a catchall function', function () {

    it('returns undefined', function () {

      expect(eventify.listen(function(){})).toBeUndefined();
    });

    it('passes an event object container the source, arguments, event name and namespace', function () {

      var listener = jasmine.createSpy('listener');

      eventify.listen(listener);

      obj.onSomeEvent.emit(1,2,3,4);

      expect(listener).toHaveBeenCalledWith({
        args: [1,2,3,4],
        source: obj,
        eventName: 'namespace/onSomeEvent'
      });
    });

    it('does not hear unnamespaced events', function () {

      var listener = jasmine.createSpy('listener');

      eventify.listen(listener);

      otherObj.afterRamadan.emit();

      expect(listener).not.toHaveBeenCalled();
    });
  });

  describe('listening with a listener object', function () {

    var listener;

    beforeEach(function () {
      listener = {
        'namespace/onSomeEvent': jasmine.createSpy('listener')
      , 'undefined/afterRamadan': jasmine.createSpy()
      , '/afterRamadan': jasmine.createSpy()
      , 'afterRamadan': jasmine.createSpy()
      };
    });

    it('returns a undefined', function () {
      expect(eventify.listen({})).toBeUndefined();
    });

    it('calls the object member with a name corresponding to the event with event arguments', function () {

      eventify.listen(listener);

      obj.onSomeEvent.emit(1,2,3,4,5);

      expect(listener['namespace/onSomeEvent']).toHaveBeenCalledWith(1,2,3,4,5);
    });

    it('calls the event handler with the source as context', function () {

      var context;

      listener['namespace/onSomeEvent'] = jasmine.createSpy().andCallFake(function () {
        context = this;
      });

      eventify.listen(listener);

      obj.onSomeEvent.emit();

      expect(context).toBe(obj);
    });

    it('does not hear unnamespaced events', function () {

      eventify.listen(listener);
      otherObj.afterRamadan.emit();

      expect(listener['undefined/afterRamadan']).not.toHaveBeenCalled();
      expect(listener['/afterRamadan']).not.toHaveBeenCalled();
      expect(listener['afterRamadan']).not.toHaveBeenCalled();
    });
  });
});


text:
namespace Microsoft.Azure.Management.ServiceBus.Models
{
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Description of NetworkRuleSet resource.
    /// </summary>
    [Rest.Serialization.JsonTransformation]
    public partial class NetworkRuleSet : ProxyResource
    {
        /// <summary>
        /// Initializes a new instance of the NetworkRuleSet class.
        /// </summary>
        public NetworkRuleSet()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the NetworkRuleSet class.
        /// </summary>
        /// <param name="id">Fully qualified resource ID for the resource. Ex -
        /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param>
        /// <param name="name">The name of the resource</param>
        /// <param name="type">The type of the resource. E.g.
        /// "Microsoft.EventHub/Namespaces" or
        /// "Microsoft.EventHub/Namespaces/EventHubs"</param>
        /// <param name="location">The geo-location where the resource
        /// lives</param>
        /// <param name="trustedServiceAccessEnabled">Value that indicates
        /// whether Trusted Service Access is Enabled or not.</param>
        /// <param name="defaultAction">Default Action for Network Rule Set.
        /// Possible values include: 'Allow', 'Deny'</param>
        /// <param name="virtualNetworkRules">List VirtualNetwork Rules</param>
        /// <param name="ipRules">List of IpRules</param>
        /// <param name="publicNetworkAccess">This determines if traffic is
        /// allowed over public network. By default it is enabled. Possible
        /// values include: 'Enabled', 'Disabled'</param>
        /// <param name="systemData">The system meta data relating to this
        /// resource.</param>
        public NetworkRuleSet(string id = default(string), string name = default(string), string type = default(string), string location = default(string), bool? trustedServiceAccessEnabled = default(bool?), string defaultAction = default(string), IList<NWRuleSetVirtualNetworkRules> virtualNetworkRules = default(IList<NWRuleSetVirtualNetworkRules>), IList<NWRuleSetIpRules> ipRules = default(IList<NWRuleSetIpRules>), string publicNetworkAccess = default(string), SystemData systemData = default(SystemData))
            : base(id, name, type, location)
        {
            TrustedServiceAccessEnabled = trustedServiceAccessEnabled;
            DefaultAction = defaultAction;
            VirtualNetworkRules = virtualNetworkRules;
            IpRules = ipRules;
            PublicNetworkAccess = publicNetworkAccess;
            SystemData = systemData;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets value that indicates whether Trusted Service Access is
        /// Enabled or not.
        /// </summary>
        [JsonProperty(PropertyName = "properties.trustedServiceAccessEnabled")]
        public bool? TrustedServiceAccessEnabled { get; set; }

        /// <summary>
        /// Gets or sets default Action for Network Rule Set. Possible values
        /// include: 'Allow', 'Deny'
        /// </summary>
        [JsonProperty(PropertyName = "properties.defaultAction")]
        public string DefaultAction { get; set; }

        /// <summary>
        /// Gets or sets list VirtualNetwork Rules
        /// </summary>
        [JsonProperty(PropertyName = "properties.virtualNetworkRules")]
        public IList<NWRuleSetVirtualNetworkRules> VirtualNetworkRules { get; set; }

        /// <summary>
        /// Gets or sets list of IpRules
        /// </summary>
        [JsonProperty(PropertyName = "properties.ipRules")]
        public IList<NWRuleSetIpRules> IpRules { get; set; }

        /// <summary>
        /// Gets or sets this determines if traffic is allowed over public
        /// network. By default it is enabled. Possible values include:
        /// 'Enabled', 'Disabled'
        /// </summary>
        [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
        public string PublicNetworkAccess { get; set; }

        /// <summary>
        /// Gets the system meta data relating to this resource.
        /// </summary>
        [JsonProperty(PropertyName = "systemData")]
        public SystemData SystemData { get; private set; }

    }
}


text:
ACCEPTED

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

#### Published in
Willdenowia, Beih. 9: 96 (1976)

#### Original name
Cryptodiscus solidaginis Ces.

### Remarks
null


text:
using System;
using System.Text;

namespace Lucene.Net.Support
{

    /// <summary>
    /// An adapter for <see cref="StringBuilder"/> that implements <see cref="ICharSequence"/>
    /// </summary>
    public class StringBuilderCharSequenceWrapper : ICharSequence
    {
        private readonly StringBuilder value;

        public StringBuilderCharSequenceWrapper(StringBuilder wrappedValue)
        {
            if (wrappedValue == null)
                throw new ArgumentNullException("wrappedValue");

            this.value = wrappedValue;
        }

        // LUCENENET specific - added to .NETify
        public char this[int index]
        {
            get { return value[index]; }
        }

        public int Length
        {
            get { return value.Length; }
        }

        public ICharSequence SubSequence(int start, int end)
        {
            return new StringCharSequenceWrapper(value.ToString(start, end - start));
        }

        public override int GetHashCode()
        {
            return value.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;
            if (!(obj is StringBuilder))
                return false;

            return value.Equals(obj as StringBuilder);
        }

        public override string ToString()
        {
            return value.ToString();
        }
    }
}


text:
#ifndef PCL_SEGMENTATION_SAC_SEGMENTATION_H_
#define PCL_SEGMENTATION_SAC_SEGMENTATION_H_

#include <pcl/pcl_base.h>
#include <pcl/PointIndices.h>
#include <pcl/ModelCoefficients.h>

// Sample Consensus methods
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/sac.h>
// Sample Consensus models
#include <pcl/sample_consensus/model_types.h>
#include <pcl/sample_consensus/sac_model.h>

#include <pcl/search/search.h>

namespace pcl
{
  /** \brief @b SACSegmentation represents the Nodelet segmentation class for
    * Sample Consensus methods and models, in the sense that it just creates a
    * Nodelet wrapper for generic-purpose SAC-based segmentation.
    * \author Radu Bogdan Rusu
    * \ingroup segmentation
    */
  template <typename PointT>
  class SACSegmentation : public PCLBase<PointT>
  {
    using PCLBase<PointT>::initCompute;
    using PCLBase<PointT>::deinitCompute;

     public:
      using PCLBase<PointT>::input_;
      using PCLBase<PointT>::indices_;

      typedef pcl::PointCloud<PointT> PointCloud;
      typedef typename PointCloud::Ptr PointCloudPtr;
      typedef typename PointCloud::ConstPtr PointCloudConstPtr;
      typedef typename pcl::search::Search<PointT>::Ptr SearchPtr;

      typedef typename SampleConsensus<PointT>::Ptr SampleConsensusPtr;
      typedef typename SampleConsensusModel<PointT>::Ptr SampleConsensusModelPtr;

      /** \brief Empty constructor.
        * \param[in] random if true set the random seed to the current time, else set to 12345 (default: false)
        */
      SACSegmentation (bool random = false)
        : model_ ()
        , sac_ ()
        , model_type_ (-1)
        , method_type_ (0)
        , threshold_ (0)
        , optimize_coefficients_ (true)
        , radius_min_ (-std::numeric_limits<double>::max ())
        , radius_max_ (std::numeric_limits<double>::max ())
        , samples_radius_ (0.0)
        , samples_radius_search_ ()
        , eps_angle_ (0.0)
        , axis_ (Eigen::Vector3f::Zero ())
        , max_iterations_ (50)
        , probability_ (0.99)
        , random_ (random)
      {
      }

      /** \brief Empty destructor. */
      virtual ~SACSegmentation () { /*srv_.reset ();*/ };

      /** \brief The type of model to use (user given parameter).
        * \param[in] model the model type (check \a model_types.h)
        */
      inline void
      setModelType (int model) { model_type_ = model; }

      /** \brief Get the type of SAC model used. */
      inline int
      getModelType () const { return (model_type_); }

      /** \brief Get a pointer to the SAC method used. */
      inline SampleConsensusPtr
      getMethod () const { return (sac_); }

      /** \brief Get a pointer to the SAC model used. */
      inline SampleConsensusModelPtr
      getModel () const { return (model_); }

      /** \brief The type of sample consensus method to use (user given parameter).
        * \param[in] method the method type (check \a method_types.h)
        */
      inline void
      setMethodType (int method) { method_type_ = method; }

      /** \brief Get the type of sample consensus method used. */
      inline int
      getMethodType () const { return (method_type_); }

      /** \brief Distance to the model threshold (user given parameter).
        * \param[in] threshold the distance threshold to use
        */
      inline void
      setDistanceThreshold (double threshold) { threshold_ = threshold; }

      /** \brief Get the distance to the model threshold. */
      inline double
      getDistanceThreshold () const { return (threshold_); }

      /** \brief Set the maximum number of iterations before giving up.
        * \param[in] max_iterations the maximum number of iterations the sample consensus method will run
        */
      inline void
      setMaxIterations (int max_iterations) { max_iterations_ = max_iterations; }

      /** \brief Get maximum number of iterations before giving up. */
      inline int
      getMaxIterations () const { return (max_iterations_); }

      /** \brief Set the probability of choosing at least one sample free from outliers.
        * \param[in] probability the model fitting probability
        */
      inline void
      setProbability (double probability) { probability_ = probability; }

      /** \brief Get the probability of choosing at least one sample free from outliers. */
      inline double
      getProbability () const { return (probability_); }

      /** \brief Set to true if a coefficient refinement is required.
        * \param[in] optimize true for enabling model coefficient refinement, false otherwise
        */
      inline void
      setOptimizeCoefficients (bool optimize) { optimize_coefficients_ = optimize; }

      /** \brief Get the coefficient refinement internal flag. */
      inline bool
      getOptimizeCoefficients () const { return (optimize_coefficients_); }

      /** \brief Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate
        * a radius)
        * \param[in] min_radius the minimum radius model
        * \param[in] max_radius the maximum radius model
        */
      inline void
      setRadiusLimits (const double &min_radius, const double &max_radius)
      {
        radius_min_ = min_radius;
        radius_max_ = max_radius;
      }

      /** \brief Get the minimum and maximum allowable radius limits for the model as set by the user.
        * \param[out] min_radius the resultant minimum radius model
        * \param[out] max_radius the resultant maximum radius model
        */
      inline void
      getRadiusLimits (double &min_radius, double &max_radius)
      {
        min_radius = radius_min_;
        max_radius = radius_max_;
      }

      /** \brief Set the maximum distance allowed when drawing random samples
        * \param[in] radius the maximum distance (L2 norm)
        * \param search
        */
      inline void
      setSamplesMaxDist (const double &radius, SearchPtr search)
      {
        samples_radius_ = radius;
        samples_radius_search_ = search;
      }

      /** \brief Get maximum distance allowed when drawing random samples
        *
        * \param[out] radius the maximum distance (L2 norm)
        */
      inline void
      getSamplesMaxDist (double &radius)
      {
        radius = samples_radius_;
      }

      /** \brief Set the axis along which we need to search for a model perpendicular to.
        * \param[in] ax the axis along which we need to search for a model perpendicular to
        */
      inline void
      setAxis (const Eigen::Vector3f &ax) { axis_ = ax; }

      /** \brief Get the axis along which we need to search for a model perpendicular to. */
      inline Eigen::Vector3f
      getAxis () const { return (axis_); }

      /** \brief Set the angle epsilon (delta) threshold.
        * \param[in] ea the maximum allowed difference between the model normal and the given axis in radians.
        */
      inline void
      setEpsAngle (double ea) { eps_angle_ = ea; }

      /** \brief Get the epsilon (delta) model angle threshold in radians. */
      inline double
      getEpsAngle () const { return (eps_angle_); }

      /** \brief Base method for segmentation of a model in a PointCloud given by <setInputCloud (), setIndices ()>
        * \param[out] inliers the resultant point indices that support the model found (inliers)
        * \param[out] model_coefficients the resultant model coefficients
        */
      virtual void
      segment (PointIndices &inliers, ModelCoefficients &model_coefficients);

    protected:
      /** \brief Initialize the Sample Consensus model and set its parameters.
        * \param[in] model_type the type of SAC model that is to be used
        */
      virtual bool
      initSACModel (const int model_type);

      /** \brief Initialize the Sample Consensus method and set its parameters.
        * \param[in] method_type the type of SAC method to be used
        */
      virtual void
      initSAC (const int method_type);

      /** \brief The model that needs to be segmented. */
      SampleConsensusModelPtr model_;

      /** \brief The sample consensus segmentation method. */
      SampleConsensusPtr sac_;

      /** \brief The type of model to use (user given parameter). */
      int model_type_;

      /** \brief The type of sample consensus method to use (user given parameter). */
      int method_type_;

      /** \brief Distance to the model threshold (user given parameter). */
      double threshold_;

      /** \brief Set to true if a coefficient refinement is required. */
      bool optimize_coefficients_;

      /** \brief The minimum and maximum radius limits for the model. Applicable to all models that estimate a radius. */
      double radius_min_, radius_max_;

      /** \brief The maximum distance of subsequent samples from the first (radius search) */
      double samples_radius_;

      /** \brief The search object for picking subsequent samples using radius search */
      SearchPtr samples_radius_search_;

      /** \brief The maximum allowed difference between the model normal and the given axis. */
      double eps_angle_;

      /** \brief The axis along which we need to search for a model perpendicular to. */
      Eigen::Vector3f axis_;

      /** \brief Maximum number of iterations before giving up (user given parameter). */
      int max_iterations_;

      /** \brief Desired probability of choosing at least one sample free from outliers (user given parameter). */
      double probability_;

      /** \brief Set to true if we need a random seed. */
      bool random_;

      /** \brief Class get name method. */
      virtual std::string
      getClassName () const { return ("SACSegmentation"); }
  };

  /** \brief @b SACSegmentationFromNormals represents the PCL nodelet segmentation class for Sample Consensus methods and
    * models that require the use of surface normals for estimation.
    * \ingroup segmentation
    */
  template <typename PointT, typename PointNT>
  class SACSegmentationFromNormals: public SACSegmentation<PointT>
  {
    using SACSegmentation<PointT>::model_;
    using SACSegmentation<PointT>::model_type_;
    using SACSegmentation<PointT>::radius_min_;
    using SACSegmentation<PointT>::radius_max_;
    using SACSegmentation<PointT>::eps_angle_;
    using SACSegmentation<PointT>::axis_;
    using SACSegmentation<PointT>::random_;

    public:
      using PCLBase<PointT>::input_;
      using PCLBase<PointT>::indices_;

      typedef typename SACSegmentation<PointT>::PointCloud PointCloud;
      typedef typename PointCloud::Ptr PointCloudPtr;
      typedef typename PointCloud::ConstPtr PointCloudConstPtr;

      typedef typename pcl::PointCloud<PointNT> PointCloudN;
      typedef typename PointCloudN::Ptr PointCloudNPtr;
      typedef typename PointCloudN::ConstPtr PointCloudNConstPtr;

      typedef typename SampleConsensus<PointT>::Ptr SampleConsensusPtr;
      typedef typename SampleConsensusModel<PointT>::Ptr SampleConsensusModelPtr;
      typedef typename SampleConsensusModelFromNormals<PointT, PointNT>::Ptr SampleConsensusModelFromNormalsPtr;

      /** \brief Empty constructor.
        * \param[in] random if true set the random seed to the current time, else set to 12345 (default: false)
        */
      SACSegmentationFromNormals (bool random = false)
        : SACSegmentation<PointT> (random)
        , normals_ ()
        , distance_weight_ (0.1)
        , distance_from_origin_ (0)
        , min_angle_ ()
        , max_angle_ ()
      {};

      /** \brief Provide a pointer to the input dataset that contains the point normals of
        * the XYZ dataset.
        * \param[in] normals the const boost shared pointer to a PointCloud message
        */
      inline void
      setInputNormals (const PointCloudNConstPtr &normals) { normals_ = normals; }

      /** \brief Get a pointer to the normals of the input XYZ point cloud dataset. */
      inline PointCloudNConstPtr
      getInputNormals () const { return (normals_); }

      /** \brief Set the relative weight (between 0 and 1) to give to the angular
        * distance (0 to pi/2) between point normals and the plane normal.
        * \param[in] distance_weight the distance/angular weight
        */
      inline void
      setNormalDistanceWeight (double distance_weight) { distance_weight_ = distance_weight; }

      /** \brief Get the relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point
        * normals and the plane normal. */
      inline double
      getNormalDistanceWeight () const { return (distance_weight_); }

      /** \brief Set the minimum opning angle for a cone model.
        * \param min_angle the opening angle which we need minumum to validate a cone model.
        * \param max_angle the opening angle which we need maximum to validate a cone model.
        */
      inline void
      setMinMaxOpeningAngle (const double &min_angle, const double &max_angle)
      {
        min_angle_ = min_angle;
        max_angle_ = max_angle;
      }

      /** \brief Get the opening angle which we need minumum to validate a cone model. */
      inline void
      getMinMaxOpeningAngle (double &min_angle, double &max_angle)
      {
        min_angle = min_angle_;
        max_angle = max_angle_;
      }

      /** \brief Set the distance we expect a plane model to be from the origin
        * \param[in] d distance from the template plane modl to the origin
        */
      inline void
      setDistanceFromOrigin (const double d) { distance_from_origin_ = d; }

      /** \brief Get the distance of a plane model from the origin. */
      inline double
      getDistanceFromOrigin () const { return (distance_from_origin_); }

    protected:
      /** \brief A pointer to the input dataset that contains the point normals of the XYZ dataset. */
      PointCloudNConstPtr normals_;

      /** \brief The relative weight (between 0 and 1) to give to the angular
        * distance (0 to pi/2) between point normals and the plane normal.
        */
      double distance_weight_;

      /** \brief The distance from the template plane to the origin. */
      double distance_from_origin_;

      /** \brief The minimum and maximum allowed opening angle of valid cone model. */
      double min_angle_;
      double max_angle_;

      /** \brief Initialize the Sample Consensus model and set its parameters.
        * \param[in] model_type the type of SAC model that is to be used
        */
      virtual bool
      initSACModel (const int model_type);

      /** \brief Class get name method. */
      virtual std::string
      getClassName () const { return ("SACSegmentationFromNormals"); }
  };
}

#ifdef PCL_NO_PRECOMPILE
#include <pcl/segmentation/impl/sac_segmentation.hpp>
#endif

#endif  //#ifndef PCL_SEGMENTATION_SAC_SEGMENTATION_H_


text:
package com.smartdevicelink.test.rpc.datatypes;

import com.smartdevicelink.proxy.rpc.VehicleDataResult;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
import com.smartdevicelink.test.JsonUtils;
import com.smartdevicelink.test.Test;

import junit.framework.TestCase;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Iterator;

public class VehicleDataResultTest extends TestCase {

	private VehicleDataResult msg;

	@Override
	public void setUp() {
		msg = new VehicleDataResult();

		msg.setDataType(Test.GENERAL_VEHICLEDATATYPE);
		msg.setResultCode(Test.GENERAL_VEHICLEDATARESULTCODE);
	}

    /**
	 * Tests the expected values of the RPC message.
	 */
    public void testRpcValues () {
		// Test Values
		VehicleDataResultCode result = msg.getResultCode();
		VehicleDataType type = msg.getDataType();

		// Valid Tests
		assertEquals(Test.MATCH, Test.GENERAL_VEHICLEDATARESULTCODE, result);
		assertEquals(Test.MATCH, Test.GENERAL_VEHICLEDATATYPE, type);

		// Invalid/Null Tests
		VehicleDataResult msg = new VehicleDataResult();
		assertNotNull(Test.NOT_NULL, msg);

		assertNull(Test.NULL, msg.getDataType());
		assertNull(Test.NULL, msg.getResultCode());
	}

	public void testJson() {
		JSONObject reference = new JSONObject();

		try {
			reference.put(VehicleDataResult.KEY_RESULT_CODE, Test.GENERAL_VEHICLEDATARESULTCODE);
			reference.put(VehicleDataResult.KEY_DATA_TYPE, Test.GENERAL_VEHICLEDATATYPE);

			JSONObject underTest = msg.serializeJSON();
			assertEquals(Test.MATCH, reference.length(), underTest.length());

			Iterator<?> iterator = reference.keys();
			while (iterator.hasNext()) {
				String key = (String) iterator.next();
				assertEquals(Test.MATCH,
						JsonUtils.readObjectFromJsonObject(reference, key),
						JsonUtils.readObjectFromJsonObject(underTest, key));
			}
		} catch (JSONException e) {
			fail(Test.JSON_FAIL);
		}
	}
}


text:
<TITLE>cgGetBehavior</TITLE>

<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
</object>

NAME

cgGetBehavior - get the behavior enumerant from a behavior name

SYNOPSIS

  #include <Cg/cg.h>

  CGbehavior cgGetBehavior( const char * behavior_string );

PARAMETERS

behavior_string

A string containing the case-sensitive behavior name.

RETURN VALUES

Returns the behavior enumerant associated with behavior_string.

Returns CG_BEHAVIOR_UNKNOWN if behavior_string is NULL or if no
CGbehavior is associated with the given string.

DESCRIPTION

cgGetBehavior returns the enumerant assigned to a behavior name.

EXAMPLES

  CGbehavior b = cgGetBehavior("latest");

  /* b == CG_BEHAVIOR_LATEST */

ERRORS

CG_INVALID_PARAMETER_ERROR is generated if behavior_string is NULL.

HISTORY

cgGetBehavior was introduced in Cg 3.0.

SEE ALSO

cgGetBehaviorString,
cgGetContextBehavior,
cgSetContextBehavior


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">CryptODroid</string>
    <string name="mainHeaderLine">Encrypted files and keys will stored in /sdcard/CryptODroid. Large files (10mb+) take
        time to process... be patient.
    </string>
</resources>


text:
package bd.source;

/**
 * Is a {@link SourceCoordinate} with additional tags to characterize the source range.
 * Otherwise, behaves the same.
 */
public class TaggedSourceCoordinate extends SourceCoordinate {
  public final String[] tags;

  protected TaggedSourceCoordinate(final int startLine, final int startColumn,
      final int charIndex, final int length, final String[] tags) {
    super(startLine, startColumn, charIndex, length);
    this.tags = tags;
  }
}


text:
<!DOCTYPE html>

    <title>likeness.helpers.JSContext#resolve(ref(schema documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../../../index.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../../../highlight.css" />

            argument

                undefined

                |

                Object

                |

                :likeness.helpers.JSContext#resolve(ref(schema

        This document was generated with
        doczar
        at 3:55pm on 8/14/2015


text:
<?php
/**
 * Validator.php
 * restfully
 * Date: 16.09.17
 */

namespace AppBundle\Validator;
use Components\Resource\Validator as Component;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;

class Validator implements Component\IValidator
{

    /**
     * @var ValidatorInterface
     */
    protected $validator;

    /**
     * @var TranslatorInterface
     */
    protected $translator;

    /**
     * Validator constructor.
     *
     * @param ValidatorInterface  $validator
     * @param TranslatorInterface $translator
     */
    public function __construct(ValidatorInterface $validator, TranslatorInterface $translator) {
        $this->validator  = $validator;
        $this->translator = $translator;
    }

    /**
     * @param mixed $subject
     * @param null  $constraints
     * @param null  $groups
     *
     * @return Result
     */
    public function validate($subject, $constraints= null, $groups = null)
    {
        $violations = $this->validator->validate($subject, $constraints, $groups);
        return new Result($violations, $this->translator);
    }
}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace Ldp
{
    public class GameoverMenuController : MonoBehaviour
    {
        public Text gameMsg;
        public Text finalScore;
    }
}


text:
package foo.bar;

import io.hekate.cluster.ClusterNodeId;
import io.hekate.messaging.loadbalance.LoadBalancer;
import io.hekate.messaging.loadbalance.LoadBalancerContext;

public class SomeLoadBalancer implements LoadBalancer<Object> {
    @Override
    public ClusterNodeId route(Object msg, LoadBalancerContext ctx) {
        return ctx.topology().random().id();
    }
}


text:
import {Observable} from 'rxjs/Observable';
import {Match} from './../matches/shared/match.model';
import {PLAYERS} from './data/players';
import {Player} from './../players/shared/player.model';
import {Component, Injectable, Input, OnChanges, OnInit} from '@angular/core';
import {of} from "rxjs";

@Injectable()
export class PlayerServiceStub {

  getPlayers(league_id: string): Promise<Player[]> {
    return Promise.resolve(PLAYERS);
  }

  getPlayer(id: string): Promise<Player> {
    return Promise.resolve(PLAYERS.find(player => player.id === id));
  }

  getActivePlayersCount(leagueId: string): Promise<number> {
    return Promise.resolve(5);
  }

  getRanking(leagueId: string): Promise<Player[]> {
    return Promise.resolve(PLAYERS
      .sort((playerOne, playerTwo) => playerTwo.rating - playerOne.rating)
      .filter(player => player.active == true));
  }

  addPlayer(leagueId: string, player: Player): Promise<Player> {
    let lastId = PLAYERS[PLAYERS.length - 1].id;
    player.id = lastId;
    player.rating = 1000;
    PLAYERS.push(player);
    return Promise.resolve(player);
  }

  delete(leagueId: string, playerId: string): Promise<boolean> {
    let index = PLAYERS.findIndex(player => player.id == playerId);
    PLAYERS.splice(index, 1);
    return Promise.resolve(true);
  }

  update(leagueId: string, player: Player): Promise<Player> {
    let playerToUpdate = new Player();
    playerToUpdate.username = player.username;
    playerToUpdate.rating = player.rating;
    playerToUpdate.active = player.active;
    return Promise.resolve(playerToUpdate);
  }

  getMatchForecast(playerId: string, opponentId: string): Promise<Match[]> {
    let player = PLAYERS.find(p => p.id == playerId);
    let opponent = PLAYERS.find(p => p.id == playerId);
    let score = [[2, 0], [2, 1], [1, 2], [0, 2]];
    let ratio = [20, 10, -10, -20];
    let matches = [];
    for(let i = 0; i < 4; i++) {
      let match = new Match();
      match.playerOne = player;
      match.playerTwo = opponent;
      match.scores = {playerId: score[i][0], opponentId: score[i][1]}
      match.ratingDelta = ratio[i];
      matches.push(match);
    }
    return Promise.resolve(matches);
  }

  findByUsername(leagueId: string, username: string): Observable<Player[]> {
    return of(PLAYERS);
  }

  findActiveByUsername(leagueId: string, username: string): Observable<Player[]> {
    return of(PLAYERS);
  }
}

@Component({
  selector: 'app-player-matches',
  template: ''
})
export class PlayerMatchesStubComponent implements OnInit {
  @Input() leagueId: string;
  @Input() playerId: string;

  constructor() { }
  ngOnInit() { }
}

@Component({
  selector: 'app-player-statistics',
  template: ''
})
export class PlayerStatisticsStubComponent implements OnInit {
  @Input() leagueId: string;
  @Input() playerId: string;

  constructor() { }
  ngOnInit() { }
}

@Component({
  selector: 'app-player-ranking',
  template: ''
})
export class PlayerRankingStubComponent implements OnChanges {
  @Input() league;
  constructor() { }
  ngOnChanges() { }
}

@Component({
  selector: 'app-player-forecast',
  template: ''
})
export class PlayerForecastStubComponent implements OnInit {
  @Input() leagueId;
  @Input() playerId;
  constructor() { }
  ngOnInit() { }
}

@Component({
  selector: 'app-player-opponents',
  template: ''
})
export class PlayerOpponentsStubComponent implements OnInit {
  @Input() leagueId;
  @Input() playerId;
  ngOnInit() {}
}

@Component({
  selector: 'app-player-cell',
  template: '{{player?.username}}'
})
export class PlayerCellStubComponent implements OnInit {
  @Input() match: Match;
  @Input() player: Player;
  @Input() currentPlayerId: string;
  constructor() {};
  ngOnInit() {}
}

@Component({
  selector: 'app-player-user-info',
  template: ''
})
export class PlayerUserInfoStubComponent implements OnInit {
  @Input() player: Player;
  constructor() {};
  ngOnInit() {}
}


text:
extern "C" {
#endif

/// Create an atom with the given `name`, and set the atom type to `name`.
///
/// The caller of this function should free the associated memory using
/// `chfl_free`.
///
/// @example{capi/chfl_atom/chfl_atom.c}
/// @return A pointer to the atom, or NULL in case of error. You can use
///         `chfl_last_error` to learn about the error.
CHFL_EXPORT CHFL_ATOM* chfl_atom(const char* name);

/// Get a copy of an `atom`.
///
/// The caller of this function should free the associated memory using
/// `chfl_free`.
///
/// @example{capi/chfl_atom/copy.c}
/// @return A pointer to the new atom, or NULL in case of error. You can use
///         `chfl_last_error` to learn about the error.
CHFL_EXPORT CHFL_ATOM* chfl_atom_copy(const CHFL_ATOM* atom);

/// Get access to the atom at the given `index` from a `frame`.
///
/// Any modification to the atom will be reflected in the `frame`. The `frame`
/// will be kept alive, even if `chfl_free(frame)` is called, until `chfl_free`
/// is also called on the pointer returned by this function.
///
/// The pointer returned by this function points directly inside the frame, and
/// will be invalidated if any of the following function is called on the frame:
///
/// - `chfl_frame_resize`
/// - `chfl_frame_add_atom`
/// - `chfl_frame_remove`
/// - `chfl_frame_set_topology`
/// - `chfl_trajectory_read`
/// - `chfl_trajectory_read_step`
///
/// Calling any function on an invalidated pointer is undefined behavior. Even
/// if the pointer if invalidated, it stills needs to be released with
/// `chfl_free`.
///
/// @example{capi/chfl_atom/from_frame.c}
///
/// @return A pointer to the atom, or NULL in case of error or if `index` is out
/// of bounds. You can use `chfl_last_error` to learn about the error.
CHFL_EXPORT CHFL_ATOM* chfl_atom_from_frame(CHFL_FRAME* frame, uint64_t index);

/// Get access to the atom at the given `index` from a `topology`
///
/// Any modification to the atom will be reflected in the `topology`. The
/// `topology` will be kept alive, even if `chfl_free(topology)` is called,
/// until `chfl_free` is also called on the pointer returned by this function.
///
/// The pointer returned by this function points directly inside the topology,
/// and will be invalidated if any of the following function is called on the
/// topology:
///
/// - `chfl_topology_resize`
/// - `chfl_topology_add_atom`
/// - `chfl_topology_remove`
///
/// Calling any function on an invalidated pointer is undefined behavior. Even
/// if the pointer if invalidated, it stills needs to be released with
/// `chfl_free`.
///
/// @example{capi/chfl_atom/from_topology.c} @return A pointer to the
/// atom, or NULL in case of error or if `index` is out of bounds. You can use
/// `chfl_last_error` to learn about the error.
CHFL_EXPORT CHFL_ATOM* chfl_atom_from_topology(
    CHFL_TOPOLOGY* topology, uint64_t index
);

/// Get the mass of an `atom`, in the double pointed to by `mass`.
///
/// The mass is given in atomic mass units.
///
/// @example{capi/chfl_atom/mass.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_mass(const CHFL_ATOM* atom, double* mass);

/// Set the mass of an `atom` to `mass`.
///
/// The mass must be in atomic mass units.
///
/// @example{capi/chfl_atom/set_mass.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_set_mass(CHFL_ATOM* atom, double mass);

/// Get the charge of an `atom`, in the double pointed to by `charge`.
///
/// The charge is in number of the electron charge *e*.
///
/// @example{capi/chfl_atom/charge.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_charge(const CHFL_ATOM* atom, double* charge);

/// Set the charge of an `atom` to `charge`.
///
/// The charge must be in number of the electron charge *e*.
///
/// @example{capi/chfl_atom/set_charge.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_set_charge(CHFL_ATOM* atom, double charge);

/// Get the type of an `atom` in the string buffer `type`.
///
/// The buffer size must be passed in `buffsize`. This function will truncate
/// the atomic type to fit in the buffer.
///
/// @example{capi/chfl_atom/type.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_type(
    const CHFL_ATOM* atom, char* type, uint64_t buffsize
);

/// Set the type of an `atom` to `type`.
///
/// `type` must be a null terminated string.
///
/// @example{capi/chfl_atom/set_type.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_set_type(CHFL_ATOM* atom, const char* type);

/// Get the name of an `atom` in the string buffer `name`.
///
/// The buffer size must be passed in `buffsize`. This function will truncate
/// the name to fit in the buffer.
///
/// @example{capi/chfl_atom/name.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_name(
    const CHFL_ATOM* atom, char* name, uint64_t buffsize
);

/// Set the name of an `atom` to `name`.
///
/// `name` must be a null terminated string.
///
/// @example{capi/chfl_atom/set_name.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_set_name(CHFL_ATOM* atom, const char* name);

/// Get the full name of an `atom` from its type in the string buffer `name`
///
/// The buffer size must be passed in `buffsize`. This function will truncate
/// the name to fit in the buffer.
///
/// @example{capi/chfl_atom/full_name.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_full_name(
    const CHFL_ATOM* atom, char* name, uint64_t buffsize
);

/// Get the Van der Waals radius of an `atom` from the atom type, in the double
/// pointed to by `radius`.
///
/// If the radius in unknown, this function set `radius` to 0.
///
/// @example{capi/chfl_atom/vdw_radius.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_vdw_radius(const CHFL_ATOM* atom, double* radius);

/// Get the covalent radius of an `atom` from the atom type, in the double
/// pointed to by `radius`.
///
/// If the radius in unknown, this function set `radius` to 0.
///
/// @example{capi/chfl_atom/covalent_radius.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_covalent_radius(const CHFL_ATOM* atom, double* radius);

/// Get the atomic number of an `atom` from the atom type, in the integer
/// pointed to by `number`.
///
/// If the atomic number in unknown, this function set `number` to 0.
///
/// @example{capi/chfl_atom/atomic_number.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_atomic_number(const CHFL_ATOM* atom, uint64_t* number);

/// Get the number of properties associated with this `atom` in `count`.
///
/// @example{capi/chfl_atom/properties_count.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_properties_count(
    const CHFL_ATOM* atom, uint64_t* count
);

/// Get the names of all properties of this `atom` in the pre-allocated array
/// `names` of size `count`.
///
/// `names` size must be passed in the `count` parameter, and be equal to the
/// result of `chfl_atom_properties_count`.
///
/// The pointers in `names` are only valid until a new property is added to the
/// atom with `chfl_atom_set_property`.
///
/// @example{capi/chfl_atom/list_properties.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_list_properties(
    const CHFL_ATOM* atom, const char* names[], uint64_t count
);

/// Add a new `property` with the given `name` to this `atom`.
///
/// If a property with the same name already exists, this function override the
/// existing property with the new one.
///
/// @example{capi/chfl_atom/property.c}
/// @return The operation status code. You can use `chfl_last_error` to learn
///         about the error if the status code is not `CHFL_SUCCESS`.
CHFL_EXPORT chfl_status chfl_atom_set_property(
    CHFL_ATOM* atom, const char* name, const CHFL_PROPERTY* property
);

/// Get a property with the given `name` in this `atom`.
///
/// This function returns `NULL` if no property exists with the given name.
///
/// The user of this function is responsible to deallocate memory using the
/// `chfl_free` function.
///
/// @example{capi/chfl_atom/property.c}
/// @return A pointer to the property, or NULL in case of error. You can use
///         `chfl_last_error` to learn about the error.
CHFL_EXPORT CHFL_PROPERTY* chfl_atom_get_property(
    const CHFL_ATOM* atom, const char* name
);

#ifdef __cplusplus
}
#endif

#endif // CHEMFILES_CAPI_ATOM_H


text:
[![Build Status](https://travis-ci.org/brutella/hc.svg)](https://travis-ci.org/brutella/hc)

[HomeControl][homecontrol] is an implementation of the [HomeKit][homekit] Accessory Protocol (HAP) to create your own HomeKit accessory and bridges. HomeKit bridges make non-HomeKit accessories available to HomeKit by acting as a middleman.

## Overview

[HomeKit][homekit] is a set of protocols and libraries to access accessories for Home Automation. Unfortunately the protocol is not open source and the official documentation is only available to MFi members. HomeControl is a complete implementation of the protocol in Go and does not depend on any OS.

## HomeKit Client

I've made an app for iPhone, iPad and Apple Watch called [Home][home] to control any HomeKit accessory. If you purchase Home on the [App Store][home-appstore], you not only support my work but also get an awesome iOS app. Thank you.

[home]: http://selfcoded.com/home/
[home-appstore]: http://itunes.apple.com/app/id995994352

## Features

- Full implementation of the HomeKit Accessory Protocol in pure Go
    - Support for switch, outlet, light bulb, thermostat accessory
- Built-in service announcement via mDNS using [bonjour](http://github.com/oleksandr/bonjour)
- Optional logging with https://github.com/brutella/log
- Runs on multiple platforms (already in use on Linux and OS X)
- Documentation: http://godoc.org/github.com/brutella/hc

## Getting Started

1. [Install Go](http://golang.org/doc/install)
2. [Setup Go workspace](http://golang.org/doc/code.html#Organization)
3. Create your own HomeKit bridge or clone an existing one (e.g.  [hklight](https://github.com/brutella/hklight))

        cd $GOPATH/src

        # Clone project
        git clone https://github.com/brutella/hklight && cd hklight

        # Install dependencies
        go get

        # Run the project
        go run hklightd.go

4. Pair with your HomeKit App of choice (e.g. [Home][home-appstore])

## API Example

Create a simple on/off switch which is accessible via IP and secured using the pin *00102003*.

```go
package main

import (
    "log"
    "github.com/brutella/hc/hap"
    "github.com/brutella/hc/model"
    "github.com/brutella/hc/model/accessory"
)

func main() {
	info := model.Info{
		Name: "Lamp",
	}
	sw := accessory.NewSwitch(info)

	t, err := hap.NewIPTransport("00102003", sw.Accessory)
	if err != nil {
		log.Fatal(err)
	}

    hap.OnTermination(func(){
        t.Stop()
    })

	t.Start()
}
```

You should change some default values for your own needs

```go
info := model.Info{
    Name: "Lamp",
    SerialNumber: "051AC-23AAM1",
	Manufacturer: "Apple",
    Model: "AB",
    Firmware: "1.0.1",
}
```

### Callbacks

You get a callback when the power state of a switch changed by a client.

```go
sw.OnStateChanged(func(on bool) {
	if on == true {
		log.Println("Client changed switch to on")
	} else {
		log.Println("Client changed switch to off")
	}
})
```

When the switch is turned on "the analog way", you should set the state of the accessory.

	sw.SetOn(true)

A complete example is available in `_example/example.go`.

## Dependencies

HomeControl depends on the following libraries

- `github.com/tadglines/go-pkgs/crypto/srp` for *SRP* algorithm
- `github.com/codahale/chacha20` for *chacha20 poly1305* algorithm
- `github.com/golang/crypto`for *chacha20 poly1305* algorithm and *curve25519* key generation
- `github.com/agl/ed25519` for *ed25519* signature
- `github.com/gosexy/to` for type conversion
- `github.com/oleksandr/bonjour` for mDNS

## HomeKit Accessories

HomeControl currently supports the following accessory types

- Switch
- Outlet
- Light Bulb
- Thermostat
- Thermometer (same as the Thermostat accessory which just readonly services)

The metdata dump in iOS 8.3 (found by [@KhaosT](https://twitter.com/khaost/status/567621750494474241)) includes a list of required and optional characteristics.

Service	Required	Optional

Accessory Information	name, manufacturer, model, serial-number, identify	firmware.revision, hardware.revision, software.revision

Switch	on	name

Outlet	on, outlet-in-use	name

Fan	on	name, rotation.direction, rotation.speed

Thermostat	heating-cooling.current, heating-cooling.target, temperature.current, temperature.target, temperature.units	name, relative-humidity.current, relative-humidity.target, temperature.cooling-threshold, temperature.heating-threshold

Garage Door Opener	door-state.current, door-state.target, obstruction-detected	lock-mechanism.current-state, lock-mechanism.target-state, name

Light Bulb	on	name, brightness, hue, saturation

Lock Management	version, lock-management.control-point	administrator-only-access, audio-feedback, door-state.current, lock-management.auto-secure-timeout, lock-mechanism.last-known-action, logs, motion-detected

Lock Mechanism	lock-mechanism.current-state, lock-mechanism.target-state	name

The HomeKit framework on iOS uses the same order as in the json. I assume that clients displays them in the same order to the user.

### iOS 9

iOS 9 supports new type of accessories and includes new service and characteristic types. The new types are already available in *model/service/constants.go* and *model/characteristic/constants.go*.

# Contact

Matthias Hochgatterer

Github: [https://github.com/brutella](https://github.com/brutella/)

Twitter: [https://twitter.com/brutella](https://twitter.com/brutella)

# License

HomeControl is available under a non-commercial license. See the LICENSE file for more info.

[homecontrol]: http://selfcoded.com/homecontrol/
[homekit]: https://developer.apple.com/homekit/


text:
import type {Dispatcher} from 'react-reconciler/src/ReactInternalTypes';

/**
 * Keeps track of the current dispatcher.
 */
const ReactCurrentDispatcher = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: (null: null | Dispatcher),
};

export default ReactCurrentDispatcher;


text:
#region LGPL License

#endregion

#region SVN Version Information

// <file>
//     <license see="http://axiom3d.net/wiki/index.php/license.txt"/>
//     <id value="$Id$"/>
// </file>

#endregion SVN Version Information

#region Namespace Declarations

using Axiom.ParticleSystems;
using Axiom.Scripting.Compiler.AST;

#endregion Namespace Declarations

namespace Axiom.Scripting.Compiler
{
	public partial class ScriptCompiler
	{
		public class ParticleSystemTranslator : Translator
		{
			protected ParticleSystem _System;

			public ParticleSystemTranslator()
				: base()
			{
				_System = null;
			}

			#region Translator Implementation

			/// <see cref="Translator.CheckFor"/>
			internal override bool CheckFor( Keywords nodeId, Keywords parentId )
			{
				return nodeId == Keywords.ID_PARTICLE_SYSTEM;
			}

			/// <see cref="Translator.Translate"/>
			public override void Translate( ScriptCompiler compiler, AbstractNode node )
			{
				ObjectAbstractNode obj = (ObjectAbstractNode)node;

				// Find the name
				if( obj != null )
				{
					if( string.IsNullOrEmpty( obj.Name ) )
					{
						compiler.AddError( CompileErrorCode.ObjectNameExpected, obj.File, obj.Line );
						return;
					}
				}
				else
				{
					compiler.AddError( CompileErrorCode.ObjectNameExpected, obj.File, obj.Line );
					return;
				}

				// Allocate the particle system
				object sysObject;
				ScriptCompilerEvent evt = new CreateParticleSystemScriptCompilerEvent( obj.File, obj.Name, compiler.ResourceGroup );
				bool processed = compiler._fireEvent( ref evt, out sysObject );

				if( !processed )
				{
					_System = ParticleSystemManager.Instance.CreateTemplate( obj.Name, compiler.ResourceGroup );
				}
				else
				{
					_System = (ParticleSystem)sysObject;
				}

				if( _System == null )
				{
					compiler.AddError( CompileErrorCode.ObjectAllocationError, obj.File, obj.Line );
					return;
				}

				_System.Origin = obj.File;

				_System.RemoveAllEmitters();
				;
				_System.RemoveAllAffectors();

				obj.Context = _System;

				foreach( AbstractNode i in obj.Children )
				{
					if( i is PropertyAbstractNode )
					{
						PropertyAbstractNode prop = (PropertyAbstractNode)i;
						switch( (Keywords)prop.Id )
						{
							case Keywords.ID_MATERIAL:
								if( prop.Values.Count == 0 )
								{
									compiler.AddError( CompileErrorCode.StringExpected, prop.File, prop.Line );
									return;
								}
								else
								{
									if( prop.Values[ 0 ] is AtomAbstractNode )
									{
										string name = ( (AtomAbstractNode)prop.Values[ 0 ] ).Value;

										ScriptCompilerEvent locEvt = new ProcessResourceNameScriptCompilerEvent(
											ProcessResourceNameScriptCompilerEvent.ResourceType.Material, name );

										compiler._fireEvent( ref locEvt );
										string locEvtName = ( (ProcessResourceNameScriptCompilerEvent)locEvt ).Name;

										if( !_System.SetParameter( "material", locEvtName ) )
										{
											if( _System.Renderer != null )
											{
												if( !_System.Renderer.SetParameter( "material", locEvtName ) )
												{
													compiler.AddError( CompileErrorCode.InvalidParameters, prop.File, prop.Line,
													                   "material property could not be set with material \"" + locEvtName + "\"" );
												}
											}
										}
									}
								}
								break;

							default:
								if( prop.Values.Count == 0 )
								{
									compiler.AddError( CompileErrorCode.StringExpected, prop.File, prop.Line );
									return;
								}
								else
								{
									string name = prop.Name, value = string.Empty;

									// Glob the values together
									foreach( AbstractNode it in prop.Values )
									{
										if( it is AtomAbstractNode )
										{
											if( string.IsNullOrEmpty( value ) )
											{
												value = ( (AtomAbstractNode)it ).Value;
											}
											else
											{
												value = value + " " + ( (AtomAbstractNode)it ).Value;
											}
										}
										else
										{
											compiler.AddError( CompileErrorCode.InvalidParameters, prop.File, prop.Line );
											return;
										}
									}

									if( !_System.SetParameter( name, value ) )
									{
										if( _System.Renderer != null )
										{
											if( !_System.Renderer.SetParameter( name, value ) )
											{
												compiler.AddError( CompileErrorCode.InvalidParameters, prop.File, prop.Line );
											}
										}
									}
								}
								break;
						}
					}
					else
					{
						_processNode( compiler, i );
					}
				}
			}

			#endregion Translator Implementation
		}
	}
}


text:
/**
 * This package contains core tracing observation handlers.
 */
@NonNullApi
package reactor.netty.observability;

import reactor.util.annotation.NonNullApi;


text:
layout: page
title: Internetworking Technologies, 2017-18
permalink: /courses/inet-201718/
tags: inet
redirect_from:
  - /inet
---
| [Course Info]({{ site.baseurl }}/courses/inet-201718/info) | [Lectures]({{ site.baseurl }}/courses/inet-201718/lectures) |
| [Reading Assignment]({{ site.baseurl }}/courses/inet-201718/reading-assignment) | [Project](https://www.dropbox.com/s/ad98o9fpbdtve8x/project.pdf?dl=1) |
| [Tests]({{ site.baseurl }}/courses/inet-201718/tests) | [Grades](http://photon.bits-goa.ac.in/lms/grade/report/user/index.php?id=1297) |
| |


text:
@interface PodsDummy_Pods_wormholeTests_Specta : NSObject
@end
@implementation PodsDummy_Pods_wormholeTests_Specta
@end


text:
package org.apache.jackrabbit.standalone.cli.core;

import javax.jcr.Item;
import javax.jcr.Session;

import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jackrabbit.standalone.cli.CommandHelper;

/**
 * Rename a Node

 * The persistent flag indicates whether to use the session or the workspace
 * to perform the move command
 */
public class Rename implements Command {
    /** logger */
    private static Log log = LogFactory.getLog(Rename.class);

    // ---------------------------- < keys >
    /** source path */
    private String srcPathKey = "srcPath";

    /** destination path */
    private String destPathKey = "destPath";

    /** persistent key */
    private String persistentKey = "persistent";

    /**
     * {@inheritDoc}
     */
    public boolean execute(Context ctx) throws Exception {
        String from = (String) ctx.get(this.srcPathKey);
        String to = (String) ctx.get(this.destPathKey);

        boolean persistent = Boolean.valueOf(
                (String) ctx.get(this.persistentKey)).booleanValue();

        if (log.isDebugEnabled()) {
            log.debug("renaming node from " + from + " to " + to);
        }

        Session s = CommandHelper.getSession(ctx);
        Item itemFrom = CommandHelper.getItem(ctx, from);
        if (itemFrom.getDepth() == 1) {
            if (persistent) {
                s.getWorkspace().move(itemFrom.getPath(), "/" + to);
            } else {
                s.move(itemFrom.getPath(), "/" + to);
            }
        } else {
            if (persistent) {
                s.getWorkspace().move(itemFrom.getPath(),
                        itemFrom.getParent().getPath() + "/" + to);
            } else {
                s.move(itemFrom.getPath(), itemFrom.getParent().getPath() + "/"
                        + to);
            }
        }

        return false;
    }

    /**
     * @return the destination path key
     */
    public String getDestPathKey() {
        return destPathKey;
    }

    /**
     * @param destPathKey
     *            the destination path key to set
     */
    public void setDestPathKey(String destPathKey) {
        this.destPathKey = destPathKey;
    }

    /**
     * @return the source path key
     */
    public String getSrcPathKey() {
        return srcPathKey;
    }

    /**
     * @param srcPathKey
     *            the source path key to set
     */
    public void setSrcPathKey(String srcPathKey) {
        this.srcPathKey = srcPathKey;
    }

    public String getPersistentKey() {
        return persistentKey;
    }

    public void setPersistentKey(String persistentKey) {
        this.persistentKey = persistentKey;
    }
}


text:
export = getExtraArgs;
/**
 * get arguments helper.
 * extra params must be start with "-".
 *
 * > command example:
 *
 * ```shell
 * node <script path> -minify -t es6 -values "value0,value1,value2" -array "['value0', 100, true, /\r?\n/g]" -regex "/\d+/g"
 * ```
 *
 * + then resut is
 *
 * ```js
 * // params
 * {
 *   minify: true,
 *   t: "es6",
 *   values: ["value0", "value1", "value2"],
 *   array: ["value0", 100, true, /\r?\n/g],
 *   regex: /\d+/g,
 * }
 * ```
 *
 * if param value not specified -tag after then set value is "true".
 *
 * @template T
 * @param {typeof ArgsConfig} [args_config]
 * @param {boolean} [debug]
 * @returns {T & { args?: string[]; }}
 */
function getExtraArgs<T>(args_config?: typeof ArgsConfig, debug?: boolean): T & {
    args?: string[];
};
declare namespace getExtraArgs {
    export { TExtraArgsValue };
}
declare namespace ArgsConfig {
    const startIndex: number;
    const prefix: string;
}
type TExtraArgsValue = string | string[] | boolean | RegExp;


text:
'use strict';

import Severity from 'vs/base/common/severity';
import { TPromise } from 'vs/base/common/winjs.base';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { IExtensionPoint } from 'vs/platform/extensions/common/extensionsRegistry';

export interface IExtensionDescription {
	readonly id: string;
	readonly name: string;
	readonly uuid?: string;
	readonly displayName?: string;
	readonly version: string;
	readonly publisher: string;
	readonly isBuiltin: boolean;
	readonly extensionFolderPath: string;
	readonly extensionDependencies?: string[];
	readonly activationEvents?: string[];
	readonly engines: {
		vscode: string;
	};
	readonly main?: string;
	readonly contributes?: { [point: string]: any; };
	readonly keywords?: string[];
	enableProposedApi?: boolean;
}

export const IExtensionService = createDecorator<IExtensionService>('extensionService');

export interface IMessage {
	type: Severity;
	message: string;
	source: string;
	extensionId: string;
	extensionPointId: string;
}

export interface IExtensionsStatus {
	messages: IMessage[];
}

export class ActivationTimes {
	public readonly startup: boolean;
	public readonly codeLoadingTime: number;
	public readonly activateCallTime: number;
	public readonly activateResolvedTime: number;

	constructor(startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number) {
		this.startup = startup;
		this.codeLoadingTime = codeLoadingTime;
		this.activateCallTime = activateCallTime;
		this.activateResolvedTime = activateResolvedTime;
	}
}

export class ExtensionPointContribution<T> {
	readonly description: IExtensionDescription;
	readonly value: T;

	constructor(description: IExtensionDescription, value: T) {
		this.description = description;
		this.value = value;
	}
}

export interface IExtensionService {
	_serviceBrand: any;

	/**
	 * Send an activation event and activate interested extensions.
	 */
	activateByEvent(activationEvent: string): TPromise<void>;

	/**
	 * Block on this signal any interactions with extensions.
	 */
	onReady(): TPromise<boolean>;

	/**
	 * Return all registered extensions
	 */
	getExtensions(): TPromise<IExtensionDescription[]>;

	/**
	 * Read all contributions to an extension point.
	 */
	readExtensionPointContributions<T>(extPoint: IExtensionPoint<T>): TPromise<ExtensionPointContribution<T>[]>;

	/**
	 * Get information about extensions status.
	 */
	getExtensionsStatus(): { [id: string]: IExtensionsStatus };

	/**
	 * Get information about extension activation times.
	 */
	getExtensionsActivationTimes(): { [id: string]: ActivationTimes; };

	/**
	 * Restarts the extension host.
	 */
	restartExtensionHost(): void;

	/**
	 * Starts the extension host.
	 */
	startExtensionHost(): void;

	/**
	 * Stops the extension host.
	 */
	stopExtensionHost(): void;
}


text:
<link href='cache.php?css=theme,default,alerts' rel="stylesheet" />

			<?php echo __('Select objects to include in export'); ?>

				<?php echo __('Either the database is empty, or there was an error retrieving list of database objects'); ?>.

				<?php echo __('Please try closing and re-opening this dialog again'); ?>.

		<fieldset>
			<legend><?php echo __('Export type'); ?></legend>

				<input type='radio' name='exptype' id='exptype1' value="struct" /><?php echo __('Structure'); ?>

				<input type='radio' name='exptype' id='exptype2' value="data" /><?php echo __('Table Data'); ?>

				<input type='radio' name='exptype' checked="1" id='exptype3' value="all" /><?php echo __('Structure and Table Data'); ?>

		</fieldset>

		<fieldset>
			<legend><?php echo __('Options'); ?></legend>

				<input type='checkbox' name='auto_null' id='auto_null' /><?php echo __('Set Auto increment field values to NULL'); ?>

				<input type='checkbox' name='dropcmd' id='dropcmd' /><?php echo __('Add DROP command before create statements'); ?>

				<input type='checkbox' name='emptycmd' id='emptycmd' /><?php echo __('Add TRUNCATE command before insert statements'); ?>

				<input type='checkbox' name='bulkinsert' id='bulkinsert' /><?php echo __('Generate Bulk insert statements'); ?>

				<input disabled="disabled" type='checkbox' name='bulklimit' id='bulklimit' /><?php echo __('Maximum size of SQL statement'); ?>
				 <input disabled="disabled" type="text" name="bulksize" id="bulksize" style="height:12px;vertical-align:bottom;width:30px" /> KB

		</fieldset>

			<input type='button' id="btn_export" value='<?php echo __('Export'); ?>' />

<?php
	echo getGeneratedJS();
?>


text:
echo "iOS_BUILD = $iOS_BUILD"

if [ "$BUILD_APP" = true -a  "$iOS_BUILD" = true ]; then

    gulp add-ios --env=$BUILD_ENV
    gulp resources --env=$BUILD_ENV

    # Running `gulp reset` (`ionic state reset`) to ensure `ionic platform add` does not install plugins correctly.
    # gulp reset --env=$BUILD_ENV

    ionic build ios --device --release
    # Running `ionic build ios` for a second time to ensure the generation of `ipa` file.  The first run does not do it.
    ionic build ios --device --release

fi


text:
/*
 * AM demodulator.
 */
#pragma once

#include "common/datatypes.h"
#include "fir.h"

class AmDemod
{
public:
    AmDemod();

    /*
     * Setup demodulator parameters
     *   input rate    The sample rate of the input data
     *   bandwidth     Bandwidth of the post-demod audio filter.
     */
	void        setup(real_t input_rate, real_t bandwidth);
	int         process(int num, complex_t * data_in, real_t * data_out);

private:
	Fir         audio_filter;
	real_t      sample_rate;
	real_t      z1;
};


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

<title>de.esoco.process.ui (esoco-business 1.3.0 API)</title>
<meta name="date" content="2018-10-29">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

de.esoco.process.ui

Interfaces

UiComponentAdapter

UiComponentFactory

Classes

UiButtonControl

UiButtonGroup

UiChildView

UiComponent

UiComposite

UiContainer

UiContainer.UiContainerFragment

UiControl

UiDateInputField

UiDialogView

UiElement

UiImageDefinition

UiInputField

UiLayout

UiLayoutContainer

UiLayoutElement

UiListControl

UiMultiSelectionButtonGroup

UiNumberInputField

UiRootFragment

UiSingleSelectionList

UiSwitchPanel

UiTableControl

UiTextComponent

UiTextInputField

UiView

Enums

UiDialogView.Button


text:
import path from 'path';

import { defineConfig } from 'vite';

import createVuePlugin from '@vitejs/plugin-vue';
import createCheckerPlugin from 'vite-plugin-checker';
import createVueComponentImporterPlugin from 'unplugin-vue-components/vite';
import { Vuetify3Resolver } from 'unplugin-vue-components/resolvers';

// jiti is a workaround for https://github.com/vitejs/vite/issues/9202
import jiti from 'jiti';
const { createAspNetCoreHmrPlugin } = jiti(__filename)('../../src/coalesce-vue/src/build.ts')
const { CoalesceVuetifyResolver } = jiti(__filename)('../../src/coalesce-vue-vuetify3/src/build.ts')

import { sassPlugin } from 'esbuild-sass-plugin';

import type { StringOptions } from 'sass';

const libRoot = path.resolve(__dirname, '../../src/') + "/";

export default defineConfig(async ({ command, mode }) => {
  return {
    build: {
      outDir: 'wwwroot',
      rollupOptions: {
        output: {
          manualChunks(id) {
            if (id.match(/home/i)) return 'index';
            // All views are chunked together so that dynamic imports can be
            // used in `router.ts`(which makes for a much more readable file).
            // Without this, each dynamic import would get its own chunk.
            if (id.includes('views')) return 'views';
            return 'index';
          },
        },
      },
    },

    plugins: [
      createVuePlugin(),

      // vuetify(),

      // Transforms usages of Vuetify and Coalesce components into treeshakable imports
      createVueComponentImporterPlugin({
        dts: false,
        resolvers: [Vuetify3Resolver(), CoalesceVuetifyResolver()],
      }),

      // Integrations with UseViteDevelopmentServer from IntelliTect.Coalesce.Vue
      createAspNetCoreHmrPlugin(),

      // Perform type checking during development and build time.
      // createCheckerPlugin({
      //   // VLS: Vue Language Server, the language server portion of Vetur.
      //   vls: {
      //     vetur: {
      //       // Template validation is turned off because this mirrors the classic behavior of vue-cli.
      //       // However, modern syntax like the null propagating operator IS available in this configuration,
      //       // so these options can be turned on if desired.
      //       validation: {
      //         template: false,
      //         templateProps: false,
      //         interpolation: false,
      //       },
      //     },
      //   },
      // }),
    ],

    resolve: {
      alias: [
        { find: '@', replacement: path.resolve(__dirname, 'src') },
        {
          find: 'coalesce-vue/lib',
          replacement: libRoot + 'coalesce-vue/src',
        },
        {
          find: 'coalesce-vue',
          replacement: libRoot + 'coalesce-vue/src',
        },
        {
          find: 'coalesce-vue-vuetify',
          replacement: libRoot + 'coalesce-vue-vuetify3/src/index.ts',
        },
        {
          find: 'vue',
          replacement: path.resolve(__dirname, 'node_modules/vue'),
        },
        {
          find: 'vue-router',
          replacement: path.resolve(__dirname, 'node_modules/vue-router'),
        },
      ],
    },
    server: {
      host: '0.0.0.0',
      fs: {
        allow: [libRoot + 'coalesce-vue', libRoot + 'coalesce-vue-vuetify3', '.'],
      },
    },

    esbuild: {
      // vue-class-component uses the original names of classes as the component name.
      keepNames: true,
    },

    css: { preprocessorOptions: { sass: sassOptions } },

    optimizeDeps: {
      // The configuration for SASS here is so that Vuetify's styles
      // will be included in Vite's Dependency Pre-Bundling feature.
      // Without this, in serve mode there will be nearly 100 extra HTTP requests,
      // one for each individual Vuetify component's stylesheet.
      // See https://github.com/vitejs/vite/issues/7719
      extensions: ['.scss', '.sass'],
      esbuildOptions: {
        plugins: [
          sassPlugin({
            type: 'style',
            ...sassOptions,
          }),
        ],
      },
    },

    // test: <VitestInlineConfig>{
    //   globals: true,
    //   environment: "jsdom",
    //   setupFiles: ["tests/setupTests.ts"],
    //   coverage: {
    //     exclude: ["**/*.g.ts", "test{,s}/**"],
    //   },
    //   deps: {
    //     inline: ["vuetify"],
    //   },
    // },
  };
});

const sassOptions: StringOptions<'sync'> = {
  quietDeps: true,
  // Logger warn override is a workaround for deprecation warning spam. See
  // https://github.com/sass/sass/issues/3065#issuecomment-868302160.
  // `quietDeps` is supposed to have the same effect, but doesn't work.
  logger: {
    warn(message, options) {
      if (
        (options.deprecation && options.stack?.includes('node_modules')) ||
        message.includes('repetitive deprecation')
      ) {
        return;
      }
      console.warn(
        `\x1b[33mSASS WARNING\x1b[0m: ${message}\n${
          options.stack === 'null' ? '' : options.stack
        }\n`
      );
    },
  },
};


text:
//-----------------------------------------------------------------------
// <summary>Defines the AbsoluteDateTransition class.</summary>
//-----------------------------------------------------------------------

namespace Microsoft.Exchange.WebServices.Data
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Text;

    /// <summary>
    /// Represents a time zone period transition that occurs on a fixed (absolute) date.
    /// </summary>
    internal class AbsoluteDateTransition : TimeZoneTransition
    {
        private DateTime dateTime;

        /// <summary>
        /// Initializes this transition based on the specified transition time.
        /// </summary>
        /// <param name="transitionTime">The transition time to initialize from.</param>
        internal override void InitializeFromTransitionTime(TimeZoneInfo.TransitionTime transitionTime)
        {
            throw new ServiceLocalException(Strings.UnsupportedTimeZonePeriodTransitionTarget);
        }

        /// <summary>
        /// Gets the XML element name associated with the transition.
        /// </summary>
        /// <returns>The XML element name associated with the transition.</returns>
        internal override string GetXmlElementName()
        {
            return XmlElementNames.AbsoluteDateTransition;
        }

        /// <summary>
        /// Tries to read element from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns>True if element was read.</returns>
        internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
        {
            bool result = base.TryReadElementFromXml(reader);

            if (!result)
            {
                if (reader.LocalName == XmlElementNames.DateTime)
                {
                    this.dateTime = DateTime.Parse(reader.ReadElementValue(), CultureInfo.InvariantCulture);

                    result = true;
                }
            }

            return result;
        }

        /// <summary>
        /// Writes elements to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
        {
            base.WriteElementsToXml(writer);

            writer.WriteElementValue(
                XmlNamespace.Types,
                XmlElementNames.DateTime,
                this.dateTime);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AbsoluteDateTransition"/> class.
        /// </summary>
        /// <param name="timeZoneDefinition">The time zone definition the transition will belong to.</param>
        internal AbsoluteDateTransition(TimeZoneDefinition timeZoneDefinition)
            : base(timeZoneDefinition)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AbsoluteDateTransition"/> class.
        /// </summary>
        /// <param name="timeZoneDefinition">The time zone definition the transition will belong to.</param>
        /// <param name="targetGroup">The transition group the transition will target.</param>
        internal AbsoluteDateTransition(TimeZoneDefinition timeZoneDefinition, TimeZoneTransitionGroup targetGroup)
            : base(timeZoneDefinition, targetGroup)
        {
        }

        /// <summary>
        /// Gets or sets the absolute date and time when the transition occurs.
        /// </summary>
        internal DateTime DateTime
        {
            get { return this.dateTime; }
            set { this.dateTime = value; }
        }
    }
}


text:
package com.github.xxbeanxx.noticeseditor.bindings;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * @author Greg Baker
 */
public class StringAdapter extends XmlAdapter<String, String> {

  @Override
  public String marshal(String v) throws Exception {
    if (v == null) {
      return null;
    }
    return "<![CDATA[" + v + "]]>";
  }

  @Override
  public String unmarshal(String v) throws Exception {
    if (v == null) {
      return null;
    }
    return v.trim();
  }

}


text:
'use strict'

var R = require('ramda')

module.exports = R.map(R.propOr('', 'type'))


text:
package net.lizhaoweb.demo.p2p.server.t1;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 *
管理器 - 线程

 *
 * @author 李召(John.Lee)
 * @version 1.0.0.0.1
 * @EMAIL 404644381@qq.com
 * @notes Created on 2017年11月06日

 * Revision of last commit:$Revision$

 * Author of last commit:$Author$

 * Date of last commit:$Date$

 */
public class ThreadManager {

    private static Map<String, ServerThread> clientConnectionProcessThreadMap = new ConcurrentHashMap<>();
    private static int clientConnectionProcessThreadCount = 0; // 记录客户端的数量

    public static void putClientConnectionProcessThread(ServerThread thread) {
//        String mapKey = String.format("%s:%d", thread.().getClientHost(), thread.getClientConnectionProcessContext().getClientPort());
//        clientConnectionProcessThreadMap.put(mapKey, thread);
//        clientConnectionProcessThreadCount++;// 统计客户端的数量
    }

    public static ServerThread getClientConnectionProcessThread(String mapKey) {
        return clientConnectionProcessThreadMap.get(mapKey);
    }

    public static ServerThread removeClientConnectionProcessThread(String mapKey) {
        ServerThread removedServerThread = clientConnectionProcessThreadMap.remove(mapKey);
        clientConnectionProcessThreadCount--;
        return removedServerThread;
    }

    public static ServerThread removeClientConnectionProcessThread(ServerThread thread) {
//        String mapKey = String.format("%s:%d", thread.getClientConnectionProcessContext().getClientHost(), thread.getClientConnectionProcessContext().getClientPort());
//        return removeClientConnectionProcessThread(mapKey);
        return null;
    }

    public static int getClientCount() {
        return clientConnectionProcessThreadCount;
    }

    public static Map<String, ServerThread> getClientConnectionProcessThreadMap() {
        return clientConnectionProcessThreadMap;
    }

    public static String getClientConnectionProcessList() {
        StringBuffer clientConnectionProcessList = new StringBuffer("[");
        int index = 0;
        for (ServerThread thread : getClientConnectionProcessThreadMap().values()) {
//            PenetrationContext clientConnectionContext = thread.getClientConnectionProcessContext();
//            System.out.println(clientConnectionContext.getClientHost() + ":" + clientConnectionContext.getClientPort());
//            if (index > 0) {
//                clientConnectionProcessList.append(", ");
//            }
//            clientConnectionProcessList.append(clientConnectionContext.getClientHost()).append(":").append(clientConnectionContext.getClientPort());
//            index++;
        }
        clientConnectionProcessList.append("]");
//        System.out.println(clientConnectionProcessList);
        return clientConnectionProcessList.toString();
    }
}