text:
using System;
using System.Diagnostics;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Structure;
using Autodesk.Revit.UI;

#endregion // Namespaces

namespace BuildingCoder
{
    /// <summary>
    ///     Currently, it is not possible to create a new railing instance:
    ///     http://thebuildingcoder.typepad.com/blog/2009/02/list-railing-types.html#comments
    ///     SPR #134260 [API - New Element Creation: Railing]
    /// </summary>
    [Transaction(TransactionMode.Manual)]
    internal class CmdNewRailing : IExternalCommand
    {
        public Result Execute(
            ExternalCommandData commandData,
            ref string message,
            ElementSet elements)
        {
            var app = commandData.Application;
            var doc = app.ActiveUIDocument.Document;

            var levels = Util.GetElementsOfType(
                doc, typeof(Level), BuiltInCategory.OST_Levels);

            if (levels.FirstElement() is not Level level)
            {
                message = "No level found.";
                return Result.Failed;
            }

            // get symbol to use:

            BuiltInCategory bic;
            Type t;

            // this retrieves the railing baluster symbols
            // but they cannot be used to create a railing:

            bic = BuiltInCategory.OST_StairsRailingBaluster;
            t = typeof(FamilySymbol);

            // this retrieves all railing symbols,
            // but they are just Symbol instances,
            // not FamilySymbol ones:

            bic = BuiltInCategory.OST_StairsRailing;
            t = typeof(ElementType);

            var symbols
                = Util.GetElementsOfType(doc, t, bic);

            FamilySymbol sym = null;

            foreach (ElementType s in symbols)
            {
                var fs = s as FamilySymbol;

                Debug.Print(
                    "Family name={0}, symbol name={1},"
                    + " category={2}",
                    null == fs ? "<none>" : fs.Family.Name,
                    s.Name,
                    s.Category.Name);

                if (null == sym && s is ElementType)
                    // this does not work, of course:
                    sym = s as FamilySymbol;
            }

            if (null == sym)
            {
                message = "No railing family symbols found.";
                return Result.Failed;
            }

            using var tx = new Transaction(doc);
            tx.Start("Create New Railing");

            var p1 = new XYZ(17, 0, 0);
            var p2 = new XYZ(33, 0, 0);
            var line = Line.CreateBound(p1, p2);

            // we need a FamilySymbol instance here, but only have a Symbol:

            var Railing1
                = doc.Create.NewFamilyInstance(
                    line, sym, level, StructuralType.NonStructural);

            tx.Commit();

            return Result.Succeeded;
        }
    }
}


text: <meta http-equiv="refresh" content="0; url=start.php" />

redpajama_set_name: RedPajamaGithub


text:
package util

import (
	"fmt"
	k8scontrollerclient "sigs.k8s.io/controller-runtime/pkg/client"
	"sync"
)

type ResourceQueue struct {
	queue       []k8scontrollerclient.Object
	lookupTable map[k8scontrollerclient.Object]bool
	lock        *sync.Mutex
}

func NewResourceQueue() *ResourceQueue {
	return &ResourceQueue{
		queue:       []k8scontrollerclient.Object{},
		lookupTable: map[k8scontrollerclient.Object]bool{},
		lock:        &sync.Mutex{},
	}
}

func (q *ResourceQueue) Enqueue(obj k8scontrollerclient.Object) error {
	q.lock.Lock()
	defer q.lock.Unlock()

	if _, ok := q.lookupTable[obj]; ok {
		return fmt.Errorf("error inserting duplicate object: %s", obj)
	}
	q.queue = append(q.queue, obj)
	q.lookupTable[obj] = true
	return nil
}

func (q *ResourceQueue) EnqueueIgnoreExisting(obj k8scontrollerclient.Object) {
	q.lock.Lock()
	defer q.lock.Unlock()

	if _, ok := q.lookupTable[obj]; ok {
		return
	}
	q.queue = append(q.queue, obj)
	q.lookupTable[obj] = true
}

func (q *ResourceQueue) Length() int {
	return len(q.queue)
}

func (q *ResourceQueue) RemoveIgnoreNotFound(obj k8scontrollerclient.Object) {
	q.lock.Lock()
	defer q.lock.Unlock()

	if _, ok := q.lookupTable[obj]; ok {
		for index, existingObj := range q.queue {
			if q.equals(existingObj, obj) {
				_ = q.removeItem(index)
				delete(q.lookupTable, obj)
				return
			}
		}
	}
}

func (q *ResourceQueue) equals(objOne k8scontrollerclient.Object, objTwo k8scontrollerclient.Object) bool {
	return objOne.GetName() == objTwo.GetName() && objOne.GetNamespace() == objTwo.GetNamespace()
}

func (q *ResourceQueue) DequeueHead() (k8scontrollerclient.Object, bool) {
	q.lock.Lock()
	defer q.lock.Unlock()

	if q.Length() == 0 {
		return nil, false
	}
	return q.removeItem(0), true
}

func (q *ResourceQueue) DequeueTail() (k8scontrollerclient.Object, bool) {
	q.lock.Lock()
	defer q.lock.Unlock()

	if len(q.queue) == 0 {
		return nil, false
	}
	return q.removeItem(q.Length() - 1), true
}

func (q *ResourceQueue) removeItem(index int) k8scontrollerclient.Object {
	if index < 0 || index >= q.Length() {
		panic("index out of bounds")
	}
	item := q.queue[index]
	copy(q.queue[index:], q.queue[index+1:])
	q.queue[len(q.queue)-1] = nil
	q.queue = q.queue[:len(q.queue)-1]
	delete(q.lookupTable, item)

	return item
}


text:
package com.dangdang.ddframe.job.cloud.scheduler.config;

import com.dangdang.ddframe.job.cloud.scheduler.fixture.CloudJsonConstants;
import com.dangdang.ddframe.job.cloud.scheduler.producer.ProducerManager;
import com.dangdang.ddframe.job.cloud.scheduler.state.ready.ReadyService;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.unitils.util.ReflectionUtils;

import java.util.Collections;

import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

@RunWith(MockitoJUnitRunner.class)
public final class CloudJobConfigurationListenerTest {

    @Mock
    private ProducerManager producerManager;

    @Mock
    private ReadyService readyService;

    @InjectMocks
    private CloudJobConfigurationListener cloudJobConfigurationListener;

    @Before
    public void setUp() throws NoSuchFieldException {
        ReflectionUtils.setFieldValue(cloudJobConfigurationListener, "producerManager", producerManager);
        ReflectionUtils.setFieldValue(cloudJobConfigurationListener, "readyService", readyService);
    }

    @Test
    public void assertChildEventWhenDataIsNull() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, null));
        verify(producerManager, times(0)).schedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).reschedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).unschedule(Matchers.<String>any());
    }

    @Test
    public void assertChildEventWhenIsNotConfigPath() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/other/test_job", null, "".getBytes())));
        verify(producerManager, times(0)).schedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).reschedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).unschedule(Matchers.<String>any());
    }

    @Test
    public void assertChildEventWhenIsRootConfigPath() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_REMOVED, new ChildData("/config/job", null, "".getBytes())));
        verify(producerManager, times(0)).schedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).reschedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).unschedule(Matchers.<String>any());
    }

    @Test
    public void assertChildEventWhenStateIsAddAndIsConfigPathAndInvalidData() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/config/job/test_job", null, "".getBytes())));
        verify(producerManager, times(0)).schedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).reschedule(Matchers.<CloudJobConfiguration>any());
        verify(producerManager, times(0)).unschedule(Matchers.<String>any());
    }

    @Test
    public void assertChildEventWhenStateIsAddAndIsConfigPath() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/config/job/test_job", null, CloudJsonConstants.getJobJson().getBytes())));
        verify(producerManager).schedule(Matchers.<CloudJobConfiguration>any());
    }

    @Test
    public void assertChildEventWhenStateIsUpdateAndIsConfigPathAndTransientJob() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/config/job/test_job", null, CloudJsonConstants.getJobJson().getBytes())));
        verify(readyService, times(0)).remove(Collections.singletonList("test_job"));
        verify(producerManager).reschedule(Matchers.<CloudJobConfiguration>any());
    }

    @Test
    public void assertChildEventWhenStateIsUpdateAndIsConfigPathAndDaemonJob() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED,
                new ChildData("/config/job/test_job", null, CloudJsonConstants.getJobJson(JobExecutionType.DAEMON).getBytes())));
        verify(readyService).remove(Collections.singletonList("test_job"));
        verify(producerManager).reschedule(Matchers.<CloudJobConfiguration>any());
    }

    @Test
    public void assertChildEventWhenStateIsUpdateAndIsConfigPathAndMisfireDisabled() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED,
                new ChildData("/config/job/test_job", null, CloudJsonConstants.getJobJson(false).getBytes())));
        verify(readyService).setMisfireDisabled("test_job");
        verify(producerManager).reschedule(Matchers.<CloudJobConfiguration>any());
    }

    @Test
    public void assertChildEventWhenStateIsRemovedAndIsJobConfigPath() throws Exception {
        cloudJobConfigurationListener.childEvent(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_REMOVED, new ChildData("/config/job/test_job", null, "".getBytes())));
        verify(producerManager).unschedule("test_job");
    }
}


text:
package test

import (
	"net/http"
	"net/http/httptest"
	"net/url"
	"strings"

	"github.com/zenazn/goji/web"
)

type RequestHelper interface {
	Get(string, ...func(*http.Request)) *httptest.ResponseRecorder
	Post(string, url.Values, ...func(*http.Request)) *httptest.ResponseRecorder
}

type requestHelper struct {
	router *web.Mux
}

func RequestHelperRemoteAddr(ip string) func(r *http.Request) {
	return func(r *http.Request) {
		r.RemoteAddr = ip
	}
}

func RequestHelperXFF(xff string) func(r *http.Request) {
	return func(r *http.Request) {
		r.Header.Set("X-Forwarded-For", xff)
	}
}

func RequestHelperRaw(r *http.Request) {
	r.Header.Set("Accept", "application/octet-stream")
}

func RequestHelperStreaming(r *http.Request) {
	r.Header.Set("Accept", "text/event-stream")
}

func NewRequestHelper(router *web.Mux) RequestHelper {
	return &requestHelper{router}
}

func (rh *requestHelper) Get(
	path string,
	mods ...func(*http.Request),
) *httptest.ResponseRecorder {

	req, _ := http.NewRequest("GET", path, nil)
	return rh.Execute(req, mods)
}

func (rh *requestHelper) Post(
	path string,
	form url.Values,
	mods ...func(*http.Request),
) *httptest.ResponseRecorder {

	body := strings.NewReader(form.Encode())
	req, _ := http.NewRequest("POST", path, body)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	return rh.Execute(req, mods)
}

func (rh *requestHelper) Execute(
	req *http.Request,
	requestModFns []func(*http.Request),
) *httptest.ResponseRecorder {

	req.RemoteAddr = "127.0.0.1"
	req.Host = "localhost"
	for _, fn := range requestModFns {
		fn(req)
	}

	w := httptest.NewRecorder()
	c := web.C{
		Env: map[interface{}]interface{}{},
	}

	rh.router.ServeHTTPC(c, w, req)
	return w

}


text:
#ifndef runtime

#define runtime

/**
 * Runtime representation
 */
typedef enum { function, number, name, error } type;

struct scheme_val;
struct scheme_fn;

typedef struct scheme_val* fn_impl(struct scheme_val**, struct scheme_val**);

typedef struct scheme_val {
  type type;
  union {
    double number;
    struct scheme_fn* fn;
    char** name;
  };
} scheme_val;

// representation of a function
// - closed is closed values
// - exec is the function it self
typedef struct scheme_fn {
  scheme_val *((*c)[]);
  scheme_val** closed;
  fn_impl* exec;
} scheme_fn;

/**
 * Scheme primitive constructors
 */
scheme_val* init_num(double);
scheme_val* init_err();
scheme_val* init_fn(scheme_val**, fn_impl*);
scheme_val* call_fn(scheme_val* fn, scheme_val** params);

/**
 * Memory management
 */
void scheme_free(scheme_val*);

#endif


text:
require 'json'
require 'virtus'

class AdamSignals::Response
  include Virtus.value_object

  values do
    attribute :target_type, Symbol
    attribute :target_address, String
    attribute :body, String
    attribute :action, String
  end

  def self.from_json(json)
    new JSON.parse(json)
  end

  def to_json
    JSON.generate attributes
  end

  def to_s
    "#<#{self.class.name} #{attributes}>"
  end
end


text:
<!doctype html>

      <meta charset="utf-8"/>
      <title>nutricion deportiva</title>

Lo mas importante de un entrenamiento se encuentra en la cocina asi que vamos a ver lo mas importente de nuestro periodo en el gym...LA DIETA

 comenzaremos viendo la dieta de volumen

              Objetivos de las dietas para ganar masa muscular

-Aumento de peso corporal en personas delgadas.

-Fase de volumen muscular para entrenamiento de culturistas.

-Aumento de fuerza, muscular para practicantes de cualquier deporte.

-Desarrollo de músculo en personas muy activas

-Primer paso en el desarrollo muscular en nuevos practicantes de actividades de musculación en gimnasios.

dieta de mantenimiento

              Objetivos de las dietas para lograr un mantenimiento muscular

-mantenimiento de la masa muscular.

-Faseintermedia entre volumen y definición.

-aumento de la fuerza pero no del volumen

-segundo paso en el desarrollo muscular en nuevos practicantes de actividades de musculación en gimnasios.

dieta de definicion

              Objetivos de las dietas para lograr una perdida de grasa y definición muscular

-definicion de la masa muscular magra que tengamos con la perdidad de grasa.

-ultima fase del proceso y la mas dificil de llevar a cabo por el gran sacrificio.

-perdida de parte del volumen pero con la consiguiente definicion

-ultimo paso en el desarrollo muscular en nuevos practicantes de actividades de musculación en gimnasios.


text:
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../core-scaffold/core-scaffold.html">
<link rel="import" href="../../core-menu/core-menu.html">
<link rel="import" href="../../core-menu/core-submenu.html">
<link rel="import" href="../../core-item/core-item.html">

<polymer-element name="project-docs" extends="body" attributes="raw">

<template>
	<core-scaffold>
		<core-header-panel navigation flex mode="seamed">
			<core-toolbar>
<sortable-table>
Documentation
</core-toolbar>
			<core-menu on-core-select="{{changePage}}" id="docmenu">
				<core-item on-click="{{redirect}}" link="index.html" label="Getting Started" icon="help"></core-item>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Features" icon="grade">
					<core-item on-click="{{redirect}}" link="features.html" label="Index"></core-item>
					<core-item on-click="{{redirect}}" link="row-editor.html" label="Row Editor"></core-item>
					<core-item on-click="{{redirect}}" link="row-filters.html" label="Row Filters"></core-item>
					<core-item on-click="{{redirect}}" link="args.html" label="Additional Arguments"></core-item>
					<core-item on-click="{{redirect}}" link="selected-rows.html" label="Selected Rows"></core-item>
					<core-item on-click="{{redirect}}" link="paging.html" label="Paging, Top N Rows"></core-item>
				</core-submenu>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Themes" icon="view-list">
					<core-item on-click="{{redirect}}" link="themes/index.html" label="Basic Setup"></core-item>
					<core-item on-click="{{redirect}}" link="themes/bootstrap.html" label="Bootstrap"></core-item>
					<core-item on-click="{{redirect}}" link="themes/extjs4.html" label="ExtJS 4"></core-item>
				</core-submenu>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Alt. Themes" icon="view-module">
					<core-item on-click="{{redirect}}" link="themes/alt.html" label="Basic Setup"></core-item>
					<core-item on-click="{{redirect}}" link="themes/article.html" label="Article"></core-item>
				</core-submenu>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Templates" icon="text-format">
					<core-item on-click="{{redirect}}" link="templates.html" label="Variables"></core-item>
					<core-item on-click="{{redirect}}" link="css.html" label="CSS"></core-item>
					<core-item on-click="{{redirect}}" link="table-templates.html" label="Header, Footer Templates"></core-item>
					<core-item on-click="{{redirect}}" link="row-templates.html" label="Row Templates"></core-item>
					<core-item on-click="{{redirect}}" link="dom-elements.html" label="DOM Elements"></core-item>
					<core-item on-click="{{redirect}}" link="dynamic-columns.html" label="Dynamic Columns"></core-item>
				</core-submenu>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Data" icon="reorder">
					<core-item on-click="{{redirect}}" link="data-formats.html" label="Input Formats"></core-item>
					<core-item on-click="{{redirect}}" link="polymer-filters.html" label="Filters, Formatting"></core-item>
					<core-item on-click="{{redirect}}" link="autogenerated-columns.html" label="Auto Columns"></core-item>
					<core-item on-click="{{redirect}}" link="column-datatype.html" label="Column Datatypes"></core-item>
					<core-item on-click="{{redirect}}" link="refreshing-data.html" label="Refreshing Data"></core-item>
					<core-item on-click="{{redirect}}" link="large-dataset.html" label="Larger Datasets"></core-item>
					<core-item on-click="{{redirect}}" link="nested-tables.html" label="Nesting Tables in Cells"></core-item>
				</core-submenu>
				<core-submenu on-click="{{redirect}}" on-tap="{{submenuclick}}" label="Server-Side" icon="cloud-circle">
					<core-item on-click="{{redirect}}" link="serverside/index.html" label="API Support"></core-item>
					<core-item on-click="{{redirect}}" link="serverside/datatables-ajax.html" label="DataTables.net AJAX"></core-item>
					<core-item on-click="{{redirect}}" link="serverside/extjs-ajax.html" label="ExtJS REST AJAX"></core-item>
					<core-item on-click="{{redirect}}" link="serverside/flickr-jsonp.html" label="JSONP"></core-item>
					<core-item on-click="{{redirect}}" link="serverside/indexeddb-ajax.html" label="IndexedDB"></core-item>
				</core-submenu>

			</core-menu>
		</core-header-panel>

		<template if="{{raw}}">

		</template>
		<template if="{{!raw}}">

<content select="h1"></content>

		</template>

<content></content>

	</core-scaffold>
</template>

</polymer-element>

<polymer-element name="prism-js" attributes="language linenumbers escape linehighlight theme inputValue mirror">
  <template>

    <template if="{{mirror}}"><content></content></template>
  </template>

</polymer-element>


text:
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

/*Il seguente programma C legge un intero n da terminale e stampa due volte
a video i numeri della serie  1^1  2^2 ... i^i ... n^n,
tramite le funzioni f1() e f2(), che hanno lo stesso effetto.

int main () {
int n;
printf ("Inserisci un intero : ");
scanf ("%d", &n);
f1(n);
f2(n);
}
*/

/*(a) 	Supponendo di disporre della funzione int potenza(int base, int esponente);
che realizza l'elevamento a potenza intera di un numero intero, si codifichi in
C la funzione iterativa f1()
*/

void f1 (int n) {
	int i;
	for (i=1; i<=n; i++)
		printf ("%d", potenza(i, i));
	return;
}

/*(b) 	Si codifichi in modo ricorsivo la funzione potenza(),
considerando solo il caso in cui sia la base sia l'esponente sono strettamente positivi

Il caso base è chiaramente quello per cui l'esponente vale 1:
il risultato è allora pari alla base.
Il passo induttivo si formalizza notando che be = b x be-1 (la ricorsione, cioè, si fa solo sull'esponente).
*/
	int potenza (int b, int e) {
		if ( e == 1 )
			return b;
		else
			return ( b * potenza(b, e-1) );
}

/*(c) 	Sempre sfruttando la funzione potenza(),
si codifichi in C la funzione ricorsiva f2(),
basandola sulla definizione seguente (da completare).
Attenzione a stampare i valori nell'ordine giusto.
	caso base: se n vale 1, stampa a video ...
	passo induttivo: se n è maggiore di 1 ...

Evidentemente si eseguono le chiamate ricorsive diminuendo
il parametro n fino a portarlo a 1. L'unica difficoltà consiste
nel generare l'output nell'ordine corretto: è tipico, infatti,
non badare a mettere l'istruzione di stampa a video DOPO la chiamata
ricorsiva (l'effetto è di visualizzare la sequenza invertita).
*/
	void f2 (int n) {
		if ( n == 1 )
			printf ("1");
		else {
			f2( n-1 );
			printf ("%d", potenza(n, n));
		}
		return;
}
//Eccone anche una versione alternativa, equivalente, un po' più compatta:
void f2 (int n) {
	if ( n > 1 )
		f2( n-1 );
	printf ("%d", potenza(n, n));
	return;
}


text:
{{<layout}}

{{$pageTitle}} Confirmation page example {{/pageTitle}}

{{$content}}

Booking confirmed

          Your booking reference number is

          43236WPGV

We have sent you a confirmation email.

              Thursday 28th January 2016 at 11:30

              Constable Steve Helmsley

              Firearms inspection

              Cumbria Constabulary (police)

              20 minutes face to face at:

              15 Maple Drive

              Kendal

              LA9 5BN

                Send me a text reminder 2 days before

Change or cancel

                Add to your calendar

                Print this page

{{/content}}

{{/layout}}


text:
<?php

/**
 * MdlRoleAssignmentsTable
 *
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class MdlRoleAssignmentsTable extends Doctrine_Table
{
    /**
     * Returns an instance of this class.
     *
     * @return object MdlRoleAssignmentsTable
     */
    public static function getInstance()
    {
        return Doctrine_Core::getTable('MdlRoleAssignments');
    }

    public function getAssignments($contexts,$role){

        $q = $this->createQuery("ra")
                ->where("ra.contextid IN (".implode(",",$contexts).") ")
                ->andWhere("ra.role = ?", $role)
                ->fetchArray();

        return $q;
    }
}


text:
title: Hibernate
localeTitle: Hibernar
---
## Hibernar

Hibernate ORM, comúnmente conocido como Hibernate, es una herramienta de mapeo objeto-relacional para Java. Proporciona un sistema para mapear modelos de dominio orientados a objetos a bases de datos relacionales. Posee múltiples funciones de manejo de objetos de alto nivel.

#### Más información:

Para documentación y descargas, visite [el sitio oficial de Hibernate](https://hibernate.org)


text:
package io.moquette.spi.metrics;

/**
 * Created by lumigrow on 5/17/17.
 */
public interface MetricContext {
    void processStopped();
}


text:
package account

import (
	"testing"

	assert "github.com/stretchr/testify/require"
	stripe "github.com/stripe/stripe-go/v74"
	_ "github.com/stripe/stripe-go/v74/testing"
)

func TestAccountDel(t *testing.T) {
	account, err := Del("acct_123", nil)
	assert.Nil(t, err)
	assert.NotNil(t, account)
}

func TestAccountGet(t *testing.T) {
	account, err := Get()
	assert.Nil(t, err)
	assert.NotNil(t, account)
}

func TestAccountGetByID(t *testing.T) {
	account, err := GetByID("acct_123", nil)
	assert.Nil(t, err)
	assert.NotNil(t, account)
}

func TestAccountList(t *testing.T) {
	i := List(&stripe.AccountListParams{})

	// Verify that we can get at least one account
	assert.True(t, i.Next())
	assert.Nil(t, i.Err())
	assert.NotNil(t, i.Account())
	assert.NotNil(t, i.AccountList())
}

func TestAccountNew(t *testing.T) {
	account, err := New(&stripe.AccountParams{
		BusinessProfile: &stripe.AccountBusinessProfileParams{
			Name:         stripe.String("name"),
			SupportEmail: stripe.String("foo@bar.com"),
			SupportURL:   stripe.String("www.stripe.com"),
			SupportPhone: stripe.String("4151234567"),
		},
		BusinessType: stripe.String(string(stripe.AccountBusinessTypeCompany)),
		Capabilities: &stripe.AccountCapabilitiesParams{
			CardPayments: &stripe.AccountCapabilitiesCardPaymentsParams{
				Requested: stripe.Bool(true),
			},
			Transfers: &stripe.AccountCapabilitiesTransfersParams{
				Requested: stripe.Bool(true),
			},
		},
		Company: &stripe.AccountCompanyParams{
			DirectorsProvided: stripe.Bool(true),
			Name:              stripe.String("company_name"),
			Verification: &stripe.AccountCompanyVerificationParams{
				Document: &stripe.AccountCompanyVerificationDocumentParams{
					Back:  stripe.String("file_123"),
					Front: stripe.String("file_abc"),
				},
			},
		},
		Documents: &stripe.AccountDocumentsParams{
			CompanyLicense: &stripe.AccountDocumentsCompanyLicenseParams{
				Files: []*string{stripe.String("file_xyz")},
			},
		},
		Country: stripe.String("CA"),
		ExternalAccount: &stripe.AccountExternalAccountParams{
			Token: stripe.String("tok_123"),
		},
		Settings: &stripe.AccountSettingsParams{
			Branding: &stripe.AccountSettingsBrandingParams{
				Icon: stripe.String("file_123"),
				Logo: stripe.String("file_234"),
			},
			CardPayments: &stripe.AccountSettingsCardPaymentsParams{
				DeclineOn: &stripe.AccountSettingsCardPaymentsDeclineOnParams{
					AVSFailure: stripe.Bool(true),
					CVCFailure: stripe.Bool(true),
				},
				StatementDescriptorPrefix: stripe.String("prefix"),
			},
			Payments: &stripe.AccountSettingsPaymentsParams{
				StatementDescriptor: stripe.String("descriptor"),
			},
			Payouts: &stripe.AccountSettingsPayoutsParams{
				DebitNegativeBalances: stripe.Bool(true),
				Schedule: &stripe.AccountSettingsPayoutsScheduleParams{
					DelayDaysMinimum: stripe.Bool(true),
					Interval:         stripe.String(string(stripe.AccountSettingsPayoutsScheduleIntervalManual)),
				},
				StatementDescriptor: stripe.String("payout_descriptor"),
			},
		},
		Type: stripe.String(string(stripe.AccountTypeCustom)),
	})
	assert.Nil(t, err)
	assert.NotNil(t, account)
}

func TestAccountReject(t *testing.T) {
	account, err := Reject("acct_123", &stripe.AccountRejectParams{
		Reason: stripe.String("fraud"),
	})
	assert.Nil(t, err)
	assert.NotNil(t, account)
}

func TestAccountUpdate(t *testing.T) {
	account, err := Update("acct_123", &stripe.AccountParams{
		Company: &stripe.AccountCompanyParams{
			Address: &stripe.AddressParams{
				Country:    stripe.String("CA"),
				City:       stripe.String("Montreal"),
				PostalCode: stripe.String("H2Y 1C6"),
				Line1:      stripe.String("275, rue Notre-Dame Est"),
				State:      stripe.String("QC"),
			},
		},
	})
	assert.Nil(t, err)
	assert.NotNil(t, account)
}


text:
<?php

namespace DebugBar\Tests\DataFormatter;

use DebugBar\DataFormatter\DebugBarVarDumper;
use DebugBar\Tests\DebugBarTestCase;

class DebugBarVarDumperTest extends DebugBarTestCase
{
    const STYLE_STRING = 'SpecialStyleString';

    private $testStyles = array(
        'default' => self::STYLE_STRING,
    );

    public function testBasicFunctionality()
    {
        // Test that we can render a simple variable without dump headers
        $d = new DebugBarVarDumper();
        $d->mergeDumperOptions(array('styles' => $this->testStyles));
        $out = $d->renderVar('magic');

        $this->assertStringContainsString('magic', $out);
        $this->assertStringNotContainsString(self::STYLE_STRING, $out); // make sure there's no dump header

        // Test that we can capture a variable without rendering into a Data-type variable
        $data = $d->captureVar('hello');
        $this->assertStringContainsString('hello', $data);
        $deserialized = unserialize($data);
        $this->assertInstanceOf('Symfony\Component\VarDumper\Cloner\Data', $deserialized);

        // Test that we can render the captured variable at a later time
        $out = $d->renderCapturedVar($data);
        $this->assertStringContainsString('hello', $out);
        $this->assertStringNotContainsString(self::STYLE_STRING, $out); // make sure there's no dump header
    }

    public function testSeeking()
    {
        $testData = array(
            'one',
            array('two'),
            'three',
        );
        $d = new DebugBarVarDumper();
        $data = $d->captureVar($testData);

        // seek depth of 1
        $out = $d->renderCapturedVar($data, array(1));
        $this->assertStringNotContainsString('one', $out);
        $this->assertStringContainsString('array', $out);
        $this->assertStringContainsString('two', $out);
        $this->assertStringNotContainsString('three', $out);

        // seek depth of 2
        $out = $d->renderCapturedVar($data, array(1, 0));
        $this->assertStringNotContainsString('one', $out);
        $this->assertStringNotContainsString('array', $out);
        $this->assertStringContainsString('two', $out);
        $this->assertStringNotContainsString('three', $out);
    }

    public function testAssetProvider()
    {
        $d = new DebugBarVarDumper();
        $d->mergeDumperOptions(array('styles' => $this->testStyles));
        $assets = $d->getAssets();
        $this->assertArrayHasKey('inline_head', $assets);
        $this->assertCount(1, $assets);

        $inlineHead = $assets['inline_head'];
        $this->assertArrayHasKey('html_var_dumper', $inlineHead);
        $this->assertCount(1, $inlineHead);

        $assetText = $inlineHead['html_var_dumper'];
        $this->assertStringContainsString(self::STYLE_STRING, $assetText);
    }

    public function testBasicOptionOperations()
    {
        // Test basic get/merge/reset functionality for cloner
        $d = new DebugBarVarDumper();
        $options = $d->getClonerOptions();
        $this->assertEmpty($options);

        $d->mergeClonerOptions(array(
            'max_items' => 5,
        ));
        $d->mergeClonerOptions(array(
            'max_string' => 4,
        ));
        $d->mergeClonerOptions(array(
            'max_items' => 3,
        ));
        $options = $d->getClonerOptions();
        $this->assertEquals(array(
            'max_items' => 3,
            'max_string' => 4,
        ), $options);

        $d->resetClonerOptions(array(
            'min_depth' => 2,
        ));
        $options = $d->getClonerOptions();
        $this->assertEquals(array(
            'min_depth' => 2,
        ), $options);

        // Test basic get/merge/reset functionality for dumper
        $options = $d->getDumperOptions();
        $this->assertArrayHasKey('styles', $options);
        $this->assertArrayHasKey('const', $options['styles']);
        $this->assertArrayHasKey('expanded_depth', $options);
        $this->assertEquals(0, $options['expanded_depth']);
        $this->assertCount(2, $options);

        $d->mergeDumperOptions(array(
            'styles' => $this->testStyles,
        ));
        $d->mergeDumperOptions(array(
            'max_string' => 7,
        ));
        $options = $d->getDumperOptions();
        $this->assertEquals(array(
            'max_string' => 7,
            'styles' => $this->testStyles,
            'expanded_depth' => 0,
        ), $options);

        $d->resetDumperOptions(array(
            'styles' => $this->testStyles,
        ));
        $options = $d->getDumperOptions();
        $this->assertEquals(array(
            'styles' => $this->testStyles,
            'expanded_depth' => 0,
        ), $options);
    }

    public function testClonerOptions()
    {
        // Test the actual operation of the cloner options
        $d = new DebugBarVarDumper();

        // Test that the 'casters' option can remove default casters
        $testData = function() {};
        $d->resetClonerOptions();
        $this->assertStringContainsString('DebugBarVarDumperTest.php', $d->renderVar($testData));

        $d->resetClonerOptions(array(
            'casters' => array(),
        ));
        $this->assertStringNotContainsString('DebugBarVarDumperTest.php', $d->renderVar($testData));

        // Test that the 'additional_casters' option can add new casters
        $testData = function() {};
        $d->resetClonerOptions();
        $this->assertStringContainsString('DebugBarVarDumperTest.php', $d->renderVar($testData));

        $d->resetClonerOptions(array(
            'casters' => array(),
            'additional_casters' => array('Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure'),
        ));
        $this->assertStringContainsString('DebugBarVarDumperTest.php', $d->renderVar($testData));

        // Test 'max_items'
        $testData = array(array('one', 'two', 'three', 'four', 'five'));
        $d->resetClonerOptions();
        $out = $d->renderVar($testData);
        foreach ($testData[0] as $search) {
            $this->assertStringContainsString($search, $out);
        }

        $d->resetClonerOptions(array(
            'max_items' => 3,
        ));
        $out = $d->renderVar($testData);
        $this->assertStringContainsString('one', $out);
        $this->assertStringContainsString('two', $out);
        $this->assertStringContainsString('three', $out);
        $this->assertStringNotContainsString('four', $out);
        $this->assertStringNotContainsString('five', $out);

        // Test 'max_string'
        $testData = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $d->resetClonerOptions();
        $this->assertStringContainsString($testData, $d->renderVar($testData));

        $d->resetClonerOptions(array(
            'max_string' => 10,
        ));
        $out = $d->renderVar($testData);
        $this->assertStringContainsString('ABCDEFGHIJ', $out);
        $this->assertStringNotContainsString('ABCDEFGHIJK', $out);

        // Test 'min_depth' if we are on a Symfony version that supports it
        if (method_exists('Symfony\Component\VarDumper\Cloner\AbstractCloner', 'setMinDepth')) {
            $testData = array('one', 'two', 'three', 'four', 'five');
            $d->resetClonerOptions(array(
                'max_items' => 3,
            ));
            $out = $d->renderVar($testData);
            foreach ($testData as $search) {
                $this->assertStringContainsString($search, $out);
            }

            $d->resetClonerOptions(array(
                'min_depth' => 0,
                'max_items' => 3,
            ));
            $out = $d->renderVar($testData);
            $this->assertStringContainsString('one', $out);
            $this->assertStringContainsString('two', $out);
            $this->assertStringContainsString('three', $out);
            $this->assertStringNotContainsString('four', $out);
            $this->assertStringNotContainsString('five', $out);
        }
    }

    public function testDumperOptions()
    {
        // Test the actual operation of the dumper options
        $d = new DebugBarVarDumper();

        // Test that the 'styles' option affects assets
        $d->resetDumperOptions();
        $assets = $d->getAssets();
        $this->assertStringNotContainsString(self::STYLE_STRING, $assets['inline_head']['html_var_dumper']);

        $d->resetDumperOptions(array('styles' => $this->testStyles));
        $assets = $d->getAssets();
        $this->assertStringContainsString(self::STYLE_STRING, $assets['inline_head']['html_var_dumper']);

        // The next tests require changes in Symfony 3.2:
        $dumpMethod = new \ReflectionMethod('Symfony\Component\VarDumper\Dumper\HtmlDumper', 'dump');
        if ($dumpMethod->getNumberOfParameters() >= 3) {
            // Test that the 'expanded_depth' option affects output
            $d->resetDumperOptions(array('expanded_depth' => 123321));
            $out = $d->renderVar(true);
            $this->assertStringContainsString('123321', $out);

            // Test that the 'max_string' option affects output
            $d->resetDumperOptions(array('max_string' => 321123));
            $out = $d->renderVar(true);
            $this->assertStringContainsString('321123', $out);

            // Test that the 'file_link_format' option affects output
            $d->resetDumperOptions(array('file_link_format' => 'fmt%ftest'));
            $out = $d->renderVar(function() {});
            $this->assertStringContainsString('DebugBarVarDumperTest.phptest', $out);
        }
    }
}


text:
#ifndef ENTT_POLY_POLY_HPP
#define ENTT_POLY_POLY_HPP

#include <cstddef>
#include <functional>
#include <tuple>
#include <type_traits>
#include <utility>
#include "../core/any.hpp"
#include "../core/type_info.hpp"
#include "../core/type_traits.hpp"
#include "fwd.hpp"

namespace entt {

/*! @brief Inspector class used to infer the type of the virtual table. */
struct poly_inspector {
    /**
     * @brief Generic conversion operator (definition only).
     * @tparam Type Type to which conversion is requested.
     */
    template<class Type>
    operator Type &&() const;

    /**
     * @brief Dummy invocation function (definition only).
     * @tparam Member Index of the function to invoke.
     * @tparam Args Types of arguments to pass to the function.
     * @param args The arguments to pass to the function.
     * @return A poly inspector convertible to any type.
     */
    template<std::size_t Member, typename... Args>
    poly_inspector invoke(Args &&...args) const;

    /*! @copydoc invoke */
    template<std::size_t Member, typename... Args>
    poly_inspector invoke(Args &&...args);
};

/**
 * @brief Static virtual table factory.
 * @tparam Concept Concept descriptor.
 * @tparam Len Size of the storage reserved for the small buffer optimization.
 * @tparam Align Alignment requirement.
 */
template<typename Concept, std::size_t Len, std::size_t Align>
class poly_vtable {
    using inspector = typename Concept::template type<poly_inspector>;

    template<typename Ret, typename... Args>
    static auto vtable_entry(Ret (*)(inspector &, Args...)) -> Ret (*)(basic_any<Len, Align> &, Args...);

    template<typename Ret, typename... Args>
    static auto vtable_entry(Ret (*)(const inspector &, Args...)) -> Ret (*)(const basic_any<Len, Align> &, Args...);

    template<typename Ret, typename... Args>
    static auto vtable_entry(Ret (*)(Args...)) -> Ret (*)(const basic_any<Len, Align> &, Args...);

    template<typename Ret, typename... Args>
    static auto vtable_entry(Ret (inspector::*)(Args...)) -> Ret (*)(basic_any<Len, Align> &, Args...);

    template<typename Ret, typename... Args>
    static auto vtable_entry(Ret (inspector::*)(Args...) const) -> Ret (*)(const basic_any<Len, Align> &, Args...);

    template<auto... Candidate>
    static auto make_vtable(value_list<Candidate...>) noexcept
        -> decltype(std::make_tuple(vtable_entry(Candidate)...));

    template<typename... Func>
    [[nodiscard]] static constexpr auto make_vtable(type_list<Func...>) noexcept {
        if constexpr(sizeof...(Func) == 0u) {
            return decltype(make_vtable(typename Concept::template impl<inspector>{})){};
        } else if constexpr((std::is_function_v<Func> && ...)) {
            return decltype(std::make_tuple(vtable_entry(std::declval<Func inspector::*>())...)){};
        }
    }

    template<typename Type, auto Candidate, typename Ret, typename Any, typename... Args>
    static void fill_vtable_entry(Ret (*&entry)(Any &, Args...)) noexcept {
        if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
            entry = +[](Any &, Args... args) -> Ret {
                return std::invoke(Candidate, std::forward<Args>(args)...);
            };
        } else {
            entry = +[](Any &instance, Args... args) -> Ret {
                return static_cast<Ret>(std::invoke(Candidate, any_cast<constness_as_t<Type, Any> &>(instance), std::forward<Args>(args)...));
            };
        }
    }

    template<typename Type, auto... Index>
    [[nodiscard]] static auto fill_vtable(std::index_sequence<Index...>) noexcept {
        vtable_type impl{};
        (fill_vtable_entry<Type, value_list_element_v<Index, typename Concept::template impl<Type>>>(std::get<Index>(impl)), ...);
        return impl;
    }

    using vtable_type = decltype(make_vtable(Concept{}));
    static constexpr bool is_mono_v = std::tuple_size_v<vtable_type> == 1u;

public:
    /*! @brief Virtual table type. */
    using type = std::conditional_t<is_mono_v, std::tuple_element_t<0u, vtable_type>, const vtable_type *>;

    /**
     * @brief Returns a static virtual table for a specific concept and type.
     * @tparam Type The type for which to generate the virtual table.
     * @return A static virtual table for the given concept and type.
     */
    template<typename Type>
    [[nodiscard]] static type instance() noexcept {
        static_assert(std::is_same_v<Type, std::decay_t<Type>>, "Type differs from its decayed form");
        static const vtable_type vtable = fill_vtable<Type>(std::make_index_sequence<Concept::template impl<Type>::size>{});

        if constexpr(is_mono_v) {
            return std::get<0>(vtable);
        } else {
            return &vtable;
        }
    }
};

/**
 * @brief Poly base class used to inject functionalities into concepts.
 * @tparam Poly The outermost poly class.
 */
template<typename Poly>
struct poly_base {
    /**
     * @brief Invokes a function from the static virtual table.
     * @tparam Member Index of the function to invoke.
     * @tparam Args Types of arguments to pass to the function.
     * @param self A reference to the poly object that made the call.
     * @param args The arguments to pass to the function.
     * @return The return value of the invoked function, if any.
     */
    template<std::size_t Member, typename... Args>
    [[nodiscard]] decltype(auto) invoke(const poly_base &self, Args &&...args) const {
        const auto &poly = static_cast<const Poly &>(self);

        if constexpr(std::is_function_v<std::remove_pointer_t<decltype(poly.vtable)>>) {
            return poly.vtable(poly.storage, std::forward<Args>(args)...);
        } else {
            return std::get<Member>(*poly.vtable)(poly.storage, std::forward<Args>(args)...);
        }
    }

    /*! @copydoc invoke */
    template<std::size_t Member, typename... Args>
    [[nodiscard]] decltype(auto) invoke(poly_base &self, Args &&...args) {
        auto &poly = static_cast<Poly &>(self);

        if constexpr(std::is_function_v<std::remove_pointer_t<decltype(poly.vtable)>>) {
            static_assert(Member == 0u, "Unknown member");
            return poly.vtable(poly.storage, std::forward<Args>(args)...);
        } else {
            return std::get<Member>(*poly.vtable)(poly.storage, std::forward<Args>(args)...);
        }
    }
};

/**
 * @brief Shortcut for calling `poly_base<Type>::invoke`.
 * @tparam Member Index of the function to invoke.
 * @tparam Poly A fully defined poly object.
 * @tparam Args Types of arguments to pass to the function.
 * @param self A reference to the poly object that made the call.
 * @param args The arguments to pass to the function.
 * @return The return value of the invoked function, if any.
 */
template<std::size_t Member, typename Poly, typename... Args>
decltype(auto) poly_call(Poly &&self, Args &&...args) {
    return std::forward<Poly>(self).template invoke<Member>(self, std::forward<Args>(args)...);
}

/**
 * @brief Static polymorphism made simple and within everyone's reach.
 *
 * Static polymorphism is a very powerful tool in C++, albeit sometimes
 * cumbersome to obtain.

 * This class aims to make it simple and easy to use.
 *
 * @note
 * Both deduced and defined static virtual tables are supported.

 * Moreover, the `poly` class template also works with unmanaged objects.
 *
 * @tparam Concept Concept descriptor.
 * @tparam Len Size of the storage reserved for the small buffer optimization.
 * @tparam Align Optional alignment requirement.
 */
template<typename Concept, std::size_t Len, std::size_t Align>
class basic_poly: private Concept::template type<poly_base<basic_poly<Concept, Len, Align>>> {
    /*! @brief A poly base is allowed to snoop into a poly object. */
    friend struct poly_base<basic_poly>;

public:
    /*! @brief Concept type. */
    using concept_type = typename Concept::template type<poly_base<basic_poly>>;
    /*! @brief Virtual table type. */
    using vtable_type = typename poly_vtable<Concept, Len, Align>::type;

    /*! @brief Default constructor. */
    basic_poly() noexcept
        : storage{},
          vtable{} {}

    /**
     * @brief Constructs a poly by directly initializing the new object.
     * @tparam Type Type of object to use to initialize the poly.
     * @tparam Args Types of arguments to use to construct the new instance.
     * @param args Parameters to use to construct the instance.
     */
    template<typename Type, typename... Args>
    explicit basic_poly(std::in_place_type_t<Type>, Args &&...args)
        : storage{std::in_place_type<Type>, std::forward<Args>(args)...},
          vtable{poly_vtable<Concept, Len, Align>::template instance<std::remove_cv_t<std::remove_reference_t<Type>>>()} {}

    /**
     * @brief Constructs a poly from a given value.
     * @tparam Type Type of object to use to initialize the poly.
     * @param value An instance of an object to use to initialize the poly.
     */
    template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, basic_poly>>>
    basic_poly(Type &&value) noexcept
        : basic_poly{std::in_place_type<std::remove_cv_t<std::remove_reference_t<Type>>>, std::forward<Type>(value)} {}

    /**
     * @brief Returns the object type if any, `type_id<void>()` otherwise.
     * @return The object type if any, `type_id<void>()` otherwise.
     */
    [[nodiscard]] const type_info &type() const noexcept {
        return storage.type();
    }

    /**
     * @brief Returns an opaque pointer to the contained instance.
     * @return An opaque pointer the contained instance, if any.
     */
    [[nodiscard]] const void *data() const noexcept {
        return storage.data();
    }

    /*! @copydoc data */
    [[nodiscard]] void *data() noexcept {
        return storage.data();
    }

    /**
     * @brief Replaces the contained object by creating a new instance directly.
     * @tparam Type Type of object to use to initialize the poly.
     * @tparam Args Types of arguments to use to construct the new instance.
     * @param args Parameters to use to construct the instance.
     */
    template<typename Type, typename... Args>
    void emplace(Args &&...args) {
        storage.template emplace<Type>(std::forward<Args>(args)...);
        vtable = poly_vtable<Concept, Len, Align>::template instance<std::remove_cv_t<std::remove_reference_t<Type>>>();
    }

    /*! @brief Destroys contained object */
    void reset() {
        storage.reset();
        vtable = {};
    }

    /**
     * @brief Returns false if a poly is empty, true otherwise.
     * @return False if the poly is empty, true otherwise.
     */
    [[nodiscard]] explicit operator bool() const noexcept {
        return static_cast<bool>(storage);
    }

    /**
     * @brief Returns a pointer to the underlying concept.
     * @return A pointer to the underlying concept.
     */
    [[nodiscard]] concept_type *operator->() noexcept {
        return this;
    }

    /*! @copydoc operator-> */
    [[nodiscard]] const concept_type *operator->() const noexcept {
        return this;
    }

    /**
     * @brief Aliasing constructor.
     * @return A poly that shares a reference to an unmanaged object.
     */
    [[nodiscard]] basic_poly as_ref() noexcept {
        basic_poly ref{};
        ref.storage = storage.as_ref();
        ref.vtable = vtable;
        return ref;
    }

    /*! @copydoc as_ref */
    [[nodiscard]] basic_poly as_ref() const noexcept {
        basic_poly ref{};
        ref.storage = storage.as_ref();
        ref.vtable = vtable;
        return ref;
    }

private:
    basic_any<Len, Align> storage;
    vtable_type vtable;
};

} // namespace entt

#endif


text:
package app_test

import (
	"errors"
	"os"
	"path/filepath"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	. "github.com/cloudfoundry/bosh-agent/davcli/app"
	davconf "github.com/cloudfoundry/bosh-agent/davcli/config"
)

type FakeRunner struct {
	Config  davconf.Config
	RunArgs []string
	RunErr  error
}

func (r *FakeRunner) SetConfig(newConfig davconf.Config) {
	r.Config = newConfig
}

func (r *FakeRunner) Run(cmdArgs []string) (err error) {
	r.RunArgs = cmdArgs
	return r.RunErr
}

func pathToFixture(file string) string {
	pwd, err := os.Getwd()
	Expect(err).ToNot(HaveOccurred())

	fixturePath := filepath.Join(pwd, "../../Fixtures", file)

	absPath, err := filepath.Abs(fixturePath)
	Expect(err).ToNot(HaveOccurred())

	return absPath
}

func init() {
	Describe("Testing with Ginkgo", func() {
		It("runs the put command", func() {
			runner := &FakeRunner{}

			app := New(runner)
			err := app.Run([]string{"dav-cli", "-c", pathToFixture("dav-cli-config.json"), "put", "localFile", "remoteFile"})
			Expect(err).ToNot(HaveOccurred())

			expectedConfig := davconf.Config{
				User:     "some user",
				Password: "some pwd",
				Endpoint: "http://example.com/some/endpoint",
			}

			Expect(runner.Config).To(Equal(expectedConfig))
			Expect(runner.RunArgs).To(Equal([]string{"put", "localFile", "remoteFile"}))
		})

		It("returns error with no config argument", func() {
			runner := &FakeRunner{}

			app := New(runner)
			err := app.Run([]string{"put", "localFile", "remoteFile"})
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("Config file arg `-c` is missing"))
		})

		It("returns error from the cmd runner", func() {
			runner := &FakeRunner{
				RunErr: errors.New("fake-run-error"),
			}

			app := New(runner)
			err := app.Run([]string{"dav-cli", "-c", pathToFixture("dav-cli-config.json"), "put", "localFile", "remoteFile"})
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("fake-run-error"))
		})
	})
}


text:
'use strict';
var property = require('nested-property');
var keyBy = require('lodash.keyby');

function createTree(array, rootNodes, customID, childrenProperty) {
  var tree = [];

  for (var rootNode in rootNodes) {
    var node = rootNodes[rootNode];
    var childNode = array[node[customID]];

    if (!node && !rootNodes.hasOwnProperty(rootNode)) {
      continue;
    }

    if (childNode) {
      node[childrenProperty] = createTree(
        array,
        childNode,
        customID,
        childrenProperty
      );
    }

    tree.push(node);
  }

  return tree;
}

function groupByParents(array, options) {
  var arrayByID = keyBy(array, options.customID);

  return array.reduce(function(prev, item) {
    var parentID = property.get(item, options.parentProperty);
    if (!parentID || !arrayByID.hasOwnProperty(parentID)) {
      parentID = options.rootID;
    }

    if (parentID && prev.hasOwnProperty(parentID)) {
      prev[parentID].push(item);
      return prev;
    }

    prev[parentID] = [item];
    return prev;
  }, {});
}

function isObject(o) {
  return Object.prototype.toString.call(o) === '[object Object]';
}

function deepClone(data) {
  if (Array.isArray(data)) {
    return data.map(deepClone);
  } else if (isObject(data)) {
    return Object.keys(data).reduce(function(o, k) {
      o[k] = deepClone(data[k]);
      return o;
    }, {});
  } else {
    return data;
  }
}

/**
 * arrayToTree
 * Convert a plain array of nodes (with pointers to parent nodes) to a nested
 * data structure
 *
 * @name arrayToTree
 * @function
 *
 * @param {Array} data An array of data
 * @param {Object} options An object containing the following fields:
 *
 *  - `parentProperty` (String): A name of a property where a link to
 * a parent node could be found. Default: 'parent_id'
 *  - `customID` (String): An unique node identifier. Default: 'id'
 *  - `childrenProperty` (String): A name of a property where children nodes
 * are going to be stored. Default: 'children'.
 *
 * @return {Array} Result of transformation
 */

module.exports = function arrayToTree(data, options) {
  options = Object.assign(
    {
      parentProperty: 'parent_id',
      childrenProperty: 'children',
      customID: 'id',
      rootID: '0'
    },
    options
  );

  if (!Array.isArray(data)) {
    throw new TypeError('Expected an array but got an invalid argument');
  }

  var grouped = groupByParents(deepClone(data), options);
  return createTree(
    grouped,
    grouped[options.rootID],
    options.customID,
    options.childrenProperty
  );
};


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coordinates** | [**\Swagger\Client\Model\Point2D**](Point2D.md) |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/frame/browser_frame_ash.h"

#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/test/browser_test.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"

namespace {

class BrowserTestParam : public InProcessBrowserTest,
                         public testing::WithParamInterface<bool> {
 public:
  BrowserTestParam() = default;
  ~BrowserTestParam() override = default;

  bool CreateV1App() { return GetParam(); }

 private:
  DISALLOW_COPY_AND_ASSIGN(BrowserTestParam);
};

}  // namespace

// Test that in Chrome OS, for app browser (v1app) windows, the auto management
// logic is disabled while for tabbed browser windows, it is enabled.
IN_PROC_BROWSER_TEST_P(BrowserTestParam,
                       TabbedOrAppBrowserWindowAutoManagementTest) {
  // Default |browser()| is not used by this test.
  browser()->window()->Close();

  // Open a new browser window (app or tabbed depending on a parameter).
  bool is_test_app = CreateV1App();
  Browser::CreateParams params =
      is_test_app ? Browser::CreateParams::CreateForApp(
                        "test_browser_app", true /* trusted_source */,
                        gfx::Rect(), browser()->profile(), true)
                  : Browser::CreateParams(browser()->profile(), true);
  gfx::Rect original_bounds(gfx::Rect(150, 250, 510, 150));
  params.initial_show_state = ui::SHOW_STATE_NORMAL;
  params.initial_bounds = original_bounds;
  Browser* browser = new Browser(params);
  browser->window()->Show();

  // The bounds passed via |initial_bounds| should be respected regardless of
  // the window type.
  EXPECT_EQ(original_bounds, browser->window()->GetBounds());

  // Close the browser and re-create the browser window with the same app name.
  // Don't provide initial bounds. The bounds should have been saved, but for
  // tabbed windows, the position should be auto-managed.
  browser->window()->Close();
  params.initial_bounds = gfx::Rect();
  browser = new Browser(params);
  browser->window()->Show();

  // For tabbed browser window, it will be centered to work area by auto window
  // management logic; for app browser window, it will remain the given bounds.
  gfx::Rect expectation = original_bounds;
  if (!is_test_app) {
    expectation =
        display::Screen::GetScreen()
            ->GetDisplayNearestPoint(browser->window()->GetBounds().origin())
            .work_area();
    expectation.ClampToCenteredSize(original_bounds.size());
    expectation.set_y(original_bounds.y());
  }

  EXPECT_EQ(expectation, browser->window()->GetBounds())
      << (is_test_app ? "for app window" : "for tabbed browser window");
}

INSTANTIATE_TEST_SUITE_P(BrowserTestTabbedOrApp,
                         BrowserTestParam,
                         testing::Bool());


text:
package net.sf.anpr.rcp.filesystem.action;

import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;

import net.sf.anpr.rcp.filesystem.JTreeFileBrowser;

public class OrderingAction extends FileBrowserAction {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	public OrderingAction() {
		putValue("ShortDescription", "Ordering by directories or files");
		putValue("SmallIcon",
				new ImageIcon(getClass().getResource("folder_view.png")));
	}

	public void actionPerformed(ActionEvent e) {
		this.browser
				.setOrderingMode(this.browser.getOrderingMode() == JTreeFileBrowser.DIRECTORY_FIRST ? JTreeFileBrowser.FILE_FIRST
						: JTreeFileBrowser.DIRECTORY_FIRST);
	}
}


text:
'use strict';

/**
 * @ngdoc service
 * @name realtalkApp.talk
 * @description
 * # talk
 * Factory in the realtalkApp.
 */
angular.module('realtalkApp')
  .factory('talkChatService', ['Socket', 'talkInputService', function (Socket, talkInputService) {
    // =====================================================================
    // Variables
    // =====================================================================
    var socket = Socket,
        // The max length of a text string
        MAX_LENGTH = 50,
        chat = {
          open: false,
          // The user being chatted with
          chattingWith: null,
          // The user's chat string
          meTxt: '',
          // The other user's chat string
          otherTxt: ''
        },

        // =====================================================================
        // Chat Helpers
        // =====================================================================
        /**
         * Return the name of a userTxt variable
         * @param: {String} userType - Either "me" or "other"
         */
        txtRef = function(userType) {
          return userType + 'Txt';
        },
        /**
         * Add input to a chat box
         * @param: {String} input - The input to add
         * @param: {String} userType - Either "me" or "other"
         */
        writeInput = function(userType, input) {
          // Don't update if not chatting
          if (!chat.chattingWith) return;

          // Get the name of the referenced txt variable
          var user = txtRef(userType),
            // The current text
            text = chat[user],
            // The length of the current text + input
            textLength;

          // Append new characters
          text = text + input;
          // Get new length
          textLength = text.length;
          // Cut to MAX_LENGTH
          if (textLength > MAX_LENGTH) {
            text = text.substring(textLength - MAX_LENGTH, textLength);
          }

          // Set new text
          chat[user] = text;
        },
        /**
         * Remove a character from a box
         * @param: {String} userType - Either "me" or "other"
         */
        removeChar = function(userType) {
          // Don't update if not chatting
          if (!chat.chattingWith) return;

          var textRef = txtRef(userType),
            // The current text
            text = chat[textRef];
          // Remove one char from the text
          chat[textRef] = text.substring(0, text.length - 1);
        },
        /**
         * Empty a chat String
         * @param: {String} userType - Either "me" or "other"
         */
        emptyChat = function(userType, emit) {
          chat[txtRef(userType)] = '';

          // Emit the clear event if requested
          if (emit) {
            socket.emit('clear');
          }
        },
        /**
         * Decide what to do with an input String (that starts with a space)
         * @param: {String} userType - Either "me" or "other"
         */
        decideInput = function(input) {
          // Don't update if not chatting
          if (!chat.chattingWith) return;

          if (input) {
            // User typed a string
            // Remove the first character, which is there to handle backspace
            input = input.substring(1, input.length);
            // Type the string into the #me box
            writeInput('me', input);
            // Send it to the server
            socket.emit('input', input);
          }
          else {
            // User hit backspace
            removeChar('me');
            socket.emit('back');
          }
        },

        // =====================================================================
        // Text in handlers
        // =====================================================================
        /**
         * Add a character to the #other box
         * @param {String} text - The text to write
         */
        textInHandler = function (text) {
          writeInput('other', text);
        },
        /**
         * Remove a char from the #other box
         */
        removeHandler = function () {
          removeChar('other');
        },
        /**
         * Clear the #other box
         */
        clearHandler = function () {
          emptyChat('other');
        },

        // =====================================================================
        // Private Chat Start/End Handler
        // =====================================================================
        setChat = function (open, chattingWith) {
          chat.open = open;
          chat.chattingWith = chattingWith;
        },

        // =====================================================================
        // Public Chat Start/End Handlers
        // =====================================================================
        /**
         * End a chat
         * @param {boolean} dontSetSizes=false - If true, don't run setSizes
         */
        chatEnd = function (dontSetSizes) {
          emptyChat('me');
          emptyChat('other');
          setChat(false, null);
        },
        /**
         * Start a chat
         * @param {boolean} dontSetSizes=false - If true, don't run setSizes
         */
        chatStart = function (chattingWith) {
          setChat(true, chattingWith);
          talkInputService.focus();
        };

    // =========================================================================
    // Socket events
    // =========================================================================

    // Receive text
    socket.on('input', textInHandler);
    // Receive backspace
    socket.on('back', removeHandler);
    // Receive clearbox
    socket.on('clear', clearHandler);

    // =========================================================================
    // Return Public
    // =========================================================================
    return {
      chat: chat,
      chatStart: chatStart,
      chatEnd: chatEnd,
      decideInput: decideInput,
      emptyChat: emptyChat
    };
  }])

/**
 * @ngdoc talkMsgService
 * @name realtalkApp.talk
 * @description
 * # talk
 * Talk Message Service
 */
  .factory('talkMsgService', ['$location', 'Socket', 'talkChatService', function ($location, Socket, talkChatService) {
        // =====================================================================
        // Variables
        // =====================================================================
    var socket = Socket,
        types = {
          UNAVAILABLE: true,
          CALL: false,
          RING: false,
          HUNGUP: true,
          ERR: true,
          CLOSED: true
        },
        message = {
          // State of the message popup
          open: false,
          // The message info
          header: '',
          text: '',
          yesBtn: {
            value: '',
            onClick: ''
          },
          noBtn: {
            value: '',
            onClick: ''
          },
          // Message type
          type: types.UNAVAILABLE
        },

        // =====================================================================
        // Socket event handlers
        // =====================================================================
        /**
         * Handle a hang-up from the user
         */
        hangUpHandler = function () {
          // Send hangup event
          socket.emit('hangup', talkChatService.chattingWith);
          // End Chat
          talkChatService.chatEnd();
          // Close message
          clearMessage();
        },
        /**
         * Handle a hang-up from the other user
         */
        hungUpHandler = function (username) {
          // Show a chatend message if the current message is replaceable
          if (message.type) {
            // Bring up hungup event
            setMessage(
              true,
              types.HUNGUP,
              username + " has left the chat.",
              "You can choose someone else to chat with.",
              // Add OK button that closes the message
              new Btn("OK", clearMessage),
              // No CANCEL msg
              new Btn(" "));
          }
          // End Chat either way
          talkChatService.chatEnd();
        },
        /**
         * Handle a ring event
         */
        ringHandler = function (username) {
          // if the current message is replaceable, accept the ring
          if (message.type) {
            setMessage(
              true,
              types.RING,
              username + ' wants to chat!',
              '',
              // Click Chat to start chat
              new Btn('Chat', function() {
                socket.emit('pickup', username);
              }),
              // Click Busy to ignore
              new Btn('Busy', function() {
                socket.emit('unavailable', username);
                clearMessage();
              }));
          // If the current message is not replaceable
          } else {
            // Respond with unavailable
            socket.emit('unavailable', username);
          }
        },

        cancelRingHandler = function () {
          clearMessage();
        },
        /**
         * Handle a pick-up event
         */
        startChatHandler = function (username) {
          clearMessage();
          talkChatService.chatStart(username);
        },
        /**
         * Handle an event where the other user was unavailable
         */
        unavailableHandler = function (username) {
          setMessage(
            true,
            types.UNAVAILABLE,
            username + ' was unavailable.',
            '',
            new Btn('OK', function() {
              clearMessage();
            })
          );
        },
        /**
         * Handle an event where the server disconnects the user
         */
        disconnectHandler = function () {
          // Move back to homepage, which will clear any chat status
          $location.path('/');
        },

        // =====================================================================
        // Public Functions
        // =====================================================================
        Btn = function (value, onClick) {
          this.value = value || ' ';
          this.onClick = onClick;
        },

        setMessage = function(open, type, header, text, yesBtn, noBtn) {
          // Update model
          message.open    = open    || false;
          message.type    = type    || types.CLOSED;
          message.header  = header  || ' ';
          message.text    = text    || ' ';
          message.yesBtn  = yesBtn  || new Btn();
          message.noBtn   = noBtn   || new Btn();
        },

        clearMessage = function () {
          setMessage();
        };

        // =====================================================================
        // Set up socket listeners
        // =====================================================================

        //Ring
        socket.on('ring', ringHandler);
        //Cancel Ring
        socket.on('cancelRing', cancelRingHandler);
        //unavailable
        socket.on('unavailable', unavailableHandler);
        //startchat
        socket.on('startchat', startChatHandler);
        //endchat
        socket.on('hungup', hungUpHandler);
        // server disconnects
        socket.on('disconnect', disconnectHandler);

    // =====================================================================
    // Return Public Functions
    // =====================================================================
    return {
      message: message,
      types: types,
      Btn: Btn,
      setMessage: setMessage,
      clearMessage: clearMessage,
      hangUpHandler: hangUpHandler
    };
  }])
/**
 * @ngdoc talkMsgService
 * @name realtalkApp.talk
 * @description
 * # talk
 * Talk Message Service
 */
  .factory('talkInputService', ['$rootScope', function ($rootScope) {

    // =====================================================================
    // Return Public Data
    // =====================================================================
    return {
      focus: function () {
        $rootScope.$broadcast('inputFocus');
      }
    };
  }]);


text:
package org.workcraft.plugins.mpsat_verification.commands;

import org.workcraft.plugins.mpsat_verification.presets.VerificationParameters;
import org.workcraft.plugins.mpsat_verification.utils.ReachUtils;
import org.workcraft.plugins.stg.StgModel;
import org.workcraft.workspace.WorkspaceEntry;
import org.workcraft.utils.WorkspaceUtils;

public class ConsistencyVerificationCommand extends AbstractVerificationCommand {

    @Override
    public String getDisplayName() {
        return "Consistency [MPSat]";
    }

    @Override
    public boolean isApplicableTo(WorkspaceEntry we) {
        return WorkspaceUtils.isApplicable(we, StgModel.class);
    }

    @Override
    public int getPriority() {
        return 6;
    }

    @Override
    public Position getPosition() {
        return Position.TOP;
    }

    @Override
    public VerificationParameters getVerificationParameters(WorkspaceEntry we) {
        return ReachUtils.getConsistencyParameters();
    }

}


text:
package pl.com.tt.psc.reflationLib.proxies;

import pl.com.tt.psc.reflationLib.annotantions.After;
import pl.com.tt.psc.reflationLib.annotantions.Before;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * Created by: Karol Górecki
 * kagurecki (at) gmail.com
 * Version: 0.01
 * Since: 0.01
 */
public class AspectProxy implements InvocationHandler {

    private Object object;

    public AspectProxy(Object obj) {
        this.object = obj;
    }

    @SuppressWarnings("unchecked")
    public static Object newInstance(Object obj) {
        Class<?> objClass = obj.getClass();
        return Proxy.newProxyInstance(objClass.getClassLoader(), objClass.getInterfaces(), new AspectProxy(obj));

    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Class[] argsClasses = null;
        if (args != null) {
            argsClasses = new Class[args.length];
            for (int i = 0; i < args.length; i++) {
                argsClasses[i] = args[i].getClass();
            }
        }

        Method objectMethod=object.getClass().getMethod(method.getName(),method.getParameterTypes());
        Before beforeAnnotation = objectMethod.getAnnotation(Before.class);
        invokeBeforeMethod(args, argsClasses, beforeAnnotation);

        Object result = method.invoke(object, args);

        After afterAnnotation = objectMethod.getAnnotation(After.class);
        invokeAfterMethod(new Object[]{result}, new Class[]{result.getClass()}, afterAnnotation);

        return result;
    }

    @SuppressWarnings("unchecked")
    private void invokeBeforeMethod(Object[] args, Class[] argsClasses, Before annotation) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        if (annotation != null) {
            Class beforeClass = annotation.clazz();
            Method beforeMethod = beforeClass.getMethod(annotation.methodName(), argsClasses);
            if (beforeMethod != null) {
                beforeMethod.invoke(null, args);
            } else {
                throw new RuntimeException(String.format("Can't find method named %s in class %s",
                        annotation.methodName(), annotation.clazz().getName()));
            }

        }
    }

    @SuppressWarnings("unchecked")
    private void invokeAfterMethod(Object[] args, Class[] argsClasses, After annotation) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        if (annotation != null) {
            Class beforeClass = annotation.clazz();
            Method beforeMethod = beforeClass.getMethod(annotation.methodName(), argsClasses);
            if (beforeMethod != null) {
                beforeMethod.invoke(null, args);
            } else {
                throw new RuntimeException(String.format("Can't find method named %s in class %s",
                        annotation.methodName(), annotation.clazz().getName()));
            }

        }
    }

}


text:
namespace PenjualanHewanTernak.View
{
    partial class FrmMutasiStok
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.Label keteranganLabel;
            System.Windows.Forms.Label kodeHewanLabel;
            System.Windows.Forms.Label kodeKandangLabel;
            System.Windows.Forms.Label noRefLabel;
            System.Windows.Forms.Label tglTransaksiLabel;
            System.Windows.Forms.Label nomorTransaksiLabel;
            this.keluarLabel = new System.Windows.Forms.Label();
            this.masukLabel = new System.Windows.Forms.Label();
            this.mutasiStokItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.keluarTextBox = new System.Windows.Forms.TextBox();
            this.keteranganTextBox = new System.Windows.Forms.TextBox();
            this.kodeHewanComboBox = new System.Windows.Forms.ComboBox();
            this.cattleItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.kodeKandangComboBox = new System.Windows.Forms.ComboBox();
            this.kandangItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.masukTextBox = new System.Windows.Forms.TextBox();
            this.noRefComboBox = new System.Windows.Forms.ComboBox();
            this.posMutasiStokItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.tglTransaksiDateTimePicker = new System.Windows.Forms.DateTimePicker();
            this.checkBox1 = new System.Windows.Forms.CheckBox();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.CancelBtn = new System.Windows.Forms.ToolStripButton();
            this.SaveBtn = new System.Windows.Forms.ToolStripButton();
            this.nomorTransaksiTextBox = new System.Windows.Forms.TextBox();
            keteranganLabel = new System.Windows.Forms.Label();
            kodeHewanLabel = new System.Windows.Forms.Label();
            kodeKandangLabel = new System.Windows.Forms.Label();
            noRefLabel = new System.Windows.Forms.Label();
            tglTransaksiLabel = new System.Windows.Forms.Label();
            nomorTransaksiLabel = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.mutasiStokItemBindingSource)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.cattleItemBindingSource)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.kandangItemBindingSource)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.posMutasiStokItemBindingSource)).BeginInit();
            this.toolStrip1.SuspendLayout();
            this.SuspendLayout();
            //
            // keteranganLabel
            //
            keteranganLabel.AutoSize = true;
            keteranganLabel.Location = new System.Drawing.Point(41, 230);
            keteranganLabel.Name = "keteranganLabel";
            keteranganLabel.Size = new System.Drawing.Size(65, 13);
            keteranganLabel.TabIndex = 15;
            keteranganLabel.Text = "Keterangan:";
            //
            // kodeHewanLabel
            //
            kodeHewanLabel.AutoSize = true;
            kodeHewanLabel.Location = new System.Drawing.Point(41, 124);
            kodeHewanLabel.Name = "kodeHewanLabel";
            kodeHewanLabel.Size = new System.Drawing.Size(72, 13);
            kodeHewanLabel.TabIndex = 11;
            kodeHewanLabel.Text = "Kode Hewan:";
            //
            // kodeKandangLabel
            //
            kodeKandangLabel.AutoSize = true;
            kodeKandangLabel.Location = new System.Drawing.Point(41, 151);
            kodeKandangLabel.Name = "kodeKandangLabel";
            kodeKandangLabel.Size = new System.Drawing.Size(81, 13);
            kodeKandangLabel.TabIndex = 12;
            kodeKandangLabel.Text = "Kode Kandang:";
            //
            // noRefLabel
            //
            noRefLabel.AutoSize = true;
            noRefLabel.Location = new System.Drawing.Point(41, 66);
            noRefLabel.Name = "noRefLabel";
            noRefLabel.Size = new System.Drawing.Size(44, 13);
            noRefLabel.TabIndex = 9;
            noRefLabel.Text = "No Ref:";
            //
            // tglTransaksiLabel
            //
            tglTransaksiLabel.AutoSize = true;
            tglTransaksiLabel.Location = new System.Drawing.Point(41, 94);
            tglTransaksiLabel.Name = "tglTransaksiLabel";
            tglTransaksiLabel.Size = new System.Drawing.Size(74, 13);
            tglTransaksiLabel.TabIndex = 10;
            tglTransaksiLabel.Text = "Tgl Transaksi:";
            //
            // nomorTransaksiLabel
            //
            nomorTransaksiLabel.AutoSize = true;
            nomorTransaksiLabel.Location = new System.Drawing.Point(41, 36);
            nomorTransaksiLabel.Name = "nomorTransaksiLabel";
            nomorTransaksiLabel.Size = new System.Drawing.Size(90, 13);
            nomorTransaksiLabel.TabIndex = 16;
            nomorTransaksiLabel.Text = "Nomor Transaksi:";
            //
            // keluarLabel
            //
            this.keluarLabel.AutoSize = true;
            this.keluarLabel.Location = new System.Drawing.Point(41, 204);
            this.keluarLabel.Name = "keluarLabel";
            this.keluarLabel.Size = new System.Drawing.Size(40, 13);
            this.keluarLabel.TabIndex = 14;
            this.keluarLabel.Text = "Keluar:";
            //
            // masukLabel
            //
            this.masukLabel.AutoSize = true;
            this.masukLabel.Location = new System.Drawing.Point(41, 178);
            this.masukLabel.Name = "masukLabel";
            this.masukLabel.Size = new System.Drawing.Size(42, 13);
            this.masukLabel.TabIndex = 13;
            this.masukLabel.Text = "Masuk:";
            //
            // mutasiStokItemBindingSource
            //
            this.mutasiStokItemBindingSource.DataSource = typeof(PenjualanHewanTernak.Model.MutasiStokItem);
            this.mutasiStokItemBindingSource.AddingNew += new System.ComponentModel.AddingNewEventHandler(this.mutasiStokItemBindingSource_AddingNew);
            //
            // keluarTextBox
            //
            this.keluarTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mutasiStokItemBindingSource, "Keluar", true));
            this.keluarTextBox.Location = new System.Drawing.Point(137, 201);
            this.keluarTextBox.Name = "keluarTextBox";
            this.keluarTextBox.Size = new System.Drawing.Size(200, 20);
            this.keluarTextBox.TabIndex = 5;
            //
            // keteranganTextBox
            //
            this.keteranganTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mutasiStokItemBindingSource, "Keterangan", true));
            this.keteranganTextBox.Location = new System.Drawing.Point(137, 227);
            this.keteranganTextBox.Name = "keteranganTextBox";
            this.keteranganTextBox.Size = new System.Drawing.Size(200, 20);
            this.keteranganTextBox.TabIndex = 6;
            //
            // kodeHewanComboBox
            //
            this.kodeHewanComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.mutasiStokItemBindingSource, "KodeHewan", true));
            this.kodeHewanComboBox.DataSource = this.cattleItemBindingSource;
            this.kodeHewanComboBox.DisplayMember = "NamaHewan";
            this.kodeHewanComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.kodeHewanComboBox.FormattingEnabled = true;
            this.kodeHewanComboBox.Location = new System.Drawing.Point(137, 121);
            this.kodeHewanComboBox.Name = "kodeHewanComboBox";
            this.kodeHewanComboBox.Size = new System.Drawing.Size(200, 21);
            this.kodeHewanComboBox.TabIndex = 2;
            this.kodeHewanComboBox.ValueMember = "KodeHewan";
            //
            // cattleItemBindingSource
            //
            this.cattleItemBindingSource.DataSource = typeof(PenjualanHewanTernak.Model.CattleItem);
            //
            // kodeKandangComboBox
            //
            this.kodeKandangComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.mutasiStokItemBindingSource, "KodeKandang", true));
            this.kodeKandangComboBox.DataSource = this.kandangItemBindingSource;
            this.kodeKandangComboBox.DisplayMember = "Keterangan";
            this.kodeKandangComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.kodeKandangComboBox.FormattingEnabled = true;
            this.kodeKandangComboBox.Location = new System.Drawing.Point(137, 148);
            this.kodeKandangComboBox.Name = "kodeKandangComboBox";
            this.kodeKandangComboBox.Size = new System.Drawing.Size(200, 21);
            this.kodeKandangComboBox.TabIndex = 3;
            this.kodeKandangComboBox.ValueMember = "KodeKandang";
            //
            // kandangItemBindingSource
            //
            this.kandangItemBindingSource.DataSource = typeof(PenjualanHewanTernak.Model.KandangItem);
            //
            // masukTextBox
            //
            this.masukTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mutasiStokItemBindingSource, "Masuk", true));
            this.masukTextBox.Location = new System.Drawing.Point(137, 175);
            this.masukTextBox.Name = "masukTextBox";
            this.masukTextBox.Size = new System.Drawing.Size(200, 20);
            this.masukTextBox.TabIndex = 4;
            //
            // noRefComboBox
            //
            this.noRefComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.mutasiStokItemBindingSource, "NoRef", true));
            this.noRefComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mutasiStokItemBindingSource, "NoRef", true));
            this.noRefComboBox.DataSource = this.posMutasiStokItemBindingSource;
            this.noRefComboBox.DisplayMember = "Keterangan";
            this.noRefComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.noRefComboBox.FormattingEnabled = true;
            this.noRefComboBox.Location = new System.Drawing.Point(137, 63);
            this.noRefComboBox.Name = "noRefComboBox";
            this.noRefComboBox.Size = new System.Drawing.Size(200, 21);
            this.noRefComboBox.TabIndex = 0;
            this.noRefComboBox.ValueMember = "NoRef";
            //
            // posMutasiStokItemBindingSource
            //
            this.posMutasiStokItemBindingSource.DataSource = typeof(PenjualanHewanTernak.Model.PosMutasiStokItem);
            //
            // tglTransaksiDateTimePicker
            //
            this.tglTransaksiDateTimePicker.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.mutasiStokItemBindingSource, "TglTransaksi", true));
            this.tglTransaksiDateTimePicker.Location = new System.Drawing.Point(137, 90);
            this.tglTransaksiDateTimePicker.Name = "tglTransaksiDateTimePicker";
            this.tglTransaksiDateTimePicker.Size = new System.Drawing.Size(200, 20);
            this.tglTransaksiDateTimePicker.TabIndex = 1;
            //
            // checkBox1
            //
            this.checkBox1.AutoSize = true;
            this.checkBox1.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.posMutasiStokItemBindingSource, "IsPemasukan", true));
            this.checkBox1.Enabled = false;
            this.checkBox1.Location = new System.Drawing.Point(343, 65);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(114, 17);
            this.checkBox1.TabIndex = 7;
            this.checkBox1.Text = "Penambahan Stok";
            this.checkBox1.UseVisualStyleBackColor = true;
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            //
            // toolStrip1
            //
            this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.CancelBtn,
            this.SaveBtn});
            this.toolStrip1.Location = new System.Drawing.Point(0, 310);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(458, 38);
            this.toolStrip1.TabIndex = 8;
            this.toolStrip1.TabStop = true;
            this.toolStrip1.Text = "toolStrip1";
            //
            // CancelBtn
            //
            this.CancelBtn.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
            this.CancelBtn.Image = global::PenjualanHewanTernak.Properties.Resources.Close_Window_96px;
            this.CancelBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.CancelBtn.Name = "CancelBtn";
            this.CancelBtn.Size = new System.Drawing.Size(76, 35);
            this.CancelBtn.Text = "Cancel / Exit";
            this.CancelBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
            //
            // SaveBtn
            //
            this.SaveBtn.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
            this.SaveBtn.Image = global::PenjualanHewanTernak.Properties.Resources.Save_50px_1;
            this.SaveBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.SaveBtn.Name = "SaveBtn";
            this.SaveBtn.Size = new System.Drawing.Size(51, 35);
            this.SaveBtn.Text = "Simpan";
            this.SaveBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.SaveBtn.Click += new System.EventHandler(this.SaveBtn_Click);
            //
            // nomorTransaksiTextBox
            //
            this.nomorTransaksiTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mutasiStokItemBindingSource, "NomorTransaksi", true));
            this.nomorTransaksiTextBox.Location = new System.Drawing.Point(137, 33);
            this.nomorTransaksiTextBox.Name = "nomorTransaksiTextBox";
            this.nomorTransaksiTextBox.Size = new System.Drawing.Size(100, 20);
            this.nomorTransaksiTextBox.TabIndex = 17;
            //
            // FrmMutasiStok
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(458, 348);
            this.Controls.Add(nomorTransaksiLabel);
            this.Controls.Add(this.nomorTransaksiTextBox);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.checkBox1);
            this.Controls.Add(this.keluarLabel);
            this.Controls.Add(this.keluarTextBox);
            this.Controls.Add(keteranganLabel);
            this.Controls.Add(this.keteranganTextBox);
            this.Controls.Add(kodeHewanLabel);
            this.Controls.Add(this.kodeHewanComboBox);
            this.Controls.Add(kodeKandangLabel);
            this.Controls.Add(this.kodeKandangComboBox);
            this.Controls.Add(this.masukLabel);
            this.Controls.Add(this.masukTextBox);
            this.Controls.Add(noRefLabel);
            this.Controls.Add(this.noRefComboBox);
            this.Controls.Add(tglTransaksiLabel);
            this.Controls.Add(this.tglTransaksiDateTimePicker);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            this.Name = "FrmMutasiStok";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Mutasi Stok - ";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMutasiStok_FormClosing);
            this.Load += new System.EventHandler(this.FrmMutasiStok_Load);
            ((System.ComponentModel.ISupportInitialize)(this.mutasiStokItemBindingSource)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.cattleItemBindingSource)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.kandangItemBindingSource)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.posMutasiStokItemBindingSource)).EndInit();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        #region Properties
        public Status IsNewRow
        {
            get { return isNewRow; }
            set
            {
                isNewRow = value;
                //Call Method in FrmMutasiStok code
                this.OnStatusChanged(new FormStatusChangedEventArgs(value));
            }
        }

        #endregion

        #region Declaration
        private System.Windows.Forms.BindingSource mutasiStokItemBindingSource;
        private System.Windows.Forms.TextBox keluarTextBox;
        private System.Windows.Forms.TextBox keteranganTextBox;
        private System.Windows.Forms.ComboBox kodeHewanComboBox;
        private System.Windows.Forms.ComboBox kodeKandangComboBox;
        private System.Windows.Forms.TextBox masukTextBox;
        private System.Windows.Forms.ComboBox noRefComboBox;
        private System.Windows.Forms.DateTimePicker tglTransaksiDateTimePicker;
        private System.Windows.Forms.BindingSource cattleItemBindingSource;
        private System.Windows.Forms.BindingSource kandangItemBindingSource;
        private System.Windows.Forms.BindingSource posMutasiStokItemBindingSource;
        private System.Windows.Forms.CheckBox checkBox1;
        private System.Windows.Forms.ToolStrip toolStrip1;
        private System.Windows.Forms.ToolStripButton CancelBtn;
        private System.Windows.Forms.ToolStripButton SaveBtn;

        private System.Windows.Forms.Label keluarLabel;
        private System.Windows.Forms.Label masukLabel;
        private System.Windows.Forms.TextBox nomorTransaksiTextBox;

        //User Added
        private Status isNewRow;
        //Declaration if new event - Important
        private event FormStatusChangedEventHandler statusChanged;
        #endregion

    }
}


text:
**Note:** If you have a feature request, you should [contact support](https://docs.datadoghq.com/help/) so the request can be properly tracked.

**Output of the [info page](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information)**

```text
(paste your output here)
```

**Additional environment details (Operating System, Cloud provider, etc):**

**Steps to reproduce the issue:**
1.
2.
3.

**Describe the results you received:**

**Describe the results you expected:**

**Additional information you deem important (e.g. issue happens only occasionally):**


text:
.comm-table td{
    padding-bottom: 5px;
}
.comm-table th{
    text-align: left;
    border-bottom: 1px black solid;
    padding-bottom: 3px;
}
.main-table td {
    border-bottom: 2px #d3d3d3 dotted;
    padding-top: 5px;
    padding-bottom: 5px
}


text:
module NotificationHelpers
  def load_raw_notification
    file                = File.open(File.join(Rails.root, "spec", "fixtures", "multiple_2.xml"), "r")
    xml_string          = file.read
    @raw_notification   = Nokogiri::XML(xml_string)
  end
end


text:
buildah\-manifest\-annotate - Add and update information about an image to a manifest list or image index.

## SYNOPSIS

**buildah manifest annotate** [options...] *listNameOrIndexName* *imageManifestDigest*

## DESCRIPTION

Adds or updates information about an image included in a manifest list or image index.

## RETURN VALUE

The list image's ID and the digest of the image's manifest.

## OPTIONS

**--annotation** *annotation=value*

Set an annotation on the entry for the specified image.

**--arch**

Override the architecture which the list or index records as a requirement for
the image.  This is usually automatically retrieved from the image's
configuration information, so it is rarely necessary to use this option.

**--features**

Specify the features list which the list or index records as requirements for
the image.  This option is rarely used.

**--os**

Override the OS which the list or index records as a requirement for the image.
This is usually automatically retrieved from the image's configuration
information, so it is rarely necessary to use this option.

**--os-features**

Specify the OS features list which the list or index records as requirements
for the image.  This option is rarely used.

**--os-version**

Specify the OS version which the list or index records as a requirement for the
image.  This option is rarely used.

**--variant**

Specify the variant which the list or index records for the image.  This option
is typically used to distinguish between multiple entries which share the same
architecture value, but which expect different versions of its instruction set.

## EXAMPLE

```
buildah manifest annotate --arch arm64 --variant v8 mylist:v1.11 sha256:c829b1810d2dbb456e74a695fd3847530c8319e5a95dca623e9f1b1b89020d8b
506d8f4bb54931ea03a7e70173a0ed6302e3fb92dfadb3955ba5c17812e95c51: sha256:c829b1810d2dbb456e74a695fd3847530c8319e5a95dca623e9f1b1b89020d8b
```

## SEE ALSO
buildah(1), buildah-manifest(1), buildah-manifest-create(1), buildah-manifest-add(1), buildah-manifest-remove(1), buildah-manifest-inspect(1), buildah-manifest-push(1), buildah-rmi(1)