text:
package net.sf.jtreemap.swing;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;

import javax.swing.JToolTip;

/**
 * Default ToolTip for the jTreeMap.
 *
 * @author Laurent DUTHEIL
 */
public class DefaultToolTip extends JToolTip {
    private static final int TOOLTIP_OFFSET = 5;
    private static final int DEFAULT_VALUE_SIZE = 10;
    private static final int DEFAULT_LABEL_SIZE = 12;
    private static final long serialVersionUID = -2492627777999093973L;

    private final JXTreeMap jTreeMap;
    private final Font labelFont;
    private final Font valueFont;
    private final String weightPrefix;
    private final String valuePrefix;
    private final boolean showWeight;

    /**
     * Constructor.
     *
     * @param jTreeMap
     *            the jTreeMap who display the tooltip
     */
    public DefaultToolTip(final JXTreeMap jTreeMap, final String weightPrefix, final String valuePrefix, final boolean showWeight) {
        this.jTreeMap = jTreeMap;
        this.weightPrefix = weightPrefix;
        this.valuePrefix = valuePrefix;
        this.showWeight = showWeight;
        this.labelFont = new Font("Default", Font.BOLD, DEFAULT_LABEL_SIZE);
        this.valueFont = new Font("Default", Font.PLAIN, DEFAULT_VALUE_SIZE);

        final int width = 160;
        final int height = getFontMetrics(this.labelFont).getHeight() + getFontMetrics(this.valueFont).getHeight();

        final Dimension size = new Dimension(width, height);
        this.setSize(size);
        this.setPreferredSize(size);
    }

    @Override
    public void paint(final Graphics g) {
        if (this.jTreeMap.getActiveLeaf() != null) {
            final Graphics g2D = g;
            g2D.setColor(Color.YELLOW);
            g2D.fill3DRect(0, 0, this.getWidth(), this.getHeight(), true);
            g2D.setColor(Color.black);
            g2D.setFont(this.labelFont);
            g2D.drawString(this.jTreeMap.getActiveLeaf().getLabel(), TOOLTIP_OFFSET, g2D.getFontMetrics(this.labelFont).getAscent());
            g2D.setFont(this.valueFont);
            String toDraw = this.jTreeMap.getActiveLeaf().getLabelValue();
            if (valuePrefix != null) {
                toDraw = valuePrefix + " " + toDraw;
            }
            if (showWeight) {
                toDraw = this.jTreeMap.getActiveLeaf().getWeight() + ", " + toDraw;
            }
            if (weightPrefix != null && showWeight) {
                toDraw = weightPrefix + " " + toDraw;
            }
            g2D.drawString(toDraw, TOOLTIP_OFFSET, this.getHeight() - TOOLTIP_OFFSET);
        }
    }
}
/*
 *                 ObjectLab is supporing JXTreeMap
 *
 * Based in London, we are world leaders in the design and development
 * of bespoke applications for the securities financing markets.
 *
 * Click here to learn more about us
 *           ___  _     _           _   _          _
 *          / _ \| |__ (_) ___  ___| |_| |    __ _| |__
 *         | | | | '_ \| |/ _ \/ __| __| |   / _` | '_ \
 *         | |_| | |_) | |  __/ (__| |_| |__| (_| | |_) |
 *          \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
 *                   |__/
 *
 *                     www.ObjectLab.co.uk
 */


text:
package kr.huny.model.db.common;

import lombok.Data;

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

/**
 * 기본 ajax 반환
 */
@Data
public class AjaxJsonCommon<T> {
    public AjaxJsonCommon() {
        this.retMsg = null;
        this.retCode = -1;

        this.result = new ArrayList<T>();
    }
    private String retMsg;
    private int retCode;

    private List<T> result;

    public void addResultItem(T t)
    {
        this.result.add(t);
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.example.listener;
/**
 * 车辆详情接口
 *  dufangyu
 *
 */
public interface CarInfoListener {

	public void getCarinfos(String[] strArr);

	public void modifyCarinfo(boolean flag);

}


text:
<?php

namespace projetBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * PersonnelRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class PersonnelRepository extends EntityRepository
{
}


text:
{% extends "base.html" %}
{% block content %}
  <form method="get">
    <button class="copytemplate" formaction="index.html">Back to Food Menu</button>

    <input type="hidden" name="jinjatemplate" value="picktemplate.html">

    {% for row in templates %}

{{row.description|e}}

    {% endfor %}

  </form>

{% endblock %}


text:
package org.chocosolver.solver.constraints;

import org.chocosolver.solver.Solver;
import org.chocosolver.solver.constraints.reification.PropConditionnal;
import org.chocosolver.solver.propagation.PropagationEngineFactory;
import org.chocosolver.solver.search.loop.monitors.IMonitorOpenNode;
import org.chocosolver.solver.search.loop.monitors.IMonitorSolution;
import org.chocosolver.solver.variables.BoolVar;
import org.chocosolver.solver.variables.IntVar;
import org.chocosolver.solver.variables.VF;
import org.chocosolver.solver.variables.VariableFactory;
import org.chocosolver.util.ESat;
import org.testng.Assert;
import org.testng.annotations.Test;

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

/**
 * <br/>
 *
 * @author Charles Prud'homme
 * @since 15/12/12
 */
public class DynamicPostTest {

    PropagationEngineFactory engine;

    public DynamicPostTest(PropagationEngineFactory engine) {
        this.engine = engine;
    }

    public DynamicPostTest() {
        this(PropagationEngineFactory.DEFAULT);
    }

    @SuppressWarnings("UnusedDeclaration")
    @Test(groups = "1s")
    public void test0() {
        final Solver solver = new Solver();
        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 8);
    }

    @Test(groups = "1s")
    public void test1() {
        final Solver solver = new Solver();
        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);

        solver.post(new Constraint("Conditionnal",
                new PropConditionnal(new IntVar[]{X, Y, Z},
                        new Constraint[]{IntConstraintFactory.arithm(X, "=", Y), IntConstraintFactory.arithm(Y, "=", Z)},
                        new Constraint[]{}) {
                    @Override
                    public ESat checkCondition() {
                        int nbNode = (int) solver.getMeasures().getNodeCount();
                        switch (nbNode) {
                            case 0:
                            case 1:
                                return ESat.UNDEFINED;
                            case 2:
                                return ESat.TRUE;
                            default:
                                return ESat.FALSE;
                        }

                    }
                }));
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 7);
    }

    @Test(groups = "1s")
    public void test2() {
        final Solver solver = new Solver();
        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
        solver.getSearchLoop().plugSearchMonitor(new IMonitorOpenNode() {
            @Override
            public void beforeOpenNode() {
            }

            @Override
            public void afterOpenNode() {
                if (solver.getMeasures().getNodeCount() == 1) {
                    solver.post(IntConstraintFactory.arithm(X, "=", Y));
                    solver.post(IntConstraintFactory.arithm(Y, "=", Z));
                }
            }
        });
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 2);
    }

    @Test(groups = "1s")
    public void test3() {
        final Solver solver = new Solver();
        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
        Constraint c1 = IntConstraintFactory.arithm(X, "=", Y);
        Constraint c2 = IntConstraintFactory.arithm(X, "=", Z);
        solver.post(c1);
        solver.post(c2);
        solver.unpost(c2);
        solver.unpost(c1);
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 8);
        Assert.assertEquals(solver.getNbCstrs(), 0);
    }

    @Test(groups = "1s")
    public void test4() {
        final Solver solver = new Solver();
        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
        final Constraint c1 = IntConstraintFactory.arithm(X, "=", Y);
        final Constraint c2 = IntConstraintFactory.arithm(X, "=", Z);
        solver.post(c1);
        solver.post(c2);
        solver.plugMonitor((IMonitorSolution) () -> {
            solver.unpost(c1);
            solver.unpost(c2);
        });
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 5);
        Assert.assertEquals(solver.getNbCstrs(), 0);
    }

    private static void popAll(List<Constraint> stack, Solver solver) {
        stack.forEach(solver::unpost);
    }

    private static void push(Constraint constraint, List<Constraint> stack, Solver solver) {
        stack.add(constraint);
        solver.post(constraint);
    }

    @SuppressWarnings("UnusedDeclaration")
    @Test(groups = "1s")
    public void testJLpareto() {
        // Objectives are to maximize "a" and maximize "b".
        Solver solver = new Solver();
        IntVar a = VF.enumerated("a", 0, 2, solver);
        IntVar b = VF.enumerated("b", 0, 2, solver);
        IntVar c = VF.enumerated("c", 0, 2, solver);

        solver.post(ICF.arithm(a, "+", b, "<", 3));

        // START extra variables/constraints for guided improvement algorithm
        List<Constraint> stack = new ArrayList<>();
        IntVar lbA = VF.enumerated("lbA", 0, 2, solver);
        IntVar lbB = VF.enumerated("lbB", 0, 2, solver);
        BoolVar aSBetter = ICF.arithm(a, ">", lbA).reif();
        BoolVar bSBetter = ICF.arithm(b, ">", lbB).reif();
        BoolVar aBetter = ICF.arithm(a, ">=", lbA).reif();
        BoolVar bBetter = ICF.arithm(b, ">=", lbB).reif();
        push(ICF.arithm(lbA, "=", a), stack, solver);
        push(ICF.arithm(lbB, "=", b), stack, solver);
        Constraint strictlyBetter
                = LCF.or(
                LCF.and(aSBetter, bBetter),
                LCF.and(aBetter, bSBetter));
        // END extra variables/constraints for guided improvement algorithm
        int nbSolution = 0;
        while (solver.findSolution()) {
            int bestA;
            int bestB;
            do {
                bestA = a.getValue();
                bestB = b.getValue();

                popAll(stack, solver);
                push(ICF.arithm(lbA, "=", bestA), stack, solver);
                push(ICF.arithm(lbB, "=", bestB), stack, solver);
                push(strictlyBetter, stack, solver);
            } while (solver.nextSolution());

            popAll(stack, solver);

            push(ICF.arithm(a, "=", bestA), stack, solver);
            push(ICF.arithm(b, "=", bestB), stack, solver);
            push(ICF.arithm(lbA, "=", bestA), stack, solver);
            push(ICF.arithm(lbB, "=", bestB), stack, solver);

            solver.getEngine().flush();
            solver.getSearchLoop().reset();

            if (solver.findSolution()) {
                do {
                    //System.out.println("Found pareto optimal solution: " + a + ", " + b + ", " + c);
                    nbSolution++;
                } while (solver.nextSolution());
            }

            popAll(stack, solver);

            solver.getEngine().flush();
            solver.getSearchLoop().reset();

            solver.post(LCF.or(
                    ICF.arithm(a, ">", bestA),
                    ICF.arithm(b, ">", bestB)));
        }
        Assert.assertEquals(9, nbSolution);
    }

    @Test(groups = "1s")
    public void testIssue214() {
        Solver solver = new Solver();
        IntVar x = VariableFactory.enumerated("x", 1, 2, solver);
        IntVar y = VariableFactory.enumerated("y", 1, 2, solver);
        IntVar z = VariableFactory.enumerated("z", 1, 2, solver);
        Constraint c = LCF.or(
                ICF.arithm(x, "<", y),
                ICF.arithm(x, "<", z));
        solver.post(c);
        solver.findSolution();
        solver.unpost(c);
    }
}


text:
About me

I've worked in the past almost ten years in software development, from Lisbon to Amsterdam, to Berlin and now Bangkok.

I'm also a musician following the teachings of my father, love to travel, love to eat, love to learn all that is new.

You can find me on Twitter or Medium


text:
#include "texture_files.hpp"
#include "stb_image.h"
#include "filesystem.hpp"
#include "muglm/muglm_impl.hpp"
#include <string.h>

namespace Vulkan
{
static MemoryMappedTexture load_stb(const void *data, size_t size, ColorSpace color)
{
	int width, height;
	int components;
	auto *buffer = stbi_load_from_memory(static_cast<const stbi_uc *>(data), size, &width, &height, &components, 4);

	if (!buffer)
		return {};

	MemoryMappedTexture tex;
	tex.set_2d(color == ColorSpace::sRGB ? VK_FORMAT_R8G8B8A8_SRGB : VK_FORMAT_R8G8B8A8_UNORM, width, height);
	tex.set_generate_mipmaps_on_load(true);
	if (!tex.map_write_scratch())
		return {};

	memcpy(tex.get_layout().data(), buffer, width * height * 4);
	stbi_image_free(buffer);
	return tex;
}

static MemoryMappedTexture load_hdr(const void *data, size_t size)
{
	int width, height;
	int components;
	auto *buffer = stbi_loadf_from_memory(static_cast<const stbi_uc *>(data), size, &width, &height, &components, 3);

	MemoryMappedTexture tex;
	tex.set_2d(VK_FORMAT_R16G16B16A16_SFLOAT, width, height);
	if (!tex.map_write_scratch())
		return {};
	tex.set_generate_mipmaps_on_load(true);

	auto *converted = static_cast<muglm::u16vec4 *>(tex.get_layout().data());
	for (int i = 0; i < width * height; i++)
	{
		converted[i] = muglm::floatToHalf(muglm::vec4(buffer[3 * i + 0], buffer[3 * i + 1], buffer[3 * i + 2], 1.0f));
	}
	stbi_image_free(buffer);
	return tex;
}

MemoryMappedTexture load_texture_from_memory(const void *data, size_t size, ColorSpace color)
{
	static const uint8_t png_magic[] = {
		0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a,
	};

	static const uint8_t jpg_magic[] = {
		0xff, 0xd8,
	};

	static const uint8_t hdr_magic[] = {
		0x23, 0x3f, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4e, 0x43, 0x45, 0x0a,
	};

	if (size >= sizeof(png_magic) && memcmp(data, png_magic, sizeof(png_magic)) == 0)
		return load_stb(data, size, color);
	else if (size >= 2 && memcmp(data, jpg_magic, sizeof(jpg_magic)) == 0)
		return load_stb(data, size, color);
	else if (size >= sizeof(hdr_magic) && memcmp(data, hdr_magic, sizeof(hdr_magic)) == 0)
		return load_hdr(data, size);
	else if (MemoryMappedTexture::is_header(data, size))
	{
		MemoryMappedTexture mapped;
		mapped.map_copy(data, size);
		return mapped;
	}
	else
	{
		// YOLO!
		return load_stb(data, size, color);
	}
}

MemoryMappedTexture load_texture_from_file(Granite::Filesystem &fs, const std::string &path, ColorSpace color)
{
	auto file = fs.open(path, Granite::FileMode::ReadOnly);
	if (!file)
		return {};

	void *mapped = file->map();
	if (!mapped)
		return {};

	if (MemoryMappedTexture::is_header(mapped, file->get_size()))
	{
		MemoryMappedTexture tex;
		tex.map_read(std::move(file), mapped);
		return tex;
	}

	return load_texture_from_memory(mapped, file->get_size(), color);
}
}


text:
require 'optparse'

module Kite

  # Parse the command line for configuration options needed
  # to run the Kite rack service.
  def self.cli_config(argv=nil)
    config = {}

    OptionsParser.new |opt|
      opt.on('--url', '-u URL') do |url|
        config[:url] = url
      end

      opt.on('--store', '-s STORE', 'storage adpater, eg. s3') do |store|
        config[:store] = store.to_sym
      end

      opt.on('--author', '-a NAME') do |title|
        config[:title] = title
      end

      opt.on('--title', '-t TITLE') do |title|
        config[:title] = title
      end

      opt.on('--index', '-i FILE') do |index|
        config[:index] = index
      end

      opt.on('--public', '-p PATH') do |path|
        config[:static] = path
      end

      opt.on('--cache', '-c SECONDS') do |seconds|
        config[:cache] = seconds.to_i
      end

      opt.on('--mode', '-m MODE', 'production, test or development') do |mode|
        config[:env] = mode.to_sym
      end

      opt.on('--config-file', '-f PATH', 'use this configuration file') do |file|
        data = YAML.load(File.new(file))
        config.update(data)
      end

      opt
    end

    parser.parse!(argv || ARGV)

    config[:root] = argv.unshift || Dir.pwd

    return config
  end

end


text:
package swfiface

import (
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/service/swf"
)

// SWFAPI provides an interface to enable mocking the
// swf.SWF service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
//
//    // myFunc uses an SDK service client to make a request to
//    // Amazon Simple Workflow Service.
//    func myFunc(svc swfiface.SWFAPI) bool {
//        // Make svc.CountClosedWorkflowExecutions request
//    }
//
//    func main() {
//        sess := session.New()
//        svc := swf.New(sess)
//
//        myFunc(svc)
//    }
//
// In your _test.go file:
//
//    // Define a mock struct to be used in your unit tests of myFunc.
//    type mockSWFClient struct {
//        swfiface.SWFAPI
//    }
//    func (m *mockSWFClient) CountClosedWorkflowExecutions(input *swf.CountClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error) {
//        // mock response/functionality
//    }
//
//    func TestMyFunc(t *testing.T) {
//        // Setup Test
//        mockSvc := &mockSWFClient{}
//
//        myfunc(mockSvc)
//
//        // Verify myFunc's functionality
//    }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type SWFAPI interface {
	CountClosedWorkflowExecutionsRequest(*swf.CountClosedWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionCount)

	CountClosedWorkflowExecutions(*swf.CountClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error)

	CountOpenWorkflowExecutionsRequest(*swf.CountOpenWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionCount)

	CountOpenWorkflowExecutions(*swf.CountOpenWorkflowExecutionsInput) (*swf.WorkflowExecutionCount, error)

	CountPendingActivityTasksRequest(*swf.CountPendingActivityTasksInput) (*request.Request, *swf.PendingTaskCount)

	CountPendingActivityTasks(*swf.CountPendingActivityTasksInput) (*swf.PendingTaskCount, error)

	CountPendingDecisionTasksRequest(*swf.CountPendingDecisionTasksInput) (*request.Request, *swf.PendingTaskCount)

	CountPendingDecisionTasks(*swf.CountPendingDecisionTasksInput) (*swf.PendingTaskCount, error)

	DeprecateActivityTypeRequest(*swf.DeprecateActivityTypeInput) (*request.Request, *swf.DeprecateActivityTypeOutput)

	DeprecateActivityType(*swf.DeprecateActivityTypeInput) (*swf.DeprecateActivityTypeOutput, error)

	DeprecateDomainRequest(*swf.DeprecateDomainInput) (*request.Request, *swf.DeprecateDomainOutput)

	DeprecateDomain(*swf.DeprecateDomainInput) (*swf.DeprecateDomainOutput, error)

	DeprecateWorkflowTypeRequest(*swf.DeprecateWorkflowTypeInput) (*request.Request, *swf.DeprecateWorkflowTypeOutput)

	DeprecateWorkflowType(*swf.DeprecateWorkflowTypeInput) (*swf.DeprecateWorkflowTypeOutput, error)

	DescribeActivityTypeRequest(*swf.DescribeActivityTypeInput) (*request.Request, *swf.DescribeActivityTypeOutput)

	DescribeActivityType(*swf.DescribeActivityTypeInput) (*swf.DescribeActivityTypeOutput, error)

	DescribeDomainRequest(*swf.DescribeDomainInput) (*request.Request, *swf.DescribeDomainOutput)

	DescribeDomain(*swf.DescribeDomainInput) (*swf.DescribeDomainOutput, error)

	DescribeWorkflowExecutionRequest(*swf.DescribeWorkflowExecutionInput) (*request.Request, *swf.DescribeWorkflowExecutionOutput)

	DescribeWorkflowExecution(*swf.DescribeWorkflowExecutionInput) (*swf.DescribeWorkflowExecutionOutput, error)

	DescribeWorkflowTypeRequest(*swf.DescribeWorkflowTypeInput) (*request.Request, *swf.DescribeWorkflowTypeOutput)

	DescribeWorkflowType(*swf.DescribeWorkflowTypeInput) (*swf.DescribeWorkflowTypeOutput, error)

	GetWorkflowExecutionHistoryRequest(*swf.GetWorkflowExecutionHistoryInput) (*request.Request, *swf.GetWorkflowExecutionHistoryOutput)

	GetWorkflowExecutionHistory(*swf.GetWorkflowExecutionHistoryInput) (*swf.GetWorkflowExecutionHistoryOutput, error)

	GetWorkflowExecutionHistoryPages(*swf.GetWorkflowExecutionHistoryInput, func(*swf.GetWorkflowExecutionHistoryOutput, bool) bool) error

	ListActivityTypesRequest(*swf.ListActivityTypesInput) (*request.Request, *swf.ListActivityTypesOutput)

	ListActivityTypes(*swf.ListActivityTypesInput) (*swf.ListActivityTypesOutput, error)

	ListActivityTypesPages(*swf.ListActivityTypesInput, func(*swf.ListActivityTypesOutput, bool) bool) error

	ListClosedWorkflowExecutionsRequest(*swf.ListClosedWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionInfos)

	ListClosedWorkflowExecutions(*swf.ListClosedWorkflowExecutionsInput) (*swf.WorkflowExecutionInfos, error)

	ListClosedWorkflowExecutionsPages(*swf.ListClosedWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool) error

	ListDomainsRequest(*swf.ListDomainsInput) (*request.Request, *swf.ListDomainsOutput)

	ListDomains(*swf.ListDomainsInput) (*swf.ListDomainsOutput, error)

	ListDomainsPages(*swf.ListDomainsInput, func(*swf.ListDomainsOutput, bool) bool) error

	ListOpenWorkflowExecutionsRequest(*swf.ListOpenWorkflowExecutionsInput) (*request.Request, *swf.WorkflowExecutionInfos)

	ListOpenWorkflowExecutions(*swf.ListOpenWorkflowExecutionsInput) (*swf.WorkflowExecutionInfos, error)

	ListOpenWorkflowExecutionsPages(*swf.ListOpenWorkflowExecutionsInput, func(*swf.WorkflowExecutionInfos, bool) bool) error

	ListWorkflowTypesRequest(*swf.ListWorkflowTypesInput) (*request.Request, *swf.ListWorkflowTypesOutput)

	ListWorkflowTypes(*swf.ListWorkflowTypesInput) (*swf.ListWorkflowTypesOutput, error)

	ListWorkflowTypesPages(*swf.ListWorkflowTypesInput, func(*swf.ListWorkflowTypesOutput, bool) bool) error

	PollForActivityTaskRequest(*swf.PollForActivityTaskInput) (*request.Request, *swf.PollForActivityTaskOutput)

	PollForActivityTask(*swf.PollForActivityTaskInput) (*swf.PollForActivityTaskOutput, error)

	PollForDecisionTaskRequest(*swf.PollForDecisionTaskInput) (*request.Request, *swf.PollForDecisionTaskOutput)

	PollForDecisionTask(*swf.PollForDecisionTaskInput) (*swf.PollForDecisionTaskOutput, error)

	PollForDecisionTaskPages(*swf.PollForDecisionTaskInput, func(*swf.PollForDecisionTaskOutput, bool) bool) error

	RecordActivityTaskHeartbeatRequest(*swf.RecordActivityTaskHeartbeatInput) (*request.Request, *swf.RecordActivityTaskHeartbeatOutput)

	RecordActivityTaskHeartbeat(*swf.RecordActivityTaskHeartbeatInput) (*swf.RecordActivityTaskHeartbeatOutput, error)

	RegisterActivityTypeRequest(*swf.RegisterActivityTypeInput) (*request.Request, *swf.RegisterActivityTypeOutput)

	RegisterActivityType(*swf.RegisterActivityTypeInput) (*swf.RegisterActivityTypeOutput, error)

	RegisterDomainRequest(*swf.RegisterDomainInput) (*request.Request, *swf.RegisterDomainOutput)

	RegisterDomain(*swf.RegisterDomainInput) (*swf.RegisterDomainOutput, error)

	RegisterWorkflowTypeRequest(*swf.RegisterWorkflowTypeInput) (*request.Request, *swf.RegisterWorkflowTypeOutput)

	RegisterWorkflowType(*swf.RegisterWorkflowTypeInput) (*swf.RegisterWorkflowTypeOutput, error)

	RequestCancelWorkflowExecutionRequest(*swf.RequestCancelWorkflowExecutionInput) (*request.Request, *swf.RequestCancelWorkflowExecutionOutput)

	RequestCancelWorkflowExecution(*swf.RequestCancelWorkflowExecutionInput) (*swf.RequestCancelWorkflowExecutionOutput, error)

	RespondActivityTaskCanceledRequest(*swf.RespondActivityTaskCanceledInput) (*request.Request, *swf.RespondActivityTaskCanceledOutput)

	RespondActivityTaskCanceled(*swf.RespondActivityTaskCanceledInput) (*swf.RespondActivityTaskCanceledOutput, error)

	RespondActivityTaskCompletedRequest(*swf.RespondActivityTaskCompletedInput) (*request.Request, *swf.RespondActivityTaskCompletedOutput)

	RespondActivityTaskCompleted(*swf.RespondActivityTaskCompletedInput) (*swf.RespondActivityTaskCompletedOutput, error)

	RespondActivityTaskFailedRequest(*swf.RespondActivityTaskFailedInput) (*request.Request, *swf.RespondActivityTaskFailedOutput)

	RespondActivityTaskFailed(*swf.RespondActivityTaskFailedInput) (*swf.RespondActivityTaskFailedOutput, error)

	RespondDecisionTaskCompletedRequest(*swf.RespondDecisionTaskCompletedInput) (*request.Request, *swf.RespondDecisionTaskCompletedOutput)

	RespondDecisionTaskCompleted(*swf.RespondDecisionTaskCompletedInput) (*swf.RespondDecisionTaskCompletedOutput, error)

	SignalWorkflowExecutionRequest(*swf.SignalWorkflowExecutionInput) (*request.Request, *swf.SignalWorkflowExecutionOutput)

	SignalWorkflowExecution(*swf.SignalWorkflowExecutionInput) (*swf.SignalWorkflowExecutionOutput, error)

	StartWorkflowExecutionRequest(*swf.StartWorkflowExecutionInput) (*request.Request, *swf.StartWorkflowExecutionOutput)

	StartWorkflowExecution(*swf.StartWorkflowExecutionInput) (*swf.StartWorkflowExecutionOutput, error)

	TerminateWorkflowExecutionRequest(*swf.TerminateWorkflowExecutionInput) (*request.Request, *swf.TerminateWorkflowExecutionOutput)

	TerminateWorkflowExecution(*swf.TerminateWorkflowExecutionInput) (*swf.TerminateWorkflowExecutionOutput, error)
}

var _ SWFAPI = (*swf.SWF)(nil)


text:
from Protocol import Protocol

class NoProtocol(Protocol):
    """
        The NoProtocol class has the same role as the NoProxy class. The NoProtocol class is a wrapper around a bytes
         array so classes can treat it like any other protocol. This makes working with protocol objects easier.
    """
    def __init__(self, my_bytes):
        Protocol.__init__(self)
        self._bytes = my_bytes

    def __str__(self):
        return self._bytes.decode()

    def get_bytes(self):
        return self._bytes


text:
using System;

namespace EnterSentials.Framework
{
    public abstract class ObjectCopierBase<TFrom, TTo> : IObjectCopier<TFrom, TTo>, IObjectCopier
    {
        private readonly Type fromType = typeof(TFrom);
        private readonly Type toType = typeof(TTo);

        public Type FromType { get { return fromType; } }
        public Type ToType { get { return toType; } }

        public abstract void Copy(TFrom from, TTo to);

        public void Copy(object from, object to)
        { Copy((TFrom)from, (TTo)to); }
    }
}


text:
<?php
/**
 * Main class
 *
 * @author  Your Inspiration Themes
 * @package YITH WooCommerce Ajax Navigation
 * @version 1.3.2
 */

if ( ! defined( 'YITH_WCAN' ) ) {
    exit;
} // Exit if accessed directly

if ( ! class_exists( 'YITH_WCAN' ) ) {
    /**
     * YITH WooCommerce Ajax Navigation
     *
     * @since 1.0.0
     */
    class YITH_WCAN {
        /**
         * Plugin version
         *
         * @var string
         * @since 1.0.0
         */
        public $version;

        /**
         * Frontend object
         *
         * @var string
         * @since 1.0.0
         */
        public $frontend = null;

        /**
         * Admin object
         *
         * @var string
         * @since 1.0.0
         */
        public $admin = null;

        /**
         * Main instance
         *
         * @var string
         * @since 1.4.0
         */
        protected static $_instance = null;

        /**
         * Constructor
         *
         * @return mixed|YITH_WCAN_Admin|YITH_WCAN_Frontend
         * @since 1.0.0
         */
        public function __construct() {

            $this->version = YITH_WCAN_VERSION;

            /* Load Plugin Framework */
            add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ) );

            /* Register Widget */
            add_action( 'widgets_init', array( $this, 'registerWidgets' ) );

            $this->required();

            $this->init();
        }

        /**
         * Load and register widgets
         *
         * @access public
         * @since  1.0.0
         */
        public function registerWidgets() {
            $widgets = apply_filters( 'yith_wcan_widgets', array(
                    'YITH_WCAN_Navigation_Widget',
                    'YITH_WCAN_Reset_Navigation_Widget',
                )
            );

            foreach( $widgets as $widget ){
                register_widget( $widget );
            }
        }

        /**
		 * Load plugin framework
		 *
		 * @author Andrea Grillo <andrea.grillo@yithemes.com>
		 * @since  1.0
		 * @return void
		 */
		public function plugin_fw_loader() {
			if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
                global $plugin_fw_data;
                if( ! empty( $plugin_fw_data ) ){
                    $plugin_fw_file = array_shift( $plugin_fw_data );
                    require_once( $plugin_fw_file );
                }
            }
		}

        /**
		 * Main plugin Instance
		 *
		 * @return YITH_Vendors Main instance
		 * @author Andrea Grillo <andrea.grillo@yithemes.com>
		 */
		public static function instance() {

            if( class_exists( 'YITH_WCAN_Premium' ) ){
                //Premium Class
                if( is_null( YITH_WCAN_Premium::$_instance ) ){
                    YITH_WCAN_Premium::$_instance = new YITH_WCAN_Premium();
                }

                return YITH_WCAN_Premium::$_instance;
            }

            // Base Class
            else {
                 //Premium Class
                if( is_null( YITH_WCAN::$_instance ) ){
                    YITH_WCAN::$_instance = new YITH_WCAN();
                }

                return YITH_WCAN::$_instance;
            }
		}

        /**
         * Load required files
         *
         * @since 1.4
         * @return void
         * @author Andrea Grillo <andrea.grillo@yithemes.com>
         */
        public function required(){
            $required = apply_filters( 'yith_wcan_required_files', array(
                    'includes/functions.yith-wcan.php',
                    'includes/class.yith-wcan-admin.php',
                    'includes/class.yith-wcan-frontend.php',
                    'includes/class.yith-wcan-helper.php',
                    'widgets/class.yith-wcan-navigation-widget.php',
                    'widgets/class.yith-wcan-reset-navigation-widget.php',
                )
            );

            foreach( $required as $file ){
                file_exists( YITH_WCAN_DIR . $file ) && require_once( YITH_WCAN_DIR . $file );
            }
        }

        public function init() {
            if ( is_admin() ) {
                $this->admin = new YITH_WCAN_Admin( $this->version );
            }
            else {
                $this->frontend = new YITH_WCAN_Frontend( $this->version );
            }
        }

    }
}


text:
"""Handles reports over scheduler data."""

import time
import datetime
import itertools
import logging

import numpy as np
import pandas as pd
from functools import reduce

_LOGGER = logging.getLogger(__name__)

def servers(cell):
    """Returns dataframe for servers hierarchy."""

    def _server_row(server):
        """Converts server object to dict used to construct dataframe row.
        """
        row = {
            'name': server.name,
            'memory': server.init_capacity[0],
            'cpu': server.init_capacity[1],
            'disk': server.init_capacity[2],
            'traits': server.traits.traits,
            'free.memory': server.free_capacity[0],
            'free.cpu': server.free_capacity[1],
            'free.disk': server.free_capacity[2],
            'state': server.state.value,
            'valid_until': server.valid_until
        }

        node = server.parent
        while node:
            row[node.level] = node.name
            node = node.parent

        return row

    frame = pd.DataFrame.from_dict([
        _server_row(server) for server in cell.members().values()
    ])
    if frame.empty:
        frame = pd.DataFrame(columns=['name', 'memory', 'cpu', 'disk',
                                      'free.memory', 'free.cpu', 'free.disk',
                                      'state'])
    for col in ['valid_until']:
        frame[col] = pd.to_datetime(frame[col], unit='s')

    return frame.set_index('name')

def allocations(cell):
    """Converts cell allocations into dataframe row."""

    def _leafs(path, alloc):
        """Generate leaf allocations - (path, alloc) tuples."""
        if not alloc.sub_allocations:
            return iter([('/'.join(path), alloc)])
        else:
            def _chain(acc, item):
                """Chains allocation iterators."""
                name, suballoc = item
                return itertools.chain(acc, _leafs(path + [name], suballoc))

            return reduce(_chain, iter(alloc.sub_allocations.items()), [])

    def _alloc_row(label, name, alloc):
        """Converts allocation to dict/dataframe row."""
        if not name:
            name = 'root'
        if not label:
            label = '-'

        return {
            'label': label,
            'name': name,
            'memory': alloc.reserved[0],
            'cpu': alloc.reserved[1],
            'disk': alloc.reserved[2],
            'rank': alloc.rank,
            'traits': alloc.traits,
            'max_utilization': alloc.max_utilization,
        }

    all_allocs = []
    for label, partition in cell.partitions.items():
        allocation = partition.allocation
        leaf_allocs = _leafs([], allocation)
        alloc_df = pd.DataFrame.from_dict(
            [_alloc_row(label, name, alloc) for name, alloc in leaf_allocs]
        ).set_index(['label', 'name'])
        all_allocs.append(alloc_df)
    return pd.concat(all_allocs)

def apps(cell):
    """Return application queue and app details as dataframe."""

    def _app_row(item):
        """Converts app queue item into dict for dataframe row."""
        rank, util, pending, order, app = item
        return {
            'instance': app.name,
            'affinity': app.affinity.name,
            'allocation': app.allocation.name,
            'rank': rank,
            'label': app.allocation.label,
            'util': util,
            'pending': pending,
            'order': order,
            'identity_group': app.identity_group,
            'identity': app.identity,
            'memory': app.demand[0],
            'cpu': app.demand[1],
            'disk': app.demand[2],
            'lease': app.lease,
            'expires': app.placement_expiry,
            'data_retention_timeout': app.data_retention_timeout,
            'server': app.server
        }

    queue = []
    for partition in cell.partitions.values():
        allocation = partition.allocation
        queue += allocation.utilization_queue(cell.size(allocation.label))

    frame = pd.DataFrame.from_dict([_app_row(item) for item in queue])
    if frame.empty:
        return frame

    for col in ['expires']:
        frame[col] = pd.to_datetime(frame[col], unit='s')
    for col in ['lease', 'data_retention_timeout']:
        frame[col] = pd.to_timedelta(frame[col], unit='s')

    return frame.set_index('instance')

def utilization(prev_utilization, apps_df):
    """Returns dataseries describing cell utilization.

    prev_utilization - utilization dataframe before current.
    apps - app queue dataframe.
    """
    # Passed by ref.
    row = apps_df.reset_index()
    if row.empty:
        return row

    row['count'] = 1
    row['name'] = row['instance'].apply(lambda x: x.split('#')[0])
    row = row.groupby('name').agg({'cpu': np.sum,
                                   'memory': np.sum,
                                   'disk': np.sum,
                                   'count': np.sum,
                                   'util': np.max})
    row = row.stack()
    dt_now = datetime.datetime.fromtimestamp(time.time())
    current = pd.DataFrame([row], index=pd.DatetimeIndex([dt_now]))

    if prev_utilization is None:
        return current
    else:
        return prev_utilization.append(current)


text:
/* -------------------------------------------------------------------------
@file input_command.c

@date 11/22/16 00:34:45
@author Martin Noblia
@email martin.noblia@openmailbox.org

@brief

@detail

Licence:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
---------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils.h"

int main(void)
{
   char command[16];
   printf("Enter a command: ");
   scanf("%s", command);
   if(strcmp(command, "Quit") == 0){
      printf("The command was Quit");
   }else{
      printf("The command was not Quit");
   }

   return 0;
}


text:
<?php
require_once dirname(__FILE__).'/../OutletTestCase.php';

class RelationshipsTest extends OutletTestCase {

	function testOneToMany () {
		// insert a project and some bugs
		$project = new Project;
		$project->setName('Cool Project');

		$bug1 = new Bug;
		$bug1->Title = 'Bug 1';
		$project->addBug( $bug1 );

		$bug2 = new Bug;
		$bug2->Title = 'Bug2';
		$project->addBug( $bug2 );

		$outlet = Outlet::getInstance();

		$outlet->save($project);

		$project = $outlet->load('Project', $project->getProjectID());

		$this->assertEquals( count($project->getBugs()), 2 );
	}

	function testManyToOne () {
		$bug = new Bug;
		$bug->Title = 'Test Bug';

		$project = new Project;
		$project->setName('Test Project');

		$bug->setProject( $project );

		$outlet = Outlet::getInstance();

		$outlet->save( $bug );
	}

	/*
	function testAddBugWithNoProject () {
		$bug = new Bug;
		$bug->Title = 'Test Bug';

		$outlet = Outlet::getInstance();

		$outlet->save( $bug );
	}
	*/

	function testOneToOne () {
		$user = new User;
		$user->FirstName = 'Alvaro';
		$user->LastName = 'Carrasco';

		$outlet = Outlet::getInstance();
		$outlet->save($user);

		$profile = new Profile;
		$profile->setUserID( $user->UserID );

		$outlet = Outlet::getInstance();

		$outlet->save( $profile );

		$user = $profile->getUser();
	}

	function testManyToMany () {
		$user = new User;
		$user->Firstname = 'Alvaro';
		$user->LastName = 'Carrasco';

		$bug = new Bug;
		$bug->Name = 'Test Bug';

		$project = new Project;
		$project->setName('Test Project');

		$bug->setProject($project);

		$outlet = Outlet::getInstance();
		$outlet->save($user);
		$outlet->save($bug);

		$user->getBugs()->add($bug);

		$outlet->save($user);

		$this->assertTrue(count($user->getBugs()) == 1, 'One project attached to this user');
	}

	function testPlural () {
		$addr = new Address;
		$addr->Street = 'Test Street';

		$user = new User;
		$user->addWorkAddress( $addr );

		$outlet = Outlet::getInstance();

		$outlet->save( $user );
	}

	function testUpdateAfterRelationshipUpdate () {
		$outlet = Outlet::getInstance();

		$p = new Project;
		$p->setName('Name 1');

		$b = new Bug;
		$b->Title = 'Test Bug';

		$p->addBug($b);

		$outlet->save($p);
		$projectid = $p->getProjectID();

		$p->setName('Name 2');

		$outlet->save($p);

		$p = $outlet->load('Project', $projectid);

		$this->assertEquals(	$p->getName(), 'Name 2' );
	}

}


text:
<?php

include_once __DIR__ .  '/_common.php';

no_access_if_not_allowed('counter');

$query = <<<SQL
SELECT
  val.machine,
  val.`engine` AS device,
  m.name AS machineName,
  d.name AS name,
  f.name AS factoryName
FROM `values` val
INNER JOIN machines m ON m.id=val.machine
INNER JOIN engines d ON d.id=val.`engine`
INNER JOIN factories f ON f.id=m.factory
WHERE val.variable=:variable
GROUP BY val.machine, val.`engine`
SQL;

$var = get_counter_var();

$counters = fetch_all($query, array(':variable' => $var));

$factories = array();

foreach ($counters as $counter)
{
  if (!has_access_to_machine($counter->machine))
  {
    continue;
  }

  if (!isset($factories[$counter->factoryName]))
  {
    $factories[$counter->factoryName] = array();
  }

  if (!isset($factories[$counter->factoryName][$counter->machineName]))
  {
    $factories[$counter->factoryName][$counter->machineName] = array();
  }

  $factories[$counter->factoryName][$counter->machineName][] = $counter;
}

$hasAnyCounters = !empty($counters);

?>

<? begin_slot('head') ?>

<? append_slot() ?>

<? decorate("Lista liczników") ?>

Liczniki

    <? if ($hasAnyCounters): ?>

      <? foreach ($factories as $factory => $machines): ?>

          <?= e($factory) ?>

        <? foreach ($machines as $machine => $counters): ?>

            <?= e($machine) ?>

          <? foreach ($counters as $counter): ?>

                <a href="<?= url_for("counter/view.php?machine={$counter->machine}&device={$counter->device}&var={$var}") ?>"><?= e($counter->name) ?>

          <? endforeach ?>
        <? endforeach ?>
      <? endforeach ?>

    <? else: ?>

Aktualnie nie ma żadnych liczników.

    <? endif ?>
    <form action="<?= url_for('counter/') ?>" method="get">
      <fieldset>

            Zmienna:
            <input id="var" name="var" type="text" value="<?= $var ?>">

            <input type="submit" value="Zmień">

      </fieldset>
    </form>


text:
var App = require('app');
require('views/wizard/step10_view');
var view;
describe('App.WizardStep10View', function() {
  beforeEach(function() {
    view = App.WizardStep10View.create({
      controller: App.WizardStep10Controller.create({
        isAddServiceWizard: false
      })
    });
  });
  describe('#didInsertElement()', function() {

    beforeEach(function () {
      sinon.stub(view.get('controller'), 'loadStep', Em.K);
    });

    afterEach(function () {
      view.get('controller').loadStep.restore();
    });

    it('should call loadStep', function() {
      view.didInsertElement();
      expect(view.get('controller').loadStep.calledOnce).to.equal(true);
    });
  });

  describe("#serviceRestartText", function() {
    it("text is empty", function() {
      view.set('controller.isAddServiceWizard', false);
      expect(view.get('serviceRestartText')).to.be.empty;
    });
    it("text is complete", function() {
      view.set('controller.isAddServiceWizard', true);
      expect(view.get('serviceRestartText')).to.equal(Em.I18n.t('common.important.strong') + Em.I18n.t('installer.step10.staleServicesRestartRequired'));
    });
  });
});


text:
<!DOCTYPE html>

    <title>Directives</title>

    <link href="../../bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
    <link href="../../bower_components/bootstrap/dist/css/bootstrap-theme.css" rel="stylesheet" />

To Do List

The first item is: {{todos[0].action}}

        Set First Item:
        <input id='firstItem' name="firstItem" class="form-control" ng-model="todos[0].action" />


text:
GtkWidget *gtk_combo_box_text_new(void)
{
	return gtk_combo_box_new();
}

void gtk_combo_box_text_append_text(GtkComboBoxText *combo_box,
				    const gchar *text)
{
	gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), text);
}

void gtk_combo_box_text_insert_text(GtkComboBoxText *combo_box, gint position,
				    const gchar *text)
{
	gtk_combo_box_insert_text(GTK_COMBO_BOX(combo_box), position, text);
}

void gtk_combo_box_text_prepend_text(GtkComboBoxText *combo_box,
				     const gchar *text)
{
	gtk_combo_box_prepend_text(GTK_COMBO_BOX(combo_box), text);
}

gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box)
{
	return gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo_box));
}

#endif

#if GTK_MAJOR_VERSION < 3

guint gtk_widget_get_allocated_width(GtkWidget *w)
{
	return w->allocation.width;
}

guint gtk_widget_get_allocated_height(GtkWidget *w)
{
	return w->allocation.height;
}

#endif

#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 18
void gtk_widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
{
	if (can_focus)
		GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
	else
		GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
}
#endif


text:
package com.blazebit.persistence;

/**
 *
 * @author Christian Beikov
 * @author Moritz Becker
 * @since 1.0.0
 */
public final class ConfigurationProperties {

    /**
     * We added a flag to enable a JPA compatible mode because we allow to make use of many vendor
     * specific extensions which maybe aren't portable. By enabling the compatible mode functionality
     * is restricted but more portable.
     * By default the compatible mode is disabled because most JPA providers support the same extensions.
     * Valid values for this property are true or false.
     *
     * @since 1.0.5
     */
    public static final String COMPATIBLE_MODE = "com.blazebit.persistence.compatible_mode";

    /**
     * Some databases require case sensitivity for attribute paths in the returning clause
     * (unlike PostgreSQL which requires case insensitivity for column names in returning clause)
     * By default the returning clause is case sensitive.
     * Valid values for this property are true or false.
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.1.0
     */
    public static final String RETURNING_CLAUSE_CASE_SENSITIVE = "com.blazebit.persistence.returning_clause_case_sensitive";

    /**
     * If set to false, uses of SIZE will always be transformed to subqueries.
     * By default the size to count transformation is enabled.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.1.0
     */
    public static final String SIZE_TO_COUNT_TRANSFORMATION = "com.blazebit.persistence.size_to_count_transformation";

    /**
     * If set to false, no implicit group by clauses will be generated from the SELECT part of the query.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.1.0
     */
    public static final String IMPLICIT_GROUP_BY_FROM_SELECT = "com.blazebit.persistence.implicit_group_by_from_select";

    /**
     * If set to false, no implicit group by clauses will be generated from the HAVING part of the query.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.1.0
     */
    public static final String IMPLICIT_GROUP_BY_FROM_HAVING = "com.blazebit.persistence.implicit_group_by_from_having";

    /**
     * If set to false, no implicit group by clauses will be generated from the ORDER BY part of the query.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.1.0
     */
    public static final String IMPLICIT_GROUP_BY_FROM_ORDER_BY = "com.blazebit.persistence.implicit_group_by_from_order_by";

    /**
     * If set to false, no expression optimization takes place.
     * Valid values for this property are true or false.
     * Default is true
     *
     * @since 1.1.0
     */
    public static final String EXPRESSION_OPTIMIZATION = "com.blazebit.persistence.expression_optimization";

    /**
     * The fully qualified expression cache implementation class name.
     *
     * @since 1.2.0
     */
    public static final String EXPRESSION_CACHE_CLASS = "com.blazebit.persistence.expression.cache_class";

    /**
     * If set to false, tuples of a VALUES clause with all null values won't be filtered out.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before using the VALUES clause.
     *
     * @since 1.2.0
     */
    public static final String VALUES_CLAUSE_FILTER_NULLS = "com.blazebit.persistence.values.filter_nulls";

    /**
     * If set to false, parameters are always rendered as such, otherwise the values might get inlined when no type can be inferred.
     * Valid values for this property are true or false.
     * Default is true
     *
     * The property can be changed for a criteria builder before constructing a query.
     *
     * @since 1.2.0
     */
    public static final String PARAMETER_AS_LITERAL_RENDERING = "com.blazebit.persistence.parameter_literal_rendering";

    /**
     * If set to true, the keyset predicate is rendered in an optimized form so that database optimizers are more likely
     * to use indices.
     * See https://github.com/Blazebit/blaze-persistence/issues/419
     * Default is true
     *
     * The property can be changed for a criteria builder before constructing a query.
     *
     * @since 1.2.0
     */
    public static final String OPTIMIZED_KEYSET_PREDICATE_RENDERING = "com.blazebit.persistence.optimized_keyset_predicate_rendering";

    /**
     * If set to true, the id query in a {@link PaginatedCriteriaBuilder} is inlined into the object query as subquery.
     * Valid values for this property are true, false or auto.
     * Default is auto which will make use of inlining if the JPA provider and DBMS dialect support it.
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.4.1
     * @see PaginatedCriteriaBuilder#withInlineIdQuery(boolean)
     */
    public static final String INLINE_ID_QUERY = "com.blazebit.persistence.inline_id_query";

    /**
     * If set to true, the count query in a {@link PaginatedCriteriaBuilder} is inlined into the id or object query as select item.
     * Valid values for this property are true, false or auto.
     * Default is auto which will make use of inlining if the JPA provider and DBMS dialect support it.
     *
     * The property can be changed for a criteria builder before generating the query.
     *
     * @since 1.4.1
     * @see PaginatedCriteriaBuilder#withInlineCountQuery(boolean)
     */
    public static final String INLINE_COUNT_QUERY = "com.blazebit.persistence.inline_count_query";

    /**
     * If set to true, the CTE queries are inlined by default.
     * Valid values for this property are true, false or auto.
     * Default is true which will always inline non-recursive CTEs.
     * The auto configuration will only make use of inlining if the JPA provider and DBMS dialect support/require it.
     *
     * The property can be changed for a criteria builder before constructing a query.
     *
     * @since 1.4.1
     * @see CTEBuilder#with(Class, boolean)
     * @see CTEBuilder#with(Class, CriteriaBuilder, boolean)
     */
    public static final String INLINE_CTES = "com.blazebit.persistence.inline_ctes";

    /**
     * If set to true, the query plans are cached and reused.
     * Valid values for this property are true and false.
     * Default is true.
     * This configuration option currently only takes effect when Hibernate is used as JPA provider.
     *
     * The property can be changed for a criteria builder before constructing a query.
     *
     * @since 1.5.0
     */
    public static final String QUERY_PLAN_CACHE_ENABLED = "com.blazebit.persistence.query_plan_cache_enabled";

    /**
     * If set to true, JPA Criteria predicates are wrapped in a negation predicate instead of copied with negation being propagated.
     * Valid values for this property are true and false.
     * Default is true.
     *
     * @since 1.6.3
     */
    public static final String CRITERIA_NEGATION_WRAPPER = "com.blazebit.persistence.criteria_negation_wrapper";

    /**
     * If set to true, values passed to the JPA {@link javax.persistence.criteria.CriteriaBuilder} API are rendered as parameters,
     * otherwise values are rendered as literals.
     * Valid values for this property are true and false.
     * Default is true.
     *
     * @since 1.6.3
     */
    public static final String CRITERIA_VALUE_AS_PARAMETER = "com.blazebit.persistence.criteria_value_as_parameter";

    private ConfigurationProperties() {
    }
}


text: export { WatsonHealthAiStatus as default } from "../";


text:
namespace atools {

//----------------------------------------------------------------------
//  AMisc : Miscellaneous
//----------------------------------------------------------------------
#define ERRLOG(fmt, ...) errlog(__FILE__, __LINE__, fmt, __VA_ARGS__)
#define ERRMSG(fmt, ...) errfmt(                    fmt, __VA_ARGS__)

void        errlog(const char* file, int line,
                   const char* fmt, ...);
void        errfmt(const char* fmt, ...);
void        outfmt(const char* fmt, ...);
void        ofsfmt(std::ofstream& ofs,
                   const char* fmt, ...);
std::string strfmt(const char* fmt, ...);

int tokenizer(const std::string& text,
              std::vector<std::string>& token,
              const char delimiter = '\t');

void getlinetrim(std::ifstream& ifs, std::string& buf);

} //namespace atools

#endif //AMISC_INCLUDED

//----------------------------------------------------------------------
//  End Of File
//----------------------------------------------------------------------


text:
module NoodallComponentsQuicklinks
  class Engine < Rails::Engine
  end
end


text:
NAMESPACE_UPP

typedef const signed char  LineStyle[];
typedef const signed char *LineStyleArg;

extern LineStyle SolidLine;
extern LineStyle DashLine;
extern LineStyle DotLine;
extern LineStyle DashDotLine;
extern LineStyle DashDotDotLine;
extern LineStyle EmptyLine;

class LineDraw
{
public:
	LineDraw();
	LineDraw(Draw& draw, LineStyleArg pattern = SolidLine, Color color = Black, int width = -10, double dash = 0);

	operator bool () const                { return draw && !empty; }

	void           Set(Draw& draw, LineStyleArg pattern = SolidLine, Color color = Black, int width = -10, double dash = 0);

	bool           SetExtent(const Rect& rc);
	void           ClearExtent();

	void           Clear();
	void           Flush(); // flush polyline buffer

	void           MoveTo(Point pt)       { ASSERT(MoveToRaw); (this->*MoveToRaw)(pt); }
	void           LineTo(Point pt)       { ASSERT(LineToRaw); (this->*LineToRaw)(pt); }
	void           Close();

	LineDraw&      operator << (Point pt) { LineTo(pt); return *this; }

	void           Line(Point p, Point q) { MoveTo(p); LineTo(q); }

	void           Rectangle(const Rect& rc);

	void           ArcTo(Point p, int bulge, int levels = 10);
	void           Arc(Point p, Point q, int bulge, int levels = 10) { MoveTo(p); ArcTo(q, bulge, levels); }
	void           Circle(Point centre, int radius);
	void           Ellipse(const Rect& rc);

private:
	void           RecurseArc(Point to, int length, int bulge, int levels);
	void           MoveToEmpty(Point pt);
	void           MoveToSolid(Point pt);
	void           MoveToDashed(Point pt);
	void           LineToEmpty(Point pt);
	void           LineToSolidSimple(Point pt);
	void           LineToSolidClip(Point pt);
	void           LineToDashedSimple(Point pt);
	void           LineToDashedClip(Point pt);
	void           AddVectorThin(Point a, Point b);
	void           AddVectorThick(Point a, Point b);
	void           AddVectorArea(Point a, Point b);

private:
	void (LineDraw::*MoveToRaw)(Point pt);
	void (LineDraw::*LineToRaw)(Point pt);
	void (LineDraw::*AddVector)(Point a, Point b);

	Draw          *draw;
	int            max_rad;
	int            pen_width;
	Color          pen_color;
	Rect           clip;
	Point          first;
	Point          last;
	Vector<double> segments;
	const double  *active;
	double         remains;
	double         factor;
	bool           empty;
	int            half_width;
	Vector<Point>  vertices;
	Vector<int>    indices;
};

class Plotter
{
public:
	Plotter() : draw(0), ltop(0), ltopoint(0), path_map(0) {}

	Plotter(Draw& draw, const Rectf& src, const Rectf& dest,
		int flags = ISOTROPIC | MIRROR_Y, int reserve = 0, double map_meters = 1)
	{ Set(draw, src, dest, flags, reserve, map_meters); }

	Plotter(Draw& draw, Sizef scale, Pointf delta = Pointf(0, 0), int reserve = 0, double map_meters = 1)
	{ Set(draw, scale, delta, reserve, map_meters); }

	Plotter(Draw& draw, const Matrixf& matrix = Matrixf_1(), int reserve = 0, double map_meters = 1)
	{ Set(draw, matrix, reserve, map_meters); }

	Plotter(Draw& draw, const Matrixf& matrix, const Rect& clip, double map_meters = 1)
	{ Set(draw, matrix, clip, map_meters); }

	Plotter(const Plotter& info, const Rect& clip)
	{ Set(info, clip); }

	Plotter(const Plotter& info, int reserve)
	{ Set(info, reserve); }

	Plotter(const Plotter& info)
	{ Set(info); }

	enum
	{
		MIRROR_X  = 0x01,
		MIRROR_Y  = 0x02,
		ISOTROPIC = 0x04,
	};

	void                Set(Draw& draw, const Rectf& src, const Rectf& dest, int flags = ISOTROPIC | MIRROR_Y, int reserve = 0, double map_meters = 1);
	void                Set(Draw& draw, Sizef scale, Pointf delta = Pointf(0, 0), int reserve = 0, double map_meters = 1);
	void                Set(Draw& draw, const Matrixf& matrix = Matrixf_1(), int reserve = 0, double map_meters = 1);
	void                Set(Draw& draw, const Matrixf& matrix, const Rect& clip, double map_meters = 1);
	void                Set(const Plotter& info, const Rect& clip);
	void                Set(const Plotter& info, int reserve);
	void                Set(const Plotter& info)                          { *this = info; }
	void                SetDraw(Draw& draw, const Rect& clip, double map_meters);

	void                SetPixelsPerDot(double  _ppd)                     { pixels_per_dot = _ppd; }
	double              GetPixelsPerDot() const                           { return pixels_per_dot; }
	double              GetPixelsPerPoint() const                         { return pixels_per_dot * (600.0 / 72.0); }
	double              GetPixelsPerInch() const                          { return pixels_per_dot * 600.0; }
	double              GetPixelsPerMeter() const                         { return pixels_per_dot * (6e5 / 25.4); }

	void                SetMapMeters(double mm);
	double              GetPhysicalScale() const                          { return physical_scale; }

	Draw&               GetDraw()                                         { ASSERT(draw); return *draw; }
	void                SetXorMode(bool xm);

	Point               LtoPoint(Pointf pt) const                         { ASSERT(ltopoint); return (this->*ltopoint)(pt); }

	double              LtoP(double dist) const                           { return dist * measure; }
	double              PtoL(double dist) const                           { return dist / measure; }

	Pointf              LtoP(Pointf pt) const                             { ASSERT(ltop); return (this->*ltop)(pt); }
	Pointf              LtoPrel(Pointf pt) const                          { return pt % physical; }

	Pointf              PtoL(Pointf pt) const                             { return pt * logical; }
	Pointf              PtoLrel(Pointf pt) const                          { return pt % logical; }

	Rectf               LtoP(const Rectf& rc) const;
	Rectf               LtoPrel(const Rectf& rc) const;

	Rectf               PtoL(const Rectf& rc) const;
	Rectf               PtoLrel(const Rectf& rc) const;

	const Matrixf&      LtoP() const                                      { return physical; }
	const Matrixf&      PtoL() const                                      { return logical; }

	const Rectf&        GetLClip() const                                  { return logclip; }
	const Rect&         GetPClip() const                                  { return clip; }

	bool                IntersectsLClip(const Rectf& rc) const            { return logclip && rc; }
	bool                IntersectsPClip(const Rectf& rc) const            { return rc.left < clip.right && rc.top < clip.bottom && rc.right > clip.left && rc.bottom > clip.top; }
	bool                InLClip(const Rectf& rc) const                    { return logclip.Contains(rc); }
	bool                InPClip(const Rectf& rc) const                    { return rc.left >= clip.left && rc.top >= clip.top && rc.right <= clip.right && rc.bottom <= clip.bottom; }
	bool                InLClip(Pointf pt) const                          { return logclip.Contains(pt); }
	bool                InPClip(Pointf pt) const                          { return pt.x >= clip.left && pt.y >= clip.top && pt.x <= clip.right && pt.y <= clip.bottom; }
	bool                InLClipX(double x) const                          { return x >= logclip.left && x <= logclip.right; }
	bool                InLClipY(double y) const                          { return y >= logclip.top  && y <= logclip.bottom; }

	void                PathMap(const PathStyleMap *pm)                   { path_map = pm; }
	const PathStyleMap *GetPathMap() const                                { return path_map; }
	PathStyle           GetPath(const String& spec) const                 { ASSERT(path_map); return path_map -> Scan(spec); }

public:
	Draw               *draw;
	const PathStyleMap *path_map;
	double              pixels_per_dot;
	double              map_meters;
	Matrixf             physical;
	Matrixf             logical;
	Rectf               logclip;
	Rect                clip;
	double              logdiag;
	double              logprec;
	double              signed_measure;
	double              measure;
	double              physical_scale;
	bool                ortho;

private:
	Pointf              LtoPFull(Pointf pt) const                   { return pt * physical; }
	Pointf              LtoPOrtho(Pointf pt) const                  { return Pointf(pt.x * physical.x.x + physical.a.x, pt.y * physical.y.y + physical.a.y); }

	Point               LtoPointFull(Pointf pt) const;
	Point               LtoPointOrtho(Pointf pt) const;

	Pointf              (Plotter::*ltop)(Pointf pt) const;
	Point               (Plotter::*ltopoint)(Pointf pt) const;
};

void PlotDragRect(Plotter& plotter, const Rectf& rc);

class PlotterTool
{
public:
	typedef PlotterTool CLASSNAME;
	PlotterTool();
	virtual ~PlotterTool();

	Plotter&          GetPlotter()                      { return plotter; }
	const Plotter&    GetPlotter() const                { return plotter; }

	virtual void      Paint(); // flush & clear paint buffer
	virtual void      Clear(); // clear paint buffer

	void              MoveTo(double x, double y)        { MoveToRaw(Pointf(x, y)); }
	void              MoveTo(Pointf pt)                 { MoveToRaw(pt); }
	void              MoveRel(Pointf pt)                { MoveToRaw(pt + last_point); }
	Callback1<Pointf> GetMoveTo() const                 { return MoveToRaw; }

	void              LineTo(double x, double y)        { LineToRaw(Pointf(x, y)); }
	void              LineTo(Pointf pt)                 { LineToRaw(pt); }
	void              LineRel(Pointf pt)                { LineToRaw(pt + last_point); }
	Callback1<Pointf> GetLineTo() const                 { return LineToRaw; }

	void              DrawTo(double x, double y, bool d) { if(d) LineTo(x, y); else MoveTo(x, y); }
	void              DrawTo(Pointf pt, bool d)         { if(d) LineTo(pt); else MoveTo(pt); }
	void              DrawRel(Point pt, bool d)         { if(d) LineRel(pt); else MoveRel(pt); }

	void              Line(Pointf p, Pointf q)          { MoveTo(p); LineTo(q); }
	void              Line(double x1, double y1, double x2, double y2) { MoveTo(x1, y1); LineTo(x2, y2); }
	void              Line(const Array<Pointf>& points);

	virtual void      ArcTo(Pointf pt, double bulge, int levels = 10);

	void              Rectangle(double x1, double y1, double x2, double y2, bool r = false);
	void              Rectangle(Pointf p, Pointf q, bool r = false) { Rectangle(p.x, p.y, q.x, q.y, r); }
	void              Rectangle(const Rectf& rc, bool r = false)    { Rectangle(rc.left, rc.top, rc.right, rc.bottom, r); }

	void              Circle(double x, double y, double radius);
	void              Circle(Pointf centre, double radius) { Circle(centre.x, centre.y, radius); }

	void              Ellipse(const Rectf& rc);

	void              ArrowHead(Pointf P, Pointf Q, double length, double angle);
	void              Arrow(Pointf P, Pointf Q, double length, double angle);
	void              BiArrow(Pointf P, Pointf Q, double length, double angle);

protected:
	virtual bool      ArcToRaw(Pointf pt, double bulge);

protected:
	Plotter           plotter;
	Pointf            last_point;
	bool              clip_arcs;

	Callback1<Pointf> MoveToRaw;
	Callback1<Pointf> LineToRaw;
};

class PathTool : public PlotterTool
{
public:
	typedef PathTool CLASSNAME;
	PathTool();
	virtual ~PathTool();

	virtual void   Paint(); // flush & clear paint buffer
	virtual void   Clear(); // clear paint buffer

	void           Reset();
	bool           Set(const Plotter& info, const String& style = Null,
		Color color = Black, int width = -10, double dash = Null);

	bool           SetExtent(const Rectf& rc);
	void           ClearExtent();

public:
#ifdef PLOTTER_TIMING
	static int     segments;
	static int     drawn;
	static long    ticks;
#endif

protected:
	virtual bool   ArcToRaw(Pointf pt, double bulge);

	void           MoveToRawDummy(Pointf pt);
	void           MoveToRawSimple(Pointf pt);
	void           MoveToRawClip(Pointf pt);
	void           LineToRawDummy(Pointf pt);
	void           LineToRawSimple(Pointf pt);
	void           LineToRawClip(Pointf pt);

protected:
	bool           use_last;
	Pointf         last_phys;
	PathDraw       pathdraw;
	bool           dummy;
	bool           simple;
};

class AreaTool : public PlotterTool
{
public:
	typedef AreaTool CLASSNAME;
	AreaTool();
	virtual ~AreaTool();

	void           FlushFill();

	virtual void   Paint(); // flush & clear paint buffer
	virtual void   Clear(); // clear paint buffer

	void           Reset();
	bool           Set(const Plotter& info, Color fill_color = Black, uint64 fill_pattern = 0,
		const String& outline_pattern = Null, Color outline_color = Black,
		int outline_width = -10, double outline_dash = Null);

	bool           SetExtent(const Rectf& rc);
	void           ClearExtent();

	int            GetPointPixels() const { return point_pixels; }
	Color          GetPointColor() const  { return point_color; }

	bool           IsFill() const { return !IsNull(fill_color); }
	bool           IsLine() const { return is_line; }
#ifdef _DEBUG
	void           ShowIndices();
#endif

	void           MoveToGhost(Pointf pt) { prev_ghost = true; MoveTo(pt); prev_ghost = false; }
	void           LineToGhost(Pointf pt) { prev_ghost = true; LineTo(pt); prev_ghost = false; }

protected:
	void           MoveToRawDummy(Pointf pt);
	void           MoveToRawSimple(Pointf pt);
	void           MoveToRawClip(Pointf pt);
	void           LineToRawDummy(Pointf pt);
	void           LineToRawSimple(Pointf pt);
	void           LineToRawClip(Pointf pt);

private:
	void           SkipTo(Point pt, bool clockwise);
	void           Flush();
	AreaTool&      Horz(int x);
	AreaTool&      Vert(int y);
	Point          ClipBind(Pointf pt) const
	{
		return Point(
			pt.x < plotter.clip.left ? plotter.clip.left : pt.x > plotter.clip.right  ? plotter.clip.right  : fround(pt.x),
			pt.y < plotter.clip.top  ? plotter.clip.top  : pt.y > plotter.clip.bottom ? plotter.clip.bottom : fround(pt.y));
	}

private:
	enum { FLUSH_BATCH = 6000 };
	Vector<Point>  vertices;
	Vector<int>    counts;
	Vector<int>    disjunct_counts;
	Vector<int>    ghost_lines;
	bool           prev_ghost;
	int            begin_index;
	int            disjunct_begin_index;
	Pointf         last_phys;
	Pointf         last_start;
	Pointf         clip_center;
	bool           last_in;
	bool           std_pen;
	bool           simple;
	bool           is_line;
	bool           dummy;

	int            point_pixels;
	Color          point_color;
	int            outline_pixels;
	PathDraw       raw_outline;
	Color          fill_outline_color;
	int            fill_outline_style;
	Color          thick_outline_color;
	uint64         fill_pattern;
	Color          fill_color;
};

class MarkTool {
public:
	class Marker {
	public:
		Marker() {}
		virtual ~Marker() {}

		virtual int  GetSize() const = 0;
		virtual void Paint(Draw& draw, const Vector<Point>& pt) = 0;
	};

	static One<Marker> Empty();
	static One<Marker> Square(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Triangle(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Circle(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Cross(int size = 10, Color outline = Black, int outline_width = 0);
	static One<Marker> Diamond(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Hexagon(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Star(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Square45(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Nabla(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> ThickCross(int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);
	static One<Marker> Letter(char ascii, int angle = 0, Font font = StdFont(), Color color = LtRed, Color outline = Black);
	static One<Marker> Picture(Image pic, int size = 0, Color color = LtRed, bool antialias = false, bool ignore_hotspot = false);
	// angle in degrees, 360 = full circle

	enum { CIRCLE, SQUARE, TRIANGLE, CROSS, DIAMOND, HEXAGON, STAR, SQUARE45, NABLA, THICK_CROSS, STD_MARK_COUNT }; // standard markers
	static One<Marker> StandardMarker(int type, int size = 10, Color color = LtRed, Color outline = Black, int outline_width = 0);

	MarkTool();
	virtual ~MarkTool();

	void             Reset();
	bool             Set(const Plotter& info, One<Marker> marker);
	bool             SetExtent(const Rectf& rc);
	void             ClearExtent();

	virtual void     Paint(); // flush & clear paint buffer
	virtual void     Clear(); // clear paint buffer
	void             Flush();

	void             Put(Pointf pt)  { ASSERT(PutRaw); (this->*PutRaw)(pt); }
	void             Put(const Array<Pointf>& pt);

private:
	void             PutDummy(Pointf pt);
	void             PutClip(Pointf pt);
	void             PutSimple(Pointf pt);

private:
	void (MarkTool::*PutRaw)(Pointf pt);
	Vector<Point>    vertices;
	One<Marker>      marker;
	Plotter          plotter;
	int              size;
	enum { BUF_COUNT = 8192 };
};

class TextTool
{
public:
	TextTool();
	virtual ~TextTool();

	void Set(const Plotter& info, Font font = Arial(0), Color color = Black, Color outline = Null,
		double angle = 0, Alignment x_align = ALIGN_CENTER, Alignment y_align = ALIGN_CENTER,
		bool flip = false, int angle_prec = 24);
	// angle in radians

	void             SetFont(Font _font);
	void             SetColor(Color _color)          { color   = _color; }
	void             SetOutline(Color _outline)      { outline = _outline; }
	void             SetAngle(double _angle)         { angle   = _angle; }
	void             SetXAlign(Alignment _x)         { x_align = _x; }
	void             SetYAlign(Alignment _y)         { y_align = _y; }
	void             SetFlip(bool _flip)             { flip    = _flip; }

	void             Put(const String& text, Pointf pt, double angle);
	void             Put(const String& text, Pointf pt) { Put(text, pt, angle); }
	void             PutFlip(const String& text, Pointf pt, double angle);

	virtual void     Paint(); // flush & clear paint buffer
	virtual void     Clear(); // clear paint buffer

public:
	Plotter          plotter;
	Font             font;
	Color            color;
	Color            outline;
	double           angle;
	Alignment        x_align;
	Alignment        y_align;
	bool             flip;
	int              angle_prec;

private:
	void             Flush();
	void             ClearCache();

private:
	struct Type
	{
		int   height;
		short widths[256];

		Size  GetTextSize(const String& text) const;
	};

	struct Item
	{
		Item(Point point, const String& text, Color color, Color outline)
		: point(point), text(text), color(color), outline(outline) {}

		int    GetSize() const { return sizeof(*this) + text.GetLength(); }

		Point  point;
		String text;
		Color  color;
		Color  outline;
	};

	enum { CACHE_LIMIT = 1000000, FONT_LIMIT = 100 };
	int              cache_size;
	int              font_index;
	ArrayMap<Font, Type> font_map;
	VectorMap<int, Array<Item> > cache;
};

END_UPP_NAMESPACE


text:
CleverSteam
===========

Let Cleverbot reply to your Steam friends


text:
package net.safedata.springboot.training.d01.s03.service;

import net.safedata.springboot.training.d01.s03.repository.ProductRepository;

import javax.annotation.PreDestroy;

/**
 * A simple product service, which uses a {@link ProductRepository} as a collaborator
 *
 * @author bogdan.solga
 */
public class ProductService {

    private final ProductRepository productRepository;

    public ProductService(final ProductRepository productRepository) {
        this.productRepository = productRepository;
    }

    public void displayProducts() {
        productRepository.displayProducts();
    }

    @PreDestroy
    public void closeResources() {
        System.out.println("Closing the used resources, by the PreDestroy annotation...");
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>ImageList — Leap Motion C++ SDK v3.1 documentation</title>

    <link rel="stylesheet" href="../../cpp/_static/bootstrap-3.0.0/css/documentation-bundle.1471552333.css" type="text/css" />

    <link rel="top" title="Leap Motion C++ SDK v3.1 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="Leap_Classes.html" />
    <link rel="next" title="InteractionBox" href="Leap.InteractionBox.html" />
    <link rel="prev" title="Image" href="Leap.Image.html" />

<link rel="stylesheet" href="/assets/standalone-header.css?r9" type="text/css" />

<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">

            Developer Portal

      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">

      </button>

What's new

Getting Started

Documentation

 Examples

 Blog

 Community

      JavaScript

      Unity

      C#

      C++

      Java

      Python

      Objective-C

      Unreal

<form class="navbar-form" action="../search.html" method="get" onsubmit="storeThisPage()">

  <input type="search" results="5" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

ImageList¶

Methods:

ImageList()

append(const ImageList &other)

begin() const

count() const

end() const

isEmpty() const

operator[](int index) const

class Leap::ImageList

The ImageList class represents a list of Image objects.

Get the ImageList object associated with the a Frame of tracking data by calling Frame::images(). Get the most recent set of images, which can be newer than the images used to create the current frame, by calling Controller::images().

Since

2.1.0

Public Type

typedef ConstListIterator<  ImageList ,  Image  > const_iterator

A C++ iterator type for ImageList objects.

Since

2.1.0

Public Functions

ImageList  & append(const  ImageList  & other)

Appends the members of the specified ImageList to this ImageList.

Since

2.1.0

Parameters

<tt class="first docutils literal">other</tt> -
A ImageList object containing Image objects to append to the end of this ImageList.

const_iterator begin()

The C++ iterator set to the beginning of this ImageList.

Since

2.1.0

int count()

The number of images in this list.

Return

The number of images in this list.

Since

2.1.0

const_iterator end()

The C++ iterator set to the end of this ImageList.

Since

2.1.0

 ImageList()

Constructs an empty list of images.

Since

2.1.0

bool isEmpty()

Reports whether the list is empty.

Return

True, if the list has no members.

Since

2.1.0

Image operator[](int index)

Access a list member by its position in the list.

Return

The Image object at the specified index.

Since

2.1.0

Parameters

<tt class="first docutils literal">index</tt> -
The zero-based list position index.

C++ Docs (v3.1)

API Overview

Guidelines

Application Development

Using the Tracking API

API Reference

Arm

Bone

Config

Controller

Device

DeviceList

FailedDevice

FailedDeviceList

Finger

FingerList

Frame

Hand

HandList

Image

ImageList

InteractionBox

Listener

Matrix

Pointable

PointableList

Vector

Appendices


text:
"""Tests for truth table magic access methods (__getitem__, __iter__, etc.)."""

from tt.tables import TruthTable

from ._helpers import TruthTableTestCase

class TestTruthTableMagicAccessMethods(TruthTableTestCase):

    def test_table_iter_unfilled(self):
        """Test iterating through a table that has not been filled."""
        t = TruthTable('A or B', fill_all=False)
        count = 0

        for inputs, result in t:
            count += 1

        self.assertEqual(count, 0)

    def test_table_iter_partially_filled(self):
        """Test iterating through a table that is partially filled."""
        t = TruthTable('A xor C', fill_all=False)
        t.fill(C=1)
        count = 0

        for inputs, result in t:
            if count == 0:
                self.assertEqual(inputs.A, False)
                self.assertEqual(inputs.C, True)
                self.assertEqual(result, True)
            elif count == 1:
                self.assertEqual(inputs.A, True)
                self.assertEqual(inputs.C, True)
                self.assertEqual(result, False)

            count += 1

        self.assertEqual(count, 2)

    def test_table_iter_completely_filled(self):
        """Test iterating through a table that is completely full."""
        t = TruthTable('B nand D')
        count = 0

        for inputs, result in t:
            if count == 0:
                self.assertEqual(inputs.B, False)
                self.assertEqual(inputs.D, False)
                self.assertEqual(result, True)
            elif count == 1:
                self.assertEqual(inputs.B, False)
                self.assertEqual(inputs.D, True)
                self.assertEqual(result, True)
            elif count == 2:
                self.assertEqual(inputs.B, True)
                self.assertEqual(inputs.D, False)
                self.assertEqual(result, True)
            elif count == 3:
                self.assertEqual(inputs.B, True)
                self.assertEqual(inputs.D, True)
                self.assertEqual(result, False)

            count += 1

        self.assertEqual(count, 4)

    def test_table_getitem(self):
        """Test indexing the table to get its results."""
        t = TruthTable('A or B', fill_all=False)
        for i in range(4):
            self.assertEqual(None, t[i])

        t.fill(A=0)
        self.assertEqual(t[0], False)
        self.assertEqual(t[1], True)

        t.fill()
        self.assertEqual(t[0b00], False)
        self.assertEqual(t[0b01], True)
        self.assertEqual(t[0b10], True)
        self.assertEqual(t[0b11], True)

        t = TruthTable(from_values='1xx1')
        self.assertEqual(t[0b00], True)
        self.assertEqual(t[0b01], 'x')
        self.assertEqual(t[0b10], 'x')
        self.assertEqual(t[0b11], True)


text:
//
//  MSConstants.h
//  BeaconstacSDK
//
//  Copyright© 2014, MobStac Inc. All rights reserved.
//
//  All information contained herein is, and remains the property of MobStac Inc.
//  The intellectual and technical concepts contained herein are proprietary to
//  MobStac Inc and may be covered by U.S. and Foreign Patents, patents in process,
//  and are protected by trade secret or copyright law. This product can not be
//  redistributed in full or parts without permission from MobStac Inc. Dissemination
//  of this information or reproduction of this material is strictly forbidden unless
//  prior written permission is obtained from MobStac Inc.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.

#ifndef BeaconstacSDK_MSConstants_h
#define BeaconstacSDK_MSConstants_h

#ifdef USE_QA_SERVER
    #define URL_BASE @"https://beaconstac.qa.mobstac.com/api/1.0/"
#else
    #define URL_BASE @"https://beaconstac.mobstac.com/api/1.0/"
#endif
#define URL_RULE_PATH @"rules/"
#define URL_PLACE_PATH @"places/"
#define URL_TAG_PATH @"tags/"
#define URL_EVENTLOGGER_PATH @"eventlogger/"
#define URL_BEACON_PATH @"beacons/"

/**
 * SDK properties
 */
#define SDK_VERSION @"1.1.1"
#define EVENT_LOG_VERSION @1.1

/**
 * Beacon thresholds
 * @todo : These values should be fetched form a table based on the device type
 * iPhone shows a lower RSSI than iPod value under same condition
 */

#define RSSI_ENTRY_THRESHOLD -75  // Defines entry criteria
#define RSSI_EXIT_THRESHOLD -90   // Defines exit criteria

#endif


text:
#import "NSObject.h"

// Not exported
@interface TSCH3DState : NSObject
{
}

@end