text:
package org.gradle.api.model;

import org.gradle.api.DomainObjectSet;
import org.gradle.api.Incubating;
import org.gradle.api.Named;
import org.gradle.api.NamedDomainObjectContainer;
import org.gradle.api.NamedDomainObjectFactory;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.ConfigurableFileTree;
import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.provider.SetProperty;
import org.gradle.api.reflect.ObjectInstantiationException;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * A factory for creating various kinds of model objects.
 *

 * An instance of the factory can be injected into a task, plugin or other object by annotating a public constructor or property getter method with {@code javax.inject.Inject}.
 * It is also available via {@link org.gradle.api.Project#getObjects()}.
 *
 * @since 4.0
 */
public interface ObjectFactory {
    /**
     * Creates a simple immutable {@link Named} object of the given type and name.
     *
     *
The given type can be an interface that extends {@link Named} or an abstract class that 'implements' {@link Named}. An abstract class, if provided:

     *

     *
Must provide a zero-args constructor that is not private.

     *
Must not define or inherit any instance fields.

     *
Should not provide an implementation for {@link Named#getName()} and should define this method as abstract. Any implementation will be overridden.

     *
Must not define or inherit any other abstract methods.

     *

     *
     *
An interface, if provided, must not define or inherit any other methods.

     *
     *
Objects created using this method are not decorated or extensible.

     *
     * @throws ObjectInstantiationException On failure to create the new instance.
     * @since 4.0
     */
    <T extends Named> T named(Class<T> type, String name) throws ObjectInstantiationException;

    /**
     * Create a new instance of T, using {@code parameters} as the construction parameters.
     *
     *
The type must be non-final, and can be a class, abstract class or interface.

     *
     *
Objects created using this method are decorated and extensible, meaning that they have DSL support mixed in and can be extended using the `extensions` property, similar to the {@link org.gradle.api.Project} object.

     *
     *
An @Inject annotation is required on any constructor that accepts parameters because JSR-330 semantics for dependency injection are used. In addition to those parameters provided as an argument to this method, the following services are also available for injection:

     *
     *

     *
{@link ObjectFactory}.

     *
{@link org.gradle.api.file.ProjectLayout}.

     *
{@link org.gradle.api.provider.ProviderFactory}.

     *
{@link org.gradle.process.ExecOperations}

     *
{@link org.gradle.api.file.FileSystemOperations}

     *

     *
     * @throws ObjectInstantiationException On failure to create the new instance.
     * @since 4.2
     */
    <T> T newInstance(Class<? extends T> type, Object... parameters) throws ObjectInstantiationException;

    /**
     * Creates a {@link SourceDirectorySet}.
     *
     * @param name A short name for the set.
     * @param displayName A human consumable display name for the set.
     * @since 5.0
     */
    @Incubating
    SourceDirectorySet sourceDirectorySet(String name, String displayName);

    /**
     * Creates a new {@link ConfigurableFileCollection}. The collection is initially empty.
     *
     * @since 5.3
     */
    @Incubating
    ConfigurableFileCollection fileCollection();

    /**
     * Creates a new {@link ConfigurableFileTree}. The tree has no base dir specified.
     *
     * @since 6.0
     */
    @Incubating
    ConfigurableFileTree fileTree();

    /**
     *
Creates a new {@link NamedDomainObjectContainer} for managing named objects of the specified type.

     *
     *
The specified type must have a public constructor which takes the name as a String parameter. The type must be non-final and a class or abstract class. Interfaces are currently not supported.

     *
     *
All objects MUST expose their name as a bean property called "name". The name must be constant for the life of the object.

     *
     *
The objects created by the container are decorated and extensible, and have services available for injection. See {@link #newInstance(Class, Object...)} for more details.

     *
     * @param elementType The type of objects for the container to contain.
     * @param <T> The type of objects for the container to contain.
     * @return The container. Never returns null.
     * @since 5.5
     */
    @Incubating
    <T> NamedDomainObjectContainer<T> domainObjectContainer(Class<T> elementType);

    /**
     *
Creates a new {@link NamedDomainObjectContainer} for managing named objects of the specified type. The given factory is used to create object instances.

     *
     *
All objects MUST expose their name as a bean property named "name". The name must be constant for the life of the object.

     *
     * @param elementType The type of objects for the container to contain.
     * @param factory The factory to use to create object instances.
     * @param <T> The type of objects for the container to contain.
     * @return The container. Never returns null.
     * @since 5.5
     */
    @Incubating
    <T> NamedDomainObjectContainer<T> domainObjectContainer(Class<T> elementType, NamedDomainObjectFactory<T> factory);

    /**
     * Creates a new {@link DomainObjectSet} for managing objects of the specified type.
     *
     * @param elementType The type of objects for the domain object set to contain.
     * @param <T> The type of objects for the domain object set to contain.
     * @return The domain object set. Never returns null.
     * @since 5.5
     */
    @Incubating
    <T> DomainObjectSet<T> domainObjectSet(Class<T> elementType);

    /**
     * Creates a {@link Property} implementation to hold values of the given type. The property has no initial value.
     *
     *
For certain types, there are more specialized property factory methods available:

     *

     *
For {@link List} properties, you should use {@link #listProperty(Class)}.

     *
For {@link Set} properties, you should use {@link #setProperty(Class)}.

     *
For {@link Map} properties, you should use {@link #mapProperty(Class, Class)}.

     *
For {@link org.gradle.api.file.Directory} properties, you should use {@link #directoryProperty()}.

     *
For {@link org.gradle.api.file.RegularFile} properties, you should use {@link #fileProperty()}.

     *

     *
     * @param valueType The type of the property.
     * @return The property. Never returns null.
     * @since 4.3
     */
    <T> Property<T> property(Class<T> valueType);

    /**
     * Creates a {@link ListProperty} implementation to hold a {@link List} of the given element type {@code T}. The property has an empty list as its initial value.
     *
     *
The implementation will return immutable {@link List} values from its query methods.

     *
     * @param elementType The type of element.
     * @param <T> The type of element.
     * @return The property. Never returns null.
     * @since 4.3
     */
    <T> ListProperty<T> listProperty(Class<T> elementType);

    /**
     * Creates a {@link SetProperty} implementation to hold a {@link Set} of the given element type {@code T}. The property has an empty set as its initial value.
     *
     *
The implementation will return immutable {@link Set} values from its query methods.

     *
     * @param elementType The type of element.
     * @param <T> The type of element.
     * @return The property. Never returns null.
     * @since 4.5
     */
    <T> SetProperty<T> setProperty(Class<T> elementType);

    /**
     * Creates a {@link MapProperty} implementation to hold a {@link Map} of the given key type {@code K} and value type {@code V}. The property has an empty map as its initial value.
     *
     *
The implementation will return immutable {@link Map} values from its query methods.

     *
     * @param keyType the type of key.
     * @param valueType the type of value.
     * @param <K> the type of key.
     * @param <V> the type of value.
     * @return the property. Never returns null.
     * @since 5.1
     */
    @Incubating
    <K, V> MapProperty<K, V> mapProperty(Class<K> keyType, Class<V> valueType);

    /**
     * Creates a new {@link DirectoryProperty} that uses the project directory to resolve relative paths, if required. The property has no initial value.
     *
     * @since 5.0
     */
    @Incubating
    DirectoryProperty directoryProperty();

    /**
     * Creates a new {@link RegularFileProperty} that uses the project directory to resolve relative paths, if required. The property has no initial value.
     *
     * @since 5.0
     */
    @Incubating
    RegularFileProperty fileProperty();
}


text:
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using Azure.Core;

namespace Azure.Analytics.Synapse.Artifacts.Models
{
    [JsonConverter(typeof(PipelineListResponseConverter))]
    internal partial class PipelineListResponse
    {
        internal static PipelineListResponse DeserializePipelineListResponse(JsonElement element)
        {
            IReadOnlyList<PipelineResource> value = default;
            Optional<string> nextLink = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List<PipelineResource> array = new List<PipelineResource>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(PipelineResource.DeserializePipelineResource(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return new PipelineListResponse(value, nextLink.Value);
        }

        internal partial class PipelineListResponseConverter : JsonConverter<PipelineListResponse>
        {
            public override void Write(Utf8JsonWriter writer, PipelineListResponse model, JsonSerializerOptions options)
            {
                throw new NotImplementedException();
            }
            public override PipelineListResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
            {
                using var document = JsonDocument.ParseValue(ref reader);
                return DeserializePipelineListResponse(document.RootElement);
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.elderbyte.vidada.domain.auth.devices;

import com.elderbyte.vidada.domain.auth.users.VidadaUserDto;
import com.fasterxml.jackson.annotation.JsonAutoDetect;

@JsonAutoDetect(
    fieldVisibility = JsonAutoDetect.Visibility.ANY,
    isGetterVisibility = JsonAutoDetect.Visibility.NONE,
    getterVisibility = JsonAutoDetect.Visibility.NONE,
    setterVisibility = JsonAutoDetect.Visibility.NONE)
public class DeviceDto {

    public String id;
    public String deviceName;
    public String address;
    public VidadaUserDto user;

}


text:
namespace tzw
{

class DeviceTextureVK;
class DeviceRenderPassVK : public DeviceRenderPass
{
public:
	DeviceRenderPassVK();
	void init(const DeviceAttachmentInfoList & colorFormatList, OpType opType, bool isNeedTransitionToRread, bool isOutputToScreen = false) override;
	VkRenderPass getRenderPass();
private:
	VkRenderPass m_renderPass;
};
};


text:
package org.redisson;

import java.io.Serializable;
import java.util.Iterator;
import java.util.concurrent.CountDownLatch;

import org.junit.Assert;
import org.junit.Test;
import org.redisson.client.protocol.pubsub.PubSubType;
import org.redisson.core.BaseStatusListener;
import org.redisson.core.MessageListener;
import org.redisson.core.RTopic;
import org.redisson.core.StatusListener;

public class RedissonTopicTest {

    public static class Message implements Serializable {

        private String name;

        public Message() {
        }

        public Message(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        @Override
        public boolean equals(Object obj) {
            if (this == obj)
                return true;
            if (obj == null)
                return false;
            if (getClass() != obj.getClass())
                return false;
            Message other = (Message) obj;
            if (name == null) {
                if (other.name != null)
                    return false;
            } else if (!name.equals(other.name))
                return false;
            return true;
        }

    }

    @Test
    public void testInnerPublish() throws InterruptedException {

        Redisson redisson1 = BaseTest.createInstance();
        final RTopic<Message> topic1 = redisson1.getTopic("topic1");
        final CountDownLatch messageRecieved = new CountDownLatch(3);
        int listenerId = topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(msg, new Message("test"));
                messageRecieved.countDown();
            }
        });

        Redisson redisson2 = BaseTest.createInstance();
        final RTopic<Message> topic2 = redisson2.getTopic("topic2");
        topic2.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                messageRecieved.countDown();
                Message m = new Message("test");
                if (!msg.equals(m)) {
                    topic1.publish(m);
                    topic2.publish(m);
                }
            }
        });
        topic2.publish(new Message("123"));

        messageRecieved.await();

        redisson1.shutdown();
        redisson2.shutdown();
    }

    @Test
    public void testStatus() throws InterruptedException {
        Redisson redisson = BaseTest.createInstance();
        final RTopic<Message> topic1 = redisson.getTopic("topic1");
        final CountDownLatch l = new CountDownLatch(1);
        int listenerId = topic1.addListener(new BaseStatusListener() {
            @Override
            public void onSubscribe(String channel) {
                Assert.assertEquals("topic1", channel);
                l.countDown();
            }
        });

        Thread.sleep(500);

        int listenerId2 = topic1.addListener(new BaseStatusListener() {
            @Override
            public void onUnsubscribe(String channel) {
                Assert.assertEquals("topic1", channel);
                l.countDown();
            }
        });
        topic1.removeListener(listenerId);
        topic1.removeListener(listenerId2);
        l.await();
    }

    @Test
    public void testUnsubscribe() throws InterruptedException {
        final CountDownLatch messageRecieved = new CountDownLatch(1);

        Redisson redisson = BaseTest.createInstance();
        RTopic<Message> topic1 = redisson.getTopic("topic1");
        int listenerId = topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.fail();
            }
        });
        topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals("topic1", channel);
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });
        topic1.removeListener(listenerId);

        topic1 = redisson.getTopic("topic1");
        topic1.publish(new Message("123"));

        messageRecieved.await();

        redisson.shutdown();
    }

    @Test
    public void testLazyUnsubscribe() throws InterruptedException {
        final CountDownLatch messageRecieved = new CountDownLatch(1);

        Redisson redisson1 = BaseTest.createInstance();
        RTopic<Message> topic1 = redisson1.getTopic("topic");
        int listenerId = topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.fail();
            }
        });
        Thread.sleep(1000);
        topic1.removeListener(listenerId);
        Thread.sleep(1000);

        Redisson redisson2 = BaseTest.createInstance();
        RTopic<Message> topic2 = redisson2.getTopic("topic");
        topic2.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });
        topic2.publish(new Message("123"));

        messageRecieved.await();

        redisson1.shutdown();
        redisson2.shutdown();
    }

    @Test
    public void test() throws InterruptedException {
        final CountDownLatch messageRecieved = new CountDownLatch(2);

        Redisson redisson1 = BaseTest.createInstance();
        RTopic<Message> topic1 = redisson1.getTopic("topic");
        topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });

        Redisson redisson2 = BaseTest.createInstance();
        RTopic<Message> topic2 = redisson2.getTopic("topic");
        topic2.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });
        topic2.publish(new Message("123"));

        messageRecieved.await();

        redisson1.shutdown();
        redisson2.shutdown();
    }

    @Test
    public void testHeavyLoad() throws InterruptedException {
        final CountDownLatch messageRecieved = new CountDownLatch(1000);

        Redisson redisson1 = BaseTest.createInstance();
        RTopic<Message> topic1 = redisson1.getTopic("topic");
        topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });

        Redisson redisson2 = BaseTest.createInstance();
        RTopic<Message> topic2 = redisson2.getTopic("topic");
        topic2.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.assertEquals(new Message("123"), msg);
                messageRecieved.countDown();
            }
        });

        for (int i = 0; i < 500; i++) {
            topic2.publish(new Message("123"));
        }

        messageRecieved.await();

        redisson1.shutdown();
        redisson2.shutdown();
    }

    @Test
    public void testListenerRemove() throws InterruptedException {
        Redisson redisson1 = BaseTest.createInstance();
        RTopic<Message> topic1 = redisson1.getTopic("topic");
        int id = topic1.addListener(new MessageListener<Message>() {
            @Override
            public void onMessage(String channel, Message msg) {
                Assert.fail();
            }
        });

        Redisson redisson2 = BaseTest.createInstance();
        RTopic<Message> topic2 = redisson2.getTopic("topic");
        topic1.removeListener(id);
        topic2.publish(new Message("123"));

        Thread.sleep(1000);

        redisson1.shutdown();
        redisson2.shutdown();
    }

}


text:
#ifndef __NUMERIC_UTIL_H__
#define __NUMERIC_UTIL_H__

#include <cstdlib>

#include <limits>

template <typename FloatT> inline bool EpsilonCompare(const FloatT d1, const FloatT d2)
{
    return (std::abs(d1 - d2) < std::numeric_limits<FloatT>::epsilon());
}

#endif


text:
var peakFinder = function(array) {
  // instantiate an array as result
  var result = [];
  // iterate over input
  _.each(array, function(val,key,col){
    // check left and right neighbors
    if(col[key+1] < val && col[key-1] < val) {
      // add information to results array
      result.push([key,val]);
    }
  });
  // ternary check: if results array is not empty give result array, else give false
  return result.length ? result : false;
};

// NOTES: Prototypical Inheritance

// REQUIRE: lodash/underscore
// FUNCTION: Find all the peaks in a given array.
// INPUT: context/this
// RETURN: index, peak/value within array
//   EX: [2,5]
// ERROR: false

// TIME_COMPLEXITY: O(n)
Array.prototype.findPeaks = function() {
  // instantiate an array as result
  var result = [];
  // iterate over input
  _.each(this, function(val,key,col){
    // check left and right neighbors
    if(col[key+1] < val && col[key-1] < val) {
      // add information to results array
      result.push([key,val]);
    }
  });
  // ternary check: if results array is not empty give result array, else give false
  return result.length ? result : false;
};


text:
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=TheMadav&url=https://github.com/TheMadav/laravel-bootstrap-elements&title=Laravel Bootstrap Elements&language=DE&tags=github&category=software)

Using bootstrap template elements with Laravel

## Form Elements

### Text Input

### Passwort Input

## Roadmap (ToDos)

- Checkboxes
- Dropdowns
- Alerts
- ...


text:
<?php

/** Bulgarian localization file for KCFinder
 * author: Pavel Tzonkov <pavelc@users.sourceforge.net>
 */

$lang = array(

    '_locale' => "bg_BG.UTF-8", // UNIX localization code
    '_charset' => "utf-8", // Browser charset

    // Date time formats. See http://www.php.net/manual/en/function.strftime.php
    '_dateTimeFull' => "%A, %e %B, %Y %H:%M",
    '_dateTimeMid' => "%a %e %b %Y %H:%M",
    '_dateTimeSmall' => "%d.%m.%Y %H:%M",

    "You don't have permissions to upload files." =>
        "Нямате права за качване.",

    "You don't have permissions to browse server." =>
        "Нямате права за разглеждане на сървъра.",

    "Cannot move uploaded file to target folder." =>
        "Файлът не може да се премести в целевата папка.",

    "Unknown error." =>
        "Непозната грешка.",

    "The uploaded file exceeds {size} bytes." =>
        "Каченият файл надхвърля {size} байта.",

    "The uploaded file was only partially uploaded." =>
        "Каченият файл беше качен само частично.",

    "No file was uploaded." =>
        "Файлът не беше качен",

    "Missing a temporary folder." =>
        "Липсва временна папка.",

    "Failed to write file." =>
        "Грешка при записване на файла.",

    "Denied file extension." =>
        "Забранено файлово разширение.",

    "Unknown image format/encoding." =>
        "Файлът не може да бъде разпознат като изображение.",

    "The image is too big and/or cannot be resized." =>
        "Изображението е много голямо и/или не може да бъде преоразмерено.",

    "Cannot create {dir} folder." =>
        "Невъзможност да се създаде папка {dir}.",

    "Cannot rename the folder." =>
        "Папката не може да се преимеува.",

    "Cannot write to upload folder." =>
        "Не е възможно записването на файлове в папката за качване.",

    "Cannot read .htaccess" =>
        "Не е възможно прочитането на .htaccess",

    "Incorrect .htaccess file. Cannot rewrite it!" =>
        "Невалиден .htaccess файл. Не може да се презапише автоматично!",

    "Cannot read upload folder." =>
        "Не е възможно прочитането на папката за качване.",

    "Cannot access or create thumbnails folder." =>
        "Невъзможен достъп или невъзможно създаване на папката за thumbnails.",

    "Cannot access or write to upload folder." =>
        "Папката не може да се достъпи или не може да се записва в нея.",

    "Please enter new folder name." =>
        "Моля въведете име на папката.",

    "Unallowable characters in folder name." =>
        "Непозволени знаци в името на папката.",

    "Folder name shouldn't begins with '.'" =>
        "Името на папката не трябва да започва с '.'",

    "Please enter new file name." =>
        "Моля въведете ново име на файла",

    "Unallowable characters in file name." =>
        "Непозволени знаци в името на файла.",

    "File name shouldn't begins with '.'" =>
        "Името на файла не трябва да започва с '.'",

    "Are you sure you want to delete this file?" =>
        "Наистина ли искате да изтриете този файл?",

    "Are you sure you want to delete this folder and all its content?" =>
        "Наистина ли искате да изтриете тази папка и цялото й съдържание?",

    "Non-existing directory type." =>
        "Несъществуващ специален тип на папка.",

    "Undefined MIME types." =>
        "Не са дефинирани MIME типове.",

    "Fileinfo PECL extension is missing." =>
        "Липсва Fileinfo PECL разширение.",

    "Opening fileinfo database failed." =>
        "Грешка при отваряне на fileinfo дефиниции.",

    "You can't upload such files." =>
        "Не можете да качвате такива файлове.",

    "The file '{file}' does not exist." =>
        "Фаълът '{file}' не съществува.",

    "Cannot read '{file}'." =>
        "Файлът '{file}' не може да бъде прочетен.",

    "Cannot copy '{file}'." =>
        "Файлът '{file}' не може да бъде копиран.",

    "Cannot move '{file}'." =>
        "Файлът '{file}' не може да бъде преместен.",

    "Cannot delete '{file}'." =>
        "Файлът '{file}' не може да бъде изтрит.",

    "Cannot delete the folder." =>
        "Папката не може да бъде изтрита.",

    "Click to remove from the Clipboard" =>
        "Цъкнете за да премахнете файла от клипборда",

    "This file is already added to the Clipboard." =>
        "Този файл вече е добавен към клипборда.",

    "The files in the Clipboard are not readable." =>
        "Файловете в клипборда не могат да се прочетат.",

    "{count} files in the Clipboard are not readable. Do you want to copy the rest?" =>
        "{count} файла в клипборда не могат да се прочетат. Искате ли да копирате останалите?",

    "The files in the Clipboard are not movable." =>
        "Файловете в клипборда не могат да бъдат преместени.",

    "{count} files in the Clipboard are not movable. Do you want to move the rest?" =>
        "{count} файла в клипборда не могат да бъдат преместени. Искате ли да преместите останалите?",

    "The files in the Clipboard are not removable." =>
        "Файловете в клипборда не могат да бъдат изтрити.",

    "{count} files in the Clipboard are not removable. Do you want to delete the rest?" =>
        "{count} файла в клипборда не могат да бъдат изтрити. Искате ли да изтриете останалите?",

    "The selected files are not removable." =>
        "Избраните файлове не могат да бъдат изтрити.",

    "{count} selected files are not removable. Do you want to delete the rest?" =>
        "{count} от избраните файлове не могат да бъдат изтрити. Искате ли да изтриете останалите?",

    "Are you sure you want to delete all selected files?" =>
        "Наистина ли искате да изтриете всички избрани файлове?",

    "Failed to delete {count} files/folders." =>
        "{count} файла/папки не могат да бъдат изтрити.",

    "A file or folder with that name already exists." =>
        "Вече има файл или папка с такова име.",

    "Copy files here" =>
        "Копирай файловете тук",

    "Move files here" =>
        "Премести файловете тук",

    "Delete files" =>
        "Изтрий файловете",

    "Clear the Clipboard" =>
        "Изчисти клипборда",

    "Are you sure you want to delete all files in the Clipboard?" =>
        "Наистина ли искате да изтриете всички файлове от клипборда?",

    "Copy {count} files" =>
        "Копирай {count} файла",

    "Move {count} files" =>
        "Премести {count} файла",

    "Add to Clipboard" =>
        "Добави към клипборда",

    "Inexistant or inaccessible folder." =>
        "Несъществуваща или недостъпна папка.",

    "New folder name:" => "Име на папката:",
    "New file name:" => "Ново име на файла:",

    "Upload" => "Качи",
    "Refresh" => "Актуализирай",
    "Settings" => "Настройки",
    "Maximize" => "Разпъни",
    "About" => "Информация",
    "files" => "файла",
    "selected files" => "избрани файла",
    "View:" => "Изглед:",
    "Show:" => "Покажи:",
    "Order by:" => "Подреди по:",
    "Thumbnails" => "Картинки",
    "List" => "Списък",
    "Name" => "Име",
    "Type" => "Тип",
    "Size" => "Размер",
    "Date" => "Дата",
    "Descending" => "Обратен ред",
    "Uploading file..." => "Файлът се качва...",
    "Loading image..." => "Изображението се зарежда...",
    "Loading folders..." => "Зареждане на папките...",
    "Loading files..." => "Зареждане на папката...",
    "New Subfolder..." => "Нова подпапка...",
    "Rename..." => "Преименуване...",
    "Delete" => "Изтрий",
    "OK" => "OK",
    "Cancel" => "Отказ",
    "Select" => "Избери",
    "Select Thumbnail" => "Избери малък вариант",
    "Select Thumbnails" => "Избери малки варианти",
    "View" => "Преглед",
    "Download" => "Свали",
    "Download files" => "Свали файловете",
    "Clipboard" => "Клипборд",

    // SINCE 2.4

    "Checking for new version..." => "Проверка за нова версия...",
    "Unable to connect!" => "Не може да се свърже!",
    "Download version {version} now!" => "Свалете версия {version} сега!",
    "KCFinder is up to date!" => "KCFinder е актуален!",
    "Licenses:" => "Лицензи:",
    "Attention" => "Внимание",
    "Question" => "Въпрос",
    "Yes" => "Да",
    "No" => "Не",

    // SINCE 2.41

    "You cannot rename the extension of files!" =>
        "Не можете да преименувате разширенията на файловете!",

    // SINCE 2.5

    "Uploading file {number} of {count}... {progress}" =>
        "Качване на файл {number} от {count}... {progress}",

    "Failed to upload {filename}!" => "Несполучливо качване на {filename}!",
);

?>


text:
namespace feed {
namespace {
using UiUpdate = StreamModel::UiUpdate;
using StoreUpdate = StreamModel::StoreUpdate;

std::vector<std::string> GetContentFrames(const StreamModel& model) {
  std::vector<std::string> frames;
  for (ContentRevision rev : model.GetContentList()) {
    const feedstore::Content* content = model.FindContent(rev);
    if (content) {
      frames.push_back(content->frame());
    } else {
      frames.push_back("<null>");
    }
  }
  return frames;
}

class TestObserver : public StreamModel::Observer {
 public:
  explicit TestObserver(StreamModel* model) { model->AddObserver(this); }

  // StreamModel::Observer.
  void OnUiUpdate(const UiUpdate& update) override { update_ = update; }
  const absl::optional<UiUpdate>& GetUiUpdate() const { return update_; }
  bool ContentListChanged() const {
    return update_ && update_->content_list_changed;
  }

  void Clear() { update_ = absl::nullopt; }

 private:
  absl::optional<UiUpdate> update_;
};

class TestStoreObserver : public StreamModel::StoreObserver {
 public:
  explicit TestStoreObserver(StreamModel* model) {
    model->SetStoreObserver(this);
  }

  // StreamModel::StoreObserver.
  void OnStoreChange(StoreUpdate records) override {
    update_ = std::move(records);
  }

  const absl::optional<StoreUpdate>& GetUpdate() const { return update_; }

  void Clear() { update_ = absl::nullopt; }

 private:
  absl::optional<StoreUpdate> update_;
};

TEST(StreamModelTest, ConstructEmptyModel) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  EXPECT_EQ(0UL, model.GetContentList().size());
}

TEST(StreamModelTest, ExecuteOperationsTypicalStream) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);

  model.ExecuteOperations(MakeTypicalStreamOperations());
  EXPECT_TRUE(observer.ContentListChanged());
  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
  ASSERT_TRUE(store_observer.GetUpdate());
  ASSERT_EQ(MakeTypicalStreamOperations().size(),
            store_observer.GetUpdate()->operations.size());
}

TEST(StreamModelTest, AddContentWithoutRoot) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations{
      MakeOperation(MakeCluster(0, MakeRootId())),
      MakeOperation(MakeContentNode(0, MakeClusterId(0))),
      MakeOperation(MakeContent(0)),
  };
  model.ExecuteOperations(operations);

  // Without a root, no content is visible.
  EXPECT_EQ(std::vector<std::string>({}), GetContentFrames(model));
}

// Verify Stream -> Content works.
TEST(StreamModelTest, AddStreamContent) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations{
      MakeOperation(MakeStream()),
      MakeOperation(MakeContentNode(0, MakeRootId())),
      MakeOperation(MakeContent(0)),
  };
  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:0"}), GetContentFrames(model));
}

TEST(StreamModelTest, AddRootAsChild) {
  // When the root is added as a child, it's no longer considered a root.
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  feedstore::StreamStructure stream_with_parent = MakeStream();
  *stream_with_parent.mutable_parent_id() = MakeContentContentId(0);
  std::vector<feedstore::DataOperation> operations{
      MakeOperation(MakeStream()),
      MakeOperation(MakeContentNode(0, MakeRootId())),
      MakeOperation(MakeContent(0)),
      MakeOperation(stream_with_parent),
  };

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({}), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveCluster) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeClusterId(0))));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveContent) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeContentContentId(0))));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveRoot) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeRootId())));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>(), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveAndAddRoot) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeRootId())));
  operations.push_back(MakeOperation(MakeStream()));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, SecondRootStreamIsIgnored) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  // Add a second stream root, but it is ignored.
  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  feedstore::StreamStructure root2 = MakeStream(2);
  root2.set_is_root(false);
  operations.push_back(MakeOperation(root2));
  operations.push_back(MakeOperation(MakeContentNode(9, MakeRootId(2))));
  operations.push_back(MakeOperation(MakeContent(9)));
  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));

  // Remove the first stream root, now the second root is used.
  model.ExecuteOperations({MakeOperation(MakeRemove(MakeRootId()))});

  EXPECT_EQ(std::vector<std::string>({"f:9"}), GetContentFrames(model));
}

TEST(StreamModelTest, SecondRootWithIsRootIsSelected) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  // Set up operations which add two roots. The second root is chosen because it
  // has is_root=true set.
  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations[0].mutable_structure()->set_is_root(false);
  operations.push_back(MakeOperation(MakeStream(2)));
  operations.push_back(MakeOperation(MakeContentNode(9, MakeRootId(2))));
  operations.push_back(MakeOperation(MakeContent(9)));
  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:9"}), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveAndUpdateCluster) {
  // Remove a cluster and add it back. Adding it back keeps its original
  // placement.
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeClusterId(0))));
  operations.push_back(MakeOperation(MakeCluster(0, MakeRootId())));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, RemoveAndAppendToNewParent) {
  // Attempt to re-parent a node. This is not allowed, the old parent remains.
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  std::vector<feedstore::DataOperation> operations =
      MakeTypicalStreamOperations();
  operations.push_back(MakeOperation(MakeRemove(MakeClusterId(0))));
  operations.push_back(MakeOperation(MakeCluster(0, MakeClusterId(1))));

  model.ExecuteOperations(operations);

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, EphemeralNewCluster) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  model.ExecuteOperations(MakeTypicalStreamOperations());
  observer.Clear();

  model.CreateEphemeralChange({
      MakeOperation(MakeCluster(2, MakeRootId())),
      MakeOperation(MakeContentNode(2, MakeClusterId(2))),
      MakeOperation(MakeContent(2)),
  });

  EXPECT_TRUE(observer.ContentListChanged());
  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1", "f:2"}),
            GetContentFrames(model));
}

TEST(StreamModelTest, CommitEphemeralChange) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  model.ExecuteOperations(MakeTypicalStreamOperations());

  EphemeralChangeId change_id = model.CreateEphemeralChange({
      MakeOperation(MakeCluster(2, MakeRootId())),
      MakeOperation(MakeContentNode(2, MakeClusterId(2))),
      MakeOperation(MakeContent(2)),
  });

  observer.Clear();
  TestStoreObserver store_observer(&model);
  EXPECT_TRUE(model.CommitEphemeralChange(change_id));

  // Check that the observer's |OnStoreChange()| was called.
  ASSERT_TRUE(store_observer.GetUpdate());
  const StoreUpdate& store_update = *store_observer.GetUpdate();
  ASSERT_EQ(3UL, store_update.operations.size());
  EXPECT_EQ(feedstore::StreamStructure::CLUSTER,
            store_update.operations[0].structure().type());
  EXPECT_EQ(feedstore::StreamStructure::CONTENT,
            store_update.operations[1].structure().type());

  // Can't reject after commit.
  EXPECT_FALSE(model.RejectEphemeralChange(change_id));

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1", "f:2"}),
            GetContentFrames(model));
}

TEST(StreamModelTest, RejectEphemeralChange) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  model.ExecuteOperations(MakeTypicalStreamOperations());
  EphemeralChangeId change_id = model.CreateEphemeralChange({
      MakeOperation(MakeCluster(2, MakeRootId())),
      MakeOperation(MakeContentNode(2, MakeClusterId(2))),
      MakeOperation(MakeContent(2)),
  });
  observer.Clear();

  EXPECT_TRUE(model.RejectEphemeralChange(change_id));
  EXPECT_TRUE(observer.ContentListChanged());
  // Can't commit after reject.
  EXPECT_FALSE(model.CommitEphemeralChange(change_id));

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
}

TEST(StreamModelTest, RejectFirstEphemeralChange) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);

  model.ExecuteOperations(MakeTypicalStreamOperations());
  EphemeralChangeId change_id1 = model.CreateEphemeralChange({
      MakeOperation(MakeCluster(2, MakeRootId())),
      MakeOperation(MakeContentNode(2, MakeClusterId(2))),
      MakeOperation(MakeContent(2)),
  });

  model.CreateEphemeralChange({
      MakeOperation(MakeCluster(3, MakeRootId())),
      MakeOperation(MakeContentNode(3, MakeClusterId(3))),
      MakeOperation(MakeContent(3)),
  });
  observer.Clear();

  EXPECT_TRUE(model.RejectEphemeralChange(change_id1));
  EXPECT_TRUE(observer.ContentListChanged());
  // Can't commit after reject.
  EXPECT_FALSE(model.CommitEphemeralChange(change_id1));

  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1", "f:3"}),
            GetContentFrames(model));
}

TEST(StreamModelTest, InitialLoad) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);
  model.Update(MakeTypicalInitialModelState());

  // Check that content was added and the store doesn't receive its own update.
  EXPECT_TRUE(observer.ContentListChanged());
  EXPECT_EQ(std::vector<std::string>({"f:0", "f:1"}), GetContentFrames(model));
  ASSERT_EQ(1UL, observer.GetUiUpdate()->shared_states.size());
  EXPECT_NE("", observer.GetUiUpdate()->shared_states[0].shared_state_id);
  const std::string* shared_state_data = model.FindSharedStateData(
      observer.GetUiUpdate()->shared_states[0].shared_state_id);
  ASSERT_TRUE(shared_state_data);
  EXPECT_EQ("ss:0", *shared_state_data);
  EXPECT_FALSE(store_observer.GetUpdate());
}

TEST(StreamModelTest, StoreObserverReceivesIncreasingSequenceNumbers) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);

  // Initialize the model starting at sequence number 5.
  {
    std::unique_ptr<StreamModelUpdateRequest> initial_state =
        MakeTypicalInitialModelState();
    initial_state->max_structure_sequence_number = 5;
    model.Update(std::move(initial_state));
  }

  model.ExecuteOperations({MakeOperation(MakeRemove(MakeContentContentId(0)))});

  ASSERT_TRUE(store_observer.GetUpdate());
  EXPECT_EQ(6, store_observer.GetUpdate()->sequence_number);

  store_observer.Clear();
  model.ExecuteOperations({MakeOperation(MakeRemove(MakeContentContentId(0)))});

  ASSERT_TRUE(store_observer.GetUpdate());
  EXPECT_EQ(7, store_observer.GetUpdate()->sequence_number);
}

TEST(StreamModelTest, SharedStateCanBeAddedOnlyOnce) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);

  // Update the model twice with this request. The shared state should not
  // be added the second time.
  StreamModelUpdateRequest update_request;
  update_request.source =
      StreamModelUpdateRequest::Source::kInitialLoadFromStore;
  update_request.content.push_back(MakeContent(0));
  update_request.stream_structures = {MakeStream(),
                                      MakeCluster(0, MakeRootId()),
                                      MakeContentNode(0, MakeClusterId(0))};
  update_request.shared_states.push_back(MakeSharedState(0));

  model.Update(std::make_unique<StreamModelUpdateRequest>(update_request));
  observer.Clear();
  model.Update(std::make_unique<StreamModelUpdateRequest>(update_request));
  ASSERT_EQ(1UL, observer.GetUiUpdate()->shared_states.size());
  EXPECT_FALSE(observer.GetUiUpdate()->shared_states[0].updated);
}

TEST(StreamModelTest, SharedStateUpdatesKeepOriginal) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);
  model.Update(MakeTypicalInitialModelState());
  observer.Clear();
  store_observer.Clear();
  model.Update(MakeTypicalNextPageState(
      2, kTestTimeEpoch, true, true, true,
      StreamModelUpdateRequest::Source::kNetworkLoadMore));

  EXPECT_EQ(2UL, observer.GetUiUpdate()->shared_states.size());
  EXPECT_FALSE(observer.GetUiUpdate()->shared_states[0].updated);
  EXPECT_TRUE(observer.GetUiUpdate()->shared_states[1].updated);

  ASSERT_TRUE(store_observer.GetUpdate());
  EXPECT_EQ(1, store_observer.GetUpdate()->sequence_number);
  ASSERT_EQ(2, store_observer.GetUpdate()
                   ->update_request->stream_data.shared_state_ids_size());
}

TEST(StreamModelTest, ClearAllErasesSharedStates) {
  StreamModel::Context model_context;
  StreamModel model(&model_context);
  TestObserver observer(&model);
  TestStoreObserver store_observer(&model);
  // CLEAR_ALL is the first operation in the typical initial model state.
  // The second Update() will therefore need to remove and add the shared
  // state.
  model.Update(MakeTypicalInitialModelState());
  observer.Clear();
  model.Update(MakeTypicalInitialModelState());

  ASSERT_EQ(1UL, observer.GetUiUpdate()->shared_states.size());
  EXPECT_TRUE(observer.GetUiUpdate()->shared_states[0].updated);
}

}  // namespace
}  // namespace feed


text:
package net.narusas.tools.deplor.deploy.model;

import static net.narusas.tools.deplor.deploy.UIUtil.col;

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

import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.TableColumnModel;

import lombok.Data;
import net.narusas.tools.deplor.domain.model.Change;

@Data
@SuppressWarnings("serial")
public class ChangesTableModel extends AbstractTableModel {
	List<Change>		changes		= new ArrayList<>();
	TableColumnModel	colModel	= new ChangesTableColumnModel();

	public void update(List<Change> newChanges) {
		changes = newChanges;
		fireTableDataChanged();
	}

	public void add(Collection<Change> addition) {
		for (Change change : addition) {
			changes.add(change);
		}
		fireTableDataChanged();
	}

	public void clear() {
		changes.clear();
		fireTableDataChanged();
	}

	public void remove(Collection<Change> addition) {
		for (Change change : addition) {
			changes.remove(change);
		}
		fireTableDataChanged();
	}

	@Override
	public int getRowCount() {
		return changes.size();
	}

	@Override
	public int getColumnCount() {
		return colModel.getColumnCount();
	}

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		switch (columnIndex) {
		case 0:
			return changes.get(rowIndex).getRevision().getVersion();
		case 1:
			return changes.get(rowIndex).getType();
		case 2:
			return changes.get(rowIndex).getPath();
		}
		return null;
	}

	public static class ChangesTableColumnModel extends DefaultTableColumnModel {
		public ChangesTableColumnModel() {
			addColumn(col(0, 50, "Revision"));
			addColumn(col(1, 50, "Type"));
			addColumn(col(2, "Path"));
		}
	}

}


text:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
#define BITCOIN_CONSENSUS_CONSENSUS_H

#include <stdint.h>

/** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */
static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000;
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;
/**
 * The maximum allowed size for a block excluding witness data, in bytes (network rule).
 * This parameter is largely superfluous because it is directly implied by the above block
 *  weight limit, even when BIP 141 is not active.  It continues to exist for use in
 *  various early tests that run before the witness data has been checked.
 * All tests related to it could be removed without breaking consensus compatibility.
 */
static const unsigned int MAX_BLOCK_BASE_SIZE = 2000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const int64_t MAX_BLOCK_SIGOPS_COST = 80000;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;

/** Flags for nSequence and nLockTime locks */
enum {
    /* Interpret sequence numbers as relative lock-time constraints. */
    LOCKTIME_VERIFY_SEQUENCE = (1 << 0),

    /* Use GetMedianTimePast() instead of nTime for end point timestamp. */
    LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
};

#endif // BITCOIN_CONSENSUS_CONSENSUS_H


text:
    /**
     * Events: show, showed, hide, buttonClick ( handled for HTMLElement with className equal parameter opt_handlerClickCls )
     * @param {string} event
     * @param {function} handler
     * @param {HTMLElement|string=} opt_key - binds event to window
     */

    multiPopup.prototype.on = function ( event, handler, opt_key ) {

        if ( this._isDestroyed )
            return;

        if( !this._handlers [ event ] )
            this._handlers [ event ] = [];

        if( !isFunction( handler ) ) {
            throw  new TypeError ( "Argument [handler] must be a Function " )
        }

        if ( !isHTMLElement( opt_key ) &&
            this._windows [ opt_key ] ) {

            opt_key = this._windows [ opt_key ].elem;
        }

        if ( isHTMLElement( opt_key ) &&
            this._windowsHTMLElements.indexOf( opt_key ) != -1 ) {

            this._handlers [ event ].push( {
                target: opt_key,
                handler: handler
            } );

            return;
        }

        this._handlers [ event ].push( handler );

    };

    /**
     * It removes event handler
     *
     * @param {string} event
     * @param {function=} opt_handler         - If pass only event, removed all handlers
     * @param {HTMLElement|string=} opt_key   - unbind event from window
     */
    multiPopup.prototype.off = function ( event, opt_handler, opt_key ) {

        if ( this._isDestroyed )
            return;

        var handlers =  this._handlers[ event ];

        if( !handlers )
            return;

        if( !opt_handler )
            delete  this._handlers [ event ];

        if ( !isHTMLElement ( opt_key ) &&
            this._windows [ opt_key ] ) {
            opt_key = this._windows [ opt_key ].elem;
        }

        if ( !isHTMLElement( opt_key ) ||
            this._windowsHTMLElements.indexOf( opt_key ) != -1 ) {
            opt_key = false;
        }

        for( var i = 0; i < handlers.length; i++) {

            if ( isFunction( handlers [ i ] )  &&
                handlers[ i ] == opt_handler ) {

                handlers.splice( i, 1 );
                return;
            }

            if ( opt_key &&
                handlers [ i ].target === opt_key ) {
                handlers.splice( i, 1 );
            }

        };

    };

    multiPopup.prototype.emit = function ( event ) {
        var self = this,
            handlers =  this._handlers[ event ],
            args = arguments;

        if( !handlers  )
            return;

        setTimeout( function () {

            if ( self._isDestroyed )
                return;

            handlers.forEach( function ( obj ) {

                if ( isFunction( obj ) ) {
                    obj.apply( self, [].slice.call( args, 1 ) );
                }

                else if( obj.target === self.window ) {
                    obj.handler.apply( self, [].slice.call( args, 1 ) );
                }
            } );
        }, 0 );

    };


text:
namespace notifier {

class ConnectionOptions {
 public:
  ConnectionOptions();

  bool autodetect_proxy() const { return autodetect_proxy_; }
  const std::string& proxy_host() const { return proxy_host_; }
  int proxy_port() const { return proxy_port_; }
  bool use_proxy_auth() const { return use_proxy_auth_; }
  const std::string& auth_user() const { return auth_user_; }
  const talk_base::CryptString& auth_pass() const { return auth_pass_; }
  bool allow_unverified_certs() const { return allow_unverified_certs_; }

  void set_autodetect_proxy(bool f) { autodetect_proxy_ = f; }
  void set_proxy_host(const std::string& val) { proxy_host_ = val; }
  void set_proxy_port(int val) { proxy_port_ = val; }
  void set_use_proxy_auth(bool f) { use_proxy_auth_ = f; }
  void set_auth_user(const std::string& val) { auth_user_ = val; }
  void set_auth_pass(const talk_base::CryptString& val) { auth_pass_ = val; }

  // Setting this to true opens a security hole, so it is *highly* recommended
  // that you don't do this.
  void set_allow_unverified_certs(bool allow_unverified_certs) {
    allow_unverified_certs_ = allow_unverified_certs;
  }

 private:
  bool autodetect_proxy_;
  std::string proxy_host_;
  int proxy_port_;
  bool use_proxy_auth_;
  std::string auth_user_;
  talk_base::CryptString auth_pass_;
  bool allow_unverified_certs_;
  // Allow the copy constructor and operator=.
};

}  // namespace notifier

#endif  // JINGLE_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_


text:
package org.kaazing.gateway.management.context;

import java.util.Properties;

import javax.annotation.Resource;

import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.session.IoSessionInitializer;
import org.kaazing.gateway.management.ManagementService;
import org.kaazing.gateway.management.filter.ManagementFilter;
import org.kaazing.gateway.management.monitoring.configuration.MonitoringDataManager;
import org.kaazing.gateway.management.monitoring.configuration.MonitoringDataManagerInjector;
import org.kaazing.gateway.management.monitoring.configuration.impl.MonitoringDataManagerInjectorImpl;
import org.kaazing.gateway.management.monitoring.service.impl.MonitoredServiceImpl;
import org.kaazing.gateway.server.GatewayObserverFactorySpi;
import org.kaazing.gateway.server.context.GatewayContext;
import org.kaazing.gateway.service.MonitoringEntityFactory;
import org.kaazing.gateway.service.Service;
import org.kaazing.gateway.service.ServiceContext;
import org.kaazing.mina.core.session.IoSessionEx;

public class ManagementGatewayObserver implements GatewayObserverFactorySpi {

    private ManagementContext managementContext;
    private Properties configuration;
    private MonitoringDataManager monitoringDataManager;

    @Resource(name = "managementContext")
    public void setManagementContext(ManagementContext managementContext) {
        this.managementContext = managementContext;
    }

    @Resource(name = "configuration")
    public void setConfiguration(Properties configuration) {
        this.configuration = configuration;
    }

    @Override
    public void startingGateway(GatewayContext gatewayContext) {
        managementContext.createGatewayManagementBean();
        MonitoringDataManagerInjector injector = new MonitoringDataManagerInjectorImpl(configuration);
        monitoringDataManager = injector.makeMonitoringDataManager();
    }

    @Override
    public void initingService(ServiceContext serviceContext) {
        MonitoringEntityFactory monitoringEntityFactory =
                monitoringDataManager.addService(new MonitoredServiceImpl(serviceContext));
        serviceContext.setMonitoringFactory(monitoringEntityFactory);
    }

    /**
     * Respond to a service starting by adding a management bean for it. Note that we CANNOT do this during initedService because
     * a given service may come before the SNMP Management service, which does create the SNMP agent until its own init(). Note:
     * it is still slightly possible that someone could attempt to log in through Command Center in the second or so during
     * service startup. If some service hasn't started yet, it won't show up in the service list. The chance of this is very
     * slight, though, so we should deal with it later, if at all.
     */
    @Override
    public void startingService(ServiceContext serviceContext) {
        // NOTE: the session initializer ultimately will create a management filter
        // to add to the session filter chain. Creating that filter requires that
        // the service management bean actually exist, which means that the first
        // line in the block to add the bean MUST come first, and the two lines
        // must exist together. Adding the bean before startingService doesn't work
        // as explained above.
        if (!(serviceContext.getService() instanceof ManagementService)) {
            managementContext.addServiceManagementBean(serviceContext);
            addSessionInitializer(serviceContext.getService(), serviceContext);
        }
    }

    @Override
    public void destroyedService(ServiceContext serviceContext) {
        serviceContext.getMonitoringFactory().close();
    }

    @Override
    public void stoppedGateway(GatewayContext gatewayContext) {
        monitoringDataManager.close();
    }

    private void addSessionInitializer(Service service, ServiceContext serviceContext) {
        // if (not a management service then add a Management filter to the chain
        if (!(service instanceof ManagementService)) {
            final IoSessionInitializer<ConnectFuture> parentInitializer = serviceContext.getSessionInitializor();
            final ManagementFilter managementFilter = managementContext.getManagementFilter(serviceContext);

            serviceContext.setSessionInitializor(new IoSessionInitializer<ConnectFuture>() {

                public static final String MANAGEMENT_FILTER_NAME = "management";

                @Override
                public void initializeSession(IoSession session, ConnectFuture future) {
                    if (!session.getFilterChain().contains(MANAGEMENT_FILTER_NAME)) {
                        try {
                            // let the management layer know the bean exists
                            managementFilter.newManagementSession((IoSessionEx) session);
                        } catch (Exception ex) {
                            throw new RuntimeException("Exception adding new management session for session: "
                                    + session, ex);
                        }

                        session.getFilterChain().addLast(MANAGEMENT_FILTER_NAME, managementFilter);

                        // For Management we invoke the parent initializer after doing our work (FIXME: should the
                        // parent go first?)
                        if (parentInitializer != null) {
                            parentInitializer.initializeSession(session, future);
                        }
                    }
                }
            });
        }
    }
}


text:
package com.b2international.snowowl.fhir.core.request.valueset;

import com.b2international.snowowl.core.ServiceProvider;
import com.b2international.snowowl.fhir.core.model.ValidateCodeResult;
import com.b2international.snowowl.fhir.core.model.valueset.ValidateCodeRequest;
import com.b2international.snowowl.fhir.core.model.valueset.ValueSet;

/**
 * @since 8.0
 */
@FunctionalInterface
public interface FhirValueSetCodeValidator {

	FhirValueSetCodeValidator NOOP = (context, valueSet, request) -> ValidateCodeResult.builder().message("N/A").build();

	/**
	 * Validates whether the given Value Set conforms to the given {@link ValidateCodeRequest} or not.
	 * @param context
	 * @param valueSet
	 * @param request
	 * @return the code validation result, never null.
	 */
	ValidateCodeResult validateCode(ServiceProvider context, ValueSet valueSet, ValidateCodeRequest request);

}


text:
namespace Microsoft.Azure.Management.DataProtection.Models
{
    using Microsoft.Rest;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// AzureBackupRule
    /// </summary>
    /// <remarks>
    /// Azure backup rule
    /// </remarks>
    [Newtonsoft.Json.JsonObject("AzureBackupRule")]
    public partial class AzureBackupRule : BasePolicyRule
    {
        /// <summary>
        /// Initializes a new instance of the AzureBackupRule class.
        /// </summary>
        public AzureBackupRule()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the AzureBackupRule class.
        /// </summary>
        public AzureBackupRule(string name, DataStoreInfoBase dataStore, TriggerContext trigger, BackupParameters backupParameters = default(BackupParameters))
            : base(name)
        {
            BackupParameters = backupParameters;
            DataStore = dataStore;
            Trigger = trigger;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "backupParameters")]
        public BackupParameters BackupParameters { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "dataStore")]
        public DataStoreInfoBase DataStore { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "trigger")]
        public TriggerContext Trigger { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public override void Validate()
        {
            base.Validate();
            if (DataStore == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "DataStore");
            }
            if (Trigger == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Trigger");
            }
            if (DataStore != null)
            {
                DataStore.Validate();
            }
        }
    }
}


text:
'''
Created on Oct 19, 2015

@author: wirkert
'''

from scipy.interpolate import interp1d
import pandas as pd

def fold_by_sliding_average(df, window_size):
    """take a batch and apply a sliding average with given window size to
    the reflectances.
    window_size is elements to the left and to the right.
    There will be some boundary effect on the edges."""
    # next line does the folding.
    df.reflectances = pd.rolling_mean(df.reflectances.T, window_size,
                                      center=True).T
    # let's get rid of NaN columns which are created at the boundaries
    df.dropna(axis="columns", inplace=True)
    return df

def switch_reflectances(df, new_wavelengths, new_reflectances):
    df.drop(df["reflectances"].columns, axis=1, level=1, inplace=True)
    for i, nw in enumerate(new_wavelengths):
        df["reflectances", nw] = new_reflectances[:, i]
    return df

def interpolate_wavelengths(df, new_wavelengths):
    """ interpolate image data to fit new_wavelengths. Current implementation
    performs simple linear interpolation. Neither existing nor new _wavelengths
    need to be sorted. """
    # build an interpolator using the inormation provided by the dataframes
    # reflectance column
    interpolator = interp1d(df.reflectances.columns.astype(float),
                            df.reflectances.as_matrix(), assume_sorted=False,
                            bounds_error=False)
    # use this to create new reflectances
    new_reflectances = interpolator(new_wavelengths)
    # build a new dataframe out of this information and set the original df
    # to the new information. This seems hacky, can't it be done easier?
    switch_reflectances(df, new_wavelengths, new_reflectances)
    return df


text:
<?php

/**
 * Protecting from csrf
 */

Route::when('*', 'csrf', ['post','put','patch']);

/**
 * Pulling in partial route files from the routes directory
 */

foreach (File::allFiles(__DIR__.'/routes') as $partial)
{
	require $partial->getPathname(); // for test purposes just require, in the live environment you should use require_once
}

// Home routes
Route::get('/', [
	'as' => 'index_path',
	'uses' => 'PagesController@home'
	]);


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>TCC: Referência da Classe usina.operadores.Geracao</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

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

TCC
    1.0

Página Principal

Páginas relacionadas

Pacotes

Classes

Arquivos

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

Lista de Componentes

Índice dos Componentes

Hierarquia de Classes

Componentes Membros

 Todos Classes Namespaces Arquivos Funções Variáveis Páginas

Métodos Públicos |
Atributos Privados |
Lista de todos os Membros

Referência da Classe usina.operadores.Geracao

Diagrama de Hierarquia para usina.operadores.Geracao:

<map name="usina_8operadores_8_geracao_inherit__map" id="usina_8operadores_8_geracao_inherit__map">
</map>

Diagrama de colaboração para usina.operadores.Geracao:

<map name="usina_8operadores_8_geracao_coll__map" id="usina_8operadores_8_geracao_coll__map">
</map>

Métodos Públicos

 	Geracao (List< Turbina > turbinas)

 	Construtor.  Mais...

DistribuicaoVazao 	get ()

DistribuicaoVazao 	getAleatorio ()

Atributos Privados

final List< Turbina > 	turbinas

Descrição Detalhada

Autor

Victor de Lima Soares

Construtores & Destrutores

          usina.operadores.Geracao.Geracao
          (
          List< Turbina >
          turbinas	)

Construtor.

Parâmetros

turbinas

Exceções

NullPointerException

Se a lista de turbinas for uma referência nula.

Métodos

          DistribuicaoVazao usina.operadores.Geracao.get
          (
          	)

          DistribuicaoVazao usina.operadores.Geracao.getAleatorio
          (
          	)

Atributos

          final List<Turbina> usina.operadores.Geracao.turbinas

private

A documentação para esta classe foi gerada a partir do seguinte arquivo:

C:/Users/Victor/workplace/NetBeansProjects/tcc/src/usina/operadores/Geracao.java

usina

operadores

Geracao

Gerado em Segunda, 7 de Julho de 2014 14:15:04 para TCC por

     1.8.6


text:
@interface STPHomeViewController () <STPAuthDelegate>

@property (weak, nonatomic) IBOutlet UIButton *createPostButton;
@property (nonatomic, strong) NSArray *contentDataSource;

@property (strong, nonatomic) DAPagesContainer *pagesContainer;

@end

@implementation STPHomeViewController

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self)
    {
        self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Home" image:[UIImage imageNamed:@"home_tab.png"] tag:0];
    }
    return self;
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self)
    {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.

    self.navigationController.navigationBarHidden = YES;

    self.pagesContainer = [[DAPagesContainer alloc] init];
    [self.pagesContainer willMoveToParentViewController:self];
    self.pagesContainer.view.frame = self.view.bounds;
    self.pagesContainer.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    [self.view addSubview:self.pagesContainer.view];
    [self.pagesContainer didMoveToParentViewController:self];

    [self.view bringSubviewToFront:self.createPostButton];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    if ([STPDataProxy sharedDataProxy].loggedUserInfo && [STPDataProxy sharedDataProxy].sailsID.length)
    {
        [self loadData];
    }
    else
    {
        [self performSegueWithIdentifier:@"authControllerSegue" sender:self];
    }
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"authControllerSegue"])
    {
        UINavigationController *navigationController = segue.destinationViewController;
        STPAuthViewController *authViewController = (STPAuthViewController *)navigationController.topViewController;
        authViewController.delegate = self;
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - STPAuthDelegate methods

- (void)userWasLogged:(BOOL)isNewUser
{
    [self dismissViewControllerAnimated:YES completion:^{

    }];
}

#pragma mark - Data loading

- (void)loadData
{
    __weak STPHomeViewController *weakSelf = self;
    [[RKObjectManager sharedManager] getObjectsAtPath:@"/subscription" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {

        weakSelf.contentDataSource = mappingResult.array;
        [weakSelf buildSubscriptionsTabs];

    } failure:^(RKObjectRequestOperation *operation, NSError *error) {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
                                                        message:error.localizedDescription
                                                       delegate:nil
                                              cancelButtonTitle:@"OK"
                                              otherButtonTitles:nil];
        [alert show];
    }];
}

- (void)buildSubscriptionsTabs
{
    __block NSMutableArray *controllers = [[NSMutableArray alloc] init];

    //in any case show recents posts
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    STPPostsViewController *postsController = [storyboard instantiateViewControllerWithIdentifier:@"postsViewController"];
    postsController.showRecentsPosts = YES;
    postsController.title = NSLocalizedString(@"Recents", @"Recents");

    [controllers addObject:postsController];

    if (!self.contentDataSource.count)
    {
        self.pagesContainer.viewControllers = controllers;
        return;
    }

    [self.contentDataSource enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        STPPostsViewController *postsController = [storyboard instantiateViewControllerWithIdentifier:@"postsViewController"];
        postsController.subscriptionInfo = obj;
        postsController.title = postsController.subscriptionInfo.name;

        [controllers addObject:postsController];
    }];

    self.pagesContainer.viewControllers = controllers;
}

@end


text:
Java implementation of the popular game Tic Tac Toe for the subject of artificial intelligence, the logic of the game is decoupled from the view and the first movement is from the Player1 and then is the turn of CPU

### Test
To run the test use:
```sh
$ mvn test
```


text:
A simple client-side & server-side analytics library for Rails. It currently supports only KISSmetrics for more advanced
analytics features (trackEvent / setProperties) and Google Analytics just for tracking pageviews.

## Installation

Just add the `isc_analytics` gem into your Gemfile

```ruby
gem 'isc_analytics'
```

Then add an initializer file in your `config/initializers` directory containing the initial config of your analytics.

## Configuration

ISC Analytics currently supports the following configuration options:

```ruby
IscAnalytics.config.providers = ANALYTIC_PROVIDERS # a providers object (preferably using ConfigReader)
IscAnalytics.config.namespace = 'App' # an alias which will gain all the analytics behaviour in the clientside.
```

We highly recommend you to use our other gem
[ConfigReader](https://github.com/TheGiftsProject/configreader) to load the analytics_providers data from YML.

The providers hash / EnvConfigReader should contain the following sub keys:

```yml
kissmetrics:
  key: "KEY"
  dryrun: false # see http://support.kissmetrics.com/apis/ruby for more details
google_analytics:
  key: "KEY"
ipinfodb:
  key: "KEY"
optimizely:
  key: "KEY"
```

Currently only the KISSMetrics and Google Analytics keys are mandatory although the gem isn't fully tested without the ipinfodb and optimizely options.

## Usage

The basic way to use isc_analytics is to simply follow the **Getting Started** step, which will guide you on how
to enable simple visitor tracking in KISSmetrics and Google Analytics

If you need more, there's a client-side & server-side tracking analytics API. (Enabled just for KISSmetrics)

## Getting Started

After you've finished configuring isc_analytics, do the following in order to include it in your app:

#### ApplicationController

Add the following line inside your ApplicationController:

```ruby
include IscAnalytics::ControllerSupport
```
This will enable you to use the Analytics object from your controllers and views.

#### Application Layout

Add the following line to your main application layout, under the HTML head tag.

```erb
<%= add_analytics %>
```

This will embed all the needed HTML for the analytics to run (including the code for all the required services).

## Client Side

Once you've included isc_analytics as we've explained above, you will have access to the following client-side API:

```js
Analytics.trackEvent(<event name>, [<properties_hash>]);
Analytics.setProperty(<property_key>, <property_value>);
Analytics.setProperties(<properties_hash>);
Analytics.identify(<identity>, [<properties_hash>]);
Analytics.clearIdentity()
```

### Namespacing

If you've configured a Namespace in the initializer, then we'll automatically alias all the functions to the Namespace of your choice for easy access.
For example if I set my namespace as `App` then I'll be able to access the trackEvent function from `App.trackEvent`

## Server Side

All the **client side event tracking is available from the server side** as well. Once you've included isc_analytics you can access the `analytics` object which will have methods identical to the client-side analytics methods.
For example you can call `analytics.trackEvent('user-visit')` and it will be persisted in the current user session and flushed into the user's browser next time he visits a page (via add_analytics). This mechanism is similar in behaviour to Rails' flash object.

There is also support for purely server-side analytics (currently only for KISSMetrics) that send the data directly to KM, without going through the user's browser.
It is accessible through `IscAnalytics.server` with the following interface:
```ruby
IscAnalytics.server.track_event(identity, name, properties={})
IscAnalytics.server.set_properties(identity, properties)
IscAnalytics.server.alias(identity, new_identity)
```

### Opt out

One very cool feature **isc_analytics** has is a built in opt_out feature to be used when testing the system or when doing admin actions.
To enter opt_out for the current browsing session just call `analytics.opt_out!` from the controller.
Once opt-ted out, a dummy implementation of the analytics js will be sent to the client meaning that no calls will actually be sent to the analytics service.

## Notes
### KISSMetrics URL api
After including IscAnalytics::ControllerSupport into your controller, you can override the [KISSMetrics URL api](http://support.kissmetrics.com/apis/url) by adding `before_filter keep_km_url_event` to your controller.
This records the url events manually as soon as the request comes in and allows you to use `redirect_to` without worrying about losing analytics data.
If you intend to use this, you should disable the URL api in your kissmetrics settings in order to avoid duplicate events.


text:
package org.kie.workbench.common.widgets.client.assets.dropdown;

import java.util.Map;

public class KieAssetsDropdownItem {

    private final String text;

    private final String subText;

    private final String value;

    private final Map<String, String> metaData;

    public KieAssetsDropdownItem(final String text,
                                 final String subText,
                                 final String value,
                                 final Map<String, String> metaData) {
        this.text = text;
        this.subText = subText;
        this.value = value;
        this.metaData = metaData;
    }

    public String getText() {
        return text;
    }

    public String getSubText() {
        return subText;
    }

    public String getValue() {
        return value;
    }

    public Map<String, String> getMetaData() {
        return metaData;
    }
}


text:
package com.github.jehan.rest;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.ws.rs.NameBinding;

/**
 * Annotation to handle HTTP Header for cache control
 */
@NameBinding
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface CacheControl
{
	String value() default "public, must-revalidate";
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Johnny.Models;
using Johnny.Logic;
using Johnny.Data;

namespace Johnny.Controllers
{
    public class MenuController : DefaultController<Dish, MenuLogic, MenuData>
    {
        public MenuController() : base(new MenuLogic())
        {
        }
    }
}