text:
@interface JSQMessagesBubbleImageFactoryTests : XCTestCase

@property (strong, nonatomic) JSQMessagesBubbleImageFactory *factory;

@end

@implementation JSQMessagesBubbleImageFactoryTests

- (void)setUp
{
    [super setUp];
    self.factory = [[JSQMessagesBubbleImageFactory alloc] init];
}

- (void)tearDown
{
    self.factory = nil;
    [super tearDown];
}

- (void)testOutgoingMessageBubbleImageView
{
    UIImage *bubble = [UIImage jsq_bubbleCompactImage];
    XCTAssertNotNil(bubble, @"Bubble image should not be nil");

    CGPoint center = CGPointMake(bubble.size.width / 2.0f, bubble.size.height / 2.0f);
    UIEdgeInsets capInsets = UIEdgeInsetsMake(center.y, center.x, center.y, center.x);

    JSQMessagesBubbleImage *bubbleImage = [self.factory outgoingMessagesBubbleImageWithColor:[UIColor lightGrayColor]];
    XCTAssertNotNil(bubbleImage, @"Bubble image should not be nil");

    XCTAssertNotNil(bubbleImage.messageBubbleImage, "Image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleImage.scale, bubble.scale, @"Image scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleImage.imageOrientation, bubble.imageOrientation, @"Image orientation should equal bubble image orientation");
    XCTAssertTrue(bubbleImage.messageBubbleImage.resizingMode == UIImageResizingModeStretch, @"Image should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleImage.capInsets, capInsets), @"Image capInsets should be equal to capInsets");

    XCTAssertNotNil(bubbleImage.messageBubbleHighlightedImage, @"Highlighted image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.scale, bubble.scale, @"HighlightedImage scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.imageOrientation, bubble.imageOrientation, @"HighlightedImage orientation should equal bubble image orientation");
    XCTAssertTrue(bubbleImage.messageBubbleHighlightedImage.resizingMode == UIImageResizingModeStretch, @"HighlightedImage should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleHighlightedImage.capInsets, capInsets), @"HighlightedImage capInsets should be equal to capInsets");
}

- (void)testIncomingMessageBubbleImageView
{
    UIImage *bubble = [UIImage jsq_bubbleCompactImage];
    XCTAssertNotNil(bubble, @"Bubble image should not be nil");

    CGPoint center = CGPointMake(bubble.size.width / 2.0f, bubble.size.height / 2.0f);
    UIEdgeInsets capInsets = UIEdgeInsetsMake(center.y, center.x, center.y, center.x);

    JSQMessagesBubbleImage *bubbleImage = [self.factory incomingMessagesBubbleImageWithColor:[UIColor lightGrayColor]];
    XCTAssertNotNil(bubbleImage, @"Bubble image should not be nil");

    XCTAssertNotNil(bubbleImage.messageBubbleImage, "Image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleImage.scale, bubble.scale, @"Image scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleImage.imageOrientation, UIImageOrientationUpMirrored, @"Image orientation should be flipped");
    XCTAssertTrue(bubbleImage.messageBubbleImage.resizingMode == UIImageResizingModeStretch, @"Image should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleImage.capInsets, capInsets), @"Image capInsets should be equal to capInsets");

    XCTAssertNotNil(bubbleImage.messageBubbleHighlightedImage, @"Highlighted image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.scale, bubble.scale, @"HighlightedImage scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.imageOrientation, UIImageOrientationUpMirrored, @"Image orientation should be flipped");
    XCTAssertTrue(bubbleImage.messageBubbleHighlightedImage.resizingMode == UIImageResizingModeStretch, @"HighlightedImage should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleHighlightedImage.capInsets, capInsets), @"HighlightedImage capInsets should be equal to capInsets");
}

- (void)testCustomOutgoingMessageBubbleImageView
{
    UIImage *bubble = [UIImage jsq_bubbleRegularStrokedTaillessImage];
    XCTAssertNotNil(bubble, @"Bubble image should not be nil");

    UIEdgeInsets capInsets = UIEdgeInsetsMake(1, 1, 1, 1);
    JSQMessagesBubbleImageFactory *factory = [[JSQMessagesBubbleImageFactory alloc] initWithBubbleImage:bubble capInsets:capInsets];
    JSQMessagesBubbleImage *bubbleImage = [factory outgoingMessagesBubbleImageWithColor:[UIColor lightGrayColor]];
    XCTAssertNotNil(bubbleImage, @"Bubble image should not be nil");

    XCTAssertNotNil(bubbleImage.messageBubbleImage, "Image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleImage.scale, bubble.scale, @"Image scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleImage.imageOrientation, bubble.imageOrientation, @"Image orientation should equal bubble image orientation");
    XCTAssertTrue(bubbleImage.messageBubbleImage.resizingMode == UIImageResizingModeStretch, @"Image should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleImage.capInsets, capInsets), @"Image capInsets should be equal to capInsets");

    XCTAssertNotNil(bubbleImage.messageBubbleHighlightedImage, @"Highlighted image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.scale, bubble.scale, @"HighlightedImage scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.imageOrientation, bubble.imageOrientation, @"HighlightedImage orientation should equal bubble image orientation");
    XCTAssertTrue(bubbleImage.messageBubbleHighlightedImage.resizingMode == UIImageResizingModeStretch, @"HighlightedImage should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleHighlightedImage.capInsets, capInsets), @"HighlightedImage capInsets should be equal to capInsets");
}

- (void)testCustomIncomingMessageBubbleImageView
{
    UIImage *bubble = [UIImage jsq_bubbleRegularStrokedTaillessImage];
    XCTAssertNotNil(bubble, @"Bubble image should not be nil");

    UIEdgeInsets capInsets = UIEdgeInsetsMake(1, 1, 1, 1);
    JSQMessagesBubbleImageFactory *factory = [[JSQMessagesBubbleImageFactory alloc] initWithBubbleImage:bubble capInsets:capInsets];
    JSQMessagesBubbleImage *bubbleImage = [factory incomingMessagesBubbleImageWithColor:[UIColor lightGrayColor]];
    XCTAssertNotNil(bubbleImage, @"Bubble image should not be nil");

    XCTAssertNotNil(bubbleImage.messageBubbleImage, "Image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleImage.scale, bubble.scale, @"Image scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleImage.imageOrientation, UIImageOrientationUpMirrored, @"Image orientation should be flipped");
    XCTAssertTrue(bubbleImage.messageBubbleImage.resizingMode == UIImageResizingModeStretch, @"Image should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleImage.capInsets, capInsets), @"Image capInsets should be equal to capInsets");

    XCTAssertNotNil(bubbleImage.messageBubbleHighlightedImage, @"Highlighted image should not be nil");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.scale, bubble.scale, @"HighlightedImage scale should equal bubble image scale");
    XCTAssertEqual(bubbleImage.messageBubbleHighlightedImage.imageOrientation, UIImageOrientationUpMirrored, @"Image orientation should be flipped");
    XCTAssertTrue(bubbleImage.messageBubbleHighlightedImage.resizingMode == UIImageResizingModeStretch, @"HighlightedImage should be stretchable");
    XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(bubbleImage.messageBubbleHighlightedImage.capInsets, capInsets), @"HighlightedImage capInsets should be equal to capInsets");
}

@end


text:
layout: projects_default
title: "Caterpillar Internship"
nav: projects
box: true
summary: 2 year internship at Caterpillar
---

    I spent 2 years working on various projects at Caterpillar's Pittsburgh Automation Center

    Most of my time at Caterpillar was spent on a team of software engineers creating a next generation human and obstacle detection system for Caterpillar vehicles, using several sensor fusion techniques. There were several key tasks that I accomplished while at Caterpillar, of which three stood out as most important:

            I created a data acquisition and logging unit for the onboard computers on Caterpillar Haul trucks. This data ranged from CAN messages to camera video feeds.

            I was charged with creating a fast and efficient means of human detection using computer vision and machine learning.

            I designed and integrated a hardware/software solution for medium to long range RFID tag reading and displaying on a GUI.

redpajama_set_name: RedPajamaGithub


text:
/// Copyright (c) 2012 Ecma International.  All rights reserved.
/**
 * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js
 * @description Array.prototype.filter throws TypeError if callbackfn is null
 */

function testcase() {

  var arr = new Array(10);
  try {
    arr.filter(null);
  }
  catch(e) {
    if(e instanceof TypeError)
      return true;
  }

 }
runTestCase(testcase);


text:
package ge.edu.freeuni.sdp.arkanoid.presenter;

public abstract class Presenter {
}


text:
      subroutine qrfac(m,n,a,lda,pivot,ipvt,lipvt,rdiag,acnorm,wa)
      integer m,n,lda,lipvt
      integer ipvt(lipvt)
      logical pivot
      double precision a(lda,n),rdiag(n),acnorm(n),wa(n)
c     **********
c
c     subroutine qrfac
c
c     this subroutine uses householder transformations with column
c     pivoting (optional) to compute a qr factorization of the
c     m by n matrix a. that is, qrfac determines an orthogonal
c     matrix q, a permutation matrix p, and an upper trapezoidal
c     matrix r with diagonal elements of nonincreasing magnitude,
c     such that a*p = q*r. the householder transformation for
c     column k, k = 1,2,...,min(m,n), is of the form
c
c                           t
c           i - (1/u(k))*u*u
c
c     where u has zeros in the first k-1 positions. the form of
c     this transformation and the method of pivoting first
c     appeared in the corresponding linpack subroutine.
c
c     the subroutine statement is
c
c       subroutine qrfac(m,n,a,lda,pivot,ipvt,lipvt,rdiag,acnorm,wa)
c
c     where
c
c       m is a positive integer input variable set to the number
c         of rows of a.
c
c       n is a positive integer input variable set to the number
c         of columns of a.
c
c       a is an m by n array. on input a contains the matrix for
c         which the qr factorization is to be computed. on output
c         the strict upper trapezoidal part of a contains the strict
c         upper trapezoidal part of r, and the lower trapezoidal
c         part of a contains a factored form of q (the non-trivial
c         elements of the u vectors described above).
c
c       lda is a positive integer input variable not less than m
c         which specifies the leading dimension of the array a.
c
c       pivot is a logical input variable. if pivot is set true,
c         then column pivoting is enforced. if pivot is set false,
c         then no column pivoting is done.
c
c       ipvt is an integer output array of length lipvt. ipvt
c         defines the permutation matrix p such that a*p = q*r.
c         column j of p is column ipvt(j) of the identity matrix.
c         if pivot is false, ipvt is not referenced.
c
c       lipvt is a positive integer input variable. if pivot is false,
c         then lipvt may be as small as 1. if pivot is true, then
c         lipvt must be at least n.
c
c       rdiag is an output array of length n which contains the
c         diagonal elements of r.
c
c       acnorm is an output array of length n which contains the
c         norms of the corresponding columns of the input matrix a.
c         if this information is not needed, then acnorm can coincide
c         with rdiag.
c
c       wa is a work array of length n. if pivot is false, then wa
c         can coincide with rdiag.
c
c     subprograms called
c
c       minpack-supplied ... dpmpar,enorm
c
c       fortran-supplied ... dmax1,dsqrt,min0
c
c     argonne national laboratory. minpack project. march 1980.
c     burton s. garbow, kenneth e. hillstrom, jorge j. more
c
c     **********
      integer i,j,jp1,k,kmax,minmn
      double precision ajnorm,epsmch,one,p05,sum,temp,zero
      double precision dpmpar,enorm
      data one,p05,zero /1.0d0,5.0d-2,0.0d0/
c
c     epsmch is the machine precision.
c
      epsmch = dpmpar(1)
c
c     compute the initial column norms and initialize several arrays.
c
      do 10 j = 1, n
         acnorm(j) = enorm(m,a(1,j))
         rdiag(j) = acnorm(j)
         wa(j) = rdiag(j)
         if (pivot) ipvt(j) = j
   10    continue
c
c     reduce a to r with householder transformations.
c
      minmn = min0(m,n)
      do 110 j = 1, minmn
         if (.not.pivot) go to 40
c
c        bring the column of largest norm into the pivot position.
c
         kmax = j
         do 20 k = j, n
            if (rdiag(k) .gt. rdiag(kmax)) kmax = k
   20       continue
         if (kmax .eq. j) go to 40
         do 30 i = 1, m
            temp = a(i,j)
            a(i,j) = a(i,kmax)
            a(i,kmax) = temp
   30       continue
         rdiag(kmax) = rdiag(j)
         wa(kmax) = wa(j)
         k = ipvt(j)
         ipvt(j) = ipvt(kmax)
         ipvt(kmax) = k
   40    continue
c
c        compute the householder transformation to reduce the
c        j-th column of a to a multiple of the j-th unit vector.
c
         ajnorm = enorm(m-j+1,a(j,j))
         if (ajnorm .eq. zero) go to 100
         if (a(j,j) .lt. zero) ajnorm = -ajnorm
         do 50 i = j, m
            a(i,j) = a(i,j)/ajnorm
   50       continue
         a(j,j) = a(j,j) + one
c
c        apply the transformation to the remaining columns
c        and update the norms.
c
         jp1 = j + 1
         if (n .lt. jp1) go to 100
         do 90 k = jp1, n
            sum = zero
            do 60 i = j, m
               sum = sum + a(i,j)*a(i,k)
   60          continue
            temp = sum/a(j,j)
            do 70 i = j, m
               a(i,k) = a(i,k) - temp*a(i,j)
   70          continue
            if (.not.pivot .or. rdiag(k) .eq. zero) go to 80
            temp = a(j,k)/rdiag(k)
            rdiag(k) = rdiag(k)*dsqrt(dmax1(zero,one-temp**2))
            if (p05*(rdiag(k)/wa(k))**2 .gt. epsmch) go to 80
            rdiag(k) = enorm(m-j,a(jp1,k))
            wa(k) = rdiag(k)
   80       continue
   90       continue
  100    continue
         rdiag(j) = -ajnorm
  110    continue
      return
c
c     last card of subroutine qrfac.
c
      end


text:
from hardware import generate
from hardware import state

import netaddr
import os
import sys

import argparse
import yaml

_VERSION = "0.0.1"

def _get_yaml_content(path):
    try:
        with open(path, "r") as f:
            return yaml.load(f)
    except (OSError, IOError) as e:
        print("Error: cannot open or read file '%s': %s" % (path, e))
        sys.exit(1)

def collect(config_path):
    # check config directory path
    if not os.path.exists(config_path):
        print("Error: --config-dir='%s' does not exist." % config_path)
        sys.exit(1)

    # get state object
    state_obj = state.State()
    state_obj.load(os.path.join(config_path, 'edeploy') + '/')

    # get global conf
    global_conf = _get_yaml_content("%s/config-tools/global.yml" % config_path)
    # expand keys prefixed by "="
    global_conf["hosts"] = generate.generate_dict(global_conf["hosts"], "=")

    # the virtual configuration of each host
    virt_platform = {"hosts": {}}

    for hostname in global_conf["hosts"]:
        # construct the host virtual configuration
        virt_platform["hosts"][hostname] = state_obj.hardware_info(hostname)

        # add the profile
        virt_platform["hosts"][hostname]["profile"] = \
            global_conf["hosts"][hostname]["profile"]

    # release the lock obtained during the load call
    state_obj.unlock()

    # so far, the nodes are described excepted the install-server
    # the code below adds the install-server from the global conf.
    for hostname in global_conf["hosts"]:
        if global_conf["hosts"][hostname]["profile"] == "install-server":
            # add the admin_network config
            admin_network = global_conf["config"]["admin_network"]
            admin_network = netaddr.IPNetwork(admin_network)
            nics = [{"name": "eth0",
                     "ip": global_conf["hosts"][hostname]["ip"],
                     "network": str(admin_network.network),
                     "netmask": str(admin_network.netmask)}]
            virt_platform["hosts"][hostname]["nics"] = nics
            break

    return virt_platform

def save_virt_platform(virt_platform, output_path):
    output_file_path = os.path.normpath("%s/virt_platform.yml" % output_path)

    try:
        with open(output_file_path, 'w') as outfile:
            outfile.write(yaml.dump(virt_platform, default_flow_style=False))
        print("Virtual platform generated successfully at '%s' !" %
              output_file_path)
    except (OSError, IOError) as e:
        print("Error: cannot write file '%s': %s" % (output_file_path, e))
        sys.exit(1)

def main():
    cli_parser = argparse.ArgumentParser(
        description='Collect architecture information from the edeploy '
        'directory as generated by config-tools/download.sh.')
    cli_parser.add_argument('--config-dir',
                            default="./top/etc",
                            help='The config directory absolute path.')
    cli_parser.add_argument('--output-dir',
                            default="./",
                            help='The output directory of the virtual'
                                 ' configuration.')
    cli_parser.add_argument('--sps-version',
                            required=True,
                            help='The SpinalStack version.')
    cli_arguments = cli_parser.parse_args()

    virt_platform = collect(cli_arguments.config_dir)
    virt_platform["version"] = cli_arguments.sps_version
    save_virt_platform(virt_platform,
                       cli_arguments.output_dir)

if __name__ == '__main__':
    main()


text:
package org.flywaydb.core.internal.util.scanner.classpath.android;

import android.content.Context;
import dalvik.system.DexFile;
import dalvik.system.PathClassLoader;
import org.flywaydb.core.api.FlywayException;
import org.flywaydb.core.api.android.ContextHolder;
import org.flywaydb.core.internal.util.ClassUtils;
import org.flywaydb.core.internal.util.Location;
import org.flywaydb.core.internal.util.logging.Log;
import org.flywaydb.core.internal.util.logging.LogFactory;
import org.flywaydb.core.internal.util.scanner.Resource;
import org.flywaydb.core.internal.util.scanner.classpath.ResourceAndClassScanner;

import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;

/**
 * Class & resource scanner for Android.
 */
public class AndroidScanner implements ResourceAndClassScanner {
    private static final Log LOG = LogFactory.getLog(AndroidScanner.class);

    private final Context context;

    private final PathClassLoader classLoader;

    public AndroidScanner(ClassLoader classLoader) {
        this.classLoader = (PathClassLoader) classLoader;
        context = ContextHolder.getContext();
        if (context == null) {
            throw new FlywayException("Unable to scan for Migrations! Context not set. " +
                    "Within an activity you can fix this with org.flywaydb.core.api.android.ContextHolder.setContext(this);");
        }
    }

    public Resource[] scanForResources(Location location, String prefix, String suffix) throws Exception {
        List<Resource> resources = new ArrayList<Resource>();

        String path = location.getPath();
        for (String asset : context.getAssets().list(path)) {
            if (asset.startsWith(prefix) && asset.endsWith(suffix)
                    && (asset.length() > (prefix + suffix).length())) {
                resources.add(new AndroidResource(context.getAssets(), path, asset));
            } else {
                LOG.debug("Filtering out asset: " + asset);
            }
        }

        return resources.toArray(new Resource[resources.size()]);
    }

    public Class<?>[] scanForClasses(Location location, Class<?> implementedInterface) throws Exception {
        String pkg = location.getPath().replace("/", ".");

        List<Class> classes = new ArrayList<Class>();

        DexFile dex = new DexFile(context.getApplicationInfo().sourceDir);
        Enumeration<String> entries = dex.entries();
        while (entries.hasMoreElements()) {
            String className = entries.nextElement();
            if (className.startsWith(pkg)) {
                Class<?> clazz = classLoader.loadClass(className);
                if (Modifier.isAbstract(clazz.getModifiers())) {
                    LOG.debug("Skipping abstract class: " + className);
                    continue;
                }

                if (!implementedInterface.isAssignableFrom(clazz)) {
                    continue;
                }

                try {
                    ClassUtils.instantiate(className, classLoader);
                } catch (Exception e) {
                    throw new FlywayException("Unable to instantiate class: " + className);
                }

                classes.add(clazz);
                LOG.debug("Found class: " + className);
            }
        }
        return classes.toArray(new Class<?>[classes.size()]);
    }
}


text:
import { Plugin, OnErrorCallback } from '@bugsnag/core'
import React from 'react'

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface BugsnagPluginReact extends Plugin { }
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
declare class BugsnagPluginReact {
  constructor(react?: typeof React)
}

export type BugsnagErrorBoundary = React.ComponentType<{
  children?: React.ReactNode | undefined
  onError?: OnErrorCallback
  FallbackComponent?: React.ComponentType<{
    error: Error
    info: React.ErrorInfo
    clearError: () => void
  }>
}>

export interface BugsnagPluginReactResult {
  createErrorBoundary(react?: typeof React): BugsnagErrorBoundary
}

// add a new call signature for the getPlugin() method that types the react plugin result
declare module '@bugsnag/core' {
  interface Client {
    getPlugin(id: 'react'): BugsnagPluginReactResult | undefined
  }
}

export default BugsnagPluginReact


text:
/*
 * File: app/view/TasksViewController.js
 *
 * This file was generated by Sencha Architect version 3.5.1.
 * http://www.sencha.com/products/architect/
 *
 * This file requires use of the Ext JS 6.0.x library, under independent license.
 * License of Sencha Architect does not include license for Ext JS 6.0.x. For more
 * details see http://www.sencha.com/license or contact license@sencha.com.
 *
 * This file will be auto-generated each and everytime you save your project.
 *
 * Do NOT hand edit this file.
 */

Ext.define('TaskList.view.TasksViewController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.tasks',

    showView: function(view) {
        var layout = this.getReferences().display.getLayout();
        layout.setActiveItem(this.lookupReference(view));
    },

    select: function(rowmodel, record, index, eOpts) {
        // Set selected record
        this.getViewModel().set('record', record);

        // Show details
        this.showView('details');
    },

    save: function(button, e, eOpts) {
        var form = this.getReferences().form.getForm(),
            record = form.getRecord(),
            store = this.getStore('tasks'),
            now = new Date();

        // Valid
        if (form.isValid()) {

            // Update associated record with values
            form.updateRecord();

            // Set updated date/time
            record.set('updatedAt', now);

            // Add to store if new record
            if (record.phantom) {

                // Set created date/time
                record.set('createdAt', now);

                // TODO: Assign the record's ID from data source
                // Normally, this value would be auto-generated,
                // or returned from the server
                var id = store.count() + 1;
                record.set('id', id);

                // Add to store
                store.add(record);

            }

            // Commit changes
            store.commitChanges();

            // Display record
            this.select(this, record);

        }
    },

    cancelEdit: function(button, e, eOpts) {
        // Show details
        this.showView('details');
    },

    add: function(button, e, eOpts) {
        var formPanel = this.getReferences().form,
            form = formPanel.getForm(),
            newRecord = Ext.create('model.task');

        // Clear form
        form.reset();

        // Set record
        form.loadRecord(newRecord);

        // Set title
        formPanel.setTitle('Add Task');

        // Show form
        this.showView('form');
    },

    edit: function(button, e, eOpts) {
        var formPanel = this.getReferences().form,
            form = formPanel.getForm(),
            record = this.getViewModel().get('record');

        // Load record model into form
        form.loadRecord(record);

        // Set title
        formPanel.setTitle('Edit Task');

        // Show form
        this.showView('form');
    },

    remove: function(button, e, eOpts) {
        var me = this;

        // Ask user to confirm this action
        Ext.Msg.confirm('Confirm Delete', 'Are you sure you want to delete this task?', function(result) {

            // User confirmed yes
            if (result == 'yes') {

                var record = me.getViewModel().get('record'),
                    store = me.getStore('tasks');

                // Delete record from store
                store.remove(record);

                // Hide display
                me.showView('selectMessage');

            }

        });
    }

});


text:
"""
Template rendering decorator
"""
from functools import wraps
from django.utils.decorators import available_attrs
from django.shortcuts import render_to_response
from django.template import RequestContext

def render_template(template):
    """
    Shortcut for rendering templates with RequestContext

    Simply apply the decorator, and return a dict from your view.

    If decorated function returns non dict then just return that result
    else use RequestContext for rendering the template.

    :param template: Relative path to template file
    :type template:
    :return: Rendered template http response
    :rtype: HttpResponse
    """

    def decorator(func):
        @wraps(func, assigned=available_attrs(func))
        def wrapper(request, *args, **kwargs):
            output = func(request, *args, **kwargs)
            if not isinstance(output, dict):
                return output
            else:
                return render_to_response(
                    template,
                    output,
                    context_instance=RequestContext(request)
                )

        return wrapper

    return decorator


text:
// @flow

import { translate } from '../../../base/i18n';
import { IconCameraRefresh } from '../../../base/icons';
import { MEDIA_TYPE, toggleCameraFacingMode } from '../../../base/media';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { isLocalTrackMuted } from '../../../base/tracks';

/**
 * The type of the React {@code Component} props of {@link ToggleCameraButton}.
 */
type Props = AbstractButtonProps & {

    /**
     * Whether the current conference is in audio only mode or not.
     */
    _audioOnly: boolean,

    /**
     * Whether video is currently muted or not.
     */
    _videoMuted: boolean,

    /**
     * The redux {@code dispatch} function.
     */
    dispatch: Function
};

/**
 * An implementation of a button for toggling the camera facing mode.
 */
class ToggleCameraButton extends AbstractButton<Props, *> {
    accessibilityLabel = 'toolbar.accessibilityLabel.toggleCamera';
    icon = IconCameraRefresh;
    label = 'toolbar.toggleCamera';

    /**
     * Handles clicking / pressing the button.
     *
     * @override
     * @protected
     * @returns {void}
     */
    _handleClick() {
        this.props.dispatch(toggleCameraFacingMode());
    }

    /**
     * Indicates whether this button is disabled or not.
     *
     * @override
     * @protected
     * @returns {boolean}
     */
    _isDisabled() {
        return this.props._audioOnly || this.props._videoMuted;
    }
}

/**
 * Maps (parts of) the redux state to the associated props for the
 * {@code ToggleCameraButton} component.
 *
 * @param {Object} state - The Redux state.
 * @private
 * @returns {{
 *     _audioOnly: boolean,
 *     _videoMuted: boolean
 * }}
 */
function _mapStateToProps(state): Object {
    const { enabled: audioOnly } = state['features/base/audio-only'];
    const tracks = state['features/base/tracks'];

    return {
        _audioOnly: Boolean(audioOnly),
        _videoMuted: isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO)
    };
}

export default translate(connect(_mapStateToProps)(ToggleCameraButton));


text:
/**
 * Spring Data JPA repositories.
 */
package org.mymoney.accountservice.repository;


text:
var app = angular.module('Boilerplate', []);

app.controller('MainController', ['$scope', function($scope) {
	$scope.title = 'Hello World!';
}]);


text:
// CocoaUPnP by A&R Cambridge Ltd, http://www.arcam.co.uk
// Copyright 2015 Arcam. See LICENSE file.

#import "UPPBasicService.h"

NS_ASSUME_NONNULL_BEGIN

/**
 This class contains all the network calls needed for the UPnP [AVTransport1
 service](http://upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf).
 */
@interface UPPAVTransportService : UPPBasicService

#pragma mark - Transport URI Methods

///-----------------------------------------------------------------------------
/// @name Transport URI Methods
///-----------------------------------------------------------------------------

/**
 Set the current transport URI

 @param currentURI         The URI of the media item
 @param currentURIMetaData The meta data for the media item
 @param instanceId         The instance identifier
 @param success            An optional block which returns the success state of
 the call, along with an error object if the call was unsuccessful.

 */
- (void)setAVTransportURI:(NSString *)currentURI currentURIMetaData:(nullable NSString *)currentURIMetaData instanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Set the next transport URI

 @param nextURI         The URI for the next media item
 @param nextURIMetaData The meta data for the next media item
 @param instanceId      The instance identifier
 @param success         An optional block which returns the success state of the
 call, along with an error object if the call was unsuccessful.
 */
- (void)setNextAVTransportURI:(NSString *)nextURI nextURIMetaData:(nullable NSString *)nextURIMetaData instanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

#pragma mark - Getting Information

///-----------------------------------------------------------------------------
/// @name Getting Information
///-----------------------------------------------------------------------------

/**
 Get media information from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)mediaInfoWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

/**
 Get transport information from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)transportInfoWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

/**
 Get position information from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)positionInfoWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

/**
 Get device capabilities from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)deviceCapabilitiesWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

/**
 Get tranport settings from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)transportSettingsWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

/**
 Get tranport actions from the service

 @param instanceId The instance identifier
 @param completion A required completion block which returns the parsed response,
 or an error if unsuccessful
 */
- (void)transportActionsWithInstanceID:(nullable NSString *)instanceId completion:(UPPResponseBlock)completion;

#pragma mark - General Transport Controls

///-----------------------------------------------------------------------------
/// @name General Transport Controls
///-----------------------------------------------------------------------------

/**
 Send stop command

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.

 */
- (void)stopWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Send play command, with speed set to `1`

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)playWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Send play command with a speed setting

 @param instanceId The instance identifier
 @param speed      Playback speed
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)playWithInstanceID:(nullable NSString *)instanceId speed:(nullable NSString *)speed success:(nullable UPPSuccessBlock)successBlock;

/**
 Send pause command

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)pauseWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Send record command

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)recordWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Seek to time

 @param instanceId The instance identifier
 @param unit       The seek mode
 @param target     The time to seek to
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)setSeekWithInstanceID:(nullable NSString *)instanceId unit:(NSString *)unit target:(NSString *)target success:(nullable UPPSuccessBlock)successBlock;

/**
 Send next command

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)nextWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Send previous command

 @param instanceId The instance identifier
 @param success    An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)previousWithInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

#pragma mark - Mode Setting

///-----------------------------------------------------------------------------
/// @name Mode Setting
///-----------------------------------------------------------------------------

/**
 Set play mode

 @param newPlayMode The new play mode
 @param instanceId  The instance identifier
 @param success     An optional block which returns the success state of the call,
 along with an error object if the call was unsuccessful.
 */
- (void)setPlayMode:(NSString *)newPlayMode withInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

/**
 Set record mode

 @param newRecordMode The new record mode
 @param instanceId    The instance identifier
 @param success       An optional block which returns the success state of the
 call, along with an error object if the call was unsuccessful.
 */
- (void)setRecordMode:(NSString *)newRecordMode withInstanceID:(nullable NSString *)instanceId success:(nullable UPPSuccessBlock)successBlock;

@end

NS_ASSUME_NONNULL_END


text:
CObjectInspectEntry::CObjectInspectEntry(CDebugObjectInspectWin* parent) : QWidget()
{
    mParent = parent;
    mNameLabel = NULL;
    mName[0] = '\0';
    mNameHash = 0;
    mType = TinScript::TYPE_void;
    mValue = NULL;
}

// ====================================================================================================================
// Deconstructor
// ====================================================================================================================
CObjectInspectEntry::~CObjectInspectEntry()
{
    // -- delete the elements
    delete mNameLabel;
    delete mTypeLabel;
    if (mValue)
        delete mValue;
}

// ====================================================================================================================
// Initialize():  Populates the layout with the elements for this
// ====================================================================================================================
void CObjectInspectEntry::Initialize(const TinScript::CDebuggerWatchVarEntry& debugger_entry)
{
    // -- get the current number of entries added to this window
    int count = mParent->GetEntryCount() + 1;

    QSize parentSize = mParent->size();
    int newWidth = parentSize.width();
    mParent->GetContent()->setGeometry(0, 20, newWidth, (count + 2) * 24);

    mNameLabel = new QLabel(debugger_entry.mVarName);
    TinScript::SafeStrcpy(mName, debugger_entry.mVarName, TinScript::kMaxNameLength);
    mNameHash = debugger_entry.mVarHash;

    // -- if this is not a namespace, add the line edit
    if (debugger_entry.mType != TinScript::TYPE_void)
    {
        mType = debugger_entry.mType;
        mTypeLabel = new QLabel(TinScript::GetRegisteredTypeName(debugger_entry.mType));
        mValue = new SafeLineEdit();
        mValue->setText(debugger_entry.mValue);
        mValue->setMinimumWidth(160);

        // -- hook up the line edit
        QObject::connect(mValue, SIGNAL(returnPressed()), this, SLOT(OnReturnPressed()));
    }
    else
    {
        mTypeLabel = new QLabel("namespace");
    }

    // -- add this to the window
    mParent->GetLayout()->addWidget(mTypeLabel, count, 0, 1, 1);
    mParent->GetLayout()->addWidget(mNameLabel, count, 1, 1, 1);
    if (mValue)
    {
        mParent->GetLayout()->addWidget(mValue, count, 2, 1, 2);
    }
    mParent->AddEntry(this);

    mParent->GetContent()->updateGeometry();
    mParent->ExpandToParentSize();
}

// ====================================================================================================================
// SetValue():  Update the button text.
// ====================================================================================================================
void CObjectInspectEntry::SetValue(const char* new_value)
{
    if (!new_value)
        new_value = "";

    // -- set the value
    if (mValue)
        mValue->setText(new_value ? new_value : "");
}

// ====================================================================================================================
// OnReturnPressed():  Slot hooked up to the line edit, to be executed when the return is pressed.
// ====================================================================================================================
void CObjectInspectEntry::OnReturnPressed()
{
    // -- create the command, by inserting the slider value as the first parameter
    char command_buf[TinScript::kMaxTokenLength];
    sprintf_s(command_buf, "%d.%s = `%s`;", mParent->GetObjectID(), mName, mValue->GetStringValue());

    bool8 is_connected = CConsoleWindow::GetInstance()->IsConnected();
    if (is_connected)
    {
        // -- for sliders, we need to embed the value, so the command is only the function name
        ConsolePrint("%s%s\n", kConsoleSendPrefix, command_buf);
        SocketManager::SendCommand(command_buf);
    }
}

// == CDebugObjectInspectWin ==========================================================================================

// ====================================================================================================================
// Constructor
// ====================================================================================================================
CDebugObjectInspectWin::CDebugObjectInspectWin(uint32 object_id, const char* object_identifier, QWidget* parent)
    : QWidget(parent)
    , mObjectID(object_id)
{
    TinScript::SafeStrcpy(mWindowName, object_identifier, TinScript::kMaxNameLength);
    mScrollArea = new QScrollArea(this);
    mScrollContent = new QWidget(mScrollArea);
    mLayout = new QGridLayout(mScrollContent);
    mLayout->setColumnStretch(2, 1);
    mScrollArea->setWidget(mScrollContent);
    mScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
    mScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
    ExpandToParentSize();

    // -- add the refresh button
    mRefreshButton = new QPushButton("Refresh");
    mLayout->addWidget(mRefreshButton, 0, 0);
    QObject::connect(mRefreshButton, SIGNAL(clicked()), this, SLOT(OnButtonRefreshPressed()));

    const char* object_derivation =
        CConsoleWindow::GetInstance()->GetDebugObjectBrowserWin()->GetObjectDerivation(object_id);
    mLayout->addWidget(new QLabel("Derivation:"), 0, 1);
    mLayout->addWidget(new QLabel(object_derivation), 0, 2);
}

// ====================================================================================================================
// Destructor
// ====================================================================================================================
CDebugObjectInspectWin::~CDebugObjectInspectWin()
{
}

// ====================================================================================================================
// AddEntry():  Adds an entry to the map of all entries owned by the window.
// ====================================================================================================================
void CDebugObjectInspectWin::AddEntry(CObjectInspectEntry* entry)
{
    if (entry)
    {
        mEntryMap.insert(entry->GetHash(), entry);
    }
}

// ====================================================================================================================
// SetEntryValue():  Given an entry ID, update the DebugEntry's value.
// ====================================================================================================================
void CDebugObjectInspectWin::SetEntryValue(const TinScript::CDebuggerWatchVarEntry& debugger_entry)
{
    // -- see if the entry is in the map
    if (debugger_entry.mVarHash > 0)
    {
        if (mEntryMap.contains(debugger_entry.mVarHash))
        {
            CObjectInspectEntry* entry = mEntryMap[debugger_entry.mVarHash];
            entry->SetValue(debugger_entry.mValue);
        }

        // -- otherwise we need to create the entry
        else
        {
            CObjectInspectEntry* entry = new CObjectInspectEntry(this);
            entry->Initialize(debugger_entry);
            mEntryMap.insert(debugger_entry.mVarHash, entry);
        }
    }
}

// ====================================================================================================================
// OnButtonRefreshPressed():  Called when the refresh button is pressed
// ====================================================================================================================
void CDebugObjectInspectWin::OnButtonRefreshPressed()
{
    // -- send the request to re-populate the inspector for the window's object
    if (SocketManager::IsConnected())
    {
        SocketManager::SendCommandf("DebuggerInspectObject(%d);", mObjectID);
    }
}

// ------------------------------------------------------------------------------------------------
#include "TinQTObjectInspectWinMoc.cpp"

// ------------------------------------------------------------------------------------------------
// eof
// ------------------------------------------------------------------------------------------------


text:
"use strict";

let Bookshelf = require("../database.js");
require("./feed");

module.exports = Bookshelf.model("Post", {
	tableName: "Post",
	hasTimestamps: true,

	feed: function() {
		return this.belongsTo("Feed");
	},
});


text:
function draw_part(pt,unit,I,T,part,varargin)

%DESCRIPTION
%   This function forms a planar polygon profile,
%   extrudes it into a part along the normal direction,
%   and displaces the part using a homogenous transformation matrix.
%
%INPUT ARGUMENTS
%   part ----------- property constants for all joint and link types (struct)
%   pt ------------- property constants for current joint or link    (struct)
%      .type ------- 'd' round offset ,  'p' square offset           (character)
%                    'a' common normal,  'B' base      joint
%                    'R' revolute joint, 'P' prismatic joint
%                    'G' gripper  joint, 'N' no part
%                    'H' polygon link with cutout for gripper (NEEDS REVISION)
%   unit ----------- property variables for current joint or link    (struct)
%      .top -------- local z coord for top                           (N vector)
%      .bot -------- local z coord for bottom                        (N vector)
%   I -------------- current joint/frame index (I=1..N),(i=0..n)     (scalar)
%   T -------------- displacement matrix from base to Ith frame      (4x4)
%   varargin: for platforms (NEEDS REVISION)
%   (1) x ------ x coordinates of polygon vertices                   (vector)
%   (2) y ------ y coordinates of polygon vertices                   (vector)
%
%OUTPUT ARGUMENTS
%   (none)
%
%FUNCTION CALLS
%   patch_cylinder - draw cylinder
%   rot -------- elementary rotation matrix

%PROGRAM

%BEGIN{INITIALIZATIONS}********************************************************
if length(varargin) == 2                                  %x and y polygon coordinates inputted
    x = varargin{1};                                      %x coordinate
    y = varargin{2};                                      %y coordinate
    n = length(x);                                        %number of vertices
end %if
%END{INITIALIZATIONS}----------------------------------------------------------

%BEGIN{DRAW PARTS}*************************************************************
%test for valid parts
part_cases = {'a','d','p','R','P','B','G','H'};           %non-null parts (excludes 'N')
if ~ismember(pt.type,part_cases);                         %if no part,return
    return;                                               %early exit
end %if

%select and draw parts
switch pt.type                                            %set up for extrusion along local z axis
    case {'a'}                                            %common normal a(i)
        T = T*rot('y',pi/2);                              %rotate z into x axis
        patch_cylinder(part,pt,unit.bot(I),unit.top(I),T);%extrude polygon up into a solid

    case {'R','P','B','G','d','p'}                        %R,P,B joint or offset d (ready to extrude along local z axis)
        patch_cylinder(part,pt,unit.bot(I),unit.top(I),T);%extrude polygon up into a solid

    case {'H'} %NEEDS REVISION                            %general polygon link with cutout for gripper
        %add points near gripper (nth coordinate) to form cutout
        j2g(1,:) = x(n)-x(1:n-1);                         %x coord of vectors from joint vertices to gripper vertex
        j2g(2,:) = y(n)-y(1:n-1);                         %y coord of vectors from joint vertices to gripper vertex
        dir_j2g  = j2g./repmat(sqrt(dot(j2g,j2g)),2,1);   %make into unit vectors
        p = [x(1:n-1);y(1:n-1)]+(j2g-radius/2*dir_j2g);   %n-1 new points to be hidden by gripper
        p = fliplr(p);                                    %reverse order of new points
        x = [x(1:n-1),p(1,:),x(1)];                       %add on new points and close polygon
        y = [y(1:n-1),p(2,:),y(1)];                       %add on new points and close polygon
        patch_cylinder(part,pt,unit.bot(I),unit.top(I),T);%extrude polygon up into a solid
end %switch

%END{DRAW PARTS}---------------------------------------------------------------


text:
package com.intellij.usageView;

import com.intellij.lang.findUsages.FindUsagesProvider;
import com.intellij.lang.findUsages.LanguageFindUsages;
import com.intellij.psi.ElementDescriptionLocation;
import com.intellij.psi.ElementDescriptionProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.meta.PsiMetaData;
import com.intellij.psi.meta.PsiMetaOwner;
import com.intellij.psi.meta.PsiPresentableMetaData;
import org.jetbrains.annotations.NotNull;

/**
 * @author peter
 */
public class UsageViewNodeTextLocation extends ElementDescriptionLocation {
  private UsageViewNodeTextLocation() {
  }

  public static final UsageViewNodeTextLocation INSTANCE = new UsageViewNodeTextLocation();

  public ElementDescriptionProvider getDefaultProvider() {
    return DEFAULT_PROVIDER;
  }

  private static final ElementDescriptionProvider DEFAULT_PROVIDER = new ElementDescriptionProvider() {
    public String getElementDescription(@NotNull final PsiElement element, @NotNull final ElementDescriptionLocation location) {
      if (!(location instanceof UsageViewNodeTextLocation)) return null;

      if (element instanceof PsiMetaOwner) {
        final PsiMetaData metaData = ((PsiMetaOwner)element).getMetaData();
        if (metaData instanceof PsiPresentableMetaData) {
          return ((PsiPresentableMetaData)metaData).getTypeName() + " " + UsageViewUtil.getMetaDataName(metaData);
        }
      }

      if (element instanceof PsiFile) {
        return ((PsiFile) element).getName();
      }
      FindUsagesProvider provider = LanguageFindUsages.INSTANCE.forLanguage(element.getLanguage());
      return provider.getNodeText(element, true);
    }
  };
}


text:
<readable><title>3558438174_d8f41438a4</title><content>
Two ladies in skimpy clothes pose next to an old fashioned car .
two scantily clad girls holding checkered flags standing on each side of a classic red car .
Two spokesmodels in front of a hotrod .
Two women holding checkered flags near an orange car .
Two women in black with flags are standing in front of an old-fashioned car .
</content></readable>


text:
using System;
using System.Collections.Generic;
using SharpKit.Html;
using SharpKit.JavaScript;

namespace qx.util
{
    /// <summary>
	/// <para>This static class contains a set of default validators.
	/// These validators are listed twice
	/// <list type="bullet">
	/// <item>number</item>
	/// <item>email</item>
	/// <item>string</item>
	/// <item>url</item>
	/// <item>color</item>
	/// </list>
	/// All these validators don’t need an input so the listed function just return a
	/// method fitting for the use in the property system.
	/// The methods with the check prefix are the returned methods and can be used in
	/// other contexts without the property system.</para>
	/// <para>There are three more validators
	/// <list type="bullet">
	/// <item>range</item>
	/// <item>inArray</item>
	/// <item>regExp</item>
	/// </list>
	/// These methods do need some addition parameters to specify the validator. So
	/// there is no check function which you can use in other contexts because the
	/// check function for the validation is created based on the given parameter.</para>
	/// <para>Example usage for a property</para>
	/// validate: qx.util.Validate.number()
	/// validate: qx.util.Validate.range(0, 100)
	/// <para>Because the methods without the check prefix return a validation method,
	/// the function must be called at the property definition. So don’t forget the
	/// ending brackets for those methods without parameters!
	/// For the correct usage, take an additional look at the documentation of the
	/// <see cref="qx.core.Property"/> class.</para>
	/// </summary>
	[JsType(JsMode.Prototype, Name = "qx.util.Validate", OmitOptionalParameters = true, Export = false)]
    public partial class Validate
    {
		#region Methods

		public Validate() { throw new NotImplementedException(); }

		/// <summary>
		/// <para>The function checks the incoming value to see if it is a color.
		/// If not, an ValidationError will be thrown. The check itself will be
		/// delegated to the <see cref="qx.util.ColorUtil.StringToRgb"/> method.
		/// If you want to use the color check in a property definition,
		/// use the <see cref="Color"/> method.</para>
		/// </summary>
		/// <param name="value">The value to check.</param>
		/// <param name="formItem">The form item to check if used in a qx.ui.form.Form.</param>
		/// <param name="errorMessage">Custom error message.</param>
		[JsMethod(Name = "checkColor")]
		public static void CheckColor(object value, qx.ui.form.IForm formItem, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>The function checks the incoming value to see if it is an email address.
		/// If not, an ValidationError will be thrown.
		/// If you want to use the email check in a property definition,
		/// use the <see cref="Email"/> method.</para>
		/// </summary>
		/// <param name="value">The value to check.</param>
		/// <param name="formItem">The form item to check if used in a qx.ui.form.Form.</param>
		/// <param name="errorMessage">Custom error message.</param>
		[JsMethod(Name = "checkEmail")]
		public static void CheckEmail(object value, qx.ui.form.IForm formItem, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>The function checks the incoming value to see if it is a number.
		/// If not, an ValidationError will be thrown.
		/// If you want to use the number check in a property definition,
		/// use the <see cref="Number"/> method.</para>
		/// </summary>
		/// <param name="value">The value to check.</param>
		/// <param name="formItem">The form item to check if used in a qx.ui.form.Form.</param>
		/// <param name="errorMessage">Custom error message.</param>
		[JsMethod(Name = "checkNumber")]
		public static void CheckNumber(object value, qx.ui.form.IForm formItem, string errorMessage = "undefined") { throw new NotImplementedException(); }

		/// <summary>
		/// <para>The function checks the incoming value to see if it is a string.
		/// If not, an ValidationError will be thrown.
		/// If you want to use the string check in a property definition,
		/// use the <see cref="String"/> method.</para>
		/// </summary>
		/// <param name="value">The value to check.</param>
		/// <param name="formItem">The form item to check if used in a qx.ui.form.Form.</param>
		/// <param name="errorMessage">Custom error message.</param>
		[JsMethod(Name = "checkString")]
		public static void CheckString(object value, qx.ui.form.IForm formItem, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>The function checks the incoming value to see if it is an url.
		/// If not, an ValidationError will be thrown.
		/// If you want to use the url check in a property definition,
		/// use the <see cref="Url"/> method.</para>
		/// </summary>
		/// <param name="value">The value to check.</param>
		/// <param name="formItem">The form item to check if used in a qx.ui.form.Form.</param>
		/// <param name="errorMessage">Custom error message.</param>
		[JsMethod(Name = "checkUrl")]
		public static void CheckUrl(object value, qx.ui.form.IForm formItem, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns the function that checks for a color.</para>
		/// </summary>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>The #checkColor Function.</returns>
		[JsMethod(Name = "color")]
		public static Action<object> Color(string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns the function that checks for an email address.</para>
		/// </summary>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>The #checkEmail Function.</returns>
		[JsMethod(Name = "email")]
		public static Action<object> Email(string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns a function that checks if the given value is in the array.
		/// If the value given to the returned function is not in the array, a
		/// ValidationError will be thrown.</para>
		/// </summary>
		/// <param name="array">The array holding the possibilities.</param>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>A function taking one parameter (value).</returns>
		[JsMethod(Name = "inArray")]
		public static Action<object> InArray(JsArray array, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns the function that checks for a number.</para>
		/// </summary>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>The #checkNumber Function.</returns>
		[JsMethod(Name = "number")]
		public static Action<object> Number(string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns a function that checks if the number is in the given range.
		/// The range includes the border values.
		/// A range from 1 to 2 accepts the values 1 equally as everything up to 2
		/// including the 2.
		/// If the value given to the returned function is out of the range, a
		/// ValidationError will be thrown.</para>
		/// </summary>
		/// <param name="from">The lower border of the range.</param>
		/// <param name="to">The upper border of the range.</param>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>A function taking one parameter (value).</returns>
		[JsMethod(Name = "range")]
		public static Action<object> Range(double from, double to, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns a function that checks if the given value fits the RegExp.
		/// For testing, the function uses the RegExp.test function.
		/// If the value given to the returned function does not fit the RegExp, a
		/// ValidationError will be thrown.
		/// incoming</para>
		/// </summary>
		/// <param name="reg">The RegExp for the check.</param>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>A function taking one parameter (value).</returns>
		[JsMethod(Name = "regExp")]
		public static Action<object> RegExp(JsRegExp reg, string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns the function that checks for a string.</para>
		/// </summary>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>The #checkString Function.</returns>
		[JsMethod(Name = "string")]
		public static Action<object> String(string errorMessage = null) { throw new NotImplementedException(); }

		/// <summary>
		/// <para>Returns the function that checks for an url.</para>
		/// </summary>
		/// <param name="errorMessage">Custom error message.</param>
		/// <returns>The #checkUrl Function.</returns>
		[JsMethod(Name = "url")]
		public static Action<object> Url(string errorMessage = null) { throw new NotImplementedException(); }

		#endregion Methods
    }
}