text:
define({
  "commonCore": {
    "common": {
      "add": "Dodaj",
      "edit": "Edytuj",
      "save": "Zapisz",
      "next": "Dalej",
      "cancel": "Anuluj",
      "back": "Wstecz",
      "apply": "Zastosuj",
      "close": "Zamknij",
      "open": "Otwórz",
      "start": "Początek",
      "loading": "Wczytywanie",
      "disabledAdmin": "Opcja ta została wyłączona przez Administratora",
      "width": "Szerokość",
      "height": "Wysokość",
      "create": "Utwórz",
      "yes": "Tak",
      "no": "Nie",
      "mystories": "Moje narracje"
    },
    "inlineFieldEdit": {
      "editMe": "Edytuj!",
      "enterTitle": "Wprowadź tytuł...",
      "enterSubtitle": "Wprowadź opcjonalny podtytuł..."
    },
    "builderPanel": {
      "panelHeader": "Kreator szablonu %TPL_NAME%",
      "buttonSaving": "Zapisywanie",
      "buttonSaved": "Zapisane",
      "buttonShare": "Udostępnij",
      "buttonSettings": "Ustawienia",
      "buttonHelp": "Pomoc",
      "buttonPreview": "Wyświetl narrację",
      "tooltipFirstSave": "Z tego elementu można skorzystać dopiero po zapisaniu.",
      "tooltipNotShared": "Z tego elementu można skorzystać dopiero po udostępnieniu.",
      "tooltipNotShared2": "Twoja narracja nie jest udostępniana, tylko Ty masz do niej dostęp.",
      "noPendingChange": "Brak oczekujących zmian",
      "unSavedChangePlural": "Oczekujące zmiany",
      "closeWithPendingChange": "Czy na pewno chcesz potwierdzić tę operację? Zmiany zostaną utracone.",
      "saveError": "Zapisywanie nie powiodło się, spróbuj ponownie",
      "status1": "Narracja została udostępniona, ale wystąpiły problemy",
      "status2": "Narracja nie została udostępniona, ale wystąpiły problemy",
      "status3": "Narracja jest publiczna",
      "status4": "Narracja została udostępniana w obrębie Twojej instytucji",
      "status5": "Narracja jest prywatna",
      "status6": "Narracja nie została jeszcze zapisana",
      "checking": "Trwa sprawdzanie",
      "fix": "Napraw"
    },
    "saveError": {
      "title": "Błąd podczas zapisywania narracji",
      "err1Div1": "Nie można zapisać narracji, ponieważ istnieje już inny element o tej samej nazwie.",
      "err1Div2": "Zmodyfikuj tytuł narracji i ponownie ją zapisz.",
      "btnOk": "Edytuj tytuł narracji"
    },
    "saveErrorSocial": {
      "title": "Udostępnianie aktualizacji w serwisach społecznościowych",
      "panel1": "Wygląd narracji w serwisach społecznościowych został poprawiony, ale tytuł elementu aplikacji internetowej ArcGIS jest inny niż tytuł narracji.",
      "panel1tooltip": "Po zdefiniowaniu tytułu, podsumowania i obrazu miniatury, narracja będzie wyglądała następująco:",
      "panel2": "Którego tytułu chcesz używać w serwisach społecznościowych:",
      "panel2q1": "Tytuł narracji (zalecane)",
      "panel2q1tooltip": "Po wybraniu tej opcji tytuł elementu zostanie zmodyfikowany zgodnie z tytułem narracji, a dodatkowe zmiany w kreatorze zostaną zsynchronizowane.",
      "panel2q2": "Tytuł elementu",
      "panel3": "Aby dodatkowo poprawić wygląd narracji w serwisach społecznościowych, użyj karty ${MYSTORIES} w celu dodania podsumowania i obrazu miniatury.",
      "panel4": "Nie ostrzegaj ponownie dla tej narracji"
    },
    "share": {
      "shareTitle": "Udostępnij narrację",
      "preview": "Zobacz podgląd",
      "viewlive": "Wyświetl narrację",
      "btnPrivate": "Prywatna",
      "btnPrivateTooltip": "Tylko Ty widzisz narrację",
      "btnOrg": "Instytucja",
      "btnOrgTooltip": "Tylko członkowie Twojej instytucji widzą narrację",
      "btnPublic": "Publiczna",
      "btnPublicTooltip": "Każdy widzi narrację",
      "loadingMessage": "Sprawdzanie narracji pod kątem problemów",
      "viewToggle1": "Wyświetl zawartość narracji",
      "viewToggle2": "Zamknij zawartość narracji",
      "socialize": "Udostępnij w mediach społecznościowych",
      "statusPrivate": "Twoja narracja jest prywatna. Tylko Ty ją widzisz.",
      "statusError": "W zawartości Twojej narracji wystąpiły problemy, które będą widoczne dla czytelników. Poniżej możesz je znaleźć i rozwiązać.",
      "statusNoErrPrivate": "Udostępnij narrację, gdy będzie gotowa!",
      "mystoriesinvite": "Zarządzaj narracjami",
      "notavailable1": "Przykro nam, ale nie można udostępnić narracji z poziomu Kreatora, ponieważ ta aplikacja nie jest hostowana przez produkt %PRODUCT%.",
      "notavailable2": "Przykro nam, ale z poziomu Kreatora nie można udostępnić narracji w tej wersji witryny Portal for ArcGIS (wymagana jest wersja 10.4 lub nowsza).",
      "notavailable3": "Można udostępnić narrację tutaj: %LINK%.",
      "notavailable4": "Moje narracje",
      "notavailable5": "to jest strona elementu",
      "notavailable6": "Przykro nam, ale ta funkcja nie jest obsługiwana w trybie deweloperskim. W zależności od planu wdrożenia ta funkcja może być obsługiwana po jej wdrożeniu.",
      "notavailable7": "Sprawdź na karcie %MYCONTENT%, czy mapy i warstwy wykorzystane w narracji zostały również udostępnione.",
      "notavailable8": "Moje zasoby",
      "mystoriesinvite2": "Aby poprawić wygląd narracji w sieciach społecznościowych, użyj karty ${MYSTORIES} w celu dodania podsumowania i obrazu miniatury."
    },
    "settings": {
      "header": "Ustawienia",
      "tabError": "Sprawdź, czy poszczególne karty nie zawierają błędnych danych"
    },
    "settingsLayout": {
      "title": "Kompozycja",
      "explain": "Jakiego układu chcesz użyć?",
      "explainInit": "W oknie dialogowym ustawień możesz zmienić układ w dowolnej chwili.",
      "viewExample": "Wyświetl przykład online"
    },
    "settingsTheme": {
      "title": "Motyw"
    },
    "settingsHeader": {
      "title": "Nagłówek",
      "logoEsriRadio": "Logo firmy Esri",
      "logoNoneRadio": "Brak logo",
      "logoOrgRadio": "Logotyp instytucji",
      "logoCustomRadio": "Mój logotyp",
      "logoCustomLabel": "Obraz:",
      "logoCustomUploadHelp": "Logotypy prezentują się najlepiej, gdy ich współczynnik szerokości do wysokości należy do zakresu od 1:1 do 5:1. Jeśli logotyp powiązany za pomocą łącza jest wyświetlany powoli, należy zapisać jego kopię i przesłać go w tym miejscu.",
      "logoCustomUploadTooltip": "Użyj przesłanego logotypu",
      "logoCustomUploadButton": "Prześlij logotyp",
      "logoUploadSizeError": "Wymiary obrazu w formacie GIF są za duże. Zmień jego wielkość, aby szerokość wynosiła ${PIXEL-WIDTH} pikseli.",
      "logoCustomLinkTooltip": "Łącze do logotypu",
      "logoCustomLinkPlaceholder": "Adres URL obrazu",
      "logoUploadGenericError": "Logotyp może być plikiem w formacie .bmp, .gif, .jpg, .jpeg lub .png. Plik w formacie .gif musi mieć szerokość mniejszą niż 250 pikseli, a wielkość mniejszą niż 10 MB.",
      "logoCustomTargetPlaceholder": "Strona internetowa otwierana po kliknięciu logotypu",
      "logoSocialText": "Motto:",
      "logoLink": "Łącze:",
      "lblSmallHeader": "Użyj nagłówka kompaktowego (bez podtytułu)"
    },
    "header": {
      "title": "Zmień tytuł swojej aplikacji %TPL_NAME%",
      "subtitle": "Zmień podtytuł swojej aplikacji %TPL_NAME%"
    }
  }
});


text:
Goals for the format, in order from most to least important:

  * Longevity: The format should be designed to be long-lived. This
    means that the format *must* have sufficient documentation to
    permit independent implementations to be designed, without
    requiring any reverse-engineering effort.

  * Simplicity: The format should be straightforward. In the worst
    case, it should be possible to write your own parser for the
    format.

  * Compactness: The format shouldn't waste excessive space.

## Format Description

The database is a gzip-encoded JSON blob. The decompressed contents
consist of:

 1. A JSON-encoded object containing the database size and
    checksum. [JSON Schema](schema/checksum.json)

 2. The byte `0xA` (i.e. the ASCII character `\n`).

 3. A JSON-encoded object containing the database contents.
    [JSON Schema](schema/database.json)

The format is designed to be agnostic to the hash algorithm
used. Multiple algorithms may be used simultaneously. By default, the
following algorithm is used:

  * SHA2-512/256

The following algorithms are also supported:

  * BLAKE2b

## Other Formats Considered

Here are some formats under consideration:

  * Relational databases (SQL)

    SQLite is embeddable, has Rust bindings, and is able to produce a
    database file that could plausibly be used as the integrity
    database. The main disadvantages of such an approach are:

     1. Any relational database is going to support massively more
        features than we need, introducing unnecessary complexity. In
        general these formats will be optimized for efficiency of
        lookup over simplicity.

     2. It's unclear how compact the resulting database will be: both
        the format itself, and artifacts resulting from trying to
        force fundamentally tree-shaped data into a relational schema.

     3. It's unclear what kind of longevity to expect from the
        database format. Major revisions to the database software may
        introduces incompatible changes to the database format.

     4. If the database format does change, reverse-engineering the
        format and writing a parser could be non-trivial.

    Other SQL implementations such as Postgres and MySQL have an
    additional drawback: they are generally intended to be used in
    daemon mode, and do not expose the database files to the end-user
    at all.

  * Other databases

    [cdb](https://cr.yp.to/cdb.html) is a "constant database" by
    D. J. Bernstein. At a first glance, cdb looks like a good fit for
    an integrity database. It supports a one-time creation operation,
    and read-only queries. The format is compact and simple enough to
    explain in a page of text. However, the format has a number of
    drawbacks:

      1. The format has a built-in limit of 4 GB. For cdb's intended
         use cases, this is more than sufficient. However, for an
         integrity database, it is plausible that for large file
         systems, an integrity database could grow to exceed 4 GB.

      2. The format is non-hierarchical, which will inevitably result
         in duplicated data in our use case.

  * Archive formats

    The tar file format is well-known and could plausibly serve our
    use case. Basically, the integrity database would be equivalent to
    the original directory structure, but instead of story the
    contents of files, we'd store checksums and other
    metadata. However:

     1. The tar format introduces unnecessary complexity.

     2. Tar archives may waste space for the purpose we're using them,
        because the format aligns records to a certain number of
        bytes.

     3. It's unclear how you'd interact with archive. Existing tools
        are intended to expand the archive into a set of files, but in
        this case we just want to scan through the contents in
        memory. While this is probably possible, it would likely
        require you to write a custom implementation, which would (due
        to the complexity of the format) introduce the possibility of
        bugs.

  * Message formats

    Various formats (JSON, CBOR, ProtoBufs, Avro, etc.) were
    originally intended as formats to encode messages for transfer
    over the wire, but can also be used to describe data at rest.

    A key advantage of these formats is that they are well-supported
    by [Serde](https://github.com/serde-rs/serde) making it easy to
    produce robust and high-quality serializers and deserializers for
    any of these formats.

    The advantage of JSON specifically is that it is
    ubiquitous: every language can be expected to have a mature JSON
    parser available. Also, because the format is self-describing, no
    prior knowledge of the format is required. Even better, the format
    is human-readable, so you don't even need to decode it to
    understand what you are looking at. The main disadvantages of JSON
    are:

      1. The cost of being human-readable and self-describing is
         compactness. The field names of objects will be repeated, and
         binary strings (such as hashes) will need to be encoded in
         something like base64.

      2. The format must be read sequentially, and does not permit
         random access. This is not an issue for the features
         described above, but could prove problematic for certain
         plausible extensions to the functionality of the tool.

    There are other formats that are less ubiquitous but improve on
    the first point by offering compact binary encodings.

    CBOR is a self-describing binary format that is relatively simple
    and has an [official standard](http://cbor.io/). Because it is
    self-describing, there will still be some inefficiency in the
    encoding, especially of objects.

    [Apache Avro](https://avro.apache.org/) is a binary format in
    which all documents are accompanied by a schema. Thus a document
    can be interpreted without any external knowledge of the schema,
    but avoids the repetition of traditional self-describing
    formats. However, the format is not standardized and it is unclear
    what stability guarantees are offered. Overall, Avro is less
    popular, so there is additional risk of the format being
    unsupported in the future.

  * Custom format

    It would also be possible to design a custom format. Version
    control systems like Git and Mercurial essentially do
    this. However, those projects have the advantage of being popular,
    so there is interest in having multiple robust implementations of
    their formats. For a new tool, however, it would be better to use
    existing, well-known formats, as these are more likely to provide
    the desired longevity.

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace KekRozsak\FrontBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;

use KekRozsak\FrontBundle\Entity\UserGroupMembership;
use KekRozsak\FrontBundle\Entity\Group;

use KekRozsak\FrontBundle\Form\Type\GroupType;

use KekRozsak\FrontBundle\Extensions\Slugifier;

/**
 * @Route("/csoportok")
 */
class GroupController extends Controller
{
    /**
     * @return array
     *
     * @Route("/", name="KekRozsakFrontBundle_groupList")
     * @Template()
     */
    public function listAction()
    {
        $groupRepo = $this
                        ->getDoctrine()
                        ->getRepository('KekRozsakFrontBundle:Group');
        $groups = $groupRepo->findAll(array('name' => 'ASC'));

        return array(
            'groups' => $groups,
        );
    }

    /**
     * @param  KekRozsak\FrontBundle\Entity\Group $group
     * @return array
     *
     * @Route("/csoport/{slug}/", name="KekRozsakFrontBundle_groupView")
     * @Template()
     * @ParamConverter("group")
     */
    public function viewAction(Group $group)
    {
        return array(
            'group' => $group,
        );
    }

    /**
     * @param  KekRozsak\FrontBundle\Entity\Group $group
     * @return array
     *
     * @Route("/csoport/{slug}/tagok.html", name="KekRozsakFrontBundle_groupMembers")
     * @Template()
     * @ParamConverter("group")
     */
    public function membersAction(Group $group)
    {
        return array(
            'group' => $group,
        );
    }

    /**
     * @param  KekRozsak\FrontBundle\Entity\Group $group
     * @return array
     *
     * @Route("/csoport/{slug}/dokumentumok.html", name="KekRozsakFrontBundle_groupDocuments")
     * @Template()
     * @ParamConverter("group")
     */
    public function documentsAction(Group $group)
    {
        return array(
            'group' => $group,
        );
    }

    /**
     * @param  KekRozsak\FrontBundle\Entity\Group $group
     * @return array
     *
     * @Route("/csoport/{slug}/belepes.do", name="KekRozsakFrontBundle_groupJoin")
     * @Template()
     * @ParamConverter("group")
     */
    public function joinAction(Group $group)
    {
        $user = $this->get('security.context')->getToken()->getUser();

        if ($group->isMember($user)) {
            return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array('slug' => $group->getSlug())));
        }

        if ($group->isRequested($user)) {
            return array(
                'isRequested'  => true,
                'needApproval' => false,
                'group'        => $group,
            );
        }

        $membership = new UserGroupMembership($user, $group);
        $membership->setUser($user);
        $membership->setGroup($group);
        $membership->setMembershipRequestedAt(new \DateTime('now'));
        if ($group->isOpen()) {
            $membership->setMembershipAcceptedAt(new \DateTime('now'));
        }

        $em = $this->getDoctrine()->getManager();
        $em->persist($membership);
        $em->flush();

        if ($group->isOpen()) {
            return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array('slug' => $group->getSlug())));
        } else {
            $message = \Swift_Message::newInstance()
                        ->setSubject('Új jelentkező a csoportodban (' . $group->getName() . '): ' . $user->getDisplayName())
                        // TODO: Make this a config parameter!
                        ->setFrom('info@blueroses.hu')
                        ->setTo($group->getLeader()->getEmail())
                        ->setBody($this->renderView('KekRozsakFrontBundle:Email:groupJoinRequest.txt.twig', array('user' => $user, 'group' => $group)));
            $this->get('mailer')->send($message);

            return array(
                'isRequested'  => false,
                'needApproval' => true,
                'group'        => $group,
            );
        }
    }

    /**
     * @return array
     *
     * @Route("/csoportok/uj.html", name="KekRozsakFrontBundle_groupCreate")
     * @Template()
     */
    public function createAction()
    {
        $group = new Group();
        $form = $this->createForm(new GroupType(), $group);
        $request = $this->getRequest();

        if ($request->getMethod() == 'POST') {
            $form->bind($request);
            if ($form->isValid()) {
                $slugifier = new Slugifier();
                $user = $this->get('security.context')->getToken()->getUser();

                $group->setCreatedBy($user);
                $group->setSlug($slugifier->slugify($group->getName()));
                $group->setCreatedAt(new \DateTime('now'));
                $group->setOpen(true);

                $em = $this->getDoctrine()->getManager();
                $em->persist($group);
                $em->flush();

                $membership = new UserGroupMembership($user, $group);
                $em->persist($membership);
                $em->flush();

                return $this->redirect(
                        $this->generateUrl('KekRozsakFrontBundle_groupList')
                    );
            }
        }

        return array(
            'form' => $form->createView(),
        );
    }
}


text:
{% load i18n wagtailadmin_tags %}

    {% if value %}

{% blocktrans with time_period=value|timesince %}{{ time_period }} ago{% endblocktrans %}

    {% endif %}


text:
package alpm

import (
	"strings"

	"github.com/anchore/packageurl-go"
	"github.com/anchore/syft/syft/linux"
	"github.com/anchore/syft/syft/pkg"
	"github.com/anchore/syft/syft/source"
)

func newPackage(m pkg.AlpmMetadata, release *linux.Release, locations ...source.Location) pkg.Package {
	p := pkg.Package{
		Name:         m.Package,
		Version:      m.Version,
		Locations:    source.NewLocationSet(locations...),
		Type:         pkg.AlpmPkg,
		Licenses:     strings.Split(m.License, " "),
		PURL:         packageURL(m, release),
		MetadataType: pkg.AlpmMetadataType,
		Metadata:     m,
	}
	p.SetID()
	return p
}

func packageURL(m pkg.AlpmMetadata, distro *linux.Release) string {
	if distro == nil || distro.ID != "arch" {
		// note: there is no namespace variation (like with debian ID_LIKE for ubuntu ID, for example)
		return ""
	}

	qualifiers := map[string]string{
		pkg.PURLQualifierArch: m.Architecture,
	}

	if m.BasePackage != "" {
		qualifiers[pkg.PURLQualifierUpstream] = m.BasePackage
	}

	return packageurl.NewPackageURL(
		"alpm", // `alpm` for Arch Linux and other users of the libalpm/pacman package manager. (see https://github.com/package-url/purl-spec/pull/164)
		distro.ID,
		m.Package,
		m.Version,
		pkg.PURLQualifiers(
			qualifiers,
			distro,
		),
		"",
	).ToString()
}


text:
class CreateGames < ActiveRecord::Migration
  def change
    create_table :games do |t|
      t.string :name
      t.integer :owner_id
      t.timestamps
    end
  end
end


text:
import _plotly_utils.basevalidators

class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator):
    def __init__(
        self, plotly_name="execute", parent_name="layout.updatemenu.button", **kwargs
    ):
        super(ExecuteValidator, self).__init__(
            plotly_name=plotly_name,
            parent_name=parent_name,
            edit_type=kwargs.pop("edit_type", "arraydraw"),
            role=kwargs.pop("role", "info"),
            **kwargs
        )


text:
package com.danidemi.jlubricant.org.springframework.security.provisioning;

import java.security.SecureRandom;
import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * An type of {@link org.springframework.security.provisioning.JdbcUserDetailsManager} that supports
 * password encoding.
 */
public class JdbcUserDetailsManager extends org.springframework.security.provisioning.JdbcUserDetailsManager {

	private PasswordEncoder passwordEncoder;

	@Override
	public void createUser(UserDetails user) {
		super.createUser( new PasswordEncodedUser( user ) );
	}

	@Override
	public void updateUser(UserDetails user) {
		super.createUser( new PasswordEncodedUser( user ) );
	}

	public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
		this.passwordEncoder = passwordEncoder;
	}

	private class PasswordEncodedUser implements UserDetails {

		private static final long serialVersionUID = -8103487155453483943L;
		private UserDetails delegate;

		private PasswordEncodedUser(UserDetails originalUser){
			this.delegate = originalUser;
		}

		public Collection<? extends GrantedAuthority> getAuthorities() {
			return delegate.getAuthorities();
		}

		public String getPassword() {
			String originalPassword = delegate.getPassword();
			String encodedPassword = JdbcUserDetailsManager.this.passwordEncoder.encode(originalPassword);
			return encodedPassword;
		}

		public String getUsername() {
			return delegate.getUsername();
		}

		public boolean isAccountNonExpired() {
			return delegate.isAccountNonExpired();
		}

		public boolean isAccountNonLocked() {
			return delegate.isAccountNonLocked();
		}

		public boolean isCredentialsNonExpired() {
			return delegate.isCredentialsNonExpired();
		}

		public boolean isEnabled() {
			return delegate.isEnabled();
		}

	}

	public static void main(String[] args) {
		SecureRandom sr = new SecureRandom();
		BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder(4, sr);
		System.out.println( bCryptPasswordEncoder.encode("rawPassword") );
		System.out.println( bCryptPasswordEncoder.encode("a") );
		System.out.println( bCryptPasswordEncoder.encode("$2a$10$Yj7aL2pDLet5m5pWlNLlpuNH8YeDXyWDq5Z4d1CzFQaAlAkWz/9xm") );
		System.out.println( bCryptPasswordEncoder.encode("$2a$10$Yj7aL2pDLet5m5pWlNLlpuNH8YeDXyWDq5Z4d1CzFQaAlAkWz/9xm").length() );
	}

}


text:
<?php
include("include/settings.php");
if(isset($_POST['name']) && isset($_POST['contactEmail']) && isset($_POST['message'])){
    $name = $_POST['name'];
    $from = $_POST['contactEmail'];
    $message = $_POST['message'];

	$subject = "Message from " . $name;

	if (mail ($to, $subject, $message, $from)) {
		$response = array('sent' => 1);
		echo json_encode($response);
	} else {
		$response = array('sent' => 0);
		echo json_encode($response);
	}
}
?>


text:
package com.amazonaws.services.iotfleetwise.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateModelManifestRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The name of the vehicle model to create.
     *

     */
    private String name;
    /**
     *

     * A brief description of the vehicle model.
     *

     */
    private String description;
    /**
     *

     * A list of nodes, which are a general abstraction of signals.
     *

     */
    private java.util.List<String> nodes;
    /**
     *

     * The Amazon Resource Name (ARN) of a signal catalog.
     *

     */
    private String signalCatalogArn;
    /**
     *

     * Metadata that can be used to manage the vehicle model.
     *

     */
    private java.util.List<Tag> tags;

    /**
     *

     * The name of the vehicle model to create.
     *

     *
     * @param name
     *        The name of the vehicle model to create.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * The name of the vehicle model to create.
     *

     *
     * @return The name of the vehicle model to create.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * The name of the vehicle model to create.
     *

     *
     * @param name
     *        The name of the vehicle model to create.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * A brief description of the vehicle model.
     *

     *
     * @param description
     *        A brief description of the vehicle model.
     */

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     *

     * A brief description of the vehicle model.
     *

     *
     * @return A brief description of the vehicle model.
     */

    public String getDescription() {
        return this.description;
    }

    /**
     *

     * A brief description of the vehicle model.
     *

     *
     * @param description
     *        A brief description of the vehicle model.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withDescription(String description) {
        setDescription(description);
        return this;
    }

    /**
     *

     * A list of nodes, which are a general abstraction of signals.
     *

     *
     * @return A list of nodes, which are a general abstraction of signals.
     */

    public java.util.List<String> getNodes() {
        return nodes;
    }

    /**
     *

     * A list of nodes, which are a general abstraction of signals.
     *

     *
     * @param nodes
     *        A list of nodes, which are a general abstraction of signals.
     */

    public void setNodes(java.util.Collection<String> nodes) {
        if (nodes == null) {
            this.nodes = null;
            return;
        }

        this.nodes = new java.util.ArrayList<String>(nodes);
    }

    /**
     *

     * A list of nodes, which are a general abstraction of signals.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setNodes(java.util.Collection)} or {@link #withNodes(java.util.Collection)} if you want to override the
     * existing values.
     *

     *
     * @param nodes
     *        A list of nodes, which are a general abstraction of signals.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withNodes(String... nodes) {
        if (this.nodes == null) {
            setNodes(new java.util.ArrayList<String>(nodes.length));
        }
        for (String ele : nodes) {
            this.nodes.add(ele);
        }
        return this;
    }

    /**
     *

     * A list of nodes, which are a general abstraction of signals.
     *

     *
     * @param nodes
     *        A list of nodes, which are a general abstraction of signals.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withNodes(java.util.Collection<String> nodes) {
        setNodes(nodes);
        return this;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of a signal catalog.
     *

     *
     * @param signalCatalogArn
     *        The Amazon Resource Name (ARN) of a signal catalog.
     */

    public void setSignalCatalogArn(String signalCatalogArn) {
        this.signalCatalogArn = signalCatalogArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of a signal catalog.
     *

     *
     * @return The Amazon Resource Name (ARN) of a signal catalog.
     */

    public String getSignalCatalogArn() {
        return this.signalCatalogArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of a signal catalog.
     *

     *
     * @param signalCatalogArn
     *        The Amazon Resource Name (ARN) of a signal catalog.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withSignalCatalogArn(String signalCatalogArn) {
        setSignalCatalogArn(signalCatalogArn);
        return this;
    }

    /**
     *

     * Metadata that can be used to manage the vehicle model.
     *

     *
     * @return Metadata that can be used to manage the vehicle model.
     */

    public java.util.List<Tag> getTags() {
        return tags;
    }

    /**
     *

     * Metadata that can be used to manage the vehicle model.
     *

     *
     * @param tags
     *        Metadata that can be used to manage the vehicle model.
     */

    public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<Tag>(tags);
    }

    /**
     *

     * Metadata that can be used to manage the vehicle model.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
     * existing values.
     *

     *
     * @param tags
     *        Metadata that can be used to manage the vehicle model.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withTags(Tag... tags) {
        if (this.tags == null) {
            setTags(new java.util.ArrayList<Tag>(tags.length));
        }
        for (Tag ele : tags) {
            this.tags.add(ele);
        }
        return this;
    }

    /**
     *

     * Metadata that can be used to manage the vehicle model.
     *

     *
     * @param tags
     *        Metadata that can be used to manage the vehicle model.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateModelManifestRequest withTags(java.util.Collection<Tag> tags) {
        setTags(tags);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getDescription() != null)
            sb.append("Description: ").append(getDescription()).append(",");
        if (getNodes() != null)
            sb.append("Nodes: ").append(getNodes()).append(",");
        if (getSignalCatalogArn() != null)
            sb.append("SignalCatalogArn: ").append(getSignalCatalogArn()).append(",");
        if (getTags() != null)
            sb.append("Tags: ").append(getTags());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof CreateModelManifestRequest == false)
            return false;
        CreateModelManifestRequest other = (CreateModelManifestRequest) obj;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getDescription() == null ^ this.getDescription() == null)
            return false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
            return false;
        if (other.getNodes() == null ^ this.getNodes() == null)
            return false;
        if (other.getNodes() != null && other.getNodes().equals(this.getNodes()) == false)
            return false;
        if (other.getSignalCatalogArn() == null ^ this.getSignalCatalogArn() == null)
            return false;
        if (other.getSignalCatalogArn() != null && other.getSignalCatalogArn().equals(this.getSignalCatalogArn()) == false)
            return false;
        if (other.getTags() == null ^ this.getTags() == null)
            return false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
        hashCode = prime * hashCode + ((getNodes() == null) ? 0 : getNodes().hashCode());
        hashCode = prime * hashCode + ((getSignalCatalogArn() == null) ? 0 : getSignalCatalogArn().hashCode());
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
        return hashCode;
    }

    @Override
    public CreateModelManifestRequest clone() {
        return (CreateModelManifestRequest) super.clone();
    }

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Main Page

Classes

Files

        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)"
             onblur="searchBox.OnSearchFieldFocus(false)"
             onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Members

tetramesh_stats_t Member List
This is the complete list of members for tetramesh_stats_t, including all inherited members.

avg_edge_len	tetramesh_stats_t

avg_skewness	tetramesh_stats_t

avg_volume	tetramesh_stats_t

max_edge_len	tetramesh_stats_t

max_skewness	tetramesh_stats_t

max_volume	tetramesh_stats_t

min_edge_len	tetramesh_stats_t

min_skewness	tetramesh_stats_t

min_volume	tetramesh_stats_t

num_edges	tetramesh_stats_t

num_tetrahedra	tetramesh_stats_t

num_vertices	tetramesh_stats_t

std_edge_len	tetramesh_stats_t

std_skewness	tetramesh_stats_t

std_volume	tetramesh_stats_t

 All Classes Files Functions Variables Typedefs Defines

<address style="text-align: right;">Generated on Wed Apr 18 11:36:55 2012 by

 1.6.3 </address>


text:
import ActionType from '../../actions/ActionType'

export default (itemListBySearch = {}, action) => {
  const itemList = itemListBySearch[action.search];
  switch (action.type) {
    case ActionType.Pocket.Items.FETCH_REQUEST:
      if (itemList) {
        return {
          ...itemListBySearch,
          [action.search]: {
            ...itemList,
            isFetching: true,
          },
        }
      } else {
        return {
          ...itemListBySearch,
          [action.search]: {
            itemIDs: [],
            isFetching: true,
            nextOffset: 0,
            status: null
          }
        }
      }

    case ActionType.Pocket.Items.FETCH_SUCCESS:
      const newItemIDs = action.items.map(item => item.id);
      return {
        ...itemListBySearch,
        [action.search]: {
          itemIDs: [...itemList.itemIDs, ...newItemIDs],
          isFetching: false,
          nextOffset: itemList.nextOffset + 20,
          status: action.status
        }
      }

    case ActionType.Pocket.Items.ARCHIVE_REQUEST:
      return removeItem(itemListBySearch, action.itemID, /^$/);

    case ActionType.Pocket.Items.UNARCHIVE_REQUEST:
      return removeMatchingSearches(itemListBySearch, /^$/);

    case ActionType.Pocket.Items.DELETE_REQUEST:
      return removeItem(itemListBySearch, action.itemID, /^$/);

    default:
      return itemListBySearch;
  }
}

function removeItem(itemListBySearch, itemIDToRemove, searchRegex) {
  return Object.keys(itemListBySearch)
    .reduce((newItemListBySearch, search) => {
      if (searchRegex.test(search)) {
        const existingItemList = itemListBySearch[search];
        const newItemIDs = existingItemList.itemIDs.filter(
          itemID => itemID !== itemIDToRemove
        );
        if (newItemIDs.length < existingItemList.itemIDs.length) {
          newItemListBySearch[search] = {
            ...existingItemList,
            itemIDs: newItemIDs,
            nextOffset: existingItemList.nextOffset - 1,
          };
        } else {
          newItemListBySearch[search] = existingItemList;
        }
      }

      return newItemListBySearch;
    }, {});
}

function removeMatchingSearches(itemListBySearch, searchRegex) {
  return Object.keys(itemListBySearch)
    .reduce((newItemListBySearch, search) => {
      if (!searchRegex.test(search)) {
        newItemListBySearch[search] = itemListBySearch[search];
      }

      return newItemListBySearch;
    }, {});
}


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

<TITLE>
TypeToken (Objectify-AppEngine Javadoc)
</TITLE>

<META NAME="date" CONTENT="2012-01-25">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.googlecode.objectify.repackaged.gentyref

Class TypeToken<T>

java.lang.Object
  com.googlecode.objectify.repackaged.gentyref.TypeToken<T>

Type Parameters:
T - The type represented by this TypeToken.

public abstract class TypeToken<T>
extends java.lang.Object

Wrapper around Type.

 You can use this to create instances of Type for a type known at compile
 time.

 For example, to get the Type that represents List<String>:
 Type listOfString = new TypeToken<List<String>>(){}.getType();

Author:

Wouter Coekaerts <wouter@coekaerts.be>

Constructor Summary

protected
TypeToken()

          Constructs a type token.

Method Summary

 boolean
equals(java.lang.Object obj)

static

<T> TypeToken<T>

get(java.lang.Class<T> type)

          Gets type token for the given Class instance.

static TypeToken<?>
get(java.lang.reflect.Type type)

          Gets type token for the given Type instance.

 java.lang.reflect.Type
getType()

 int
hashCode()

Methods inherited from class java.lang.Object

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

Constructor Detail

TypeToken

protected TypeToken()

Constructs a type token.

Method Detail

getType

public java.lang.reflect.Type getType()

get

public static <T> TypeToken<T> get(java.lang.Class<T> type)

Gets type token for the given Class instance.

get

public static TypeToken<?> get(java.lang.reflect.Type type)

Gets type token for the given Type instance.

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 4.0a3


text:
using namespace DirectX;

// Constant buffer layout. Must match the shader!
struct AlphaTestEffectConstants
{
    XMVECTOR diffuseColor;
    XMVECTOR alphaTest;
    XMVECTOR fogColor;
    XMVECTOR fogVector;
    XMMATRIX worldViewProj;
};

// Traits type describes our characteristics to the EffectBase template.
struct AlphaTestEffectTraits
{
    typedef AlphaTestEffectConstants ConstantBufferType;

    static const int VertexShaderCount = 4;
    static const int PixelShaderCount = 4;
    static const int ShaderPermutationCount = 8;
};

// Internal AlphaTestEffect implementation class.
class AlphaTestEffect::Impl : public EffectBase<AlphaTestEffectTraits>
{
public:
    Impl(_In_ ID3D11Device* device);

    D3D11_COMPARISON_FUNC alphaFunction;
    int referenceAlpha;

    bool vertexColorEnabled;

    EffectColor color;

    int GetCurrentShaderPermutation();

    void Apply(_In_ ID3D11DeviceContext* deviceContext);
};

// Include the precompiled shader code.
namespace
{
    #include "Shaders/Compiled/AlphaTestEffect_VSAlphaTest.inc"
    #include "Shaders/Compiled/AlphaTestEffect_VSAlphaTestNoFog.inc"
    #include "Shaders/Compiled/AlphaTestEffect_VSAlphaTestVc.inc"
    #include "Shaders/Compiled/AlphaTestEffect_VSAlphaTestVcNoFog.inc"

    #include "Shaders/Compiled/AlphaTestEffect_PSAlphaTestLtGt.inc"
    #include "Shaders/Compiled/AlphaTestEffect_PSAlphaTestLtGtNoFog.inc"
    #include "Shaders/Compiled/AlphaTestEffect_PSAlphaTestEqNe.inc"
    #include "Shaders/Compiled/AlphaTestEffect_PSAlphaTestEqNeNoFog.inc"
}

const ShaderBytecode EffectBase<AlphaTestEffectTraits>::VertexShaderBytecode[] =
{
    { AlphaTestEffect_VSAlphaTest,        sizeof(AlphaTestEffect_VSAlphaTest)        },
    { AlphaTestEffect_VSAlphaTestNoFog,   sizeof(AlphaTestEffect_VSAlphaTestNoFog)   },
    { AlphaTestEffect_VSAlphaTestVc,      sizeof(AlphaTestEffect_VSAlphaTestVc)      },
    { AlphaTestEffect_VSAlphaTestVcNoFog, sizeof(AlphaTestEffect_VSAlphaTestVcNoFog) },
};

const int EffectBase<AlphaTestEffectTraits>::VertexShaderIndices[] =
{
    0,      // lt/gt
    1,      // lt/gt, no fog
    2,      // lt/gt, vertex color
    3,      // lt/gt, vertex color, no fog

    0,      // eq/ne
    1,      // eq/ne, no fog
    2,      // eq/ne, vertex color
    3,      // eq/ne, vertex color, no fog
};

const ShaderBytecode EffectBase<AlphaTestEffectTraits>::PixelShaderBytecode[] =
{
    { AlphaTestEffect_PSAlphaTestLtGt,      sizeof(AlphaTestEffect_PSAlphaTestLtGt)      },
    { AlphaTestEffect_PSAlphaTestLtGtNoFog, sizeof(AlphaTestEffect_PSAlphaTestLtGtNoFog) },
    { AlphaTestEffect_PSAlphaTestEqNe,      sizeof(AlphaTestEffect_PSAlphaTestEqNe)      },
    { AlphaTestEffect_PSAlphaTestEqNeNoFog, sizeof(AlphaTestEffect_PSAlphaTestEqNeNoFog) },
};

const int EffectBase<AlphaTestEffectTraits>::PixelShaderIndices[] =
{
    0,      // lt/gt
    1,      // lt/gt, no fog
    0,      // lt/gt, vertex color
    1,      // lt/gt, vertex color, no fog

    2,      // eq/ne
    3,      // eq/ne, no fog
    2,      // eq/ne, vertex color
    3,      // eq/ne, vertex color, no fog
};

// Global pool of per-device AlphaTestEffect resources.
SharedResourcePool<ID3D11Device*, EffectBase<AlphaTestEffectTraits>::DeviceResources> EffectBase<AlphaTestEffectTraits>::deviceResourcesPool;

// Constructor.
AlphaTestEffect::Impl::Impl(_In_ ID3D11Device* device)
  : EffectBase(device),
    alphaFunction(D3D11_COMPARISON_GREATER),
    referenceAlpha(0),
    vertexColorEnabled(false)
{
}

int AlphaTestEffect::Impl::GetCurrentShaderPermutation()
{
    int permutation = 0;

    // Use optimized shaders if fog is disabled.
    if (!fog.enabled)
    {
        permutation += 1;
    }

    // Support vertex coloring?
    if (vertexColorEnabled)
    {
        permutation += 2;
    }

    // Which alpha compare mode?
    if (alphaFunction == D3D11_COMPARISON_EQUAL ||
        alphaFunction == D3D11_COMPARISON_NOT_EQUAL)
    {
        permutation += 4;
    }

    return permutation;
}

// Sets our state onto the D3D device.
void AlphaTestEffect::Impl::Apply(_In_ ID3D11DeviceContext* deviceContext)
{
    // Compute derived parameter values.
    matrices.SetConstants(dirtyFlags, constants.worldViewProj);

    fog.SetConstants(dirtyFlags, matrices.worldView, constants.fogVector);

    color.SetConstants(dirtyFlags, constants.diffuseColor);

    // Recompute the alpha test settings?
    if (dirtyFlags & EffectDirtyFlags::AlphaTest)
    {
        // Convert reference alpha from 8 bit integer to 0-1 float format.
        float reference = (float)referenceAlpha / 255.0f;

        // Comparison tolerance of half the 8 bit integer precision.
        const float threshold = 0.5f / 255.0f;

        static const XMVECTORF32 thresholdY = { 0, threshold, 0, 0 };

        // What to do if the alpha comparison passes or fails. Positive accepts the pixel, negative clips it.
        static const XMVECTORF32 selectIfTrue  = {  1, -1 };
        static const XMVECTORF32 selectIfFalse = { -1,  1 };
        static const XMVECTORF32 selectNever   = { -1, -1 };
        static const XMVECTORF32 selectAlways  = {  1,  1 };

        float compareTo;
        XMVECTOR resultSelector;

        switch (alphaFunction)
        {
            case D3D11_COMPARISON_LESS:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = reference - threshold;
                resultSelector = selectIfTrue;
                break;

            case D3D11_COMPARISON_LESS_EQUAL:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = reference + threshold;
                resultSelector = selectIfTrue;
                break;

            case D3D11_COMPARISON_GREATER_EQUAL:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = reference - threshold;
                resultSelector = selectIfFalse;
                break;

            case D3D11_COMPARISON_GREATER:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = reference + threshold;
                resultSelector = selectIfFalse;
                break;

            case D3D11_COMPARISON_EQUAL:
                // Shader will evaluate: clip((abs(a - x) < y) ? z : w)
                compareTo = reference;
                resultSelector = selectIfTrue;
                break;

            case D3D11_COMPARISON_NOT_EQUAL:
                // Shader will evaluate: clip((abs(a - x) < y) ? z : w)
                compareTo = reference;
                resultSelector = selectIfFalse;
                break;

            case D3D11_COMPARISON_NEVER:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = 0;
                resultSelector = selectNever;
                break;

            case D3D11_COMPARISON_ALWAYS:
                // Shader will evaluate: clip((a < x) ? z : w)
                compareTo = 0;
                resultSelector = selectAlways;
                break;

            default:
                throw std::exception("Unknown alpha test function");
        }

        // x = compareTo, y = threshold, zw = resultSelector.
        constants.alphaTest = XMVectorPermute<0, 1, 4, 5>(XMLoadFloat(&compareTo) + thresholdY, resultSelector);

        dirtyFlags &= ~EffectDirtyFlags::AlphaTest;
        dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
    }

    // Set the texture.
    ID3D11ShaderResourceView* textures[1] = { texture.Get() };

    deviceContext->PSSetShaderResources(0, 1, textures);

    // Set shaders and constant buffers.
    ApplyShaders(deviceContext, GetCurrentShaderPermutation());
}

// Public constructor.
AlphaTestEffect::AlphaTestEffect(_In_ ID3D11Device* device)
  : pImpl(new Impl(device))
{
}

// Move constructor.
AlphaTestEffect::AlphaTestEffect(AlphaTestEffect&& moveFrom)
  : pImpl(std::move(moveFrom.pImpl))
{
}

// Move assignment.
AlphaTestEffect& AlphaTestEffect::operator= (AlphaTestEffect&& moveFrom)
{
    pImpl = std::move(moveFrom.pImpl);
    return *this;
}

// Public destructor.
AlphaTestEffect::~AlphaTestEffect()
{
}

void AlphaTestEffect::Apply(_In_ ID3D11DeviceContext* deviceContext)
{
    pImpl->Apply(deviceContext);
}

void AlphaTestEffect::GetVertexShaderBytecode(_Out_ void const** pShaderByteCode, _Out_ size_t* pByteCodeLength)
{
    pImpl->GetVertexShaderBytecode(pImpl->GetCurrentShaderPermutation(), pShaderByteCode, pByteCodeLength);
}

void AlphaTestEffect::SetWorld(CXMMATRIX value)
{
    pImpl->matrices.world = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::WorldViewProj | EffectDirtyFlags::WorldInverseTranspose | EffectDirtyFlags::FogVector;
}

void AlphaTestEffect::SetView(CXMMATRIX value)
{
    pImpl->matrices.view = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::WorldViewProj | EffectDirtyFlags::EyePosition | EffectDirtyFlags::FogVector;
}

void AlphaTestEffect::SetProjection(CXMMATRIX value)
{
    pImpl->matrices.projection = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::WorldViewProj;
}

void AlphaTestEffect::SetDiffuseColor(FXMVECTOR value)
{
    pImpl->color.diffuseColor = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::MaterialColor;
}

void AlphaTestEffect::SetAlpha(float value)
{
    pImpl->color.alpha = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::MaterialColor;
}

void AlphaTestEffect::SetFogEnabled(bool value)
{
    pImpl->fog.enabled = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::FogEnable;
}

void AlphaTestEffect::SetFogStart(float value)
{
    pImpl->fog.start = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::FogVector;
}

void AlphaTestEffect::SetFogEnd(float value)
{
    pImpl->fog.end = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::FogVector;
}

void AlphaTestEffect::SetFogColor(FXMVECTOR value)
{
    pImpl->constants.fogColor = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
}

void AlphaTestEffect::SetVertexColorEnabled(bool value)
{
    pImpl->vertexColorEnabled = value;
}

void AlphaTestEffect::SetTexture(_In_opt_ ID3D11ShaderResourceView* value)
{
    pImpl->texture = value;
}

void AlphaTestEffect::SetAlphaFunction(D3D11_COMPARISON_FUNC value)
{
    pImpl->alphaFunction = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::AlphaTest;
}

void AlphaTestEffect::SetReferenceAlpha(int value)
{
    pImpl->referenceAlpha = value;

    pImpl->dirtyFlags |= EffectDirtyFlags::AlphaTest;
}


text:
package cz.metacentrum.perun.dispatcher.scheduling;

import java.util.Collection;
import java.util.List;

import cz.metacentrum.perun.core.api.Facility;
import cz.metacentrum.perun.core.api.exceptions.InternalErrorException;
import cz.metacentrum.perun.dispatcher.jms.DispatcherQueue;
import cz.metacentrum.perun.taskslib.model.ExecService;
import cz.metacentrum.perun.taskslib.model.Task;
import cz.metacentrum.perun.taskslib.model.Task.TaskStatus;

/**
 *
 * @author Michal Voců
 *
 *         Contains: - database of Tasks and their states - mapping of Tasks to
 *         engines (dispatcherQueue)
 *
 */
public interface SchedulingPool {

	/**
	 * Size
	 *
	 * @return current pool size
	 */
	int getSize();

	/**
	 * Add Task to the waiting list.
	 *
	 * @param task
	 * @param dispatcherQueue
	 * @return
	 * @throws InternalErrorException
	 */
	int addToPool(Task task, DispatcherQueue dispatcherQueue)
			throws InternalErrorException;

	Task getTaskById(int id);

	void removeTask(Task task);

	List<Task> getWaitingTasks();

	Task getTask(ExecService execService, Facility facility);

	DispatcherQueue getQueueForTask(Task task) throws InternalErrorException;

	void setQueueForTask(Task task, DispatcherQueue queueForTask);

	void setTaskStatus(Task task, TaskStatus status);

	List<Task> getTasksForEngine(int clientID);

	List<Task> getDoneTasks();

	List<Task> getErrorTasks();

	List<Task> getProcessingTasks();

	List<Task> getPlannedTasks();

	void clear();

	void reloadTasks();

	void checkTasksDb();

}


text:
package com.searchbox.core.search.filter;

import java.util.ArrayList;
import java.util.List;

import org.apache.solr.client.solrj.SolrQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.searchbox.core.SearchAdapter;
import com.searchbox.core.SearchAdapter.Time;
import com.searchbox.core.SearchAdapterMethod;
import com.searchbox.core.dm.FieldAttribute;
import com.searchbox.engine.solr.SolrSearchEngine;

@SearchAdapter
public class FieldRangeConditionSolrAdaptor {

  private static final Logger LOGGER = LoggerFactory
      .getLogger(FieldRangeConditionSolrAdaptor.class);

  @SearchAdapterMethod(execute = Time.PRE)
  public void createFilterQueries(SolrSearchEngine engine,
      FieldAttribute attribute, FieldRangeCondition condition, SolrQuery query) {

    LOGGER.debug("Adapting fieldValueCondition {}",condition);

    if (!attribute.getField().getKey().equals(condition.getFieldName())) {
      return;
    }

    String conditionValue = "["+condition.getMin()+" TO "+condition.getMax()+"]"; //Literal for solr -> "
    String facetKey = engine.getKeyForField(attribute);

    boolean isnew = true;
    List<String> fqs = new ArrayList<String>();
    if (query.getFilterQueries() != null) {
      for (String fq : query.getFilterQueries()) {
        if (fq.contains(facetKey)) {
          isnew = false;
          fq = fq + " AND " + facetKey + ":" + conditionValue;
        }
        fqs.add(fq);
      }
    }
    if (isnew) {
      if (condition.getTaged()) {
        fqs.add("{!tag=" + facetKey + "}" + facetKey + ":" + conditionValue);
      } else {
        fqs.add(facetKey + ":" + conditionValue);
      }
    }
    query.setFilterQueries(fqs.toArray(new String[fqs.size()]));
  }
}


text:
<?php

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

use Zend\Validator\File\Size;

use Application\Form\ServiciosLabForm;
use Application\Form\ServiciosEstForm;
use Application\Form\ConceptoForm;
use Application\Form\DistanciaForm;
use Application\Form\TasaForm;
use Application\Form\StatusForm;
use Application\Form\CatEquipoForm;
use Application\Form\CatPersonalForm;
use Application\Form\EmpresaForm;

use Application\Model\CatServLaboratorioEntity;
use Application\Model\CatServEstudiosEntity;
use Application\Model\CatConceptoEntity;
use Application\Model\CatDistanciaMuestreoEntity;
use Application\Model\TasaFinEntity;
use Application\Model\CatStatusEntity;
use Application\Model\CatEquipoEntity;
use Application\Model\CatPersonalEntity;
use Application\Model\EmpresaEntity;

//Incluir modelos
use Application\Model\UsuarioEntity;
use Application\Model\RolEntity;
use Application\Model\ModuloAccesoEntity;

//Incluir formularios
use Application\Form\UsuarioForm;
use Application\Form\RolForm;
use Application\Form\UpdateUsuarioForm;
use Application\Form\UpdatePassForm;

class AdminController extends AbstractActionController
{

    public function indexAction()
    {
        return new ViewModel();
    }

    public function empresaAction()
    {
        $message = "";
        $empresas = $this->getEmpresaMapper()->fetchAll();

        return array("message" => $message, "empresas" => $empresas);
    }

    public function newempresaAction()
    {
        $message = "";

        $form = new EmpresaForm();
        $entity = new EmpresaEntity();
        $form->bind($entity);

        $request = $this->getRequest();
        if ($request->isPost()) {
            $form->setData($request->getPost());
            if ($form->isValid()) {
                $this->getEmpresaMapper()->save($entity);
                $message = array("msg" => "Empresa creada con extio!.", "type" => "success");
            }
        }

        return array("message" => $message, "form" => $form);
    }

    public function empresadetalleAction()
    {
        $message = "";

        $id = $this->params("id");

        $form = new EmpresaForm();
        $entity = $this->getEmpresaMapper()->getById($id);
        $form->bind($entity);

        $request = $this->getRequest();
        if ($request->isPost()) {
            $form->setData($request->getPost());
            if ($form->isValid()) {
                $this->getEmpresaMapper()->save($entity);
                $message = array("msg" => "Empresa Actualizada con extio!.", "type" => "success");
            }
        }

        return array("message" => $message, "form" => $form, "id" => $id , "path" => $entity->getImgPath() );
    }

    public function empresaimageAction()
    {
        $message = "";

        $id = $this->params("id");

        $form = new EmpresaForm();
        $entity = $this->getEmpresaMapper()->getById($id);
        $form->bind($entity);

        $request = $this->getRequest();
        if ($request->isPost()) {
            $form->setData($request->getPost());
            //if ($form->isValid()) {

                //move uploaded file
                $File = $this->params()->fromFiles('image-file');
                $size = new Size(array('max'=>100000000));

                $adapter = new \Zend\File\Transfer\Adapter\Http();
                $adapter->setValidators(array($size), $File['name']);

                if (!$adapter->isValid()){
                    $dataError = $adapter->getMessages();
                    $error = array();
                    foreach($dataError as $key=>$row){ $error[] = $row; }
                    $form->setMessages(array('image-file'=>$error ));
                    echo "Lo siento no valido";

                } else {
                    $ruta = "/images/empresa_logos";
                    $destination  =  dirname(__DIR__) . '/../../../../public' . $ruta;
                    echo $destination;
                    $adapter->setDestination( $destination);
                    if ($adapter->receive($File['name'])) {
                        $rutaImagen = $ruta .'/'. $File['name'];
                        $entity->setImgPath($rutaImagen);
                    }
                }
            //
                $this->getEmpresaMapper()->save($entity);
                //return $this->redirect()->toRoute('auto');

            //} //form->isvalid IF
        }
        return $this->redirect()->toRoute('admin', array('action'=>'empresadetalle', 'id' => $id));
    }

    public function usuariosAction()
    {
        $message = "";
        $id_user = "";
        $id_user = $this->params('id');
        if($id_user!=""){
            $user = $this->getUsuarioMapper()->getById($id_user);
            $this->getUsuarioMapper()->deleteById($id_user);
            $message = array("type" => "danger", "msg" => "Usuario (".$user->getNombre().") Eliminado.");
        }
        $usuarios = $this->getUsuarioMapper()->fetchAll();
        return array("usuarios" => $usuarios,"message" => $message,);
    }

    public function usuarioAction()
    {
        $message = "";
        $id_usuario = $this->params('id');
        $usuario = $this->getUsuarioMapper()->getById($id_usuario);
        $form = new UpdateUsuarioForm;
        $form->bind($usuario);
        $request = $this->getRequest();
        if ($request->isPost()) {
            $pass = $this->params()->fromPost("password");
            if ($pass!=null) {
                $usuario->setPass($pass);
                $this->getUsuarioMapper()->save($usuario);
                $message = array("type" => "success", "msg" => "Contraseña Actualizada.");
            }else{
                $form->setData($request->getPost());
                if ($form->isValid()) {
                    $id_rol = $this->params()->fromPost("rol");
                    $usuario->setRolId($id_rol);
                    $this->getUsuarioMapper()->save($usuario);
                    $message = array("type" => "success", "msg" => "Usuario Actualizado.");
                }
            }
        }

        $roles = $this->getRolMapper()->fetchAll();

        return array(
            "form" => $form,
            "message"=>$message,
            "id_usuario"=>$id_usuario,
            "roles" => $roles,
            "usuario" => $usuario,
        );
    }

    public function rolesAction()
    {
        $message = "";
        $id_rol = "";
        $id_rol = $this->params('id');
        if($id_rol!=""){
            $check_rol = $this->getUsuarioMapper()->getByIdRol($id_rol);
            $rol = $this->getRolMapper()->getById($id_rol);
            if($check_rol == null ){
                $this->getRolMapper()->deleteById($id_rol);
                $this->getModuloAccesoMapper()->deleteById($id_rol);
                $message = array("type" => "danger", "msg" => "Rol (".$rol->getNombreRol().") Eliminado.");
            }else{
                $message = array("type" => "warning", "msg" => "Imposible eliminar el rol (".$rol->getNombreRol()."), esta asignado a un usuario.");
            }

        }

        $roles = $this->getRolMapper()->fetchAll();

        return array(
            "roles" => $roles,
            "message" => $message,
        );
    }

    public function rolAction()
    {
        $message = "";
        $id_rol = $this->params('id');
        $rol = $this->getRolMapper()->getById($id_rol);
        $form = new RolForm;
        $modulo_acceso = new ModuloAccesoEntity();
        $request = $this->getRequest();
        if ($request->isPost()) {
            $modulos = $this->params()->fromPost("modulo");
            if (!empty($modulos)) {
                $this->getModuloAccesoMapper()->deleteByIdRol($id_rol);
                foreach ($modulos as $id_modulo => $value) {
                    $modulo_acceso->setModuloId($id_modulo);
                    $modulo_acceso->setRolId($id_rol);
                    $this->getModuloAccesoMapper()->save($modulo_acceso);
                }
                $message = array("type" => "success", "msg" => "Rol (".$rol->getNombreRol().") Actualizado.");
            }else{
                $message = array("type" => "danger", "msg" => "Rol (".$rol->getNombreRol().") no actualizado, favor de asignarle modulos.");
            }
        }

        $modulos_acceso = $this->getModuloAccesoMapper()->fetchAllById($id_rol);
        $modulos = $this->getModuloMapper()->fetchAll();

        $modulos_acceso_id = "";
        foreach ($modulos_acceso as $modulo_acceso) {
            $modulos_acceso_id [] = $modulo_acceso['modulo_id'];
        }

        return array(
            "form" => $form,
            "rol"=>$rol,
            "message"=>$message,
            'modulos'=>$modulos,
            "modulos_acceso"=>$modulos_acceso_id,
        );
    }

    public function newuserAction(){
        $message = "";
        $form = new UsuarioForm();
        $usuario = new UsuarioEntity();
        $form->bind($usuario);
        $request = $this->getRequest();
        if ($request->isPost()) {
            $form->setData($request->getPost());
            if ($form->isValid()) {
                $id_rol = $this->params()->fromPost("rol");
                $usuario->setRolId($id_rol);
                $check_correo = $this->getUsuarioMapper()->getByCorreo($usuario->getCorreo());
                if ($check_correo == null) {
                    $this->getUsuarioMapper()->save($usuario);
                    $message = array("type" => "success", "msg" => "Usuario ".$usuario->getCorreo()." Creado.");
                }else{
                    $message = array("type" => "danger", "msg" => "Imposible crear el usuario ".$usuario->getCorreo().", ya existe.");
                }

            }
        }

        $roles = $this->getRolMapper()->fetchAll();

        return array(
            'form'=>$form,
            'message'=>$message,
            'roles'=>$roles,
        );
    }

    public function newrolAction(){
        $message = "";
        $form = new RolForm();
        $rol = new RolEntity();
        $modulo_acceso = new ModuloAccesoEntity();
        $form->bind($rol);
        $request = $this->getRequest();
        if ($request->isPost()) {
            $form->setData($request->getPost());
            if ($form->isValid()) {
                $modulos = $this->params()->fromPost("modulo");
                if (!empty($modulos)) {
                    $rs = $this->getRolMapper()->save($rol);
                    $inserted_id = $rs->getGeneratedValue();
                    foreach ($modulos as $id_modulo => $value) {
                        $modulo_acceso->setModuloId($id_modulo);
                        $modulo_acceso->setRolId($rs->getGeneratedValue());
                        $this->getModuloAccesoMapper()->save($modulo_acceso);
                    }
                    $message = array("type" => "success", "msg" => "Rol (".$rol->getNombreRol().") Creado.");
                }else{
                    $message = array("type" => "danger", "msg" => "Rol (".$rol->getNombreRol().") no creado, favor de asignarle modulos.");
                }

            }
        }

        $modulos = $this->getModuloMapper()->fetchAll();

        return array(
            'form'=>$form,
            'message'=>$message,
            'modulos'=>$modulos,
        );
    }

    public function getCatConceptodMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatConceptoMapper");
    }

    public function getCatDistanciaMuestreoMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatDistanciaMuestreoMapper");
    }

    public function getTasaFinMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("TasaFinMapper");
    }

    public function getCatStatusMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatStatusMapper");
    }

    public function getCatServLaboratorioMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatServLaboratorioMapper");
    }

    public function getCatServEstudiosMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatServEstudiosMapper");
    }

    public function getCatEquipoMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatEquipoMapper");
    }

    public function getCatPersonalMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("CatPersonalMapper");
    }

    public function getTipoServicioMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("TipoServicioMapper");
    }

    public function getEmpresaMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("EmpresaMapper");
    }

    public function getUsuarioMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("UsuarioMapper");
    }

    public function getRolMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("RolMapper");
    }

    public function getModuloMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("ModuloMapper");
    }

    public function getModuloAccesoMapper()
    {
        $sm = $this->getServiceLocator();
        return $sm->get("ModuloAccesoMapper");
    }

}


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

    /**
     * @ngdoc object
     * @name galleriesRoute
     * @module app.galleries
     * @requires $stateProvider
     * @description
     * Router for the galleries page.
     *
     * @ngInject
     */
    function galleriesRoute($stateProvider) {
        $stateProvider
            .state('app.galleries', {
                url: '/galleries',
                views: {
                    'menuContent': {
                        templateUrl: 'js/routes/galleries/galleries.html',
                        controller: 'GalleriesCtrl as vm'
                    }
                },
                resolve: {/* @ngInject */
                    users: function(UserService){
                        return UserService.getList();
                    }
                },
                data: {
                    authenticate: true
                }
            });
    }

    angular
        .module('app.galleries')
        .config(galleriesRoute);

})();


text:
import pytest
import os

@pytest.fixture()
def node(host, request):
    """
    This fixture represents a single node in the ceph cluster. Using the
    host.ansible fixture provided by testinfra it can access all the ansible
    variables provided to it by the specific test scenario being ran.

    You must include this fixture on any tests that operate on specific type
    of node because it contains the logic to manage which tests a node
    should run.
    """
    ansible_vars = host.ansible.get_variables()
    # tox will pass in this environment variable. we need to do it this way
    # because testinfra does not collect and provide ansible config passed in
    # from using --extra-vars
    ceph_stable_release = os.environ.get("CEPH_STABLE_RELEASE", "luminous")
    rolling_update = os.environ.get("ROLLING_UPDATE", "False")
    group_names = ansible_vars["group_names"]
    docker = ansible_vars.get("docker")
    osd_auto_discovery = ansible_vars.get("osd_auto_discovery")
    lvm_scenario = ansible_vars.get("osd_scenario") == 'lvm'
    ceph_release_num = {
        'jewel': 10,
        'kraken': 11,
        'luminous': 12,
        'mimic': 13,
        'dev': 99
    }

    # capture the initial/default state
    test_is_applicable = False
    for marker in request.node.iter_markers():
        if marker.name in group_names or marker.name == 'all':
            test_is_applicable = True
            break
    # Check if any markers on the test method exist in the nodes group_names. If they do not, this test is not valid for the node being tested.
    if not test_is_applicable:
        reason = "%s: Not a valid test for node type: %s" % (request.function, group_names)
        pytest.skip(reason)

    if request.node.get_closest_marker("no_lvm_scenario") and lvm_scenario:
        pytest.skip("Not a valid test for lvm scenarios")

    if not lvm_scenario and request.node.get_closest_marker("lvm_scenario"):
        pytest.skip("Not a valid test for non-lvm scenarios")

    if request.node.get_closest_marker("no_docker") and docker:
        pytest.skip(
            "Not a valid test for containerized deployments or atomic hosts")

    if request.node.get_closest_marker("docker") and not docker:
        pytest.skip(
            "Not a valid test for non-containerized deployments or atomic hosts")  # noqa E501

    if "mgrs" in group_names and ceph_stable_release == "jewel":
        pytest.skip("mgr nodes can not be tested with ceph release jewel")

    if "nfss" in group_names and ceph_stable_release == "jewel":
        pytest.skip("nfs nodes can not be tested with ceph release jewel")

    if group_names == ["iscsigws"] and ceph_stable_release == "jewel":
        pytest.skip("iscsigws nodes can not be tested with ceph release jewel")  # noqa E501

    if request.node.get_closest_marker("from_luminous") and ceph_release_num[ceph_stable_release] < ceph_release_num['luminous']:  # noqa E501
        pytest.skip(
            "This test is only valid for releases starting from Luminous and above")  # noqa E501

    if request.node.get_closest_marker("before_luminous") and ceph_release_num[ceph_stable_release] >= ceph_release_num['luminous']:  # noqa E501
        pytest.skip("This test is only valid for release before Luminous")

    journal_collocation_test = ansible_vars.get("osd_scenario") == "collocated"
    if request.node.get_closest_marker("journal_collocation") and not journal_collocation_test:  # noqa E501
        pytest.skip("Scenario is not using journal collocation")

    osd_ids = []
    osds = []
    cluster_address = ""
    # I can assume eth1 because I know all the vagrant
    # boxes we test with use that interface
    address = host.interface("eth1").addresses[0]
    subnet = ".".join(ansible_vars["public_network"].split(".")[0:-1])
    num_mons = len(ansible_vars["groups"]["mons"])
    if osd_auto_discovery:
        num_devices = 3
    else:
        num_devices = len(ansible_vars.get("devices", []))
    if not num_devices:
        num_devices = len(ansible_vars.get("lvm_volumes", []))
    cluster_name = ansible_vars.get("cluster", "ceph")
    conf_path = "/etc/ceph/{}.conf".format(cluster_name)
    if "osds" in group_names:
        # I can assume eth2 because I know all the vagrant
        # boxes we test with use that interface. OSDs are the only
        # nodes that have this interface.
        cluster_address = host.interface("eth2").addresses[0]
        cmd = host.run('sudo ls /var/lib/ceph/osd/ | sed "s/.*-//"')
        if cmd.rc == 0:
            osd_ids = cmd.stdout.rstrip("\n").split("\n")
            osds = osd_ids
            if docker:
                osds = []
                for device in ansible_vars.get("devices", []):
                    real_dev = host.run("sudo readlink -f %s" % device)
                    real_dev_split = real_dev.stdout.split("/")[-1]
                    osds.append(real_dev_split)

    data = dict(
        address=address,
        subnet=subnet,
        vars=ansible_vars,
        osd_ids=osd_ids,
        num_mons=num_mons,
        num_devices=num_devices,
        cluster_name=cluster_name,
        conf_path=conf_path,
        cluster_address=cluster_address,
        docker=docker,
        osds=osds,
        ceph_stable_release=ceph_stable_release,
        ceph_release_num=ceph_release_num,
        rolling_update=rolling_update,
    )
    return data

def pytest_collection_modifyitems(session, config, items):
    for item in items:
        test_path = item.location[0]
        if "mon" in test_path:
            item.add_marker(pytest.mark.mons)
        elif "osd" in test_path:
            item.add_marker(pytest.mark.osds)
        elif "mds" in test_path:
            item.add_marker(pytest.mark.mdss)
        elif "mgr" in test_path:
            item.add_marker(pytest.mark.mgrs)
        elif "rbd-mirror" in test_path:
            item.add_marker(pytest.mark.rbdmirrors)
        elif "rgw" in test_path:
            item.add_marker(pytest.mark.rgws)
        elif "nfs" in test_path:
            item.add_marker(pytest.mark.nfss)
        elif "iscsi" in test_path:
            item.add_marker(pytest.mark.iscsigws)
        else:
            item.add_marker(pytest.mark.all)

        if "journal_collocation" in test_path:
            item.add_marker(pytest.mark.journal_collocation)


text:
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";

import { GamerBoardGame } from "./gamerBoardGame";
import { Observable } from "rxjs/Observable";
import {httpOptions} from "../common";

@Injectable()
export class GamerBoardGameService {
    private _getGamerBoardGameUrl = "GamerBoardGame/Get";
    private _getGamerBoardGameListUrl = "GamerBoardGame/GetAllByGamerNickname";
    private _addGamerBoardGameUrl = "GamerBoardGame/Add";
    private _editGamerBoardGameUrl = "GamerBoardGame/Edit";
    private _deactivateGamerBoardGameUrl = "GamerBoardGame/Deactivate";
    private _getGamerAvailableBoardGamesUrl = "GamerBoardGame/GetGamerAvailableBoardGames";

    constructor(private http: HttpClient) {}

    getGamerBoardGames(gamerNickname: string): Observable<GamerBoardGame[]> {
        return this.http
            .post<GamerBoardGame[]>(`${this._getGamerBoardGameListUrl}`,
                JSON.stringify({ nickname: gamerNickname }),
                httpOptions);
    }

    getGamerBoardGame(id: number): Observable<GamerBoardGame> {
        if (id > 0) {
            const url = `${this._getGamerBoardGameUrl}/${id}`;
            return this.http.get<GamerBoardGame>(url);
        } else {
            return new Observable<GamerBoardGame>();
        }
    }

    getGamerAvailableBoardGames(gamerNickname: string): Observable<GamerBoardGame[]> {
        return this.http
            .post<GamerBoardGame[]>(`${this._getGamerAvailableBoardGamesUrl}`,
                JSON.stringify({ nickname: gamerNickname }),
                httpOptions);
    }

    deactivate(id: number): Observable<string> {
        const url = `${this._deactivateGamerBoardGameUrl}/${id}`;
        return this.http.post<string>(url, httpOptions);
    }

    create(boardGameId: number): Observable<string> {
        const url = `${this._addGamerBoardGameUrl}`;
        const body = JSON.stringify({ boardGameId: boardGameId });
        this.http.post<string>(url, body, httpOptions);

        return this.http.post<string>(url, body, httpOptions);
    }

    update(gamerBoardGame: GamerBoardGame): Observable<string> {
        const url = `${this._editGamerBoardGameUrl}`;
        return this.http
            .post<string>(url, JSON.stringify({ gamerBoardGameId: gamerBoardGame.BoardGameId }), httpOptions);
    }
}


text:
#ifndef __AUDIO_H__
#define __AUDIO_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <xboot.h>

enum audio_format_t {
	AUDIO_FORMAT_S8		= 8,
	AUDIO_FORMAT_S16	= 16,
	AUDIO_FORMAT_S24	= 24,
	AUDIO_FORMAT_S32	= 32,
};

enum audio_rate_t {
	AUDIO_RATE_7350		= 7350,
	AUDIO_RATE_8000		= 8000,
	AUDIO_RATE_11025	= 11025,
	AUDIO_RATE_12000	= 12000,
	AUDIO_RATE_14700	= 14700,
	AUDIO_RATE_16000	= 16000,
	AUDIO_RATE_22050	= 22050,
	AUDIO_RATE_24000	= 24000,
	AUDIO_RATE_29400	= 29400,
	AUDIO_RATE_32000	= 32000,
	AUDIO_RATE_44100	= 44100,
	AUDIO_RATE_48000	= 48000,
	AUDIO_RATE_88200	= 88200,
	AUDIO_RATE_96000	= 96000,
	AUDIO_RATE_176400	= 176400,
	AUDIO_RATE_192000	= 192000,
};

typedef int (*audio_callback_t)(void * data, void * buf, int count);

struct audio_t
{
	/* The audio name */
	char * name;

	/* The sound pool */
	struct {
		struct list_head list;
		spinlock_t lock;
	} soundpool;

	/* Audio playback start */
	void (*playback_start)(struct audio_t * audio, enum audio_rate_t rate, enum audio_format_t fmt, int ch, audio_callback_t cb, void * data);

	/* Audio playback stop */
	void (*playback_stop)(struct audio_t * audio);

	/* Audio capture start */
	void (*capture_start)(struct audio_t * audio, enum audio_rate_t rate, enum audio_format_t fmt, int ch, audio_callback_t cb, void * data);

	/* Audio capture stop */
	void (*capture_stop)(struct audio_t * audio);

	/* Ioctl interface */
	int (*ioctl)(struct audio_t * audio, const char * cmd, void * arg);

	/* Private data */
	void * priv;
};

struct audio_t * search_audio(const char * name);
struct audio_t * search_first_audio(void);
struct device_t * register_audio(struct audio_t * audio, struct driver_t * drv);
void unregister_audio(struct audio_t * audio);

void audio_playback_start(struct audio_t * audio, enum audio_rate_t rate, enum audio_format_t fmt, int ch, audio_callback_t cb, void * data);
void audio_playback_stop(struct audio_t * audio);
void audio_capture_start(struct audio_t * audio, enum audio_rate_t rate, enum audio_format_t fmt, int ch, audio_callback_t cb, void * data);
void audio_capture_stop(struct audio_t * audio);
int audio_ioctl(struct audio_t * audio, const char * cmd, void * arg);

void audio_playback(struct audio_t * audio, struct sound_t * snd);

static inline int audio_get_playback_volume(struct audio_t * audio)
{
	int vol = 0;

	audio_ioctl(audio, "audio-get-playback-volume", &vol);
	return vol;
}

static inline void audio_set_playback_volume(struct audio_t * audio, int vol)
{
	audio_ioctl(audio, "audio-set-playback-volume", &vol);
}

static inline int audio_get_capture_volume(struct audio_t * audio)
{
	int vol = 0;

	audio_ioctl(audio, "audio-get-capture-volume", &vol);
	return vol;
}

static inline void audio_set_capture_volume(struct audio_t * audio, int vol)
{
	audio_ioctl(audio, "audio-set-capture-volume", &vol);
}

#ifdef __cplusplus
}
#endif

#endif /* __AUDIO_H__ */