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

Imports System.Collections.Immutable
Imports System.ComponentModel.Composition
Imports System.Threading
Imports Microsoft.CodeAnalysis.AddImport
Imports Microsoft.CodeAnalysis.CodeCleanup
Imports Microsoft.CodeAnalysis.CodeCleanup.Providers
Imports Microsoft.CodeAnalysis.Formatting
Imports Microsoft.CodeAnalysis.Formatting.Rules
Imports Microsoft.CodeAnalysis.Host
Imports Microsoft.CodeAnalysis.Host.Mef
Imports Microsoft.CodeAnalysis.Indentation
Imports Microsoft.CodeAnalysis.Internal.Log
Imports Microsoft.CodeAnalysis.Options
Imports Microsoft.CodeAnalysis.Simplification
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Formatting
Imports Microsoft.VisualStudio.Text
Imports Microsoft.VisualStudio.Text.Editor

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit
    <Export(GetType(ICommitFormatter))>
    Friend Class CommitFormatter
        Implements ICommitFormatter

        Private Shared ReadOnly s_codeCleanupPredicate As Func(Of ICodeCleanupProvider, Boolean) =
            Function(p)
                Return p.Name <> PredefinedCodeCleanupProviderNames.Simplification AndAlso
                       p.Name <> PredefinedCodeCleanupProviderNames.Format
            End Function

        Private ReadOnly _globalOptions As IGlobalOptionService
        Private ReadOnly _indentationManager As IIndentationManagerService
        Private ReadOnly _editorOptionsFactory As IEditorOptionsFactoryService

        <ImportingConstructor>
        <Obsolete(MefConstruction.ImportingConstructorMessage, True)>
        Public Sub New(indentationManager As IIndentationManagerService, editorOptionsFactory As IEditorOptionsFactoryService, globalOptions As IGlobalOptionService)
            _indentationManager = indentationManager
            _editorOptionsFactory = editorOptionsFactory
            _globalOptions = globalOptions
        End Sub

        Public Sub CommitRegion(spanToFormat As SnapshotSpan,
                                isExplicitFormat As Boolean,
                                useSemantics As Boolean,
                                dirtyRegion As SnapshotSpan,
                                baseSnapshot As ITextSnapshot,
                                baseTree As SyntaxTree,
                                cancellationToken As CancellationToken) Implements ICommitFormatter.CommitRegion

            Using Logger.LogBlock(FunctionId.LineCommit_CommitRegion, cancellationToken)
                Dim buffer = spanToFormat.Snapshot.TextBuffer
                Dim currentSnapshot = buffer.CurrentSnapshot

                ' make sure things are current
                spanToFormat = spanToFormat.TranslateTo(currentSnapshot, SpanTrackingMode.EdgeInclusive)
                dirtyRegion = dirtyRegion.TranslateTo(currentSnapshot, SpanTrackingMode.EdgeInclusive)

                ' Use frozen partial semantics here.  We're operating on the UI thread, and we don't want to block the
                ' user indefinitely while getting full semantics for this projects (which can require building all
                ' projects we depend on).
                Dim document = currentSnapshot.AsText().GetDocumentWithFrozenPartialSemantics(cancellationToken)
                If document Is Nothing Then
                    Return
                End If

                If Not (isExplicitFormat OrElse _globalOptions.GetOption(FeatureOnOffOptions.PrettyListing, LanguageNames.VisualBasic)) Then
                    Return
                End If

                Dim tree = document.GetSyntaxTreeSynchronously(cancellationToken)

                Dim textSpanToFormat = spanToFormat.Span.ToTextSpan()
                If AbortForDiagnostics(tree, cancellationToken) Then
                    Return
                End If

                ' create commit formatting cleanup provider that has line commit specific behavior
                Dim fallbackOptions = _globalOptions.GetVisualBasicSyntaxFormattingOptions()
                Dim formattingOptions = _indentationManager.GetInferredFormattingOptions(buffer, _editorOptionsFactory, document.Project.LanguageServices, fallbackOptions, isExplicitFormat)
                Dim commitFormattingCleanup = GetCommitFormattingCleanupProvider(
                    document.Id,
                    document.Project.LanguageServices,
                    formattingOptions,
                    spanToFormat,
                    baseSnapshot,
                    baseTree,
                    dirtyRegion,
                    document.GetSyntaxTreeSynchronously(cancellationToken),
                    cancellationToken)

                Dim codeCleanups = CodeCleaner.GetDefaultProviders(document).
                                               WhereAsArray(s_codeCleanupPredicate).
                                               Concat(commitFormattingCleanup)

                Dim cleanupService = document.GetRequiredLanguageService(Of ICodeCleanerService)
                Dim cleanupOptions = document.GetCodeCleanupOptionsAsync(_globalOptions, cancellationToken).AsTask().WaitAndGetResult(cancellationToken)

                Dim finalDocument As Document
                If useSemantics OrElse isExplicitFormat Then
                    finalDocument = cleanupService.CleanupAsync(
                        document,
                        ImmutableArray.Create(textSpanToFormat),
                        cleanupOptions,
                        codeCleanups,
                        cancellationToken).WaitAndGetResult(cancellationToken)
                Else
                    Dim root = document.GetSyntaxRootSynchronously(cancellationToken)

                    Dim newRoot = cleanupService.CleanupAsync(
                        root,
                        ImmutableArray.Create(textSpanToFormat),
                        formattingOptions,
                        document.Project.Solution.Workspace.Services,
                        codeCleanups,
                        cancellationToken).WaitAndGetResult(cancellationToken)

                    If root Is newRoot Then
                        finalDocument = document
                    Else
                        Dim text As SourceText = Nothing
                        If newRoot.SyntaxTree IsNot Nothing AndAlso newRoot.SyntaxTree.TryGetText(text) Then
                            finalDocument = document.WithText(text)
                        Else
                            finalDocument = document.WithSyntaxRoot(newRoot)
                        End If
                    End If
                End If

                finalDocument.Project.Solution.Workspace.ApplyDocumentChanges(finalDocument, cancellationToken)
            End Using
        End Sub

        Private Shared Function AbortForDiagnostics(tree As SyntaxTree, cancellationToken As CancellationToken) As Boolean
            Const UnterminatedStringId = "BC30648"

            ' If we have any unterminated strings that overlap what we're trying to format, then
            ' bail out.  It's quite likely the unterminated string will cause a bunch of code to
            ' swap between real code and string literals, and committing will just cause problems.
            Dim diagnostics = tree.GetDiagnostics(cancellationToken).Where(
                    Function(d) d.Descriptor.Id = UnterminatedStringId)

            Return diagnostics.Any()
        End Function

        Private Shared Function GetCommitFormattingCleanupProvider(
            documentId As DocumentId,
            languageServices As HostLanguageServices,
            options As SyntaxFormattingOptions,
            spanToFormat As SnapshotSpan,
            oldSnapshot As ITextSnapshot,
            oldTree As SyntaxTree,
            newDirtySpan As SnapshotSpan,
            newTree As SyntaxTree,
            cancellationToken As CancellationToken) As ICodeCleanupProvider

            Dim oldDirtySpan = newDirtySpan.TranslateTo(oldSnapshot, SpanTrackingMode.EdgeInclusive)

            ' based on changes made to dirty spans, get right formatting rules to apply
            Dim rules = GetFormattingRules(documentId, languageServices, options, spanToFormat, oldDirtySpan, oldTree, newDirtySpan, newTree, cancellationToken)

            Return New FormatCodeCleanupProvider(rules)
        End Function

        Private Shared Function GetFormattingRules(
            documentId As DocumentId,
            languageServices As HostLanguageServices,
            options As SyntaxFormattingOptions,
            spanToFormat As SnapshotSpan,
            oldDirtySpan As SnapshotSpan,
            oldTree As SyntaxTree,
            newDirtySpan As SnapshotSpan,
            newTree As SyntaxTree,
            cancellationToken As CancellationToken) As IEnumerable(Of AbstractFormattingRule)

            ' if the span we are going to format is same as the span that got changed, don't bother to do anything special.
            ' just do full format of the span.
            If spanToFormat = newDirtySpan Then
                Return Formatter.GetDefaultFormattingRules(languageServices)
            End If

            If oldTree Is Nothing OrElse newTree Is Nothing Then
                Return Formatter.GetDefaultFormattingRules(languageServices)
            End If

            ' TODO: remove this in dev14
            '
            ' workaround for VB razor case.
            ' if we are under VB razor, we always use anchor operation otherwise, due to our double formatting, everything will just get messed.
            ' this is really a hacky workaround we should remove this in dev14
            Dim formattingRuleService = languageServices.WorkspaceServices.GetService(Of IHostDependentFormattingRuleFactoryService)()
            If formattingRuleService IsNot Nothing Then
                If formattingRuleService.ShouldUseBaseIndentation(documentId) Then
                    Return Formatter.GetDefaultFormattingRules(languageServices)
                End If
            End If

            ' when commit formatter formats given span, it formats the span with or without anchor operations.
            ' the way we determine which formatting rules are used for the span is based on whether the region user has changed would change indentation
            ' following the dirty (committed) region. if indentation has changed, we will format with anchor operations. if not, we will format without anchor operations.
            '
            ' for example, for the code below
            '[          ]|If True And
            '                   False Then|
            '                 Dim a = 1
            ' if the [] is changed, when line commit runs, it sees indentation right after the commit (|If .. Then|) is same, so formatter will run without anchor operations,
            ' meaning, "False Then" will stay as it is even if "If True And" is moved due to change in []
            '
            ' if the [] is changed to
            '[       If True Then
            '      ]|If True And
            '              False Then|
            '            Dim a = 1
            ' when line commit runs, it sees that indentation after the commit is changed (due to inserted "If True Then"), so formatter runs with anchor operations,
            ' meaning, "False Then" will move along with "If True And"
            '
            ' for now, do very simple checking. basically, we see whether we get same number of indent operation for the give span. alternative, but little bit
            ' more expensive and complex, we can actually calculate indentation right after the span, and see whether that is changed. not sure whether that much granularity
            ' is needed.
            If GetNumberOfIndentOperations(languageServices, options, oldTree, oldDirtySpan, cancellationToken) =
               GetNumberOfIndentOperations(languageServices, options, newTree, newDirtySpan, cancellationToken) Then
                Return (New NoAnchorFormatterRule()).Concat(Formatter.GetDefaultFormattingRules(languageServices))
            End If

            Return Formatter.GetDefaultFormattingRules(languageServices)
        End Function

        Private Shared Function GetNumberOfIndentOperations(
            languageServices As HostLanguageServices,
            options As SyntaxFormattingOptions,
            syntaxTree As SyntaxTree,
            span As SnapshotSpan,
            cancellationToken As CancellationToken) As Integer

            ' find containing statement of the end point, and use its end point as position to get indent operation
            Dim containingStatement = ContainingStatementInfo.GetInfo(span.End, syntaxTree, cancellationToken)
            Dim endPosition = If(containingStatement Is Nothing, span.End.Position + 1, containingStatement.TextSpan.End + 1)

            ' get token right after given span
            Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(Math.Min(endPosition, syntaxTree.GetRoot(cancellationToken).FullSpan.End))

            Dim node = token.Parent

            ' collect all indent operation
            Dim operations = New List(Of IndentBlockOperation)()
            While node IsNot Nothing
                operations.AddRange(FormattingOperations.GetIndentBlockOperations(
                                    Formatter.GetDefaultFormattingRules(languageServices), node, options))
                node = node.Parent
            End While

            ' get number of indent operation that affects the token.
            Return operations.Where(Function(o) o.TextSpan.Contains(token.SpanStart)).Count()
        End Function

        Private Class NoAnchorFormatterRule
            Inherits CompatAbstractFormattingRule

            Public Overrides Sub AddAnchorIndentationOperationsSlow(list As List(Of AnchorIndentationOperation), node As SyntaxNode, ByRef nextOperation As NextAnchorIndentationOperationAction)
                ' no anchor/relative formatting
                Return
            End Sub
        End Class
    End Class
End Namespace


text:
package com.example.drcom;

public class ByteMerge {
	public static byte[] byteMerger(byte[] byte_1, byte[] byte_2){
        byte[] byte_3 = new byte[byte_1.length+byte_2.length];
        System.arraycopy(byte_1, 0, byte_3, 0, byte_1.length);
        System.arraycopy(byte_2, 0, byte_3, byte_1.length, byte_2.length);
        return byte_3;
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OKHOSTING.ORM.Test.UI.Console
{
	public class TiendaProveedor
	{
		public Guid Id { get; set; }

		public Tienda Tienda { get; set; }

		public Proveedor Proveedor { get; set; }
	}
}


text:
VirtualMemory
=============


text:
#pragma checksum "C:\Users\d.delaire\Documents\GitHub\CustomRateMyApp-Universal\CustomRateMyApp-Demo\CustomRateMyApp-Demo\CustomRateMyApp-Demo.Shared\Views\MainPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "6D3C78E04267408810D963C8E3BDAB70"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace CustomRateMyApp_Demo
{
    partial class MainPage : global::Windows.UI.Xaml.Controls.Page, global::Windows.UI.Xaml.Markup.IComponentConnector
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 4.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]

        public void Connect(int connectionId, object target)
        {
            switch(connectionId)
            {
            case 1:
                #line 12 "..\..\Views\MainPage.xaml"
                ((global::Windows.UI.Xaml.UIElement)(target)).Tapped += this.MainGrid_Tapped;
                 #line default
                 #line hidden
                break;
            }
            this._contentLoaded = true;
        }
    }
}


text:
CodingRace

Desenvolvido por Paulo e João


text:
"""Manage plugins."""

from __future__ import print_function
import io
import os
import shutil
import subprocess
import time
import requests

import pygments
from pygments.lexers import PythonLexer
from pygments.formatters import TerminalFormatter

from nikola.plugin_categories import Command
from nikola import utils

LOGGER = utils.get_logger('plugin', utils.STDERR_HANDLER)

class CommandPlugin(Command):
    """Manage plugins."""

    json = None
    name = "plugin"
    doc_usage = "[[-u][--user] --install name] | [[-u] [-l |--upgrade|--list-installed] | [--uninstall name]]"
    doc_purpose = "manage plugins"
    output_dir = None
    needs_config = False
    cmd_options = [
        {
            'name': 'install',
            'short': 'i',
            'long': 'install',
            'type': str,
            'default': '',
            'help': 'Install a plugin.',
        },
        {
            'name': 'uninstall',
            'long': 'uninstall',
            'short': 'r',
            'type': str,
            'default': '',
            'help': 'Uninstall a plugin.'
        },
        {
            'name': 'list',
            'short': 'l',
            'long': 'list',
            'type': bool,
            'default': False,
            'help': 'Show list of available plugins.'
        },
        {
            'name': 'url',
            'short': 'u',
            'long': 'url',
            'type': str,
            'help': "URL for the plugin repository (default: "
                    "https://plugins.getnikola.com/v7/plugins.json)",
            'default': 'https://plugins.getnikola.com/v7/plugins.json'
        },
        {
            'name': 'user',
            'long': 'user',
            'type': bool,
            'help': "Install user-wide, available for all sites.",
            'default': False
        },
        {
            'name': 'upgrade',
            'long': 'upgrade',
            'type': bool,
            'help': "Upgrade all installed plugins.",
            'default': False
        },
        {
            'name': 'list_installed',
            'long': 'list-installed',
            'type': bool,
            'help': "List the installed plugins with their location.",
            'default': False
        },
    ]

    def _execute(self, options, args):
        """Install plugin into current site."""
        url = options['url']
        user_mode = options['user']

        # See the "mode" we need to operate in
        install = options.get('install')
        uninstall = options.get('uninstall')
        upgrade = options.get('upgrade')
        list_available = options.get('list')
        list_installed = options.get('list_installed')
        show_install_notes = options.get('show_install_notes', True)
        command_count = [bool(x) for x in (
            install,
            uninstall,
            upgrade,
            list_available,
            list_installed)].count(True)
        if command_count > 1 or command_count == 0:
            print(self.help())
            return 2

        if options.get('output_dir') is not None:
            self.output_dir = options.get('output_dir')
        else:
            if not self.site.configured and not user_mode and install:
                LOGGER.notice('No site found, assuming --user')
                user_mode = True

            if user_mode:
                self.output_dir = os.path.expanduser('~/.nikola/plugins')
            else:
                self.output_dir = 'plugins'

        if list_available:
            return self.list_available(url)
        elif list_installed:
            return self.list_installed()
        elif upgrade:
            return self.do_upgrade(url)
        elif uninstall:
            return self.do_uninstall(uninstall)
        elif install:
            return self.do_install(url, install, show_install_notes)

    def list_available(self, url):
        """List all available plugins."""
        data = self.get_json(url)
        print("Available Plugins:")
        print("------------------")
        for plugin in sorted(data.keys()):
            print(plugin)
        return 0

    def list_installed(self):
        """List installed plugins."""
        plugins = []
        for plugin in self.site.plugin_manager.getAllPlugins():
            p = plugin.path
            if os.path.isdir(p):
                p = p + os.sep
            else:
                p = p + '.py'
            plugins.append([plugin.name, p])

        plugins.sort()
        print('Installed Plugins')
        print('-----------------')
        for name, path in plugins:
            print('{0} at {1}'.format(name, path))
        print('\n\nAlso, you have disabled these plugins: {}'.format(self.site.config['DISABLED_PLUGINS']))
        return 0

    def do_upgrade(self, url):
        """Upgrade all installed plugins."""
        LOGGER.warning('This is not very smart, it just reinstalls some plugins and hopes for the best')
        data = self.get_json(url)
        plugins = []
        for plugin in self.site.plugin_manager.getAllPlugins():
            p = plugin.path
            if os.path.isdir(p):
                p = p + os.sep
            else:
                p = p + '.py'
            if plugin.name in data:
                plugins.append([plugin.name, p])
        print('Will upgrade {0} plugins: {1}'.format(len(plugins), ', '.join(n for n, _ in plugins)))
        for name, path in plugins:
            print('Upgrading {0}'.format(name))
            p = path
            while True:
                tail, head = os.path.split(path)
                if head == 'plugins':
                    self.output_dir = path
                    break
                elif tail == '':
                    LOGGER.error("Can't find the plugins folder for path: {0}".format(p))
                    return 1
                else:
                    path = tail
            self.do_install(url, name)
        return 0

    def do_install(self, url, name, show_install_notes=True):
        """Download and install a plugin."""
        data = self.get_json(url)
        if name in data:
            utils.makedirs(self.output_dir)
            url = data[name]
            LOGGER.info("Downloading '{0}'".format(url))
            try:
                zip_data = requests.get(url).content
            except requests.exceptions.SSLError:
                LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
                time.sleep(1)
                url = url.replace('https', 'http', 1)
                zip_data = requests.get(url).content

            zip_file = io.BytesIO()
            zip_file.write(zip_data)
            LOGGER.info('Extracting: {0} into {1}/'.format(name, self.output_dir))
            utils.extract_all(zip_file, self.output_dir)
            dest_path = os.path.join(self.output_dir, name)
        else:
            try:
                plugin_path = utils.get_plugin_path(name)
            except:
                LOGGER.error("Can't find plugin " + name)
                return 1

            utils.makedirs(self.output_dir)
            dest_path = os.path.join(self.output_dir, name)
            if os.path.exists(dest_path):
                LOGGER.error("{0} is already installed".format(name))
                return 1

            LOGGER.info('Copying {0} into plugins'.format(plugin_path))
            shutil.copytree(plugin_path, dest_path)

        reqpath = os.path.join(dest_path, 'requirements.txt')
        if os.path.exists(reqpath):
            LOGGER.notice('This plugin has Python dependencies.')
            LOGGER.info('Installing dependencies with pip...')
            try:
                subprocess.check_call(('pip', 'install', '-r', reqpath))
            except subprocess.CalledProcessError:
                LOGGER.error('Could not install the dependencies.')
                print('Contents of the requirements.txt file:\n')
                with io.open(reqpath, 'r', encoding='utf-8') as fh:
                    print(utils.indent(fh.read(), 4 * ' '))
                print('You have to install those yourself or through a '
                      'package manager.')
            else:
                LOGGER.info('Dependency installation succeeded.')
        reqnpypath = os.path.join(dest_path, 'requirements-nonpy.txt')
        if os.path.exists(reqnpypath):
            LOGGER.notice('This plugin has third-party '
                          'dependencies you need to install '
                          'manually.')
            print('Contents of the requirements-nonpy.txt file:\n')
            with io.open(reqnpypath, 'r', encoding='utf-8') as fh:
                for l in fh.readlines():
                    i, j = l.split('::')
                    print(utils.indent(i.strip(), 4 * ' '))
                    print(utils.indent(j.strip(), 8 * ' '))
                    print()

            print('You have to install those yourself or through a package '
                  'manager.')
        confpypath = os.path.join(dest_path, 'conf.py.sample')
        if os.path.exists(confpypath) and show_install_notes:
            LOGGER.notice('This plugin has a sample config file.  Integrate it with yours in order to make this plugin work!')
            print('Contents of the conf.py.sample file:\n')
            with io.open(confpypath, 'r', encoding='utf-8') as fh:
                if self.site.colorful:
                    print(utils.indent(pygments.highlight(
                        fh.read(), PythonLexer(), TerminalFormatter()),
                        4 * ' '))
                else:
                    print(utils.indent(fh.read(), 4 * ' '))
        return 0

    def do_uninstall(self, name):
        """Uninstall a plugin."""
        for plugin in self.site.plugin_manager.getAllPlugins():  # FIXME: this is repeated thrice
            p = plugin.path
            if os.path.isdir(p):
                p = p + os.sep
            else:
                p = os.path.dirname(p)
            if name == plugin.name:  # Uninstall this one
                LOGGER.warning('About to uninstall plugin: {0}'.format(name))
                LOGGER.warning('This will delete {0}'.format(p))
                sure = utils.ask_yesno('Are you sure?')
                if sure:
                    LOGGER.warning('Removing {0}'.format(p))
                    shutil.rmtree(p)
                    return 0
                return 1
        LOGGER.error('Unknown plugin: {0}'.format(name))
        return 1

    def get_json(self, url):
        """Download the JSON file with all plugins."""
        if self.json is None:
            try:
                self.json = requests.get(url).json()
            except requests.exceptions.SSLError:
                LOGGER.warning("SSL error, using http instead of https (press ^C to abort)")
                time.sleep(1)
                url = url.replace('https', 'http', 1)
                self.json = requests.get(url).json()
        return self.json


text:
Article 1844
----
Tout associé a le droit de participer aux décisions collectives.

Les copropriétaires d'une part sociale indivise sont représentés par un
mandataire unique, choisi parmi les indivisaires ou en dehors d'eux. En cas de
désaccord, le mandataire sera désigné en justice à la demande du plus diligent.

Si une part est grevée d'un usufruit, le droit de vote appartient au nu-
propriétaire, sauf pour les décisions concernant l'affectation des bénéfices, où
il est réservé à l'usufruitier.

Les statuts peuvent déroger aux dispositions des deux alinéas qui précèdent.


text:
<?xml version="1.0"?>
<title>This Dynamic Earth</title>

Contents

Cover

Title Page

Copyright

Preface

1: Historical Perspective

2: Developing The Theory

3: Understanding Plate Motions

4: "Hotspots": Mantle Thermal Plumes

5: Some Unaswered Questions

6: Plate Tectonics And People

7: Endnotes

About the Publisher

Images And Illustrations

Oldoinyo Lengai

Supercontinent Pangaea

Internal Structure Of The Earth

Geographer Antonio

Rejoined Continents

Inside The Earth

Shrinking Farallon Plate

Alfred Lothar Wegener: Moving Continents

Alfred Lothar Wegener: Moving Continents Two

Australian Dinosaurs

Dinosaur Cove

The Mid-Ocean Ridge

Computer-Generated Topographic Map Of The Mid-Ocean Ridge

Magnetic Striping And Polar Reversals

Magnetic Striping In The Pacific Northwest

Glomar Challenger And Joides Resolution

Earthquake Zones

Magnetic Stripes And Isotopic Clocks

Harry Hammond Hess:

Topic Number: Exploring The Deep Ocean Floor:

Bizarre Sea Life

Alvin Collects A Giant Clam

Giant Clams

Usgs Scientist Enters Alvin

Alvin Launch

Tube Worm Colony

Spider Crab

Science And Technology Center

Illustration Of The Main Types Of Plate Boundaries

Mid-Atlantic Ridge

Map Showing The Mid-Atlantic

Lava Fountains, Krafla Volcano

Thingvellir Fissure Zone, Iceland

Historically Active Volcanoes, East Africa

Summit Crater Of 'Erta 'Ale

Oldoinyo Lengai, East African Rift Zone

Oceanic-Continental Convergence

Convergence Of The Nazca And South American Plates

Ring Of Fire

Oceanic-Oceanic Convergence

Continental-Continental Convergence

Continental-Continental Convergence Two

Continental-Continental Convergence Three

The Himalayas: Two Continents Collide

Himalayas: Two

Transform Boundaries

San Andreas Fault

Easter Island Monolith

Gps Satellite And Ground Receiver

Hawaiian Islands

Fixed Hawaiian "Hot Spot,"

Artist'S Conception

Prominent World Hotspots

Manuna Loa Volcano

J. Tuzo Wilson: Discovering

Topic Number: The Long Trail Of The Hawaiian Hotspot

What Went On Before The Break-Up Of Pangaea

Conceptual Drawing

Convection

Aleutian Trench

Volcanic Plume

Crystal Springs Reservoir

Map Of The San Andreas

Horses Killed By Falling Debris

Creeping Along The Calaveras

The Summit Of Mt. Everest

Ground-Motion Measurement System

Mount Pinatubo Plume

Armero, Colombia

Wahaula Visitor Center, Hawaii

Retouched Photograph Courtesy Of Noaa/Edis

Travel Times For Tsunamis

Half Dome, Yosemite National Park

Geothermal Powerplant, The Geysers

Sundoro Volcano

Snow-Clad Mt. Rainier

W. Jacquelyne Kious

Robert I. Tilling


text:
struct pwm_param {
    uint32 period;
    uint32 freq;
    uint32 duty[8];
};

#define PWM_DEPTH 1023

void pwm_init(uint32 period, uint32 *duty, uint32 pwm_channel_num, uint32 (*pin_info_list)[3]);

void pwm_set_duty(uint32 duty, uint8 channel);
uint32 pwm_get_duty(uint8 channel);
void pwm_set_period(uint32 period);
uint32 pwm_get_period(void);

#endif


text:
module Util
  # Take an Enumerable of +hashes+ and group them by the given +group_by_keys+,
  # returning a list of hashes where each returned hash contains the keys
  # and corresponding values of a group, and an additional key +group_result_key+
  # that corresponds to a list of the original hashes in that group.
  def self.group_hashes(hashes, group_by_keys, group_result_key = :data)
    grouped = hashes.group_by { |h| h.slice(*group_by_keys) }

    grouped.map do |k, v|
      k.merge(group_result_key => v)
    end
  end
end


text:
package io.grpc.transport.okhttp;

import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ThreadFactoryBuilder;

import com.squareup.okhttp.CipherSuite;
import com.squareup.okhttp.ConnectionSpec;
import com.squareup.okhttp.TlsVersion;

import io.grpc.AbstractChannelBuilder;
import io.grpc.SharedResourceHolder;
import io.grpc.SharedResourceHolder.Resource;
import io.grpc.transport.ClientTransportFactory;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.net.ssl.SSLSocketFactory;

/** Convenience class for building channels with the OkHttp transport. */
public final class OkHttpChannelBuilder extends AbstractChannelBuilder<OkHttpChannelBuilder> {
  private static final Resource<ExecutorService> DEFAULT_TRANSPORT_THREAD_POOL =
      new Resource<ExecutorService>() {
        @Override
        public ExecutorService create() {
          return Executors.newCachedThreadPool(new ThreadFactoryBuilder()
              .setNameFormat("grpc-okhttp-%d")
              .build());
        }

        @Override
        public void close(ExecutorService executor) {
          executor.shutdown();
        }
      };

  public static final ConnectionSpec DEFAULT_CONNECTION_SPEC =
      new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
          .cipherSuites(
              // The following items should be sync with Netty's Http2SecurityUtil.CIPHERS.
              CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
              CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
              CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
              CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
              CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
              CipherSuite.TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,
              CipherSuite.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
              CipherSuite.TLS_DHE_DSS_WITH_AES_256_GCM_SHA384)
          .tlsVersions(TlsVersion.TLS_1_2)
          .supportsTlsExtensions(true)
          .build();

  /** Creates a new builder for the given server host and port. */
  public static OkHttpChannelBuilder forAddress(String host, int port) {
    return new OkHttpChannelBuilder(host, port);
  }

  private ExecutorService transportExecutor;
  private final String host;
  private final int port;
  private String authorityHost;
  private SSLSocketFactory sslSocketFactory;
  private ConnectionSpec connectionSpec = DEFAULT_CONNECTION_SPEC;
  private NegotiationType negotiationType = NegotiationType.TLS;

  private OkHttpChannelBuilder(String host, int port) {
    this.host = Preconditions.checkNotNull(host);
    this.port = port;
    this.authorityHost = host;
  }

  /**
   * Override the default executor necessary for internal transport use.
   *
   *
The channel does not take ownership of the given executor. It is the caller' responsibility
   * to shutdown the executor when appropriate.
   */
  public OkHttpChannelBuilder transportExecutor(ExecutorService executor) {
    this.transportExecutor = executor;
    return this;
  }

  /**
   * Overrides the host used with TLS and HTTP virtual hosting. It does not change what host is
   * actually connected to.
   *
   *
Should only used by tests.
   */
  public OkHttpChannelBuilder overrideHostForAuthority(String host) {
    this.authorityHost = host;
    return this;
  }

  /**
   * Sets the negotiation type for the HTTP/2 connection.
   *
   *
Default: TLS
   */
  public OkHttpChannelBuilder negotiationType(NegotiationType type) {
    negotiationType = Preconditions.checkNotNull(type);
    return this;
  }

  /**
   * Provides a SSLSocketFactory to replace the default SSLSocketFactory used for TLS.
   *
   *
By default, when TLS is enabled, SSLSocketFactory.getDefault() will be used.
   *
   *
{@link NegotiationType#TLS} will be applied by calling this method.
   */
  public OkHttpChannelBuilder sslSocketFactory(SSLSocketFactory factory) {
    this.sslSocketFactory = factory;
    negotiationType(NegotiationType.TLS);
    return this;
  }

  /**
   * For secure connection, provides a ConnectionSpec to specify Cipher suite and
   * TLS versions.
   *
   *
By default DEFAULT_CONNECTION_SPEC will be used.
   */
  public OkHttpChannelBuilder connectionSpec(ConnectionSpec connectionSpec) {
    this.connectionSpec = connectionSpec;
    return this;
  }

  @Override
  protected ChannelEssentials buildEssentials() {
    final ExecutorService executor = (transportExecutor == null)
        ? SharedResourceHolder.get(DEFAULT_TRANSPORT_THREAD_POOL) : transportExecutor;
    SSLSocketFactory socketFactory;
    switch (negotiationType) {
      case TLS:
        socketFactory = sslSocketFactory == null
            ? (SSLSocketFactory) SSLSocketFactory.getDefault() : sslSocketFactory;
        break;
      case PLAINTEXT:
        socketFactory = null;
        break;
      default:
        throw new RuntimeException("Unknown negotiation type: " + negotiationType);
    }

    ClientTransportFactory transportFactory = new OkHttpClientTransportFactory(
        host, port, authorityHost, executor, socketFactory, connectionSpec);
    Runnable terminationRunnable = null;
    // We shut down the executor only if we created it.
    if (transportExecutor == null) {
      terminationRunnable = new Runnable() {
        @Override
        public void run() {
          SharedResourceHolder.release(DEFAULT_TRANSPORT_THREAD_POOL, executor);
        }
      };
    }
    return new ChannelEssentials(transportFactory, terminationRunnable);
  }
}


text:
namespace juno {
namespace misc {
namespace schannel {

class SchannelCredential {
 public:
  SchannelCredential() : auth_data_(), expiry_() {
    SecInvalidateHandle(&handle_);

    auth_data_.dwVersion = SCHANNEL_CRED_VERSION;
  }

  ~SchannelCredential() {
    for (auto& certificate : certificates_)
      CertFreeCertificateContext(certificate);

    if (SecIsValidHandle(&handle_)) {
      FreeCredentialsHandle(&handle_);
      SecInvalidateHandle(&handle_);
    }
  }

  HRESULT AcquireHandle(ULONG usage) {
    if (SecIsValidHandle(&handle_))
      return SEC_E_INTERNAL_ERROR;

    return AcquireCredentialsHandle(nullptr, UNISP_NAME, usage, nullptr,
                                    &auth_data_, nullptr, nullptr, &handle_,
                                    &expiry_);
  }

  void AddCertificate(const CERT_CONTEXT* certificate) {
    certificates_.push_back(CertDuplicateCertificateContext(certificate));
    auth_data_.cCreds = static_cast<DWORD>(certificates_.size());
    auth_data_.paCred = certificates_.data();
  }

  void AddSupportedAlgorithm(ALG_ID algorithm) {
    algorithms_.push_back(algorithm);
    auth_data_.cSupportedAlgs = static_cast<DWORD>(algorithms_.size());
    auth_data_.palgSupportedAlgs = algorithms_.data();
  }

  void SetEnabledProtocols(DWORD protocols) {
    auth_data_.grbitEnabledProtocols = protocols;
  }

  void SetMinimumCipherStrength(DWORD strength) {
    auth_data_.dwMinimumCipherStrength = strength;
  }

  void SetMaximumCipherStrength(DWORD strength) {
    auth_data_.dwMaximumCipherStrength = strength;
  }

  void SetFlags(DWORD flags) {
    auth_data_.dwFlags = flags;
  }

 private:
  friend class SchannelContext;

  SCHANNEL_CRED auth_data_;
  CredHandle handle_;
  TimeStamp expiry_;

  std::vector<const CERT_CONTEXT*> certificates_;
  std::vector<ALG_ID> algorithms_;

  SchannelCredential(const SchannelCredential&) = delete;
  SchannelCredential& operator=(const SchannelCredential&) = delete;
};

}  // namespace schannel
}  // namespace misc
}  // namespace juno

#endif  // JUNO_MISC_SCHANNEL_SCHANNEL_CREDENTIAL_H_


text:
package com.streamsets.pipeline.stage.destination.mapreduce;

import com.streamsets.pipeline.api.ErrorCode;

public enum MapReduceErrors implements ErrorCode {
  MAPREDUCE_0000("Unexpected error: {}"),
  MAPREDUCE_0001("Can't load class '{}'"),
  MAPREDUCE_0002("Configuration file {} doesn't exists"),
  MAPREDUCE_0003("Configuration directory {} doesn't exists"),
  MAPREDUCE_0004("Class {} doesn't implement JobCreator interface"),
  MAPREDUCE_0005("Can't submit MapReduce job: {}"),
  MAPREDUCE_0006("Hadoop UserGroupInformation reports '{}' authentication, it should be '{}'"),
  ;

  private final String msg;

  MapReduceErrors(String msg) {
    this.msg = msg;
  }

  @Override
  public String getCode() {
    return name();
  }

  @Override
  public String getMessage() {
    return msg;
  }
}


text:
require 'rails_helper'

RSpec.describe SubmissionsController, type: :controller do
  # GET new just displays a view.
  # Use view or request specs

  let(:contest) { Contest.instance }
  let(:account) { Account.find_by(admin: true) }

  let(:valid_session) { { current_account_id: account.id } }

  describe 'POST create' do
    FIXTURE_NAME = 'Submission.java'

    let(:file) { fixture_file_upload 'files/' + FIXTURE_NAME }
    let(:problem) { contest.problems.create }
    let(:valid_params) { { submission: { attachment: file, problem: problem.id } } }

    it 'rejects submission without file' do
      expect {
        post(:create,
             params: { submission: { problem_id: problem.id } },
             session: valid_session)
      }.not_to change(Submission, :count)

      expect(response).to have_http_status :ok
      expect(flash.alert).not_to be_empty
    end

    it 'rejects submission without problem' do
      expect {
        post :create, params: { submission: { file: file } }, session: valid_session
      }.not_to change(Submission, :count)

      expect(response).to have_http_status :ok
      expect(flash.alert).not_to be_empty
    end

    it 'reject submission if contest is not started'
    it 'rejects submission if account not logged in'

    describe 'with valid data' do
      # TODO: Start contest

      it 'creates the Submission' do
        expect {
          post :create, params: valid_params, session: valid_session
        }.to change(Submission, :count).by(1)
      end

      let(:submission) { Submission.last }

      after(:each) { submission.attachment.path.delete }

      it 'redirects to show' do
        post :create, params: valid_params, session: valid_session
        expect(submission).to be_a Submission
        expect(response).to redirect_to submission_url(submission)
      end

      it 'submits to correct problem' do
        post :create, params: valid_params, session: valid_session
        expect(submission.problem).to eq problem
      end

      it 'saves submission file to FS' do
        post :create, params: valid_params, session: valid_session

        attachment = submission.attachment
        fixture = file_fixture FIXTURE_NAME

        expect(attachment.path.exist?).to be true

        expect(attachment.path.size).to eq fixture.size
        expect(attachment.with_file('r') { |f| f.read }).to eq fixture.read
      end

      it 'queues submission to be run' do
        expect {
          post :create, params: valid_params, session: valid_session
        }.to have_enqueued_job(RunSubmissionJob)
      end

      it 'uses current account'
    end
  end
end


text:
<!DOCTYPE html>

  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>flatting — Logtalk APIs v3.61.0-b01 documentation</title>
      <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
      <link rel="stylesheet" href="_static/css/custom.css" type="text/css" />

    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
    <link rel="manifest" href="/site.webmanifest" />
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
    <meta name="msapplication-TileColor" content="#355b95" />
    <meta name="theme-color" content="#ffffff" />

    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="heuristic_expansion(Mode)" href="heuristic_expansion_1.html" />
    <link rel="prev" title="dfs_interpreter" href="dfs_interpreter_0.html" />

             Logtalk APIs

                3.61.0

  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>

Contents

Libraries

arbitrary

assertions

assignvars

base64

cbor

code_metrics

core

coroutining

csv

dates

dead_code_scanner

debug_messages

debugger

dependents

diagrams

dictionaries

dif

doclet

edcg

events

expand_library_alias_paths

expecteds

fcube

flags

format

genint

gensym

git

grammars

heaps

help

hierarchies

hook_flows

hook_objects

html

ids

intervals

iso8601

issue_creator

java

json

lgtdoc

lgtunit

library

logging

loops

meta

meta_compiler

metagol

nested_dictionaries

optionals

options

os

packs

pddl_parser

ports_profiler

queues

random

reader

redis

sets

statistics

term_io

timeout

toychr

tutor

types

union_find

uuid

verdi_neruda

a_star_interpreter(W)

benchmark_generators

best_first

bfs_interpreter

bup_interpreter

counter

databasep

debug_expansion(Mode)

demodb

dfs_interpreter

flatting

heuristic_expansion(Mode)

iddfs_interpreter(Increment)

interpreterp

magic

magic_expansion(Mode)

rule_expansion(Mode)

shell

shell(Interpreters)

shell_expansion(Mode)

wrapper

xml_parser

zippers

Directories

Entities

Predicates

Core diagram

Libraries diagram

Tools diagram

Ports diagram

Contributions diagram

Index

External Contents

Handbook

Logtalk website

GitHub repo

          Logtalk APIs

 »

Libraries »

flatting

             View page source

category

flatting

Flattens conjunction of goals with the form f and g into a list [f,g].

Author: Victor Lagerkvist

Version: 1:0:0

Date: 2010-06-13

Compilation flags:

static

source: Based on source code from The Craft of Prolog, by Richard O'Keefe.

Dependencies:

(none)

Remarks:

(none)

Inherited public predicates:

(none)

Public predicates

Protected predicates

flatten_goals//1

Private predicates

Operators

Public predicates

(none)

Protected predicates

flatten_goals//1

Flattens a conjunction of goals.

Compilation flags:

static

Template:

flatten_goals(Conjunction)

Mode and number of proofs:

flatten_goals(+callable) - one

Private predicates

(none)

Operators

(none)

         Previous
        Next

© Copyright 1998-2022, Paulo Moura.

  Built with Sphinx using a
    theme
    provided by Read the Docs.


text:
from openturns import *

TESTPREAMBLE()
RandomGenerator.SetSeed(0)

try:

    # Tmin , time step and step number for TimeGrid
    Tmin = 0.0
    deltaT = 1.0
    N = 11
    timeGrid = RegularGrid(Tmin, deltaT, N)

    # Fixing the distribution for the WhiteNoise
    dist = Distribution(Uniform())
    print "dist = ", dist

    # Building a process from a White Noise
    process = Process(WhiteNoise(dist))

    # print the process
    process.setTimeGrid(timeGrid)
    print "process = ", process

    # Get a realization of the process
    timeSerie = process.getRealization()
    print "timeSerie = ", timeSerie

except:
    import sys
    print "t_WhiteNoise_std.py", sys.exc_type, sys.exc_value


text:
module Azure::Commerce::Mgmt::V2015_06_01_preview
  module Models
    #
    # Describes the offer term.
    #
    class OfferTermInfo

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["Monetary Credit"] = "MonetaryCredit"
      @@discriminatorMap["Monetary Commitment"] = "MonetaryCommitment"
      @@discriminatorMap["Recurring Charge"] = "RecurringCharge"

      def initialize
        @Name = "OfferTermInfo"
      end

      attr_accessor :Name

      # @return [DateTime] Indicates the date from which the offer term is
      # effective.
      attr_accessor :effective_date

      #
      # Mapper for OfferTermInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'OfferTermInfo',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'Name',
            uber_parent: 'OfferTermInfo',
            class_name: 'OfferTermInfo',
            model_properties: {
              effective_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'EffectiveDate',
                type: {
                  name: 'DateTime'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
package org.thinkinghub.gateway.oauth.entity;

import java.time.ZonedDateTime;

import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class GatewayAuditable extends GatewayPersistable {

    private static final long serialVersionUID = -3641663563907196150L;

    @CreatedDate
    @JsonIgnore
    private ZonedDateTime createdAt;

    @LastModifiedDate
    @JsonIgnore
    private ZonedDateTime updatedAt;

    @CreatedBy
    @JsonIgnore
    private User createdBy;

    @LastModifiedBy
    @JsonIgnore
    private User updatedBy;

    public GatewayAuditable(Long id) {
        super(id);
    }

}


text:
var Util = require('lib/Util');

/**
 * @param {Object} options
 * @param {Integer} rating
 */
var RatingView = function(options, rating) {
    var defaults = {
        width : '180dp'
    }; options = Util._.extend({}, defaults, options);

    var self = Ti.UI.createView(options);
    // local variables
    var left;

    /**
     * Reloads the rating, use this after the user
     * has just added a rating for the recipe
     *
     * @param {Object} newRating
     */
    var reloadRating = function(newRating) {
          // check if the rating has been loaded yet, if it has
          // remove the old stars
          if (self.getChildren().length > 0) {
              self.removeAllChildren();
          }

          // set the rating
          rating = newRating;
          left = 0;

          // loop through and create stars
          for (var i = 0; i < 10; i++) {
                var imageSrc = '/images/graphics/star'+ (rating.avg && Math.round(rating.avg) > i ? '-selected' : '') + '.png';
                var imageView = Ti.UI.createImageView({
                    left : left,
                    image : imageSrc,
                    width : '17dp',
                    height : '17dp'
                });
                self.add(imageView);
                // set the new left value
                left += 18;
          }
          // adjust the width of the view
          self.setWidth('180dp');
    };

    // load the rating for the first time
    reloadRating(rating);

    // set the function to reload the rating
    self._reloadRating = reloadRating;

    // return the view
    return self;
};

module.exports = RatingView;


text:
namespace device {
// Nintendo controllers are not typical HID gamepads and cannot be easily
// supported through the platform data fetchers. However, when they are HID
// devices we can use the HID backend to enumerate and initialize them.
//
// NintendoDataFetcher currently supports only Nintendo Switch devices:
// * Switch Joy-Con L
// * Switch Joy-Con R
//   - A pair of matching Joy-Cons may be associated to form a single gamepad.
// * Switch Pro Controller
//   - Supports USB and Bluetooth.
// * Switch Joy-Con Charging Grip
//   - Connects over USB and charges Joy-Cons.
//   - Can hold a pair of matching Joy-Cons to form a single gamepad.
//   - One or both Joy-Cons may be disconnected.
//
// When multiple Joy-Cons are connected, they are automatically associated to
// form a composite gamepad if:
// * The Joy-Cons form a matching pair (Joy-Con L and Joy-Con R).
// * They are connected using the same bus type (both Bluetooth or both USB).
// * Neither Joy-Con is already part of a composite gamepad.
// The composite gamepad functions identically to a Switch Pro Controller and
// exposes the same vendor and device ID but a different product name.
class DEVICE_GAMEPAD_EXPORT NintendoDataFetcher : public GamepadDataFetcher,
                                                  mojom::HidManagerClient {
 public:
  using Factory = GamepadDataFetcherFactoryImpl<NintendoDataFetcher,
                                                GAMEPAD_SOURCE_NINTENDO>;
  using ControllerMap =
      std::unordered_map<int, std::unique_ptr<NintendoController>>;

  NintendoDataFetcher();

  NintendoDataFetcher(const NintendoDataFetcher&) = delete;
  NintendoDataFetcher& operator=(const NintendoDataFetcher&) = delete;

  ~NintendoDataFetcher() override;

  // Add the newly-connected HID device described by |device_info|. Returns
  // true if the device was added successfully.
  bool AddDevice(mojom::HidDeviceInfoPtr device_info);

  // Remove the HID device with GUID matching |guid|. If the device is part of
  // a composite Switch device, the composite device will be decomposed and the
  // remaining subdevice will be returned to |switch_devices_|. Returns true if
  // the device was removed.
  bool RemoveDevice(const std::string& guid);

  // GamepadDataFetcher implementation.
  GamepadSource source() override;
  void GetGamepadData(bool devices_changed_hint) override;
  void PlayEffect(
      int source_id,
      mojom::GamepadHapticEffectType type,
      mojom::GamepadEffectParametersPtr params,
      mojom::GamepadHapticsManager::PlayVibrationEffectOnceCallback callback,
      scoped_refptr<base::SequencedTaskRunner> callback_runner) override;
  void ResetVibration(
      int source_id,
      mojom::GamepadHapticsManager::ResetVibrationActuatorCallback callback,
      scoped_refptr<base::SequencedTaskRunner> callback_runner) override;

  const ControllerMap& GetControllersForTesting() const { return controllers_; }

 private:
  // GamepadDataFetcher implementation.
  void OnAddedToProvider() override;

  // mojom::HidManagerClient implementation.
  void DeviceAdded(mojom::HidDeviceInfoPtr device_info) override;
  void DeviceRemoved(mojom::HidDeviceInfoPtr device_info) override;
  void DeviceChanged(mojom::HidDeviceInfoPtr device_info) override;

  // mojom::HidManagerClient::GetDevicesAndSetClient callback.
  void OnGetDevices(std::vector<mojom::HidDeviceInfoPtr> device_infos);

  // Return a pointer to the controller with HID device GUID matching |guid|, or
  // nullptr if there is no match.
  NintendoController* GetControllerFromGuid(const std::string& guid);

  // Return a pointer to the controller with source ID |source_id|, or nullptr
  // if there is no match.
  NintendoController* GetControllerFromSourceId(int source_id);

  // Check |switch_devices_| for an unassociated device to associate with
  // |device|. If a valid device is found, it is removed from |switch_devices_|
  // and returned to the caller.
  std::unique_ptr<NintendoController> ExtractAssociatedDevice(
      const NintendoController* device);

  // Called when the gamepad with id |source_id| is ready to be exposed.
  void OnDeviceReady(int source_id);

  int next_source_id_ = 0;

  // A mapping from source ID to connected Nintendo Switch devices.
  ControllerMap controllers_;

  mojo::Remote<mojom::HidManager> hid_manager_;
  mojo::AssociatedReceiver<mojom::HidManagerClient> receiver_{this};
  base::WeakPtrFactory<NintendoDataFetcher> weak_factory_{this};
};

}  // namespace device

#endif  // DEVICE_GAMEPAD_NINTENDO_DATA_FETCHER_H_


text:
package br.com.senai.alunos.cdi;

import javax.enterprise.util.AnnotationLiteral;

public class MessageLiteral extends AnnotationLiteral<Message> implements Message{

	private static final long serialVersionUID = 1L;
	private Type type;

	public MessageLiteral(Type type) {
		this.type = type;
	}

	@Override
	public Type value() {
		return type;
	}

}


text:
layout: post
title: Study и learn
category: English
---
Часто путают или просто не обращают должного внимания на разницу между глаголами «to learn» и «to study». «To learn» это скорее учить (стихотворение, песню, язык…), а «to study» — учиться чему-то, заниматься чем-то. Можно учиться игре на пианино — «to learn how to play piano», а можно заниматься музыкой — «to study music».

> – I am learning the song I wrote to remember the test answers. I didn't have a chance to study chemistry.
> – Я учу песенку, которую написал, чтобы запомнить ответы для теста. У меня не было возможности заниматься химией.


text:
* `identifier` string - A string used to uniquely identify a discount offer for a product.
* `type` number - The type of discount offer.
* `price` number - The discount price of the product in the local currency.
* `priceLocale` string - The locale used to format the discount price of the product.
* `paymentMode` string - The payment mode for this product discount. Can be `payAsYouGo`, `payUpFront`, or `freeTrial`.
* `numberOfPeriods` number - An integer that indicates the number of periods the product discount is available.
* `subscriptionPeriod` [ProductSubscriptionPeriod](product-subscription-period.md) (optional) - An object that defines the period for the product discount.


text:
require 'spec_helper'

describe MergeRequests::ReloadDiffsService, :use_clean_rails_memory_store_caching do
  let(:current_user) { create(:user) }
  let(:merge_request) { create(:merge_request) }
  let(:subject) { described_class.new(merge_request, current_user) }

  describe '#execute' do
    it 'creates new merge request diff' do
      expect { subject.execute }.to change { merge_request.merge_request_diffs.count }.by(1)
    end

    it 'calls update_diff_discussion_positions with correct params' do
      old_diff_refs = merge_request.diff_refs
      new_diff = merge_request.create_merge_request_diff
      new_diff_refs = merge_request.diff_refs

      expect(merge_request).to receive(:create_merge_request_diff).and_return(new_diff)
      expect(merge_request).to receive(:update_diff_discussion_positions)
        .with(old_diff_refs: old_diff_refs,
              new_diff_refs: new_diff_refs,
              current_user: current_user)

      subject.execute
    end

    it 'does not change existing merge request diff' do
      expect(merge_request.merge_request_diff).not_to receive(:save_git_content)

      subject.execute
    end

    context 'cache clearing' do
      it 'clears the cache for older diffs on the merge request' do
        old_diff = merge_request.merge_request_diff
        old_cache_key = old_diff.diffs_collection.cache_key

        expect(Rails.cache).to receive(:delete).with(old_cache_key).and_call_original

        subject.execute
      end

      it 'avoids N+1 queries', :request_store do
        current_user
        merge_request

        control_count = ActiveRecord::QueryRecorder.new do
          subject.execute
        end.count

        expect { subject.execute }.not_to exceed_query_limit(control_count)
      end
    end
  end
end


text:
<title>WAGGGS Mock up</title>

<form>
Should a problem occur that you are unfamiliar with. Which of the following should you do?

<input type="radio" name="colour" value="red" />Stop and think for a moment

<input type="radio" name="colour" value="blue" />Start trying to tackle it and see what works

Difficulty rating: 5

<input type="submit" value="Submit" />
</form>


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.12.13 at 07:41:28 PM CET
//

package org.jcp.xmlns.xml.ns.javaee;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for isolation-levelType.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="isolation-levelType">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="TRANSACTION_READ_UNCOMMITTED"/>
 *     <enumeration value="TRANSACTION_READ_COMMITTED"/>
 *     <enumeration value="TRANSACTION_REPEATABLE_READ"/>
 *     <enumeration value="TRANSACTION_SERIALIZABLE"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "isolation-levelType")
@XmlEnum
public enum IsolationLevelType {

    TRANSACTION_READ_UNCOMMITTED,
    TRANSACTION_READ_COMMITTED,
    TRANSACTION_REPEATABLE_READ,
    TRANSACTION_SERIALIZABLE;

    public java.lang.String value() {
        return name();
    }

    public static IsolationLevelType fromValue(java.lang.String v) {
        return valueOf(v);
    }

}


text:
function Add-VSCognitoUserPoolEmailConfiguration {
    <#
    .SYNOPSIS
        Adds an AWS::Cognito::UserPool.EmailConfiguration resource property to the template. The email configuration.

    .DESCRIPTION
        Adds an AWS::Cognito::UserPool.EmailConfiguration resource property to the template.
The email configuration.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html

    .PARAMETER ReplyToEmailAddress
        The destination to which the receiver of the email should reply to.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-replytoemailaddress
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER ConfigurationSet
        The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:
+ Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.
+ IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-configurationset
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER EmailSendingAccount
        Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:
COGNITO_DEFAULT
When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.
To look up the email delivery limit for the default option, see Limits in Amazon Cognito: https://docs.aws.amazon.com/cognito/latest/developerguide/limits.html in the *Amazon Cognito Developer Guide*.
The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.
DEVELOPER
When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.
If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.
Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a *service-linked role*, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito: https://docs.aws.amazon.com/cognito/latest/developerguide/using-service-linked-roles.html in the *Amazon Cognito Developer Guide*.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-emailsendingaccount
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER SourceArn
        The Amazon Resource Name ARN of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:
+ If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.
+ If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-sourcearn
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER From
        Identifies either the sender's email address or the sender's name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address appears before the body of the email.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-emailconfiguration.html#cfn-cognito-userpool-emailconfiguration-from
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>
    [OutputType('Vaporshell.Resource.Cognito.UserPool.EmailConfiguration')]
    [cmdletbinding()]
    Param
    (
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $ReplyToEmailAddress,
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $ConfigurationSet,
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $EmailSendingAccount,
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $SourceArn,
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $From
    )
    Begin {
        $obj = [PSCustomObject]@{}
        $commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
    }
    Process {
        foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
            switch ($key) {
                Default {
                    $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
                }
            }
        }
    }
    End {
        $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Cognito.UserPool.EmailConfiguration'
        Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
    }
}


text:
package io.cdap.plugin.zuora.objects;

import com.google.gson.annotations.SerializedName;
import io.cdap.cdap.api.data.schema.Schema;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectDefinition;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectFieldDefinition;
import io.cdap.plugin.zuora.restobjects.objects.BaseObject;

import javax.annotation.Nullable;

/**
* Object name: RefundTypewithSuccess (RefundTypewithSuccess).
* Related objects:
**/
@SuppressWarnings("unused")
@ObjectDefinition(
  Name = "Refunds",
  responseRootElement = "refunds",
  APIUrl = "refunds",
  ObjectType = ObjectDefinition.ObjectDefinitionType.BASE
)
public class RefundTypewithSuccess extends BaseObject {
  /**
  * Name: accountId (accountId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("accountId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String accountId;

  /**
  * Name: amount (amount), Type: number.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("amount")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String amount;

  /**
  * Name: cancelledOn (cancelledOn), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("cancelledOn")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String cancelledOn;

  /**
  * Name: comment (comment), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("comment")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String comment;

  /**
  * Name: createdById (createdById), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("createdById")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String createdById;

  /**
  * Name: createdDate (createdDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("createdDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String createdDate;

  /**
  * Name: creditMemoId (creditMemoId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("creditMemoId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String creditMemoId;

  /**
  * Name: financeInformation (financeInformation), Type: RefundTypewithSuccessFinanceInformationItem.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("financeInformation")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String financeInformation;

  /**
  * Name: gatewayId (gatewayId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("gatewayId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String gatewayId;

  /**
  * Name: gatewayResponse (gatewayResponse), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("gatewayResponse")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String gatewayResponse;

  /**
  * Name: gatewayResponseCode (gatewayResponseCode), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("gatewayResponseCode")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String gatewayResponseCode;

  /**
  * Name: gatewayState (gatewayState), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("gatewayState")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String gatewayState;

  /**
  * Name: id (id), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("id")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String id;

  /**
  * Name: markedForSubmissionOn (markedForSubmissionOn), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("markedForSubmissionOn")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String markedForSubmissionOn;

  /**
  * Name: methodType (methodType), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("methodType")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String methodType;

  /**
  * Name: number (number), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("number")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String number;

  /**
  * Name: paymentId (paymentId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("paymentId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String paymentId;

  /**
  * Name: paymentMethodId (paymentMethodId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("paymentMethodId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String paymentMethodId;

  /**
  * Name: paymentMethodSnapshotId (paymentMethodSnapshotId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("paymentMethodSnapshotId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String paymentMethodSnapshotId;

  /**
  * Name: reasonCode (reasonCode), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("reasonCode")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String reasonCode;

  /**
  * Name: referenceId (referenceId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("referenceId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String referenceId;

  /**
  * Name: refundDate (refundDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("refundDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String refundDate;

  /**
  * Name: refundTransactionTime (refundTransactionTime), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("refundTransactionTime")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String refundTransactionTime;

  /**
  * Name: secondRefundReferenceId (secondRefundReferenceId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("secondRefundReferenceId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String secondRefundReferenceId;

  /**
  * Name: settledOn (settledOn), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("settledOn")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String settledOn;

  /**
  * Name: softDescriptor (softDescriptor), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("softDescriptor")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String softDescriptor;

  /**
  * Name: softDescriptorPhone (softDescriptorPhone), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("softDescriptorPhone")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String softDescriptorPhone;

  /**
  * Name: status (status), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("status")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String status;

  /**
  * Name: submittedOn (submittedOn), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("submittedOn")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String submittedOn;

  /**
  * Name: type (type), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("type")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String type;

  /**
  * Name: updatedById (updatedById), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("updatedById")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String updatedById;

  /**
  * Name: updatedDate (updatedDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("updatedDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String updatedDate;

  @Override
  public void addFields() {
    addCustomField("accountId", accountId, String.class);
    addCustomField("amount", amount, String.class);
    addCustomField("cancelledOn", cancelledOn, String.class);
    addCustomField("comment", comment, String.class);
    addCustomField("createdById", createdById, String.class);
    addCustomField("createdDate", createdDate, String.class);
    addCustomField("creditMemoId", creditMemoId, String.class);
    addCustomField("financeInformation", financeInformation, String.class);
    addCustomField("gatewayId", gatewayId, String.class);
    addCustomField("gatewayResponse", gatewayResponse, String.class);
    addCustomField("gatewayResponseCode", gatewayResponseCode, String.class);
    addCustomField("gatewayState", gatewayState, String.class);
    addCustomField("id", id, String.class);
    addCustomField("markedForSubmissionOn", markedForSubmissionOn, String.class);
    addCustomField("methodType", methodType, String.class);
    addCustomField("number", number, String.class);
    addCustomField("paymentId", paymentId, String.class);
    addCustomField("paymentMethodId", paymentMethodId, String.class);
    addCustomField("paymentMethodSnapshotId", paymentMethodSnapshotId, String.class);
    addCustomField("reasonCode", reasonCode, String.class);
    addCustomField("referenceId", referenceId, String.class);
    addCustomField("refundDate", refundDate, String.class);
    addCustomField("refundTransactionTime", refundTransactionTime, String.class);
    addCustomField("secondRefundReferenceId", secondRefundReferenceId, String.class);
    addCustomField("settledOn", settledOn, String.class);
    addCustomField("softDescriptor", softDescriptor, String.class);
    addCustomField("softDescriptorPhone", softDescriptorPhone, String.class);
    addCustomField("status", status, String.class);
    addCustomField("submittedOn", submittedOn, String.class);
    addCustomField("type", type, String.class);
    addCustomField("updatedById", updatedById, String.class);
    addCustomField("updatedDate", updatedDate, String.class);
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Resources>
	<vigenere id="vigenereId">
      <vigenereImage  path="/vigenere/vigenere.png"/>
      <moduloImage  path="/vigenere/modulo.png"/>
	</vigenere>
</Resources>


text: Package containing utilities regarding basic java objects.


text:
@Version("1.0.2")
package org.apache.jackrabbit.oak.spi.xml;

import org.osgi.annotation.versioning.Version;


text:
package org.assertj.core.api;

import java.util.Comparator;

import org.assertj.core.data.Index;
import org.assertj.core.internal.ComparatorBasedComparisonStrategy;
import org.assertj.core.internal.DoubleArrays;
import org.assertj.core.util.VisibleForTesting;

public abstract class AbstractDoubleArrayAssert<S extends AbstractDoubleArrayAssert<S>>
  extends AbstractArrayAssert<S, double[], Double> {

  @VisibleForTesting
  protected DoubleArrays arrays = DoubleArrays.instance();

  public AbstractDoubleArrayAssert(double[] actual, Class<?> selfType) {
    super(actual, selfType);
  }

  /** {@inheritDoc} */
  @Override
  public void isNullOrEmpty() {
    arrays.assertNullOrEmpty(info, actual);
  }

  /** {@inheritDoc} */
  @Override
  public void isEmpty() {
    arrays.assertEmpty(info, actual);
  }

  /** {@inheritDoc} */
  @Override
  public S isNotEmpty() {
    arrays.assertNotEmpty(info, actual);
    return myself;
  }

  /**
   * {@inheritDoc}
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).hasSize(3);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 1.0 }).hasSize(2);
   *

   *
   *

   */
  @Override
  public S hasSize(int expected) {
    arrays.assertHasSize(info, actual, expected);
    return myself;
  }

  /**
   * {@inheritDoc}
   *

   * Examples :
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).hasSameSizeAs(Arrays.asList(1, 2, 3));
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 1.0 }).hasSameSizeAs(Arrays.asList(1, 2);
   *

   */
  @Override
  public S hasSameSizeAs(Iterable<?> other) {
    arrays.assertHasSameSizeAs(info, actual, other);
    return myself;
  }

  /**
   * Verifies that the actual array contains the given values, in any order.
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(1.0, 3.0, 2.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(3.0, 1.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(1.0, 2.0);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(1.0, 4.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(4.0, 7.0);
   *

   *
   *

   *
   * @param values the given values.
   * @return {@code this} assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array does not contain the given values.
   */
  public S contains(double... values) {
    arrays.assertContains(info, actual, values);
    return myself;
  }

  /**
   * Verifies that the actual array contains only the given values and nothing else, in any order.
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnly(1.0, 2.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnly(2.0, 3.0, 1.0);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnly(1.0, 4.0, 2.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnly(4.0, 7.0);
   *

   *
   *

   *
   * @param values the given values.
   * @return {@code this} assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array does not contain the given values, i.e. the actual array contains some
   *           or none of the given values, or the actual array contains more values than the given ones.
   */
  public S containsOnly(double... values) {
    arrays.assertContainsOnly(info, actual, values);
    return myself;
  }

  /**
   * Verifies that the actual array contains the given values only once.
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnlyOnce(1.0, 2.0);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 1.0 }).containsOnlyOnce(1.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsOnlyOnce(4.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0, 3.0 }).containsOnlyOnce(0.0, 1.0, 2.0, 3.0, 4.0, 5.0);
   *

   *
   * @param values the given values.
   * @return {@code this} assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual group does not contain the given values, i.e. the actual group contains some
   *           or none of the given values, or the actual group contains more than once these values.
   */
  public S containsOnlyOnce(double... values) {
    arrays.assertContainsOnlyOnce(info, actual, values);
    return myself;
  }

  /**
   * Verifies that the actual array contains the given sequence, without any other values between them.
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSequence(1.0, 2.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSequence(1.0, 2.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSequence(2.0, 3.0);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSequence(1.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSequence(4.0, 7.0);
   *

   *
   *

   *
   * @param sequence the sequence of values to look for.
   * @return myself assertion object.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the given array is {@code null}.
   * @throws AssertionError if the actual array does not contain the given sequence.
   */
  public S containsSequence(double... sequence) {
    arrays.assertContainsSequence(info, actual, sequence);
    return myself;
  }

  /**
   * Verifies that the actual array contains the given subsequence (possibly with other values between them).
   *

   * Examples :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSubsequence(1.0, 2.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSubsequence(1.0, 2.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSubsequence(2.0, 3.0);
   *
   * // assertions will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSubsequence(1.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsSubsequence(4.0, 7.0);
   *

   *
   *

   *
   * @param subsequence the subsequence of values to look for.
   * @return myself assertion object.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the given array is {@code null}.
   * @throws AssertionError if the actual array does not contain the given subsequence.
   */
  public S containsSubsequence(double... subsequence) {
    arrays.assertContainsSubsequence(info, actual, subsequence);
    return myself;
  }
  /**
   * Verifies that the actual array contains the given value at the given index.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(1.0, atIndex(O));
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(3.0, atIndex(2));
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(1.0, atIndex(1));
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).contains(4.0, atIndex(2));
   *

   *
   *

   *
   * @param value the value to look for.
   * @param index the index where the value should be stored in the actual array.
   * @return myself assertion object.
   * @throws AssertionError if the actual array is {@code null} or empty.
   * @throws NullPointerException if the given {@code Index} is {@code null}.
   * @throws IndexOutOfBoundsException if the value of the given {@code Index} is equal to or greater than the size of
   *           the actual array.
   * @throws AssertionError if the actual array does not contain the given value at the given index.
   */
  public S contains(double value, Index index) {
    arrays.assertContains(info, actual, value, index);
    return myself;
  }

  /**
   * Verifies that the actual array does not contain the given values.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(4.0, 8.0);
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(1.0, 2.0, 3.0);
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(3.0, 1.0);
   *

   *
   *

   *
   * @param values the given values.
   * @return {@code this} assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array contains any of the given values.
   */
  public S doesNotContain(double... values) {
    arrays.assertDoesNotContain(info, actual, values);
    return myself;
  }

  /**
   * Verifies that the actual array does not contain the given value at the given index.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(1.0, atIndex(1));
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(2.0, atIndex(0));
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(1.0, atIndex(0));
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotContain(2.0, atIndex(1));
   *

   *
   *

   *
   * @param value the value to look for.
   * @param index the index where the value should be stored in the actual array.
   * @return myself assertion object.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws NullPointerException if the given {@code Index} is {@code null}.
   * @throws AssertionError if the actual array contains the given value at the given index.
   */
  public S doesNotContain(double value, Index index) {
    arrays.assertDoesNotContain(info, actual, value, index);
    return myself;
  }

  /**
   * Verifies that the actual array does not contain duplicates.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).doesNotHaveDuplicates();
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 1.0, 2.0, 3.0 }).doesNotHaveDuplicates();
   *

   *
   *

   *
   * @return {@code this} assertion object.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array contains duplicates.
   */
  public S doesNotHaveDuplicates() {
    arrays.assertDoesNotHaveDuplicates(info, actual);
    return myself;
  }

  /**
   * Verifies that the actual array starts with the given sequence of values, without any other values between them.
   * Similar to {@link #containsSequence(double...)}, but it also verifies that the first element in the
   * sequence is also first element of the actual array.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).startsWith(1.0, 2.0);
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).startsWith(2.0, 3.0);
   *

   *
   *

   *
   * @param sequence the sequence of values to look for.
   * @return myself assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array does not start with the given sequence.
   */
  public S startsWith(double... sequence) {
    arrays.assertStartsWith(info, actual, sequence);
    return myself;
  }

  /**
   * Verifies that the actual array ends with the given sequence of values, without any other values between them.
   * Similar to {@link #containsSequence(double...)}, but it also verifies that the last element in the
   * sequence is also last element of the actual array.
   *

   * Example:
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).endsWith(2.0, 3.0);
   *
   * // assertion will fail
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).endsWith(1.0, 3.0);
   *

   *
   *

   *
   * @param sequence the sequence of values to look for.
   * @return myself assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws IllegalArgumentException if the given argument is an empty array.
   * @throws AssertionError if the actual array is {@code null}.
   * @throws AssertionError if the actual array does not end with the given sequence.
   */
  public S endsWith(double... sequence) {
    arrays.assertEndsWith(info, actual, sequence);
    return myself;
  }

  /** {@inheritDoc} */
  @Override
  public S isSorted() {
    arrays.assertIsSorted(info, actual);
    return myself;
  }

  /** {@inheritDoc} */
  @Override
  public S isSortedAccordingTo(Comparator<? super Double> comparator) {
    arrays.assertIsSortedAccordingToComparator(info, actual, comparator);
    return myself;
  }

  /** {@inheritDoc} */
  @Override
  public S usingElementComparator(Comparator<? super Double> customComparator) {
    this.arrays = new DoubleArrays(new ComparatorBasedComparisonStrategy(customComparator));
    return myself;
  }

  /** {@inheritDoc} */
  @Override
  public S usingDefaultElementComparator() {
    this.arrays = DoubleArrays.instance();
    return myself;
  }

  /**
   * Verifies that the actual group contains only the given values and nothing else, in order.
   *

   * Example :
   *
   *

   * // assertion will pass
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsExactly(1.0, 2.0, 3.0);
   *
   * // assertion will fail as actual and expected orders differ.
   * assertThat(new double[] { 1.0, 2.0, 3.0 }).containsExactly(2.0, 1.0, 3.0);
   *

   *
   * @param values the given values.
   * @return {@code this} assertion object.
   * @throws NullPointerException if the given argument is {@code null}.
   * @throws AssertionError if the actual group is {@code null}.
   * @throws AssertionError if the actual group does not contain the given values with same order, i.e. the actual group
   *           contains some or none of the given values, or the actual group contains more values than the given ones
   *           or values are the same but the order is not.
   */
  public S containsExactly(double... values) {
    objects.assertEqual(info, actual, values);
    return myself;
  }

}


text:
module Bookshelf
  class App < Hanami::App
  end
end

RSpec.describe Hanami::Application do
  describe ".routes" do
    subject { Hanami.app.routes }

    it "raises error when not configured" do
      expect { subject }.to raise_error("Hanami.app.routes not configured")
    end
  end
end


text:
<form role="form" ng-submit="vm.submit()">

Email Schedule

            <md-input-container flex>
                Start date
                <input type="date" name="startdate" ng-model="vm.start_date">
            </md-input-container>
            <md-input-container flex>
                End date
                <input type="date" name="enddate" ng-model="vm.end_date">
            </md-input-container>

        <md-switch ng-model="vm.email_type" aria-label="Switch 1" ng-true-value="'Text'"
                   ng-false-value="'PDF'"
                   ng-init="vm.email_type='Text'">
            {{ vm.email_type }}
        </md-switch>

            <md-button class="md-raised md-primary btn-submit" type="submit">Submit</md-button>

</form>