text:
<FlexboxLayout flexDirection="column" class="p-15" sdkExampleTitle sdkToggleNavButton>
    <Label text="With our custom directive the grid below will be blue square in iOS and green circle in Android" textWrap="true" class="p-15 m-b-15"></Label>
    <!-- >> custom-directive-html -->
    <GridLayout *sdkIfAndroid width="300" height="300" backgroundColor="#a4c639" borderRadius="150"></GridLayout>
    <GridLayout *sdkIfIos width="300" height="300" backgroundColor="#0099CC" borderRadius="2"></GridLayout>
    <!-- << custom-directive-html -->
</FlexboxLayout>

redpajama_set_name: RedPajamaGithub


text:
import React from 'react';
import { Provider } from 'react-redux';
import { hot } from 'react-hot-loader';
import App from 'containers/App';

const Root = ({ store }) => (
  <Provider store={store}>
    <App />
  </Provider>
);

export default hot(module)(Root);


text:
//-----------------------------------NOTICE----------------------------------//
// Some of this file is automatically filled in by a Python script.  Only    //
// add custom code in the designated areas or it will be overwritten during  //
// the next update.                                                          //
//-----------------------------------NOTICE----------------------------------//

#ifndef _BHKWORLDOBJECT_H_
#define _BHKWORLDOBJECT_H_

//--BEGIN FILE HEAD CUSTOM CODE--//
//--END CUSTOM CODE--//

#include "bhkSerializable.h"

// Include structures
#include "../Ref.h"
namespace Niflib
{
	// Forward define of referenced NIF objects
	class bhkShape;
	class bhkWorldObject;
	typedef Ref<bhkWorldObject> bhkWorldObjectRef;

	/*! Havok objects that have a position in the world? */
	class bhkWorldObject : public bhkSerializable
	{
	public:
		/*! Constructor */
		NIFLIB_API bhkWorldObject();

		/*! Destructor */
		NIFLIB_API virtual ~bhkWorldObject();

		/*!
		 * A constant value which uniquly identifies objects of this type.
		 */
		NIFLIB_API static const Type TYPE;

		/*!
		 * A factory function used during file reading to create an instance of this type of object.
		 * \return A pointer to a newly allocated instance of this type of object.
		 */
		NIFLIB_API static NiObject * Create();

		/*!
		 * Summarizes the information contained in this object in English.
		 * \param[in] verbose Determines whether or not detailed information about large areas of data will be printed out.
		 * \return A string containing a summary of the information within the object in English.  This is the function that Niflyze calls to generate its analysis, so the output is the same.
		 */
		NIFLIB_API virtual string asString(bool verbose = false) const;

		/*!
		 * Used to determine the type of a particular instance of this object.
		 * \return The type constant for the actual type of the object.
		 */
		NIFLIB_API virtual const Type & GetType() const;

		/***Begin Example Naive Implementation****

		// Link to the body for this collision object.
		// \return The current value.
		Ref<bhkShape > GetShape() const;

		// Link to the body for this collision object.
		// \param[in] value The new value.
		void SetShape( Ref<bhkShape > value );

		// Sets mesh color in Oblivion Construction Set.
		// \return The current value.
		OblivionLayer GetLayer() const;

		// Sets mesh color in Oblivion Construction Set.
		// \param[in] value The new value.
		void SetLayer( const OblivionLayer & value );

		// The first bit sets the LINK property and controls whether this body is
		// physically linked to others. The next bit turns collision off. Then, the next
		// bit sets the SCALED property in Oblivion. The next five bits make up the number
		// of this part in a linked body list.
		// \return The current value.
		byte GetColFilter() const;

		// The first bit sets the LINK property and controls whether this body is
		// physically linked to others. The next bit turns collision off. Then, the next
		// bit sets the SCALED property in Oblivion. The next five bits make up the number
		// of this part in a linked body list.
		// \param[in] value The new value.
		void SetColFilter( byte value );

		// Physical purpose of collision object? The setting affects objetct's havok
		// behavior in game.
		// \return The current value.
		SkyrimLayer GetSkyrimLayer() const;

		// Physical purpose of collision object? The setting affects objetct's havok
		// behavior in game.
		// \param[in] value The new value.
		void SetSkyrimLayer( const SkyrimLayer & value );

		// FLAGS are stored in highest 3 bits:
		//                 Bit 7: sets the LINK property and controls whether this body is
		// physically linked to others.
		//                 Bit 6: turns collision off (not used for Layer SKYL_BIPED).
		//                 Bit 5: sets the SCALED property.
		//
		//                 PART NUMBER in a linked body list is stored in lowest 5 bits
		// (used only when Skyrim Layer is set to SKYL_BIPED):
		//                 0 - OTHER
		//                 1 - HEAD
		//                 2 - BODY
		//                 3 - SPINE1
		//                 4 - SPINE2
		//                 5 - LUPPERARM
		//                 6 - LFOREARM
		//                 7 - LHAND
		//                 8 - LTHIGH
		//                 9 - LCALF
		//                 10 - LFOOT
		//                 11 - RUPPERARM
		//                 12 - RFOREARM
		//                 13 - RHAND
		//                 14 - RTHIGH
		//                 15 - RCALF
		//                 16 - RFOOT
		//                 17 - TAIL
		//                 18 - SHIELD
		//                 19 - QUIVER
		//                 20 - WEAPON
		//                 21 - PONYTAIL
		//                 22 - WING
		//                 23 - PACK
		//                 24 - CHAIN
		//                 25 - ADDONHEAD
		//                 26 - ADDONCHEST
		//                 27 - ADDONARM
		//                 28 - ADDONLEG
		//                 29-31 - NULL
		// \return The current value.
		byte GetFlagsAndPartNumber() const;

		// FLAGS are stored in highest 3 bits:
		//                 Bit 7: sets the LINK property and controls whether this body is
		// physically linked to others.
		//                 Bit 6: turns collision off (not used for Layer SKYL_BIPED).
		//                 Bit 5: sets the SCALED property.
		//
		//                 PART NUMBER in a linked body list is stored in lowest 5 bits
		// (used only when Skyrim Layer is set to SKYL_BIPED):
		//                 0 - OTHER
		//                 1 - HEAD
		//                 2 - BODY
		//                 3 - SPINE1
		//                 4 - SPINE2
		//                 5 - LUPPERARM
		//                 6 - LFOREARM
		//                 7 - LHAND
		//                 8 - LTHIGH
		//                 9 - LCALF
		//                 10 - LFOOT
		//                 11 - RUPPERARM
		//                 12 - RFOREARM
		//                 13 - RHAND
		//                 14 - RTHIGH
		//                 15 - RCALF
		//                 16 - RFOOT
		//                 17 - TAIL
		//                 18 - SHIELD
		//                 19 - QUIVER
		//                 20 - WEAPON
		//                 21 - PONYTAIL
		//                 22 - WING
		//                 23 - PACK
		//                 24 - CHAIN
		//                 25 - ADDONHEAD
		//                 26 - ADDONCHEST
		//                 27 - ADDONARM
		//                 28 - ADDONLEG
		//                 29-31 - NULL
		// \param[in] value The new value.
		void SetFlagsAndPartNumber( byte value );

		****End Example Naive Implementation***/

		//--BEGIN MISC CUSTOM CODE--//

		/*!
		 * Retrieves the shape object that this body is using.
		 * \return The shape object being used by this body.
		 */
		NIFLIB_API Ref<bhkShape > GetShape() const;

		/*!
		 * Sets the shape object that this body will use.
		 * \param[in] value The new shape object for this body to use.
		 */
		NIFLIB_API void SetShape(bhkShape * value);

		/*!
		 * Gets the current Oblivion layer, which seems to determine the mesh color displayed by the Oblivion Construction Set.
		 * \return The current Oblivion Layer.
		 */
		NIFLIB_API OblivionLayer GetLayer() const;

		/*!
		 * Sets the Oblivion layer, which seems to determine the mesh color displayed by the Oblivion Construction Set.
		 * \param[in] value The new Oblivoin layer to use.
		 */
		NIFLIB_API void SetLayer(OblivionLayer value);

		// Physical purpose of collision object? The setting affects objetct's havok
		// behavior in game.
		// \return The current value.
		NIFLIB_API SkyrimLayer GetSkyrimLayer() const;

		// Physical purpose of collision object? The setting affects objetct's havok
		// behavior in game.
		// \param[in] value The new value.
		NIFLIB_API void SetSkyrimLayer(SkyrimLayer value);

		//--END CUSTOM CODE--//
	protected:
		/*! Link to the body for this collision object. */
		Ref<bhkShape > shape;
		/*! Sets mesh color in Oblivion Construction Set. */
		OblivionLayer layer;
		/*!
		 * The first bit sets the LINK property and controls whether this body is
		 * physically linked to others. The next bit turns collision off. Then, the next
		 * bit sets the SCALED property in Oblivion. The next five bits make up the number
		 * of this part in a linked body list.
		 */
		byte colFilter;
		/*!
		 * Physical purpose of collision object? The setting affects objetct's havok
		 * behavior in game.
		 */
		SkyrimLayer skyrimLayer;
		/*!
		 * FLAGS are stored in highest 3 bits:
		 *                 Bit 7: sets the LINK property and controls whether this body is
		 * physically linked to others.
		 *                 Bit 6: turns collision off (not used for Layer SKYL_BIPED).
		 *                 Bit 5: sets the SCALED property.
		 *
		 *                 PART NUMBER in a linked body list is stored in lowest 5 bits
		 * (used only when Skyrim Layer is set to SKYL_BIPED):
		 *                 0 - OTHER
		 *                 1 - HEAD
		 *                 2 - BODY
		 *                 3 - SPINE1
		 *                 4 - SPINE2
		 *                 5 - LUPPERARM
		 *                 6 - LFOREARM
		 *                 7 - LHAND
		 *                 8 - LTHIGH
		 *                 9 - LCALF
		 *                 10 - LFOOT
		 *                 11 - RUPPERARM
		 *                 12 - RFOREARM
		 *                 13 - RHAND
		 *                 14 - RTHIGH
		 *                 15 - RCALF
		 *                 16 - RFOOT
		 *                 17 - TAIL
		 *                 18 - SHIELD
		 *                 19 - QUIVER
		 *                 20 - WEAPON
		 *                 21 - PONYTAIL
		 *                 22 - WING
		 *                 23 - PACK
		 *                 24 - CHAIN
		 *                 25 - ADDONHEAD
		 *                 26 - ADDONCHEST
		 *                 27 - ADDONARM
		 *                 28 - ADDONLEG
		 *                 29-31 - NULL
		 */
		byte flagsAndPartNumber;
		/*! Unknown. */
		unsigned short unknownShort;
	public:
		/*! NIFLIB_HIDDEN function.  For internal use only. */
		NIFLIB_HIDDEN virtual void Read(istream& in, list<unsigned int> & link_stack, const NifInfo & info);
		/*! NIFLIB_HIDDEN function.  For internal use only. */
		NIFLIB_HIDDEN virtual void Write(ostream& out, const map<NiObjectRef, unsigned int> & link_map, list<NiObject *> & missing_link_stack, const NifInfo & info) const;
		/*! NIFLIB_HIDDEN function.  For internal use only. */
		NIFLIB_HIDDEN virtual void FixLinks(const map<unsigned int, NiObjectRef> & objects, list<unsigned int> & link_stack, list<NiObjectRef> & missing_link_stack, const NifInfo & info);
		/*! NIFLIB_HIDDEN function.  For internal use only. */
		NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const;
		/*! NIFLIB_HIDDEN function.  For internal use only. */
		NIFLIB_HIDDEN virtual list<NiObject *> GetPtrs() const;
	};

	//--BEGIN FILE FOOT CUSTOM CODE--//
	//--END CUSTOM CODE--//
} //End Niflib namespace
#endif


text:
package org.apache.accumulo.core.security;

import org.apache.accumulo.core.data.ByteSequence;

/**
 * An interface for classes that contain a collection of authorizations.
 */
public interface AuthorizationContainer {
  /**
   * Checks whether this object contains the given authorization.
   *
   * @param auth
   *          authorization, as a string encoded in UTF-8
   * @return true if authorization is in this collection
   */
  boolean contains(ByteSequence auth);
}


text:
"""Reproduce an Light state."""
from __future__ import annotations

import asyncio
import logging
from types import MappingProxyType
from typing import Any, Iterable

from homeassistant.const import (
    ATTR_ENTITY_ID,
    SERVICE_TURN_OFF,
    SERVICE_TURN_ON,
    STATE_OFF,
    STATE_ON,
)
from homeassistant.core import Context, HomeAssistant, State

from . import (
    ATTR_BRIGHTNESS,
    ATTR_BRIGHTNESS_PCT,
    ATTR_COLOR_MODE,
    ATTR_COLOR_NAME,
    ATTR_COLOR_TEMP,
    ATTR_EFFECT,
    ATTR_FLASH,
    ATTR_HS_COLOR,
    ATTR_KELVIN,
    ATTR_PROFILE,
    ATTR_RGB_COLOR,
    ATTR_RGBW_COLOR,
    ATTR_RGBWW_COLOR,
    ATTR_TRANSITION,
    ATTR_WHITE_VALUE,
    ATTR_XY_COLOR,
    COLOR_MODE_COLOR_TEMP,
    COLOR_MODE_HS,
    COLOR_MODE_RGB,
    COLOR_MODE_RGBW,
    COLOR_MODE_RGBWW,
    COLOR_MODE_UNKNOWN,
    COLOR_MODE_XY,
    DOMAIN,
)

_LOGGER = logging.getLogger(__name__)

VALID_STATES = {STATE_ON, STATE_OFF}

ATTR_GROUP = [
    ATTR_BRIGHTNESS,
    ATTR_BRIGHTNESS_PCT,
    ATTR_EFFECT,
    ATTR_FLASH,
    ATTR_WHITE_VALUE,
    ATTR_TRANSITION,
]

COLOR_GROUP = [
    ATTR_HS_COLOR,
    ATTR_COLOR_TEMP,
    ATTR_RGB_COLOR,
    ATTR_RGBW_COLOR,
    ATTR_RGBWW_COLOR,
    ATTR_XY_COLOR,
    # The following color attributes are deprecated
    ATTR_PROFILE,
    ATTR_COLOR_NAME,
    ATTR_KELVIN,
]

COLOR_MODE_TO_ATTRIBUTE = {
    COLOR_MODE_COLOR_TEMP: ATTR_COLOR_TEMP,
    COLOR_MODE_HS: ATTR_HS_COLOR,
    COLOR_MODE_RGB: ATTR_RGB_COLOR,
    COLOR_MODE_RGBW: ATTR_RGBW_COLOR,
    COLOR_MODE_RGBWW: ATTR_RGBWW_COLOR,
    COLOR_MODE_XY: ATTR_XY_COLOR,
}

DEPRECATED_GROUP = [
    ATTR_BRIGHTNESS_PCT,
    ATTR_COLOR_NAME,
    ATTR_FLASH,
    ATTR_KELVIN,
    ATTR_PROFILE,
    ATTR_TRANSITION,
]

DEPRECATION_WARNING = (
    "The use of other attributes than device state attributes is deprecated and will be removed in a future release. "
    "Invalid attributes are %s. Read the logs for further details: https://www.home-assistant.io/integrations/scene/"
)

async def _async_reproduce_state(
    hass: HomeAssistant,
    state: State,
    *,
    context: Context | None = None,
    reproduce_options: dict[str, Any] | None = None,
) -> None:
    """Reproduce a single state."""
    cur_state = hass.states.get(state.entity_id)

    if cur_state is None:
        _LOGGER.warning("Unable to find entity %s", state.entity_id)
        return

    if state.state not in VALID_STATES:
        _LOGGER.warning(
            "Invalid state specified for %s: %s", state.entity_id, state.state
        )
        return

    # Warn if deprecated attributes are used
    deprecated_attrs = [attr for attr in state.attributes if attr in DEPRECATED_GROUP]
    if deprecated_attrs:
        _LOGGER.warning(DEPRECATION_WARNING, deprecated_attrs)

    # Return if we are already at the right state.
    if cur_state.state == state.state and all(
        check_attr_equal(cur_state.attributes, state.attributes, attr)
        for attr in ATTR_GROUP + COLOR_GROUP
    ):
        return

    service_data: dict[str, Any] = {ATTR_ENTITY_ID: state.entity_id}

    if reproduce_options is not None and ATTR_TRANSITION in reproduce_options:
        service_data[ATTR_TRANSITION] = reproduce_options[ATTR_TRANSITION]

    if state.state == STATE_ON:
        service = SERVICE_TURN_ON
        for attr in ATTR_GROUP:
            # All attributes that are not colors
            if attr in state.attributes:
                service_data[attr] = state.attributes[attr]

        if (
            state.attributes.get(ATTR_COLOR_MODE, COLOR_MODE_UNKNOWN)
            != COLOR_MODE_UNKNOWN
        ):
            # Remove deprecated white value if we got a valid color mode
            service_data.pop(ATTR_WHITE_VALUE, None)
            color_mode = state.attributes[ATTR_COLOR_MODE]
            if color_attr := COLOR_MODE_TO_ATTRIBUTE.get(color_mode):
                if color_attr not in state.attributes:
                    _LOGGER.warning(
                        "Color mode %s specified but attribute %s missing for: %s",
                        color_mode,
                        color_attr,
                        state.entity_id,
                    )
                    return
                service_data[color_attr] = state.attributes[color_attr]
        else:
            # Fall back to Choosing the first color that is specified
            for color_attr in COLOR_GROUP:
                if color_attr in state.attributes:
                    service_data[color_attr] = state.attributes[color_attr]
                    break

    elif state.state == STATE_OFF:
        service = SERVICE_TURN_OFF

    await hass.services.async_call(
        DOMAIN, service, service_data, context=context, blocking=True
    )

async def async_reproduce_states(
    hass: HomeAssistant,
    states: Iterable[State],
    *,
    context: Context | None = None,
    reproduce_options: dict[str, Any] | None = None,
) -> None:
    """Reproduce Light states."""
    await asyncio.gather(
        *(
            _async_reproduce_state(
                hass, state, context=context, reproduce_options=reproduce_options
            )
            for state in states
        )
    )

def check_attr_equal(
    attr1: MappingProxyType, attr2: MappingProxyType, attr_str: str
) -> bool:
    """Return true if the given attributes are equal."""
    return attr1.get(attr_str) == attr2.get(attr_str)


text:
Rediger album rettigheter

Dette skjmbildet er kun tilgjengelig for private album. Her kan du velge brukere og grupper autorisert for et album.

Grupper

Du kan nekte eller gi tilgang for grupper til gjeldende album. Ved å modifisere gruppe rettigheter, vil brukerens gruppetillhørighet bestemme om de blir nektet eller gitt tilgang til albumet.

Brukere

Du kan nekte eller gi tilgang til individuelle brukere. Brukere som har tilgang gjennom en gruppe kan bli nektet tilgang ved å sette unntak.


text:
<?php
namespace Sule\Addressing;

/**
 * Part of the Addressing package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the MIT License.
 *
 * This source file is subject to the MIT License that is
 * bundled with this package in the LICENSE file.  It is also available at
 * the following URL: http://opensource.org/licenses/MIT
 *
 * @package    Addressing
 * @version    1.0.0
 * @author     Sulaeman <me@sulaeman.com>
 * @license    MIT License
 */

class InvalidDataException extends \UnexpectedValueException {}

class AddressNotFoundException extends \OutOfBoundsException {}
class AddressExistsException extends \UnexpectedValueException {}
class AddressCreateException extends \RuntimeException {}

class CountryNotFoundException extends \OutOfBoundsException {}
class CountryExistsException extends \UnexpectedValueException {}
class CountryCreateException extends \RuntimeException {}

class ProvinceNotFoundException extends \OutOfBoundsException {}
class ProvinceExistsException extends \UnexpectedValueException {}
class ProvinceCreateException extends \RuntimeException {}

class ZoneNotFoundException extends \OutOfBoundsException {}
class ZoneExistsException extends \UnexpectedValueException {}
class ZoneCreateException extends \RuntimeException {}


text:
"""
Test suite for pptx.text.fonts module
"""

from __future__ import absolute_import, print_function, unicode_literals

import io
import pytest

from struct import calcsize

from pptx.compat import BytesIO
from pptx.text.fonts import (
    _BaseTable, _Font, FontFiles, _HeadTable, _NameTable, _Stream,
    _TableFactory
)

from ..unitutil.file import test_file_dir, testfile
from ..unitutil.mock import (
    call, class_mock, function_mock, initializer_mock, instance_mock,
    method_mock, open_mock, property_mock, var_mock
)

class DescribeFontFiles(object):

    def it_can_find_a_system_font_file(self, find_fixture):
        family_name, is_bold, is_italic, expected_path = find_fixture
        path = FontFiles.find(family_name, is_bold, is_italic)
        assert path == expected_path

    def it_catalogs_the_system_fonts_to_help_find(self, installed_fixture):
        expected_call_args, expected_values = installed_fixture
        installed_fonts = FontFiles._installed_fonts()
        assert FontFiles._iter_font_files_in.call_args_list == (
            expected_call_args
        )
        assert installed_fonts == expected_values

    def it_generates_font_dirs_to_help_find(self, font_dirs_fixture):
        expected_values = font_dirs_fixture
        font_dirs = FontFiles._font_directories()
        assert font_dirs == expected_values

    def it_knows_os_x_font_dirs_to_help_find(self, osx_dirs_fixture):
        expected_dirs = osx_dirs_fixture
        font_dirs = FontFiles._os_x_font_directories()
        assert font_dirs == expected_dirs

    def it_knows_windows_font_dirs_to_help_find(self, win_dirs_fixture):
        expected_dirs = win_dirs_fixture
        font_dirs = FontFiles._windows_font_directories()
        assert font_dirs == expected_dirs

    def it_iterates_over_fonts_in_dir_to_help_find(self, iter_fixture):
        directory, _Font_, expected_calls, expected_paths = iter_fixture
        paths = list(FontFiles._iter_font_files_in(directory))

        print(directory)

        assert _Font_.open.call_args_list == expected_calls
        assert paths == expected_paths

    # fixtures ---------------------------------------------

    @pytest.fixture(params=[
        ('Foobar', False, False, 'foobar.ttf'),
        ('Foobar', True,  False, 'foobarb.ttf'),
        ('Barfoo', False, True,  'barfooi.ttf'),
    ])
    def find_fixture(self, request, _installed_fonts_):
        family_name, is_bold, is_italic, expected_path = request.param
        return family_name, is_bold, is_italic, expected_path

    @pytest.fixture(params=[
        ('darwin', ['a', 'b']),
        ('win32',  ['c', 'd']),
    ])
    def font_dirs_fixture(
            self, request, _os_x_font_directories_,
            _windows_font_directories_):
        platform, expected_dirs = request.param
        dirs_meth_mock = {
            'darwin': _os_x_font_directories_,
            'win32':  _windows_font_directories_,
        }[platform]
        sys_ = var_mock(request, 'pptx.text.fonts.sys')
        sys_.platform = platform
        dirs_meth_mock.return_value = expected_dirs
        return expected_dirs

    @pytest.fixture
    def installed_fixture(self, _iter_font_files_in_, _font_directories_):
        _font_directories_.return_value = ['d', 'd_2']
        _iter_font_files_in_.side_effect = [
            [(('A', True,  False), 'a.ttf')],
            [(('B', False, True),  'b.ttf')],
        ]
        expected_call_args = [call('d'), call('d_2')]
        expected_values = {
            ('A', True,  False): 'a.ttf',
            ('B', False, True):  'b.ttf',
        }
        return expected_call_args, expected_values

    @pytest.fixture
    def iter_fixture(self, _Font_):
        directory = test_file_dir
        font_file_path = testfile('calibriz.ttf')
        font = _Font_.open.return_value.__enter__.return_value
        font.family_name, font.is_bold, font.is_italic = 'Arial', True, True
        expected_calls = [call(font_file_path)]
        expected_paths = [(('Arial', True, True), font_file_path)]
        return directory, _Font_, expected_calls, expected_paths

    @pytest.fixture
    def osx_dirs_fixture(self, request):
        import os
        os_ = var_mock(request, 'pptx.text.fonts.os')
        os_.path = os.path
        os_.environ = {'HOME': '/Users/fbar'}
        return [
            '/Library/Fonts',
            '/Network/Library/Fonts',
            '/System/Library/Fonts',
            '/Users/fbar/Library/Fonts',
            '/Users/fbar/.fonts',
        ]

    @pytest.fixture
    def win_dirs_fixture(self, request):
        return [r'C:\Windows\Fonts']

    # fixture components -----------------------------------

    @pytest.fixture
    def _Font_(self, request):
        return class_mock(request, 'pptx.text.fonts._Font')

    @pytest.fixture
    def _font_directories_(self, request):
        return method_mock(request, FontFiles, '_font_directories')

    @pytest.fixture
    def _installed_fonts_(self, request):
        _installed_fonts_ = method_mock(
            request, FontFiles, '_installed_fonts'
        )
        _installed_fonts_.return_value = {
            ('Foobar',  False, False): 'foobar.ttf',
            ('Foobar',  True,  False): 'foobarb.ttf',
            ('Barfoo',  False, True):  'barfooi.ttf',
        }
        return _installed_fonts_

    @pytest.fixture
    def _iter_font_files_in_(self, request):
        return method_mock(request, FontFiles, '_iter_font_files_in')

    @pytest.fixture
    def _os_x_font_directories_(self, request):
        return method_mock(request, FontFiles, '_os_x_font_directories')

    @pytest.fixture
    def _windows_font_directories_(self, request):
        return method_mock(request, FontFiles, '_windows_font_directories')

class Describe_Font(object):

    def it_can_construct_from_a_font_file_path(self, open_fixture):
        path, _Stream_, stream_ = open_fixture
        with _Font.open(path) as f:
            _Stream_.open.assert_called_once_with(path)
            assert isinstance(f, _Font)
        stream_.close.assert_called_once_with()

    def it_knows_its_family_name(self, family_fixture):
        font, expected_name = family_fixture
        family_name = font.family_name
        assert family_name == expected_name

    def it_knows_whether_it_is_bold(self, bold_fixture):
        font, expected_value = bold_fixture
        assert font.is_bold is expected_value

    def it_knows_whether_it_is_italic(self, italic_fixture):
        font, expected_value = italic_fixture
        assert font.is_italic is expected_value

    def it_provides_access_to_its_tables(self, tables_fixture):
        font, _TableFactory_, expected_calls, expected_tables = tables_fixture
        tables = font._tables
        assert _TableFactory_.call_args_list == expected_calls
        assert tables == expected_tables

    def it_generates_table_records_to_help_read_tables(self, iter_fixture):
        font, expected_values = iter_fixture
        values = list(font._iter_table_records())
        assert values == expected_values

    def it_knows_the_table_count_to_help_read(self, table_count_fixture):
        font, expected_value = table_count_fixture
        assert font._table_count == expected_value

    def it_reads_the_header_to_help_read_font(self, fields_fixture):
        font, expected_values = fields_fixture
        fields = font._fields
        font._stream.read_fields.assert_called_once_with('>4sHHHH', 0)
        assert fields == expected_values

    # fixtures ---------------------------------------------

    @pytest.fixture(params=[
        ('head', True,  True),
        ('head', False, False),
        ('foob', True,  False),
    ])
    def bold_fixture(self, request, _tables_, head_table_):
        key, is_bold, expected_value = request.param
        head_table_.is_bold = is_bold
        _tables_.return_value = {key: head_table_}
        font = _Font(None)
        return font, expected_value

    @pytest.fixture
    def family_fixture(self, _tables_, name_table_):
        font = _Font(None)
        expected_name = 'Foobar'
        _tables_.return_value = {'name': name_table_}
        name_table_.family_name = expected_name
        return font, expected_name

    @pytest.fixture
    def fields_fixture(self, read_fields_):
        stream = _Stream(None)
        font = _Font(stream)
        read_fields_.return_value = expected_values = ('foob', 42, 64, 7, 16)
        return font, expected_values

    @pytest.fixture(params=[
        ('head', True,  True),
        ('head', False, False),
        ('foob', True,  False),
    ])
    def italic_fixture(self, request, _tables_, head_table_):
        key, is_italic, expected_value = request.param
        head_table_.is_italic = is_italic
        _tables_.return_value = {key: head_table_}
        font = _Font(None)
        return font, expected_value

    @pytest.fixture
    def iter_fixture(self, _table_count_, stream_read_):
        stream = _Stream(None)
        font = _Font(stream)
        _table_count_.return_value = 2
        stream_read_.return_value = (
            b'name' b'xxxx' b'\x00\x00\x00\x2A' b'\x00\x00\x00\x15'
            b'head' b'xxxx' b'\x00\x00\x00\x15' b'\x00\x00\x00\x2A'
        )
        expected_values = [('name', 42, 21), ('head', 21, 42)]
        return font, expected_values

    @pytest.fixture
    def open_fixture(self, _Stream_):
        path = 'foobar.ttf'
        stream_ = _Stream_.open.return_value
        return path, _Stream_, stream_

    @pytest.fixture
    def tables_fixture(
            self, stream_, name_table_, head_table_, _iter_table_records_,
            _TableFactory_):
        font = _Font(stream_)
        _iter_table_records_.return_value = iter([
            ('name', 11, 22),
            ('head', 33, 44),
        ])
        _TableFactory_.side_effect = [name_table_, head_table_]

        expected_calls = [
            call('name', stream_, 11, 22),
            call('head', stream_, 33, 44),
        ]
        expected_tables = {
            'name': name_table_,
            'head': head_table_
        }
        return font, _TableFactory_, expected_calls, expected_tables

    @pytest.fixture
    def table_count_fixture(self, _fields_):
        font = _Font(None)
        _fields_.return_value = (-666, 42)
        expected_value = 42
        return font, expected_value

    # fixture components -----------------------------------

    @pytest.fixture
    def _fields_(self, request):
        return property_mock(request, _Font, '_fields')

    @pytest.fixture
    def head_table_(self, request):
        return instance_mock(request, _HeadTable)

    @pytest.fixture
    def _iter_table_records_(self, request):
        return method_mock(request, _Font, '_iter_table_records')

    @pytest.fixture
    def name_table_(self, request):
        return instance_mock(request, _NameTable)

    @pytest.fixture
    def read_fields_(self, request):
        return method_mock(request, _Stream, 'read_fields')

    @pytest.fixture
    def _Stream_(self, request):
        return class_mock(request, 'pptx.text.fonts._Stream')

    @pytest.fixture
    def stream_(self, request):
        return instance_mock(request, _Stream)

    @pytest.fixture
    def stream_read_(self, request):
        return method_mock(request, _Stream, 'read')

    @pytest.fixture
    def _TableFactory_(self, request):
        return function_mock(request, 'pptx.text.fonts._TableFactory')

    @pytest.fixture
    def _table_count_(self, request):
        return property_mock(request, _Font, '_table_count')

    @pytest.fixture
    def _tables_(self, request):
        return property_mock(request, _Font, '_tables')

class Describe_Stream(object):

    def it_can_construct_from_a_path(self, open_fixture):
        path, open_, _init_, file_ = open_fixture
        stream = _Stream.open(path)
        open_.assert_called_once_with(path, 'rb')
        _init_.assert_called_once_with(file_)
        assert isinstance(stream, _Stream)

    def it_can_be_closed(self, close_fixture):
        stream, file_ = close_fixture
        stream.close()
        file_.close.assert_called_once_with()

    def it_can_read_fields_from_a_template(self, read_flds_fixture):
        stream, tmpl, offset, file_, expected_values = read_flds_fixture
        fields = stream.read_fields(tmpl, offset)
        file_.seek.assert_called_once_with(offset)
        file_.read.assert_called_once_with(calcsize(tmpl))
        assert fields == expected_values

    def it_can_read_bytes(self, read_fixture):
        stream, offset, length, file_, expected_value = read_fixture
        bytes_ = stream.read(offset, length)
        file_.seek.assert_called_once_with(offset)
        file_.read.assert_called_once_with(length)
        assert bytes_ == expected_value

    # fixtures ---------------------------------------------

    @pytest.fixture
    def close_fixture(self, file_):
        stream = _Stream(file_)
        return stream, file_

    @pytest.fixture
    def open_fixture(self, open_, _init_):
        path = 'foobar.ttf'
        file_ = open_.return_value
        return path, open_, _init_, file_

    @pytest.fixture
    def read_fixture(self, file_):
        stream = _Stream(file_)
        offset, length = 42, 21
        file_.read.return_value = 'foobar'
        expected_value = 'foobar'
        return stream, offset, length, file_, expected_value

    @pytest.fixture
    def read_flds_fixture(self, file_):
        stream = _Stream(file_)
        tmpl, offset = b'>4sHH', 0
        file_.read.return_value = b'foob' b'\x00\x2A' b'\x00\x15'
        expected_values = (b'foob', 42, 21)
        return stream, tmpl, offset, file_, expected_values

    # fixture components -----------------------------------

    @pytest.fixture
    def file_(self, request):
        return instance_mock(request, io.RawIOBase)

    @pytest.fixture
    def _init_(self, request):
        return initializer_mock(request, _Stream)

    @pytest.fixture
    def open_(self, request):
        return open_mock(request, 'pptx.text.fonts')

class Describe_TableFactory(object):

    def it_constructs_the_appropriate_table_object(self, fixture):
        tag, stream_, offset, length, TableClass_, TableClass = fixture
        table = _TableFactory(tag, stream_, offset, length)
        TableClass_.assert_called_once_with(tag, stream_, offset, length)
        assert isinstance(table, TableClass)

    # fixtures ---------------------------------------------

    @pytest.fixture(params=['name', 'head', 'foob'])
    def fixture(self, request, stream_):
        tag = request.param
        offset, length = 42, 21
        TableClass, target = {
            'name': (_NameTable, 'pptx.text.fonts._NameTable'),
            'head': (_HeadTable, 'pptx.text.fonts._HeadTable'),
            'foob': (_BaseTable, 'pptx.text.fonts._BaseTable'),
        }[tag]
        TableClass_ = class_mock(request, target)
        return tag, stream_, offset, length, TableClass_, TableClass

    # fixture components -----------------------------------

    @pytest.fixture
    def stream_(self, request):
        return instance_mock(request, _Stream)

class Describe_HeadTable(object):

    def it_knows_whether_the_font_is_bold(self, bold_fixture):
        head_table, expected_value = bold_fixture
        assert head_table.is_bold is expected_value

    def it_knows_whether_the_font_is_italic(self, italic_fixture):
        head_table, expected_value = italic_fixture
        assert head_table.is_italic is expected_value

    def it_reads_its_macStyle_field_to_help(self, macStyle_fixture):
        head_table, expected_value = macStyle_fixture
        assert head_table._macStyle == expected_value

    # fixtures ---------------------------------------------

    @pytest.fixture(params=[
        (0, False),
        (1, True),
    ])
    def bold_fixture(self, request, _macStyle_):
        macStyle, expected_value = request.param
        _macStyle_.return_value = macStyle
        head_table = _HeadTable(None, None, None, None)
        return head_table, expected_value

    @pytest.fixture(params=[
        (5, False),
        (7, True),
    ])
    def italic_fixture(self, request, _macStyle_):
        macStyle, expected_value = request.param
        _macStyle_.return_value = macStyle
        head_table = _HeadTable(None, None, None, None)
        return head_table, expected_value

    @pytest.fixture
    def macStyle_fixture(self):
        bytes_ = (
            b'xxxxyyyy....................................\xF0\xBA........'
        )
        stream = _Stream(BytesIO(bytes_))
        offset, length = 0, len(bytes_)
        head_table = _HeadTable(None, stream, offset, length)
        expected_value = 61626
        return head_table, expected_value

    # fixture components -----------------------------------

    @pytest.fixture
    def _macStyle_(self, request):
        return property_mock(request, _HeadTable, '_macStyle')

class Describe_NameTable(object):

    def it_knows_the_font_family_name(self, family_fixture):
        name_table, expected_value = family_fixture
        family_name = name_table.family_name
        assert family_name == expected_value

    def it_provides_access_to_its_names_to_help_props(self, names_fixture):
        name_table, names_dict = names_fixture
        names = name_table._names
        name_table._iter_names.assert_called_once_with()
        assert names == names_dict

    def it_iterates_over_its_names_to_help_read_names(self, iter_fixture):
        name_table, expected_calls, expected_names = iter_fixture
        names = list(name_table._iter_names())
        assert name_table._read_name.call_args_list == expected_calls
        assert names == expected_names

    def it_reads_the_table_header_to_help_read_names(self, header_fixture):
        names_table, expected_value = header_fixture
        header = names_table._table_header
        assert header == expected_value

    def it_buffers_the_table_bytes_to_help_read_names(self, bytes_fixture):
        name_table, expected_value = bytes_fixture
        table_bytes = name_table._table_bytes
        name_table._stream.read.assert_called_once_with(
            name_table._offset, name_table._length
        )
        assert table_bytes == expected_value

    def it_reads_a_name_to_help_read_names(self, read_fixture):
        name_table, bufr, idx, strs_offset, platform_id = read_fixture[:5]
        encoding_id, name_str_offset, length = read_fixture[5:8]
        expected_value = read_fixture[8]

        name = name_table._read_name(bufr, idx, strs_offset)

        name_table._name_header.assert_called_once_with(bufr, idx)
        name_table._read_name_text.assert_called_once_with(
            bufr, platform_id, encoding_id, strs_offset, name_str_offset,
            length
        )
        assert name == expected_value

    def it_reads_a_name_header_to_help_read_names(self, name_hdr_fixture):
        name_table, bufr, idx, expected_value = name_hdr_fixture
        header = name_table._name_header(bufr, idx)
        assert header == expected_value

    def it_reads_name_text_to_help_read_names(self, name_text_fixture):
        name_table, bufr, platform_id, encoding_id = name_text_fixture[:4]
        strings_offset, name_str_offset, length = name_text_fixture[4:7]
        raw_name, name_ = name_text_fixture[7:]

        name = name_table._read_name_text(
            bufr, platform_id, encoding_id, strings_offset, name_str_offset,
            length
        )

        name_table._raw_name_string.assert_called_once_with(
            bufr, strings_offset, name_str_offset, length
        )
        name_table._decode_name.assert_called_once_with(
            raw_name, platform_id, encoding_id
        )
        assert name is name_

    def it_reads_name_bytes_to_help_read_names(self, raw_fixture):
        name_table, bufr, strings_offset, str_offset = raw_fixture[:4]
        length, expected_bytes = raw_fixture[4:]
        bytes_ = name_table._raw_name_string(
            bufr, strings_offset, str_offset, length
        )
        assert bytes_ == expected_bytes

    def it_decodes_a_raw_name_to_help_read_names(self, decode_fixture):
        name_table, raw_name, platform_id, encoding_id, expected_value = (
            decode_fixture
        )
        name = name_table._decode_name(raw_name, platform_id, encoding_id)
        assert name == expected_value

    # fixtures ---------------------------------------------

    @pytest.fixture
    def bytes_fixture(self, stream_):
        name_table = _NameTable(None, stream_, 42, 360)
        bytes_ = '\x00\x01\x02\x03\x04\x05'
        stream_.read.return_value = bytes_
        expected_value = bytes_
        return name_table, expected_value

    @pytest.fixture(params=[
        (1, 0, b'Foob\x8Ar',                  u'Foobär'),
        (1, 1, b'Foobar',                     None),
        (0, 9, u'Foobär'.encode('utf-16-be'), u'Foobär'),
        (3, 6, u'Foobär'.encode('utf-16-be'), u'Foobär'),
        (2, 0, 'Foobar',                      None),
    ])
    def decode_fixture(self, request):
        platform_id, encoding_id, raw_name, expected_value = request.param
        name_table = _NameTable(None, None, None, None)
        return name_table, raw_name, platform_id, encoding_id, expected_value

    @pytest.fixture(params=[
        ({(0, 1): 'Foobar', (1, 1): 'Barfoo'}, 'Foobar'),
        ({(1, 1): 'Barfoo', (3, 1): 'Farbaz'}, 'Barfoo'),
        ({(3, 1): 'Farbaz', (6, 2): 'BazFoo'}, 'Farbaz'),
        ({(9, 1): 'Foobar', (6, 1): 'Barfoo'}, None),
    ])
    def family_fixture(self, request, _names_):
        names, expected_value = request.param
        name_table = _NameTable(None, None, None, None)
        _names_.return_value = names
        return name_table, expected_value

    @pytest.fixture
    def header_fixture(self, _table_bytes_):
        name_table = _NameTable(None, None, None, None)
        _table_bytes_.return_value = b'\x00\x00\x00\x02\x00\x2A'
        expected_value = (0, 2, 42)
        return name_table, expected_value

    @pytest.fixture
    def iter_fixture(self, _table_header_, _table_bytes_, _read_name):
        name_table = _NameTable(None, None, None, None)
        _table_header_.return_value = (0, 3, 42)
        _table_bytes_.return_value = 'xXx'
        _read_name.side_effect = [
            (0, 1, 'Foobar'),
            (3, 1, 'Barfoo'),
            (9, 9, None),
        ]
        expected_calls = [
            call('xXx', 0, 42),
            call('xXx', 1, 42),
            call('xXx', 2, 42),
        ]
        expected_names = [
            ((0, 1), 'Foobar'),
            ((3, 1), 'Barfoo')
        ]
        return name_table, expected_calls, expected_names

    @pytest.fixture
    def name_hdr_fixture(self):
        name_table = _NameTable(None, None, None, None)
        bufr = (
            b'123456' b'123456789012'
            b'\x00\x00' b'\x00\x01' b'\x00\x02'
            b'\x00\x03' b'\x00\x04' b'\x00\x05'
        )
        idx = 1
        expected_value = (0, 1, 2, 3, 4, 5)
        return name_table, bufr, idx, expected_value

    @pytest.fixture
    def names_fixture(self, _iter_names_):
        name_table = _NameTable(None, None, None, None)
        _iter_names_.return_value = iter([
            ((0, 1), 'Foobar'),
            ((3, 1), 'Barfoo'),
        ])
        names_dict = {(0, 1): 'Foobar', (3, 1): 'Barfoo'}
        return name_table, names_dict

    @pytest.fixture
    def name_text_fixture(self, _raw_name_string_, _decode_name_):
        name_table = _NameTable(None, None, None, None)
        bufr, platform_id, encoding_id, strings_offset = 'xXx', 6, 7, 8
        name_str_offset, length, raw_name = 9, 10, 'Foobar'
        _raw_name_string_.return_value = raw_name
        name_ = _decode_name_.return_value
        return (
            name_table, bufr, platform_id, encoding_id, strings_offset,
            name_str_offset, length, raw_name, name_
        )

    @pytest.fixture
    def raw_fixture(self):
        name_table = _NameTable(None, None, None, None)
        bufr = b'xXxFoobarxXx'
        strings_offset, str_offset, length = 1, 2, 6
        expected_bytes = b'Foobar'
        return (
            name_table, bufr, strings_offset, str_offset, length,
            expected_bytes
        )

    @pytest.fixture
    def read_fixture(self, _name_header, _read_name_text):
        name_table = _NameTable(None, None, None, None)
        bufr, idx, strs_offset, platform_id, name_id = 'buffer', 3, 47, 0, 1
        encoding_id, name_str_offset, length, name = 7, 36, 12, 'Arial'
        _name_header.return_value = (
            platform_id, encoding_id, 666, name_id, length, name_str_offset
        )
        _read_name_text.return_value = name
        expected_value = (platform_id, name_id, name)
        return (
            name_table, bufr, idx, strs_offset, platform_id, encoding_id,
            name_str_offset, length, expected_value
        )

    # fixture components -----------------------------------

    @pytest.fixture
    def _decode_name_(self, request):
        return method_mock(request, _NameTable, '_decode_name')

    @pytest.fixture
    def _iter_names_(self, request):
        return method_mock(request, _NameTable, '_iter_names')

    @pytest.fixture
    def _name_header(self, request):
        return method_mock(request, _NameTable, '_name_header')

    @pytest.fixture
    def _raw_name_string_(self, request):
        return method_mock(request, _NameTable, '_raw_name_string')

    @pytest.fixture
    def _read_name(self, request):
        return method_mock(request, _NameTable, '_read_name')

    @pytest.fixture
    def _read_name_text(self, request):
        return method_mock(request, _NameTable, '_read_name_text')

    @pytest.fixture
    def stream_(self, request):
        return instance_mock(request, _Stream)

    @pytest.fixture
    def _table_bytes_(self, request):
        return property_mock(request, _NameTable, '_table_bytes')

    @pytest.fixture
    def _table_header_(self, request):
        return property_mock(request, _NameTable, '_table_header')

    @pytest.fixture
    def _names_(self, request):
        return property_mock(request, _NameTable, '_names')


text:
SYNONYM

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

#### Published in
Fl. nov. -zel. 186 (1855)

#### Original name
Clavaria flagelliformis Berk., 1855

### Remarks
null


text:
/* Space out content a bit */
body {
	padding-top: 20px;
	padding-bottom: 20px;
}

/* Everything but the jumbotron gets side spacing for mobile first views */
.header,.marketing,.footer {
	padding-right: 15px;
	padding-left: 15px;
}

/* Custom page header */
.header {
	border-bottom: 1px solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
	padding-bottom: 19px;
	margin-top: 0;
	margin-bottom: 0;
	line-height: 40px;
}

/* Custom page footer */
.footer {
	padding-top: 19px;
	color: #777;
	border-top: 1px solid #e5e5e5;
}

/* Customize container */
@media ( min-width : 768px) {
	.container {
		max-width: 730px;
	}
}

.container-narrow>hr {
	margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
	border-bottom: 1px solid #e5e5e5;
}

.jumbotron .btn {
	/*padding: 14px 24px;
	font-size: 21px;*/
}

/* Supporting marketing content */
.marketing {
	margin: 40px 0;
}

.marketing p+h4 {
	margin-top: 28px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
	/* Remove the padding we set earlier */
	.header,.marketing,.footer {
		padding-right: 0;
		padding-left: 0;
	}
	/* Space out the masthead */
	.header {
		margin-bottom: 30px;
	}
	/* Remove the bottom border on the jumbotron for visual effect */
	.jumbotron {
		border-bottom: 0;
	}
}

/* registration error */
.registration-error{
	color:red;
}

.help{
	color:#008000
}

.container .jumbotron {
	min-height:460px;

}

.row.row-left{
	float:left;
	width:40%;
}

.row-right{
	float:right;
	width:70%
}

.btn-cancel{
	background-color:white;
}

.or-label{
	margin-top:20px;
}


text:
/* eslint-disable */

'use strict';

/*::
import type { Fragment, ReaderFragment } from 'relay-runtime';
import type { FragmentType } from "relay-runtime";
declare export opaque type RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$fragmentType: FragmentType;
export type RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$data = {|
  +newsFeed: ?{|
    +edges: ?$ReadOnlyArray<?{|
      +cursor: ?string,
      +node: ?{|
        +feedback: ?{|
          +actors: ?$ReadOnlyArray<?{|
            +name: ?string,
          |}>,
        |},
        +id: string,
      |},
    |}>,
  |},
  +$fragmentType: RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$fragmentType,
|};
export type RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$key = {
  +$data?: RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$data,
  +$fragmentSpreads: RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$fragmentType,
  ...
};
*/

var node/*: ReaderFragment*/ = {
  "argumentDefinitions": [
    {
      "kind": "RootArgument",
      "name": "enableStream"
    }
  ],
  "kind": "Fragment",
  "metadata": null,
  "name": "RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment",
  "selections": [
    {
      "alias": null,
      "args": [
        {
          "kind": "Literal",
          "name": "first",
          "value": 10
        }
      ],
      "concreteType": "NewsFeedConnection",
      "kind": "LinkedField",
      "name": "newsFeed",
      "plural": false,
      "selections": [
        {
          "kind": "Stream",
          "selections": [
            {
              "alias": null,
              "args": null,
              "concreteType": "NewsFeedEdge",
              "kind": "LinkedField",
              "name": "edges",
              "plural": true,
              "selections": [
                {
                  "alias": null,
                  "args": null,
                  "kind": "ScalarField",
                  "name": "cursor",
                  "storageKey": null
                },
                {
                  "alias": null,
                  "args": null,
                  "concreteType": null,
                  "kind": "LinkedField",
                  "name": "node",
                  "plural": false,
                  "selections": [
                    {
                      "alias": null,
                      "args": null,
                      "kind": "ScalarField",
                      "name": "id",
                      "storageKey": null
                    },
                    {
                      "alias": null,
                      "args": null,
                      "concreteType": "Feedback",
                      "kind": "LinkedField",
                      "name": "feedback",
                      "plural": false,
                      "selections": [
                        {
                          "kind": "Stream",
                          "selections": [
                            {
                              "alias": null,
                              "args": null,
                              "concreteType": null,
                              "kind": "LinkedField",
                              "name": "actors",
                              "plural": true,
                              "selections": [
                                {
                                  "alias": "name",
                                  "args": null,
                                  "kind": "ScalarField",
                                  "name": "__name_name_handler",
                                  "storageKey": null
                                }
                              ],
                              "storageKey": null
                            }
                          ]
                        }
                      ],
                      "storageKey": null
                    }
                  ],
                  "storageKey": null
                }
              ],
              "storageKey": null
            }
          ]
        }
      ],
      "storageKey": "newsFeed(first:10)"
    }
  ],
  "type": "Viewer",
  "abstractKey": null
};

if (__DEV__) {
  (node/*: any*/).hash = "df9a99d9c87fbf7fdf13ebbd6b8390c6";
}

module.exports = ((node/*: any*/)/*: Fragment<
  RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$fragmentType,
  RelayModernEnvironmentExecuteWithNestedStreamTestFeedFragment$data,
>*/);


text:
		This package has all the implementation classes for Ant support in Gant.

		<address>Russel Winder</address>

			Last modified: 2010-04-05T08:30+01:00


text:
package com.blossomproject.autoconfigure.ui.api.administration;

import com.blossomproject.autoconfigure.ui.common.privileges.RolePrivilegesConfiguration;
import com.blossomproject.autoconfigure.ui.web.WebInterfaceAutoConfiguration;
import com.blossomproject.core.common.search.SearchEngineImpl;
import com.blossomproject.core.role.RoleDTO;
import com.blossomproject.core.role.RoleService;
import com.blossomproject.ui.api.administration.RolesApiController;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * Created by Maël Gargadennnec on 04/05/2017.
 */
@Configuration
@ConditionalOnClass({RoleService.class, RolesApiController.class})
@ConditionalOnBean(RoleService.class)
@AutoConfigureAfter(WebInterfaceAutoConfiguration.class)
@Import(RolePrivilegesConfiguration.class)
public class ApiAdministrationRoleAutoConfiguration {

  @Bean
  public RolesApiController rolesApiController(RoleService roleService,
    SearchEngineImpl<RoleDTO> searchEngine) {
    return new RolesApiController(roleService, searchEngine);
  }

}


text:
Firefox extension that manages browser setting flags for optimal WebVR support, avoiding the need to make `about:config` changes.

The latest public version of this extension lives on __[addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/mozilla-webvr-enabler/)__.

## Development

We use [`jpm`](https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm), which requires `npm` (`brew install npm`, if you're on OS X).

Then to install the Node dependencies:

```bash
npm install
```

### Building

```bash
npm run xpi
```

### Running

```bash
npm run run
```

#### Testing the `.xpi` without `jpm`

1. If you'd like to test a generated `.xpi` with a different version/build of Firefox, you must first disable the check that allows only signed add-ons to be installed. In Firefox, open `about:config` and change `xpinstall.signatures.required` to `false`.
2. Drag the generated `.xpi` from your file system onto any active browser window in Firefox.
3. Click the "Install" button!

### Publishing

To update this [extension](https://addons.mozilla.org/en-US/firefox/addon/mozilla-webvr-enabler/), first run this command:

```bash
npm run xpi
```

And then [upload the new version to AMO](https://addons.mozilla.org/developers/addon/mozilla-webvr-enabler/versions).


text:
/**
 * DocuSign REST API
 * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
 *
 * OpenAPI spec version: v2.1
 * Contact: devcenter@docusign.com
 *
 * NOTE: This class is auto generated. Do not edit the class manually and submit a new issue instead.
 *
 */

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'));
  } else {
    // Browser globals (root is window)
    if (!root.Docusign) {
      root.Docusign = {};
    }
    root.Docusign.ConnectFailureResult = factory(root.Docusign.ApiClient);
  }
}(this, function(ApiClient) {
  'use strict';

  /**
   * The ConnectFailureResult model module.
   * @module model/ConnectFailureResult
   */

  /**
   * Constructs a new ConnectFailureResult.
   * @alias module:model/ConnectFailureResult
   * @class
   */
  var exports = function() {
    var _this = this;

  };

  /**
   * Constructs a ConnectFailureResult from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from data to obj if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:model/ConnectFailureResult} obj Optional instance to populate.
   * @return {module:model/ConnectFailureResult} The populated ConnectFailureResult instance.
   */
  exports.constructFromObject = function(data, obj) {
    if (data) {
      obj = obj || new exports();

      if (data.hasOwnProperty('configId')) {
        obj['configId'] = ApiClient.convertToType(data['configId'], 'String');
      }
      if (data.hasOwnProperty('configUrl')) {
        obj['configUrl'] = ApiClient.convertToType(data['configUrl'], 'String');
      }
      if (data.hasOwnProperty('envelopeId')) {
        obj['envelopeId'] = ApiClient.convertToType(data['envelopeId'], 'String');
      }
      if (data.hasOwnProperty('status')) {
        obj['status'] = ApiClient.convertToType(data['status'], 'String');
      }
      if (data.hasOwnProperty('statusMessage')) {
        obj['statusMessage'] = ApiClient.convertToType(data['statusMessage'], 'String');
      }
    }
    return obj;
  }

  /**
   * Reserved: TBD
   * @member {String} configId
   */
  exports.prototype['configId'] = undefined;
  /**
   * Reserved: TBD
   * @member {String} configUrl
   */
  exports.prototype['configUrl'] = undefined;
  /**
   * The envelope ID of the envelope status that failed to post.
   * @member {String} envelopeId
   */
  exports.prototype['envelopeId'] = undefined;
  /**
   * Indicates the envelope status. Valid values are:  * sent - The envelope is sent to the recipients.  * created - The envelope is saved as a draft and can be modified and sent later.
   * @member {String} status
   */
  exports.prototype['status'] = undefined;
  /**
   *
   * @member {String} statusMessage
   */
  exports.prototype['statusMessage'] = undefined;

  return exports;
}));


text:
module.exports = function(defaults) {

  const EmberApp = require('ember-cli/lib/broccoli/ember-app');
  const funnel = require('broccoli-funnel');
  const mergeTrees = require('broccoli-merge-trees');
  const babelTranspiler = require('broccoli-babel-transpiler');
  const path = require('path');
  const babelOpts = require('./lib/babel-opts');
  const buildQUnitTree = require('./lib/build-qunit-tree');
  const buildTwiddleVendorTree = require('./lib/build-twiddle-ember-tree');

  const env = EmberApp.env();
  const deployTarget = process.env.DEPLOY_TARGET;
  const isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
  let prepend = null;

  if (isProductionLikeBuild) {
    if (deployTarget === 'production') {
      prepend = process.env.TWIDDLE_ASSET_HOST || '//assets.ember-twiddle.com/';
    }
    if (deployTarget === 'staging') {
      prepend = '//canary-assets.ember-twiddle.com/'
    }
  }

  const blueprintsCode = require('./lib/get-ember-cli-blueprints')();

  let app = new EmberApp(defaults, {
    vendorFiles: {
      'ember-testing.js': null
    },
    SRI: {
      runsIn: "production"
    },
    fingerprint: {
      enabled: isProductionLikeBuild,
      prepend: prepend,
      extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg', 'eot', 'ttf', 'woff', 'woff2', 'ico'],
      exclude: []
    },
    sourcemaps: {
      enabled: !isProductionLikeBuild
    },
    minifyCSS: {
      enabled: isProductionLikeBuild
    },
    minifyJS: {
      enabled: isProductionLikeBuild,
      options: {
        // Fix for minification bug with Uglify & Babel: Babel depends on constructor.name === "Plugin"
        mangle: {
          except: ['Plugin']
        }
      }
    },
    codemirror: {
      modes: ['xml', 'javascript', 'handlebars', 'htmlmixed', 'css'],
      keyMaps: ['emacs', 'sublime', 'vim'],
      addonFiles: ['comment/comment.js']
    },
    'ember-cli-bootstrap-sassy': {
      'js': ['dropdown', 'collapse']
    },
    fileCreator: [
      {
        filename: '/lib/blueprints.js',
        content: blueprintsCode
      }
    ],
    nodeAssets: {
      'path-browser': {
        import: ['path.js']
      },
      '@babel/standalone': {
        import: ['babel.js']
      }
    },
    autoImport: {
      exclude: [
        'babel-plugin-ember-modules-api-polyfill',
        'babel-plugin-debug-macros'
      ]
    },
    'ember-cli-babel': {
      includePolyfill: true
    },

    tests: true,
    hinting: process.env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild
  });

  app.import('vendor/ember/ember-template-compiler.js');
  app.import('vendor/ember/ember-testing.js', {
    type: 'vendor',
    outputFile: 'assets/ember-local-testing.js'
  });
  app.import('vendor/shims/babel.js');
  app.import('vendor/shims/path.js');
  app.import('vendor/drags.js');
  app.import('vendor/bootstrap-dropdown-submenu-fix.css');
  app.import('vendor/hint.css');

  const nodeBuiltins = require('rollup-plugin-node-builtins-brofs');
  const json = require('@rollup/plugin-json');

  app.import('node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js', {
    using: [{
      transformation: 'cjs',
      as: 'babel-plugin-ember-modules-api-polyfill',
      plugins: [nodeBuiltins(), json()]
    }]
  });

  app.import('node_modules/babel-plugin-debug-macros/src/index.js', {
    using: [{
      transformation: 'cjs',
      as: 'babel-plugin-debug-macros',
      plugins: [nodeBuiltins()]
    }]
  });

  let loaderTree = funnel(path.dirname(require.resolve('loader.js')), {
    include: ['**/loader.js'],
    getDestinationPath() {
      return 'assets/loader.js'
    }
  });

  let testLoaderTree = funnel("node_modules/ember-cli-test-loader/addon-test-support", {
    files: ['index.js'],
    getDestinationPath() {
      return "assets/test-loader.js";
    }
  });
  testLoaderTree = babelTranspiler(testLoaderTree, babelOpts());

  let finalQUnitTree = buildQUnitTree(app);

  let twiddleVendorTree = buildTwiddleVendorTree();

  return app.toTree(mergeTrees([
    loaderTree,
    twiddleVendorTree,
    testLoaderTree,
    finalQUnitTree
  ]));
};


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.Internal;

namespace DotMercy {
    public partial class LightMaster : System.Web.UI.MasterPage {
        protected void Page_Load(object sender, EventArgs e) {
        }
    }
}


text:
package com.example.fw;

	import org.openqa.selenium.By;

	public class NavigationHelper extends WebDriverHelperBase
	{
		public NavigationHelper(ApplicationManager manager)
		{
			super(manager);
		}

		public void groupsPage()
		{
			if(!onGroupsPage())
			{
				clickOn(By.linkText("groups"));
			}
		}

		private boolean onGroupsPage()
		{
			if(driver.getCurrentUrl().contains("/group.php") &&	driver.findElements(By.name("new")).size()>0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		public void mainPage()
		{
			if(!onMainPage())
			{
				clickOn(By.linkText("home"));
			}
		}

		private boolean onMainPage()
		{
			return driver.findElements(By.id("maintable")).size()>0;
		}

		public void addnewPage()
		{
			if(!onAddnewPage())
			{
				clickOn(By.linkText("add new"));
			}
		}

		private boolean onAddnewPage()
		{
			if(driver.getCurrentUrl().contains("/edit.php")
			&& driver.findElements(By.xpath(".//input[@value= 'Enter' and @name = 'submit']")).size()>0
			&& driver.findElements(By.xpath(".//select[@name = 'new_group']")).size()>0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}


text:
package com.ljd.news.data.net.api;

import com.ljd.news.data.entity.WeChatNewsEntity;

import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

public interface WeChatNewsApi {
    @GET("/WxNews/Query")
    Observable<WeChatNewsEntity> getGuoNeiNews(@Query("key")String key,
                                               @Query("page")int page,
                                               @Query("rows")int rows,
                                               @Query("keyword")String keyword);
}


text:
using System;

[AttributeUsage(AttributeTargets.Method)]
public class MyAttribute : Attribute
{
	public Type[] Types;
}

public class Test
{
	[MyAttribute(Types = new Type[]{typeof(string), typeof(void)})]
	public static int Main(String[] args) { return 0; }
}


text:
'use strict';

import angular from 'angular';

const directiveName = 'miGlyphicon';

export class GlyphiconDirective {
    constructor() {
        'ngInject';
        this.restrict = 'A';
    }

    _getIconClass(iconId) {
        return `glyphicon-${iconId}`;
    }

    _updateOrCreateChildElement($element, iconId) {
        if (!iconId) {
            return;
        }

        let iElement = $element[0].querySelector('i.glyphicon');
        if (iElement) {
            iElement = angular.element(iElement);
            let oldIconId = iElement.attr('icon-id');
            iElement
                .removeClass(this._getIconClass(oldIconId))
                .attr('icon-id', iconId)
                .addClass(this._getIconClass(iconId));
            return;
        }

        $element.addClass('glyphiconized');

        iElement = angular.element('<i>')
            .attr('icon-id', iconId)
            .addClass('glyphicon')
            .addClass(this._getIconClass(iconId))
            .attr('aria-hidden', true);

        $element.prepend(iElement);
    }

    link($scope, $element, $attrs) {
        $attrs.$observe(directiveName, newValue => this._updateOrCreateChildElement($element, newValue));
        this._updateOrCreateChildElement($element, $attrs.miGlyphicon);
    }
}

export function GlyphiconDirectiveFactory() {
    'ngInject';
    return new GlyphiconDirective();
};

GlyphiconDirectiveFactory.__name__ = directiveName;


text:
@interface GDCAutocompleteFieldEditorDelegateInterceptor ()
@property (strong, nonatomic) NSObject *dummyDelegate;
@end

@implementation GDCAutocompleteFieldEditorDelegateInterceptor

- (instancetype)initWithAutocomplete:(GDCAutocomplete*)ac delegate:(id<NSTextViewDelegate>)d
{
	_autocomplete = ac;
	_interceptedDelegate = d;
	self.dummyDelegate = [[NSObject alloc] init];
	return self;
}

- (NSMethodSignature*)methodSignatureForSelector:(SEL)sel
{
	if (self.interceptedDelegate == nil)
	{
		return [self.dummyDelegate methodSignatureForSelector:sel];
	}

	return [(id)self.interceptedDelegate methodSignatureForSelector:sel];
}

- (void)forwardInvocation:(NSInvocation*)invocation
{
	if (self.interceptedDelegate == nil)
	{
		[invocation invokeWithTarget:self.dummyDelegate];
	}
	else
	{
		[invocation invokeWithTarget:self.interceptedDelegate];
	}
}

- (BOOL)textView:(NSTextView*)aTextView doCommandBySelector:(SEL)aSelector
{
	if ([self.autocomplete textView:aTextView doCommandBySelector:aSelector])
	{
		return YES;
	}

	return [self.interceptedDelegate textView:aTextView doCommandBySelector:aSelector];
}

- (NSString*)description
{
	NSString *d = [NSString stringWithFormat:@"%@ autocomplete: %@ delegate: %@",
				   [super description],
				   self.autocomplete,
				   self.interceptedDelegate];
	return d;
}

@end


text:
This is the source code of the [Hyperfox][1]'s [live visualization tool][2].

## Requisites

* ruby
* rubygems
* nodejs (I know, I know...)
* npm

## Initial setup

```
gem install compass

cd html
npm install

sudo npm install -g bower
sudo npm install -g grunt-cli

bower update
npm install grunt-contrib-compass --save-dev

```

## Development

```
cd html
grunt serve
```

# License (MIT)

> Copyright (c) 2014-2015 José Carlos Nieto, https://menteslibres.net/xiam
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[1]: https://hyperfox.org
[2]: http://live.hyperfox.org


text:
"""

import utils.analysis as ua
p = ua.player("p164480")
t = ua.team("t1326")

p_games = ua.player_list_games(p)
t_games = ua.team_list_games(t)

stats = ua.player_game_stats(p, games[0])

ua.player_statistic_values(p,p_games[0],["passes_left", "accurate_pass", "aerial_won", "aerial_lost", "accurate_back_zone_pass", "accurate_fwd_zone_pass"])
ua.player_statistic_values(p,p_games[0],["passes_left"])

ua.team_statistic_values(t,t_games[0],["passes_left"])
ua.team_statistic_values(t,t_games[0])
"""
import time
import datetime

from eventstatistics.models import EventStatistic
from games.models import Game
from lineups.models import Lineup
from players.models import Player
from playerstatistics.models import PlayerStatistic
from salaries.models import Salary
from statistictypes.models import StatisticType
from teams.models import Team
from teamstatistics.models import TeamStatistic
from venues.models import Venue

"""
PLAYER CENTRIC METHODS
"""
def player(player_uuid):
	"""Return a Player Django instance"""
	return Player.objects.get(uuid=player_uuid)

def player_list_games(player, start_date, end_date):
	"""Return a list of Game instances for a Player input, between a date range"""
	games = []

	for l in Lineup.objects.filter(player=player):
		# print l.game.date
		# print start_date.date()
		# print end_date.date()
		if l.game.date >= start_date.date() and l.game.date <= end_date.date():
			games.append(l.game)

	return sorted(games, key=lambda x: x.date)

def player_game_stats(player, game):
	"""Return all PlayerStatistics for a Player and Game"""
	stats = []

	for stat in PlayerStatistic.objects.filter(game=game).filter(player=player):
		stats.append(stat)

	return stats

def player_statistic_values(player, game, list_desired_stats = None):
	"""Return the PlayerStatistic value(s) (specified or not) for a player / game"""
	#Note: inputting a list of stats at once, as calling game_stats only once
	#will save us dramatically in reducing hits to the database
	stats = player_game_stats(player, game)

	values = {}

	if list_desired_stats:
		for desired_stat in list_desired_stats:
			values[desired_stat] = 0.0

			for s in stats:
				if s.statistic.opta_statistic_type_name == desired_stat:
					values[desired_stat] = s.value
		return values
	else:
		for s in stats:
			values[s.statistic.opta_statistic_type_name] = s.value

		return values

"""
TEAM CENTRIC METHODS
"""
def team(team_uuid):
	"""Return a Team Django instance"""
	return Team.objects.get(uuid=team_uuid)

def team_list_games(team, start_date, end_date):
	"""Return a list of Game instances for a Team input, between two date ranges"""
	games = []

	for g in Game.objects.filter(home_team=team, date__range=[start_date,end_date]) \
				| Game.objects.filter(away_team=team, date__range=[start_date,end_date]):
		games.append(g)

	return sorted(games, key=lambda x: x.date)

def team_game_stats(team, game):
	"""Return all TeamStatistics for a Team and Game"""
	stats = []

	for stat in TeamStatistic.objects.filter(game=game).filter(team=team):
		stats.append(stat)

	return stats

def team_statistic_values(team, game, list_desired_stats=None):
	"""Return the TeamStatistic value(s) (specified or not) for a team / game"""
	#Note: inputting a list of stats at once, as calling game_stats only once
	#will save us dramatically in reducing hits to the database
	stats = team_game_stats(team, game)

	values = {}

	if list_desired_stats:
		for desired_stat in list_desired_stats:
			values[desired_stat] = 0.0

			for s in stats:
				if s.statistic.opta_statistic_type_name == desired_stat:
					values[desired_stat] = s.value

		return values
	else:
		for s in stats:
			values[s.statistic.opta_statistic_type_name] = s.value

		return values

def team_wins(team):
	"""Return a list of Game instances where the Team won"""
	wins = []

	for g in Game.objects.filter(winner=team):
		wins.append(g)

	return wins

def team_losses(team, start_date=datetime.date(1900, 1, 1), end_date=datetime.date(2900, 1, 1)):
	"""Return a list of Game instances where a Team lost"""
	losses = []

	games = team_list_games(team, start_date, end_date)

	for g in games:
		if g.winner == None:
			continue
		elif g.winner == team:
			continue
		else:
			losses.append(g)

	return losses

def team_ties(team, start_date=datetime.date(1900, 1, 1), end_date=datetime.date(2900, 1, 1)):
	"""Return a list of Game instances where a Team tied"""
	ties = []

	games = team_list_games(team, start_date, end_date)

	for g in games:
		if g.winner == None:
			ties.append(g)

	return ties

def team_scoreless_ties(team, start_date=datetime.date(1900, 1, 1), end_date=datetime.date(2900, 1, 1)):
	"""Return a list of Game instances where a Team tied and nobody scored"""
	scoreless_ties = []

	games = team_list_games(team, start_date, end_date)

	for g in games:
		if g.winner == None and g.home_team_score == 0:
			scoreless_ties.append(g)

	return scoreless_ties

def team_game_result(team, game):
	"""Return the final result of the game as it relates to the team"""
	if game.winner == team:
		return "Win"
	elif game.winner and game.winner != team:
		return "Lose"
	elif game.home_team_score > 0:
		return "Tie"
	else:
		return "Scoreless Tie"


text:
#pragma once
// ieee754.hpp: PGI specific manipulation functions for IEEE-754 native types
//
// Copyright (C) 2017-2022 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.

#if defined(__PGI)
/* Portland Group PGCC/PGCPP. ------------------------------- */

namespace sw { namespace universal {

// specializations for IEEE-754 parameters for PGI/NVIDIA C/C++
template<>
class ieee754_parameter<float> {
public:
	static constexpr int      nbits    = 32;
	static constexpr uint64_t smask    = 0x8000'0000ull;
	static constexpr int      ebits    = 8;
	static constexpr int      bias     = 127;
	static constexpr uint64_t emask    = 0x7F80'0000ull;
	static constexpr uint64_t eallset  = 0xFFull;
	static constexpr int      fbits    = 23;
	static constexpr uint64_t hmask    = 0x0080'0000ull;
	static constexpr uint64_t fmask    = 0x007F'FFFFull;
	static constexpr uint64_t hfmask   = 0x00FF'FFFFull;
	static constexpr uint64_t fmsb     = 0x0040'0000ull;
	static constexpr uint64_t qnanmask = 0x7FC0'0000ull;
	static constexpr uint64_t snanmask = 0x7FC0'0001ull;
};
template<>
class ieee754_parameter<double> {
public:
	static constexpr int      nbits    = 64;
	static constexpr uint64_t smask    = 0x8000'0000'0000'0000ull;
	static constexpr int      ebits    = 11;
	static constexpr int      bias     = 1023;
	static constexpr uint64_t emask    = 0x7FF0'0000'0000'0000ull;
	static constexpr uint64_t eallset  = 0x7FF;
	static constexpr int      fbits    = 52;
	static constexpr uint64_t hmask    = 0x0010'0000'0000'0000ull;
	static constexpr uint64_t fmask    = 0x000F'FFFF'FFFF'FFFFull;
	static constexpr uint64_t hfmask   = 0x001F'FFFF'FFFF'FFFFull;
	static constexpr uint64_t fmsb     = 0x0008'0000'0000'0000ull;
	static constexpr uint64_t qnanmask = 0x7FF8'0000'0000'0000ull;
	static constexpr uint64_t snanmask = 0x7FF0'0000'0000'0001ull;
};

	// MSVC long double = double precision
// IEEE-754 parameter constexpressions for long double
template<>
class ieee754_parameter<long double> {
public:
	static constexpr int      nbits    = 64;
	static constexpr uint64_t smask    = 0x8000'0000'0000'0000ull;
	static constexpr int      ebits    = 11;
	static constexpr int      bias     = 1023;
	static constexpr uint64_t emask    = 0x7FF0'0000'0000'0000ull;
	static constexpr uint64_t eallset  = 0x7FF;
	static constexpr int      fbits    = 52;
	static constexpr uint64_t hmask    = 0x0010'0000'0000'0000ull;
	static constexpr uint64_t fmask    = 0x000F'FFFF'FFFF'FFFFull;
	static constexpr uint64_t hfmask   = 0x001F'FFFF'FFFF'FFFFull;
	static constexpr uint64_t fmsb     = 0x0008'0000'0000'0000ull;
	static constexpr uint64_t qnanmask = 0x7FF8'0000'0000'0000ull;
	static constexpr uint64_t snanmask = 0x7FF0'0000'0000'0001ull;
};

}} // namespace sw::universal

#endif // Portland Group PGCC/PGCPP


text: Should alert "PASS".


text:
module ManageIQ::Providers::CloudManager::ProvisionWorkflow::DialogFieldValidation
  def validate_cloud_subnet(field, values, dlg, fld, value)
    return nil unless value.blank?
    return nil if get_value(values[:cloud_network]).to_i.zero?
    return nil unless get_value(values[field]).blank?
    "#{required_description(dlg, fld)} is required"
  end
end


text:
using System;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.CodeDom.Compiler;
using Splunk.Client;
using System.Reactive;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace SplunkSearch
{
	partial class SearchViewController : UIViewController
	{
        private List<EventViewModel> _items;
        private SearchResultStream _searchResults;
        private IDisposable _subscription;
        private long count = 0;

		public SearchViewController (IntPtr handle) : base (handle)
		{

        }

        public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();
        }

        public override void TouchesBegan (NSSet touches, UIEvent evt)
        {
            QueryText.ResignFirstResponder ();
        }

        async partial void SearchButton_TouchUpInside (UIButton sender)
        {
            ActivityIndicator.StartAnimating();
            _items = new List<EventViewModel> ();
            Application.Items = _items;
            ResultsTable.Source = null;
            ResultsTable.Source = new ResultsTableSource (_items);

            SearchButton.Enabled = false;
            CancelButton.Enabled = true;
            QueryText.ResignFirstResponder ();
            count = 1;

            UIAlertView alert;
            try {
                var service = Application.Service;
                if (service == null)
                  service = await Application.InitializeService();

                _searchResults = await service.ExportSearchResultsAsync("search " + QueryText.Text);

                var observer = Observer.Create<SearchResult>(
                    r=> {
                        _items.Add(new EventViewModel(r));
                        BeginInvokeOnMainThread(
                            delegate {
                                ResultsTable.ReloadData();
                                CountLabel.Text = string.Format("({0})", count++);
                            }
                        );
                    },
                    ex => {
                        if (ex is TaskCanceledException) {
                            return;
                        }
                        throw ex;
                    },
                    ()=> {
                        _searchResults.Dispose();
                        BeginInvokeOnMainThread(
                            delegate {
                                SearchButton.Enabled = true;
                                CancelButton.Enabled = false;
                                ActivityIndicator.StopAnimating();
                            }
                        );
                        if (_items.Count > 0) {
                            if (_items[0].IsStats) {
                                Application.EnableChart();
                                return;
                            }
                        }

                        Application.DisableChart();
                    }
                );
                _searchResults.Subscribe(observer);
            }
            catch(Exception ex) {
                alert = new UIAlertView("Error", ex.Message, null, "OK");
                alert.Show();
                SearchButton.Enabled = true;
                CancelButton.Enabled = false;
                ActivityIndicator.StopAnimating();
                return;
            }

        }

        partial void CancelButton_TouchUpInside (UIButton sender)
        {
            SearchButton.Enabled = true;
            CancelButton.Enabled = false;
            ActivityIndicator.StopAnimating();

            if (_subscription != null) {
                try {
                    _subscription.Dispose();
                }catch{};
                _subscription = null;
            }

            if (_searchResults != null) {
                try {
                    _searchResults.Dispose();
                }
                catch{};
                _searchResults = null;
            }
        }
	}
}


text:
package net.automatalib.commons.util.mappings;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.google.common.collect.Collections2;
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * Collection of various methods dealing with {@link Mapping}s.
 *
 * @author Malte Isberner
 */
public final class Mappings {

    private static final Mapping<?, ?> NULL_MAPPING = (Mapping<Object, @Nullable Object>) elem -> null;

    private static final Mapping<?, ?> IDENTITY_MAPPING = (Mapping<Object, Object>) elem -> elem;

    private static final Mapping<?, String> TOSTRING_MAPPING = (Mapping<Object, String>) String::valueOf;

    // Prevent instantiation
    private Mappings() {}

    /**
     * Retrieves the null mapping, which maps each domain value to null.
     *
     * @param <D>
     *         domain class.
     * @param <R>
     *         range class.
     *
     * @return the null mapping.
     */
    @SuppressWarnings("unchecked")
    public static <D, R> Mapping<D, R> nullMapping() {
        return (Mapping<D, R>) NULL_MAPPING;
    }

    /**
     * Retrieves the identity mapping, which maps each domain value to itself.
     *
     * @param <T>
     *         domain/range class.
     *
     * @return the identity mapping.
     */
    @SuppressWarnings("unchecked")
    public static <T> Mapping<T, T> identity() {
        return (Mapping<T, T>) IDENTITY_MAPPING;
    }

    /**
     * Returns a mapping that maps objects to their {@link String} representation, as obtained by {@link
     * String#valueOf(Object)}.
     *
     * @return the "{@code toString()}" mapping
     */
    @SuppressWarnings("unchecked")
    public static <D> Mapping<D, String> toStringMapping() {
        return (Mapping<D, String>) TOSTRING_MAPPING;
    }

    /**
     * Returns a mapping that maps objects to a supertype representation.
     *
     * @return the "upcast" mapping
     */
    @SuppressWarnings("unchecked")
    public static <S, T extends S> Mapping<T, S> upcast() {
        return (Mapping<T, S>) IDENTITY_MAPPING;
    }

    /**
     * Retrieves the composition of two mappings, i.e., that mapping that results from applying the {@link
     * Mapping#get(Object)} method consecutively.
     *
     * @param <D>
     *         domain class of the first (and resulting) mapping.
     * @param
     *         intermediate object class, range class of the first and domain class of the second mapping.
     * @param <R>
     *         range class of the second (and resulting) mapping.
     * @param first
     *         first mapping.
     * @param second
     *         second mapping.
     *
     * @return the composed mapping.
     */
    public static <D, I, R> Mapping<D, R> compose(Mapping<D, ? extends I> first, Mapping<? super I, R> second) {
        return new MappingComposition<D, I, R>(first, second);
    }

    /**
     * Applies a mapping to a collection, resulting in a collection containing the result of applying the specified
     * mapping to each element in the collection.
     *

     * Note that more specific properties of the specified collection won't be preserved: If the given collection is
     * e.g. a set, and the provided mapping is not bijective, then the resulting collections may contain some values
     * multiple times.
     *
     * @param <D>
     *         domain class.
     * @param <R>
     *         range class.
     * @param mapping
     *         the mapping to apply.
     * @param coll
     *         the collection.
     *
     * @return the mapped collection.
     */
    public static <D, R> Collection<R> apply(final Mapping<? super D, R> mapping, final Collection<? extends D> coll) {
        return Collections2.transform(coll, mapping::get);
    }

    /**
     * Applies a mapping to an iterator. For the behavior, see {@link #apply(Mapping, Iterable)}. The resulting iterator
     * supports each operation which the underlying supports.
     *
     * @param <D>
     *         domain class.
     * @param <R>
     *         range class.
     * @param mapping
     *         the mapping to apply.
     * @param baseIt
     *         the underlying iterator.
     *
     * @return the mapped iterator.
     */
    public static <D, R> Iterator<R> apply(Mapping<? super D, R> mapping, Iterator<? extends D> baseIt) {
        return Iterators.transform(baseIt, mapping::get);
    }

    /**
     * Applies a mapping to a list, resulting in a list containing the result of applying the specified mapping to each
     * element in the list.
     *
     * @param mapping
     *         the mapping to apply.
     * @param list
     *         the list.
     *
     * @return the mapped list.
     */
    public static <D, R> List<R> apply(final Mapping<? super D, R> mapping, final List<? extends D> list) {
        return Lists.transform(list, mapping::get);
    }

    /**
     * Applies a mapping to an iterable. The result is an iterable whose iterator returns the results of applying the
     * specified mapping to each of the elements returned by the original iterable.
     *
     * @param <D>
     *         domain class.
     * @param <R>
     *         range clas.
     * @param mapping
     *         the mapping to apply.
     * @param it
     *         the underlying iterable.
     *
     * @return the mapped iterable.
     */
    public static <D, R> Iterable<R> apply(final Mapping<? super D, R> mapping, final Iterable<? extends D> it) {
        return Iterables.transform(it, mapping::get);
    }

    public static <D> D idGet(Mapping<D, D> mapping, D key) {
        return safeGet(mapping, key, key);
    }

    /**
     * Safely retrieves a value from a mapping. If the mapping is null or returns a null
     * value, the given fallback value is returned.
     *
     * @param mapping
     *         the mapping.
     * @param key
     *         the key.
     * @param fallback
     *         the fallback value to return if either the mapping or the originally returned value are
     *         null.
     *
     * @return the value returned by the specified mapping, or the fallback value.
     */
    public static <D, R> R safeGet(@Nullable Mapping<? super D, ? extends R> mapping, D key, R fallback) {
        if (mapping == null) {
            return fallback;
        }
        R val = mapping.get(key);
        if (val == null) {
            return fallback;
        }
        return val;
    }

    public static <D, R> @Nullable R nullGet(@Nullable Mapping<? super D, ? extends R> mapping, D key) {
        return safeGet(mapping, key, null);
    }

    public static <D, R> Mapping<D, R> fromMap(Map<D, R> map) {
        return new MapMapping<>(map);
    }

    public static Mapping<String, Long> stringToIndex() {
        return StringIndexMapping::stringToIndex;
    }

    public static Mapping<Long, String> indexToString() {
        return StringIndexMapping::indexToString;
    }
}


text:
MatMat - inteligentní procvičování matematiky

                {{ concept.name }}
                Podoblasti »

                {{ subConcept.name }}

        Pro pokročilejší témata z matematiky vyzkoušejte Umíme matiku
        ×

Procvičování matematiky

        MatMat nabízí procvičování základoškolské matematiky,
        které vede k osvojení a zautomatizování základních matematických dovedností:
        počítání do 10, číselná osa, sčítání a odčítání do 100, malá násobilka, celočíselné dělení a další.

Matematika hrou

        Procvičování počítání s grafikou přívětivou k dětem, s bezprostředním
        hodnocením a drobnými odměnami (diamanty).

Adaptabilní procvičování

        MatMat se přizpůsobuje každému dítěti zvlášť - podle toho, jaké má vědomosti, MatMat volí vhodně těžké otázky.
        Systém tak předkládá otázky, jejichž procvičení je pro děti nejužitečnější.

Pravidelné aktualizace

        Stéle na MatMatu pracujeme a ten je každým týdnem lepší a lepší.
        Momentálně jsme v testovací verzi a tak můžete čekat velké změny již brzy.

Vizualizace znalostí

        Na základě odpovědí MatMat odhadne, jak dobře děti ovládají různé matematické dovedeností, a přehledně je znázorní.
        To jim pomůže ujasnit si, co jim vlastně jde a kde mají slabiny.

Podpora pro učitele a rodiny

        MatMat umožňuje pod jedním uživatelským účtem vést více dětí.
        Ty pak snadno mohou cvičit matematiku ušitou na míru každého z nich.

Zdarma a bez reklam

        MatMat je výzkumný projekt vyvíjený na Masarykově univerzitě.
        Za použití systému neplatíte, děti neobtěžují žádné reklamy a používání projektu pomáhá podporovat vědu.


text:
layout: page
weight: 0
title: SendGrid and Sendwithus
breadcrumbs: true
navigation:
  show: true
---

<meta itemprop="name" content="{{ page.title }}">

### SendGrid and Sendwithus

Want to learn more about Sendwithus through SendGrid? Join Matt and Matt in this video tutorial to learn how to set this up, and learn about some of the powerful tools that are available to you.


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<artifactId>common</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<parent>
		<artifactId>parent</artifactId>
		<groupId>com.zeus</groupId>
		<version>1.0-SNAPSHOT</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.4.8</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.5.1</version>
		</dependency>
	</dependencies>
</project>


text:
using System;

using WatchKit;
using Foundation;
using Hue.Core;

namespace HueWatchSample.iPhoneWatchKitExtension
{
	public partial class LightDetailController : WKInterfaceController
	{
		Light _light;
		bool _onOffSwitch;

		public LightDetailController (IntPtr handle) : base (handle)
		{
		}

		public override void Awake (NSObject context)
		{
			base.Awake (context);

			// Configure interface objects here.
			Console.WriteLine ("{0} awake with context", this);

			_light = ((NSObjectWrapper<Light>)context).Context;

			this.lightNameLabel.SetText (_light.Description);

			_onOffSwitch = _light.On;
			this.onOffSwitch.SetOn (_onOffSwitch);

			this.brightnessSlider.SetValue (_light.Brightness);
		}

		public override void WillActivate ()
		{
			// This method is called when the watch view controller is about to be visible to the user.
			Console.WriteLine ("{0} will activate", this);
		}

		public override void DidDeactivate ()
		{
			// This method is called when the watch view controller is no longer visible to the user.
			Console.WriteLine ("{0} did deactivate", this);
		}

		partial void voiceInputButton_Activated (WKInterfaceButton sender)
		{
			PresentTextInputController (new string[5] {"Turn Off", "Turn On", "Brightness Low", "Brightness Medium", "Brightness High"},
										WatchKit.WKTextInputMode.Plain,
									    (result) => {
				// action when the "text input" is complete
				if (result != null && result.Count > 0) {
					var dictatedText = result.GetItem<NSObject>(0).ToString();
					Console.WriteLine (dictatedText);
					this.ProcessTextCommand(dictatedText);
				}
			});
		}

		private void ToggleSwitchState()
		{
			_onOffSwitch = !_onOffSwitch;
		}

		partial void onOffSwitch_Activated (WKInterfaceSwitch sender)
		{
			this.ToggleSwitchState();
			HueConnector.GetConnector().FlipSwitch(_light, _onOffSwitch);
		}

		private void ProcessTextCommand(string textCommand)
		{
			if (textCommand.ToLower().Contains("on"))
				HueConnector.GetConnector().FlipSwitch(_light, true);

			if (textCommand.ToLower().Contains("off"))
				HueConnector.GetConnector().FlipSwitch(_light, false);

			if (textCommand.ToLower().Contains("low"))
				HueConnector.GetConnector().AdjustBrightness(_light, 80);

			if (textCommand.ToLower().Contains("medium"))
				HueConnector.GetConnector().AdjustBrightness(_light, 170);

			if (textCommand.ToLower().Contains("high"))
				HueConnector.GetConnector().AdjustBrightness(_light, 255);
		}

//		[Action ("sliderAction:")]
//		void SliderAction (Single value)
//		{
//			Console.WriteLine ("Slider value is now: {0}", value);
//		}
	}
}


text:
package org.jboss.weld.tests.extensions;

public class FatController {

}


text:
import {
  suite,
  test,
  assert,
  assertArrayEquals,
  setup,
  teardown
} from '../../unit/unitTestRunner.js';

import {InternalLoader} from '../../../src/loader/InternalLoader.js';

function createLoaderAgainstMocks(depsByName) {
  let calls = [];
  let mockLoader = {
    normalize: function(name) {
      calls.push('normalize ' + name);
      return name;
    },
    get: function(name) {
      calls.push('get ' + name);
      return undefined;
    },
    locate: function(codeUnit) {
      calls.push('locate ' + codeUnit.normalizedName);
      return codeUnit.normalizedName;  // The fetch will be faked.
    },
    fetch: function(codeUnit) {
      calls.push('fetch ' + codeUnit.normalizedName);
      return Promise.resolve('text');
    },
    nameTrace: function() {
      throw new Error('test should not call');
    },
    translate: function(codeUnit) {
      calls.push('translate ' + codeUnit.normalizedName);
      return codeUnit.source;
    },
    instantiate: function(codeUnit) {
      calls.push('instantiate ' + codeUnit.normalizedName);
    }
  };

  let mockLoaderCompiler = {
    getModuleSpecifiers: function(codeUnit) {
      calls.push('getModuleSpecifiers ' + codeUnit.normalizedName);
      let name = codeUnit.normalizedName;
      let deps = depsByName[name];
      if (!deps) {
        throw new Error('unexpected codeUnit ' + codeUnit);
      }
      return deps;
    },
    analyzeDependencies: function(units) {
      calls.push('analyzeDependencies ' + units.length);
    },
    transform: function(codeUnit) {
      calls.push('transform ' + codeUnit.normalizedName);
    },
    write: function(codeUnit) {
      calls.push('write ' + codeUnit.normalizedName);
      codeUnit.metadata.compiler = {};
    },
    evaluateCodeUnit: function(codeUnit) {
      calls.push('evaluateCodeUnit ' + codeUnit.normalizedName);
    }
  };
  let loader = new InternalLoader(mockLoader, mockLoaderCompiler);
  return {calls, loader};
}

function loadAndCheck(depsByName, expectedCalls, done) {
  let {calls, loader} = createLoaderAgainstMocks(depsByName);

  loader.load('foo').then((codeUnit) => {
    assert(codeUnit.normalizedName === 'foo');
    // This kind of log is very handy:
    // console.log('calls ', '[\n\'' + calls.join('\',\n\'') + '\'\n]');
    assertArrayEquals(calls, expectedCalls);
    done();
  }).catch(done);
}

suite('InternalLoader.js', function() {

  test('load no deps', function(done) {
    let depsByName = {
      foo: []
    };
    let expectedCalls = [
      'normalize foo',
      'get foo',
      'locate foo',
      'fetch foo',
      'translate foo',
      'getModuleSpecifiers foo',
      'analyzeDependencies 1',
      'transform foo',
      'write foo',
      'instantiate foo',
      'evaluateCodeUnit foo'
    ];

    loadAndCheck(depsByName, expectedCalls, done);
  });

  test('load with deps', function(done) {
    let depsByName  = {
      foo: ['bar'],
      bar: []
    };

    let expectedCalls = [
      'normalize foo',
      'get foo',
      'locate foo',
      'fetch foo',
      'translate foo',
      'getModuleSpecifiers foo',
      'normalize bar',
      'get bar',
      'locate bar',
      'fetch bar',
      'translate bar',
      'getModuleSpecifiers bar',
      'analyzeDependencies 2',
      'transform bar',
      'write bar',
      'instantiate bar',
      'transform foo',
      'write foo',
      'instantiate foo',
      'evaluateCodeUnit bar',
      'evaluateCodeUnit foo'
    ];

    loadAndCheck(depsByName, expectedCalls, done);
  });

test('load with unordered deps', function(done) {
    let depsByName  = {
      foo: ['bar', 'baz'],
      baz: ['bar'],
      bar: []
    };

    let expectedCalls = [
      'normalize foo',
      'get foo',
      'locate foo',
      'fetch foo',
      'translate foo',
      'getModuleSpecifiers foo',
      'normalize bar',
      'get bar',
      'normalize baz',
      'get baz',
      'locate bar',
      'fetch bar',
      'locate baz',
      'fetch baz',
      'translate bar',
      'translate baz',
      'getModuleSpecifiers bar',
      'getModuleSpecifiers baz',
      'normalize bar',
      'analyzeDependencies 3',
      'transform bar',
      'write bar',
      'instantiate bar',
      'transform baz',
      'write baz',
      'instantiate baz',
      'transform foo',
      'write foo',
      'instantiate foo',
      'evaluateCodeUnit bar',
      'evaluateCodeUnit baz',
      'evaluateCodeUnit foo'
    ];

    loadAndCheck(depsByName, expectedCalls, done);
  });
});