text:
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
-- --------------------------------------------------
-- Date Created: 11/23/2016 22:27:22
-- Generated from EDMX file: C:\Users\Kamil\Source\Repos\ATNET2016\ServiceBus\ServiceBus\EntityModels\EntityDataModel.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [C:\Users\Kamil\Source\Repos\ATNET2016\ServiceBus\ServiceBus\App_Data\Database.mdf];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[FK_ProductBasketItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[BasketItems] DROP CONSTRAINT [FK_ProductBasketItem];
GO
IF OBJECT_ID(N'[dbo].[FK_BasketBasketItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[BasketItems] DROP CONSTRAINT [FK_BasketBasketItem];
GO
IF OBJECT_ID(N'[dbo].[FK_BillingInformationAddress]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[BillingInformations] DROP CONSTRAINT [FK_BillingInformationAddress];
GO
IF OBJECT_ID(N'[dbo].[FK_AddressOrder]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Orders] DROP CONSTRAINT [FK_AddressOrder];
GO
IF OBJECT_ID(N'[dbo].[FK_BillingInformationOrder]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Orders] DROP CONSTRAINT [FK_BillingInformationOrder];
GO
IF OBJECT_ID(N'[dbo].[FK_OrderBasket]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Orders] DROP CONSTRAINT [FK_OrderBasket];
GO
IF OBJECT_ID(N'[dbo].[FK_UserOrder]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Orders] DROP CONSTRAINT [FK_UserOrder];
GO
IF OBJECT_ID(N'[dbo].[FK_ProductRepair]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Repairs] DROP CONSTRAINT [FK_ProductRepair];
GO
IF OBJECT_ID(N'[dbo].[FK_UserReservation]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Reservations] DROP CONSTRAINT [FK_UserReservation];
GO
IF OBJECT_ID(N'[dbo].[FK_UserRepair]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Repairs] DROP CONSTRAINT [FK_UserRepair];
GO
IF OBJECT_ID(N'[dbo].[FK_StorageReservation]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Reservations] DROP CONSTRAINT [FK_StorageReservation];
GO
IF OBJECT_ID(N'[dbo].[FK_StorageRepair]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Repairs] DROP CONSTRAINT [FK_StorageRepair];
GO
IF OBJECT_ID(N'[dbo].[FK_ProductReservation]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Reservations] DROP CONSTRAINT [FK_ProductReservation];
GO
IF OBJECT_ID(N'[dbo].[FK_ProductStorageItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[StorageItems] DROP CONSTRAINT [FK_ProductStorageItem];
GO
IF OBJECT_ID(N'[dbo].[FK_StorageStorageItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[StorageItems] DROP CONSTRAINT [FK_StorageStorageItem];
GO
IF OBJECT_ID(N'[dbo].[FK_StorageAddress]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Storages] DROP CONSTRAINT [FK_StorageAddress];
GO
IF OBJECT_ID(N'[dbo].[FK_BasketCampaignItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[CampaignItems] DROP CONSTRAINT [FK_BasketCampaignItem];
GO
IF OBJECT_ID(N'[dbo].[FK_CampaignCampaignItem]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[CampaignItems] DROP CONSTRAINT [FK_CampaignCampaignItem];
GO
IF OBJECT_ID(N'[dbo].[FK_ProductProductType]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Products] DROP CONSTRAINT [FK_ProductProductType];
GO
IF OBJECT_ID(N'[dbo].[FK_CampaignProductType]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Campaigns] DROP CONSTRAINT [FK_CampaignProductType];
GO
IF OBJECT_ID(N'[dbo].[FK_OrderStatusOrder]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Orders] DROP CONSTRAINT [FK_OrderStatusOrder];
GO

-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[Products]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Products];
GO
IF OBJECT_ID(N'[dbo].[Baskets]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Baskets];
GO
IF OBJECT_ID(N'[dbo].[Campaigns]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Campaigns];
GO
IF OBJECT_ID(N'[dbo].[BasketItems]', 'U') IS NOT NULL
    DROP TABLE [dbo].[BasketItems];
GO
IF OBJECT_ID(N'[dbo].[Users]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Users];
GO
IF OBJECT_ID(N'[dbo].[BillingInformations]', 'U') IS NOT NULL
    DROP TABLE [dbo].[BillingInformations];
GO
IF OBJECT_ID(N'[dbo].[Addresses]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Addresses];
GO
IF OBJECT_ID(N'[dbo].[Orders]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Orders];
GO
IF OBJECT_ID(N'[dbo].[Reservations]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Reservations];
GO
IF OBJECT_ID(N'[dbo].[Repairs]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Repairs];
GO
IF OBJECT_ID(N'[dbo].[Storages]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Storages];
GO
IF OBJECT_ID(N'[dbo].[StorageItems]', 'U') IS NOT NULL
    DROP TABLE [dbo].[StorageItems];
GO
IF OBJECT_ID(N'[dbo].[CampaignItems]', 'U') IS NOT NULL
    DROP TABLE [dbo].[CampaignItems];
GO
IF OBJECT_ID(N'[dbo].[ProductTypes]', 'U') IS NOT NULL
    DROP TABLE [dbo].[ProductTypes];
GO
IF OBJECT_ID(N'[dbo].[OrderStatus]', 'U') IS NOT NULL
    DROP TABLE [dbo].[OrderStatus];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'Products'
CREATE TABLE [dbo].[Products] (
    [Id] uniqueidentifier  NOT NULL,
    [Name] nvarchar(50)  NOT NULL,
    [Price] float  NULL,
    [Enabled] bit  NOT NULL,
    [Headliner] bit  NOT NULL,
    [ProductType_Id] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Baskets'
CREATE TABLE [dbo].[Baskets] (
    [Id] uniqueidentifier  NOT NULL,
    [CampaignId] uniqueidentifier  NULL,
    [TotalPrice] float  NOT NULL
);
GO

-- Creating table 'Campaigns'
CREATE TABLE [dbo].[Campaigns] (
    [Id] uniqueidentifier  NOT NULL,
    [Name] nvarchar(max)  NOT NULL,
    [Discount] nvarchar(max)  NULL,
    [StartDate] datetime  NULL,
    [EndDate] datetime  NULL,
    [Active] bit  NOT NULL,
    [ProductType_Id] uniqueidentifier  NULL
);
GO

-- Creating table 'BasketItems'
CREATE TABLE [dbo].[BasketItems] (
    [ProductId] uniqueidentifier  NOT NULL,
    [BasketId] uniqueidentifier  NOT NULL,
    [Quantity] int  NOT NULL,
    [Id] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Users'
CREATE TABLE [dbo].[Users] (
    [Id] uniqueidentifier  NOT NULL,
    [Email] nvarchar(max)  NOT NULL,
    [Phone] nvarchar(max)  NULL,
    [Hash] nvarchar(max)  NOT NULL,
    [Salt] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'BillingInformations'
CREATE TABLE [dbo].[BillingInformations] (
    [Id] uniqueidentifier  NOT NULL,
    [BIC] nvarchar(max)  NULL,
    [IBAN] nvarchar(max)  NULL,
    [Address_Id] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Addresses'
CREATE TABLE [dbo].[Addresses] (
    [Id] uniqueidentifier  NOT NULL,
    [PostCode] nvarchar(max)  NOT NULL,
    [HouseNumber] int  NOT NULL,
    [HouseNumberExtension] nvarchar(max)  NULL,
    [Street] nvarchar(max)  NOT NULL,
    [District] nvarchar(max)  NULL,
    [DoorNumber] nvarchar(max)  NULL,
    [City] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'Orders'
CREATE TABLE [dbo].[Orders] (
    [Id] uniqueidentifier  NOT NULL,
    [OrderDate] datetime  NULL,
    [DeliveryDate] datetime  NULL,
    [AddressId] uniqueidentifier  NULL,
    [BillingInformationId] uniqueidentifier  NULL,
    [UserId] uniqueidentifier  NULL,
    [InvoiceNr] nvarchar(max)  NULL,
    [OrderStatusId] uniqueidentifier  NOT NULL,
    [CustNotes] nvarchar(max)  NOT NULL,
    [OrderNumber] nvarchar(max)  NOT NULL,
    [Basket_Id] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Reservations'
CREATE TABLE [dbo].[Reservations] (
    [Id] uniqueidentifier  NOT NULL,
    [Count] int  NOT NULL,
    [UserId] uniqueidentifier  NOT NULL,
    [StorageId] uniqueidentifier  NOT NULL,
    [ProductId] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Repairs'
CREATE TABLE [dbo].[Repairs] (
    [Id] uniqueidentifier  NOT NULL,
    [ProductId] uniqueidentifier  NOT NULL,
    [Serial] nvarchar(max)  NOT NULL,
    [Description] nvarchar(max)  NOT NULL,
    [UserId] uniqueidentifier  NOT NULL,
    [StorageId] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'Storages'
CREATE TABLE [dbo].[Storages] (
    [Id] uniqueidentifier  NOT NULL,
    [Name] nvarchar(max)  NOT NULL,
    [Address_Id] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'StorageItems'
CREATE TABLE [dbo].[StorageItems] (
    [Id] uniqueidentifier  NOT NULL,
    [ProductId] uniqueidentifier  NOT NULL,
    [StorageId] uniqueidentifier  NOT NULL,
    [Quantity] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'CampaignItems'
CREATE TABLE [dbo].[CampaignItems] (
    [Id] uniqueidentifier  NOT NULL,
    [BasketId] uniqueidentifier  NOT NULL,
    [CampaignId] uniqueidentifier  NOT NULL
);
GO

-- Creating table 'ProductTypes'
CREATE TABLE [dbo].[ProductTypes] (
    [Id] uniqueidentifier  NOT NULL,
    [Type] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'OrderStatus'
CREATE TABLE [dbo].[OrderStatus] (
    [Id] uniqueidentifier  NOT NULL,
    [Status] int  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Id] in table 'Products'
ALTER TABLE [dbo].[Products]
ADD CONSTRAINT [PK_Products]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Baskets'
ALTER TABLE [dbo].[Baskets]
ADD CONSTRAINT [PK_Baskets]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Campaigns'
ALTER TABLE [dbo].[Campaigns]
ADD CONSTRAINT [PK_Campaigns]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'BasketItems'
ALTER TABLE [dbo].[BasketItems]
ADD CONSTRAINT [PK_BasketItems]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Users'
ALTER TABLE [dbo].[Users]
ADD CONSTRAINT [PK_Users]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'BillingInformations'
ALTER TABLE [dbo].[BillingInformations]
ADD CONSTRAINT [PK_BillingInformations]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Addresses'
ALTER TABLE [dbo].[Addresses]
ADD CONSTRAINT [PK_Addresses]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [PK_Orders]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Reservations'
ALTER TABLE [dbo].[Reservations]
ADD CONSTRAINT [PK_Reservations]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Repairs'
ALTER TABLE [dbo].[Repairs]
ADD CONSTRAINT [PK_Repairs]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Storages'
ALTER TABLE [dbo].[Storages]
ADD CONSTRAINT [PK_Storages]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'StorageItems'
ALTER TABLE [dbo].[StorageItems]
ADD CONSTRAINT [PK_StorageItems]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'CampaignItems'
ALTER TABLE [dbo].[CampaignItems]
ADD CONSTRAINT [PK_CampaignItems]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'ProductTypes'
ALTER TABLE [dbo].[ProductTypes]
ADD CONSTRAINT [PK_ProductTypes]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'OrderStatus'
ALTER TABLE [dbo].[OrderStatus]
ADD CONSTRAINT [PK_OrderStatus]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- Creating foreign key on [ProductId] in table 'BasketItems'
ALTER TABLE [dbo].[BasketItems]
ADD CONSTRAINT [FK_ProductBasketItem]
    FOREIGN KEY ([ProductId])
    REFERENCES [dbo].[Products]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_ProductBasketItem'
CREATE INDEX [IX_FK_ProductBasketItem]
ON [dbo].[BasketItems]
    ([ProductId]);
GO

-- Creating foreign key on [BasketId] in table 'BasketItems'
ALTER TABLE [dbo].[BasketItems]
ADD CONSTRAINT [FK_BasketBasketItem]
    FOREIGN KEY ([BasketId])
    REFERENCES [dbo].[Baskets]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_BasketBasketItem'
CREATE INDEX [IX_FK_BasketBasketItem]
ON [dbo].[BasketItems]
    ([BasketId]);
GO

-- Creating foreign key on [Address_Id] in table 'BillingInformations'
ALTER TABLE [dbo].[BillingInformations]
ADD CONSTRAINT [FK_BillingInformationAddress]
    FOREIGN KEY ([Address_Id])
    REFERENCES [dbo].[Addresses]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_BillingInformationAddress'
CREATE INDEX [IX_FK_BillingInformationAddress]
ON [dbo].[BillingInformations]
    ([Address_Id]);
GO

-- Creating foreign key on [AddressId] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [FK_AddressOrder]
    FOREIGN KEY ([AddressId])
    REFERENCES [dbo].[Addresses]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_AddressOrder'
CREATE INDEX [IX_FK_AddressOrder]
ON [dbo].[Orders]
    ([AddressId]);
GO

-- Creating foreign key on [BillingInformationId] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [FK_BillingInformationOrder]
    FOREIGN KEY ([BillingInformationId])
    REFERENCES [dbo].[BillingInformations]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_BillingInformationOrder'
CREATE INDEX [IX_FK_BillingInformationOrder]
ON [dbo].[Orders]
    ([BillingInformationId]);
GO

-- Creating foreign key on [Basket_Id] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [FK_OrderBasket]
    FOREIGN KEY ([Basket_Id])
    REFERENCES [dbo].[Baskets]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_OrderBasket'
CREATE INDEX [IX_FK_OrderBasket]
ON [dbo].[Orders]
    ([Basket_Id]);
GO

-- Creating foreign key on [UserId] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [FK_UserOrder]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_UserOrder'
CREATE INDEX [IX_FK_UserOrder]
ON [dbo].[Orders]
    ([UserId]);
GO

-- Creating foreign key on [ProductId] in table 'Repairs'
ALTER TABLE [dbo].[Repairs]
ADD CONSTRAINT [FK_ProductRepair]
    FOREIGN KEY ([ProductId])
    REFERENCES [dbo].[Products]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_ProductRepair'
CREATE INDEX [IX_FK_ProductRepair]
ON [dbo].[Repairs]
    ([ProductId]);
GO

-- Creating foreign key on [UserId] in table 'Reservations'
ALTER TABLE [dbo].[Reservations]
ADD CONSTRAINT [FK_UserReservation]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_UserReservation'
CREATE INDEX [IX_FK_UserReservation]
ON [dbo].[Reservations]
    ([UserId]);
GO

-- Creating foreign key on [UserId] in table 'Repairs'
ALTER TABLE [dbo].[Repairs]
ADD CONSTRAINT [FK_UserRepair]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_UserRepair'
CREATE INDEX [IX_FK_UserRepair]
ON [dbo].[Repairs]
    ([UserId]);
GO

-- Creating foreign key on [StorageId] in table 'Reservations'
ALTER TABLE [dbo].[Reservations]
ADD CONSTRAINT [FK_StorageReservation]
    FOREIGN KEY ([StorageId])
    REFERENCES [dbo].[Storages]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_StorageReservation'
CREATE INDEX [IX_FK_StorageReservation]
ON [dbo].[Reservations]
    ([StorageId]);
GO

-- Creating foreign key on [StorageId] in table 'Repairs'
ALTER TABLE [dbo].[Repairs]
ADD CONSTRAINT [FK_StorageRepair]
    FOREIGN KEY ([StorageId])
    REFERENCES [dbo].[Storages]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_StorageRepair'
CREATE INDEX [IX_FK_StorageRepair]
ON [dbo].[Repairs]
    ([StorageId]);
GO

-- Creating foreign key on [ProductId] in table 'Reservations'
ALTER TABLE [dbo].[Reservations]
ADD CONSTRAINT [FK_ProductReservation]
    FOREIGN KEY ([ProductId])
    REFERENCES [dbo].[Products]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_ProductReservation'
CREATE INDEX [IX_FK_ProductReservation]
ON [dbo].[Reservations]
    ([ProductId]);
GO

-- Creating foreign key on [ProductId] in table 'StorageItems'
ALTER TABLE [dbo].[StorageItems]
ADD CONSTRAINT [FK_ProductStorageItem]
    FOREIGN KEY ([ProductId])
    REFERENCES [dbo].[Products]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_ProductStorageItem'
CREATE INDEX [IX_FK_ProductStorageItem]
ON [dbo].[StorageItems]
    ([ProductId]);
GO

-- Creating foreign key on [StorageId] in table 'StorageItems'
ALTER TABLE [dbo].[StorageItems]
ADD CONSTRAINT [FK_StorageStorageItem]
    FOREIGN KEY ([StorageId])
    REFERENCES [dbo].[Storages]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_StorageStorageItem'
CREATE INDEX [IX_FK_StorageStorageItem]
ON [dbo].[StorageItems]
    ([StorageId]);
GO

-- Creating foreign key on [Address_Id] in table 'Storages'
ALTER TABLE [dbo].[Storages]
ADD CONSTRAINT [FK_StorageAddress]
    FOREIGN KEY ([Address_Id])
    REFERENCES [dbo].[Addresses]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_StorageAddress'
CREATE INDEX [IX_FK_StorageAddress]
ON [dbo].[Storages]
    ([Address_Id]);
GO

-- Creating foreign key on [BasketId] in table 'CampaignItems'
ALTER TABLE [dbo].[CampaignItems]
ADD CONSTRAINT [FK_BasketCampaignItem]
    FOREIGN KEY ([BasketId])
    REFERENCES [dbo].[Baskets]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_BasketCampaignItem'
CREATE INDEX [IX_FK_BasketCampaignItem]
ON [dbo].[CampaignItems]
    ([BasketId]);
GO

-- Creating foreign key on [CampaignId] in table 'CampaignItems'
ALTER TABLE [dbo].[CampaignItems]
ADD CONSTRAINT [FK_CampaignCampaignItem]
    FOREIGN KEY ([CampaignId])
    REFERENCES [dbo].[Campaigns]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_CampaignCampaignItem'
CREATE INDEX [IX_FK_CampaignCampaignItem]
ON [dbo].[CampaignItems]
    ([CampaignId]);
GO

-- Creating foreign key on [ProductType_Id] in table 'Products'
ALTER TABLE [dbo].[Products]
ADD CONSTRAINT [FK_ProductProductType]
    FOREIGN KEY ([ProductType_Id])
    REFERENCES [dbo].[ProductTypes]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_ProductProductType'
CREATE INDEX [IX_FK_ProductProductType]
ON [dbo].[Products]
    ([ProductType_Id]);
GO

-- Creating foreign key on [ProductType_Id] in table 'Campaigns'
ALTER TABLE [dbo].[Campaigns]
ADD CONSTRAINT [FK_CampaignProductType]
    FOREIGN KEY ([ProductType_Id])
    REFERENCES [dbo].[ProductTypes]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_CampaignProductType'
CREATE INDEX [IX_FK_CampaignProductType]
ON [dbo].[Campaigns]
    ([ProductType_Id]);
GO

-- Creating foreign key on [OrderStatusId] in table 'Orders'
ALTER TABLE [dbo].[Orders]
ADD CONSTRAINT [FK_OrderStatusOrder]
    FOREIGN KEY ([OrderStatusId])
    REFERENCES [dbo].[OrderStatus]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating non-clustered index for FOREIGN KEY 'FK_OrderStatusOrder'
CREATE INDEX [IX_FK_OrderStatusOrder]
ON [dbo].[Orders]
    ([OrderStatusId]);
GO

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------


text:
package channels;

import com.researchworx.cresco.library.messaging.MsgEvent;
import core.AgentEngine;
import core.CommandExec;

public class MsgInQueue implements Runnable {

    private CommandExec commandExec;

    public MsgInQueue() {
        commandExec = new CommandExec();
    }

    public void run() {
        AgentEngine.MsgInQueueEnabled = true;
        while (AgentEngine.MsgInQueueEnabled) {
            try {
                if (AgentEngine.MsgInQueueActive) {
                    synchronized (AgentEngine.msgInQueue) {
                        while ((!AgentEngine.msgInQueue.isEmpty()) && AgentEngine.MsgInQueueEnabled) {
                            MsgEvent me = AgentEngine.msgInQueue.poll(); //get logevent
                            //new MsgRoute(me).run(); //route messages in new thread
                            AgentEngine.msgIn(me);
                        }
                    }
                }
                Thread.sleep(100);
            } catch (Exception ex) {
                System.out.println("Agent : MsgInQueue Error :" + ex.getMessage());
            }

        }
        //shutdown was called
    }
}

redpajama_set_name: RedPajamaGithub


text:
This integration was integrated and tested with Vertica v4.1.

Configure Vertica on Cortex XSOAR

Navigate to Settings > Integrations > Servers & Services.

Search for Vertica.

Click Add instance to create and configure a new integration instance.

Name: a textual name for the integration instance.

Host (myhost.example.com)

Database

Username

Port

Click Test to validate the URLs, token, and connection.

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

Query the Vertica database: vertica-query

1. Query the Vertica database

Executes a query on the Vertica database.

Base Command

vertica-query

Input

Argument Name
Description
Required

query
A SQL query to perform on the Vertica database.
Required

limit
The maximum number of results to return.
Optional

Context Output

Path
Type
Description

Vertica.Query
string
The original query.

Vertica.Row
string
The content of rows.

Command Example

!vertica-query query="SELECT * FROM system_tables ORDER BY table_schema, table_name LIMIT 5;" limit="50"

Context Example

Vertica:{} 2 items
Query:SELECT * FROM system_tables ORDER BY table_schema, table_name LIMIT 5;
Row:[] 5 items
0:{} 8 items
IsAccessibleDuringLockdown:false
IsMonitorable:true
IsSuperuserOnly:true
TableDescription:Access Policy information
TableId:95400
TableName:access_policy
TableSchema:v_catalog
TableSchemaId:8301
1:{} 8 items
IsAccessibleDuringLockdown:false
IsMonitorable:true
IsSuperuserOnly:false
TableDescription:A complete listing of all tables and views
TableId:10206
TableName:all_tables
TableSchema:v_catalog
TableSchemaId:8301
2:{} 8 items
IsAccessibleDuringLockdown:false
IsMonitorable:true
IsSuperuserOnly:false
TableDescription:Audit table for Managing_Users_And_Privileges category
TableId:10338
TableName:audit_managing_users_privileges
TableSchema:v_catalog
TableSchemaId:8301
3:{} 8 items
IsAccessibleDuringLockdown:false
IsMonitorable:true
IsSuperuserOnly:true
TableDescription:List of available branches
TableId:10800
TableName:branches
TableSchema:v_catalog
TableSchemaId:8301
4:{} 8 items
IsAccessibleDuringLockdown:false
IsMonitorable:true
IsSuperuserOnly:true
TableDescription:Current status of existing branches
TableId:117200
TableName:branches_status
TableSchema:v_catalog
TableSchemaId:8301

Human Readable Output


text:
package org.bouncycastle.crypto.tls;

import java.io.IOException;

import org.bouncycastle.crypto.params.AsymmetricKeyParameter;

public interface TlsAgreementCredentials
    extends TlsCredentials
{
    byte[] generateAgreement(AsymmetricKeyParameter peerPublicKey)
        throws IOException;
}


text:
require 'spec_helper'

describe NameValidator do

  context 'has a valid value' do
    let(:klass) do
      Class.new do
        include ActiveModel::Validations
        attr_accessor :name, :email
        validates :name, name: true
      end
    end

    subject { klass.new }

    it { should allow_value('First Last').for(:name) }
    it { should allow_value('First Last-Name').for(:name) }
    it { should allow_value('First Middle Last').for(:name) }
    it { should allow_value('Sur First Middle Last').for(:name) }
    it { should allow_value('Sur First Middle Last Family').for(:name) }
    it { should allow_value('Sur First Middle Last-Family').for(:name) }

    it { should_not allow_value('').for(:name) }
    it { should_not allow_value(' ').for(:name) }
    it { should_not allow_value(nil).for(:name) }
    it { should_not allow_value('First').for(:name) }
    it { should_not allow_value('First Last_Name').for(:name) }
    it { should_not allow_value('First1 Last').for(:name) }
    it { should_not allow_value('First 1 Last').for(:name) }
    it { should_not allow_value('Sur. First Middle Last Jr.').for(:name) }
    it { should_not allow_value('Sur First Middle Last Family III').for(:name) }
    it { should_not allow_value('! \#$%\`|').for(:name) }
    it { should_not allow_value('<>@[]\`|').for(:name) }

    it { should ensure_valid_name_format_of(:name) }
    it { should_not ensure_valid_name_format_of(:email) }
  end

end


text:
namespace Microsoft.Azure.Search
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for SynonymMapsOperations.
    /// </summary>
    public static partial class SynonymMapsOperationsExtensions
    {
            /// <summary>
            /// Creates a new synonym map or updates a synonym map if it already exists.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Update-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to create or update.
            /// </param>
            /// <param name='synonymMap'>
            /// The definition of the synonym map to create or update.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='accessCondition'>
            /// Additional parameters for the operation
            /// </param>
            public static SynonymMap CreateOrUpdate(this ISynonymMapsOperations operations, string synonymMapName, SynonymMap synonymMap, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition))
            {
                return operations.CreateOrUpdateAsync(synonymMapName, synonymMap, searchRequestOptions, accessCondition).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates a new synonym map or updates a synonym map if it already exists.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Update-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to create or update.
            /// </param>
            /// <param name='synonymMap'>
            /// The definition of the synonym map to create or update.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='accessCondition'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SynonymMap> CreateOrUpdateAsync(this ISynonymMapsOperations operations, string synonymMapName, SynonymMap synonymMap, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(synonymMapName, synonymMap, searchRequestOptions, accessCondition, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes a synonym map.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Delete-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to delete.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='accessCondition'>
            /// Additional parameters for the operation
            /// </param>
            public static void Delete(this ISynonymMapsOperations operations, string synonymMapName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition))
            {
                operations.DeleteAsync(synonymMapName, searchRequestOptions, accessCondition).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes a synonym map.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Delete-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to delete.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='accessCondition'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteAsync(this ISynonymMapsOperations operations, string synonymMapName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition), CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteWithHttpMessagesAsync(synonymMapName, searchRequestOptions, accessCondition, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Retrieves a synonym map definition.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Get-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to retrieve.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            public static SynonymMap Get(this ISynonymMapsOperations operations, string synonymMapName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
            {
                return operations.GetAsync(synonymMapName, searchRequestOptions).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves a synonym map definition.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Get-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMapName'>
            /// The name of the synonym map to retrieve.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SynonymMap> GetAsync(this ISynonymMapsOperations operations, string synonymMapName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(synonymMapName, searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Lists all synonym maps available for a search service.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Synonym-Maps" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            public static SynonymMapListResult List(this ISynonymMapsOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
            {
                return operations.ListAsync(searchRequestOptions).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists all synonym maps available for a search service.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Synonym-Maps" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SynonymMapListResult> ListAsync(this ISynonymMapsOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListWithHttpMessagesAsync(searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates a new synonym map.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Create-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMap'>
            /// The definition of the synonym map to create.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            public static SynonymMap Create(this ISynonymMapsOperations operations, SynonymMap synonymMap, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
            {
                return operations.CreateAsync(synonymMap, searchRequestOptions).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates a new synonym map.
            /// <see href="https://docs.microsoft.com/rest/api/searchservice/Create-Synonym-Map" />
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='synonymMap'>
            /// The definition of the synonym map to create.
            /// </param>
            /// <param name='searchRequestOptions'>
            /// Additional parameters for the operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SynonymMap> CreateAsync(this ISynonymMapsOperations operations, SynonymMap synonymMap, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateWithHttpMessagesAsync(synonymMap, searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>cassandra-search</artifactId>
        <groupId>org.wso2.carbon</groupId>
        <version>4.3.0-SNAPSHOT</version>
	    <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.cassandra.search.mgt</artifactId>
    <version>4.3.0-SNAPSHOT</version>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - Cassandra Search</name>
    <url>http://wso2.org</url>
    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.databridge.commons</artifactId>
            <version>4.3.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>13.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.identity.authentication</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hectorclient.wso2</groupId>
            <artifactId>hector-core</artifactId>
            <version>1.1.4.wso2v1</version>
        </dependency>

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>

                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            org.wso2.carbon.cassandra.search.*,
                        </Export-Package>
                        <Import-Package>
                            org.apache.axis2.*,
                            org.apache.axiom.*,
                        </Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>


text:
export class Account {
  id:number;
  avatar:number;
  avatar_img:string;
  username:string;
  vd_balance:string;
  vg_balance:string;
  max_health:string;
  health:string;
  energy:string;
  max_energy:string;
  prestige:number;
  city_id:number;
  delta_recovery_energy:number;
  last_up_energy:number;
  military_rank:string;
  military_rank_img:string;
  level: number;
  xp:number;
  nextLevelExperience:number;
  constructor() {}
}


text:
This file implements [Programming Assignment 2: Visualize Network Data](https://github.com/pauldeng/MOOC/tree/master/Data%20Visualization/Programming%20Assignment%202) for the Coursera [Data Visualization](https://class.coursera.org/datavisualization-001) Class, Aug 2015.

## The Data
[High school contact and friendship networks](http://www.sociopatterns.org/datasets/high-school-contact-and-friendship-networks/)

The data is directed, unweighted friendship network from surveys, space separated. It corresponds to the directed network of reported friendships. Each line has the form "i j", meaning that student i reported a friendship with student j.

## Tool Used
* Graphviz
* Inkscape

## Submission
![Image of Friendship](https://raw.githubusercontent.com/pauldeng/MOOC/master/Data%20Visualization/Programming%20Assignment%202/Graphics/Friendship_Legend_Small.jpg)

* [GV source file](https://github.com/pauldeng/MOOC/blob/master/Data%20Visualization/Programming%20Assignment%202/Data/graph_source_file.gv)
* [Large PNG file](https://github.com/pauldeng/MOOC/raw/master/Data%20Visualization/Programming%20Assignment%202/Graphics/Friendship_Legend.png)
* [SVG file](https://github.com/pauldeng/MOOC/blob/master/Data%20Visualization/Programming%20Assignment%202/Graphics/Friendship.svg)

This graph visualizes friendship relations between students in a high school in Marseilles, France, in December 2013, as measured through several techniques.

1. What is the data that you chose? Why?
   * Answer: friendship network from surveys. It is small dataset.
2. Did you use a subset of the data? If so, what was it?
   * Answer: full dataset is used.
3. Are there any particular aspects of your visualization to which you would like to bring attention?
   * Answer: Greener means more friends and Red means less friend.
4. What do you think the data, and your visualization, shows?
   * Answer: Edges are overlapping.

## Thank you for your time :)


text:
<?php

/**
 * Template.
 *
 * @copyright  Copyright (c) 2004, 2010 David Grudl
 * @package    Nette\Templates
 */
abstract class BaseTemplate extends Object implements ITemplate
{
	/** @var bool */
	public $warnOnUndefined = TRUE;

	/** @var array of function(BaseTemplate $sender); Occurs before a template is compiled - implement to customize the filters */
	public $onPrepareFilters = array();

	/** @var array */
	private $params = array();

	/** @var array compile-time filters */
	private $filters = array();

	/** @var array run-time helpers */
	private $helpers = array();

	/** @var array */
	private $helperLoaders = array();

	/**
	 * Registers callback as template compile-time filter.
	 * @param  callback
	 * @return void
	 */
	public function registerFilter($callback)
	{
		$callback = callback($callback);
		if (in_array($callback, $this->filters)) {
			throw new InvalidStateException("Filter '$callback' was registered twice.");
		}
		$this->filters[] = $callback;
	}

	/**
	 * Returns all registered compile-time filters.
	 * @return array
	 */
	final public function getFilters()
	{
		return $this->filters;
	}

	/********************* rendering ****************d*g**/

	/**
	 * Renders template to output.
	 * @return void
	 * @abstract
	 */
	public function render()
	{
	}

	/**
	 * Renders template to string.
	 * @param  bool  can throw exceptions? (hidden parameter)
	 * @return string
	 */
	public function __toString()
	{
		ob_start();
		try {
			$this->render();
			return ob_get_clean();

		} catch (Exception $e) {
			ob_end_clean();
			if (func_num_args() && func_get_arg(0)) {
				throw $e;
			} else {
				Debug::toStringException($e);
			}
		}
	}

	/**
	 * Applies filters on template content.
	 * @param  string
	 * @param  string
	 * @return string
	 */
	protected function compile($content, $label = NULL)
	{
		if (!$this->filters) {
			$this->onPrepareFilters($this);
		}

		try {
			foreach ($this->filters as $filter) {
				$content = self::extractPhp($content, $blocks);
				$content = $filter->invoke($content);
				$content = strtr($content, $blocks); // put PHP code back
			}
		} catch (Exception $e) {
			throw new InvalidStateException("Filter $filter: " . $e->getMessage() . ($label ? " (in $label)" : ''), 0, $e);
		}

		if ($label) {
			$content = "<?php\n// $label\n//\n?>$content";
		}

		return self::optimizePhp($content);
	}

	/********************* template helpers ****************d*g**/

	/**
	 * Registers callback as template run-time helper.
	 * @param  string
	 * @param  callback
	 * @return void
	 */
	public function registerHelper($name, $callback)
	{
		$this->helpers[strtolower($name)] = callback($callback);
	}

	/**
	 * Registers callback as template run-time helpers loader.
	 * @param  callback
	 * @return void
	 */
	public function registerHelperLoader($callback)
	{
		$this->helperLoaders[] = callback($callback);
	}

	/**
	 * Returns all registered run-time helpers.
	 * @return array
	 */
	final public function getHelpers()
	{
		return $this->helpers;
	}

	/**
	 * Call a template run-time helper. Do not call directly.
	 * @param  string  helper name
	 * @param  array   arguments
	 * @return mixed
	 */
	public function __call($name, $args)
	{
		$lname = strtolower($name);
		if (!isset($this->helpers[$lname])) {
			foreach ($this->helperLoaders as $loader) {
				$helper = $loader->invoke($lname);
				if ($helper) {
					$this->registerHelper($lname, $helper);
					return $this->helpers[$lname]->invokeArgs($args);
				}
			}
			return parent::__call($name, $args);
		}

		return $this->helpers[$lname]->invokeArgs($args);
	}

	/**
	 * Sets translate adapter.
	 * @param  ITranslator
	 * @return BaseTemplate  provides a fluent interface
	 */
	public function setTranslator(ITranslator $translator = NULL)
	{
		$this->registerHelper('translate', $translator === NULL ? NULL : array($translator, 'translate'));
		return $this;
	}

	/********************* template parameters ****************d*g**/

	/**
	 * Adds new template parameter.
	 * @param  string  name
	 * @param  mixed   value
	 * @return void
	 */
	public function add($name, $value)
	{
		if (array_key_exists($name, $this->params)) {
			throw new InvalidStateException("The variable '$name' exists yet.");
		}

		$this->params[$name] = $value;
	}

	/**
	 * Sets all parameters.
	 * @param  array
	 * @return BaseTemplate  provides a fluent interface
	 */
	public function setParams(array $params)
	{
		$this->params = $params;
		return $this;
	}

	/**
	 * Returns array of all parameters.
	 * @return array
	 */
	public function getParams()
	{
		return $this->params;
	}

	/**
	 * Sets a template parameter. Do not call directly.
	 * @param  string  name
	 * @param  mixed   value
	 * @return void
	 */
	public function __set($name, $value)
	{
		$this->params[$name] = $value;
	}

	/**
	 * Returns a template parameter. Do not call directly.
	 * @param  string  name
	 * @return mixed  value
	 */
	public function &__get($name)
	{
		if ($this->warnOnUndefined && !array_key_exists($name, $this->params)) {
			trigger_error("The variable '$name' does not exist in template.", E_USER_NOTICE);
		}

		return $this->params[$name];
	}

	/**
	 * Determines whether parameter is defined. Do not call directly.
	 * @param  string    name
	 * @return bool
	 */
	public function __isset($name)
	{
		return isset($this->params[$name]);
	}

	/**
	 * Removes a template parameter. Do not call directly.
	 * @param  string    name
	 * @return void
	 */
	public function __unset($name)
	{
		unset($this->params[$name]);
	}

	/********************* tools ****************d*g**/

	/**
	 * Extracts all blocks of PHP code.
	 * @param  string
	 * @param  array
	 * @return string
	 */
	private static function extractPhp($source, & $blocks)
	{
		$res = '';
		$blocks = array();
		$tokens = token_get_all($source);
		foreach ($tokens as $n => $token) {
			if (is_array($token)) {
				if ($token[0] === T_INLINE_HTML) {
					$res .= $token[1];
					continue;

				} elseif ($token[0] === T_OPEN_TAG && $token[1] === '<?' && isset($tokens[$n+1][1]) && $tokens[$n+1][1] === 'xml') {
					$php = & $res;
					$token[1] = '<<?php ?>?';

				} elseif ($token[0] === T_OPEN_TAG || $token[0] === T_OPEN_TAG_WITH_ECHO) {
					$res .= $id = "\x01@php:p" . count($blocks) . "@\x02";
					$php = & $blocks[$id];
				}
				$php .= $token[1];

			} else {
				$php .= $token;
			}
		}
		return $res;
	}

	/**
	 * Removes unnecessary blocks of PHP code.
	 * @param  string
	 * @return string
	 */
	public static function optimizePhp($source)
	{
		$res = $php = '';
		$lastChar = ';';
		$tokens = new ArrayIterator(token_get_all($source));
		foreach ($tokens as $key => $token) {
			if (is_array($token)) {
				if ($token[0] === T_INLINE_HTML) {
					$lastChar = '';
					$res .= $token[1];

				} elseif ($token[0] === T_CLOSE_TAG) {
					$next = isset($tokens[$key + 1]) ? $tokens[$key + 1] : NULL;
					if (substr($res, -1) !== '<' && preg_match('#^<\?php\s*$#', $php)) {
						$php = ''; // removes empty (?php ?), but retains ((?php ?)?php

					} elseif (is_array($next) && $next[0] === T_OPEN_TAG) { // remove ?)(?php
						if ($lastChar !== ';' && $lastChar !== '{' && $lastChar !== '}' && $lastChar !== ':' && $lastChar !== '/' ) $php .= $lastChar = ';';
						if (substr($next[1], -1) === "\n") $php .= "\n";
						$tokens->next();

					} elseif ($next) {
						$res .= preg_replace('#;?(\s)*$#', '$1', $php) . $token[1]; // remove last semicolon before ?)
						$php = '';

					} else { // remove last ?)
						if ($lastChar !== '}' && $lastChar !== ';') $php .= ';';
					}

				} elseif ($token[0] === T_ELSE || $token[0] === T_ELSEIF) {
					if ($tokens[$key + 1] === ':' && $lastChar === '}') $php .= ';'; // semicolon needed in if(): ... if() ... else:
					$lastChar = '';
					$php .= $token[1];

				} else {
					if (!in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT, T_OPEN_TAG))) $lastChar = '';
					$php .= $token[1];
				}
			} else {
				$php .= $lastChar = $token;
			}
		}
		return $res . $php;
	}

}


text:
<?php

namespace Google\Service\Integrations;

class EnterpriseCrmEventbusProtoParamSpecEntryValidationRuleDoubleRange extends \Google\Model
{
  public $max;
  public $min;

  public function setMax($max)
  {
    $this->max = $max;
  }
  public function getMax()
  {
    return $this->max;
  }
  public function setMin($min)
  {
    $this->min = $min;
  }
  public function getMin()
  {
    return $this->min;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EnterpriseCrmEventbusProtoParamSpecEntryValidationRuleDoubleRange::class, 'Google_Service_Integrations_EnterpriseCrmEventbusProtoParamSpecEntryValidationRuleDoubleRange');


text:
using SharpDX.DirectInput;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace LiveSplit.Model.Input
{
    public delegate void EventHandlerT<T>(object sender, T value);

    public class KeyOrButton
    {
        public bool IsButton { get; protected set; }
        public bool IsKey { get { return !IsButton; } set { IsButton = !value; } }

        public Keys Key { get; protected set; }
        public GamepadButton Button { get; protected set; }

        public KeyOrButton(Keys key)
        {
            Key = key;
            IsKey = true;
        }

        public KeyOrButton(GamepadButton button)
        {
            Button = button;
            IsButton = true;
        }

        public KeyOrButton(string stringRepresentation)
        {
            if (stringRepresentation.Contains(' ') && !stringRepresentation.Contains(", "))
            {
                var split = stringRepresentation.Split(new char[] { ' ' }, 2);
                Button = new GamepadButton(split[1], split[0]);
                IsButton = true;
            }
            else
            {
                Key = (Keys)Enum.Parse(typeof(Keys), stringRepresentation, true);
                IsKey = true;
            }
        }

        public override string ToString()
        {
            if (IsKey)
                return Key.ToString();
            else
                return Button.Button.ToString() + " " + Button.GamepadName;
        }

        public static bool operator ==(KeyOrButton a, KeyOrButton b)
        {
            if ((object)a == null && (object)b == null)
                return true;
            if ((object)a == null || (object)b == null)
                return false;

            if (a.IsKey && b.IsKey)
            {
                return a.Key == b.Key;
            }
            else if (a.IsButton && b.IsButton)
            {
                return a.Button == b.Button;
            }
            return false;
        }

        public static bool operator !=(KeyOrButton a, KeyOrButton b)
        {
            return !(a == b);
        }
    }

    public class CompositeHook
    {
        protected LowLevelKeyboardHook KeyboardHook { get; set; }
        protected GamepadHook GamepadHook { get; set; }

        protected List<GamepadButton> RegisteredButtons { get; set;}

        public event KeyEventHandler KeyPressed;
        public event EventHandlerT<GamepadButton> ButtonPressed;
        public event EventHandlerT<GamepadButton> AnyGamepadButtonPressed;
        public event EventHandlerT<KeyOrButton> KeyOrButtonPressed;

        public CompositeHook()
        {
            KeyboardHook = new LowLevelKeyboardHook();
            GamepadHook = new GamepadHook();
            RegisteredButtons = new List<GamepadButton>();
            KeyboardHook.KeyPressed += KeyboardHook_KeyPressed;
            GamepadHook.ButtonPressed += GamepadHook_ButtonPressed;
        }

        public Joystick GetMouse()
        {
            return GamepadHook.GetMouse();
        }

        void KeyboardHook_KeyPressed(object sender, KeyEventArgs e)
        {
            if (KeyPressed != null)
                KeyPressed(this, e);

            if (KeyOrButtonPressed != null)
                KeyOrButtonPressed(this, new KeyOrButton(e.KeyCode | e.Modifiers));
        }

        void GamepadHook_ButtonPressed(object sender, GamepadButton e)
        {
            if (AnyGamepadButtonPressed != null)
                AnyGamepadButtonPressed(this, e);

            if (RegisteredButtons.Contains(e))
            {
                if (ButtonPressed != null)
                    ButtonPressed(this, e);

                if (KeyOrButtonPressed != null)
                    KeyOrButtonPressed(this, new KeyOrButton(e));
            }
        }

        public void RegisterHotKey(Keys key)
        {
            KeyboardHook.RegisterHotKey(key);
        }

        public void RegisterGamepadButton(string gamePadName, string button)
        {
            RegisterGamepadButton(new GamepadButton(gamePadName, button));
        }

        public void RegisterGamepadButton(GamepadButton button)
        {
            RegisteredButtons.Add(button);
        }

        public void RegisterHotKey(KeyOrButton keyOrButton)
        {
            if (keyOrButton.IsKey)
                RegisterHotKey(keyOrButton.Key);
            else
                RegisterGamepadButton(keyOrButton.Button);
        }

        public void Poll()
        {
            GamepadHook.Poll();
            KeyboardHook.Poll();
        }

        public void UnregisterAllHotkeys()
        {
            RegisteredButtons.Clear();
            KeyboardHook.UnregisterAllHotkeys();
        }
    }
}


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimary_dark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="AppTheme.NoActionBar.Translucent" />
    <style name="AppTheme.NoActionBar.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
    <style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

    <style name="NavigationTextStyle">
        <item name="android:textSize">16sp</item>
    </style>

    <style name="PopupStyle" parent="ThemeOverlay.AppCompat.Light">
        <item name="android:itemTextAppearance">@style/TextStyle</item>
    </style>
    <style name="TextStyle">
        <item name="android:textSize">15sp</item>
        <item name="android:textColor">@color/secondary_text</item>
    </style>

    <style name="TabLayoutStyle" parent="Widget.Design.TabLayout">
        <item name="android:background">@color/colorDayWhite</item>
        <item name="tabMode">scrollable</item>
        <item name="tabIndicatorHeight">3dp</item>
        <item name="tabSelectedTextColor">@color/colorPrimary</item>
        <item name="tabTextAppearance">@style/TabStyle</item>
    </style>
    <style name="TabStyle" parent="TextAppearance.Design.Tab">
        <item name="android:textAllCaps">false</item>
        <item name="android:textSize">15sp</item>
    </style>

    <style name="HtmlTextStyle">
        <item name="android:textColor">@color/primary_text</item>
        <item name="android:textSize">18sp</item>
    </style>

</resources>


text:
package me.chanjar.weixin.mp.bean.custombuilder;

import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.bean.WxMpCustomMessage;

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

/**
 * 图文消息builder
 * <pre>
 * 用法:
 * WxMpCustomMessage m = WxMpCustomMessage.NEWS().addArticle(article).toUser(...).build();
 * </pre>
 * @author chanjarster
 *
 */
public final class NewsBuilder extends BaseBuilder<NewsBuilder> {

  private List<WxMpCustomMessage.WxArticle> articles = new ArrayList<WxMpCustomMessage.WxArticle>();

  public NewsBuilder() {
    this.msgType = WxConsts.CUSTOM_MSG_NEWS;
  }

  public NewsBuilder addArticle(WxMpCustomMessage.WxArticle article) {
    this.articles.add(article);
    return this;
  }

  public WxMpCustomMessage build() {
    WxMpCustomMessage m = super.build();
    m.setArticles(this.articles);
    return m;
  }
}


text:
namespace Lumix
{
	class WorldEditor;
}

namespace Ui
{
	class FileServerWidget;
}

class FileServerWidget : public QDockWidget
{
	Q_OBJECT

public:
	explicit FileServerWidget(QWidget* parent = nullptr);
	~FileServerWidget();

	void setWorldEditor(Lumix::WorldEditor& editor);
	void fsEventCb(const Lumix::FS::Event& event, int32_t param);
	void emitFileEvent(const Lumix::FS::Event& event, qint64 time);

signals:
	void fileEvent(qint32 event, qint64 handle, const QString& path, qint32 ret, qint32 param, qint64 time);

public slots:
	void onFileEvent(qint32 event, qint64 handle, const QString& path, qint32 ret, qint32 param, qint64 time);

private slots:
	void on_pushButton_clicked();
	void on_filterCB_clicked();
    void on_filter_returnPressed();

	void on_checkBox_stateChanged(int arg1);

private:
	void filterRow(int row);
	void filterTable();

	Ui::FileServerWidget* m_ui;
	Lumix::WorldEditor* m_editor;
	class FileServerWatcher* m_watcher;
};


text:
/**
 * The date-time lib
 * this is base on [3rd-party moment]
 * please refer [http://momentjs.com/docs/]
 * @author Caro.Huang
 */

$.lDateTime = (function () {
    var self = {};
    /**
     * change locale for moment
     * @param locale
     */
    var coverLocale = function (locale) {
        if (!$.lHelper.isStr(locale)) {
            locale = 'en';
        }
        locale = locale.toLowerCase();
        switch (locale) {
            case 'zh_hk':
                locale = 'zh-tw';
                break;
            case 'zh_cn':
                locale = 'zh-cn';
                break;
            default :
                break;
        }
        return locale;
    };
    var coverFormat = function (fmt, locale) {
        switch (fmt) {
            case !fmt:
            case 'date':
                fmt = 'YYYY-MM-DD';
                break;
            case 'monthDay':
                if (locale === 'zh-tw' || locale === 'zh-cn') {
                    fmt = 'MMM Do';
                }
                else {
                    fmt = 'DD MMM';
                }
                break;
            case 'weekDateTime':
                if (locale === 'zh-tw' || locale === 'zh-cn') {
                    fmt = 'LL ddd HH:mm';
                }
                else {
                    fmt = 'ddd, DD MMM, YYYY HH:mm';
                }
                break;
            case 'weekDate':
                if (locale === 'zh-tw' || locale === 'zh-cn') {
                    fmt = 'LL dddd';
                }
                else {
                    fmt = 'ddd, DD MMM, YYYY';
                }
                break;
            case 'dateTime':
                fmt = 'YYYY-MM-DD HH:mm:ss';
                break;
            case 'time':
                fmt = 'HH:mm:ss';
                break;
            case 'time2':
                fmt = 'HH:mm';
                break;
            case 'time3':
                fmt = 'mm:ss';
                break;
            default :
                break;
        }
        return fmt;
    };

    /**
     * format string to date-time
     * @param [str]
     * @param [fmt]
     * @param opt
     * @returns {*}
     */
    self.formatDateTime = function (str, fmt, opt) {
        var locale = 'en';
        var acceptEmpty = false;
        if (opt) {
            locale = opt.locale || locale;
            acceptEmpty = opt.acceptEmpty === true;
        }
        if (!acceptEmpty && !str) {
            return '';
        }
        if (locale) {
            locale = coverLocale(locale);
            moment.locale(locale);
        }

        fmt = coverFormat(fmt, locale);
        var returnVal = '';
        if (str) {
            returnVal = moment(str).format(fmt);
        } else {
            // get NOW-TIME
            returnVal = moment().format(fmt);
        }
        // reset locale to en
        moment.locale('en');
        return returnVal;
    };
    self.formatNow = function (fmt, opt) {
        opt = opt || {};
        opt.acceptEmpty = true;
        return self.formatDateTime(null, fmt, opt);
    };
    /**
     * custom format to like [2014-01-01T12:00:00.000+0800]
     * @param [sDateTime]
     * @returns {*|Object|ServerResponse}
     */
    self.formatFull = function (sDateTime) {
        return self.formatDateTime(sDateTime, 'YYYY-MM-DD[T]HH:mm:ss.SSSZZ');
    };
    /**
     * add date-time unit
     * please reference [http://momentjs.com/docs/#/manipulating/add/]
     * @param sDateTime
     * @param unit
     * @param amount
     * @returns {*}
     */
    self.add = function (sDateTime, unit, amount) {
        if (typeof unit === 'object') {
            sDateTime = moment(sDateTime).add(unit);
        } else {
            sDateTime = moment(sDateTime).add(unit, amount);
        }
        return sDateTime;
    };
    /**
     * subtract date-time unit
     * please reference [http://momentjs.com/docs/#/manipulating/subtract/]
     * @param sDateTime
     * @param unit
     * @param amount
     * @returns {*}
     */
    self.subtract = function (sDateTime, unit, amount) {
        if (typeof unit === 'object') {
            sDateTime = moment(sDateTime).subtract(unit);
        } else {
            sDateTime = moment(sDateTime).subtract(unit, amount);
        }
        return sDateTime;
    };
    /**
     * get start of the unit
     * ex. dateTime.startOf('2013-01-01 23:00:00','day') = 2013-01-01 00:00:00
     * please reference [http://momentjs.com/docs/#/manipulating/start-of/]
     * @param sDateTime
     * @param unit
     */
    self.startOf = function (sDateTime, unit) {
        return moment(sDateTime).startOf(unit);
    };
    /**
     * get end of the unit
     * ex. dateTime.endOf('2013-01-01 23:00:00','day') = 2013-01-01 23:59:59
     * please reference [http://momentjs.com/docs/#/manipulating/end-of/]
     * @param sDateTime
     * @param unit
     */
    self.endOf = function (sDateTime, unit) {
        return moment(sDateTime).endOf(unit);
    };
    /**
     * set date-time to local
     * @param sDateTime
     * @returns {*}
     */
    self.local = function (sDateTime) {
        return moment.local(sDateTime);
    };
    /**
     * set date-time to UTC
     * please reference [http://momentjs.com/docs/#/parsing/utc/]
     * @param sDateTime
     * @returns {*}
     */
    self.utc = function (sDateTime) {
        return moment.utc(sDateTime);
    };
    /**
     * compare date if before target-Date
     * [!target-Date] = now
     * sUntilTo = 'year'/'month'/'date'/'hour'/'minute'/'second'/'millisecond'
     * @param date
     * @param [tarDate]
     * @param [sUntilTo]
     * @returns {*}
     */
    self.isBefore = function (date, tarDate, sUntilTo) {
        if (!tarDate) {
            return moment(date).isBefore();
        }
        return moment(date).isBefore(tarDate, sUntilTo);
    };
    /**
     * compare date if after target-Date
     * [!target-Date] = now
     * sUntilTo = 'year'/'month'/'date'/'hour'/'minute'/'second'/'millisecond'
     * @param date
     * @param [tarDate]
     * @param [sUntilTo]
     * @returns {*}
     */
    self.isAfter = function (date, tarDate, sUntilTo) {
        if (!tarDate) {
            return moment(date).isAfter();
        }
        return moment(date).isAfter(tarDate, sUntilTo);
    };
    /**
     * validate is date-time format
     * return true when pass, int when error
     * please reference [http://momentjs.com/docs/#/parsing/is-valid/]
     * @param sDateTime
     * @returns {*}
     */
    self.isValid = function (sDateTime) {
        var m = moment(sDateTime);
        if (m.isValid(sDateTime)) {
            return true;
        }
        return m.invalidAt();
    };
    /**
     * get different between 2 date
     * EX
     * a = '2015-01-15 00:00:00'
     * b = '2015-01-16 12:00:00'
     * $.lDateTime.diff(a, b);
     * => 129600000
     * $.lDateTime.diff(a, b, 'd');
     * => 1 (day)
     * $.lDateTime.diff(a, b, 'd', {withFloat: true});
     * => 1.5 (day)
     * @param dateFrom
     * @param dateTo
     * @param [type]
     * @param [opt]
     * @returns {*}
     */
    self.diff = function (dateFrom, dateTo, type, opt) {
        // type = years/quarters/months/weeks/days/hours/minutes/seconds/milliseconds
        // type by shorthand = y/Q/M/w/d/h/m/s/ms
        var withFloat = false;
        if (opt) {
            withFloat = opt.withFloat === true;
        }
        dateFrom = dateFrom || new Date();
        dateTo = dateTo || new Date();
        return moment(dateTo).diff(dateFrom, type, withFloat);
    };

    return self;
})();


text:
package net.ghostrealms.protection;

import org.bukkit.plugin.java.JavaPlugin;

/**
 * Created by River on 1/27/2015.
 * Ghost Realms Chunk based Protection Suite
 * This Plugin is intended to be used as an API for the Metropolis Suite, on it's own it has limited functionality.
 */

public class GhostProtection extends JavaPlugin {

    @Override
    public void onEnable() {

    }

    @Override
    public void onDisable() {

    }

}


text:
require "bigdecimal"

module Mongoid
  class Criteria
    module Queryable
      module Extensions

        # The big decimal module adds custom behavior for Origin onto the
        # BigDecimal class.
        module BigDecimal
          module ClassMethods

            # Evolves the big decimal into a MongoDB friendly value - in this case
            # a string.
            #
            # @example Evolve the big decimal
            #   BigDecimal.evolve(decimal)
            #
            # @param [ BigDecimal ] object The object to convert.
            #
            # @return [ String ] The big decimal as a string.
            #
            # @since 1.0.0
            def evolve(object)
              __evolve__(object) do |obj|
                obj ? obj.to_s : obj
              end
            end
          end
        end
      end
    end
  end
end

::BigDecimal.__send__(:extend, Mongoid::Criteria::Queryable::Extensions::BigDecimal::ClassMethods)


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

<TITLE>
PigTokenHelper
</TITLE>

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

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

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.twitter.elephantbird.pig.util

Class PigTokenHelper

java.lang.Object
  com.twitter.elephantbird.pig.util.PigTokenHelper

public class PigTokenHelper
extends java.lang.Object

A helper class to deal with standard Pig tokens and delimiters.

Field Summary

static java.lang.String
BAG_BEGIN

static java.lang.String
BAG_END

static byte
DEFAULT_FIELD_DELIMITER

static java.lang.String
DEFAULT_FIELD_DELIMITER_STRING

static byte
DEFAULT_RECORD_DELIMITER

static java.lang.String
MAP_BEGIN

static java.lang.String
MAP_END

static java.lang.String
MAP_KV

static java.lang.String
TUPLE_BEGIN

static java.lang.String
TUPLE_END

Constructor Summary

PigTokenHelper()

Method Summary

static byte
evaluateDelimiter(java.lang.String inputDelimiter)

          Parse an input delimiter string, as with PigStorage, and return the byte it represents.

Methods inherited from class java.lang.Object

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

Field Detail

DEFAULT_RECORD_DELIMITER

public static final byte DEFAULT_RECORD_DELIMITER

See Also:
Constant Field Values

DEFAULT_FIELD_DELIMITER

public static final byte DEFAULT_FIELD_DELIMITER

See Also:
Constant Field Values

DEFAULT_FIELD_DELIMITER_STRING

public static final java.lang.String DEFAULT_FIELD_DELIMITER_STRING

See Also:
Constant Field Values

TUPLE_BEGIN

public static final java.lang.String TUPLE_BEGIN

See Also:
Constant Field Values

TUPLE_END

public static final java.lang.String TUPLE_END

See Also:
Constant Field Values

BAG_BEGIN

public static final java.lang.String BAG_BEGIN

See Also:
Constant Field Values

BAG_END

public static final java.lang.String BAG_END

See Also:
Constant Field Values

MAP_BEGIN

public static final java.lang.String MAP_BEGIN

See Also:
Constant Field Values

MAP_END

public static final java.lang.String MAP_END

See Also:
Constant Field Values

MAP_KV

public static final java.lang.String MAP_KV

See Also:
Constant Field Values

Constructor Detail

PigTokenHelper

public PigTokenHelper()

Method Detail

evaluateDelimiter

public static byte evaluateDelimiter(java.lang.String inputDelimiter)

Parse an input delimiter string, as with PigStorage, and return the byte it represents.

Parameters:
inputDelimiter - the string passed in from the pig script.

Returns:
the corresponding byte that will serve as the field separator.

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package org.terasology.rendering.logic;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.terasology.asset.Assets;
import org.terasology.config.Config;
import org.terasology.entitySystem.entity.EntityManager;
import org.terasology.entitySystem.entity.EntityRef;
import org.terasology.entitySystem.entity.lifecycleEvents.OnActivatedComponent;
import org.terasology.entitySystem.event.ReceiveEvent;
import org.terasology.entitySystem.systems.BaseComponentSystem;
import org.terasology.entitySystem.systems.RegisterMode;
import org.terasology.entitySystem.systems.RegisterSystem;
import org.terasology.entitySystem.systems.RenderSystem;
import org.terasology.entitySystem.systems.UpdateSubscriberSystem;
import org.terasology.logic.location.Location;
import org.terasology.logic.location.LocationComponent;
import org.terasology.math.MatrixUtils;
import org.terasology.math.geom.BaseQuat4f;
import org.terasology.math.geom.BaseVector3f;
import org.terasology.math.geom.Matrix4f;
import org.terasology.math.geom.Quat4f;
import org.terasology.math.geom.Vector3f;
import org.terasology.registry.In;
import org.terasology.rendering.assets.animation.MeshAnimation;
import org.terasology.rendering.assets.animation.MeshAnimationFrame;
import org.terasology.rendering.assets.material.Material;
import org.terasology.rendering.assets.skeletalmesh.Bone;
import org.terasology.rendering.opengl.OpenGLSkeletalMesh;
import org.terasology.rendering.world.WorldRenderer;

import java.nio.FloatBuffer;
import java.util.List;
import java.util.Random;

import static org.lwjgl.opengl.GL11.GL_DEPTH_TEST;
import static org.lwjgl.opengl.GL11.glBegin;
import static org.lwjgl.opengl.GL11.glDisable;
import static org.lwjgl.opengl.GL11.glEnable;
import static org.lwjgl.opengl.GL11.glEnd;
import static org.lwjgl.opengl.GL11.glLineWidth;
import static org.lwjgl.opengl.GL11.glPopMatrix;
import static org.lwjgl.opengl.GL11.glPushMatrix;
import static org.lwjgl.opengl.GL11.glVertex3f;

/**
 * @author Immortius
 */
@RegisterSystem(RegisterMode.CLIENT)
public class SkeletonRenderer extends BaseComponentSystem implements RenderSystem, UpdateSubscriberSystem {

    private static final Logger logger = LoggerFactory.getLogger(SkeletonRenderer.class);

    @In
    private EntityManager entityManager;

    @In
    private WorldRenderer worldRenderer;

    @In
    private Config config;

    private Random random = new Random();

    @ReceiveEvent(components = {SkeletalMeshComponent.class, LocationComponent.class})
    public void newSkeleton(OnActivatedComponent event, EntityRef entity) {
        SkeletalMeshComponent skeleton = entity.getComponent(SkeletalMeshComponent.class);
        if (skeleton.mesh == null) {
            return;
        }

        if (skeleton.boneEntities == null) {
            skeleton.boneEntities = Maps.newHashMap();
            for (Bone bone : skeleton.mesh.getBones()) {
                LocationComponent loc = new LocationComponent();
                EntityRef parent = (bone.getParent() != null) ? skeleton.boneEntities.get(bone.getParent().getName()) : entity;
                EntityRef boneEntity = entityManager.create(loc);
                Location.attachChild(parent, boneEntity);
                loc.setLocalPosition(bone.getLocalPosition());
                loc.setLocalRotation(bone.getLocalRotation());

                if (bone.getParent() == null) {
                    skeleton.rootBone = boneEntity;
                }
                skeleton.boneEntities.put(bone.getName(), boneEntity);
            }
            entity.saveComponent(skeleton);
        }
    }

    @Override
    public void update(float delta) {
        for (EntityRef entity : entityManager.getEntitiesWith(SkeletalMeshComponent.class, LocationComponent.class)) {
            updateSkeletalMeshOfEntity(entity, delta);
        }
    }

    private void updateSkeletalMeshOfEntity(EntityRef entity, float delta) {
        SkeletalMeshComponent skeletalMeshComp = entity.getComponent(SkeletalMeshComponent.class);

        if (skeletalMeshComp.animation == null && skeletalMeshComp.animationPool != null) {
            skeletalMeshComp.animation = randomAnimationData(skeletalMeshComp, random);
        }

        if (skeletalMeshComp.animation == null) {
            return;
        }

        if (skeletalMeshComp.animation.getFrameCount() < 1) {
            return;
        }
        skeletalMeshComp.animationTime += delta * skeletalMeshComp.animationRate;
        float animationDuration = getDurationOfAnimation(skeletalMeshComp);
        while (skeletalMeshComp.animationTime >= animationDuration) {
            MeshAnimation newAnimation;
            if (!skeletalMeshComp.loop) {
                newAnimation = null;
            } else {
                newAnimation = randomAnimationData(skeletalMeshComp, random);
            }

            if (newAnimation == null) {
                MeshAnimation finishedAnimation = skeletalMeshComp.animation;
                skeletalMeshComp.animationTime = animationDuration;
                MeshAnimationFrame frame = skeletalMeshComp.animation.getFrame(skeletalMeshComp.animation.getFrameCount() - 1);
                updateSkeleton(skeletalMeshComp, frame, frame, 1.0f);
                // Set animation to null so that AnimEndEvent fires only once
                skeletalMeshComp.animation = null;
                entity.saveComponent(skeletalMeshComp);
                entity.send(new AnimEndEvent(finishedAnimation));
                return;
            }
            skeletalMeshComp.animationTime -= animationDuration;
            if (skeletalMeshComp.animationTime < 0) {
                // In case the float calculation wasn't exact:
                skeletalMeshComp.animationTime = 0;
            }
            skeletalMeshComp.animation = newAnimation;
            animationDuration = getDurationOfAnimation(skeletalMeshComp);
        }
        float framePos = skeletalMeshComp.animationTime / skeletalMeshComp.animation.getTimePerFrame();
        int frameAId = (int) framePos;
        int frameBId = frameAId + 1;
        if (frameBId >= skeletalMeshComp.animation.getFrameCount()) {
            // In case the float calcuation wasn't exact:
            frameBId = skeletalMeshComp.animation.getFrameCount() - 1;
        }
        MeshAnimationFrame frameA = skeletalMeshComp.animation.getFrame(frameAId);
        MeshAnimationFrame frameB = skeletalMeshComp.animation.getFrame(frameBId);
        updateSkeleton(skeletalMeshComp, frameA, frameB, framePos - frameAId);
        entity.saveComponent(skeletalMeshComp);
    }

    private float getDurationOfAnimation(SkeletalMeshComponent skeletalMeshComp) {
        return skeletalMeshComp.animation.getTimePerFrame() * (skeletalMeshComp.animation.getFrameCount() - 1);
    }

    private static MeshAnimation randomAnimationData(SkeletalMeshComponent skeletalMeshComp, Random random) {
        List<MeshAnimation> animationPool = skeletalMeshComp.animationPool;
        if (animationPool == null) {
            return null;
        }
        if (animationPool.isEmpty()) {
            return null;
        }
        return animationPool.get(random.nextInt(animationPool.size()));
    }

    private void updateSkeleton(SkeletalMeshComponent skeletalMeshComp, MeshAnimationFrame frameA, MeshAnimationFrame frameB, float interpolationVal) {

        for (int i = 0; i < skeletalMeshComp.animation.getBoneCount(); ++i) {
            EntityRef boneEntity = skeletalMeshComp.boneEntities.get(skeletalMeshComp.animation.getBoneName(i));
            if (boneEntity == null) {
                continue;
            }
            LocationComponent boneLoc = boneEntity.getComponent(LocationComponent.class);
            if (boneLoc != null) {

                Vector3f newPos = BaseVector3f.lerp(frameA.getPosition(i), frameB.getPosition(i), interpolationVal);
                boneLoc.setLocalPosition(newPos);
                Quat4f newRot = BaseQuat4f.interpolate(frameA.getRotation(i), frameB.getRotation(i), interpolationVal);
                newRot.normalize();
                boneLoc.setLocalRotation(newRot);
                boneEntity.saveComponent(boneLoc);
            }
        }
    }

    @Override
    public void renderOpaque() {
        Vector3f cameraPosition = worldRenderer.getActiveCamera().getPosition();

        Quat4f worldRot = new Quat4f();
        Vector3f worldPos = new Vector3f();
        Quat4f inverseWorldRot = new Quat4f();

        FloatBuffer tempMatrixBuffer44 = BufferUtils.createFloatBuffer(16);
        FloatBuffer tempMatrixBuffer33 = BufferUtils.createFloatBuffer(12);

        for (EntityRef entity : entityManager.getEntitiesWith(SkeletalMeshComponent.class, LocationComponent.class)) {
            SkeletalMeshComponent skeletalMesh = entity.getComponent(SkeletalMeshComponent.class);
            if (skeletalMesh.mesh == null || skeletalMesh.material == null || skeletalMesh.boneEntities == null || !skeletalMesh.material.isRenderable()) {
                continue;
            }
            skeletalMesh.material.enable();
            skeletalMesh.material.setFloat("sunlight", 1.0f, true);
            skeletalMesh.material.setFloat("blockLight", 1.0f, true);

            skeletalMesh.material.setMatrix4("projectionMatrix", worldRenderer.getActiveCamera().getProjectionMatrix());
            skeletalMesh.material.bindTextures();

            LocationComponent location = entity.getComponent(LocationComponent.class);

            location.getWorldRotation(worldRot);
            inverseWorldRot.inverse(worldRot);
            location.getWorldPosition(worldPos);

            Vector3f worldPositionCameraSpace = new Vector3f();
            worldPositionCameraSpace.sub(worldPos, cameraPosition);

            worldPos.y -= skeletalMesh.heightOffset;

            float worldScale = location.getWorldScale();
            Matrix4f matrixCameraSpace = new Matrix4f(worldRot, worldPositionCameraSpace, worldScale);

            Matrix4f modelViewMatrix = MatrixUtils.calcModelViewMatrix(worldRenderer.getActiveCamera().getViewMatrix(), matrixCameraSpace);
            MatrixUtils.matrixToFloatBuffer(modelViewMatrix, tempMatrixBuffer44);

            skeletalMesh.material.setMatrix4("worldViewMatrix", tempMatrixBuffer44, true);

            MatrixUtils.matrixToFloatBuffer(MatrixUtils.calcNormalMatrix(modelViewMatrix), tempMatrixBuffer33);
            skeletalMesh.material.setMatrix3("normalMatrix", tempMatrixBuffer33, true);

            skeletalMesh.material.setFloat("sunlight", worldRenderer.getSunlightValueAt(worldPos), true);
            skeletalMesh.material.setFloat("blockLight", worldRenderer.getBlockLightValueAt(worldPos), true);

            // TODO: Add frustum culling here
            List<Vector3f> bonePositions = Lists.newArrayListWithCapacity(skeletalMesh.mesh.getVertexCount());
            List<Quat4f> boneRotations = Lists.newArrayListWithCapacity(skeletalMesh.mesh.getVertexCount());
            for (Bone bone : skeletalMesh.mesh.getBones()) {
                EntityRef boneEntity = skeletalMesh.boneEntities.get(bone.getName());
                if (boneEntity == null) {
                    boneEntity = EntityRef.NULL;
                }
                LocationComponent boneLocation = boneEntity.getComponent(LocationComponent.class);
                if (boneLocation != null) {
                    Vector3f pos = boneLocation.getWorldPosition();
                    pos.sub(worldPos);
                    inverseWorldRot.rotate(pos, pos);
                    bonePositions.add(pos);
                    Quat4f rot = new Quat4f(inverseWorldRot);
                    rot.mul(boneLocation.getWorldRotation());
                    boneRotations.add(rot);
                } else {
                    logger.warn("Unable to resolve bone \"{}\"", bone.getName());
                    bonePositions.add(new Vector3f());
                    boneRotations.add(new Quat4f());
                }
            }
            ((OpenGLSkeletalMesh) skeletalMesh.mesh).setScaleTranslate(skeletalMesh.scale, skeletalMesh.translate);
            ((OpenGLSkeletalMesh) skeletalMesh.mesh).render(bonePositions, boneRotations);
        }
    }

    @Override
    public void renderAlphaBlend() {
    }

    @Override
    public void renderOverlay() {
        if (config.getRendering().getDebug().isRenderSkeletons()) {
            glDisable(GL_DEPTH_TEST);
            Vector3f cameraPosition = worldRenderer.getActiveCamera().getPosition();
            Material material = Assets.getMaterial("engine:white").get();
            material.setFloat("sunlight", 1.0f, true);
            material.setFloat("blockLight", 1.0f, true);
            material.setMatrix4("projectionMatrix", worldRenderer.getActiveCamera().getProjectionMatrix());
            glLineWidth(2);
            Vector3f worldPos = new Vector3f();

            FloatBuffer tempMatrixBuffer44 = BufferUtils.createFloatBuffer(16);
            FloatBuffer tempMatrixBuffer33 = BufferUtils.createFloatBuffer(12);

            for (EntityRef entity : entityManager.getEntitiesWith(SkeletalMeshComponent.class, LocationComponent.class)) {
                LocationComponent location = entity.getComponent(LocationComponent.class);

                location.getWorldPosition(worldPos);

                Vector3f worldPositionCameraSpace = new Vector3f();
                worldPositionCameraSpace.sub(worldPos, cameraPosition);

                float worldScale = location.getWorldScale();
                Matrix4f matrixCameraSpace = new Matrix4f(new Quat4f(0, 0, 0, 1), worldPositionCameraSpace, worldScale);

                Matrix4f modelViewMatrix = MatrixUtils.calcModelViewMatrix(worldRenderer.getActiveCamera().getViewMatrix(), matrixCameraSpace);
                MatrixUtils.matrixToFloatBuffer(modelViewMatrix, tempMatrixBuffer44);

                material.setMatrix4("worldViewMatrix", tempMatrixBuffer44, true);

                MatrixUtils.matrixToFloatBuffer(MatrixUtils.calcNormalMatrix(modelViewMatrix), tempMatrixBuffer33);
                material.setMatrix3("normalMatrix", tempMatrixBuffer33, true);

                SkeletalMeshComponent skeletalMesh = entity.getComponent(SkeletalMeshComponent.class);
                renderBone(skeletalMesh.rootBone, worldPos);
            }
            glEnable(GL_DEPTH_TEST);
        }
    }

    @Override
    public void renderFirstPerson() {
    }

    @Override
    public void renderShadows() {
    }

    private void renderBoneOrientation(EntityRef boneEntity) {
        LocationComponent loc = boneEntity.getComponent(LocationComponent.class);
        if (loc == null) {
            return;
        }
        glPushMatrix();
        Vector3f worldPosA = loc.getWorldPosition();
        Quat4f worldRot = loc.getWorldRotation();
        Vector3f offset = new Vector3f(0, 0, 0.1f);
        worldRot.rotate(offset, offset);
        offset.add(worldPosA);

        glBegin(GL11.GL_LINES);
        glVertex3f(worldPosA.x, worldPosA.y, worldPosA.z);
        glVertex3f(offset.x, offset.y, offset.z);
        glEnd();

        for (EntityRef child : loc.getChildren()) {
            renderBoneOrientation(child);
        }
        glPopMatrix();
    }

    private void renderBone(EntityRef boneEntity, Vector3f centerPos) {
        LocationComponent loc = boneEntity.getComponent(LocationComponent.class);
        if (loc == null) {
            return;
        }
        LocationComponent parentLoc = loc.getParent().getComponent(LocationComponent.class);
        if (parentLoc != null) {
            Vector3f worldPosA = loc.getWorldPosition();
            worldPosA.sub(centerPos);
            Vector3f worldPosB = parentLoc.getWorldPosition();
            worldPosB.sub(centerPos);

            glBegin(GL11.GL_LINES);
            glVertex3f(worldPosA.x, worldPosA.y, worldPosA.z);
            glVertex3f(worldPosB.x, worldPosB.y, worldPosB.z);
            glEnd();

            for (EntityRef child : loc.getChildren()) {
                renderBone(child, centerPos);
            }
        }
    }
}


text:
"""Numerosity Production Task

See LICENCE file distributed with the package

"""

__author__ = 'Oliver Lindemann'
__version__ = '0.1'

from numprod import NumerosityProductionCloud, NumerosityProductionTask
from animation import scroll_out


text:
package jp.co.ctc_g.jse.core.csv;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

public class SeqFieldTestBean {

    private String str;

    private Date date;

    private String dateTime;

    private Integer integer;

    private Long lng;

    private BigInteger bigInteger;

    private BigDecimal bigDecimal;

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public Integer getInteger() {
        return integer;
    }

    public void setInteger(Integer integer) {
        this.integer = integer;
    }

    public Long getLng() {
        return lng;
    }

    public void setLng(Long lng) {
        this.lng = lng;
    }

    public BigInteger getBigInteger() {
        return bigInteger;
    }

    public void setBigInteger(BigInteger bigInteger) {
        this.bigInteger = bigInteger;
    }

    public BigDecimal getBigDecimal() {
        return bigDecimal;
    }

    public void setBigDecimal(BigDecimal bigDecimal) {
        this.bigDecimal = bigDecimal;
    }

}


text:
package com.metaui.fxbase.view.table.cell;

import com.metaui.core.datasource.DataMap;
import com.metaui.core.dict.EnumAlign;
import com.metaui.core.util.Callback;
import com.metaui.fxbase.view.table.event.TableCellRenderEvent;
import com.metaui.fxbase.view.dialog.MUDialog;
import com.metaui.fxbase.view.table.MUTable;
import com.metaui.fxbase.view.table.column.BaseTableColumn;
import com.metaui.fxbase.view.table.event.TableDataChangeEvent;
import com.metaui.fxbase.view.table.model.TableFieldModel;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Pos;
import javafx.scene.control.OverrunStyle;
import javafx.scene.control.TableCell;

/**
 * @author wei_jc
 * @since 1.0.0
 */
public class BaseTableCell extends TableCell<DataMap, String> {
    protected BaseTableColumn tableColumn;
    protected TableFieldModel model;
    protected BooleanProperty isModified = new SimpleBooleanProperty(false);
    protected StringProperty valueProperty = new SimpleStringProperty();

    public BaseTableCell(BaseTableColumn column, final TableFieldModel model) {
        this.tableColumn = column;
        this.model = model;

        // 对齐方式
        model.alignProperty().addListener((observable, oldValue, newValue) -> {
            Pos align = Pos.CENTER_LEFT;
            if (EnumAlign.CENTER == model.getAlign()) {
                align = Pos.CENTER;
            } else if (EnumAlign.RIGHT == model.getAlign()) {
                align = Pos.CENTER_RIGHT;
            }

            setAlignment(align);
        });
        valueProperty.addListener(new ChangeListener<String>() {
            @Override
            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
                if (oldValue == null || !oldValue.equals(newValue)) {
                    TableDataChangeEvent event = new TableDataChangeEvent(model, model.getName(), getItem());
                    event.setRowData((DataMap) getTableRow().getItem());
                    fireEvent(event);
                    ((DataMap) getTableRow().getItem()).put(model.getName(), newValue);
                }
            }
        });
        this.setTextOverrun(OverrunStyle.ELLIPSIS);
        this.setPrefHeight(25);
        this.setMaxHeight(30);
    }

    public BaseTableCell() {
        super();
    }

    @Override
    protected void updateItem(String item, boolean empty) {
        super.updateItem(item, empty);
        if (tableColumn != null && !empty) {
            Callback<TableCellRenderEvent, Void> onCellRender = tableColumn.getTable().getOnCellRender();
            if (onCellRender != null) {
                MUTable table = tableColumn.getTable();
                TableCellRenderEvent event = new TableCellRenderEvent();
                event.setTable(table);
                event.setColumn(tableColumn);
                event.setCell(this);
                event.setValue(item);
                event.setRowData(table.getItems().get(this.getTableRow().getIndex()));
                try {
                    onCellRender.call(event);
                } catch (Exception e) {
                    MUDialog.showException(e);
                }
            }
        }
    }
}