text:
"""This module contains the Dispatcher class."""

import logging
from functools import wraps
from inspect import getargspec
from threading import Thread, BoundedSemaphore, Lock, Event, current_thread
from re import match, split
from time import sleep

from telegram import (TelegramError, Update, NullHandler)
from telegram.updatequeue import Empty

H = NullHandler()
logging.getLogger(__name__).addHandler(H)

semaphore = None
async_threads = set()
""":type: set[Thread]"""
async_lock = Lock()

def run_async(func):
    """
    Function decorator that will run the function in a new thread. A function
    decorated with this will have to include **kwargs in their parameter list,
    which will contain all optional parameters.

    Args:
        func (function): The function to run in the thread.

    Returns:
        function:
    """

    # TODO: handle exception in async threads
    #       set a threading.Event to notify caller thread

    @wraps(func)
    def pooled(*pargs, **kwargs):
        """
        A wrapper to run a thread in a thread pool
        """
        result = func(*pargs, **kwargs)
        semaphore.release()
        with async_lock:
            async_threads.remove(current_thread())
        return result

    @wraps(func)
    def async_func(*pargs, **kwargs):
        """
        A wrapper to run a function in a thread
        """
        thread = Thread(target=pooled, args=pargs, kwargs=kwargs)
        semaphore.acquire()
        with async_lock:
            async_threads.add(thread)
        thread.start()
        return thread

    return async_func

class Dispatcher:
    """
    This class dispatches all kinds of updates to its registered handlers.
    A handler is a function that usually takes the following parameters

        bot:
            The telegram.Bot instance that received the message
        update:
            The update that should be handled by the handler

    Error handlers take an additional parameter

        error:
            The TelegramError instance that was raised during processing the
            update

    All handlers, except error handlers, can also request more information by
    appending one or more of the following arguments in their argument list for
    convenience

        update_queue:
            The Queue instance which contains all new updates and is
            processed by the Dispatcher. Be careful with this - you might
            create an infinite loop.
        args:
            If the update is an instance str or telegram.Update, this will be
            a list that contains the content of the message split on spaces,
            except the first word (usually the command).
            Example: '/add item1 item2 item3' -> ['item1', 'item2', 'item3']
            For updates that contain inline queries, they will contain the
            whole query split on spaces.
            For other updates, args will be None

    In some cases handlers may need some context data to process the update. To
    procedure just queue in  update_queue.put(update, context=context) or
    processUpdate(update,context=context).

        context:
            Extra data for handling updates.

    For regex-based handlers, you can also request information about the match.
    For all other handlers, these will be None

        groups:
            A tuple that contains the result of
            re.match(matcher, ...).groups()
        groupdict:
            A dictionary that contains the result of
            re.match(matcher, ...).groupdict()

    Args:
        bot (telegram.Bot): The bot object that should be passed to the
            handlers
        update_queue (telegram.UpdateQueue): The synchronized queue that will
            contain the updates.
    """
    def __init__(self, bot, update_queue, workers=4, exception_event=None):
        self.bot = bot
        self.update_queue = update_queue
        self.telegram_message_handlers = []
        self.telegram_inline_handlers = []
        self.telegram_command_handlers = {}
        self.telegram_regex_handlers = {}
        self.string_regex_handlers = {}
        self.string_command_handlers = {}
        self.type_handlers = {}
        self.unknown_telegram_command_handlers = []
        self.unknown_string_command_handlers = []
        self.error_handlers = []
        self.logger = logging.getLogger(__name__)
        self.running = False
        self.__stop_event = Event()
        self.__exception_event = exception_event or Event()

        global semaphore
        if not semaphore:
            semaphore = BoundedSemaphore(value=workers)
        else:
            self.logger.info("Semaphore already initialized, skipping.")

    def start(self):
        """
        Thread target of thread 'dispatcher'. Runs in background and processes
        the update queue.
        """

        if self.running:
            self.logger.warning('already running')
            return

        if self.__exception_event.is_set():
            msg = 'reusing dispatcher after exception event is forbidden'
            self.logger.error(msg)
            raise TelegramError(msg)

        self.running = True
        self.logger.info('Dispatcher started')

        while 1:
            try:
                # Pop update from update queue.
                update, context = self.update_queue.get(True, 1, True)
            except Empty:
                if self.__stop_event.is_set():
                    self.logger.info('orderly stopping')
                    break
                elif self.__stop_event.is_set():
                    self.logger.critical(
                        'stopping due to exception in another thread')
                    break
                continue

            try:
                self.processUpdate(update, context)
                self.logger.debug('Processed Update: %s with context %s'
                                  % (update, context))

            # Dispatch any errors
            except TelegramError as te:
                self.logger.warn("Error was raised while processing Update.")

                try:
                    self.dispatchError(update, te)
                # Log errors in error handlers
                except:
                    self.logger.exception("An uncaught error was raised while "
                                          "handling the error")

            # All other errors should not stop the thread, just print them
            except:
                self.logger.exception("An uncaught error was raised while "
                                      "processing an update")

        self.running = False
        self.logger.info('Dispatcher thread stopped')

    def stop(self):
        """
        Stops the thread
        """
        if self.running:
            self.__stop_event.set()
            while self.running:
                sleep(0.1)
            self.__stop_event.clear()

    def processUpdate(self, update, context=None):
        """
        Processes a single update.

        Args:
            update (any):
        """

        handled = False

        # Custom type handlers
        for t in self.type_handlers:
            if isinstance(update, t):
                self.dispatchType(update, context)
                handled = True

        # string update
        if type(update) is str and update.startswith('/'):
            self.dispatchStringCommand(update, context)
            handled = True
        elif type(update) is str:
            self.dispatchRegex(update, context)
            handled = True

        # An error happened while polling
        if isinstance(update, TelegramError):
            self.dispatchError(None, update)
            handled = True

        # Telegram update (regex)
        if isinstance(update, Update) and update.message is not None:
            self.dispatchRegex(update, context)
            handled = True

            # Telegram update (command)
            if update.message.text.startswith('/'):
                self.dispatchTelegramCommand(update, context)

            # Telegram update (message)
            else:
                self.dispatchTelegramMessage(update, context)
                handled = True
        elif isinstance(update, Update) and \
                (update.inline_query is not None or
                 update.chosen_inline_result is not None):
                self.dispatchTelegramInline(update, context)
                handled = True
        # Update not recognized
        if not handled:
            self.dispatchError(update, TelegramError(
                "Received update of unknown type %s" % type(update)))

    # Add Handlers
    def addTelegramMessageHandler(self, handler):
        """
        Registers a message handler in the Dispatcher.

        Args:
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        self.telegram_message_handlers.append(handler)

    def addTelegramInlineHandler(self, handler):
        """
        Registers an inline query handler in the Dispatcher.

        Args:
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        self.telegram_inline_handlers.append(handler)

    def addTelegramCommandHandler(self, command, handler):
        """
        Registers a command handler in the Dispatcher.

        Args:
            command (str): The command keyword that this handler should be
                listening to.
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        if command not in self.telegram_command_handlers:
            self.telegram_command_handlers[command] = []

        self.telegram_command_handlers[command].append(handler)

    def addTelegramRegexHandler(self, matcher, handler):
        """
        Registers a regex handler in the Dispatcher. If handlers will be
        called if re.match(matcher, update.message.text) is True.

        Args:
            matcher (str/__Regex): A regex string or compiled regex object that
                matches on messages that handler should be listening to
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        if matcher not in self.telegram_regex_handlers:
            self.telegram_regex_handlers[matcher] = []

        self.telegram_regex_handlers[matcher].append(handler)

    def addStringCommandHandler(self, command, handler):
        """
        Registers a string-command handler in the Dispatcher.

        Args:
            command (str): The command keyword that this handler should be
                listening to.
            handler (function): A function that takes (Bot, str, *args) as
                arguments.
        """

        if command not in self.string_command_handlers:
            self.string_command_handlers[command] = []

        self.string_command_handlers[command].append(handler)

    def addStringRegexHandler(self, matcher, handler):
        """
        Registers a regex handler in the Dispatcher. If handlers will be
        called if re.match(matcher, string) is True.

        Args:
            matcher (str/__Regex): A regex string or compiled regex object that
                matches on the string input that handler should be listening to
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        if matcher not in self.string_regex_handlers:
            self.string_regex_handlers[matcher] = []

        self.string_regex_handlers[matcher].append(handler)

    def addUnknownTelegramCommandHandler(self, handler):
        """
        Registers a command handler in the Dispatcher, that will receive all
        commands that have no associated handler.

        Args:
            handler (function): A function that takes (Bot, Update, *args) as
                arguments.
        """

        self.unknown_telegram_command_handlers.append(handler)

    def addUnknownStringCommandHandler(self, handler):
        """
        Registers a string-command handler in the Dispatcher, that will
        receive all commands that have no associated handler.

        Args:
            handler (function): A function that takes (Bot, str, *args) as
                arguments.
        """

        self.unknown_string_command_handlers.append(handler)

    def addErrorHandler(self, handler):
        """
        Registers an error handler in the Dispatcher.

        Args:
            handler (function): A function that takes (Bot, TelegramError) as
                arguments.
        """

        self.error_handlers.append(handler)

    def addTypeHandler(self, the_type, handler):
        """
        Registers a type handler in the Dispatcher. This allows you to send
        any type of object into the update queue.

        Args:
            the_type (type): The type this handler should listen to
            handler (function): A function that takes (Bot, type, *args) as
                arguments.
        """

        if the_type not in self.type_handlers:
            self.type_handlers[the_type] = []

        self.type_handlers[the_type].append(handler)

    # Remove Handlers
    def removeTelegramMessageHandler(self, handler):
        """
        De-registers a message handler.

        Args:
            handler (any):
        """

        if handler in self.telegram_message_handlers:
            self.telegram_message_handlers.remove(handler)

    def removeTelegramInlineHandler(self, handler):
        """
        De-registers an inline query handler.

        Args:
            handler (any):
        """

        if handler in self.telegram_inline_handlers:
            self.telegram_inline_handlers.remove(handler)

    def removeTelegramCommandHandler(self, command, handler):
        """
        De-registers a command handler.

        Args:
            command (str): The command
            handler (any):
        """

        if command in self.telegram_command_handlers \
                and handler in self.telegram_command_handlers[command]:
            self.telegram_command_handlers[command].remove(handler)

    def removeTelegramRegexHandler(self, matcher, handler):
        """
        De-registers a regex handler.

        Args:
            matcher (str/__Regex): The regex matcher object or string
            handler (any):
        """

        if matcher in self.telegram_regex_handlers \
                and handler in self.telegram_regex_handlers[matcher]:
            self.telegram_regex_handlers[matcher].remove(handler)

    def removeStringCommandHandler(self, command, handler):
        """
        De-registers a string-command handler.

        Args:
            command (str): The command
            handler (any):
        """

        if command in self.string_command_handlers \
                and handler in self.string_command_handlers[command]:
            self.string_command_handlers[command].remove(handler)

    def removeStringRegexHandler(self, matcher, handler):
        """
        De-registers a regex handler.

        Args:
            matcher (str/__Regex): The regex matcher object or string
            handler (any):
        """

        if matcher in self.string_regex_handlers \
                and handler in self.string_regex_handlers[matcher]:
            self.string_regex_handlers[matcher].remove(handler)

    def removeUnknownTelegramCommandHandler(self, handler):
        """
        De-registers an unknown-command handler.

        Args:
            handler (any):
        """

        if handler in self.unknown_telegram_command_handlers:
            self.unknown_telegram_command_handlers.remove(handler)

    def removeUnknownStringCommandHandler(self, handler):
        """
        De-registers an unknown-command handler.

        Args:
            handler (any):
        """

        if handler in self.unknown_string_command_handlers:
            self.unknown_string_command_handlers.remove(handler)

    def removeErrorHandler(self, handler):
        """
        De-registers an error handler.

        Args:
            handler (any):
        """

        if handler in self.error_handlers:
            self.error_handlers.remove(handler)

    def removeTypeHandler(self, the_type, handler):
        """
        De-registers a type handler.

        Args:
            handler (any):
        """

        if the_type in self.type_handlers \
                and handler in self.type_handlers[the_type]:
            self.type_handlers[the_type].remove(handler)

    def dispatchTelegramCommand(self, update, context=None):
        """
        Dispatches an update that contains a command.

        Args:
            command (str): The command keyword
            update (telegram.Update): The Telegram update that contains the
                command
        """

        command = split('\W', update.message.text[1:])[0]

        if command in self.telegram_command_handlers:
            self.dispatchTo(self.telegram_command_handlers[command], update,
                            context=context)
        else:
            self.dispatchTo(self.unknown_telegram_command_handlers, update,
                            context=context)

    def dispatchRegex(self, update, context=None):
        """
        Dispatches an update to all string or telegram regex handlers that
        match the string/message content.

        Args:
            update (str, Update): The update that should be checked for matches
        """

        if isinstance(update, Update):
            handlers = self.telegram_regex_handlers
            to_match = update.message.text
        elif isinstance(update, str):
            handlers = self.string_regex_handlers
            to_match = update

        for matcher in handlers:
            m = match(matcher, to_match)
            if m:
                for handler in handlers[matcher]:
                    self.call_handler(handler,
                                      update,
                                      groups=m.groups(),
                                      groupdict=m.groupdict(),
                                      context=context)

    def dispatchStringCommand(self, update, context=None):
        """
        Dispatches a string-update that contains a command.

        Args:
            update (str): The string input
        """

        command = update.split(' ')[0][1:]

        if command in self.string_command_handlers:
            self.dispatchTo(self.string_command_handlers[command], update,
                            context=context)
        else:
            self.dispatchTo(self.unknown_string_command_handlers, update,
                            context=context)

    def dispatchType(self, update, context=None):
        """
        Dispatches an update of any type.

        Args:
            update (any): The update
        """

        for t in self.type_handlers:
            if isinstance(update, t):
                self.dispatchTo(self.type_handlers[t], update, context=context)

    def dispatchTelegramMessage(self, update, context=None):
        """
        Dispatches an update that contains a regular message.

        Args:
            update (telegram.Update): The Telegram update that contains the
                message.
        """

        self.dispatchTo(self.telegram_message_handlers, update,
                        context=context)

    def dispatchTelegramInline(self, update, context=None):
        """
        Dispatches an update that contains an inline update.

        Args:
            update (telegram.Update): The Telegram update that contains the
                message.
        """

        self.dispatchTo(self.telegram_inline_handlers, update, context=None)

    def dispatchError(self, update, error):
        """
        Dispatches an error.

        Args:
            update (any): The pdate that caused the error
            error (telegram.TelegramError): The Telegram error that was raised.
        """

        for handler in self.error_handlers:
            handler(self.bot, update, error)

    def dispatchTo(self, handlers, update, **kwargs):
        """
        Dispatches an update to a list of handlers.

        Args:
            handlers (list): A list of handler-functions.
            update (any): The update to be dispatched
        """

        for handler in handlers:
            self.call_handler(handler, update, **kwargs)

    def call_handler(self, handler, update, **kwargs):
        """
        Calls an update handler. Checks the handler for keyword arguments and
        fills them, if possible.

        Args:
            handler (function): An update handler function
            update (any): An update
        """

        target_kwargs = {}
        fargs = getargspec(handler).args

        '''
        async handlers will receive all optional arguments, since we can't
        their argument list.
        '''

        is_async = 'pargs' == getargspec(handler).varargs

        if is_async or 'update_queue' in fargs:
            target_kwargs['update_queue'] = self.update_queue

        if is_async or 'args' in fargs:
            if isinstance(update, Update) and update.message:
                args = update.message.text.split(' ')[1:]
            elif isinstance(update, Update) and update.inline_query:
                args = update.inline_query.query.split(' ')
            elif isinstance(update, str):
                args = update.split(' ')[1:]
            else:
                args = None

            target_kwargs['args'] = args

        if is_async or 'groups' in fargs:
            target_kwargs['groups'] = kwargs.get('groups', None)

        if is_async or 'groupdict' in fargs:
            target_kwargs['groupdict'] = kwargs.get('groupdict', None)

        if is_async or 'context' in fargs:
            target_kwargs['context'] = kwargs.get('context', None)

        handler(self.bot, update, **target_kwargs)


text:
locale_dir = None
template = 'layout.pt'

redpajama_set_name: RedPajamaGithub


text:
package com.andymark.crosslink;

public enum EnableState {

	DISABLED {
		public byte getValue() {
			return 0;
		}
	},
	TELEOP {
		public byte getValue() {
			return 1;
		}
	},
	AUTONOMOUS {
		public byte getValue() {
			return 2;
		}
	};

	public abstract byte getValue();
}


text:
namespace TestCases.SS.Formula.Functions
{
    using System;

    using NUnit.Framework;
    using NPOI.HSSF.UserModel;
    using NPOI.SS.Formula.Atp;
    using NPOI.SS.UserModel;

    [TestFixture]
    public class CountifsTests
    {

        [Test]
        public void TestCallFunction()
        {
            HSSFWorkbook workbook = new HSSFWorkbook();
            ISheet sheet = workbook.CreateSheet("test");
            IRow row1 = sheet.CreateRow(0);
            ICell cellA1 = row1.CreateCell(0, CellType.Formula);
            ICell cellB1 = row1.CreateCell(1, CellType.Numeric);
            ICell cellC1 = row1.CreateCell(2, CellType.Numeric);
            ICell cellD1 = row1.CreateCell(3, CellType.Numeric);
            ICell cellE1 = row1.CreateCell(4, CellType.Numeric);
            cellB1.SetCellValue(1);
            cellC1.SetCellValue(1);
            cellD1.SetCellValue(2);
            cellE1.SetCellValue(4);

            cellA1.SetCellFormula("COUNTIFS(B1:C1,1, D1:E1,2)");
            IFormulaEvaluator Evaluator = workbook.GetCreationHelper().CreateFormulaEvaluator();
            CellValue Evaluate = Evaluator.Evaluate(cellA1);
            Assert.AreEqual(1.0d, Evaluate.NumberValue);
        }

        [Test]
        public void TestCallFunction_invalidArgs()
        {
            HSSFWorkbook workbook = new HSSFWorkbook();
            ISheet sheet = workbook.CreateSheet("test");
            IRow row1 = sheet.CreateRow(0);
            ICell cellA1 = row1.CreateCell(0, CellType.Formula);
            cellA1.CellFormula = (/*setter*/"COUNTIFS()");
            IFormulaEvaluator Evaluator = workbook.GetCreationHelper().CreateFormulaEvaluator();
            CellValue Evaluate = Evaluator.Evaluate(cellA1);
            Assert.AreEqual(15, Evaluate.ErrorValue);
            cellA1.CellFormula = (/*setter*/"COUNTIFS(A1:C1)");
            Evaluator = workbook.GetCreationHelper().CreateFormulaEvaluator();
            Evaluate = Evaluator.Evaluate(cellA1);
            Assert.AreEqual(15, Evaluate.ErrorValue);
            cellA1.SetCellFormula("COUNTIFS(A1:C1,2,2)");
            Evaluator = workbook.GetCreationHelper().CreateFormulaEvaluator();
            Evaluate = Evaluator.Evaluate(cellA1);
            Assert.AreEqual(15, Evaluate.ErrorValue);
        }
    }

}


text:
import React from 'react';
import PropTypes from 'prop-types';

import { Button, Form } from 'react-bootstrap';
import { defineMessages, FormattedMessage } from 'react-intl';
import withIntl from '../lib/withIntl';
import { get } from 'lodash';
import InputField from './InputField';

class EditMembers extends React.Component {
  static propTypes = {
    collective: PropTypes.object.isRequired,
    members: PropTypes.arrayOf(PropTypes.object).isRequired,
    onChange: PropTypes.func.isRequired,
  };

  constructor(props) {
    super(props);
    const { intl } = props;

    this.state = { members: [...props.members] || [{}] };
    this.renderMember = this.renderMember.bind(this);
    this.addMember = this.addMember.bind(this);
    this.removeMember = this.removeMember.bind(this);
    this.editMember = this.editMember.bind(this);
    this.onChange = props.onChange.bind(this);

    this.defaultType = this.props.defaultType || 'TICKET';

    this.messages = defineMessages({
      'members.role.label': {
        id: 'members.role.label',
        defaultMessage: 'role',
      },
      'members.add': {
        id: 'members.add',
        defaultMessage: 'add another member',
      },
      'members.remove': {
        id: 'members.remove',
        defaultMessage: 'remove member',
      },
      ADMIN: { id: 'roles.admin.label', defaultMessage: 'Core Contributor' },
      MEMBER: { id: 'roles.member.label', defaultMessage: 'Contributor' },
      'user.name.label': { id: 'user.name.label', defaultMessage: 'name' },
      'user.description.label': {
        id: 'user.description.label',
        defaultMessage: 'description',
      },
      'user.email.label': { id: 'user.email.label', defaultMessage: 'email' },
    });

    const getOptions = arr => {
      return arr.map(key => {
        const obj = {};
        obj[key] = intl.formatMessage(this.messages[key]);
        return obj;
      });
    };

    this.fields = [
      {
        name: 'role',
        type: 'select',
        options: getOptions(['ADMIN', 'MEMBER']),
        defaultValue: this.defaultType,
        label: intl.formatMessage(this.messages['members.role.label']),
      },
      {
        name: 'member.name',
        maxLength: 255,
        disabled: member => member.id > 0,
        label: intl.formatMessage(this.messages['user.name.label']),
      },
      {
        name: 'member.email',
        type: 'email',
        disabled: member => member.id > 0,
        label: intl.formatMessage(this.messages['user.email.label']),
      },
      {
        name: 'description',
        maxLength: 255,
        label: intl.formatMessage(this.messages['user.description.label']),
      },
    ];
  }

  editMember(index, fieldname, value) {
    const members = this.state.members;
    members[index] = {
      ...members[index],
      role: members[index].role || 'ADMIN',
    };
    const obj = {};
    if (fieldname.indexOf('.') !== -1) {
      const tokens = fieldname.split('.');
      const parent = tokens[0];
      fieldname = tokens[1];
      obj[parent] = {};
      obj[parent][fieldname] = value;
      members[index][parent] = {
        ...members[index][parent],
        [fieldname]: value,
      };
    } else {
      members[index][fieldname] = value;
    }

    this.setState({ members });
    this.onChange({ members });
  }

  addMember(member) {
    const members = this.state.members;
    members.push(member || {});
    this.setState({ members });
  }

  removeMember(index) {
    const members = this.state.members;
    if (index < 0 || index > members.length) return;
    members.splice(index, 1);
    this.setState({ members });
    this.onChange({ members });
  }

  renderMember(member, index) {
    const { intl } = this.props;

    return (
      <div className="member" key={`member-${index}-${member.id}`}>

           this.removeMember(index)}>
            {intl.formatMessage(this.messages['members.remove'])}

        <Form horizontal>
          {this.fields.map(
            field =>
              (!field.when || field.when(member)) && (
                <InputField
                  className="horizontal"
                  key={field.name}
                  name={field.name}
                  label={field.label}
                  type={field.type}
                  disabled={typeof field.disabled === 'function' ? field.disabled(member) : field.disabled}
                  defaultValue={get(member, field.name) || field.defaultValue}
                  options={field.options}
                  pre={field.pre}
                  placeholder={field.placeholder}
                  onChange={value => this.editMember(index, field.name, value)}
                />
              ),
          )}
        </Form>

    );
  }

  render() {
    const { intl, collective } = this.props;

    return (

{this.props.title}

          {collective.type === 'COLLECTIVE' && (

              <FormattedMessage
                id="members.edit.description"
                defaultMessage="Note: Only Core Contributors can edit this collective and approve or reject expenses."
              />

          )}
          {this.state.members.map(this.renderMember)}

          <Button bsStyle="primary" onClick={() => this.addMember({})}>
            {intl.formatMessage(this.messages['members.add'])}
          </Button>

    );
  }
}

export default withIntl(EditMembers);


text:
import './component/title.js'
import $ from './component/query.js'
import Konami from './component/konami.js'
import Popup from './component/popup.js'
import Top from './component/top.js'
import Portfolios from './component/portfolios.js'
import Portfolio from './component/portfolio.js'

document.addEventListener('DOMContentLoaded', () => {
  const popup = new Popup()
  const konami = new Konami()
  const top = new Top('.top')
  const portfolios = new Portfolios('.bottom')
  const portfolio = new Portfolio('.right')

  top.render()
  portfolios.render()
  konami.active = () => popup.open()
  top.link = () => portfolio.goto('/')
  portfolios.link = name => portfolio.goto(name)

  window.addEventListener('popstate', () => {
    const { pathname } = window.location
    portfolio.goto(pathname, false)
  })

  $('#menu').on('click', () => $('.left').addClass('active'))

  if (window.innerWidth <= 800) {
    $('.left').addClass('active')
  }
})


text:
package org.apache.kafka.streams.kstream.internals;

import org.apache.kafka.streams.kstream.ValueJoiner;
import org.apache.kafka.streams.processor.AbstractProcessor;
import org.apache.kafka.streams.processor.Processor;
import org.apache.kafka.streams.processor.ProcessorContext;
import org.apache.kafka.streams.processor.internals.metrics.StreamsMetricsImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class KTableKTableRightJoin<K, R, V1, V2> extends KTableKTableAbstractJoin<K, R, V1, V2> {
    private static final Logger LOG = LoggerFactory.getLogger(KTableKTableRightJoin.class);

    KTableKTableRightJoin(final KTableImpl<K, ?, V1> table1,
                          final KTableImpl<K, ?, V2> table2,
                          final ValueJoiner<? super V1, ? super V2, ? extends R> joiner) {
        super(table1, table2, joiner);
    }

    @Override
    public Processor<K, Change<V1>> get() {
        return new KTableKTableRightJoinProcessor(valueGetterSupplier2.get());
    }

    @Override
    public KTableValueGetterSupplier<K, R> view() {
        return new KTableKTableRightJoinValueGetterSupplier(valueGetterSupplier1, valueGetterSupplier2);
    }

    private class KTableKTableRightJoinValueGetterSupplier extends KTableKTableAbstractJoinValueGetterSupplier<K, R, V1, V2> {

        KTableKTableRightJoinValueGetterSupplier(final KTableValueGetterSupplier<K, V1> valueGetterSupplier1,
                                                 final KTableValueGetterSupplier<K, V2> valueGetterSupplier2) {
            super(valueGetterSupplier1, valueGetterSupplier2);
        }

        public KTableValueGetter<K, R> get() {
            return new KTableKTableRightJoinValueGetter(valueGetterSupplier1.get(), valueGetterSupplier2.get());
        }
    }

    private class KTableKTableRightJoinProcessor extends AbstractProcessor<K, Change<V1>> {

        private final KTableValueGetter<K, V2> valueGetter;
        private StreamsMetricsImpl metrics;

        KTableKTableRightJoinProcessor(final KTableValueGetter<K, V2> valueGetter) {
            this.valueGetter = valueGetter;
        }

        @Override
        public void init(final ProcessorContext context) {
            super.init(context);
            metrics = (StreamsMetricsImpl) context.metrics();
            valueGetter.init(context);
        }

        @Override
        public void process(final K key, final Change<V1> change) {
            // we do join iff keys are equal, thus, if key is null we cannot join and just ignore the record
            if (key == null) {
                LOG.warn(
                    "Skipping record due to null key. change=[{}] topic=[{}] partition=[{}] offset=[{}]",
                    change, context().topic(), context().partition(), context().offset()
                );
                metrics.skippedRecordsSensor().record();
                return;
            }

            final R newValue;
            R oldValue = null;

            final V2 value2 = valueGetter.get(key);
            if (value2 == null) {
                return;
            }

            newValue = joiner.apply(change.newValue, value2);

            if (sendOldValues) {
                oldValue = joiner.apply(change.oldValue, value2);
            }

            context().forward(key, new Change<>(newValue, oldValue));
        }

        @Override
        public void close() {
            valueGetter.close();
        }
    }

    private class KTableKTableRightJoinValueGetter implements KTableValueGetter<K, R> {

        private final KTableValueGetter<K, V1> valueGetter1;
        private final KTableValueGetter<K, V2> valueGetter2;

        KTableKTableRightJoinValueGetter(final KTableValueGetter<K, V1> valueGetter1,
                                         final KTableValueGetter<K, V2> valueGetter2) {
            this.valueGetter1 = valueGetter1;
            this.valueGetter2 = valueGetter2;
        }

        @Override
        public void init(final ProcessorContext context) {
            valueGetter1.init(context);
            valueGetter2.init(context);
        }

        @Override
        public R get(final K key) {
            final V2 value2 = valueGetter2.get(key);

            if (value2 != null) {
                final V1 value1 = valueGetter1.get(key);
                return joiner.apply(value1, value2);
            } else {
                return null;
            }
        }

        @Override
        public void close() {
            valueGetter1.close();
            valueGetter2.close();
        }
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 317663 $ -->

<refentry xml:id="solrutils.queryphrase" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>SolrUtils::queryPhrase</refname>
  <refpurpose>Prepares a phrase from an unescaped lucene string</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <modifier>static</modifier> <type>string</type><methodname>SolrUtils::queryPhrase</methodname>
   <methodparam><type>string</type><parameter>str</parameter></methodparam>
  </methodsynopsis>
  <para>
   Prepares a phrase from an unescaped lucene string.
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>str</parameter></term>
     <listitem>
      <para>
       The lucene phrase.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the phrase contained in double quotes.
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2">
	<Width>80</Width>
	<Height>20</Height>
	<WindowOpeningMode>LockOwnerWindow</WindowOpeningMode>
	<CommandSet>
		<ExcludedCommand>No</ExcludedCommand>
		<ExcludedCommand>CustomizeForm</ExcludedCommand>
		<ExcludedCommand>SaveValues</ExcludedCommand>
		<ExcludedCommand>Close</ExcludedCommand>
		<ExcludedCommand>Abort</ExcludedCommand>
		<ExcludedCommand>Retry</ExcludedCommand>
		<ExcludedCommand>Yes</ExcludedCommand>
		<ExcludedCommand>Cancel</ExcludedCommand>
		<ExcludedCommand>RestoreValues</ExcludedCommand>
		<ExcludedCommand>Ignore</ExcludedCommand>
		<ExcludedCommand>OK</ExcludedCommand>
	</CommandSet>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
		<ChildItems>
			<Button name="Выбрать" id="16">
				<Type>CommandBarButton</Type>
				<DefaultButton>true</DefaultButton>
				<SkipOnInput>false</SkipOnInput>
				<CommandName>Form.Command.Выбрать</CommandName>
				<TextColor>style:ButtonTextColor</TextColor>
				<BackColor>style:ButtonBackColor</BackColor>
				<BorderColor>style:BorderColor</BorderColor>
				<ExtendedTooltip name="ВыбратьExtendedTooltip" id="28"/>
			</Button>
		</ChildItems>
	</AutoCommandBar>
	<Events>
		<Event name="OnOpen">ПриОткрытии</Event>
	</Events>
	<ChildItems>
		<UsualGroup name="ДоменыИПользователи" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Домены и пользователи</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>Domains and users</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Domenii și utilizatorii</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Домены и пользователи</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>Domains and users</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Domenii și utilizatorii</v8:content>
				</v8:item>
			</ToolTip>
			<Group>Horizontal</Group>
			<Representation>NormalSeparation</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ДоменыИПользователиExtendedTooltip" id="29"/>
			<ChildItems>
				<UsualGroup name="ГруппаДомены" id="51">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Домены:</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>en</v8:lang>
							<v8:content>Domains:</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>ro</v8:lang>
							<v8:content>domenii:</v8:content>
						</v8:item>
					</Title>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Группа домены</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>en</v8:lang>
							<v8:content>Domains group</v8:content>
						</v8:item>
					</ToolTip>
					<Group>Vertical</Group>
					<ExtendedTooltip name="ГруппаДоменыРасширеннаяПодсказка" id="52"/>
					<ChildItems>

							<Representation>List</Representation>
							<Autofill>true</Autofill>
							<ReadOnly>true</ReadOnly>
							<SkipOnInput>false</SkipOnInput>
							<Width>40</Width>
							<HeightInTableRows>4</HeightInTableRows>
							<SelectionMode>SingleRow</SelectionMode>
							false
							<HorizontalLines>false</HorizontalLines>
							<VerticalLines>false</VerticalLines>
							<DataPath>СписокДоменов</DataPath>
							<BorderColor>style:BorderColor</BorderColor>
							<Title>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>Домены</v8:content>
								</v8:item>
								<v8:item>
									<v8:lang>en</v8:lang>
									<v8:content>Domains</v8:content>
								</v8:item>
								<v8:item>
									<v8:lang>ro</v8:lang>
									<v8:content>Domenii</v8:content>
								</v8:item>
							</Title>
							<CommandSet>
								<ExcludedCommand>Copy</ExcludedCommand>
								<ExcludedCommand>SortListAsc</ExcludedCommand>
								<ExcludedCommand>MoveUp</ExcludedCommand>
								<ExcludedCommand>SortListDesc</ExcludedCommand>
								<ExcludedCommand>CopyToClipboard</ExcludedCommand>
								<ExcludedCommand>Delete</ExcludedCommand>
								<ExcludedCommand>EndEdit</ExcludedCommand>
								<ExcludedCommand>Add</ExcludedCommand>
								<ExcludedCommand>Change</ExcludedCommand>
								<ExcludedCommand>MoveDown</ExcludedCommand>
							</CommandSet>
							<SearchStringLocation>None</SearchStringLocation>
							<ViewStatusLocation>None</ViewStatusLocation>
							<SearchControlLocation>None</SearchControlLocation>
							<RowFilter xsi:nil="true"/>
							<ContextMenu name="ТаблицаДоменовКонтекстноеМеню" id="6">
								<ChildItems>
									<Button name="ТаблицаДоменовКонтекстноеМенюНайти" id="17">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаДоменов.StandardCommand.Find</CommandName>
										<ExtendedTooltip name="ТаблицаДоменовКонтекстноеМенюНайтиExtendedTooltip" id="30"/>
									</Button>
									<Button name="ТаблицаДоменовКонтекстноеМенюОтменитьПоиск" id="18">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаДоменов.StandardCommand.CancelSearch</CommandName>
										<ExtendedTooltip name="ТаблицаДоменовКонтекстноеМенюОтменитьПоискExtendedTooltip" id="31"/>
									</Button>
									<Button name="ТаблицаДоменовКонтекстноеМенюВывестиСписок" id="21">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаДоменов.StandardCommand.OutputList</CommandName>
										<ExtendedTooltip name="ТаблицаДоменовКонтекстноеМенюВывестиСписокExtendedTooltip" id="32"/>
									</Button>
								</ChildItems>
							</ContextMenu>
							<AutoCommandBar name="ТаблицаДоменовКоманднаяПанель" id="7">
								<Autofill>false</Autofill>
								<ChildItems>
									<Button name="ТаблицаДоменовНайти" id="41">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаДоменов.StandardCommand.Find</CommandName>
										<ExtendedTooltip name="ТаблицаДоменовНайтиРасширеннаяПодсказка" id="42"/>
									</Button>
									<Button name="ТаблицаДоменовОтменитьПоиск" id="43">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаДоменов.StandardCommand.CancelSearch</CommandName>
										<ExtendedTooltip name="ТаблицаДоменовОтменитьПоискРасширеннаяПодсказка" id="44"/>
									</Button>
								</ChildItems>
							</AutoCommandBar>
							<ExtendedTooltip name="ТаблицаДоменовExtendedTooltip" id="33"/>
							<SearchStringAddition name="ТаблицаДоменовSearchString" id="53">
								<AdditionSource>
									<Item>ТаблицаДоменов</Item>
									<Type>SearchStringRepresentation</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаДоменовSearchStringContextMenu" id="54"/>
								<ExtendedTooltip name="ТаблицаДоменовSearchStringExtendedTooltip" id="55"/>
							</SearchStringAddition>
							<ViewStatusAddition name="ТаблицаДоменовViewStatus" id="56">
								<AdditionSource>
									<Item>ТаблицаДоменов</Item>
									<Type>ViewStatusRepresentation</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаДоменовViewStatusContextMenu" id="57"/>
								<ExtendedTooltip name="ТаблицаДоменовViewStatusExtendedTooltip" id="58"/>
							</ViewStatusAddition>
							<SearchControlAddition name="ТаблицаДоменовSearchControl" id="59">
								<AdditionSource>
									<Item>ТаблицаДоменов</Item>
									<Type>SearchControl</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаДоменовSearchControlContextMenu" id="60"/>
								<ExtendedTooltip name="ТаблицаДоменовSearchControlExtendedTooltip" id="61"/>
							</SearchControlAddition>
							<Events>
								<Event name="OnActivateRow">ТаблицаДоменовПриАктивизацииСтроки</Event>
							</Events>
							<ChildItems>
								<InputField name="Домены" id="11">
									<DataPath>СписокДоменов.ИмяДомена</DataPath>
									<Title>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>Домены</v8:content>
										</v8:item>
										<v8:item>
											<v8:lang>en</v8:lang>
											<v8:content>Domains</v8:content>
										</v8:item>
										<v8:item>
											<v8:lang>ro</v8:lang>
											<v8:content>Domenii</v8:content>
										</v8:item>
									</Title>
									<Wrap>false</Wrap>
									<BorderColor>style:BorderColor</BorderColor>
									<ContextMenu name="ДоменыКонтекстноеМеню" id="12"/>
									<ExtendedTooltip name="ДоменыExtendedTooltip" id="34"/>
								</InputField>
							</ChildItems>

					</ChildItems>
				</UsualGroup>
				<UsualGroup name="ГруппаПользователи" id="49">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Пользователи:</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>en</v8:lang>
							<v8:content>Users:</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>ro</v8:lang>
							<v8:content>utilizatori:</v8:content>
						</v8:item>
					</Title>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Группа пользователи</v8:content>
						</v8:item>
					</ToolTip>
					<Group>Vertical</Group>
					<ExtendedTooltip name="ГруппаПользователиРасширеннаяПодсказка" id="50"/>
					<ChildItems>

							<Representation>List</Representation>
							<Autofill>true</Autofill>
							<ReadOnly>true</ReadOnly>
							<SkipOnInput>false</SkipOnInput>
							<Width>40</Width>
							<HeightInTableRows>4</HeightInTableRows>
							<SelectionMode>SingleRow</SelectionMode>
							false
							<HorizontalLines>false</HorizontalLines>
							<VerticalLines>false</VerticalLines>
							<DataPath>СписокПользователейТекущегоДомена</DataPath>
							<BorderColor>style:BorderColor</BorderColor>
							<Title>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>Пользователи</v8:content>
								</v8:item>
								<v8:item>
									<v8:lang>en</v8:lang>
									<v8:content>Users</v8:content>
								</v8:item>
								<v8:item>
									<v8:lang>ro</v8:lang>
									<v8:content>Utilizatori</v8:content>
								</v8:item>
							</Title>
							<CommandSet>
								<ExcludedCommand>Copy</ExcludedCommand>
								<ExcludedCommand>SortListAsc</ExcludedCommand>
								<ExcludedCommand>MoveUp</ExcludedCommand>
								<ExcludedCommand>SortListDesc</ExcludedCommand>
								<ExcludedCommand>CopyToClipboard</ExcludedCommand>
								<ExcludedCommand>Delete</ExcludedCommand>
								<ExcludedCommand>EndEdit</ExcludedCommand>
								<ExcludedCommand>Add</ExcludedCommand>
								<ExcludedCommand>Change</ExcludedCommand>
								<ExcludedCommand>MoveDown</ExcludedCommand>
							</CommandSet>
							<SearchStringLocation>None</SearchStringLocation>
							<ViewStatusLocation>None</ViewStatusLocation>
							<SearchControlLocation>None</SearchControlLocation>
							<RowFilter xsi:nil="true"/>
							<ContextMenu name="ТаблицаПользователейДоменаКонтекстноеМеню" id="9">
								<ChildItems>
									<Button name="ТаблицаПользователейДоменаКонтекстноеМенюВыбрать" id="27">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Command.Выбрать</CommandName>

										<ExtendedTooltip name="ТаблицаПользователейДоменаКонтекстноеМенюВыбратьExtendedTooltip" id="35"/>
									</Button>
									<Button name="ТаблицаПользователейДоменаКонтекстноеМенюНайти" id="22">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаПользователейДомена.StandardCommand.Find</CommandName>
										<ExtendedTooltip name="ТаблицаПользователейДоменаКонтекстноеМенюНайтиExtendedTooltip" id="36"/>
									</Button>
									<Button name="ТаблицаПользователейДоменаКонтекстноеМенюОтменитьПоиск" id="23">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаПользователейДомена.StandardCommand.CancelSearch</CommandName>
										<ExtendedTooltip name="ТаблицаПользователейДоменаКонтекстноеМенюОтменитьПоискExtendedTooltip" id="37"/>
									</Button>
									<Button name="ТаблицаПользователейДоменаКонтекстноеМенюВывестиСписок" id="26">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаПользователейДомена.StandardCommand.OutputList</CommandName>
										<ExtendedTooltip name="ТаблицаПользователейДоменаКонтекстноеМенюВывестиСписокExtendedTooltip" id="38"/>
									</Button>
								</ChildItems>
							</ContextMenu>
							<AutoCommandBar name="ТаблицаПользователейДоменаКоманднаяПанель" id="10">
								<Autofill>false</Autofill>
								<ChildItems>
									<Button name="ТаблицаПользователейДоменаНайти" id="45">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаПользователейДомена.StandardCommand.Find</CommandName>
										<ExtendedTooltip name="ТаблицаПользователейДоменаНайтиРасширеннаяПодсказка" id="46"/>
									</Button>
									<Button name="ТаблицаПользователейДоменаОтменитьПоиск" id="47">
										<Type>CommandBarButton</Type>
										<CommandName>Form.Item.ТаблицаПользователейДомена.StandardCommand.CancelSearch</CommandName>
										<ExtendedTooltip name="ТаблицаПользователейДоменаОтменитьПоискРасширеннаяПодсказка" id="48"/>
									</Button>
								</ChildItems>
							</AutoCommandBar>
							<ExtendedTooltip name="ТаблицаПользователейДоменаExtendedTooltip" id="39"/>
							<SearchStringAddition name="ТаблицаПользователейДоменаSearchString" id="62">
								<AdditionSource>
									<Item>ТаблицаПользователейДомена</Item>
									<Type>SearchStringRepresentation</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаПользователейДоменаSearchStringContextMenu" id="63"/>
								<ExtendedTooltip name="ТаблицаПользователейДоменаSearchStringExtendedTooltip" id="64"/>
							</SearchStringAddition>
							<ViewStatusAddition name="ТаблицаПользователейДоменаViewStatus" id="65">
								<AdditionSource>
									<Item>ТаблицаПользователейДомена</Item>
									<Type>ViewStatusRepresentation</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаПользователейДоменаViewStatusContextMenu" id="66"/>
								<ExtendedTooltip name="ТаблицаПользователейДоменаViewStatusExtendedTooltip" id="67"/>
							</ViewStatusAddition>
							<SearchControlAddition name="ТаблицаПользователейДоменаSearchControl" id="68">
								<AdditionSource>
									<Item>ТаблицаПользователейДомена</Item>
									<Type>SearchControl</Type>
								</AdditionSource>
								<ContextMenu name="ТаблицаПользователейДоменаSearchControlContextMenu" id="69"/>
								<ExtendedTooltip name="ТаблицаПользователейДоменаSearchControlExtendedTooltip" id="70"/>
							</SearchControlAddition>
							<Events>
								<Event name="Selection">ТаблицаПользователейДоменаВыбор</Event>
							</Events>
							<ChildItems>
								<InputField name="Пользователи" id="13">
									<DataPath>СписокПользователейТекущегоДомена.ИмяПользователя</DataPath>
									<Title>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>Пользователи</v8:content>
										</v8:item>
										<v8:item>
											<v8:lang>en</v8:lang>
											<v8:content>Users</v8:content>
										</v8:item>
										<v8:item>
											<v8:lang>ro</v8:lang>
											<v8:content>Utilizatori</v8:content>
										</v8:item>
									</Title>
									<Wrap>false</Wrap>
									<BorderColor>style:BorderColor</BorderColor>
									<ContextMenu name="ПользователиКонтекстноеМеню" id="14"/>
									<ExtendedTooltip name="ПользователиExtendedTooltip" id="40"/>
								</InputField>
							</ChildItems>

					</ChildItems>
				</UsualGroup>
			</ChildItems>
		</UsualGroup>
	</ChildItems>
	<Attributes>
		<Attribute name="СписокДоменов" id="1">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Список доменов</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>List of domains</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Lista domeniilor</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>v8:ValueTable</v8:Type>
			</Type>
			<Columns>
				<Column name="ИмяДомена" id="1">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Имя домена</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>en</v8:lang>
							<v8:content>Domain name</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>ro</v8:lang>
							<v8:content>Numele domeniului</v8:content>
						</v8:item>
					</Title>
					<Type>
						<v8:Type>xs:string</v8:Type>
						<v8:StringQualifiers>
							<v8:Length>0</v8:Length>
							<v8:AllowedLength>Variable</v8:AllowedLength>
						</v8:StringQualifiers>
					</Type>
				</Column>
			</Columns>
		</Attribute>
		<Attribute name="СписокПользователейТекущегоДомена" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Список пользователей текущего домена</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>List of users of current domain</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Lista utilizatorilor domeniului curent</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>v8:ValueTable</v8:Type>
			</Type>
			<Columns>
				<Column name="ИмяПользователя" id="1">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Имя пользователя</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>en</v8:lang>
							<v8:content>User name</v8:content>
						</v8:item>
						<v8:item>
							<v8:lang>ro</v8:lang>
							<v8:content>Numele utilizatorului</v8:content>
						</v8:item>
					</Title>
					<Type>
						<v8:Type>xs:string</v8:Type>
						<v8:StringQualifiers>
							<v8:Length>0</v8:Length>
							<v8:AllowedLength>Variable</v8:AllowedLength>
						</v8:StringQualifiers>
					</Type>
				</Column>
			</Columns>
		</Attribute>
		<Attribute name="ТаблицаДоменовИПользователей" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Таблица доменов и пользователей</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>Table of domains and users</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Tabelul domeniilor si utilizatorilor</v8:content>
				</v8:item>
			</Title>
			<Type/>
		</Attribute>
	</Attributes>
	<Commands>
		<Command name="Выбрать" id="1">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Выбрать</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>Select</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Selectare</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Выбрать пользователя операционной системы</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>en</v8:lang>
					<v8:content>Select OS user</v8:content>
				</v8:item>
				<v8:item>
					<v8:lang>ro</v8:lang>
					<v8:content>Selectați de sistem de operare de utilizator</v8:content>
				</v8:item>
			</ToolTip>
			<Picture>
				<xr:Ref>StdPicture.ChooseValue</xr:Ref>
				<xr:LoadTransparent>true</xr:LoadTransparent>
			</Picture>
			<Action>Выбрать</Action>
			<Representation>TextPicture</Representation>
		</Command>
	</Commands>
</Form>


text:
import callingOptions from 'ringcentral-integration/modules/CallingSettings/callingOptions';

export default {
  title: 'Calling',
  [callingOptions.softphone]: '{brand} for Desktop',
  [callingOptions.myphone]: 'My {brand} Phone',
  [callingOptions.otherphone]: 'Other Phone',
  [callingOptions.customphone]: 'Custom Phone',
  [callingOptions.browser]: 'Browser',
  makeCallsWith: 'Make my calls with',
  ringoutHint: 'Ring me at my location first, then connect the called party',
  myLocationLabel: 'My Location',
  press1ToStartCallLabel: 'Prompt me to dial 1 before connecting the call',
  [`${callingOptions.browser}Tooltip`]: 'Use this option to make and receive calls using your computer's microphone and speaker.',
  [`${callingOptions.softphone}Tooltip`]: 'Use this option to make and receive calls using your {brand} for Desktop app.',
  [`${callingOptions.myphone}Tooltip`]: 'Use this option to make calls using your {brand} phone.',
  [`${callingOptions.myphone}Tooltip1`]: 'For the call you make, your {brand} phone will ring first then the party you called.',
  [`${callingOptions.otherphone}Tooltip`]: 'Use this option to make calls using your other phones such as home or cell phones that you have added in your {brand} Extension.',
  [`${callingOptions.otherphone}Tooltip1`]: 'For the call you make, this phone will ring first then the party you called.',
  [`${callingOptions.customphone}Tooltip`]: 'Use this option to make calls using any phone of your choice by entering a valid phone number in the field below.',
  [`${callingOptions.customphone}Tooltip1`]: 'For the call you make, this phone will ring first then the party you called.',
};


text:
html {
  font-size: 16px !important; /* override bootstrap */
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}


text:
package de.bmw.carit.acme.cli;

/**
 * Base class for jACME console commands. A command interprets command line arguments and redirects to the correct jACME-API call.
 *
 * Used in Program.java to setup the possible commands.
 */
abstract class Command
{

    /**
     * Called when the command was used in the command line invocation.
     *
     * @param args
     *            The arguments for the command.
     */
    public abstract void execute(String[] args);

    /**
     * Gets a short description of the command which is shows in the command overview list.
     *
     * @return A short description of the command.
     */
    public abstract String getDescription();

    /**
     * Helper method for the command if the 'execute' method cannot succeed because of invalid arguments. Should print out the correct arguments usage.
     */
    protected abstract void printUsage();

    /**
     * Gets the command string for the command.
     *
     * @return The command string.
     */
    public abstract String getCommand();
}


text:
class GesturePropertyProvider;

namespace ui {

class COMPONENT_EXPORT(EVDEV) GesturePropertiesService
    : public ui::ozone::mojom::GesturePropertiesService {
 public:
  GesturePropertiesService(
      GesturePropertyProvider* provider,
      mojo::PendingReceiver<ui::ozone::mojom::GesturePropertiesService>
          receiver);

  void ListDevices(ListDevicesCallback callback) override;
  void ListProperties(int32_t device_id,
                      ListPropertiesCallback callback) override;
  void GetProperty(int32_t device_id,
                   const std::string& name,
                   GetPropertyCallback callback) override;
  void SetProperty(int32_t device_id,
                   const std::string& name,
                   ui::ozone::mojom::GesturePropValuePtr values,
                   SetPropertyCallback callback) override;

 private:
  GesturePropertyProvider* prop_provider_;
  mojo::Receiver<ui::ozone::mojom::GesturePropertiesService> receiver_;
};

}  // namespace ui

#endif  // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTIES_SERVICE_H_


text:
.. _id.appendix:

==============================================================================
Appendix
==============================================================================

**Contents:**

.. toctree::
    :maxdepth: 1

    formatters
    context_attributes
    parse_builtin_types
    regular_expressions
    test_domains
    behave_ecosystem
    related


text:
package com.facebook.common.memory;

import androidx.annotation.Nullable;
import androidx.core.util.Pools;
import com.facebook.infer.annotation.Nullsafe;
import java.nio.ByteBuffer;

@Nullsafe(Nullsafe.Mode.LOCAL)
public class DecodeBufferHelper implements Pools.Pool<ByteBuffer> {

  public static final DecodeBufferHelper INSTANCE = new DecodeBufferHelper();

  private static final int DEFAULT_DECODE_BUFFER_SIZE = 16 * 1024;

  private static int sRecommendedDecodeBufferSize = DEFAULT_DECODE_BUFFER_SIZE;

  public static int getRecommendedDecodeBufferSize() {
    return sRecommendedDecodeBufferSize;
  }

  public static void setRecommendedDecodeBufferSize(int recommendedDecodeBufferSize) {
    sRecommendedDecodeBufferSize = recommendedDecodeBufferSize;
  }

  private static final ThreadLocal<ByteBuffer> sBuffer =
      new ThreadLocal<ByteBuffer>() {
        @Override
        protected ByteBuffer initialValue() {
          return ByteBuffer.allocate(sRecommendedDecodeBufferSize);
        }
      };

  @Override
  public @Nullable ByteBuffer acquire() {
    return sBuffer.get();
  }

  @Override
  public boolean release(ByteBuffer instance) {
    return true;
  }
}


text:
#include "src/trace_processor/importers/json/json_trace_parser.h"

#include <inttypes.h>

#include <limits>
#include <string>

#include "perfetto/base/logging.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/ext/base/utils.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/slice_tracker.h"
#include "src/trace_processor/importers/common/track_tracker.h"
#include "src/trace_processor/importers/json/json_tracker.h"
#include "src/trace_processor/importers/json/json_utils.h"
#include "src/trace_processor/types/trace_processor_context.h"

namespace perfetto {
namespace trace_processor {

JsonTraceParser::JsonTraceParser(TraceProcessorContext* context)
    : context_(context), systrace_line_parser_(context) {}

JsonTraceParser::~JsonTraceParser() = default;

void JsonTraceParser::ParseFtracePacket(uint32_t,
                                        int64_t,
                                        TimestampedTracePiece) {
  PERFETTO_FATAL("Json Trace Parser cannot handle ftrace packets.");
}

void JsonTraceParser::ParseTracePacket(int64_t timestamp,
                                       TimestampedTracePiece ttp) {
  PERFETTO_DCHECK(json::IsJsonSupported());

#if PERFETTO_BUILDFLAG(PERFETTO_TP_JSON)
  PERFETTO_DCHECK(ttp.type == TimestampedTracePiece::Type::kJsonValue ||
                  ttp.type == TimestampedTracePiece::Type::kSystraceLine);
  if (ttp.type == TimestampedTracePiece::Type::kSystraceLine) {
    systrace_line_parser_.ParseLine(*ttp.systrace_line);
    return;
  }

  const Json::Value& value = *(ttp.json_value);

  ProcessTracker* procs = context_->process_tracker.get();
  TraceStorage* storage = context_->storage.get();
  SliceTracker* slice_tracker = context_->slice_tracker.get();

  auto& ph = value["ph"];
  if (!ph.isString())
    return;
  char phase = *ph.asCString();

  base::Optional<uint32_t> opt_pid;
  base::Optional<uint32_t> opt_tid;

  if (value.isMember("pid"))
    opt_pid = json::CoerceToUint32(value["pid"]);
  if (value.isMember("tid"))
    opt_tid = json::CoerceToUint32(value["tid"]);

  uint32_t pid = opt_pid.value_or(0);
  uint32_t tid = opt_tid.value_or(pid);

  base::StringView cat = value.isMember("cat")
                             ? base::StringView(value["cat"].asCString())
                             : base::StringView();
  base::StringView name = value.isMember("name")
                              ? base::StringView(value["name"].asCString())
                              : base::StringView();

  StringId cat_id = storage->InternString(cat);
  StringId name_id = storage->InternString(name);
  UniqueTid utid = procs->UpdateThread(tid, pid);

  auto args_inserter = [this, &value](ArgsTracker::BoundInserter* inserter) {
    if (value.isMember("args")) {
      json::AddJsonValueToArgs(value["args"], /* flat_key = */ "args",
                               /* key = */ "args", context_->storage.get(),
                               inserter);
    }
  };
  switch (phase) {
    case 'B': {  // TRACE_EVENT_BEGIN.
      TrackId track_id = context_->track_tracker->InternThreadTrack(utid);
      slice_tracker->Begin(timestamp, track_id, cat_id, name_id, args_inserter);
      break;
    }
    case 'E': {  // TRACE_EVENT_END.
      TrackId track_id = context_->track_tracker->InternThreadTrack(utid);
      slice_tracker->End(timestamp, track_id, cat_id, name_id, args_inserter);
      break;
    }
    case 'X': {  // TRACE_EVENT (scoped event).
      base::Optional<int64_t> opt_dur =
          JsonTracker::GetOrCreate(context_)->CoerceToTs(value["dur"]);
      if (!opt_dur.has_value())
        return;
      TrackId track_id = context_->track_tracker->InternThreadTrack(utid);
      slice_tracker->Scoped(timestamp, track_id, cat_id, name_id,
                            opt_dur.value(), args_inserter);
      break;
    }
    case 'M': {  // Metadata events (process and thread names).
      if (strcmp(value["name"].asCString(), "thread_name") == 0 &&
          !value["args"]["name"].empty()) {
        const char* thread_name = value["args"]["name"].asCString();
        auto thread_name_id = context_->storage->InternString(thread_name);
        procs->UpdateThreadName(tid, thread_name_id);
        break;
      }
      if (strcmp(value["name"].asCString(), "process_name") == 0 &&
          !value["args"]["name"].empty()) {
        const char* proc_name = value["args"]["name"].asCString();
        procs->SetProcessMetadata(pid, base::nullopt, proc_name);
        break;
      }
    }
  }
#else
  perfetto::base::ignore_result(timestamp);
  perfetto::base::ignore_result(ttp);
  perfetto::base::ignore_result(context_);
  PERFETTO_ELOG("Cannot parse JSON trace due to missing JSON support");
#endif  // PERFETTO_BUILDFLAG(PERFETTO_TP_JSON)
}

}  // namespace trace_processor
}  // namespace perfetto


text:
/**
TinCan client library

@module TinCan
@submodule TinCan.Verb
*/
(function () {
    "use strict";

    //
    // this represents the full set of verb values that were
    // allowed by the .9 spec version, if an object is created with one of
    // the short forms it will be upconverted to the matching long form,
    // for local storage and use and if an object is needed in .9 version
    // consequently down converted
    //
    // hopefully this list will never grow (or change) and only the exact
    // ADL compatible URLs should be matched
    //
    var _downConvertMap = {
        "http://adlnet.gov/expapi/verbs/experienced": "experienced",
        "http://adlnet.gov/expapi/verbs/attended":    "attended",
        "http://adlnet.gov/expapi/verbs/attempted":   "attempted",
        "http://adlnet.gov/expapi/verbs/completed":   "completed",
        "http://adlnet.gov/expapi/verbs/passed":      "passed",
        "http://adlnet.gov/expapi/verbs/failed":      "failed",
        "http://adlnet.gov/expapi/verbs/answered":    "answered",
        "http://adlnet.gov/expapi/verbs/interacted":  "interacted",
        "http://adlnet.gov/expapi/verbs/imported":    "imported",
        "http://adlnet.gov/expapi/verbs/created":     "created",
        "http://adlnet.gov/expapi/verbs/shared":      "shared",
        "http://adlnet.gov/expapi/verbs/voided":      "voided"
    },

    /**
    @class TinCan.Verb
    @constructor
    */
    Verb = TinCan.Verb = function (cfg) {
        this.log("constructor");

        /**
        @property id
        @type String
        */
        this.id = null;

        /**
        @property display
        @type Object
        */
        this.display = null;

        this.init(cfg);
    };
    Verb.prototype = {
        /**
        @property LOG_SRC
        */
        LOG_SRC: "Verb",

        /**
        @method log
        */
        log: TinCan.prototype.log,

        /**
        @method init
        @param {Object} [options] Configuration used to initialize
        */
        init: function (cfg) {
            this.log("init");
            var i,
                directProps = [
                    "id",
                    "display"
                ],
                prop
            ;

            if (typeof cfg === "string") {
                this.id = cfg;
                this.display = {
                    und: this.id
                };

                //If simple string like "attempted" was passed in (0.9 verbs),
                //upconvert the ID to the 0.95 ADL version
                for (prop in _downConvertMap) {
                    if (_downConvertMap.hasOwnProperty(prop) && _downConvertMap[prop] === cfg) {
                        this.id = prop;
                        break;
                    }
                }
            }
            else {
                cfg = cfg || {};

                for (i = 0; i < directProps.length; i += 1) {
                    if (cfg.hasOwnProperty(directProps[i]) && cfg[directProps[i]] !== null) {
                        this[directProps[i]] = cfg[directProps[i]];
                    }
                }

                if (this.display === null && typeof _downConvertMap[this.id] !== "undefined") {
                    this.display = {
                        "und": _downConvertMap[this.id]
                    };
                }
            }
        },

        /**
        @method toString
        @return {String} String representation of the verb
        */
        toString: function (lang) {
            this.log("toString");

            if (this.display !== null) {
                return this.getLangDictionaryValue("display", lang);
            }

            return this.id;
        },

        /**
        @method asVersion
        @param {String} [version] Version to return (defaults to newest supported)
        */
        asVersion: function (version) {
            this.log("asVersion");
            var result;

            version = version || TinCan.versions()[0];

            if (version === "0.9") {
                result = _downConvertMap[this.id];
            }
            else {
                result = {
                    id: this.id
                };
                if (this.display !== null) {
                    result.display = this.display;
                }
            }

            return result;
        },

        /**
        See {{#crossLink "TinCan.Utils/getLangDictionaryValue"}}{{/crossLink}}

        @method getLangDictionaryValue
        */
        getLangDictionaryValue: TinCan.Utils.getLangDictionaryValue
    };

    /**
    @method fromJSON
    @param {String} verbJSON String of JSON representing the verb
    @return {Object} Verb
    @static
    */
    Verb.fromJSON = function (verbJSON) {
        Verb.prototype.log("fromJSON");
        var _verb = JSON.parse(verbJSON);

        return new Verb(_verb);
    };
}());


text:
export default class Person {
  constructor(name) {
    this.name = /*probe:*/name/*{}*/;
  }

  sayHi() {
    console.log(`Hi, I'm ${this.name}`);
  }
}/* Context: {"context":{"prescript":"","postscript":""},"customInstances":[]} */


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

<title>OSCMessage</title>
<meta name="date" content="2016-07-07">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

de.sciss.net

Class OSCMessage

java.lang.Object

de.sciss.net.OSCPacket

de.sciss.net.OSCMessage

public class OSCMessage
extends OSCPacket

Class for decoding OSC messages from
  received datagrams or encoding OSC message
  for sending to a target socket. See opensoundcontrol.org/spec-1_0 for
        the specification of the message format.

        Here is an example:

      DatagramChannel dch = null;

      final ByteBuffer buf        = ByteBuffer.allocateDirect( 1024 );
      final SocketAddress addr    = new InetSocketAddress( "localhost", 57110 );
      final Random rnd            = new Random( System.currentTimeMillis() );

      try {
          dch = DatagramChannel.open();
          dch.configureBlocking( true );
          new OSCMessage( "/s_new", new Object[] { "default",
                          new Integer( 1001 ), new Integer( 1 ), new Integer( 0 ),
                          "out", new Integer( 0 ), "freq", new Float( 0 ), "amp", new Float( 0.1f )}
          ).encode( buf );
          buf.flip();
          dch.send( buf, addr );

          for( int i = 0; i < 11; i++ ) {
              buf.clear();
              // no schoenheitsprize
              new OSCMessage( "/n_set", new Object[] { new Integer( 1001 ),
                  "freq", new Float( 333 * Math.pow( 2, rnd.nextInt( 12 ) / 12.0f ))}
              ).encode( buf );
              buf.flip();
              dch.send( buf, addr );
              Thread.currentThread().sleep( 300 );
          }
          buf.clear();
          new OSCMessage( "/n_free", new Object[] { new Integer( 1001 )}).encode( buf );
          buf.flip();
          dch.send( buf, addr );
      }
      catch( InterruptedException e1 ) {}
      catch( IOException e2 ) {
          System.err.println( e2.getLocalizedMessage() );
      }
      finally {
          if( dch != null ) {
              try {
                  dch.close();
              }
              catch( IOException e4 ) {};
          }
      }

        Note that this example uses the old way of sending messages.
        A easier way is to create an OSCTransmitter which
        handles the byte buffer for you. See the OSCReceiver doc
        for an example using a dedicated transmitter.

See Also:

OSCReceiver

Field Summary

Fields

Modifier and Type
Field and Description

static java.lang.Object[]
NO_ARGS

Shorthand to pass to the constructor
        if you want to create an OSC message
        which doesn't contain any arguments.

Constructor Summary

Constructors

Constructor and Description

OSCMessage(java.lang.String name)

Creates a generic OSC message
  with no arguments.

OSCMessage(java.lang.String name,
          java.lang.Object[] args)

Creates a generic OSC message
  from Primitive arguments.

Method Summary

All Methods Static Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

static OSCMessage
decodeMessage(java.lang.String command,
             java.nio.ByteBuffer b)

Creates a new message with arguments decoded
  from the ByteBuffer, using the default codec.

java.lang.Object
getArg(int index)

Returns the argument at the given index.

int
getArgCount()

Returns the number of arguments of the message.

java.lang.String
getName()

Returns the OSC command of this message

Methods inherited from class de.sciss.net.OSCPacket

decode, encode, encode, getSize, getSize, printHexOn, printTextOn

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_ARGS

public static final java.lang.Object[] NO_ARGS

Shorthand to pass to the constructor
        if you want to create an OSC message
        which doesn't contain any arguments.
        Note: alternatively you can use the
        constructor new OSCMessage( String ).

See Also:

OSCMessage( String )

Constructor Detail

OSCMessage

public OSCMessage(java.lang.String name)

Creates a generic OSC message
  with no arguments.

Parameters:

name - the OSC command, like "/s_new"

OSCMessage

public OSCMessage(java.lang.String name,
                  java.lang.Object[] args)

Creates a generic OSC message
  from Primitive arguments.

Parameters:

name - the OSC command, like "/s_new"

args - array of arguments which are simply
                                        assembled. Supported types are Integer,
                                        Long, Float, Double,
                                        String, furthermore byte[] and OSCPacket (both of which
                                        are written as a blob). Note that in a future version of NetUtil, special codecs
                                        will allow customization of the way classes are encoded.

Method Detail

getName

public java.lang.String getName()

Returns the OSC command of this message

Returns:

the message's command, e.g. "/synced" etc.

getArgCount

public int getArgCount()

Returns the number of arguments of the message.

Returns:

the number of typed arguments in the message.
                                e.g. for [ "/n_go", 1001, 0, -1, -1, 0 ] it returns 5.

getArg

public java.lang.Object getArg(int index)

Returns the argument at the given index.
        See decodeMessage() for information about the
        used java classes. The most fail-safe way to handle numeric arguments
        is to assume Number instead of a particular number subclass.
        To read a primitive int, the recommended code is
        ((Number) msg.getArg( index )).intValue(), which will
        work with any of Integer, Long, Float, Double.

Parameters:

index - index of the argument, beginning at zero,
                                        must be less than getArgCount()

Returns:

the primitive type (Integer, Float, String etc.) argument at
                                the given index.
                                e.g. for [ "/n_go", 1001, 0, -1, -1, 0 ], requesting index
                                0 would return new Integer( 1001 ).

See Also:

getArgCount(),
decodeMessage( String, ByteBuffer ),
Number.intValue()

decodeMessage

public static OSCMessage decodeMessage(java.lang.String command,
                                       java.nio.ByteBuffer b)
                                throws java.io.IOException

Creates a new message with arguments decoded
  from the ByteBuffer, using the default codec. Usually you call
  decode from the OSCPacket
  superclass or directly from the OSCPacketCodec.

Parameters:

b - ByteBuffer pointing right at
                                the beginning of the type
                                declaration section of the
                                OSC message, i.e. the name
                                was skipped before.

Returns:

new OSC message representing
                                the received message described
                                by the ByteBuffer.

Throws:

java.io.IOException - in case some of the
                                                                                reading or decoding procedures failed.

java.lang.IllegalArgumentException - occurs in some cases of buffer underflow

See Also:

OSCPacketCodec.decodeMessage( String, ByteBuffer )

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".PasswordScreen">

    <TextView
        android:id="@+id/applicationName"
        android:layout_width="250dp"
        android:layout_height="0dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center"
        android:layout_weight="1.5"
        android:gravity="center|center_horizontal"
        android:textAlignment="center"
        android:textSize="35sp" />

    <TextView
        android:id="@+id/instructionsField"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:text="@string/passwordScreenInstructions"
        android:layout_weight="1"
        android:gravity="center" />

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:layout_gravity="center">
        <TextView
            android:id="@+id/passwordLengthLabel"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:gravity="center_vertical|center_horizontal"
            android:text="@string/passwordLengthLabel"
            android:textAlignment="center"
            android:textSize="20sp" />
        <NumberPicker
            android:id="@+id/passwordLength"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_alignEnd="@+id/chooseSong"
            android:layout_below="@+id/chooseSong"
            android:layout_gravity="center|bottom"
            android:layout_weight="1"
            android:orientation="vertical"
            android:textColor="#ffffff" />
    </LinearLayout>

    <Button
        android:id="@+id/chooseSong"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_centerHorizontal="true"
        android:layout_weight="1"
        android:onClick="showSongPicker"
        android:text="@string/chooseSong" />

    <Button
        android:id="@+id/generatePassword"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_below="@+id/textView2"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center"
        android:layout_weight="1"
        android:onClick="generatePasswordAndContinue"
        android:text="@string/generate" />

</LinearLayout>


text:
(function () {
    "use strict";

    function forEach(arr, f) {
        for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
    }

    function arrayContains(arr, item) {
        if (!Array.prototype.indexOf) {
            var i = arr.length;
            while (i--) {
                if (arr[i] === item) {
                    return true;
                }
            }
            return false;
        }
        return arr.indexOf(item) != -1;
    }

    CodeMirror.contextHint = function (editor) {
        // Find the token at the cursor
        var cur = editor.getCursor(),
            token = editor.getTokenAt(cur),
            tprop = token;
        // If it's not a 'word-style' token, ignore the token.
        // If it is a property, find out what it is a property of.
        var list = new Array();
        var clist = getCompletions(token, editor);
        for (var i = 0; i < clist.length; i++) {
            list.push({
                str: clist[i],
                type: "context",
                from: {
                    line: cur.line,
                    ch: token.start
                },
                to: {
                    line: cur.line,
                    ch: token.end
                }
            })
        }
        return list;
    }

    // find all 'words' of current cell
    var getAllTokens = function (editor) {
            var found = [];

            // add to found if not already in it

            function maybeAdd(str) {
                if (!arrayContains(found, str)) found.push(str);
            }

            // loop through all token on all lines
            var lineCount = editor.lineCount();
            // loop on line
            for (var l = 0; l < lineCount; l++) {
                var line = editor.getLine(l);
                //loop on char
                for (var c = 1; c < line.length; c++) {
                    var tk = editor.getTokenAt({
                        line: l,
                        ch: c
                    });
                    // if token has a class, it has geat chances of beeing
                    // of interest. Add it to the list of possible completions.
                    // we could skip token of ClassName 'comment'
                    // or 'number' and 'operator'
                    if (tk.className != null) {
                        maybeAdd(tk.string);
                    }
                    // jump to char after end of current token
                    c = tk.end;
                }
            }
            return found;
        }

    function getCompletions(token, editor) {
        var candidates = getAllTokens(editor);
        // filter all token that have a common start (but nox exactly) the lenght of the current token
        var lambda = function (x) {
                return (x.indexOf(token.string) == 0 && x != token.string)
            };
        var filterd = candidates.filter(lambda);
        return filterd;
    }
})();


text:
from django.contrib.auth.models import User
from rest_framework import serializers

class UserSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'groups')

class ProfileSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'first_name', 'last_name', 'groups')


text:
require 'spec_helper'

describe Conpar::Directive::Empty do
  context "::SIGNATURE" do
    subject { Conpar::Directive::Empty::SIGNATURE }
    it "should match ''" do
      expect("").to match(subject)
    end
    it "should match '    '" do
      expect("    ").to match(subject)
    end
  end
end


text:
<?php

declare (strict_types=1);
namespace Rector\PHPUnit\ValueObject;

use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt\Expression;
final class ExpectationMock
{
    /**
     * @var \PhpParser\Node\Expr
     */
    private $expectationVariable;
    /**
     * @var mixed[]
     */
    private $methodArguments;
    /**
     * @var int
     */
    private $index;
    /**
     * @var \PhpParser\Node\Expr|null
     */
    private $expr;
    /**
     * @var mixed[]
     */
    private $withArguments;
    /**
     * @var \PhpParser\Node\Stmt\Expression|null
     */
    private $originalExpression;
    /**
     * @param Variable|PropertyFetch $expectationVariable
     * @param Arg[] $methodArguments
     * @param array<int, null|Expr> $withArguments
     */
    public function __construct(\PhpParser\Node\Expr $expectationVariable, array $methodArguments, int $index, ?\PhpParser\Node\Expr $expr, array $withArguments, ?\PhpParser\Node\Stmt\Expression $originalExpression)
    {
        $this->expectationVariable = $expectationVariable;
        $this->methodArguments = $methodArguments;
        $this->index = $index;
        $this->expr = $expr;
        $this->withArguments = $withArguments;
        $this->originalExpression = $originalExpression;
    }
    /**
     * @return Variable|PropertyFetch
     */
    public function getExpectationVariable() : \PhpParser\Node\Expr
    {
        return $this->expectationVariable;
    }
    /**
     * @return Arg[]
     */
    public function getMethodArguments() : array
    {
        return $this->methodArguments;
    }
    public function getIndex() : int
    {
        return $this->index;
    }
    public function getReturn() : ?\PhpParser\Node\Expr
    {
        return $this->expr;
    }
    /**
     * @return array<int, null|Expr>
     */
    public function getWithArguments() : array
    {
        return $this->withArguments;
    }
    public function getOriginalExpression() : ?\PhpParser\Node\Stmt\Expression
    {
        return $this->originalExpression;
    }
}


text:
package org.openehealth.ipf.commons.ihe.fhir.iti78;

import ca.uhn.fhir.rest.gclient.ICriterion;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.Patient;
import org.openehealth.ipf.commons.ihe.fhir.QueryClientRequestFactory;

/**
 * Request Factory for ITI-78 requests returning a bundle of patients based on query criteria of type
 * {@link ICriterion} or String in the request data
 *
 * @author Christian Ohr
 * @since 3.6
 */
public class Iti78QueryResourceClientRequestFactory extends QueryClientRequestFactory {

    public Iti78QueryResourceClientRequestFactory() {
        super(Patient.class, Bundle.class);
    }
}


text:
<?php
/**
 * SlideDeck Latest Tweets
 *
 * More information on this project:
 * http://www.slidedeck.com/
 *
 * Full Usage Documentation: http://www.slidedeck.com/usage-documentation
 *
 * @package SlideDeck
 * @subpackage SlideDeck 2 Pro for WordPress
 * @author dtelepathy
 */

/*
Copyright 2012 digital-telepathy  (email : support@digital-telepathy.com)

This file is part of SlideDeck.

SlideDeck is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SlideDeck is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SlideDeck.  If not, see <http://www.gnu.org/licenses/>.
*/
?>

    <?php foreach( $formatted_rss_items as $key => $value ): ?>
        <?php
            if( preg_match( '/\/slidedeck/i', $value['permalink'] ) ){
                $icon = 'slidedeck-icon';
            }elseif( preg_match( '/\/dtelepathy/i', $value['permalink'] ) ){
                $icon = 'dtelepathy-icon';
            }
        ?>

<?php echo $value['tweet']; ?>

                            <a class="time-ago" href="<?php echo $value['permalink']; ?>" target="_blank"><div class="icon <?php echo $icon; ?>">
<?php echo $value['time_ago']; ?>

    <?php endforeach; ?>

Prev
Next


text:
include_recipe "homebrewalt::default"
include_recipe "applications::mysql"

homebrewalt_tap "homebrew/dupes"
homebrewalt_tap "homebrew/homebrew-php"

package "php56" do |variable|
    options "--with-mysql --with-apache"
end

%w[ php56-apcu php56-http php56-xdebug php56-memcached php56-symfony-debug php56-mongo php56-yaml php56-imagick php56-twig php56-mcrypt php56-intl php56-pdo-pgsql].each do |pkg|
    package pkg do
        action [:install, :upgrade]
    end
end

template "/usr/local/etc/php/5.6/conf.d/99-extras.ini" do
    source "phpini.erb"
    owner node['current_user']
    mode "0644"
end

template "/etc/apache2/other/php.conf" do
  source "apache_php.erb"
  owner node['current_user']
  mode "0755"
  variables(
    :version => 56
  )
end

include_recipe "applications::php-apps"


text:
typedef enum {
    kChorus,
    kFlanger
} AKModulatedDelayType;


text:
package com.zxinsight.oozie;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;

public class ImpalaUtil {

  private static Logger LOG = LoggerFactory.getLogger(ImpalaUtil.class);

  private static JdbcTemplate jdbcTemplate = null;

  static {
    @SuppressWarnings("resource")
    AbstractApplicationContext context =
        new ClassPathXmlApplicationContext("jdbc-context.xml", ImpalaUtil.class);
    context.registerShutdownHook();

    jdbcTemplate = (JdbcTemplate) context.getBean("jdbcTemplate");

  }

  public static final String ADD_PARTITION =
      "ALTER TABLE %s ADD PARTITION (year='%04d', month='%02d',day='%02d',hour='%02d',type='%s')";

  public void addPartition(String tblName, int year, int month, int day,
      int hour, String type) {

    String addPartitionStatement =
        String.format(ADD_PARTITION, tblName, year, month, day, hour, type);
    LOG.info("going to execute this statement :" + addPartitionStatement);
    try {
      jdbcTemplate.execute(addPartitionStatement);
    } catch (DataAccessException e) {
      LOG.error("data exception occured while trying add partition", e);
    }

  }

}


text: We take software seriously.