text:
Set-Neo4jSetting -ConfigurationFile <string> -Name <string> -Value <string[]> [-Neo4jServer <Object>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-Neo4jSetting -Neo4jHome <string> -ConfigurationFile <string> -Name <string> -Value <string[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

## Syntax

```powershell
Set-Neo4jSetting -ConfigurationFile <string> -Name <string> -Value <string[]> [-Neo4jServer <Object>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```

```powershell
Set-Neo4jSetting -Neo4jHome <string> -ConfigurationFile <string> -Name <string> -Value <string[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## Parameters

###  -ConfigurationFile \<string\>

Property               | Value
---------------------- | ---------------------
Aliases                |
Required?              | true
Position?              | Named
Default Value          |
Accept Pipeline Input? | true (ByPropertyName)

###  -Confirm

Property               | Value
---------------------- | -----
Aliases                |
Required?              | false
Position?              | Named
Default Value          |
Accept Pipeline Input? | false

###  -Force

Property               | Value
---------------------- | -----
Aliases                |
Required?              | false
Position?              | Named
Default Value          |
Accept Pipeline Input? | false

###  -Name \<string\>

Property               | Value
---------------------- | ---------------------
Aliases                |
Required?              | true
Position?              | Named
Default Value          |
Accept Pipeline Input? | true (ByPropertyName)

###  -Neo4jHome \<string\>

Property               | Value
---------------------- | ---------------------
Aliases                |
Required?              | true
Position?              | Named
Default Value          |
Accept Pipeline Input? | true (ByPropertyName)

###  -Neo4jServer [\<Object\>]

Property               | Value
---------------------- | --------------
Aliases                |
Required?              | false
Position?              | Named
Default Value          |
Accept Pipeline Input? | true (ByValue)

###  -Value \<string[]\>

Property               | Value
---------------------- | ---------------------
Aliases                |
Required?              | true
Position?              | Named
Default Value          |
Accept Pipeline Input? | true (ByPropertyName)

###  -WhatIf

Property               | Value
---------------------- | -----
Aliases                |
Required?              | false
Position?              | Named
Default Value          |
Accept Pipeline Input? | false

### \<CommonParameters\>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 .

## Aliases

None

## Notes

## Examples

## Links


text:
from typing import Optional

from django.conf import settings
from django.utils import translation

def make_localized_resolver(field_name: str):
    def resolver(root, info, language: Optional[str] = None) -> str:
        language = language or translation.get_language() or settings.LANGUAGE_CODE

        return getattr(root, field_name).localize(language)

    return resolver

redpajama_set_name: RedPajamaGithub


text:
/**
 */
package CIM15.IEC61970.Informative.InfCommon;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 *
 * A representation of the literals of the enumeration 'Skill Level Kind',
 * and utility methods for working with them.
 *
 * @see CIM15.IEC61970.Informative.InfCommon.InfCommonPackage#getSkillLevelKind()
 * @generated
 */
public enum SkillLevelKind implements Enumerator {
	/**
	 * The 'Apprentice' literal object.
	 *
	 *
	 * @see #APPRENTICE_VALUE
	 * @generated
	 * @ordered
	 */
	APPRENTICE(0, "apprentice", "apprentice"),

	/**
	 * The 'Other' literal object.
	 *
	 *
	 * @see #OTHER_VALUE
	 * @generated
	 * @ordered
	 */
	OTHER(1, "other", "other"),

	/**
	 * The 'Master' literal object.
	 *
	 *
	 * @see #MASTER_VALUE
	 * @generated
	 * @ordered
	 */
	MASTER(2, "master", "master"),

	/**
	 * The 'Standard' literal object.
	 *
	 *
	 * @see #STANDARD_VALUE
	 * @generated
	 * @ordered
	 */
	STANDARD(3, "standard", "standard");

	/**
	 * The 'Apprentice' literal value.
	 *
	 *

	 * If the meaning of 'Apprentice' literal object isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @see #APPRENTICE
	 * @generated
	 * @ordered
	 */
	public static final int APPRENTICE_VALUE = 0;

	/**
	 * The 'Other' literal value.
	 *
	 *

	 * If the meaning of 'Other' literal object isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @see #OTHER
	 * @generated
	 * @ordered
	 */
	public static final int OTHER_VALUE = 1;

	/**
	 * The 'Master' literal value.
	 *
	 *

	 * If the meaning of 'Master' literal object isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @see #MASTER
	 * @generated
	 * @ordered
	 */
	public static final int MASTER_VALUE = 2;

	/**
	 * The 'Standard' literal value.
	 *
	 *

	 * If the meaning of 'Standard' literal object isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @see #STANDARD
	 * @generated
	 * @ordered
	 */
	public static final int STANDARD_VALUE = 3;

	/**
	 * An array of all the 'Skill Level Kind' enumerators.
	 *
	 *
	 * @generated
	 */
	private static final SkillLevelKind[] VALUES_ARRAY =
		new SkillLevelKind[] {
			APPRENTICE,
			OTHER,
			MASTER,
			STANDARD,
		};

	/**
	 * A public read-only list of all the 'Skill Level Kind' enumerators.
	 *
	 *
	 * @generated
	 */
	public static final List<SkillLevelKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the 'Skill Level Kind' literal with the specified literal value.
	 *
	 *
	 * @generated
	 */
	public static SkillLevelKind get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SkillLevelKind result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the 'Skill Level Kind' literal with the specified name.
	 *
	 *
	 * @generated
	 */
	public static SkillLevelKind getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SkillLevelKind result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the 'Skill Level Kind' literal with the specified integer value.
	 *
	 *
	 * @generated
	 */
	public static SkillLevelKind get(int value) {
		switch (value) {
			case APPRENTICE_VALUE: return APPRENTICE;
			case OTHER_VALUE: return OTHER;
			case MASTER_VALUE: return MASTER;
			case STANDARD_VALUE: return STANDARD;
		}
		return null;
	}

	/**
	 *
	 *
	 * @generated
	 */
	private final int value;

	/**
	 *
	 *
	 * @generated
	 */
	private final String name;

	/**
	 *
	 *
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 *
	 *
	 * @generated
	 */
	private SkillLevelKind(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}

} //SkillLevelKind


text:
title: ISTIO-SECURITY-2022-006
subtitle: Security Bulletin
description: Ill-formed headers sent to Envoy in certain configurations can lead to unexpected memory access resulting in undefined behavior or crashing.
cves: [CVE-2022-31045]
cvss: "5.9"
vector: "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
releases: ["1.13.6", "1.14.2"]
publishdate: 2022-07-26
keywords: [CVE]
skip_seealso: true
---

{{< security_bulletin >}}

## Do not use Istio 1.14.2 and Istio 1.13.6

Due to a process issue, [CVE-2022-31045](/news/security/istio-security-2022-005/#cve-2022-31045) was not included in our Istio 1.14.2 and Istio 1.13.6 builds.

At this time we suggest you do not install 1.14.2 or 1.13.6 in a production environment. If you have, you may downgrade to Istio 1.14.1 or Istio 1.13.5. Istio 1.14.3 and Istio 1.13.7 are expected to be released later this week.


text:
namespace System.Drawing.Printing {

    using System.Diagnostics;
    using System.Diagnostics.CodeAnalysis;
    using System;
    using System.Runtime.InteropServices;
    using System.Drawing;
    using System.ComponentModel;
    using Microsoft.Win32;

    /// <include file='doc\PrintRange.uex' path='docs/doc[@for="PrintRange"]/*' />
    /// <devdoc>
    ///    <para>
    ///       Specifies the option buttons in the print dialog box that
    ///       designate the part of the document to print.
    ///    </para>
    /// </devdoc>
    [Serializable]
    [SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")]
    public enum PrintRange {
        /// <include file='doc\PrintRange.uex' path='docs/doc[@for="PrintRange.AllPages"]/*' />
        /// <devdoc>
        ///    <para>
        ///       All pages are printed.
        ///
        ///    </para>
        /// </devdoc>
        AllPages = SafeNativeMethods.PD_ALLPAGES,

        /// <include file='doc\PrintRange.uex' path='docs/doc[@for="PrintRange.SomePages"]/*' />
        /// <devdoc>
        /// <para> The pages between <see cref='System.Drawing.Printing.PrinterSettings.FromPage'/> and
        /// <see cref='System.Drawing.Printing.PrinterSettings.ToPage'/>
        /// are
        /// printed.</para>
        /// </devdoc>
        SomePages = SafeNativeMethods.PD_PAGENUMS,

        /// <include file='doc\PrintRange.uex' path='docs/doc[@for="PrintRange.Selection"]/*' />
        /// <devdoc>
        ///    <para>
        ///       The selected pages are printed.
        ///
        ///    </para>
        /// </devdoc>
        Selection = SafeNativeMethods.PD_SELECTION,

        /// <internalonly/>
        /// <summary>
        ///    <para>
        ///       The
        ///       current page is printed. The print dialog box requires Windows 2000 or
        ///       later for this setting; if used with an earlier operating system, all pages will be printed.
        ///
        ///    </para>
        /// </summary>
        CurrentPage = SafeNativeMethods.PD_CURRENTPAGE,

        // When adding new members, be sure to update PrintDialog.printRangeMask.
    }
}


text:
from random import randint

class Die():
    """A class representing the rolling of die/dice."""

    def __init__(self, num_sides=6):
        """Assume a six-sided die."""
        self.num_sides = num_sides

    def roll(self):
        """"Return a random value between 1 and number of sides."""
        return randint(1, self.num_sides)

    def four_die_drop_low(self):
        """Return the sum of four dice, dropping the lowest value."""
        count = 0
        rolled_4 = []
        while count < 4:
            rolled_4.append(self.roll())
            count += 1
        rolled_4.sort(reverse=True)
        del(rolled_4[-1])
        return(sum(rolled_4))

    def three_die_straight(self):
        """Return the sum of three dice, no modifications"""
        count = 0
        rolled_3 = []
        while count < 3:
            rolled_3.append(self.roll())
            count += 1
        return(sum(rolled_3))

    def straight_six_of_twelve(self):
        """
        Return the top 6 rolls out of 12 random rolls.
        The individual rolls will be the sum of 3d6 straight.
        """
        count = 0
        rolled_12 = []
        while count < 12:
            rolled_12.append(str(self.three_die_straight()))
            count +=1
        rolled_12.sort(key=float)
        del(rolled_12[:6])
        return(rolled_12)

    def best_six_of_twelve(self):
        """
        Return the top 6 rolls out of 12 random rolls.
        The individual rolls will be the sum of 4d6 dropping lowest.
        """
        count = 0
        rolled_12 = []
        while count < 12:
            rolled_12.append(str(self.four_die_drop_low()))
            count += 1
        rolled_12.sort(key=float)
        del(rolled_12[:6])
        return(rolled_12)

    def hp_generation(self, character_class, character_level, const_stat):
        """Return the HP of a character based on class and level."""
        count = 0
        rolled_hp = []

        if const_stat == '3':
            hp_adjustment = -2
        elif const_stat == '4' or const_stat == '5' or const_stat == '6':
            hp_adjustment = -1
        elif const_stat == '15':
            hp_adjustment = 1
        elif const_stat == '16':
            hp_adjustment = 2
        elif const_stat == '17' and character_class == 'fighter' or \
            character_class == 'paladin' or character_class == 'ranger':
            hp_adjustment = 3
        elif const_stat == '18' and character_class == 'fighter' or \
             character_class == 'paladin' or character_class == 'ranger':
            hp_adjustment = 4
        elif const_stat == '17' and character_class != 'fighter' or \
             character_class == 'paladin' or character_class == 'ranger':
            hp_adjustment = 2
        elif const_stat == '18' and character_class != 'fighter' or \
             character_class == 'paladin' or character_class == 'ranger':
            hp_adjustment = 2
        else:
            hp_adjustment = 0

        if character_class == 'cleric':
            max_hit_die = 9
            min_hit_die = character_level
            extra_hp = ((character_level - max_hit_die) * 2)
        elif character_class == 'druid':
            max_hit_die = 14
            min_hit_die = character_level
            extra_hp = 0
        elif character_class == 'fighter' or character_class == 'paladin':
            max_hit_die = 9
            min_hit_die = character_level
            extra_hp = ((character_level - max_hit_die) * 3)
        elif character_class == 'ranger':
            max_hit_die = 10
            if character_level <= max_hit_die:
                min_hit_die = character_level + 1
            else:
                min_hit_die = max_hit_die + 1
            extra_hp = ((character_level - max_hit_die) * 2)
        elif character_class == 'magic user':
            max_hit_die = 11
            min_hit_die = character_level
            extra_hp = character_level - max_hit_die
        elif character_class == 'illusionist':
            max_hit_die = 10
            min_hit_die = character_level
            extra_hp = character_level - max_hit_die
        elif character_class == 'thief':
            max_hit_die = 10
            min_hit_die = character_level
            extra_hp = ((character_level - max_hit_die) * 2)
        elif character_class == 'assassin':
            max_hit_die = 15
            min_hit_die = character_level
            extra_hp = 0
        elif character_class == 'monk':
            max_hit_die = 17
            if character_level <= max_hit_die:
                min_hit_die = character_level + 1
            else:
                min_hit_die = max_hit_die + 1
            extra_hp = 0

        if character_level <= max_hit_die:
            while count < min_hit_die:
                hp_rolled = self.roll() + hp_adjustment
                rolled_hp.append(hp_rolled)
                count += 1
        elif character_level > max_hit_die:
            while count < max_hit_die:
                hp_rolled = self.roll() + hp_adjustment
                rolled_hp.append(hp_rolled)
                count += 1
            rolled_hp.append(extra_hp)

        return(sum(rolled_hp))


text:
<?php

namespace Karolina\Database\Table;

use Illuminate\Database\Eloquent\Model;

Class Team extends Model {

    protected $table = 'kf_team_members';
    protected $primaryKey = 'team_member_id';
    protected $guarded = [];

}


text:
#%in1%#

#%in3%#

#%title%#

Details

#%hide_rss_content_begin%#
Site news
#%hide_rss_content_end%#

Tell friend

Report error

#%hide_owner_begin%#
Owner
#%hide_owner_end%#
#%hide_contact_form_begin%#
Contact
#%hide_contact_form_end%#
#%hide_for_no_user_begin%#
Private
#%hide_for_no_user_end%#
#%hide_claim_listing_begin%#
Claim listing
#%hide_claim_listing_end%#

#%thumbnail%##%description%#
#%detail%#

#%hide_usit_begin%#
#%user_defined%#
#%hide_usit_end%#
#%hide_tags_begin%#
Tags: #%tags%#
#%hide_tags_end%#

 PDF
 This link in a frame
 Preview

Bookmark and share this link:    #%share_it%#

#%pictures_gallery%#

#%hide_rss_content_begin%#

Site News

#%rss_content%#

#%hide_rss_content_end%#

#%show_comments%#

#%enter_comment_box%#

Show comments

Info

Created: #%created%# :: #%hide_updated_begin%#Updated: #%updated%# :: #%hide_updated_end%# :: Rating: #%rating%# #%rateicon%# (#%votes%# votes)

Clicks this month: #%hits_m%# :: Clicks in this month: #%clicks_in_m%# :: Clicks total: #%hits%# :: Clicks in total: #%clicks_in%#

#%hide_more_items_begin%#

More Links of The Same Owner

#%more_items%#

#%hide_more_items_end%#
#%hide_next_previous_begin%#

More Links

#%hide_next_cat_begin%##%next_category%#
#%hide_next_cat_end%#
#%hide_previous_cat_begin%##%previous_category%#
#%hide_previous_cat_end%#
#%hide_next_begin%##%next%#
#%hide_next_end%#
#%hide_previous_begin%##%previous%#
#%hide_previous_end%#

#%hide_next_previous_end%#
#%hide_click_price_begin%#
Price: #%currency%##%price%#
#%hide_click_price_end%#

#%tell_friend_box%#

#%report_box%#

#%owner_image%#

Website: #%owner_website%#

#%hide_more_items1_begin%#

More Links of #%owner_nick%#

#%more_items%#

#%hide_more_items1_end%#

#%contact_box%#

#%notes_edit_box%#

#%add_delete_favorites%#

#%claim_listing_box%#

#%edit_link%#

#%in2%#


text:
<?php

namespace Gettext\Extractors;

use Gettext\Translations;
use Gettext\Utils\HeadersExtractorTrait;

/**
 * Class to get gettext strings from csv.
 */
class Csv extends Extractor implements ExtractorInterface
{
    use HeadersExtractorTrait;

    /**
     * {@inheritdoc}
     */
    public static function fromString($string, Translations $translations, array $options = [])
    {
        $handle = fopen('php://memory', 'w');

        fputs($handle, $string);
        rewind($handle);

        while ($row = fgetcsv($handle)) {
            $context = array_shift($row);
            $original = array_shift($row);

            if ($context === '' && $original === '') {
                self::extractHeaders(array_shift($row), $translations);
                continue;
            }

            $translation = $translations->insert($context, $original);

            if (!empty($row)) {
                $translation->setTranslation(array_shift($row));
                $translation->setPluralTranslations($row);
            }
        }

        fclose($handle);
    }
}


text:
from pytest import mark

from graphene.types import ID, Field, ObjectType, Schema
from graphene.types.scalars import String
from graphene.relay.mutation import ClientIDMutation
from graphene.test import Client

class SharedFields(object):
    shared = String()

class MyNode(ObjectType):
    # class Meta:
    #     interfaces = (Node, )
    id = ID()
    name = String()

class SaySomethingAsync(ClientIDMutation):
    class Input:
        what = String()

    phrase = String()

    @staticmethod
    async def mutate_and_get_payload(self, info, what, client_mutation_id=None):
        return SaySomethingAsync(phrase=str(what))

# MyEdge = MyNode.Connection.Edge
class MyEdge(ObjectType):
    node = Field(MyNode)
    cursor = String()

class OtherMutation(ClientIDMutation):
    class Input(SharedFields):
        additional_field = String()

    name = String()
    my_node_edge = Field(MyEdge)

    @staticmethod
    def mutate_and_get_payload(
        self, info, shared="", additional_field="", client_mutation_id=None
    ):
        edge_type = MyEdge
        return OtherMutation(
            name=shared + additional_field,
            my_node_edge=edge_type(cursor="1", node=MyNode(name="name")),
        )

class RootQuery(ObjectType):
    something = String()

class Mutation(ObjectType):
    say_promise = SaySomethingAsync.Field()
    other = OtherMutation.Field()

schema = Schema(query=RootQuery, mutation=Mutation)
client = Client(schema)

@mark.asyncio
async def test_node_query_promise():
    executed = await client.execute_async(
        'mutation a { sayPromise(input: {what:"hello", clientMutationId:"1"}) { phrase } }'
    )
    assert isinstance(executed, dict)
    assert "errors" not in executed
    assert executed["data"] == {"sayPromise": {"phrase": "hello"}}

@mark.asyncio
async def test_edge_query():
    executed = await client.execute_async(
        'mutation a { other(input: {clientMutationId:"1"}) { clientMutationId, myNodeEdge { cursor node { name }} } }'
    )
    assert isinstance(executed, dict)
    assert "errors" not in executed
    assert executed["data"] == {
        "other": {
            "clientMutationId": "1",
            "myNodeEdge": {"cursor": "1", "node": {"name": "name"}},
        }
    }


text:
namespace Allogen { namespace Example {

	ExampleClass::ExampleClass() {}

	ExampleClass::~ExampleClass() {
		std::cout << "[C++] ExampleClass is being deleted!" << std::endl;
	}

	void ExampleClass::setInteger(uint32_t a) {
		integer = a;
	}

	uint32_t ExampleClass::getInteger() const {
		return integer;
	}

	void ExampleClass::doAsync(std::function<void()> async) {
		async();
	}

	uint32_t ExampleClass::anotherCallback(std::function<uint32_t(uint16_t, uint16_t)> callback) {
		return callback(20, 30);
	}

	ExampleClass* ExampleClass::getSelf() {
		return this;
	}

	void ExampleClass::sayHello(const std::string& name) {
		std::cout << "Hello " << name << std::endl;
	}

	AnotherClass ExampleClass::createAnother(const std::string& name) {
		return AnotherClass(name);
	}

	void ExampleClass::createAnotherAsync(const std::string& name, std::function<void(AnotherClass)> callback) {
		callback(createAnother(name));
	}

	void ExampleClass::printAnother(const AnotherClass& another) {
		std::cout << "Hello " << another.getName() << " from another!" << std::endl;
	}

	void ExampleClass::printAnotherAsync(const AnotherClass& another, std::function<void()> callback) {
		printAnother(another);
		callback();
	}

}}


text:
import utils
from copy import copy

def cache_transform(transformation):
    cache = {}

    def fn(domain):
        cached = cache.get(domain)
        if cached is None:
            cached = transformation(domain)
            cache[domain] = cached
        return cached

    return fn

class Domain(object):
    """
    Base class for domains
    """

    filtered = False
    step_jumps = False
    strict = False

    def __init__(self, name=None):
        self._name = name
        self._size = -1

    @property
    def name(self):
        """ Name of domain. Serves only for debugging purpose. """
        if self._name:
            return self._name
        else:
            return self.__class__.__name__

    @property
    def size(self):
        """Number of elements in domain.

        If the size is ``None`` then number of elements cannot be determined.
        If the domain is non-filtered and the size is int then it is the exact
        number of elements. If the domain is filtered and the size is int then
        it is an upper bound for the number of elements.
        """
        s = self._size
        if s == -1:
            s = self._compute_size()
            self._size = s
        return s

    def set_name(self, name):
        """Creates a copy of domain with changed name.
        """
        domain = copy(self)
        domain._name = name
        return domain

    def _compute_size(self):
        """Computes the size of domain

        Each domain where size can be determined should overload this method.
        """
        return None

    def __mul__(self, other):
        """Creates a cartesian product of domains.

        It is equivalent to ``Product((self, other))``, see
        :class:`haydi.Product`

        """
        return Product((self, other))

    def __add__(self, other):
        """Join two domains

        It is equivalent to ``Join((self, other))``, see :class:`haydi.Join`
        """
        return Join((self, other))

    def __pow__(self, exponent):
        return Sequences(self, exponent)

    def iterate_steps(self, start, end):
        """Create iterator over a given range of steps

        It internally calls ``create_skip_iter()`` and ignores StepSkips.

        Args:
            start (int): Index of first step
            end (int): Index of the last step

        Examples:

            >>> list(hd.Range(10).iterate_steps(1, 7))
            [1, 2, 3, 4, 5, 6]
            >>> list(hd.Range(10).filter(lambda x: x % 3 == 0)
            ...                  .iterate_steps(1, 7))
            [3, 6]
        """
        i = start
        it = self.create_skip_iter(start)
        while i < end:
            v = next(it)
            if isinstance(v, StepSkip):
                i += v.value
            else:
                yield v
                i += 1

    # Internal

    def _set_flags_from_domain(self, domain):
        self.filtered = domain.filtered
        self.step_jumps = domain.step_jumps
        self.strict = domain.strict

    def _set_flags_from_domains(self, domains):
        self.filtered = any(d.filtered for d in domains)
        self.step_jumps = all(d.step_jumps for d in domains)
        self.strict = all(d.strict for d in domains)

    # Actions

    def max(self, value_fn=None, size=None):
        """
        Shortcut for ``.iterate().max(...)``
        """
        return self.iterate().max(value_fn, size)

    def groups(self, key_fn, max_items_per_group=None):
        """
        Shortcut for ``.iterate().groups(...)``
        """
        return self.iterate().groups(key_fn, max_items_per_group)

    def groups_counts(self, key_fn, max_items_per_group):
        """
        Shortcut for ``.iterate().group_counts(...)``
        """
        return self.iterate().groups_counts(key_fn, max_items_per_group)

    def collect(self):
        """
        Shortcut for ``.iterate().collect()``

        Example:
            >>> hd.Range(4).collect().run()
            [0, 1, 2, 3]
        """
        return self.iterate().collect()

    def reduce(self, reduce_fn, init_value=0, associative=True):
        """
        Shortcut for ``.iterate().reduce(...)``
        """
        return self.iterate().reduce(reduce_fn, init_value, associative)

    def take(self, count):
        """
        Shortcut for ``.iterate().take(count)``
        """
        return self.iterate().take(count)

    def first(self, default=None):
        """
        Shortcut for ``.iterate().first(default)``
        """
        return self._make_pipeline("iterate").first(default)

    # Transformations

    def map(self, fn):
        """
        Transformation: Map a function `fn` over elements of domain

        Example:
            >>> list(hd.Range(4).map(lambda x: x + 10))
            [10, 11, 12, 13]
        """
        return TransformedDomain(self, transform.MapTransformation(fn))

    def filter(self, fn, strict=False):
        """
        Transformation: Filters elements from domain

        It calls function `fn` on each element, if the function
        returns ``False`` then the element is filtered out.

        Note, that the resulting domain has `filtered` set to ``True``,

        Example:
            >>> list(hd.Range(4).filter(lambda x: x % 2 == 1))
            [1, 3]
        """
        return TransformedDomain(
            self, transform.FilterTransformation(fn, strict))

    # Others
    def run(self, ctx=None, timeout=None):
        """A shortcut for ``self.collect().run(ctx, timeout)``"""
        return self.collect().run(ctx, timeout)

    # Shortcuts
    # def take(self, count):
    #     return transform.iterate().take(count)

    def _make_iter(self, step):
        """Creates an interator over elements of the domain

        Each domain implementation should override this method.
        """
        raise NotImplementedError()

    def _make_skip_iter(self, step):
        """Create a skip iterator over elements of the domain

        Each (potentially) filtered domain implementation should override this
        method.
        """
        raise NotImplementedError()

    def create_iter(self, step=0):
        return self._make_iter(step)

    def create_skip_iter(self, step=0):
        if self.filtered:
            return self._make_skip_iter(step)
        else:
            return self._make_iter(step)

    def __iter__(self):
        return self.create_iter()

    def _make_pipeline(self, method):
        return Pipeline(self, method)

    def generate_one(self):
        """Generate a random element from the domain"""
        raise Exception("Domain {} do not support generation"
                        .format(type(self).__name__))

    def iterate(self):
        """Create a pipeline that iterates over all elements in the domain

        The method returns instance of :class:`haydi.Pipeline` with "iterate"
        method.
        """
        return self._make_pipeline("iterate")

    def generate(self, count=None):
        """Create a pipeline that generates random element from the domain

        The method returns instance of :class:`haydi.Pipeline` with "generate"
        method.

        Args:
            count (int or None): The number of generated elements in the
                                 pipeline, if ``count`` is ``None`` then the
                                 pipeline generates an infinite number of
                                 elements.
        """

        pipeline = self._make_pipeline("generate")
        if count is None:
            return pipeline
        else:
            return pipeline.take(count)

    def cnfs(self):
        """Create a pipeline iterating over canonical elements in the domain

        The method returns instance of :class:`haydi.Pipeline` with "cnfs"
        method.

        This works only for *strict* domains. If called on a non-strict domain,
        then an exception is thrown.
        """
        return self._make_pipeline("cnfs")

    def to_values(self, max_size=None):
        """Materialize the domain (or its subdomains)

        This method serves as an optimization for caching elements of
        heavily-used small domains.

        If the argument ``max_size`` is ``None`` or ``self.size`` is at most
        ``max_size`` then the call is equivalent to ``hd.Values(tuple(self))``.
        Otherwise the method is applied on subdomains recursively.

        Example:

        >>> p = hd.Range(3) * hd.Range(5) * hd.Range(6)
        >>> q = p.to_values(5)

        ``q`` is the same as writing::

        >>> hd.Values((0, 1, 2)) * hd.Values((0, 1, 2, 3, 4)) * hd.Range(6)

        Args:
            max_size (int or None): The size limit for materialization

        """
        if max_size is None:
            max_size = self.size

        if self.size <= max_size:
            return Values(tuple(self.create_iter()))
        else:
            return self._remap_domains(
                cache_transform(lambda d: d.to_values(max_size)))

    def to_cnf_values(self, max_size=None):
        if max_size is None:
            max_size = self.size

        if self.size <= max_size:
            return CnfValues(tuple(self.cnfs()), _check=False)
        else:
            return self._remap_domains(
                cache_transform(lambda d: d.to_cnf_values(max_size)))

    def _remap_domains(self, fn):
        """
        Returns an instance of the current domain with subdomains
        transformed with the given transformation.

        Domains with subdomains should override this method.

        Args:
            fn (callable): A function called on each subdomain
        Returns:
            An instance of :class:`haydi.Domain`
        """
        return self

    def __repr__(self):
        ITEMS_LIMIT = 5
        ITEM_CHAR_LIMIT = 24
        CHAR_LIMIT = 48

        size = self.size
        if size == 0:
            extra = " {}"
        elif not self.filtered and size is not None:
            it = self.create_iter()
            remaining = CHAR_LIMIT

            tokens = [" {"]
            last = size - 1

            for i in xrange(ITEMS_LIMIT):
                try:
                    item_repr = repr(it.next())
                except StopIteration:
                    tokens = ["size of domain is not consistent with iterator"]
                    break
                item_repr = utils.limit_string_length(
                    item_repr, min(remaining, ITEM_CHAR_LIMIT))
                remaining -= len(item_repr)
                tokens.append(item_repr)
                if i == last:
                    tokens.append("}")
                    break
                else:
                    tokens.append(", ")
                    remaining -= 2

                if remaining <= 6:
                    tokens.append("...}")
                    break
            else:
                tokens.append("...}")

            extra = "".join(tokens)
        else:
            if self.filtered:
                extra = " filtered"
            else:
                extra = ""
        return "<{} size={}{}>".format(self.name, self.size, extra)

class StepSkip(object):

    def __init__(self, value=1):
        self.value = value

    def __repr__(self):
        return "<StepSkip {}>".format(self.value)

    def __eq__(self, other):
        return isinstance(other, StepSkip) and other.value == self.value

    def __ne__(self, other):
        return not self.__eq__(other)

class TransformedDomain(Domain):

    def __init__(self, parent, transformation):
        name = type(transformation).__name__
        super(TransformedDomain, self).__init__(name)
        self.parent = parent
        self.transformation = transformation
        transformation.init_transformed_domain(self, parent)

    def _compute_size(self):
        return self.transformation.size_of_transformed_domain(self.parent.size)

    def _make_iter(self, step):
        return self.transformation.transform_iter(
            self.parent.create_iter(step))

    def _make_skip_iter(self, step):
        return self.transformation.transform_skip_iter(
            self.parent.create_skip_iter(step))

    def _make_pipeline(self, method):
        pipeline = self.parent._make_pipeline(method)
        return pipeline._add_transformation(self.transformation)

    def generate_one(self):
        pipeline = self.parent.generate()._add_transformation(
            self.transformation)
        return pipeline.first().run()

skip1 = StepSkip(1)

from .product import Product  # noqa
from .join import Join  # noqa
from . import transform  # noqa
from .pipeline import Pipeline  # noqa
from .values import Values, CnfValues  # noqa
from .sequence import Sequences  # noqa


text:
public class CipherFactoryTests {
    harness public void main() {
	DefaultCipherFactoryTest cft = new DefaultCipherFactoryTest();
	cft.setUp();
	cft.testEncryptionCipher();

    }
}


text:
package org.eclipse.jdt.internal.ui.wizards.dialogfields;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;

/**
 * Dialog field describing a separator.
 */
public class Separator extends DialogField {

	private Label fSeparator;
	private int fStyle;

	public Separator() {
		this(SWT.NONE);
	}

	/**
	 * @param style of the separator. See Label for possible
	 * styles.
	 */
	public Separator(int style) {
		super();
		fStyle= style;
	}

	// ------- layout helpers

	/**
	 * Creates the separator and fills it in a MGridLayout.
	 * @param height The height of the separator
	 */
	public Control[] doFillIntoGrid(Composite parent, int nColumns, int height) {
		assertEnoughColumns(nColumns);

		Control separator= getSeparator(parent);
		separator.setLayoutData(gridDataForSeperator(nColumns, height));

		return new Control[] { separator };
	}

	/*
	 * @see DialogField#doFillIntoGrid
	 */
	@Override
	public Control[] doFillIntoGrid(Composite parent, int nColumns) {
		return doFillIntoGrid(parent, nColumns, 4);
	}

	/*
	 * @see DialogField#getNumberOfControls
	 */
	@Override
	public int getNumberOfControls() {
		return 1;
	}

	protected static GridData gridDataForSeperator(int span, int height) {
		GridData gd= new GridData();
		gd.horizontalAlignment= GridData.FILL;
		gd.verticalAlignment= GridData.BEGINNING;
		gd.heightHint= height;
		gd.horizontalSpan= span;
		return gd;
	}

	// ------- ui creation

	/**
	 * Creates or returns the created separator.
	 * @param parent The parent composite or null if the widget has
	 * already been created.
	 */
	public Control getSeparator(Composite parent) {
		if (fSeparator == null) {
			assertCompositeNotNull(parent);
			fSeparator= new Label(parent, fStyle);
		}
		return fSeparator;
	}

}


text:
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.views.generic import TemplateView

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'cloudfuzzy.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^$', TemplateView.as_view(template_name="index.html"), name='index'),
    url(r'^teste/$', TemplateView.as_view(template_name="teste.html"), name='index'),
    url(r'^systems$', TemplateView.as_view(template_name="systems/base.html"), name='systems'),

    (r'^api/', include('api_rest.urls')),

    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('django.contrib.auth.views',
    url(r'^login/$', 'login', {'template_name': 'users/login.html', }, name='login'),
    url(r'^logout/$', 'logout', {'template_name': 'users/login.html'}, name='logout'),
)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )


text:
Organizers

    <jhi-alert></jhi-alert>

                <button class="btn btn-primary" ui-sref="organizer.new" >

                        Create new Organizer

                </button>

                    ID
                    Name
                    Affiliation
                    Email
                    Web
                    User
                    Conference

                    {{organizer.id}}
                    {{organizer.name}}
                    {{organizer.affiliation}}
                    {{organizer.email}}
                    {{organizer.web}}

                        {{organizer.userId}}

                        {{organizer.conferenceId}}

                            <button type="submit"
                                    ui-sref="organizer-detail({id:organizer.id})"
                                    class="btn btn-info btn-sm">

                            </button>
                            <button type="submit"
                                    ui-sref="organizer.edit({id:organizer.id})"
                                    class="btn btn-primary btn-sm">

                            </button>
                            <button type="submit"
                                    ui-sref="organizer.delete({id:organizer.id})"
                                    class="btn btn-danger btn-sm">

                            </button>


text:
package colibri_test

import (
	"testing"

	"github.com/stretchr/testify/assert"

	"github.com/scionproto/scion/go/lib/slayers/path/colibri"
)

func TestColibriHopfieldSerializeDecode(t *testing.T) {
	buffer := make([]byte, colibri.LenHopField)
	hf := &colibri.HopField{
		IngressId: 35,
		EgressId:  24,
		Mac:       []byte{0xf2, 0x83, 0x54, 0xaa},
	}
	assert.NoError(t, hf.SerializeTo(buffer))
	hf2 := &colibri.HopField{}
	assert.NoError(t, hf2.DecodeFromBytes(buffer))
	assert.Equal(t, hf, hf2)
}


text:
package io.quarkus.oidc;

import javax.json.JsonObject;

import io.quarkus.oidc.runtime.AbstractJsonObjectResponse;

public class UserInfo extends AbstractJsonObjectResponse {

    public UserInfo() {
    }

    public UserInfo(String userInfoJson) {
        super(userInfoJson);
    }

    public UserInfo(JsonObject json) {
        super(json);
    }

    public String getUserInfoString() {
        return getNonNullJsonString();
    }
}


text:
<?php

namespace Oro\Bundle\TestFrameworkBundle\Tests\Unit\Stub;

use Oro\Bundle\DistributionBundle\OroKernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\HttpFoundation\Request;

class KernelStub extends OroKernel
{
    /** @var string */
    protected $logDir;

    /** @var array */
    protected $registeredBundles = [];

    /** @var array */
    protected $parameters = [
        'database_driver' => 'pdo_mysql',
        'database_host' => '127.0.0.1',
        'database_port' => null,
        'database_name' => 'oro_crm',
        'database_user' => 'root',
        'database_password' => null,
        'session_handler' => 'session.handler.native_file',
        'message_queue_transport' => 'dbal',
        'message_queue_transport_config' => null,
    ];

    /**
     * @param string $logDir
     * @param array  $bundleConfig [[name => Bundle1, path => /var/www/app], ...]
     */
    public function __construct(string $logDir, array $bundleConfig = [])
    {
        $this->logDir = $logDir;
        $this->container = new Container();

        foreach ($this->parameters as $key => $value) {
            $this->container->setParameter($key, $value);
        }

        foreach ($bundleConfig as $config) {
            $bundle = new TestBundle($config['name']);

            if (array_key_exists('path', $config)) {
                $bundle->setPath($config['path']);
            }

            $this->registeredBundles[] = $bundle;
        }

        $this->initializeBundles();
    }

    /**
     * @param array $bundleMap
     */
    public function setBundleMap(array $bundleMap)
    {
        $this->bundleMap = $bundleMap;
    }

    /**
     * {@inheritdoc}
     */
    public function registerBundles()
    {
        return $this->registeredBundles;
    }

    /**
     * {@inheritdoc}
     */
    public function registerContainerConfiguration(LoaderInterface $loader)
    {
    }

    /**
     * {@inheritdoc}
     */
    public function serialize()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function unserialize($serialized)
    {
    }

    /**
     * {@inheritdoc}
     */
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)
    {
    }

    /**
     * {@inheritdoc}
     */
    public function boot()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function shutdown()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function locateResource($name, $dir = null, $first = true)
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getEnvironment()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function isDebug()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getRootDir()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getStartTime()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getCacheDir()
    {
    }

    /**
     * {@inheritdoc}
     */
    public function getLogDir()
    {
        return $this->logDir;
    }

    /**
     * {@inheritdoc}
     */
    public function getCharset()
    {
    }
}


text:
SUBDIR=	mwlstats mwldebug

.include <bsd.subdir.mk>


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Azure.EventHubs
{
    using System;
    using System.Net.Sockets;
    using System.Threading.Tasks;
    using Microsoft.Azure.EventHubs.Primitives;

    ///
    /// Represents an abstraction for retrying messaging operations. Users should not
    /// implement this class, and instead should use one of the provided implementations.
    ///
    public abstract class RetryPolicy
    {
        const int DefaultRetryMaxCount = 10;

        static readonly TimeSpan DefaultRetryMinBackoff = TimeSpan.Zero;
        static readonly TimeSpan DefaultRetryMaxBackoff = TimeSpan.FromSeconds(30);

        readonly object serverBusySync = new object();

        ///
        /// Determines whether or not the exception can be retried.
        ///
        /// <param name="exception"></param>
        /// <returns>A bool indicating whether or not the operation can be retried.</returns>
        public static bool IsRetryableException(Exception exception)
        {
            Guard.ArgumentNotNull(nameof(exception), exception);

            if (exception is EventHubsException)
            {
                return ((EventHubsException)exception).IsTransient;
            }

            if (exception is TaskCanceledException)
            {
                return exception.InnerException == null || IsRetryableException(exception.InnerException);
            }

            // Flatten AggregateException
            if (exception is AggregateException)
            {
                var fltAggException = (exception as AggregateException).Flatten();
                return fltAggException.InnerException != null && IsRetryableException(fltAggException.InnerException);
            }

            // Other retryable exceptions here.
            if (exception is OperationCanceledException || exception is SocketException)
            {
                return true;
            }

            return false;
        }

        ///
        /// Returns the default retry policy, <see cref="RetryExponential"/>.
        ///
        public static RetryPolicy Default => new RetryExponential(DefaultRetryMinBackoff, DefaultRetryMaxBackoff, DefaultRetryMaxCount);

        ///
        /// Returns the default retry policy, <see cref="NoRetry"/>.
        ///
        public static RetryPolicy NoRetry => new RetryExponential(TimeSpan.Zero, TimeSpan.Zero, 0);

        ///
        /// <param name="lastException"></param>
        /// <param name="remainingTime"></param>
        /// <param name="baseWaitTime"></param>
        /// <param name="retryCount"></param>
        /// <returns></returns>
        protected abstract TimeSpan? OnGetNextRetryInterval(Exception lastException, TimeSpan remainingTime, int baseWaitTime, int retryCount);

        ///
        /// Gets the timespan for the next retry operation.
        ///
        /// <param name="lastException">The last exception that was thrown</param>
        /// <param name="remainingTime">Remaining time for the cumulative timeout</param>
        /// <param name="retryCount">Current retry count</param>
        /// <returns></returns>
        public TimeSpan? GetNextRetryInterval(Exception lastException, TimeSpan remainingTime, int retryCount)
        {
            int baseWaitTime = 0;
            lock (this.serverBusySync)
            {
                if (lastException != null &&
                        (lastException is ServerBusyException || (lastException.InnerException != null && lastException.InnerException is ServerBusyException)))
                {
                    baseWaitTime += ClientConstants.ServerBusyBaseSleepTimeInSecs;
                }
            }

            var retryAfter = this.OnGetNextRetryInterval(lastException, remainingTime, baseWaitTime, retryCount);

            // Don't retry if remaining time isn't enough.
            if (retryAfter == null ||
                remainingTime.TotalSeconds < Math.Max(retryAfter.Value.TotalSeconds, ClientConstants.TimerToleranceInSeconds))
            {
                return null;
            }

            return retryAfter;
        }

        /// Creates a new copy of the current <see cref="RetryPolicy" /> and clones it into a new instance.
        /// <returns>A new copy of <see cref="RetryPolicy" />.</returns>
        public abstract RetryPolicy Clone();
    }
}


text:
import logging
import re
import sys

from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system.filesystem import FileSystem

_log = logging.getLogger(__name__)

# SCM methods are expected to return paths relative to self.checkout_root.
class SCM:
    def __init__(self, cwd, executive=None, filesystem=None):
        self.cwd = cwd
        self._executive = executive or Executive()
        self._filesystem = filesystem or FileSystem()
        self.checkout_root = self.find_checkout_root(self.cwd)

    # A wrapper used by subclasses to create processes.
    def _run(self, args, cwd=None, input=None, error_handler=None, return_exit_code=False, return_stderr=True, decode_output=True):
        # FIXME: We should set cwd appropriately.
        return self._executive.run_command(args,
                           cwd=cwd,
                           input=input,
                           error_handler=error_handler,
                           return_exit_code=return_exit_code,
                           return_stderr=return_stderr,
                           decode_output=decode_output)

    # SCM always returns repository relative path, but sometimes we need
    # absolute paths to pass to rm, etc.
    def absolute_path(self, repository_relative_path):
        return self._filesystem.join(self.checkout_root, repository_relative_path)

    def _run_status_and_extract_filenames(self, status_command, status_regexp):
        filenames = []
        # We run with cwd=self.checkout_root so that returned-paths are root-relative.
        for line in self._run(status_command, cwd=self.checkout_root).splitlines():
            match = re.search(status_regexp, line)
            if not match:
                continue
            # status = match.group('status')
            filename = match.group('filename')
            filenames.append(filename)
        return filenames

    @staticmethod
    def _subclass_must_implement():
        raise NotImplementedError("subclasses must implement")

    @classmethod
    def in_working_directory(cls, path, executive=None):
        SCM._subclass_must_implement()

    def find_checkout_root(self, path):
        SCM._subclass_must_implement()

    def add(self, path, return_exit_code=False, recurse=True):
        self.add_list([path], return_exit_code, recurse)

    def add_list(self, paths, return_exit_code=False, recurse=True):
        self._subclass_must_implement()

    def delete(self, path):
        self.delete_list([path])

    def delete_list(self, paths):
        self._subclass_must_implement()

    def move(self, origin, destination):
        self._subclass_must_implement()

    def exists(self, path):
        self._subclass_must_implement()

    def changed_files(self, git_commit=None):
        self._subclass_must_implement()

    def _added_files(self):
        self._subclass_must_implement()

    def _deleted_files(self):
        self._subclass_must_implement()

    def display_name(self):
        self._subclass_must_implement()

    def commit_position(self, path):
        """Returns the latest chromium commit position found in the checkout."""
        self._subclass_must_implement()

    def timestamp_of_revision(self, path, revision):
        self._subclass_must_implement()

    def blame(self, path):
        self._subclass_must_implement()

    def has_working_directory_changes(self):
        self._subclass_must_implement()

    #--------------------------------------------------------------------------
    # Subclasses must indicate if they support local commits,
    # but the SCM baseclass will only call local_commits methods when this is true.
    @staticmethod
    def supports_local_commits():
        SCM._subclass_must_implement()

    def commit_locally_with_message(self, message, commit_all_working_directory_changes=True):
        _log.error("Your source control manager does not support local commits.")
        sys.exit(1)


text:
package org.apache.polygene.library.sql.generator.grammar.query;

import java.util.List;
import org.apache.polygene.library.sql.generator.grammar.common.NonBooleanExpression;

/**
 * This syntax element represents the ordinary grouping set specification. In future there might be {@code CUBE} or
 * {@code ROLLUP} grouping sets.
 *
 *
 */
public interface OrdinaryGroupingSet
    extends GroupingElement
{
    /**
     * Returns the grouping column reference expressions.
     *
     * @return The grouping column reference expressions.
     */
    List<NonBooleanExpression> getColumns();
}


text:
package org.assertj.core.internal.shorts;

import static org.assertj.core.api.Assertions.withinPercentage;
import static org.assertj.core.data.Percentage.withPercentage;
import static org.assertj.core.error.ShouldBeEqualWithinPercentage.shouldBeEqualWithinPercentage;
import static org.assertj.core.test.TestData.someInfo;
import static org.assertj.core.test.TestFailures.failBecauseExpectedAssertionErrorWasNotThrown;
import static org.assertj.core.util.FailureMessages.actualIsNull;
import static org.mockito.Mockito.verify;

import org.assertj.core.api.AssertionInfo;
import org.assertj.core.internal.ShortsBaseTest;
import org.junit.Test;

public class Shorts_assertIsCloseToPercentage_Test extends ShortsBaseTest {

  private static final Short ZERO = (short) 0;
  private static final Short ONE = (short) 1;
  private static final Short TWO = (short) 2;
  private static final Short TEN = (short) 10;

  @Test
  public void should_fail_if_actual_is_null() {
    thrown.expectAssertionError(actualIsNull());
    shorts.assertIsCloseToPercentage(someInfo(), null, ONE, withPercentage(ONE));
  }

  @Test(expected = NullPointerException.class)
  public void should_fail_if_expected_value_is_null() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, null, withPercentage(ONE));
  }

  @Test(expected = NullPointerException.class)
  public void should_fail_if_percentage_is_null() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, ZERO, null);
  }

  @Test(expected = IllegalArgumentException.class)
  public void should_fail_if_percentage_is_negative() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, ZERO, withPercentage((short) -1));
  }

  @Test(expected = IllegalArgumentException.class)
  public void should_fail_if_percentage_is_greater_than_one_hundred() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, ZERO, withPercentage((short) 101));
  }

  @Test
  public void should_pass_if_difference_is_less_than_given_percentage() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, ONE, withPercentage((short) 1));
    shorts.assertIsCloseToPercentage(someInfo(), ONE, TWO, withPercentage((short) 100));
  }

  @Test
  public void should_pass_if_difference_is_equal_to_given_percentage() {
    shorts.assertIsCloseToPercentage(someInfo(), ONE, ONE, withPercentage(ZERO));
    shorts.assertIsCloseToPercentage(someInfo(), ONE, TWO, withPercentage((short) 50));
  }

  @Test
  public void should_fail_if_actual_is_not_close_enough_to_expected_value() {
    AssertionInfo info = someInfo();
    try {
      shorts.assertIsCloseToPercentage(someInfo(), ONE, TEN, withPercentage(TEN));
    } catch (AssertionError e) {
      verify(failures).failure(info, shouldBeEqualWithinPercentage(ONE, TEN, withinPercentage(10), (short) (TEN - ONE)));
      return;
    }
    failBecauseExpectedAssertionErrorWasNotThrown();
  }
}


text:
/*globals require, module, console*/
var util = require('faceCentering/util/util');

function plotSquare(imageElement, x, y, w, h) {
    'use strict';
    var rect = document.createElement('div');
    document.querySelector(imageElement.imageClassName).appendChild(rect);
    console.log(x + ',' + y + ',' + w + ',' + h);
    console.log(imageElement);
    console.log(util.getProperties(imageElement.elementContainingImage[0]));
    rect.classList.add('rect');
    rect.style.width = w + 'px';
    rect.style.height = h + 'px';
    rect.style.left = (x) + 'px';
    rect.style.top = (y) + 'px';
}

module.exports = {
    plotSquare: plotSquare
};


text:
//DM !!!!!!!!!!! Under development

#ifndef _FNET_HTTP_CLN_H_

#define _FNET_HTTP_CLN_H_

#if 0 /* Under development */

#if FNET_CFG_HTTP_CLN || defined(__DOXYGEN__)

/*! @addtogroup fnet_http_cln
*
* The FNET HTTP client. @n
TBD
* After the FNET HTTP client is initialized by calling the @ref fnet_http_cln_init() function,
* the user application should call the main service-polling function
* @ref fnet_service_poll() periodically in background.@n
* The HTTP response results will be passed to the @ref fnet_http_cln_callback_response_t callback function,
* which is set during the HTTP client initialization.
* @n
* The HTTP client service is released automatically as soon as the HTTP session is
* finished or an error occurs. Your application may continue
* to call @ref fnet_service_poll() to handle other services, but this will not have any
* impact on the HTTP client communication until you initialize the next HTTP request using
* @ref fnet_http_cln_init() again. @n
* @n
* For the FNET HTTP client example, refer to the FNET Shell demo source code.@n
*
* Configuration parameters:
* - @ref FNET_CFG_HTTP_CLN
* - @ref FNET_CFG_HTTP_CLN_PORT
* - @ref FNET_CFG_HTTP_CLN_BUFFER_SIZE
*/

/*! @{ */

/**************************************************************************/ /*!
 * @brief HTTP client descriptor.
 * @see fnet_http_cln_init()
 ******************************************************************************/
typedef void *fnet_http_cln_desc_t;

/**************************************************************************/ /*!
 * @brief Callback function prototype of the HTTP client receive function.
 *
 * @param buffer           Data buffer that contains data received from
 *                         the remote HTTP server.
 *
 * @param buffer_size      Size of the input @c buffer in bytes.
 *
 * @param cookie            User-application specific parameter. It's set during
 *                          the HTTP-client service initialization as part of
 *                          @ref fnet_http_cln_params.
 *
 * @return This function must return:
 *   - @ref FNET_OK if no error occurs.
 *   - @ref FNET_ERR if an error occurs.
 * @see fnet_http_cln_init
 *
 * This function is invoked by the HTTP client when there is any data
 * in the entity-body of the HTTP response message.
 * This function can be invoked multiple times to process all received data.
 * At each invocation a new chunk of data must be processed.
 * //DM The HTTP server invokes this callback function after call of the
 * //DM @ref fnet_http_srv_post_handle_t function.@n
 *
 ******************************************************************************/
//response
//DM resposnse_staus_code: returns the status code from the HTTP response (200, 201, 400, 401, etc.)
//DM response_header: HTTP response headers so caller may inspect them
//    name:The name of the HTTP header to add. It is invalid for the name to include the ':' character or character codes outside the range 33-126.
//    value: The value to be assigned to the header.
//DM response_content: This is a buffer that is filled by the contents of the HTTP response body.
//typedef fnet_return_t(*fnet_http_cln_response_t)(fnet_http_cln_desc_t http_cln_desc, fnet_char_t *header, void *cookie);

typedef fnet_return_t(*fnet_http_cln_connect_t)(fnet_http_cln_desc_t http_cln_desc, fnet_result_t result);

/**************************************************************************/ /*!
 * @brief Initialization parameters for the @ref fnet_http_cln_init() function.
 ******************************************************************************/
struct fnet_http_cln_params
{
    struct fnet_sockaddr                    address;            /**< @brief Socket address of the remote HTTP server to connect to.@n
                                                                * If the address port number is set to @c 0, it will be assigned to the default port number defined by @ref FNET_CFG_HTTP_CLN_PORT.*/
    fnet_char_t                             *method;            /**< @brief HTTP method to be used. It may be "GET", "POST", "DELETE", "HEAD", "PUT" or "PATCH".*/
    fnet_char_t                             *uri;               /**< @brief Uniform Resource Identifier (URI). It specifies the relative path of the URL excluding the host name. */
    fnet_char_t                             *header;            /**< @brief Optional set of HTTP headers (name-value pairs) to be added to the HTTP request. */
    //   fnet_uint8_t                            *body;              /**< @brief Pointer to the request body. This value is optional and can be FNET_NULL. */
    //   fnet_size_t                             body_size;          /**< @brief Request body size. This value is optional and can be 0. */
    //   fnet_http_cln_response_t                response_callback;  /**< @brief HTTP response callback.*/
    fnet_http_cln_connect_t                 *callback;          /**< @brief Optional callback function which is called when the HTTP cleient connection is istablished or is failed. */
    void                                    *cookie;            /**< @brief Optional application-specific parameter, which is passed to the @c callback functions as input parameter. */
};

#if defined(__cplusplus)
extern "C" {
#endif

/***************************************************************************/ /*!
 *
 * @brief    Initialize the HTTP client request.
 *
 * @param params     Initialization parameters defined by @ref fnet_http_cln_params.
 *
 * @return This function returns:
 *   - HTTP client descriptor if no error occurs.
 *   - @c FNET_NULL if an error occurs.
 *
 * @see fnet_http_cln_release()
 *
 ******************************************************************************
 *
 * This function initializes the HTTP client service. It allocates all
 * resources needed and registers the HTTP client in the service polling list.@n
 * After the initialization, the user application should call the main polling
 * function @ref fnet_service_poll() periodically to run the HTTP client service
 * in the background.@n
 ******************************************************************************/
fnet_http_cln_desc_t fnet_http_cln_init( struct fnet_http_cln_params *params );

/***************************************************************************/ /*!
 *
 * @brief    Abort the HTTP session and release the HTTP client service.
 *
 * @param desc     HTTP client descriptor to be released.
 *
 * @see fnet_http_cln_init()
 *
 ******************************************************************************
 *
 * This function releases the HTTP client. It releases all resources
 * used by the service, and unregisters it from the service polling list.@n
 * Use this function only in the case of the early termination of the service,
 * because the HTTP client service is released automatically as soon as the
 * HTTP session is finished.
 *
 ******************************************************************************/
void fnet_http_cln_release(fnet_http_cln_desc_t desc);

/***************************************************************************/ /*!
 *
 * @brief    Detect if the HTTP client service is enabled or disabled.
 *
 * @param desc     HTTP client descriptor
 *
 * @return This function returns:
 *          - @ref FNET_TRUE if the HTTP client is successfully initialized.
 *          - @ref FNET_FALSE if the HTTP client is not initialized or is released.
 *
 ******************************************************************************
 *
 * This function detects if the HTTP client service is initialized or is released.
 *
 ******************************************************************************/
fnet_bool_t fnet_http_cln_is_enabled(fnet_http_cln_desc_t desc);

#if defined(__cplusplus)
}
#endif

/*! @} */

#endif /* FNET_CFG_HTTP_CLN */

#endif /* Under development */

#endif /* _FNET_HTTP_CLN_H_ */


text:
"""Version info (development version).

All users importing TFDS from `tfds-nightly` or synced to head will see
the `-nightly` suffix.

This file is replaced by `version_stable.py` for stable releases
(`tensorflow-datasets`) on PyPI.
"""

# We follow Semantic Versioning (https://semver.org/spec/v2.0.0.html)
_MAJOR_VERSION = '4'
_MINOR_VERSION = '7'
_PATCH_VERSION = '0'

__version__ = '.'.join([
    _MAJOR_VERSION,
    _MINOR_VERSION,
    _PATCH_VERSION,
]) + '+nightly'


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.eclipse.jetty.ajp Class Hierarchy (Jetty :: Aggregate :: All core Jetty 8.1.8.v20121106 API)</title>
<meta name="date" content="2012-11-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package org.eclipse.jetty.ajp

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

org.eclipse.jetty.io.AbstractConnection (implements org.eclipse.jetty.io.Connection)

org.eclipse.jetty.server.AbstractHttpConnection

org.eclipse.jetty.server.BlockingHttpConnection

org.eclipse.jetty.ajp.Ajp13Connection

org.eclipse.jetty.http.AbstractGenerator (implements org.eclipse.jetty.http.Generator)

org.eclipse.jetty.ajp.Ajp13Generator

org.eclipse.jetty.util.component.AbstractLifeCycle (implements org.eclipse.jetty.util.component.LifeCycle)

org.eclipse.jetty.util.component.AggregateLifeCycle (implements org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable)

org.eclipse.jetty.server.AbstractConnector (implements org.eclipse.jetty.server.Connector, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.http.HttpBuffers)

org.eclipse.jetty.server.bio.SocketConnector

org.eclipse.jetty.ajp.Ajp13SocketConnector

org.eclipse.jetty.ajp.Ajp13Packet

org.eclipse.jetty.ajp.Ajp13PacketMethods

org.eclipse.jetty.ajp.Ajp13Parser (implements org.eclipse.jetty.http.Parser)

org.eclipse.jetty.ajp.Ajp13RequestPacket

org.eclipse.jetty.io.BufferCache

org.eclipse.jetty.ajp.Ajp13RequestHeaders

org.eclipse.jetty.ajp.Ajp13ResponseHeaders

java.io.InputStream (implements java.io.Closeable)

javax.servlet.ServletInputStream

org.eclipse.jetty.ajp.Ajp13Parser.Input

org.eclipse.jetty.server.Request (implements javax.servlet.http.HttpServletRequest)

org.eclipse.jetty.ajp.Ajp13Request

Interface Hierarchy

org.eclipse.jetty.ajp.Ajp13Parser.EventHandler

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.


text:
/**
 * @author arodic / http://akirodic.com/
 */

(function() {

  REE.SceneState = function(config) {

    Carbon.call(this, config, THREE.Scene);

    this.registerProperties({
      _helpers: {
        value: new THREE.Scene(),
        type: THREE.Scene,
        writable: false
      }
    });

  };

  Carbon.create(REE.SceneState, THREE.Scene);

}());


text:
module Mongo
  module Operation

    # This module contains common functionality for convenience methods getting
    # various values from the spec.
    #
    # @since 2.0.0
    module Specifiable

      # The field for database name.
      #
      # @since 2.0.0
      DB_NAME = :db_name.freeze

      # The field for deletes.
      #
      # @since 2.0.0
      DELETES = :deletes.freeze

      # The field for delete.
      #
      # @since 2.0.0
      DELETE = :delete.freeze

      # The field for documents.
      #
      # @since 2.0.0
      DOCUMENTS = :documents.freeze

      # The field for collection name.
      #
      # @since 2.0.0
      COLL_NAME = :coll_name.freeze

      # The field for cursor count.
      #
      # @since 2.0.0
      CURSOR_COUNT = :cursor_count.freeze

      # The field for cursor id.
      #
      # @since 2.0.0
      CURSOR_ID = :cursor_id.freeze

      # The field for cursor ids.
      #
      # @since 2.0.0
      CURSOR_IDS = :cursor_ids.freeze

      # The field for an index.
      #
      # @since 2.0.0
      INDEX = :index.freeze

      # The field for multiple indexes.
      #
      # @since 2.0.0
      INDEXES = :indexes.freeze

      # The field for index names.
      #
      # @since 2.0.0
      INDEX_NAME = :index_name.freeze

      # The field for options.
      #
      # @since 2.0.0
      OPTIONS = :options.freeze

      # The field for a selector.
      #
      # @since 2.0.0
      SELECTOR = :selector.freeze

      # The field for number to return.
      #
      # @since 2.0.0
      TO_RETURN = :to_return.freeze

      # The field for updates.
      #
      # @since 2.0.0
      UPDATES = :updates.freeze

      # The field for update.
      #
      # @since 2.0.0
      UPDATE = :update.freeze

      # The field name for a user.
      #
      # @since 2.0.0
      USER = :user.freeze

      # The field name for user name.
      #
      # @since 2.0.0
      USER_NAME = :user_name.freeze

      # The field name for a write concern.
      #
      # @since 2.0.0
      WRITE_CONCERN = :write_concern.freeze

      # The field name for the read preference.
      #
      # @since 2.0.0
      READ = :read.freeze

      # @return [ Hash ] spec The specification for the operation.
      attr_reader :spec

      # Check equality of two specifiable operations.
      #
      # @example Are the operations equal?
      #   operation == other
      #
      # @param [ Object ] other The other operation.
      #
      # @return [ true, false ] Whether the objects are equal.
      #
      # @since 2.0.0
      def ==(other)
        return false unless other.is_a?(Specifiable)
        spec == other.spec
      end
      alias_method :eql?, :==

      # Get the cursor count from the spec.
      #
      # @example Get the cursor count.
      #   specifiable.cursor_count
      #
      # @return [ Integer ] The cursor count.
      #
      # @since 2.0.0
      def cursor_count
        spec[CURSOR_COUNT]
      end

      # The name of the database to which the operation should be sent.
      #
      # @example Get the database name.
      #   specifiable.db_name
      #
      # @return [ String ] Database name.
      #
      # @since 2.0.0
      def db_name
        spec[DB_NAME]
      end

      # Get the deletes from the specification.
      #
      # @example Get the deletes.
      #   specifiable.deletes
      #
      # @return [ Array<BSON::Document> ] The deletes.
      #
      # @since 2.0.0
      def deletes
        spec[DELETES]
      end

      # Get the delete document from the specification.
      #
      # @example Get the delete document.
      #   specifiable.delete
      #
      # @return [ Hash ] The delete document.
      #
      # @since 2.0.0
      def delete
        spec[DELETE]
      end

      # The documents to in the specification.
      #
      # @example Get the documents.
      #   specifiable.documents
      #
      # @return [ Array<BSON::Document> ] The documents.
      #
      # @since 2.0.0
      def documents
        spec[DOCUMENTS]
      end

      # The name of the collection to which the operation should be sent.
      #
      # @example Get the collection name.
      #   specifiable.coll_name
      #
      # @return [ String ] Collection name.
      #
      # @since 2.0.0
      def coll_name
        spec[COLL_NAME]
      end

      # The id of the cursor created on the server.
      #
      # @example Get the cursor id.
      #   specifiable.cursor_id
      #
      # @return [ Integer ] The cursor id.
      #
      # @since 2.0.0
      def cursor_id
        spec[CURSOR_ID]
      end

      # The ids of the cursors to kill from the spec.
      #
      # @example Get the cursor ids from the spec.
      #   specifiable.cursor_ids
      #
      # @return [ Array<Integer> ] The cursor ids.
      #
      # @since 2.0.0
      def cursor_ids
        spec[CURSOR_IDS]
      end

      # Get the index from the specification.
      #
      # @example Get the index specification.
      #   specifiable.index
      #
      # @return [ Hash ] The index specification.
      #
      # @since 2.0.0
      def index
        spec[INDEX]
      end

      # Get the index name from the spec.
      #
      # @example Get the index name.
      #   specifiable.index_name
      #
      # @return [ String ] The index name.
      #
      # @since 2.0.0
      def index_name
        spec[INDEX_NAME]
      end

      # Get the indexes from the specification.
      #
      # @example Get the index specifications.
      #   specifiable.indexes
      #
      # @return [ Hash ] The index specifications.
      #
      # @since 2.0.0
      def indexes
        spec[INDEXES]
      end

      # Create the new specifiable operation.
      #
      # @example Create the new specifiable operation.
      #   Specifiable.new(spec)
      #
      # @param [ Hash ] spec The operation specification.
      #
      # @see The individual operations for the values they require in their
      #   specs.
      #
      # @since 2.0.0
      def initialize(spec)
        @spec = spec
      end

      # Get the options for the operation.
      #
      # @example Get the options.
      #   specifiable.options
      #
      # @return [ Hash ] The options.
      #
      # @since 2.0.0
      def options
        spec[OPTIONS] || {}
      end

      # The selector for from the specification.
      #
      # @example Get a selector specification.
      #   specifiable.selector.
      #
      # @return [ Hash ] The selector spec.
      #
      # @since 2.0.0
      def selector
        spec[SELECTOR]
      end

      # The number of documents to request from the server.
      #
      # @example Get the to return value from the spec.
      #   specifiable.to_return
      #
      # @return [ Integer ] The number of documents to return.
      #
      # @since 2.0.0
      def to_return
        spec[TO_RETURN]
      end

      # The update documents from the spec.
      #
      # @example Get the update documents.
      #
      # @return [ Array<BSON::Document> ] The update documents.
      #
      # @since 2.0.0
      def updates
        spec[UPDATES]
      end

      # The update document from the spec.
      #
      # @example Get the update document.
      #
      # @return [ Hash ] The update document.
      #
      # @since 2.0.0
      def update
        spec[UPDATE]
      end

      # The user for user related operations.
      #
      # @example Get the user.
      #   specifiable.user
      #
      # @return [ Auth::User ] The user.
      #
      # @since 2.0.0
      def user
        spec[USER]
      end

      # The user name from the specification.
      #
      # @example Get the user name.
      #   specifiable.user_name
      #
      # @return [ String ] The user name.
      #
      # @since 2.0.
      def user_name
        spec[USER_NAME]
      end

      # The write concern to use for this operation.
      #
      # @example Get the write concern.
      #   specifiable.write_concern
      #
      # @return [ Mongo::WriteConcern ] The write concern.
      #
      # @since 2.0.0
      def write_concern
        @spec[WRITE_CONCERN] || WriteConcern.get(WriteConcern::DEFAULT)
      end

      # The read preference for this operation.
      #
      # @example Get the read preference.
      #   specifiable.read
      #
      # @return [ Mongo::ServerSelector ] The read preference.
      #
      # @since 2.0.0
      def read
        @spec[READ] || ServerSelector.get
      end
    end
  end
end


text:
#include "ListDevices.h"
#include "PacketExceptions.h"

#include <iostream>

namespace secret_listener
{

ListDevices::ListDevices()
{
	char pcap_errorbuf[PCAP_ERRBUF_SIZE + 1] = "";

	if(-1 == pcap_findalldevs(&all_devices, pcap_errorbuf))
	{
		throw pcap_open_error() << pt_error_info(std::string(pcap_errorbuf));
	}

	pcap_if_t* dev = all_devices;
	while(dev != 0)
	{
		std::cout << dev->name << std::endl;
		dev = dev->next;
	}

}

ListDevices::~ListDevices()
{
	pcap_freealldevs(all_devices);
}

}


text:
<?php
use yii\helpers\Html;
use app\widgets\ZActiveForm;
use app\models\Set;
/* @var $this yii\web\View */
/* @var $model sys\models\SysInfo */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ZActiveForm::begin();
        $form->fieldConfig=[
            'template' => '{label}
{input}{hint}{error}
',
            'labelOptions' => [
                'class' => 'control-label col-sm-3'
            ],
        ];

    ?>

        <?php $i=1; foreach ($settings as $k => $set):?>
        <li role="presentation" class="<?php if($i==1):?>active<?php endif;?>"><a href="#<?=$k?>" aria-controls="<?=Set::getModule($k)?>" role="tab" data-toggle="tab"><?=Set::getModule($k)?>

        <?php $i++;endforeach;?>

        <?php $i=1; foreach ($settings as $ke => $set):?>
            <div role="tabpanel" class="tab-pane <?php if($i==1):?>active<?php endif;?>" id="<?=$ke?>">

                    <?php foreach ($set as $k => $model):?>
                    <?php
                    if($model->stype == Set::TYPE_INPUT)
                    	echo $form->field($model, "[$model->sname]svalue")->textInput(['maxlength' => 20])->label($model->sintro)->hint($model->sname);
                    elseif($model->stype == Set::TYPE_TEXTAREA)
                        echo $form->field($model, "[$model->sname]svalue")->textarea(['rows' => 6])->label($model->sintro)->hint($model->sname);
                    elseif($model->stype == Set::TYPE_SELECT)
                        echo $form->field($model, "[$model->sname]svalue")->dropDownList(unserialize($model->svalues))->label($model->sintro)->hint($model->sname);
                    elseif($model->stype == Set::TYPE_CHECKBOX)
                        echo $form->field($model, "[$model->sname]svalue")->checkboxList(unserialize($model->svalues))->label($model->sintro)->hint($model->sname);
                    elseif($model->stype == Set::TYPE_RADIO)
                        echo $form->field($model, "[$model->sname]svalue")->radioList(unserialize($model->svalues))->label($model->sintro)->hint($model->sname);
                    elseif($model->stype == Set::TYPE_FILE)
                        echo $form->field($model, "[$model->sname]svalue")->fileInput()->label($model->sintro)->hint($model->sname);
                    ?>
                    <?php endforeach;?>

        <?php $i++; endforeach;?>

        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ZActiveForm::end(); ?>