text:
/// WARNING: T4 generated file
/// <reference path="../../Scaffold/Scripts/typings/jquery/jquery.d.ts"/>

module App.Models {

	import IQuery = Scaffold.IQuery;

    export interface IBaseEntity {
        Id: number;
        DateCreated: /** System.DateTime **/ any;
        DateModified: /** System.DateTime **/ any;
    }

    export class BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: number;
        DateCreated: /** System.DateTime **/ any;
        DateModified: /** System.DateTime **/ any;

        constructor(data?: IBaseEntity) {
            this.Id = data ? data.Id : null;
            this.DateCreated = data ? data.DateCreated : null;
            this.DateModified = data ? data.DateModified : null;
        }

    }

    export interface IUser {
        SecretKey: string;
        SecurityStamp: string;
        PasswordHash: string;
        PhoneNumber: string;
        IsAnonymous: boolean;
        Name: string;
        FacebookId: string;
        FacebookIsVerified: boolean;
        IsADuplicate: boolean;
        IsActive: boolean;
        Email: string;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;
    }

    export class User {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        SecretKey: string;
        SecurityStamp: string;
        PasswordHash: string;
        PhoneNumber: string;
        IsAnonymous: boolean;
        Name: string;
        FacebookId: string;
        FacebookIsVerified: boolean;
        IsADuplicate: boolean;
        IsActive: boolean;
        Email: string;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;

        constructor(data?: IUser) {
            this.SecretKey = data ? data.SecretKey : null;
            this.SecurityStamp = data ? data.SecurityStamp : null;
            this.PasswordHash = data ? data.PasswordHash : null;
            this.PhoneNumber = data ? data.PhoneNumber : null;
            this.IsAnonymous = data ? data.IsAnonymous : null;
            this.Name = data ? data.Name : null;
            this.FacebookId = data ? data.FacebookId : null;
            this.FacebookIsVerified = data ? data.FacebookIsVerified : null;
            this.IsADuplicate = data ? data.IsADuplicate : null;
            this.IsActive = data ? data.IsActive : null;
            this.Email = data ? data.Email : null;
            this.fkOrganizationId = data ? data.fkOrganizationId : null;
            this.Organization = data ? data.Organization : null;
        }

    }

    export interface IUserViewModel {
        Id: string;
        FacebookId: string;
        UserName: string;
        Name: string;
        IsAnonymous: boolean;
        Organization: App.Models.IOrganization;
        Roles: Array<string>;
        Scopes: Array<App.Models.IRegion>;
    }

    export class UserViewModel {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        FacebookId: string;
        UserName: string;
        Name: string;
        IsAnonymous: boolean;
        Organization: App.Models.IOrganization;
        Roles: Array<string>;
        Scopes: Array<App.Models.IRegion>;

        constructor(data?: IUserViewModel) {
            this.Id = data ? data.Id : null;
            this.FacebookId = data ? data.FacebookId : null;
            this.UserName = data ? data.UserName : null;
            this.Name = data ? data.Name : null;
            this.IsAnonymous = data ? data.IsAnonymous : null;
            this.Organization = data ? data.Organization : null;
            this.Roles = data ? data.Roles : null;
            this.Scopes = data ? data.Scopes : null;
        }

    }

    export interface IRegion {
        Id: string;
        Name: string;
        Type: App.Models.RegionType;
        IsKelurahan: boolean;
        Website: string;
        UrlKey: string;
        fkParentId: string;
        Parent: App.Models.IRegion;
        DateCreated: /** System.DateTime **/ any;
        DateModified: /** System.DateTime **/ any;
    }

    export class Region {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        Name: string;
        Type: App.Models.RegionType;
        IsKelurahan: boolean;
        Website: string;
        UrlKey: string;
        fkParentId: string;
        Parent: App.Models.IRegion;
        DateCreated: /** System.DateTime **/ any;
        DateModified: /** System.DateTime **/ any;

        constructor(data?: IRegion) {
            this.Id = data ? data.Id : null;
            this.Name = data ? data.Name : null;
            this.Type = data ? data.Type : null;
            this.IsKelurahan = data ? data.IsKelurahan : null;
            this.Website = data ? data.Website : null;
            this.UrlKey = data ? data.UrlKey : null;
            this.fkParentId = data ? data.fkParentId : null;
            this.Parent = data ? data.Parent : null;
            this.DateCreated = data ? data.DateCreated : null;
            this.DateModified = data ? data.DateModified : null;
        }

    }

    export interface IRegionSearchResult {
        Id: string;
        Name: string;
        Type: App.Models.RegionType;
        TypeName: string;
        ParentId: string;
        Parent: string;
    }

    export class RegionSearchResult {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        Name: string;
        Type: App.Models.RegionType;
        TypeName: string;
        ParentId: string;
        Parent: string;

        constructor(data?: IRegionSearchResult) {
            this.Id = data ? data.Id : null;
            this.Name = data ? data.Name : null;
            this.Type = data ? data.Type : null;
            this.TypeName = data ? data.TypeName : null;
            this.ParentId = data ? data.ParentId : null;
            this.Parent = data ? data.Parent : null;
        }

    }

    export interface IAccount extends IBaseEntity {
        Code: string;
        Name: string;
        Type: App.Models.AccountType;
        ExpenseType: App.Models.ExpenseType;
        ExpenseGroup: App.Models.ExpenseGroup;
        Target: number;
        IsActivated: boolean;
        DateDeactivated: /** System.DateTime **/ any;
        TargetSource: string;
        fkParentAccountId: number;
        ParentAccount: App.Models.IAccount;
        fkApbdesId: number;
        Apbdes: App.Models.IApbdes;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkModifiedById: string;
        ModifiedBy: App.Models.IUser;
        fkDeactivatedById: string;
        DeactivatedBy: App.Models.IUser;
        ChildAccounts: Array<App.Models.IAccount>;
        ParentCode: string;
        TotalRealizationPerAccount: number;
    }

    export class Account extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Code: string;
        Name: string;
        Type: App.Models.AccountType;
        ExpenseType: App.Models.ExpenseType;
        ExpenseGroup: App.Models.ExpenseGroup;
        Target: number;
        IsActivated: boolean;
        DateDeactivated: /** System.DateTime **/ any;
        TargetSource: string;
        fkParentAccountId: number;
        ParentAccount: App.Models.IAccount;
        fkApbdesId: number;
        Apbdes: App.Models.IApbdes;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkModifiedById: string;
        ModifiedBy: App.Models.IUser;
        fkDeactivatedById: string;
        DeactivatedBy: App.Models.IUser;
        ChildAccounts: Array<App.Models.IAccount>;
        ParentCode: string;
        TotalRealizationPerAccount: number;

        constructor(data?: IAccount) {
            super(data);
            this.Code = data ? data.Code : null;
            this.Name = data ? data.Name : null;
            this.Type = data ? data.Type : null;
            this.ExpenseType = data ? data.ExpenseType : null;
            this.ExpenseGroup = data ? data.ExpenseGroup : null;
            this.Target = data ? data.Target : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.DateDeactivated = data ? data.DateDeactivated : null;
            this.TargetSource = data ? data.TargetSource : null;
            this.fkParentAccountId = data ? data.fkParentAccountId : null;
            this.ParentAccount = data ? data.ParentAccount : null;
            this.fkApbdesId = data ? data.fkApbdesId : null;
            this.Apbdes = data ? data.Apbdes : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
            this.fkModifiedById = data ? data.fkModifiedById : null;
            this.ModifiedBy = data ? data.ModifiedBy : null;
            this.fkDeactivatedById = data ? data.fkDeactivatedById : null;
            this.DeactivatedBy = data ? data.DeactivatedBy : null;
            this.ChildAccounts = data ? data.ChildAccounts : null;
            this.ParentCode = data ? data.ParentCode : null;
            this.TotalRealizationPerAccount = data ? data.TotalRealizationPerAccount : null;
        }

    }

    export interface IApbd extends IBaseEntity {
        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkRegionId: string;
        Region: App.Models.IRegion;
    }

    export class Apbd extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkRegionId: string;
        Region: App.Models.IRegion;

        constructor(data?: IApbd) {
            super(data);
            this.fkApbnId = data ? data.fkApbnId : null;
            this.Apbn = data ? data.Apbn : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
        }

    }

    export interface IApbdes extends IBaseEntity {
        IsActivated: boolean;
        IsCompleted: boolean;
        DateCompleted: /** System.DateTime **/ any;
        SourceUrl: string;
        fkSourceFileId: number;
        SourceFile: App.Models.IBlob;
        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkCompletedById: string;
        CompletedBy: App.Models.IUser;
        fkModifiedById: string;
        ModifiedBy: App.Models.IUser;
        Accounts: Array<App.Models.IAccount>;
    }

    export class Apbdes extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        IsActivated: boolean;
        IsCompleted: boolean;
        DateCompleted: /** System.DateTime **/ any;
        SourceUrl: string;
        fkSourceFileId: number;
        SourceFile: App.Models.IBlob;
        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkCompletedById: string;
        CompletedBy: App.Models.IUser;
        fkModifiedById: string;
        ModifiedBy: App.Models.IUser;
        Accounts: Array<App.Models.IAccount>;

        constructor(data?: IApbdes) {
            super(data);
            this.IsActivated = data ? data.IsActivated : null;
            this.IsCompleted = data ? data.IsCompleted : null;
            this.DateCompleted = data ? data.DateCompleted : null;
            this.SourceUrl = data ? data.SourceUrl : null;
            this.fkSourceFileId = data ? data.fkSourceFileId : null;
            this.SourceFile = data ? data.SourceFile : null;
            this.fkApbnId = data ? data.fkApbnId : null;
            this.Apbn = data ? data.Apbn : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.fkCompletedById = data ? data.fkCompletedById : null;
            this.CompletedBy = data ? data.CompletedBy : null;
            this.fkModifiedById = data ? data.fkModifiedById : null;
            this.ModifiedBy = data ? data.ModifiedBy : null;
            this.Accounts = data ? data.Accounts : null;
        }

    }

    export interface IApbn extends IBaseEntity {
        Key: string;
        Year: number;
        IsPerubahan: boolean;
    }

    export class Apbn extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Key: string;
        Year: number;
        IsPerubahan: boolean;

        constructor(data?: IApbn) {
            super(data);
            this.Key = data ? data.Key : null;
            this.Year = data ? data.Year : null;
            this.IsPerubahan = data ? data.IsPerubahan : null;
        }

    }

    export interface IBlob extends IBaseEntity {
        Name: string;
        Type: string;
        Size: number;
        RelativeFileName: string;
        FilePath: string;
    }

    export class Blob extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Name: string;
        Type: string;
        Size: number;
        RelativeFileName: string;
        FilePath: string;

        constructor(data?: IBlob) {
            super(data);
            this.Name = data ? data.Name : null;
            this.Type = data ? data.Type : null;
            this.Size = data ? data.Size : null;
            this.RelativeFileName = data ? data.RelativeFileName : null;
            this.FilePath = data ? data.FilePath : null;
        }

    }

    export interface ISpreadsheet extends IBaseEntity {
        FileName: string;
        DocumentName: string;
        Type: App.Models.DocumentUploadType;
        Notes: string;
        ApbnKey: string;
        IsActivated: boolean;
        IsApproved: boolean;
        DateApproved: /** System.DateTime **/ any;
        DateActivated: /** System.DateTime **/ any;
        DateDeactivated: /** System.DateTime **/ any;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkFileId: number;
        File: App.Models.IBlob;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;
        fkApprovedById: string;
        ApprovedBy: App.Models.IUser;
    }

    export class Spreadsheet extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        FileName: string;
        DocumentName: string;
        Type: App.Models.DocumentUploadType;
        Notes: string;
        ApbnKey: string;
        IsActivated: boolean;
        IsApproved: boolean;
        DateApproved: /** System.DateTime **/ any;
        DateActivated: /** System.DateTime **/ any;
        DateDeactivated: /** System.DateTime **/ any;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkFileId: number;
        File: App.Models.IBlob;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;
        fkApprovedById: string;
        ApprovedBy: App.Models.IUser;

        constructor(data?: ISpreadsheet) {
            super(data);
            this.FileName = data ? data.FileName : null;
            this.DocumentName = data ? data.DocumentName : null;
            this.Type = data ? data.Type : null;
            this.Notes = data ? data.Notes : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.IsApproved = data ? data.IsApproved : null;
            this.DateApproved = data ? data.DateApproved : null;
            this.DateActivated = data ? data.DateActivated : null;
            this.DateDeactivated = data ? data.DateDeactivated : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.fkFileId = data ? data.fkFileId : null;
            this.File = data ? data.File : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
            this.fkOrganizationId = data ? data.fkOrganizationId : null;
            this.Organization = data ? data.Organization : null;
            this.fkApprovedById = data ? data.fkApprovedById : null;
            this.ApprovedBy = data ? data.ApprovedBy : null;
        }

    }

    export interface IFieldReport extends IBaseEntity {
        Notes: string;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        fkRealizationId: number;
        Realization: App.Models.IRealization;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        Pictures: Array<App.Models.IBlob>;
    }

    export class FieldReport extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Notes: string;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        fkRealizationId: number;
        Realization: App.Models.IRealization;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        Pictures: Array<App.Models.IBlob>;

        constructor(data?: IFieldReport) {
            super(data);
            this.Notes = data ? data.Notes : null;
            this.Date = data ? data.Date : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkRealizationId = data ? data.fkRealizationId : null;
            this.Realization = data ? data.Realization : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
            this.Pictures = data ? data.Pictures : null;
        }

    }

    export interface IInvitationToken extends IBaseEntity {
        Token: string;
        IsUsed: boolean;
        fkUserId: string;
        User: App.Models.IUser;
        fkInviterId: string;
        Inviter: App.Models.IUser;
    }

    export class InvitationToken extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Token: string;
        IsUsed: boolean;
        fkUserId: string;
        User: App.Models.IUser;
        fkInviterId: string;
        Inviter: App.Models.IUser;

        constructor(data?: IInvitationToken) {
            super(data);
            this.Token = data ? data.Token : null;
            this.IsUsed = data ? data.IsUsed : null;
            this.fkUserId = data ? data.fkUserId : null;
            this.User = data ? data.User : null;
            this.fkInviterId = data ? data.fkInviterId : null;
            this.Inviter = data ? data.Inviter : null;
        }

    }

    export interface INationalAddAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        Dbh: number;
        Dau: number;
        Dak: number;
        Add: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class NationalAddAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        Dbh: number;
        Dau: number;
        Dak: number;
        Add: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: INationalAddAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.Dbh = data ? data.Dbh : null;
            this.Dau = data ? data.Dau : null;
            this.Dak = data ? data.Dak : null;
            this.Add = data ? data.Add : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbdId = data ? data.fkApbdId : null;
            this.Apbd = data ? data.Apbd : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface INationalBhprAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        RegionalTax: number;
        RegionalRetribution: number;
        Bhpr: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class NationalBhprAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        RegionalTax: number;
        RegionalRetribution: number;
        Bhpr: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: INationalBhprAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.RegionalTax = data ? data.RegionalTax : null;
            this.RegionalRetribution = data ? data.RegionalRetribution : null;
            this.Bhpr = data ? data.Bhpr : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbdId = data ? data.fkApbdId : null;
            this.Apbd = data ? data.Apbd : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface INationalDdAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        RegionalTransfer: number;
        Dd: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class NationalDdAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        RegionalTransfer: number;
        Dd: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbnId: number;
        Apbn: App.Models.IApbn;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: INationalDdAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.RegionalTransfer = data ? data.RegionalTransfer : null;
            this.Dd = data ? data.Dd : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbnId = data ? data.fkApbnId : null;
            this.Apbn = data ? data.Apbn : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface IOrganization extends IBaseEntity {
        Name: string;
        Description: string;
        Website: string;
        Facebook: string;
        Twitter: string;
        UrlKey: string;
        PictureFileName: string;
        fkPictureId: number;
        Picture: App.Models.IBlob;
    }

    export class Organization extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Name: string;
        Description: string;
        Website: string;
        Facebook: string;
        Twitter: string;
        UrlKey: string;
        PictureFileName: string;
        fkPictureId: number;
        Picture: App.Models.IBlob;

        constructor(data?: IOrganization) {
            super(data);
            this.Name = data ? data.Name : null;
            this.Description = data ? data.Description : null;
            this.Website = data ? data.Website : null;
            this.Facebook = data ? data.Facebook : null;
            this.Twitter = data ? data.Twitter : null;
            this.UrlKey = data ? data.UrlKey : null;
            this.PictureFileName = data ? data.PictureFileName : null;
            this.fkPictureId = data ? data.fkPictureId : null;
            this.Picture = data ? data.Picture : null;
        }

    }

    export interface IRealization extends IBaseEntity {
        Description: string;
        Vendor: string;
        Sector: App.Models.Sector;
        fkTransactionId: number;
        Transaction: App.Models.ITransaction;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
    }

    export class Realization extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Description: string;
        Vendor: string;
        Sector: App.Models.Sector;
        fkTransactionId: number;
        Transaction: App.Models.ITransaction;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;

        constructor(data?: IRealization) {
            super(data);
            this.Description = data ? data.Description : null;
            this.Vendor = data ? data.Vendor : null;
            this.Sector = data ? data.Sector : null;
            this.fkTransactionId = data ? data.fkTransactionId : null;
            this.Transaction = data ? data.Transaction : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
        }

    }

    export interface IRegionalAddAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Add: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class RegionalAddAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Add: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: IRegionalAddAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Population = data ? data.Population : null;
            this.PopulationRatio = data ? data.PopulationRatio : null;
            this.PopulationWeight = data ? data.PopulationWeight : null;
            this.PoorPopulation = data ? data.PoorPopulation : null;
            this.PoorPopulationRatio = data ? data.PoorPopulationRatio : null;
            this.PoorPopulationWeight = data ? data.PoorPopulationWeight : null;
            this.Area = data ? data.Area : null;
            this.AreaRatio = data ? data.AreaRatio : null;
            this.AreaWeight = data ? data.AreaWeight : null;
            this.Ikg = data ? data.Ikg : null;
            this.IkgRatio = data ? data.IkgRatio : null;
            this.IkgWeight = data ? data.IkgWeight : null;
            this.TotalWeight = data ? data.TotalWeight : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Add = data ? data.Add : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbdId = data ? data.fkApbdId : null;
            this.Apbd = data ? data.Apbd : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface IRegionalBhprAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        BaseAllocation: number;
        Pdrd: number;
        PdrdRatio: number;
        FormulaBasedAllocation: number;
        Bhpr: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class RegionalBhprAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        BaseAllocation: number;
        Pdrd: number;
        PdrdRatio: number;
        FormulaBasedAllocation: number;
        Bhpr: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: IRegionalBhprAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Pdrd = data ? data.Pdrd : null;
            this.PdrdRatio = data ? data.PdrdRatio : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Bhpr = data ? data.Bhpr : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbdId = data ? data.fkApbdId : null;
            this.Apbd = data ? data.Apbd : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface IRegionalDdAllocation extends IBaseEntity {
        No: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Dd: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class RegionalDdAllocation extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        No: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Dd: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
        IsActivated: boolean;
        fkApbdId: number;
        Apbd: App.Models.IApbd;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: IRegionalDdAllocation) {
            super(data);
            this.No = data ? data.No : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Population = data ? data.Population : null;
            this.PopulationRatio = data ? data.PopulationRatio : null;
            this.PopulationWeight = data ? data.PopulationWeight : null;
            this.PoorPopulation = data ? data.PoorPopulation : null;
            this.PoorPopulationRatio = data ? data.PoorPopulationRatio : null;
            this.PoorPopulationWeight = data ? data.PoorPopulationWeight : null;
            this.Area = data ? data.Area : null;
            this.AreaRatio = data ? data.AreaRatio : null;
            this.AreaWeight = data ? data.AreaWeight : null;
            this.Ikg = data ? data.Ikg : null;
            this.IkgRatio = data ? data.IkgRatio : null;
            this.IkgWeight = data ? data.IkgWeight : null;
            this.TotalWeight = data ? data.TotalWeight : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Dd = data ? data.Dd : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.fkApbdId = data ? data.fkApbdId : null;
            this.Apbd = data ? data.Apbd : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface ISourceDocument extends IBaseEntity {
        FileName: string;
        OriginalFileName: string;
        GoogleDriveId: string;
        Type: App.Models.DocumentUploadType;
        Function: App.Models.SourceDocumentFunction;
        ThumbnailCreated: boolean;
        ApbnKey: string;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkFileId: number;
        File: App.Models.IBlob;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;
        fkApprovedById: string;
        ApprovedBy: App.Models.IUser;
        fkTransferId: number;
        Transfer: App.Models.ITransfer;
    }

    export class SourceDocument extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        FileName: string;
        OriginalFileName: string;
        GoogleDriveId: string;
        Type: App.Models.DocumentUploadType;
        Function: App.Models.SourceDocumentFunction;
        ThumbnailCreated: boolean;
        ApbnKey: string;
        fkRegionId: string;
        Region: App.Models.IRegion;
        fkFileId: number;
        File: App.Models.IBlob;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkOrganizationId: number;
        Organization: App.Models.IOrganization;
        fkApprovedById: string;
        ApprovedBy: App.Models.IUser;
        fkTransferId: number;
        Transfer: App.Models.ITransfer;

        constructor(data?: ISourceDocument) {
            super(data);
            this.FileName = data ? data.FileName : null;
            this.OriginalFileName = data ? data.OriginalFileName : null;
            this.GoogleDriveId = data ? data.GoogleDriveId : null;
            this.Type = data ? data.Type : null;
            this.Function = data ? data.Function : null;
            this.ThumbnailCreated = data ? data.ThumbnailCreated : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
            this.fkFileId = data ? data.fkFileId : null;
            this.File = data ? data.File : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
            this.fkOrganizationId = data ? data.fkOrganizationId : null;
            this.Organization = data ? data.Organization : null;
            this.fkApprovedById = data ? data.fkApprovedById : null;
            this.ApprovedBy = data ? data.ApprovedBy : null;
            this.fkTransferId = data ? data.fkTransferId : null;
            this.Transfer = data ? data.Transfer : null;
        }

    }

    export interface IBaseTransaction extends IBaseEntity {
        Amount: number;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        SourceUrl: string;
        Year: number;
        fkSourceFileId: number;
        SourceFile: App.Models.IBlob;
        fkSourceId: string;
        Source: App.Models.IRegion;
        fkDestinationId: string;
        Destination: App.Models.IRegion;
        fkAccountId: number;
        Account: App.Models.IAccount;
        fkActorId: string;
        Actor: App.Models.IRegion;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;
    }

    export class BaseTransaction extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Amount: number;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        SourceUrl: string;
        Year: number;
        fkSourceFileId: number;
        SourceFile: App.Models.IBlob;
        fkSourceId: string;
        Source: App.Models.IRegion;
        fkDestinationId: string;
        Destination: App.Models.IRegion;
        fkAccountId: number;
        Account: App.Models.IAccount;
        fkActorId: string;
        Actor: App.Models.IRegion;
        fkCreatedById: string;
        CreatedBy: App.Models.IUser;
        fkSpreadsheetId: number;
        Spreadsheet: App.Models.ISpreadsheet;

        constructor(data?: IBaseTransaction) {
            super(data);
            this.Amount = data ? data.Amount : null;
            this.Date = data ? data.Date : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.SourceUrl = data ? data.SourceUrl : null;
            this.Year = data ? data.Year : null;
            this.fkSourceFileId = data ? data.fkSourceFileId : null;
            this.SourceFile = data ? data.SourceFile : null;
            this.fkSourceId = data ? data.fkSourceId : null;
            this.Source = data ? data.Source : null;
            this.fkDestinationId = data ? data.fkDestinationId : null;
            this.Destination = data ? data.Destination : null;
            this.fkAccountId = data ? data.fkAccountId : null;
            this.Account = data ? data.Account : null;
            this.fkActorId = data ? data.fkActorId : null;
            this.Actor = data ? data.Actor : null;
            this.fkCreatedById = data ? data.fkCreatedById : null;
            this.CreatedBy = data ? data.CreatedBy : null;
            this.fkSpreadsheetId = data ? data.fkSpreadsheetId : null;
            this.Spreadsheet = data ? data.Spreadsheet : null;
        }

    }

    export interface ITransaction extends IBaseTransaction {
    }

    export class Transaction extends BaseTransaction {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: ITransaction) {
            super(data);
        }

    }

    export interface IFrozenTransaction extends IBaseTransaction {
    }

    export class FrozenTransaction extends BaseTransaction {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenTransaction) {
            super(data);
        }

    }

    export interface IBaseTransfer extends IBaseEntity {
        Dd: number;
        Add: number;
        Bhpr: number;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        Year: number;
        fkRegionId: string;
        Region: App.Models.IRegion;
    }

    export class BaseTransfer extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Dd: number;
        Add: number;
        Bhpr: number;
        Date: /** System.DateTime **/ any;
        IsActivated: boolean;
        Year: number;
        fkRegionId: string;
        Region: App.Models.IRegion;

        constructor(data?: IBaseTransfer) {
            super(data);
            this.Dd = data ? data.Dd : null;
            this.Add = data ? data.Add : null;
            this.Bhpr = data ? data.Bhpr : null;
            this.Date = data ? data.Date : null;
            this.IsActivated = data ? data.IsActivated : null;
            this.Year = data ? data.Year : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
        }

    }

    export interface ITransfer extends IBaseTransfer {
        SourceDocuments: Array<App.Models.ISourceDocument>;
    }

    export class Transfer extends BaseTransfer {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        SourceDocuments: Array<App.Models.ISourceDocument>;

        constructor(data?: ITransfer) {
            super(data);
            this.SourceDocuments = data ? data.SourceDocuments : null;
        }

    }

    export interface IFrozenTransfer extends IBaseTransfer {
    }

    export class FrozenTransfer extends BaseTransfer {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenTransfer) {
            super(data);
        }

    }

    export interface IUserScope extends IBaseEntity {
        fkUserId: string;
        User: App.Models.IUser;
        fkRegionId: string;
        Region: App.Models.IRegion;
    }

    export class UserScope extends BaseEntity {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        fkUserId: string;
        User: App.Models.IUser;
        fkRegionId: string;
        Region: App.Models.IRegion;

        constructor(data?: IUserScope) {
            super(data);
            this.fkUserId = data ? data.fkUserId : null;
            this.User = data ? data.User : null;
            this.fkRegionId = data ? data.fkRegionId : null;
            this.Region = data ? data.Region : null;
        }

    }

}
module App.Models.Views {

	import IQuery = Scaffold.IQuery;

    export interface IBaseAccountRecapitulation {
        Id: string;
        RegionId: string;
        ApbnId: number;
        ApbnKey: string;
        ParentRegionId: string;
        RegionName: string;
        BudgetedIncome: number;
        RealizedIncome: number;
        BudgetedExpense: number;
        RealizedExpense: number;
        Recap1Expense: number;
        Recap2Expense: number;
        Recap3Expense: number;
        Recap4Expense: number;
        TotalDesa: number;
        CompletedDesa: number;
    }

    export class BaseAccountRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ApbnId: number;
        ApbnKey: string;
        ParentRegionId: string;
        RegionName: string;
        BudgetedIncome: number;
        RealizedIncome: number;
        BudgetedExpense: number;
        RealizedExpense: number;
        Recap1Expense: number;
        Recap2Expense: number;
        Recap3Expense: number;
        Recap4Expense: number;
        TotalDesa: number;
        CompletedDesa: number;

        constructor(data?: IBaseAccountRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ApbnId = data ? data.ApbnId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.RegionName = data ? data.RegionName : null;
            this.BudgetedIncome = data ? data.BudgetedIncome : null;
            this.RealizedIncome = data ? data.RealizedIncome : null;
            this.BudgetedExpense = data ? data.BudgetedExpense : null;
            this.RealizedExpense = data ? data.RealizedExpense : null;
            this.Recap1Expense = data ? data.Recap1Expense : null;
            this.Recap2Expense = data ? data.Recap2Expense : null;
            this.Recap3Expense = data ? data.Recap3Expense : null;
            this.Recap4Expense = data ? data.Recap4Expense : null;
            this.TotalDesa = data ? data.TotalDesa : null;
            this.CompletedDesa = data ? data.CompletedDesa : null;
        }

    }

    export interface IBaseNationalAddRecapitulation {
        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        Dbh: number;
        Dau: number;
        Dak: number;
        Add: number;
        TotalDesa: number;
        CompletedDesa: number;
    }

    export class BaseNationalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        Dbh: number;
        Dau: number;
        Dak: number;
        Add: number;
        TotalDesa: number;
        CompletedDesa: number;

        constructor(data?: IBaseNationalAddRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.Dbh = data ? data.Dbh : null;
            this.Dau = data ? data.Dau : null;
            this.Dak = data ? data.Dak : null;
            this.Add = data ? data.Add : null;
            this.TotalDesa = data ? data.TotalDesa : null;
            this.CompletedDesa = data ? data.CompletedDesa : null;
        }

    }

    export interface IBaseNationalBhprRecapitulation {
        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        RegionalTax: number;
        RegionalRetribution: number;
        Bhpr: number;
        TotalDesa: number;
        CompletedDesa: number;
    }

    export class BaseNationalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        RegionalTax: number;
        RegionalRetribution: number;
        Bhpr: number;
        TotalDesa: number;
        CompletedDesa: number;

        constructor(data?: IBaseNationalBhprRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.RegionalTax = data ? data.RegionalTax : null;
            this.RegionalRetribution = data ? data.RegionalRetribution : null;
            this.Bhpr = data ? data.Bhpr : null;
            this.TotalDesa = data ? data.TotalDesa : null;
            this.CompletedDesa = data ? data.CompletedDesa : null;
        }

    }

    export interface IBaseNationalDdRecapitulation {
        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        RegionalTransfer: number;
        Dd: number;
        TotalDesa: number;
        CompletedDesa: number;
    }

    export class BaseNationalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ApbnKey: string;
        RegionName: string;
        ParentRegionId: string;
        RegionalTransfer: number;
        Dd: number;
        TotalDesa: number;
        CompletedDesa: number;

        constructor(data?: IBaseNationalDdRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.RegionalTransfer = data ? data.RegionalTransfer : null;
            this.Dd = data ? data.Dd : null;
            this.TotalDesa = data ? data.TotalDesa : null;
            this.CompletedDesa = data ? data.CompletedDesa : null;
        }

    }

    export interface IBaseRegionalAddRecapitulation {
        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Add: number;
    }

    export class BaseRegionalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Add: number;

        constructor(data?: IBaseRegionalAddRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Population = data ? data.Population : null;
            this.PopulationRatio = data ? data.PopulationRatio : null;
            this.PopulationWeight = data ? data.PopulationWeight : null;
            this.PoorPopulation = data ? data.PoorPopulation : null;
            this.PoorPopulationRatio = data ? data.PoorPopulationRatio : null;
            this.PoorPopulationWeight = data ? data.PoorPopulationWeight : null;
            this.Area = data ? data.Area : null;
            this.AreaRatio = data ? data.AreaRatio : null;
            this.AreaWeight = data ? data.AreaWeight : null;
            this.Ikg = data ? data.Ikg : null;
            this.IkgRatio = data ? data.IkgRatio : null;
            this.IkgWeight = data ? data.IkgWeight : null;
            this.TotalWeight = data ? data.TotalWeight : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Add = data ? data.Add : null;
        }

    }

    export interface IBaseRegionalBhprRecapitulation {
        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Pdrd: number;
        PdrdRatio: number;
        FormulaBasedAllocation: number;
        Bhpr: number;
    }

    export class BaseRegionalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Pdrd: number;
        PdrdRatio: number;
        FormulaBasedAllocation: number;
        Bhpr: number;

        constructor(data?: IBaseRegionalBhprRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Pdrd = data ? data.Pdrd : null;
            this.PdrdRatio = data ? data.PdrdRatio : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Bhpr = data ? data.Bhpr : null;
        }

    }

    export interface IBaseRegionalDdRecapitulation {
        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Dd: number;
    }

    export class BaseRegionalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ParentRegionId: string;
        ApbnKey: string;
        RegionName: string;
        BaseAllocation: number;
        Population: number;
        PopulationRatio: number;
        PopulationWeight: number;
        PoorPopulation: number;
        PoorPopulationRatio: number;
        PoorPopulationWeight: number;
        Area: number;
        AreaRatio: number;
        AreaWeight: number;
        Ikg: number;
        IkgRatio: number;
        IkgWeight: number;
        TotalWeight: number;
        FormulaBasedAllocation: number;
        Dd: number;

        constructor(data?: IBaseRegionalDdRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.RegionName = data ? data.RegionName : null;
            this.BaseAllocation = data ? data.BaseAllocation : null;
            this.Population = data ? data.Population : null;
            this.PopulationRatio = data ? data.PopulationRatio : null;
            this.PopulationWeight = data ? data.PopulationWeight : null;
            this.PoorPopulation = data ? data.PoorPopulation : null;
            this.PoorPopulationRatio = data ? data.PoorPopulationRatio : null;
            this.PoorPopulationWeight = data ? data.PoorPopulationWeight : null;
            this.Area = data ? data.Area : null;
            this.AreaRatio = data ? data.AreaRatio : null;
            this.AreaWeight = data ? data.AreaWeight : null;
            this.Ikg = data ? data.Ikg : null;
            this.IkgRatio = data ? data.IkgRatio : null;
            this.IkgWeight = data ? data.IkgWeight : null;
            this.TotalWeight = data ? data.TotalWeight : null;
            this.FormulaBasedAllocation = data ? data.FormulaBasedAllocation : null;
            this.Dd = data ? data.Dd : null;
        }

    }

    export interface IBaseTransferRecapitulation {
        Id: string;
        RegionId: string;
        ApbnId: number;
        ApbnKey: string;
        ParentRegionId: string;
        RegionName: string;
        BudgetedDd: number;
        TransferredDd: number;
        BudgetedAdd: number;
        TransferredAdd: number;
        BudgetedBhpr: number;
        TransferredBhpr: number;
    }

    export class BaseTransferRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        Id: string;
        RegionId: string;
        ApbnId: number;
        ApbnKey: string;
        ParentRegionId: string;
        RegionName: string;
        BudgetedDd: number;
        TransferredDd: number;
        BudgetedAdd: number;
        TransferredAdd: number;
        BudgetedBhpr: number;
        TransferredBhpr: number;

        constructor(data?: IBaseTransferRecapitulation) {
            this.Id = data ? data.Id : null;
            this.RegionId = data ? data.RegionId : null;
            this.ApbnId = data ? data.ApbnId : null;
            this.ApbnKey = data ? data.ApbnKey : null;
            this.ParentRegionId = data ? data.ParentRegionId : null;
            this.RegionName = data ? data.RegionName : null;
            this.BudgetedDd = data ? data.BudgetedDd : null;
            this.TransferredDd = data ? data.TransferredDd : null;
            this.BudgetedAdd = data ? data.BudgetedAdd : null;
            this.TransferredAdd = data ? data.TransferredAdd : null;
            this.BudgetedBhpr = data ? data.BudgetedBhpr : null;
            this.TransferredBhpr = data ? data.TransferredBhpr : null;
        }

    }

    export interface IAccountRecapitulation extends IBaseAccountRecapitulation {
    }

    export class AccountRecapitulation extends BaseAccountRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IAccountRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenAccountRecapitulation extends IBaseAccountRecapitulation {
    }

    export class FrozenAccountRecapitulation extends BaseAccountRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenAccountRecapitulation) {
            super(data);
        }

    }

    export interface INationalAddRecapitulation extends IBaseNationalAddRecapitulation {
    }

    export class NationalAddRecapitulation extends BaseNationalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: INationalAddRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenNationalAddRecapitulation extends IBaseNationalAddRecapitulation {
    }

    export class FrozenNationalAddRecapitulation extends BaseNationalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenNationalAddRecapitulation) {
            super(data);
        }

    }

    export interface INationalBhprRecapitulation extends IBaseNationalBhprRecapitulation {
    }

    export class NationalBhprRecapitulation extends BaseNationalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: INationalBhprRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenNationalBhprRecapitulation extends IBaseNationalBhprRecapitulation {
    }

    export class FrozenNationalBhprRecapitulation extends BaseNationalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenNationalBhprRecapitulation) {
            super(data);
        }

    }

    export interface INationalDdRecapitulation extends IBaseNationalDdRecapitulation {
    }

    export class NationalDdRecapitulation extends BaseNationalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: INationalDdRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenNationalDdRecapitulation extends IBaseNationalDdRecapitulation {
    }

    export class FrozenNationalDdRecapitulation extends BaseNationalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenNationalDdRecapitulation) {
            super(data);
        }

    }

    export interface IRegionalAddRecapitulation extends IBaseRegionalAddRecapitulation {
    }

    export class RegionalAddRecapitulation extends BaseRegionalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IRegionalAddRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenRegionalAddRecapitulation extends IBaseRegionalAddRecapitulation {
    }

    export class FrozenRegionalAddRecapitulation extends BaseRegionalAddRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenRegionalAddRecapitulation) {
            super(data);
        }

    }

    export interface IRegionalBhprRecapitulation extends IBaseRegionalBhprRecapitulation {
    }

    export class RegionalBhprRecapitulation extends BaseRegionalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IRegionalBhprRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenRegionalBhprRecapitulation extends IBaseRegionalBhprRecapitulation {
    }

    export class FrozenRegionalBhprRecapitulation extends BaseRegionalBhprRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenRegionalBhprRecapitulation) {
            super(data);
        }

    }

    export interface IRegionalDdRecapitulation extends IBaseRegionalDdRecapitulation {
    }

    export class RegionalDdRecapitulation extends BaseRegionalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IRegionalDdRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenRegionalDdRecapitulation extends IBaseRegionalDdRecapitulation {
    }

    export class FrozenRegionalDdRecapitulation extends BaseRegionalDdRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenRegionalDdRecapitulation) {
            super(data);
        }

    }

    export interface ITransferRecapitulation extends IBaseTransferRecapitulation {
    }

    export class TransferRecapitulation extends BaseTransferRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: ITransferRecapitulation) {
            super(data);
        }

    }

    export interface IFrozenTransferRecapitulation extends IBaseTransferRecapitulation {
    }

    export class FrozenTransferRecapitulation extends BaseTransferRecapitulation {
        public static ajaxSettings = new Scaffold.AjaxSettings();

        constructor(data?: IFrozenTransferRecapitulation) {
            super(data);
        }

    }

}


text:
Along with running in a Kubernetes, ztunnel can be run locally for development purposes.

This doc covers ztunnel specifically, for general Istio local development see
[Local Istio Development](https://github.com/howardjohn/local-istio-development).

## Workloads

A local file can configure workloads: `LOCAL_XDS_PATH=./examples/localhost.yaml cargo run`.

This example adds a workload for `127.0.0.1`, allowing us to send requests to/from localhost.

## Authentication

Ztunnel authentication for CA requires a pod-bound Service Account token.
This makes local running a bit more complex than normally.

First, you must have at least 1 ztunnel pod running.
See the [instructions](https://github.com/istio/istio/blob/experimental-ambient/CONTRIBUTING.md)
for deploying a ztunnel.

Then the below command will fetch a token:

```shell
source ./scripts/local.sh
ztunnel-local-bootstrap
```

## XDS and CA

While XDS is not a hard requirement due to the static config file, the CA is.
When running locally, ztunnel will automatically connect to an Istiod running on localhost.

Istiod can be run locally as simply as `go run ./pilot/cmd/pilot-discovery discovery`.

## Sending requests

Ztunnel expects requests to be redirected with iptables. The following functions can help do this:

* `redirect-user-setup` sets up a new user specified by `$ZTUNNEL_REDIRECT_USER`
* `redirect-to <port>` redirects all traffic from `$ZTUNNEL_REDIRECT_USER` to the given port.
* `redirect-to-clean` removes any iptables rules setup by `redirect-to`
* `redirect-run <cmd>` runs the command as `$ZTUNNEL_REDIRECT_USER`.

To setup redirection logic for all requests from the `iptables1` user to 15001:

```shell
source ./scripts/local.sh
export ZTUNNEL_REDIRECT_USER="iptables1"
redirect-user-setup
redirect-to 15001
```

Finally, requests can be sent through the ztunnel:

```shell
redirect-run curl localhost:8080
```

In the example request above, the request will go from `curl -> ztunnel (15001) --HBONE--> ztunnel (15008) -> localhost:8080`.

If you wanted the same request to not go over HBONE, you could connect to/from another unknown IP like `127.0.0.2`.

## Configuration

Ztunnel behaves differently for requests to workloads on the same node vs other nodes.
This can be utilized to test different things. For example:

* `LOCAL_XDS_PATH=./examples/localhost.yaml cargo run` - request to localhost will use HBONE
* `LOCAL_XDS_PATH=./examples/localhost.yaml NODE_NAME=local cargo run` - request to localhost will use in-memory fast path

redpajama_set_name: RedPajamaGithub


text:
package thread.sample;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class CallableFutures {

	private static final int NTHREDS = 30;

	public static void main(String[] args) {

		ExecutorService executor = Executors.newFixedThreadPool(NTHREDS);
		List<Future<Long>> list = new ArrayList<Future<Long>>();
		for (int i = 0; i < 3; i++) {
			Callable<Long> worker = new MyCallable();
			Future<Long> submit = executor.submit(worker);
			list.add(submit);
		}
		long sum = 0;
		System.out.println("No of jobs submitted: "+list.size());
		// Now retrieve the result
		for (Future<Long> future : list) {
			try {
				sum += future.get();
			} catch (InterruptedException e) {
				e.printStackTrace();
			} catch (ExecutionException e) {
				e.printStackTrace();
			}
		}
		System.out.println("Total Sum of all the jobs is:"+sum);
		executor.shutdown();
	}
}


text:
ACCEPTED

#### According to
Interim Register of Marine and Nonmarine Genera

#### Published in
Paleontological Research 3: -. [294-302]

#### Original name
null

### Remarks
null


text:
<?php defined('APPLICATION') or die();
/**
 * Sample implementation of a theme hooks class to show
 * the use of custom Smarty plugins.
 */
class SanmyakuThemeHooks implements Gdn_IPlugin
{
    /**
     * Setup function is needed for this class, so don't delete it!
     *
     * @return bool Dummy return value.
     */
    public function setup()
    {
      // Set some config settings for a table layout & mobile theme
      saveToConfig(array(
          'Vanilla.Discussions.Layout' => 'modern',
          'Vanilla.Categories.Layout' => 'modern',
          'Garden.MobileTheme' => 'sanmyaku'
      ), null, true);
      return true;
    }
    /**
     * This function hooks the Smarty init to add our directory
     * containing our custom Smarty functions
     *
     * @param object $sender Smarty object.
     * @return void
     */
    public function gdn_smarty_init_handler($sender)
    {
        $sender->addPluginsDir(__DIR__.'/SmartyPlugins');
    }
}


text:
process.env.NODE_ENV = 'test';
const connectionString = process.env.DATABASE_URL || 'postgres://localhost:5432/communityhack_test';

var chai = require('chai');
var chaiHttp = require('chai-http');
var server = require('../server/app');
const pg = require('pg');

var should = chai.should();
chai.use(chaiHttp);

describe('API:users', function() {

  pg.connect(connectionString, (err, client, done) => {
    // Handle connection errors
    if(err) {
      done();
      console.log(err);
      return res.status(500).json({success: false, data: err});
    }
    // SQL Query > Insert Data
    client.query('DELETE FROM "users";', (err) => {
      done();
    });
  });

  beforeEach((done) => {
    pg.connect(connectionString, (err, client) => {
      // Handle connection errors
      if(err) {
        done();
        console.log(err);
        return res.status(500).json({success: false, data: err});
      }
      // SQL Query > Insert Data
      client.query(
        'INSERT INTO users ("firstName", "lastName", "email", "year") \
        VALUES ($1, $2, $3, $4);', ["Zhanwen", "Chen", "zhchen@vassar.edu", 2016]
        , (err) => { done(); });
    });
  });

  afterEach((done) => {
    pg.connect(connectionString, (err, client) => {
      // Handle connection errors
      if(err) {
        done();
        console.log(err);
        return res.status(500).json({success: false, data: err});
      }

      client.query('DELETE FROM "users" ;', (err) => { done(); });
    });
  });

  it('should list ALL users on /api/v1/users GET', (done) => {
    chai.request(server)
      .get('/api/v1/users')
      .end(function(err, res){
        res.should.have.status(200);
        res.should.be.json;
        res.body.should.be.a('array');
        // console.log("res.body[0] is %j", res.body[0]);
        res.body[0].should.have.property('firstName');
        res.body[0].should.have.property('lastName');
        res.body[0].firstName.should.equal('Zhanwen');
        res.body[0].lastName.should.equal('Chen');
        done();
    });
  });

  it('should list a SINGLE user on /api/v1/user/:userId GET', function(done) {
    pg.connect(connectionString, (err, client) => {
      // Handle connection errors
      if(err) {
        done();
        console.log(err);
        return res.status(500).json({success: false, data: err});
      }
      // SQL Query > Insert Data
      client.query(
        'INSERT INTO users \
          ("firstName", "lastName", "email", "year") \
        VALUES \
          ($1, $2, $3, $4) \
        RETURNING "userId";'
        , ["Ada", "Lovelace", "adlovelace@vassar.edu", 1877]
        , function(err, result) {
          // console.log("result is %j", result);
          // console.log("result.rows is %j", result.rows[0].userId);
          newUserId = result.rows[0].userId;
          chai.request(server)
            .get('/api/v1/user/'+newUserId)
            .end(function(err, res){
              res.should.have.status(200);
              res.should.be.json;
              res.body.should.be.a('object');
              res.body.should.have.property('firstName');
              res.body.should.have.property('lastName');
              res.body.firstName.should.equal('Ada');
              res.body.lastName.should.equal('Lovelace');
              done();
          });
      });
    });
  });

  it('should update a SINGLE user on /api/v1/user/:userId PUT', (done) => {
    pg.connect(connectionString, (err, client) => {
      // Handle connection errors
      if(err) {
        done();
        console.log(err);
        return res.status(500).json({success: false, data: err});
      }
      // SQL Query > Insert Data
      client.query(
        'UPDATE "users" SET \
          "firstName" = ($1), \
          "lastName" = ($2),  \
          "email" = ($3), \
          "year" = ($4), \
        WHERE "email" = ($3), \
        RETURNING "userId" \
        ;'
        , ["Zhanwen", "Chen", "zhchen@vassar.edu", 2017]
        , function(err, result) {
          // console.log("result is %j", result);
          // console.log("result.rows is %j", result.rows[0].userId);
          newUserId = result.rows[0].userId;
          chai.request(server)
            .get('/api/v1/user/'+newUserId)
            .end(function(err, res){
              res.should.have.status(200);
              res.should.be.json;
              res.body.should.be.a('object');
              res.body.should.have.property('firstName');
              res.body.should.have.property('lastName');
              res.body.firstName.should.equal('Zhanwen');
              res.body.lastName.should.equal('Chen');
              res.body.year.should.equal(2017);
              done();
          });
      });
    });

  });
  it('should delete a SINGLE user on /api/v1/user/:userId DELETE');
});


text:
namespace RentahuntApp.Migrations
{
    using System.CodeDom.Compiler;
    using System.Data.Entity.Migrations;
    using System.Data.Entity.Migrations.Infrastructure;
    using System.Resources;

    [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
    public sealed partial class addingbookingmodel : IMigrationMetadata
    {
        private readonly ResourceManager Resources = new ResourceManager(typeof(addingbookingmodel));

        string IMigrationMetadata.Id
        {
            get { return "201705251635255_adding booking model"; }
        }

        string IMigrationMetadata.Source
        {
            get { return null; }
        }

        string IMigrationMetadata.Target
        {
            get { return Resources.GetString("Target"); }
        }
    }
}


text:
App Name: Album Radio
Name: Thomas Matelich
Company: Personal development / open source
Website: twitter.com/matelich
Short description: The Album Radio app gives users radio functionality while having the full album experience.

I enjoy listening to entire albums as artists often have an overarching theme to their
album and my favorite songs don't tend to be those that are the released tracks.  I've always had to append
albums to playlists manually, using related artist recommendations from Spotify or Last.fm.  The app has two
primary functions, adding whole albums to the end of a playlist and deleting played songs from the beginning.  The rest is gravy.

[Mock-ups and attached descriptions go here. E.g. explanation of the navigation and the interaction with the app.]


text:
module Rubinius
module FFI::Platform::File
  SEPARATOR = '/'
  ALT_SEPARATOR = nil
  PATH_SEPARATOR = ':'
end
end


text:
Flash firmware onto an avr device running a bootloader that speaks the [avr109](http://www.atmel.com/images/doc1644.pdf) protocol.

## install

`npm install chip.avr.avr109`

## use

```javascript
var avr109 = require('chip.avr.avr109');
var serialport = require('serialport');
var sp = new serialport.SerialPort('/dev/tty.usbmodemfd121');
var fs = require('fs');

sp.on('open', function() {
  fs.readFile(__dirname + '/test.hex', function(err, data) {

    avr109.init(sp, { signature: 'LUFACDC' }, function (err, flasher) {
      if (err) {
        throw err;
      }
      flasher.erase(function() {
        console.log('initialized');

        flasher.program(data.toString(), function(err) {
          if (err) throw err;
          console.log('programmed!');

          flasher.verify(function(err) {
            if (err) {
              throw err
            }
            flasher.fuseCheck(function(err) {
              if (err) throw err;
              console.log('OK!');
            });
          });
        });
      });
    });
  });
});
```

## license

[MIT](LICENSE.txt)


text:
/**
 * \file
 * \brief The table validator implementation file
 *
 * This file handles table validator implementations.
 */
#include "table_defs.h"

/**
 * \brief Determine if a column is valid
 * \param t The table to be examined
 * \param col The column number
 * \return TRUE or FALSE
 */
int table_column_is_valid(const table *t, int col)
{
  int retval = 0;

  if(t)
  {
    int column_length = table_get_column_length(t);

    if(col >= 0 && col < column_length)
      retval = 1;
  }

  return retval;
}

/**
 * \brief Determine if a row is valid
 * \param t The table to be examined
 * \param row The row number
 * \return TRUE or FALSE
 */
int table_row_is_valid(const table *t, int row)
{
  int retval = 0;

  if(t)
  {
    int row_length = table_get_row_length(t);

    if(row >= 0 && row < row_length)
      retval = 1;
  }

  return retval;
}

/**
 * \brief Determine if a cell is valid
 * \param t The table to be examined
 * \param row The row number
 * \param col The column number
 * \return TRUE or FALSE
 */
int table_cell_is_valid(const table *t, int row, int col)
{
  return table_column_is_valid(t, col) && table_row_is_valid(t, row) ? 1 : 0;
}

/**
 * \brief Determine if a cell has a value
 * \param t The table to be examined
 * \param row The row number
 * \param col The column number
 * \return TRUE or FALSE
 */
int table_cell_has_value(const table *t, int row, int col)
{
  table_cell* cell = table_get_cell_ptr(t, row, col);
  int retval = 0;

  if(cell)
    if(cell->value)
      retval = 1;

  return retval;
}


text:
import { freeGlobal, moduleExports } from "../helper/consts";
import { tags, getTag, isTypedArrayMap } from "../helper/tags";
import { getIteratorFn } from "../helper/IterableUtils";
import { isEnvNode, root } from "../helper/consts";
import { getDocument } from "../window";
import { hasOwn, nativeIsFinite } from "./helper/consts";
import getPrototype from "./helper/getPrototype";
import has from "./has";
import motaType from "./type";

var isFunc = function( obj ) {
  return typeof obj == "function" || false;
};

// Work around an IE 11 bug
// Work around a Safari 8 bug: `typeof Int8Array` returns "object"
if ( typeof /./ == "function" || typeof Int8Array == "object" ) {
  isFunc = function( obj ) {
    return motaType( obj ) === "function";
  };
}

export var isFunction = isFunc;

export function isArguments( obj ) {
  return getTag( obj ) === tags.Arguments;
}

export var isArray = Array.isArray;

var MAX_SAFE_INTEGER = Math.pow( 2, 53 ) - 1;

export function isArrayLike( obj ) {

  var length;

  if ( isArray( obj ) ) {
    return true;
  }

  if ( !isObjectLike( obj ) || isFunction( obj ) || isWindow( obj ) ) {
    return false;
  }

  // Ref: http://stackoverflow.com/questions/28155841/misterious-failure-of-jquery-each-and-underscore-each-on-ios
  length = "length" in obj && obj.length;

  return typeof length == "number" && length > -1 && length % 1 == 0 && length <= MAX_SAFE_INTEGER;

}

export function isBoolean( obj ) {
  return obj === true || obj === false || motaType( obj ) === "boolean";
}

var BUFFER = moduleExports ? freeGlobal.Buffer : undefined;
var nativeIsBuffer = BUFFER ? BUFFER.isBuffer : undefined;

export var isBuffer = nativeIsBuffer || function() {
  return false;
};

export function isDate( obj ) {
  return motaType( obj ) === "date";
}

var strDoc = "[object HTMLDocument]";
var strDoc2 = "[object Document]";

export function isDocument( obj ) {

  var defaultView, doc = getDocument();

  if ( doc && obj === doc ) {
    return true;
  }

  if ( !obj || obj.parentNode !== null || !( defaultView = obj.defaultView ) ) {
    return false;
  }

  // The server side should be safe
  // but with the browser, we need to check the [[Class]] name

  if ( isEnvNode ) {
    return isWindow( defaultView );
  }

  var className = getTag( obj );
  return className === strDoc || className === strDoc2;

}

export function isElement( obj ) {
  return !!obj && obj.nodeType === 1 && typeof obj == "object" && !isPlainObject( obj );
}

export function isEmpty( obj ) {
  if ( obj == null ) {
    return true;
  }
  if ( isArray( obj ) || isString( obj ) || isArguments( obj ) ) {
    return obj.length === 0;
  }
  for ( var key in obj ) {
    if ( has( obj, key ) ) {
      return false;
    }
  }
  return true;
}

export function isError( obj ) {
  return motaType( obj ) === "error";
}

export function motaIsFinite( obj ) {
  return isNumber( obj ) && nativeIsFinite( obj );
}

export function isIterable( obj ) {
  return isArray( obj ) || (
      !!obj && isFunction( getIteratorFn( obj ) )
    );
}

export function isIndexed( obj ) {
  return isArray( obj ) || ( // It seems that [].values doesn't exist in some places
      !!obj && obj.values !== obj.keys &&
      isFunction( obj.values ) && isFunction( obj.keys ) &&
      obj.values === getIteratorFn( obj )
    );
}

export function isKeyed( obj ) {
  return !!obj && isFunction( obj.entries ) && obj.entries === getIteratorFn( obj );
}

export function isAssociative( obj ) {
  return isIndexed( obj ) || isKeyed( obj );
}

export function motaIsNaN( obj ) {
  /* eslint eqeqeq: 0 */
  return isNumber( obj ) && obj != +obj;
}

export function isNil( obj ) {
  return obj == null;
}

export function isNull( obj ) {
  return obj === null;
}

export function isNumber( obj ) {
  return motaType( obj ) === "number";
}

export function isObject( obj ) {
  return motaType( obj ) === "object";
}

export function isObjectLike( obj ) {
  var type;
  return !!obj && ( ( type = typeof obj ) === "function" || type === "object" );
}

var funcToString = Function.prototype.toString;
var objectCtorString = funcToString.call( Object );

export function isPlainObject( obj ) {

  var proto, Ctor;

  if ( !isObject( obj ) ) {
    return false;
  }

  proto = getPrototype( obj );

  if ( proto === null ) {
    return true;
  }

  Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;

  return (
    typeof Ctor == "function" &&
    Ctor instanceof Ctor &&
    funcToString.call( Ctor ) === objectCtorString
  );

}

export function isRegExp( obj ) {
  return motaType( obj ) === "regexp";
}

export function isString( obj ) {
  return motaType( obj ) === "string";
}

export function isSymbol( obj ) {
  return motaType( obj ) === "symbol";
}

export function isTypedArray( obj ) {
  return typeof obj == "object" && typeof obj.length == "number" && !!isTypedArrayMap[ getTag( obj ) ];
}

export function isUndefined( obj ) {
  return obj === undefined;
}

var strWin = "[object Window]";
var strWin2 = "[object global]"; // Chrome & Opera (and Safari?) + Node

export function isWindow( obj ) {

  if ( obj === root ) {
    return true;
  }

  if ( !obj || typeof obj !== "object" ) {
    return false;
  }

  if ( !isEnvNode && obj.window !== obj ) {
    return false;
  }

  var className = getTag( obj );

  return className === strWin || className === strWin2;

}


text:
<?php

namespace app\modules\user\models;

use Yii;
use yii\db\ActiveRecord;
use yii\rbac\Item;
/**
 * This is the model class for table "tbl_role".
 *
 * @property integer $id
 * @property string  $name
 * @property string  $create_time
 * @property string  $update_time
 * @property integer $can_admin
 *
 * @property User[]  $users
 */
class Role extends ActiveRecord
{
    /**
     * @var int Admin user role
     */
    const ROLE_ADMIN = 1;

    /**
     * @var int Default user role
     */
    const ROLE_USER = 2;

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return "{{%AuthItem}}";
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            //            [['create_time', 'update_time'], 'safe'],
            [['type'], 'integer'],
            [['name'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'name'        => Yii::t('user', 'Name'),
            'created_at' => Yii::t('user', 'Create Time'),
            'updated_at' => Yii::t('user', 'Update Time'),
        ];
    }

    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            'timestamp' => [
                'class'      => 'yii\behaviors\TimestampBehavior',
                'value'      => function () { return time(); },
                'attributes' => [
                    ActiveRecord::EVENT_BEFORE_INSERT => 'created_at',
                    ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at',
                ],
            ],
        ];
    }

    /**
     * Check permission
     *
     * @param string $permission
     * @return bool
     */
    public function checkPermission($permission)
    {
        $roleAttribute = "can_{$permission}";
        return $this->$roleAttribute ? true : false;
    }

    /**
     * Get list of roles for creating dropdowns
     *
     * @return array
     */
    public static function dropdown()
    {
        // get and cache data
        static $dropdown;
        if ($dropdown === null) {

            // get all records from database and generate
            $models = static::find()->where(["type"=>Item::TYPE_ROLE])->all();

            foreach ($models as $model) {
                $dropdown[$model->name] = $model->name;
            }
        }

        return $dropdown;
    }
}


text:
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Cesto.Tests")]
[assembly: AssemblyDescription("Unit tests for Cesto")]
[assembly: AssemblyProduct("Cesto")]
[assembly: AssemblyCopyright("Copyright © John Jeffery")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("a47198d8-6427-4f51-b720-1fb3092f3924")]


text:
package hu.greencode.spring.demo.greeting;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@ResponseBody
@RequestMapping(value = "/greeting")
public class GreetingController {

    @RequestMapping("/hello")
    public String helloWorld() {
        return "hello world";
    }

    @RequestMapping("/hello/{name}")
    public String helloName(@PathVariable String name) {
        return "hello " + name;
    }

    // http://localhost:8080/greeting/hello-url?name=John
    @RequestMapping("/hello-url")
    public String helloGetParameter(@RequestParam String name) {
        return "hello " + name;
    }

    // Download the Rest Client extension to your browser and send a request body to the url below
    @RequestMapping("/hello-hostname")
    public String helloHostName(@RequestHeader(value = "Host") String host) {
        return "hello " + host;
    }

    @RequestMapping("/hello-body")
    public String helloBody(@RequestBody String body) {
        return "hello " + body;
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.reindiegames</groupId>
    <artifactId>ReLib</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>


text:
[![Build Status](https://travis-ci.org/locaweb/heartcheck-sidekiq.svg)](https://travis-ci.org/locaweb/heartcheck-sidekiq)
[![Code Climate](https://codeclimate.com/github/locaweb/heartcheck-sidekiq/badges/gpa.svg)](https://codeclimate.com/github/locaweb/heartcheck-sidekiq)
[![Ebert](https://ebertapp.io/github/locaweb/heartcheck-sidekiq.svg)](https://ebertapp.io/github/locaweb/heartcheck-sidekiq)

##A plugin to check sidekiq connection with [heartcheck](https://github.com/locaweb/heartcheck).

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'heartcheck-sidekiq'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install heartcheck-sidekiq

## Usage

You can check any sidekiq connection that there's in your app.

```ruby
Heartcheck.setup do |config|
  config.add :sidekiq do |c|
    c.name = 'redis'
  end
end
```
### Check Heartcheck example [here](https://github.com/locaweb/heartcheck/blob/master/lib/heartcheck/generators/templates/config.rb)

## License
* [MIT License](https://github.com/locaweb/heartcheck-sidekiq/blob/master/LICENSE.txt)

## Contributing

1. Fork it ( https://github.com/locaweb/heartcheck-sidekiq/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

In order to make it easier for your development, we added a docker dev environment
so that you don't need to install ruby and it's dependencies via rbenv or rvm.

Just do your setup locally by running:

```
./scripts/heartcheck setup
```

Run `./scripts/heartcheck -h` to see options available


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29671_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans20.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">March 9, 2015

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">North Dakota Mineral Resources Survey Certification Sheet
Company: Continental Resources, Inc. Well: Thronson Federal 6
Well Number: 21H—2
Location: Mountrail County, ND
Job Number: DDMT-141043

    <p class="styleSans27.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Well API# 33-061-03353
Attached please find the original surveys performed on the above referenced well by MS Energy Services. The data is true, correct, complete and within the limitations of the tool as set forth by MS Energy
Services. I am authorized and qualified to make this report and it conforms to the principles and procedures as set forth by MS Energy Services. The surveys were performed as listed below.
______________________.____———————-——-
Name of Surveyor Drain hole No. Surveyed Depths Dates Performed Surve Joseph Ryan Original Wellbore 1,844' — 26,039' MD 11/28/2014 to 12/22/2014 MWD

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">If any other information is required, please contact the undersigned at the letterhead address and telephone number.
Sincerely,
Am er Greer MWD Operations Office Administrator
Attachments
______________________________._—————-——————————-~—
MS Directional | M5 Guidance 1 MS Survey | MS Wire-line

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">7821 Will Rogers BIvd. Fort Worth, Texas 76140
817.568.1038 (office) 817.568.1499 (fax)
www.msenergyservices.com


text:
		{%= no_result_message %}

        	{%= frappe.messages.get_waiting_message(__("Loading") + "..." ) %}

					<button type="button" class="btn btn-default btn-sm btn-info" data-value="20">20</button>
					<button type="button" class="btn btn-default btn-sm" data-value="100">100</button>
					<button type="button" class="btn btn-default btn-sm" data-value="500">500</button>

				<button class="btn btn-default btn-more btn-sm">{%= _more %}...</button>


text:
/*
java implementation of the s3eApsalar extension.

Add android-specific functionality here.

These functions are called via JNI from native code.
*/
/*
 * NOTE: This file was originally written by the extension builder, but will not
 * be overwritten (unless --force is specified) and is intended to be modified.
 */
import com.ideaworks3d.marmalade.LoaderAPI;
import com.ideaworks3d.marmalade.LoaderActivity;
import com.apsalar.sdk.Apsalar;
import org.json.JSONObject;
import org.json.JSONException;
import android.util.Log;

class s3eApsalar
{
	private static final String TAG = "APSALAR";

    public void s3eApStart(String apiKey, String apiSecret)
    {
		Log.v(TAG, "Session Start");
        Apsalar.startSession(LoaderActivity.m_Activity, apiKey, apiSecret);
    }
    public void s3eApRestart(String apiKey, String apiSecret)
    {
		Log.v(TAG, "Session ReStart");
        Apsalar.restartSession(LoaderActivity.m_Activity, apiKey, apiSecret);
    }
    public boolean s3eApStarted()
    {
        return !"None".equals(Apsalar.getSessionId());
    }
    public void s3eApEnd()
    {
    }
    public void s3eApLogEvent(String name)
    {
        Apsalar.event(name);
    }
    public JSONObject s3eApDictCreate()
    {
        return new JSONObject();
    }
    public void s3eApDictAddString(JSONObject dict, String key, String value)
    {
		try {
			dict.put(key, value);
		} catch(JSONException e) {
			Log.v(TAG, "JSONException in s3eApDictAddString");
		}
    }
    public void s3eApDictAddInt(JSONObject dict, String key, int value)
    {
        try {
			dict.put(key, value);
		} catch(JSONException e) {
			Log.v(TAG, "JSONException in s3eApDictAddInt");
		}
    }
    public void s3eApDictAddFloat(JSONObject dict, String key, float value)
    {
        try {
			dict.put(key, value);
		} catch(JSONException e) {
			Log.v(TAG, "JSONException in s3eApDictAddFloat");
		}
    }
    public void s3eApDictAddDict(JSONObject dict, String key, JSONObject value)
    {
        try {
			dict.put(key, value);
		} catch(JSONException e) {
			Log.v(TAG, "JSONException in s3eApDictAddDict");
		}
    }
    public void s3eApLogEventWithArgs(String name, JSONObject dict)
    {
        Apsalar.eventJSON(name, dict);
    }
	public void s3eApSetFBAppId(String appId)
    {
        Apsalar.setFBAppId(appId);
    }
}


text:
<?php

namespace Proxies\__CG__\Acme\EntityBundle\Entity;

/**
 * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
 */
class MessagesWeb extends \Acme\EntityBundle\Entity\MessagesWeb implements \Doctrine\ORM\Proxy\Proxy
{
    private $_entityPersister;
    private $_identifier;
    public $__isInitialized__ = false;
    public function __construct($entityPersister, $identifier)
    {
        $this->_entityPersister = $entityPersister;
        $this->_identifier = $identifier;
    }
    /** @private */
    public function __load()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;

            if (method_exists($this, "__wakeup")) {
                // call this after __isInitialized__to avoid infinite recursion
                // but before loading to emulate what ClassMetadata::newInstance()
                // provides.
                $this->__wakeup();
            }

            if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            unset($this->_entityPersister, $this->_identifier);
        }
    }

    /** @private */
    public function __isInitialized()
    {
        return $this->__isInitialized__;
    }

    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return (int) $this->_identifier["id"];
        }
        $this->__load();
        return parent::getId();
    }

    public function setSubject($subject)
    {
        $this->__load();
        return parent::setSubject($subject);
    }

    public function getSubject()
    {
        $this->__load();
        return parent::getSubject();
    }

    public function setText($text)
    {
        $this->__load();
        return parent::setText($text);
    }

    public function getText()
    {
        $this->__load();
        return parent::getText();
    }

    public function setSender($sender)
    {
        $this->__load();
        return parent::setSender($sender);
    }

    public function getSender()
    {
        $this->__load();
        return parent::getSender();
    }

    public function setDate($date)
    {
        $this->__load();
        return parent::setDate($date);
    }

    public function getDate()
    {
        $this->__load();
        return parent::getDate();
    }

    public function __sleep()
    {
        return array('__isInitialized__', 'id', 'subject', 'text', 'sender', 'date');
    }

    public function __clone()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;
            $class = $this->_entityPersister->getClassMetadata();
            $original = $this->_entityPersister->load($this->_identifier);
            if ($original === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            foreach ($class->reflFields as $field => $reflProperty) {
                $reflProperty->setValue($this, $reflProperty->getValue($original));
            }
            unset($this->_entityPersister, $this->_identifier);
        }

    }
}


text:
package reactor.core.publisher;

import java.util.Arrays;

import org.junit.Test;
import org.reactivestreams.Publisher;
import reactor.test.subscriber.AssertSubscriber;

public class FluxConcatIterableTest {

	@Test(expected = NullPointerException.class)
	public void arrayNull() {
		Flux.concat((Iterable<? extends Publisher<?>>)null);
	}

	final Publisher<Integer> source = Flux.range(1, 3);

	@Test
	public void normal() {
		AssertSubscriber<Integer> ts = AssertSubscriber.create();

		Flux.concat(Arrays.asList(source, source, source)).subscribe(ts);

		ts.assertValues(1, 2, 3, 1, 2, 3, 1, 2, 3)
		  .assertComplete()
		  .assertNoError();
	}

	@Test
	public void normalBackpressured() {
		AssertSubscriber<Integer> ts = AssertSubscriber.create(0);

		Flux.concat(Arrays.asList(source, source, source)).subscribe(ts);

		ts.assertNoValues()
		  .assertNoError()
		  .assertNotComplete();

		ts.request(1);

		ts.assertValues(1)
		  .assertNoError()
		  .assertNotComplete();

		ts.request(4);

		ts.assertValues(1, 2, 3, 1, 2)
		  .assertNoError()
		  .assertNotComplete();

		ts.request(10);

		ts.assertValues(1, 2, 3, 1, 2, 3, 1, 2, 3)
		  .assertComplete()
		  .assertNoError();
	}

	@Test
	public void oneSourceIsNull() {
		AssertSubscriber<Integer> ts = AssertSubscriber.create();

		Flux.concat(Arrays.asList(source, null, source)).subscribe(ts);

		ts.assertValues(1, 2, 3)
		  .assertNotComplete()
		  .assertError(NullPointerException.class);
	}

	@Test
	public void singleSourceIsNull() {
		AssertSubscriber<Integer> ts = AssertSubscriber.create();

		Flux.concat(Arrays.asList((Publisher<Integer>) null)).subscribe(ts);

		ts.assertNoValues()
		  .assertNotComplete()
		  .assertError(NullPointerException.class);
	}

}