text:
from typing import Optional

import sphinx.util.logging

from ..base import PythonMapperBase

LOGGER = sphinx.util.logging.getLogger(__name__)

class PythonPythonMapper(PythonMapperBase):
    """A base class for all types of representations of Python objects.

    :var name: The name given to this object.
    :vartype name: str
    :var id: A unique identifier for this object.
    :vartype id: str
    :var children: The members of this object.
    :vartype children: list(PythonPythonMapper)
    """

    language = "python"
    is_callable = False

    def __init__(self, obj, class_content="class", **kwargs):
        super(PythonPythonMapper, self).__init__(obj, **kwargs)

        self.name = obj["name"]
        self.id = obj.get("full_name", self.name)

        # Optional
        self.children = []
        self.args = obj.get("args")
        self.docstring = obj["doc"]
        self.imported = "original_path" in obj

        # For later
        self._class_content = class_content

        self._display_cache = None  # type: Optional[bool]

    @property
    def args(self):
        """The arguments to this object, formatted as a string.

        This will only be set for a function, method, or class.
        For classes, this does not include ``self``.

        :type: str or None
        """
        return self._args

    @args.setter
    def args(self, value):
        self._args = value

    @property
    def docstring(self):
        """The docstring for this object.

        If a docstring did not exist on the object,
        this will be the empty string.

        For classes this will also depend on the
        :confval:`autoapi_python_class_content` option.

        :type: str
        """
        return self._docstring

    @docstring.setter
    def docstring(self, value):
        self._docstring = value

    @property
    def is_undoc_member(self):
        """Whether this object has a docstring (False) or not (True).

        :type: bool
        """
        return not bool(self.docstring)

    @property
    def is_private_member(self):
        """Whether this object is private (True) or not (False).

        :type: bool
        """
        return self.short_name.startswith("_") and not self.short_name.endswith("__")

    @property
    def is_special_member(self):
        """Whether this object is a special member (True) or not (False).

        :type: bool
        """
        return self.short_name.startswith("__") and self.short_name.endswith("__")

    @property
    def display(self):
        """Whether this object should be displayed in documentation.

        This attribute depends on the configuration options given in
        :confval:`autoapi_options`.

        :type: bool
        """
        if self._display_cache is None:
            self._display_cache = not self._ask_ignore(self._should_skip())

        return self._display_cache

    @property
    def summary(self):
        """The summary line of the docstring.

        The summary line is the first non-empty line, as-per :pep:`257`.
        This will be the empty string if the object does not have a docstring.

        :type: str
        """
        for line in self.docstring.splitlines():
            line = line.strip()
            if line:
                return line

        return ""

    def _should_skip(self):  # type: () -> bool
        skip_undoc_member = self.is_undoc_member and "undoc-members" not in self.options
        skip_private_member = (
            self.is_private_member and "private-members" not in self.options
        )
        skip_special_member = (
            self.is_special_member and "special-members" not in self.options
        )

        return skip_undoc_member or skip_private_member or skip_special_member

    def _ask_ignore(self, skip):  # type: (bool) -> bool
        ask_result = self.app.emit_firstresult(
            "autoapi-skip-member", self.type, self.id, self, skip, self.options
        )

        return ask_result if ask_result is not None else skip

    def _children_of_type(self, type_):
        return list(child for child in self.children if child.type == type_)

class PythonFunction(PythonPythonMapper):
    type = "function"
    is_callable = True

    def __init__(self, obj, **kwargs):
        super(PythonFunction, self).__init__(obj, **kwargs)

        self.return_annotation = obj["return_annotation"]
        """The type annotation for the return type of this function.

        This will be ``None`` if an annotation
        or annotation comment was not given.

        :type: str or None
        """
        self.properties = obj["properties"]
        """The properties that describe what type of function this is.

        Can be only be: async

        :type: list(str)
        """

class PythonMethod(PythonFunction):
    type = "method"
    is_callable = True

    def __init__(self, obj, **kwargs):
        super(PythonMethod, self).__init__(obj, **kwargs)

        self.method_type = obj.get("method_type")
        """The type of method that this object represents.

        This can be one of: method, staticmethod, or classmethod.

        :type: str
        """
        self.properties = obj["properties"]
        """The properties that describe what type of method this is.

        Can be any of: abstractmethod, async, classmethod, property, staticmethod

        :type: list(str)
        """

    def _should_skip(self):  # type: () -> bool
        skip = super(PythonMethod, self)._should_skip() or self.name in (
            "__new__",
            "__init__",
        )
        return self._ask_ignore(skip)

class PythonData(PythonPythonMapper):
    """Global, module level data."""

    type = "data"

    def __init__(self, obj, **kwargs):
        super(PythonData, self).__init__(obj, **kwargs)

        self.value = obj.get("value")
        """The value of this attribute.

        This will be ``None`` if the value is not constant.

        :type: str or None
        """
        self.annotation = obj.get("annotation", obj.get("return_annotation"))
        """The type annotation of this attribute.

        This will be ``None`` if an annotation
        or annotation comment was not given.

        :type: str or None
        """

class PythonAttribute(PythonData):
    """An object/class level attribute."""

    type = "attribute"

class TopLevelPythonPythonMapper(PythonPythonMapper):
    _RENDER_LOG_LEVEL = "VERBOSE"

    def __init__(self, obj, **kwargs):
        super(TopLevelPythonPythonMapper, self).__init__(obj, **kwargs)

        self.top_level_object = "." not in self.name
        """Whether this object is at the very top level (True) or not (False).

        This will be False for subpackages and submodules.

        :type: bool
        """

        self.subpackages = []
        self.submodules = []
        self.all = obj["all"]
        """The contents of ``__all__`` if assigned to.

        Only constants are included.
        This will be ``None`` if no ``__all__`` was set.

        :type: list(str) or None
        """

    @property
    def functions(self):
        """All of the member functions.

        :type: list(PythonFunction)
        """
        return self._children_of_type("function")

    @property
    def classes(self):
        """All of the member classes.

        :type: list(PythonClass)
        """
        return self._children_of_type("class")

class PythonModule(TopLevelPythonPythonMapper):
    type = "module"

class PythonPackage(TopLevelPythonPythonMapper):
    type = "package"

class PythonClass(PythonPythonMapper):
    type = "class"

    def __init__(self, obj, **kwargs):
        super(PythonClass, self).__init__(obj, **kwargs)

        self.bases = obj["bases"]
        """The fully qualified names of all base classes.

        :type: list(str)
        """

    @property
    def args(self):
        args = self._args

        constructor = self.constructor
        if constructor:
            args = constructor.args

        if args.startswith("self"):
            args = args[4:].lstrip(",").lstrip()

        return args

    @args.setter
    def args(self, value):
        self._args = value

    @property
    def docstring(self):
        docstring = super(PythonClass, self).docstring

        if self._class_content in ("both", "init"):
            constructor_docstring = self.constructor_docstring

            if constructor_docstring:
                if self._class_content == "both":
                    docstring = "{0}\n{1}".format(docstring, constructor_docstring)
                else:
                    docstring = constructor_docstring

        return docstring

    @docstring.setter
    def docstring(self, value):
        self._docstring = value

    @property
    def methods(self):
        return self._children_of_type("method")

    @property
    def attributes(self):
        return self._children_of_type("attribute")

    @property
    def classes(self):
        return self._children_of_type("class")

    @property
    def constructor(self):
        for child in self.children:
            if child.short_name == "__init__":
                return child

        return None

    @property
    def constructor_docstring(self):
        docstring = ""

        constructor = self.constructor
        if constructor and constructor.docstring:
            docstring = constructor.docstring
        else:
            for child in self.children:
                if child.short_name == "__new__":
                    docstring = child.docstring
                    break

        return docstring

class PythonException(PythonClass):
    type = "exception"


text:
title: Getting Started
page_title: Getting Started - WinForms LayoutControl
description: Learn how to use RadLayoutControl. The example below shows how you can create a layout that will fill the entire form and will be resized along with it.
slug: winforms/layoutcontrol/getting-started
tags: getting,started
published: True
position: 3
previous_url: layoutcontrol-getting-started
---

# Getting Started

In this article, you will learn how to use __RadLayoutControl__. The example below shows how you can create a layout that will fill the entire form and will be resized along with it.

1\. First drag and drop the control on the form. Set its __Dock__ property to *Fill* (figure 1 shows how you can do that from the smart tag). The control will be responsible for the entire form layout and the other controls will be placed inside it.

>caption Figure 1: Dock In Parent Container

![layoutcontrol-getting-started 001](images/layoutcontrol-getting-started001.png)

2\. Add __RadListView__ to the layout control it will take the entire space because it is the only control in the layout panel, then add __RadDataEntry__ to the right part of the panel. The final step of the layout creation is to add a close button to the bottom of the form. Figure 3 shows the desired layout at this step.

>caption Figure 2: Sample Layout

![layoutcontrol-getting-started 002](images/layoutcontrol-getting-started002.png)

3\. Let's add some functionality to our new form. The following snippet shows how you can bind the two controls and close the form when the button is clicked. Additionally you can show text above the __RadDataEntry__ and __RadListView__. For this purpose you can just use the items text. Detailed information about the used properties is available in the [Items]({%slug winforms/layoutcontrol/items%}) article. Figure 3 shows the final layout. If you now try to resize the form, you will see that the controls in __RadLayoutControl__ grow and shrink proportionally.

{{source=..\SamplesCS\LayoutControl\GettingStartedForm.cs region=FormCode}}
{{source=..\SamplesVB\LayoutControl\GettingStartedForm.vb region=FormCode}}

````C#

public partial class GettingStartedForm : Telerik.WinControls.UI.RadForm
{
    public GettingStartedForm()
    {
        InitializeComponent();

        List<Employee> employees = new List<Employee>();
        employees.Add(new Employee()
        {
            FirstName = "Sarah",
            LastName = "Blake",
            Occupation = "Supplied Manager",
            StartingDate = new DateTime(2005, 04, 12),
            IsMarried = true
        });
        employees.Add(new Employee()
        {
            FirstName = "Jane",
            LastName = "Simpson",
            Occupation = "Security",
            StartingDate = new DateTime(2008, 12, 03),
            IsMarried = true
        });
        employees.Add(new Employee()
        {
            FirstName = "John",
            LastName = "Peterson",
            Occupation = "Consultant",
            StartingDate = new DateTime(2005, 04, 12),
            IsMarried = false
        });
        employees.Add(new Employee()
        {
            FirstName = "Peter",
            LastName = "Bush",
            Occupation = "Cashier",
            StartingDate = new DateTime(2005, 04, 12),
            IsMarried = true
        });

        BindingSource bindingSource1 = new BindingSource();
        bindingSource1.DataSource = employees;

        radDataEntry1.DataSource = bindingSource1;
        radListView1.DataSource = bindingSource1;
        radListView1.DisplayMember = "FirstName";
        radListView1.AllowEdit = false;

        this.radButton1.Click += radButton1_Click;
        layoutControlItem1.DrawText = true;
        layoutControlItem2.DrawText = true;
        layoutControlItem1.TextProportionalSize = 0.05f;
        layoutControlItem2.TextProportionalSize = 0.05f;
        layoutControlItem1.TextPosition = LayoutItemTextPosition.Top;
        layoutControlItem2.TextPosition = LayoutItemTextPosition.Top;
        layoutControlItem1.TextAlignment = ContentAlignment.BottomLeft;
        layoutControlItem2.TextAlignment = ContentAlignment.BottomLeft;
        layoutControlItem1.Text = "Select Item";
        layoutControlItem2.Text = "Change Item Properties";
    }

    void radButton1_Click(object sender, EventArgs e)
    {
        this.Close();
    }
}

public class Employee
{
    public string FirstName { get; set; }

    public string LastName { get; set; }

    public string Occupation { get; set; }

    public DateTime StartingDate { get; set; }

    public bool IsMarried { get; set; }
}

````
````VB.NET
Partial Public Class GettingStartedForm1
    Inherits Telerik.WinControls.UI.RadForm
    Public Sub New()
        InitializeComponent()
        Dim employees As New List(Of EmployeeData)()
        employees.Add(New EmployeeData() With {.FirstName = "Sarah", .LastName = "Blake", .Occupation = "Supplied Manager", .StartingDate = New Date(2005, 4, 12), .IsMarried = True})
        employees.Add(New EmployeeData() With {.FirstName = "Jane", .LastName = "Simpson", .Occupation = "Security", .StartingDate = New Date(2008, 12, 3), .IsMarried = True})
        employees.Add(New EmployeeData() With {.FirstName = "John", .LastName = "Peterson", .Occupation = "Consultant", .StartingDate = New Date(2005, 4, 12), .IsMarried = False})
        employees.Add(New EmployeeData() With {.FirstName = "Peter", .LastName = "Bush", .Occupation = "Cashier", .StartingDate = New Date(2005, 4, 12), .IsMarried = True})
        Dim bindingSource1 As New BindingSource()
        bindingSource1.DataSource = employees
        radDataEntry1.DataSource = bindingSource1
        radListView1.DataSource = bindingSource1
        radListView1.DisplayMember = "FirstName"
        radListView1.AllowEdit = False
        AddHandler Me.radButton1.Click, AddressOf radButton1_Click
        layoutControlItem1.DrawText = True
        layoutControlItem2.DrawText = True
        layoutControlItem1.TextProportionalSize = 0.05F
        layoutControlItem2.TextProportionalSize = 0.05F
        layoutControlItem1.TextPosition = LayoutItemTextPosition.Top
        layoutControlItem2.TextPosition = LayoutItemTextPosition.Top
        layoutControlItem1.TextAlignment = ContentAlignment.BottomLeft
        layoutControlItem2.TextAlignment = ContentAlignment.BottomLeft
        layoutControlItem1.Text = "Select Item"
        layoutControlItem2.Text = "Change Item Properties"
    End Sub
    Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.Close()
    End Sub
End Class
Public Class EmployeeData
    Public Property FirstName() As String
    Public Property LastName() As String
    Public Property Occupation() As String
    Public Property StartingDate() As Date
    Public Property IsMarried() As Boolean
End Class

````

{{endregion}}

>caption Figure 3: Final Layout
![layoutcontrol-getting-started 003](images/layoutcontrol-getting-started003.png)

## See Also

 * [Items]({%slug winforms/layoutcontrol/items%})
 * [Properties, Methods and Events]({%slug winforms/layoutcontrol/properties-methods-and-events%})
 * [Customizing Appearance]({%slug winforms/layoutcontrol/customizing-appearance%})

redpajama_set_name: RedPajamaGithub


text:
/* -*- Mode: C++; indent-tabs-mode: nil -*- */
#ifndef SCHWA_DRLESS_PROCESSOR_H_
#define SCHWA_DRLESS_PROCESSOR_H_

#include <iosfwd>
#include <vector>

#include <schwa/_base.h>

namespace schwa {
  namespace dr {
    class Doc;
    class RTFieldDef;
    class RTSchema;
    class RTStoreDef;
  }

  namespace msgpack {
    class Value;
  }

  namespace dr_less {

    class Processor {
    public:
      static const std::string SEP;
      static const std::string REPR_NIL;
      static const std::string REPR_UNKNOWN;

    private:
      std::ostream &_out;
      const dr::Doc *_doc;
      unsigned int _indent;

      void _process_doc_fields(const dr::RTSchema &schema);
      void _process_store(const dr::RTStoreDef &store);

      std::ostream &_write_indent(void);
      std::ostream &_write_field(const dr::RTFieldDef &field, const msgpack::Value &value);
      std::ostream &_write_field(const dr::RTStoreDef &store, const dr::RTFieldDef &field, const msgpack::Value &value);

      void _write_pointer(const dr::RTStoreDef &store, const dr::RTFieldDef &field, const msgpack::Value &value);
      void _write_primitive(const msgpack::Value &value);
      void _write_slice(const dr::RTFieldDef &field, const msgpack::Value &value);

    public:
      Processor(std::ostream &out);
      ~Processor(void);

      void process_doc(const dr::Doc &doc, uint32_t doc_num);
      inline void operator ()(const dr::Doc &doc, uint32_t doc_num) { process_doc(doc, doc_num); }

    private:
      SCHWA_DISALLOW_COPY_AND_ASSIGN(Processor);
    };

  }
}

#endif  // SCHWA_DRLESS_PROCESSOR_H_


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Marasmius hinnuleiformis Murrill

### Remarks
null


text:
var distUpdateThreshold = 2;
var speed = 0.3;
var turnRate = 0.03;

var stars = [];
var starsUpdated = false;
var cameraPosition = new Vector(0, 0, 0);
var lastUpdatePosition = new Vector(0, 0, 0);
var lastRenderPosition = new Vector(0, 0, 0);
var cameraDirection = new Vector(0, 1, 0);
var lastRenderDirection = new Vector(0, 1, 0);
var upDirection = new Vector(0, 0, 1);
var keys = new Array();
var draggingCanvas = false;
var dragVector = {x: null, y: null};
var pressForward = false;
var activeDrag = false;

function initKeys() {
    for (var i = 0; i < 256; ++i) {
	keys[i] = 0;
    }
}

window.onkeyup = function(event) {
    keys[event.keyCode] = 0;
};
window.onkeydown = function(event) {
    keys[event.keyCode] = 1;
};
window.ontouchstart = function(event) {
	startDrag(event.touches[0].clientX,event.touches[0].clientY);
};
window.onmousedown = function(event) {
	startDrag(event.clientX,event.clientY);
};
window.ontouchmove = function(event) {
	dragCanvas(event.touches[0].clientX,event.touches[0].clientY);
};
window.onmousemove = function(event) {
	dragCanvas(event.clientX,event.clientY);
};
window.ontouchend = function(event) {
	endDrag();
};
window.onmouseup = function(event) {
	endDrag();
};

function startDrag(x,y) {
	draggingCanvas = true;
	pressForward = false;
	activeDrag = false;
	dragVector = {x: x, y: y};
    	setTimeout(function(){if(draggingCanvas && !activeDrag){pressForward = true;}}, 500);
};

function endDrag() {
	draggingCanvas = false;
	pressForward = false;
	activeDrag = false;
	dragVector = {x: null, y: null};
};

function dragCanvas(x,y) {
	if(dragVector.x == null || dragVector.y == null) {
		dragVector.x = x;
		dragVector.y = y;
	}
	if(draggingCanvas && Math.abs(x-dragVector.x) > 2 && Math.abs(y-dragVector.y) > 2) {
		pressForward = false;
		activeDrag = true;
		var right = Vector.crossProduct(cameraDirection, upDirection);
		if(y < dragVector.y) {
			cameraDirection = cameraDirection.rotate(right, turnRate*((dragVector.y-y)/10));
			upDirection = upDirection.rotate(right, turnRate*((dragVector.y-y)/10));

		} else if(y > dragVector.y) {
			cameraDirection = cameraDirection.rotate(right, -turnRate*((y-dragVector.y)/10));
			upDirection = upDirection.rotate(right, -turnRate*((y-dragVector.y)/10));
		}
		if(x < dragVector.x) {
			cameraDirection = cameraDirection.rotate(upDirection, -turnRate*((dragVector.x-x)/10));
		} else if(x > dragVector.x) {
			cameraDirection = cameraDirection.rotate(upDirection, turnRate*((x-dragVector.x)/10));
		}
		dragVector.x = x;
		dragVector.y = y;
	} else if(draggingCanvas) {
		activeDrag = false;
    		setTimeout(function(){if(draggingCanvas && !activeDrag){pressForward = true;}}, 1000);
	}

};

function renderStar(context, screenX, screenY, area, color) {
    var radius = Math.sqrt(area / Math.PI);
    var alpha = 1;
    if (radius < 0.5) {
	radius = 0.5;
	alpha = 4 * area / Math.PI;
    }
    var gradient = context.createRadialGradient(screenX, screenY, 0,
						screenX, screenY, radius);
    var rgb = color['r'] + ',' + color['g'] + ',' + color['b'];
    gradient.addColorStop(0, 'rgba(255,255,255,' + alpha + ')');
    gradient.addColorStop(1, 'rgba(' + rgb + ',0)');
    context.fillStyle = gradient;
    context.beginPath();
    context.arc(screenX, screenY, radius, 0, 2 * Math.PI);
    context.fill();
}

function doOneFrame() {
    //if (keys[87] ) {
    if (keys[87] || pressForward) {
	cameraPosition.addInPlace(cameraDirection.multiplyScalar(speed));
    }
    if (keys[83]) {
	cameraPosition.addInPlace(cameraDirection.multiplyScalar(-speed));
    }
    var right = Vector.crossProduct(cameraDirection, upDirection);
    if (keys[65]) {
	cameraPosition.addInPlace(right.multiplyScalar(-speed));
    }
    if (keys[68]) {
	cameraPosition.addInPlace(right.multiplyScalar(speed));
    }
    if (keys[38]) {
	cameraDirection = cameraDirection.rotate(right, -turnRate);
	upDirection = upDirection.rotate(right, -turnRate);
    }
    if (keys[40]) {
	cameraDirection = cameraDirection.rotate(right, turnRate);
	upDirection = upDirection.rotate(right, turnRate);
    }
    if (keys[37]) {
	cameraDirection = cameraDirection.rotate(upDirection, turnRate);
    }
    if (keys[39]) {
	cameraDirection = cameraDirection.rotate(upDirection, -turnRate);
    }
    // Check if we need to re-render
    if (cameraDirection.isEqual(lastRenderDirection) &&
        cameraPosition.isEqual(lastRenderPosition) && !starsUpdated) {
        setTimeout(doOneFrame, 10);
        return;
    }
    lastRenderPosition.copyFrom(cameraPosition);
    lastRenderDirection.copyFrom(cameraDirection);
    document.getElementById('controlsBody').innerHTML = "Position: "
	+cameraPosition.print()+"<br>Direction: "+cameraDirection.print();
    starsUpdated = false;

    var canvas = document.getElementById('stars');
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
    var context = canvas.getContext('2d');
    context.fillStyle = 'black';
    context.fillRect(0, 0, canvas.width, canvas.height);
    for (var i = 0; i < stars.length; ++i) {
	var star = stars[i];
	var position = new Vector(star.x, star.y, star.z);
	var translated = position.subtract(cameraPosition);
	var projected = translated.basisProjection(right,
						   cameraDirection,
						   upDirection);
	if (projected.y < 0.00001) {
	    continue;
	}
	var sx = (canvas.width / 2) +
            (canvas.width / 2) * projected.x / projected.y;
	var sy = (canvas.height / 2) +
            (canvas.width / 2) * projected.z / projected.y;
        if (sx < 0 || sx > canvas.width) continue;
        if (sy < 0 || sy > canvas.height) continue;
	var brightness = 255 * star.lum / translated.squaredLength();
	var color = {"r":star.r, "g":star.g, "b":star.b};
	renderStar(context, sx, sy, brightness, color);
    }
    setTimeout(doOneFrame, 10);
};

// Returns immediately, with callback later.
function updateStars(force) {
    if (force)
        console.log('Forcing star update')
    var distFromLastUpdate = Math.sqrt(
        Vector.subtract(lastUpdatePosition,
                        cameraPosition).squaredLength())
    if (distFromLastUpdate < distUpdateThreshold && !force)
        return;
    lastUpdatePosition.copyFrom(cameraPosition);
    var x = cameraPosition.x;
    var y = cameraPosition.y;
    var z = cameraPosition.z;
    getVisibleStarsMagic(0.004, 10, x, y, z, function(newStars) {
	stars = newStars;
        starsUpdated = true;
	console.log('Loaded ' + newStars.length + ' stars.');
    }, function(error) {
	console.log('Failure: ' + error);
    });
}

window.onload = function() {
    initKeys();
    updateStars(true);
    doOneFrame();
    setInterval(function() {
	updateStars(false);
    }, 500);
};


text:
<!-- Javascript -->
<script src="/public/javascripts/application.js"></script>
<script src="/public/javascripts/details.polyfill.js"></script>
<script src="/public/javascripts/jquery-1.11.1.min.js"></script>
<script src="/public/javascripts/m-upload.js"></script>


text:
{% extends "base.html" %}

{% block head %}
<link rel="stylesheet" href="{% url css_media 'project.css' %}" />

{% endblock %}

{% block messages %}{% endblock %}

{% block content %}

	{% if messages %}

				{% for msg in messages %}
					<p class="{{ msg.type }} {% if forloop.first %}new_message {% else %}{% if forloop.counter == 2 %}not_that_old_message{% else %}old_message{% endif %}{% endif %}" style='background-image:
						{% ifequal msg.type "error" %}
							url({% url img_media 'msg_error.png' %});
						{% endifequal %}
						{% ifequal msg.type "success" %}
							url({% url img_media 'msg_success.png' %});
						{% endifequal %}
						{% ifequal msg.type  "warning" %}
							url({% url img_media 'warning.png' %});
						{% endifequal %}
						{% ifequal msg.type  "announcement" %}
							url({% url img_media 'msg_announcement.png' %});
						{% endifequal %}
						{% ifequal msg.type  "info" %}
							url({% url img_media 'msg_info.png' %});
						{% endifequal %}
						{% ifequal msg.type  "user2user" %}
							url({% url img_media 'msg_user2user.png' %});
						{% endifequal %}'>
						{{ msg.msg_text }}

				{% endfor %}

	{% endif %}

Projects

{% endblock content %}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.apache.uima.cas.Type (Apache UIMA Java SDK 2.8.1 User-Level API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
org.apache.uima.cas.Type

Packages that use Type

Package
Description

org.apache.uima.cas

Common Analysis System (CAS) Interfaces.

org.apache.uima.cas.admin

org.apache.uima.examples

org.apache.uima.jcas

Interfaces for accessing the JCAS.

org.apache.uima.jcas.cas

JCAS model for built-in CAS types

org.apache.uima.jcas.tcas

JCAS model for built-in TCAS types

org.apache.uima.util

Utility classes and interfaces used by UIMA components.

Uses of Type in org.apache.uima.cas

Methods in org.apache.uima.cas that return Type

Modifier and Type
Method and Description

Type
CAS.getAnnotationType()

Get the type object for the annotation type.

Type
TypeSystem.getArrayType(Type componentType)

Obtain an array type with component type componentType.

Type
Type.getComponentType()

For array types, returns the component type of the array type.

Type
Feature.getDomain()

Get the domain type for this feature.

Type
TypeSystem.getParent(Type type)

Get the parent type for input type.

Type
Feature.getRange()

Get the range type for this feature.

Type
TypeSystem.getTopType()

Get the top type, i.e., the root of the type system.

Type
FeatureStructure.getType()

Get the type of this FS.

Type
FSIndex.getType()

Return the type of feature structures this index contains.

Type
FeaturePath.getType(FeatureStructure fs)

Returns the type of the feature path.

Type
TypeNameSpace.getType(String typeName)

Type
TypeSystem.getType(String typeName)

Get a type object for a given type name.

Methods in org.apache.uima.cas that return types with arguments of type Type

Modifier and Type
Method and Description

Vector<Type>
TypeSystem.getDirectlySubsumedTypes(Type type)

Deprecated.

Use getDirectSubtypes(Type) instead.

List<Type>
TypeSystem.getDirectSubtypes(Type type)

Get a List of the types directly subsumed by a given type.

List<Type>
TypeSystem.getProperlySubsumedTypes(Type type)

Return the list of all types subsumed by the input type.

Iterator<Type>
TypeSystem.getTypeIterator()

Get an iterator over all types, in no particular order.

Methods in org.apache.uima.cas with parameters of type Type

Modifier and Type
Method and Description

void
FSTypeConstraint.add(Type type)

Add a new type to this type constraint.

<T extends AnnotationFS>
AnnotationFS
CAS.createAnnotation(Type type,
                int begin,
                int end)

Create a new annotation.

<T extends FeatureStructure>
T
CAS.createFS(Type type)

Create a new FeatureStructure.

<T extends FeatureStructure>
FSIterator<T>
FSIndexRepository.getAllIndexedFS(Type aType)

Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its
 subtypes).

<T extends AnnotationFS>
AnnotationIndex<T>
CAS.getAnnotationIndex(Type type)

Get the standard annotation index restricted to a specific annotation type.

Type
TypeSystem.getArrayType(Type componentType)

Obtain an array type with component type componentType.

Vector<Type>
TypeSystem.getDirectlySubsumedTypes(Type type)

Deprecated.

Use getDirectSubtypes(Type) instead.

List<Type>
TypeSystem.getDirectSubtypes(Type type)

Get a List of the types directly subsumed by a given type.

<T extends FeatureStructure>
FSIndex<T>
FSIndexRepository.getIndex(String label,
        Type type)

Retrieve an index according to a label and a type.

Type
TypeSystem.getParent(Type type)

Get the parent type for input type.

List<Type>
TypeSystem.getProperlySubsumedTypes(Type type)

Return the list of all types subsumed by the input type.

void
FSIndexRepository.removeAllExcludingSubtypes(Type type)

Remove all instances of just this type, excluding subtypes, from all indexes in the repository view.

void
FSIndexRepository.removeAllIncludingSubtypes(Type type)

Remove all instances of type, including all subtypes from all indexes in the repository view.

boolean
TypeSystem.subsumes(Type superType,
        Type subType)

Does one type inherit from the other?

void
FeaturePath.typeInit(Type featurePathType)

Check the feature path for the given type and initialize internal
 structures for faster access to the feature path value.

Uses of Type in org.apache.uima.cas.admin

Methods in org.apache.uima.cas.admin that return Type

Modifier and Type
Method and Description

Type
TypeSystemMgr.addStringSubtype(String typeName,
                String[] stringList)

Inherit from String.

Type
TypeSystemMgr.addType(String typeName,
       Type mother)

Add a new type to the type system.

Type
FSIndexComparator.getType()

Get the type of this comparator.

Methods in org.apache.uima.cas.admin with parameters of type Type

Modifier and Type
Method and Description

Feature
TypeSystemMgr.addFeature(String featureName,
          Type domainType,
          Type rangeType)

Add an feature to the type system.

Feature
TypeSystemMgr.addFeature(String featureName,
          Type domainType,
          Type rangeType,
          boolean multipleReferencesAllowed)

Add an feature to the type system.

Type
TypeSystemMgr.addType(String typeName,
       Type mother)

Add a new type to the type system.

boolean
LinearTypeOrder.lessThan(Type t1,
        Type t2)

Compare two types.

void
TypeSystemMgr.setFeatureFinal(Type type)

Make type feature final in the sense that no new features can be added to this type.

void
TypeSystemMgr.setInheritanceFinal(Type type)

Block any further inheritance from this type.

void
FSIndexComparator.setType(Type type)

Set the type of this comparator.

Uses of Type in org.apache.uima.examples

Constructors in org.apache.uima.examples with parameters of type Type

Constructor and Description

SourceDocumentInformation_Type(JCas jcas,
                              Type casType)

initialize variables to correspond with Cas Type and Features

Uses of Type in org.apache.uima.jcas

Methods in org.apache.uima.jcas that return Type

Modifier and Type
Method and Description

Type
JCas.getCasType(int i)

Given Foo.type, return the corresponding CAS Type object.

Type
JCas.getRequiredType(String s)

Methods in org.apache.uima.jcas with parameters of type Type

Modifier and Type
Method and Description

<T extends TOP>
FSIterator<T>
JFSIndexRepository.getAllIndexedFS(Type aType)

Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its
 subtypes).

<T extends Annotation>
AnnotationIndex<T>
JCas.getAnnotationIndex(Type type)

Get the standard annotation index restricted to a specific annotation type.

Feature
JCas.getRequiredFeature(Type t,
                  String s)

Feature
JCas.getRequiredFeatureDE(Type t,
                    String s,
                    String rangeName,
                    boolean featOkTst)

Uses of Type in org.apache.uima.jcas.cas

Fields in org.apache.uima.jcas.cas declared as Type

Modifier and Type
Field and Description

Type
TOP_Type.casType

the Cas Type associated with this Java Cas Model class

Constructors in org.apache.uima.jcas.cas with parameters of type Type

Constructor and Description

AnnotationBase_Type(JCas jcas,
                   Type casType)

BooleanArray_Type(JCas jcas,
                 Type casType)

ByteArray_Type(JCas jcas,
              Type casType)

CommonArray_Type(JCas jcas,
                Type casType)

DoubleArray_Type(JCas jcas,
                Type casType)

EmptyFloatList_Type(JCas jcas,
                   Type casType)

EmptyFSList_Type(JCas jcas,
                Type casType)

EmptyIntegerList_Type(JCas jcas,
                     Type casType)

EmptyStringList_Type(JCas jcas,
                    Type casType)

FloatArray_Type(JCas jcas,
               Type casType)

FloatList_Type(JCas jcas,
              Type casType)

FSArray_Type(JCas jcas,
            Type casType)

FSList_Type(JCas jcas,
           Type casType)

IntegerArray_Type(JCas jcas,
                 Type casType)

IntegerList_Type(JCas jcas,
                Type casType)

LongArray_Type(JCas jcas,
              Type casType)

NonEmptyFloatList_Type(JCas jcas,
                      Type casType)

NonEmptyFSList_Type(JCas jcas,
                   Type casType)

NonEmptyIntegerList_Type(JCas jcas,
                        Type casType)

NonEmptyStringList_Type(JCas jcas,
                       Type casType)

ShortArray_Type(JCas jcas,
               Type casType)

Sofa_Type(JCas jcas,
         Type casType)

initialize variables to correspond with Cas Type and Features

StringArray_Type(JCas jcas,
                Type casType)

StringList_Type(JCas jcas,
               Type casType)

TOP_Type(JCas jcas,
        Type casType)

TOP_Type(JCas jcas,
        Type casType,
        boolean installGenerator)

Uses of Type in org.apache.uima.jcas.tcas

Constructors in org.apache.uima.jcas.tcas with parameters of type Type

Constructor and Description

Annotation_Type(JCas jcas,
               Type casType)

DocumentAnnotation_Type(JCas jcas,
                       Type casType)

Uses of Type in org.apache.uima.util

Methods in org.apache.uima.util with parameters of type Type

Modifier and Type
Method and Description

static String[]
TypeSystemUtil.getAllowedValuesForType(Type aType,
                       TypeSystem aTypeSystem)

Gets the allowed values for a string subtype.

static TypeDescription
TypeSystemUtil.type2TypeDescription(Type aType,
                    TypeSystem aTypeSystem)

Convert a Type to an equivalent TypeDescription.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="foo.fruitfox.evend.PickupActivity" >

    <TextView
        android:id="@+id/arrivalHeading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:text="@string/pickup_header_label"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <ScrollView
        android:id="@+id/scrollWrapper"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@+id/next"
        android:layout_below="@+id/arrivalHeading"
        android:fadeScrollbars="false" >

        <RelativeLayout
            android:id="@+id/widgetHolder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <LinearLayout
                android:id="@+id/locationContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_marginTop="@dimen/view_horizontal_margin_20dp"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/locationLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/pickup_location_label" />

                <Spinner
                    android:id="@+id/location"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    tools:listitem="@android:layout/simple_list_item_1" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/pickupDateContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/locationContainer"
                android:layout_marginTop="@dimen/view_horizontal_margin_10dp"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/pickupDateLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/pickup_date_label" />

                <EditText
                    android:id="@+id/pickupDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ems="10"
                    android:inputType="date" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/pickupTimeContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/pickupDateContainer"
                android:layout_marginTop="@dimen/view_horizontal_margin_10dp"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/pickupTimeLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/pickup_time_label" />

                <EditText
                    android:id="@+id/pickupTime"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ems="10"
                    android:inputType="time" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/seatsContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/pickupTimeContainer"
                android:layout_marginTop="@dimen/view_horizontal_margin_10dp"
                android:orientation="horizontal" >

                <TextView
                    android:id="@+id/seatsLabel"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="0.7"
                    android:text="@string/pickup_seats_label" />

                <Spinner
                    android:id="@+id/seatsCount"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="0.3"
                    tools:listitem="@android:layout/simple_list_item_1" />
            </LinearLayout>
        </RelativeLayout>
    </ScrollView>

    <Button
        android:id="@+id/next"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:onClick="next"
        android:text="@string/next_label" />

</RelativeLayout>


text:
namespace fp
{

// The flowpath mutex object. Wraps a pthread mutex.
class Mutex
{
public:
  Mutex();
  ~Mutex();

  void lock();
  void unlock();

private:
  pthread_mutex_t mutex_;
};

// The flowpath locking queue. Uses a mutex to ensure atomic addition
// and/or retrieval of queued items.
template <typename T>
class Locking_queue
{
public:
  Locking_queue();
  ~Locking_queue();

  void enqueue(T);
  T dequeue();

  T get();

  int size() const { return queue_.size(); }
  bool empty() const { return queue_.empty(); }

private:
  std::queue<T> queue_;
  Mutex mutex_;
};

template <typename T>
Locking_queue<T>::Locking_queue()
  : queue_(), mutex_()
{ }

template <typename T>
Locking_queue<T>::~Locking_queue()
{
  while (!queue_.empty())
    queue_.pop();
}

template <typename T>
void
Locking_queue<T>::enqueue(T v)
{
  mutex_.lock();
  queue_.push(v);
  mutex_.unlock();
}

template <typename T>
T
Locking_queue<T>::dequeue()
{
  T ret = nullptr;
  mutex_.lock();
  if (!queue_.empty()) {
    ret = queue_.front();
    queue_.pop();
  }
  mutex_.unlock();
  return ret;
}

} // end namespace fp

#endif


text:
<?php
/* @var $this AddressController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Aaddresses',
);

$this->menu=array(
	array('label'=>'Create AAddress', 'url'=>array('create')),
	array('label'=>'Manage AAddress', 'url'=>array('admin')),
);
?>

Aaddresses

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); ?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_13" class="java.beans.XMLDecoder">
 <object class="com.ti.dvt.msp430.power.core.StatModel">
  <void property="name">
   <string>MSP430_2015_08_12_093353</string>
  </void>
  <void property="properties">
   <void method="put">
    <string>RawDataPath</string>
    <string>C:\Users\vidur\Desktop\MSP430_2015_08_12_093353\ETData.xml</string>
   </void>
   <void method="put">
    <string>EnergyOnly</string>
    <boolean>true</boolean>
   </void>
  </void>
  <void property="root">
   <object id="Node0" class="com.ti.dvt.msp430.power.core.Node">
    <void property="name">
     <string>MSP430</string>
    </void>
    <void property="serChildren">
     <array class="com.ti.dvt.msp430.power.core.Node" length="4">
      <void index="0">
       <object id="StatModel$PeripheralNode0" class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
        <void property="level">
         <int>1</int>
        </void>
        <void property="longName">
         <string>Peripherals</string>
        </void>
        <void property="name">
         <string>PERIF</string>
        </void>
        <void property="parent">
         <object idref="Node0"/>
        </void>
        <void property="serChildren">
         <array class="com.ti.dvt.msp430.power.core.Node" length="17">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>TA2</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray0" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray0"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="1">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>TA1</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray1" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray1"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="2">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>MPY</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray2" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray2"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="3">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>TA3</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray3" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray3"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="4">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>TA0</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray4" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray4"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="5">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>eUSCI_A0</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray5" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray5"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="6">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>TB0</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray6" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray6"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="7">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>eUSCI_A1</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray7" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray7"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="8">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>FRAM</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray8" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray8"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="9">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>RTC</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray9" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray9"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="10">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>eUSCI_B0</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray10" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray10"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="11">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>AES</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray11" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray11"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="12">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>DMA</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray12" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray12"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="13">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>COMP</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray13" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray13"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="14">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>WDT</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray14" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray14"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="15">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>ADC</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray15" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray15"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="16">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>REF</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode0"/>
            </void>
            <void id="NodeArray16" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray16"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
         </array>
        </void>
        <void property="serMeasurements">
         <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="lastValue">
             <double>NaN</double>
            </void>
            <void property="name">
             <string>Cycle</string>
            </void>
            <void property="value">
             <double>NaN</double>
            </void>
           </object>
          </void>
         </array>
        </void>
       </object>
      </void>
      <void index="1">
       <object id="StatModel$PeripheralNode1" class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
        <void property="level">
         <int>1</int>
        </void>
        <void property="longName">
         <string>System Clocks</string>
        </void>
        <void property="name">
         <string>CLK</string>
        </void>
        <void property="parent">
         <object idref="Node0"/>
        </void>
        <void property="serChildren">
         <array class="com.ti.dvt.msp430.power.core.Node" length="5">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>SMCLK</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode1"/>
            </void>
            <void id="NodeArray17" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray17"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="1">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>VLO</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode1"/>
            </void>
            <void id="NodeArray18" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray18"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="2">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>ACLK</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode1"/>
            </void>
            <void id="NodeArray19" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray19"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="3">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>MCLK</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode1"/>
            </void>
            <void id="NodeArray20" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray20"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="4">
           <object class="com.ti.dvt.msp430.power.core.StatModel$PeripheralNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="name">
             <string>MODOSC</string>
            </void>
            <void property="parent">
             <object idref="StatModel$PeripheralNode1"/>
            </void>
            <void id="NodeArray21" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray21"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
         </array>
        </void>
        <void property="serMeasurements">
         <array class="com.ti.dvt.msp430.power.core.Measurement" length="1">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="lastValue">
             <double>NaN</double>
            </void>
            <void property="name">
             <string>Cycle</string>
            </void>
            <void property="value">
             <double>NaN</double>
            </void>
           </object>
          </void>
         </array>
        </void>
       </object>
      </void>
      <void index="2">
       <object id="StatModel$StateNode0" class="com.ti.dvt.msp430.power.core.StatModel$StateNode">
        <void property="level">
         <int>1</int>
        </void>
        <void property="name">
         <string>CPU</string>
        </void>
        <void property="parent">
         <object idref="Node0"/>
        </void>
        <void property="serChildren">
         <array class="com.ti.dvt.msp430.power.core.Node" length="2">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.StatModel$StateNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="longName">
             <string>Low Power Mode</string>
            </void>
            <void property="name">
             <string>LPM</string>
            </void>
            <void property="parent">
             <object idref="StatModel$StateNode0"/>
            </void>
            <void id="NodeArray22" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray22"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="2">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Energy</string>
                </void>
               </object>
              </void>
              <void index="1">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
          <void index="1">
           <object class="com.ti.dvt.msp430.power.core.StatModel$StateNode">
            <void property="level">
             <int>2</int>
            </void>
            <void property="longName">
             <string>Active Mode</string>
            </void>
            <void property="name">
             <string>AM</string>
            </void>
            <void property="parent">
             <object idref="StatModel$StateNode0"/>
            </void>
            <void id="NodeArray23" property="serChildren"/>
            <void property="serChildren">
             <object idref="NodeArray23"/>
            </void>
            <void property="serMeasurements">
             <array class="com.ti.dvt.msp430.power.core.Measurement" length="2">
              <void index="0">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Energy</string>
                </void>
               </object>
              </void>
              <void index="1">
               <object class="com.ti.dvt.msp430.power.core.Measurement">
                <void property="name">
                 <string>Cycle</string>
                </void>
               </object>
              </void>
             </array>
            </void>
           </object>
          </void>
         </array>
        </void>
        <void property="serMeasurements">
         <array class="com.ti.dvt.msp430.power.core.Measurement" length="2">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="name">
             <string>Energy</string>
            </void>
           </object>
          </void>
          <void index="1">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="name">
             <string>Cycle</string>
            </void>
           </object>
          </void>
         </array>
        </void>
       </object>
      </void>
      <void index="3">
       <object class="com.ti.dvt.msp430.power.core.StatModel$SystemNode">
        <void property="level">
         <int>1</int>
        </void>
        <void property="name">
         <string>System</string>
        </void>
        <void property="parent">
         <object idref="Node0"/>
        </void>
        <void id="NodeArray24" property="serChildren"/>
        <void property="serChildren">
         <object idref="NodeArray24"/>
        </void>
        <void property="serMeasurements">
         <array class="com.ti.dvt.msp430.power.core.Measurement" length="5">
          <void index="0">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="accTotal">
             <double>219680.41930310524</double>
            </void>
            <void property="count">
             <long>478827</long>
            </void>
            <void property="lastValue">
             <double>0.3961953</double>
            </void>
            <void property="name">
             <string>Power</string>
            </void>
            <void property="value">
             <double>0.3961953</double>
            </void>
            <void property="watermarks">
             <void property="hi">
              <double>0.9982496</double>
             </void>
             <void property="lo">
              <double>0.3916815</double>
             </void>
            </void>
           </object>
          </void>
          <void index="1">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="accTotal">
             <double>3.43832199366E16</double>
            </void>
            <void property="count">
             <long>478827</long>
            </void>
            <void property="name">
             <string>Energy</string>
            </void>
            <void property="value">
             <double>1.3833380000068384E11</double>
            </void>
            <void property="watermarks">
             <void property="hi">
              <double>1.3833380000068384E11</double>
             </void>
             <void property="lo">
              <double>500000.0</double>
             </void>
            </void>
           </object>
          </void>
          <void index="2">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="accTotal">
             <double>1.713912067E9</double>
            </void>
            <void property="count">
             <long>478827</long>
            </void>
            <void property="lastValue">
             <double>3579.0</double>
            </void>
            <void property="name">
             <string>Voltage</string>
            </void>
            <void property="value">
             <double>3579.0</double>
            </void>
            <void property="watermarks">
             <void property="hi">
              <double>3596.0</double>
             </void>
             <void property="lo">
              <double>3575.0</double>
             </void>
            </void>
           </object>
          </void>
          <void index="3">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="accTotal">
             <double>7.1812010487216E16</double>
            </void>
            <void property="count">
             <long>478827</long>
            </void>
            <void property="lastValue">
             <double>564000.0</double>
            </void>
            <void property="name">
             <string>Cycle</string>
            </void>
            <void property="value">
             <double>3.00000647E11</double>
            </void>
            <void property="watermarks">
             <void property="hi">
              <double>3.00000647E11</double>
             </void>
             <void property="lo">
              <double>564000.0</double>
             </void>
            </void>
           </object>
          </void>
          <void index="4">
           <object class="com.ti.dvt.msp430.power.core.Measurement">
            <void property="accTotal">
             <double>6.13738563E10</double>
            </void>
            <void property="count">
             <long>478827</long>
            </void>
            <void property="lastValue">
             <double>110700.0</double>
            </void>
            <void property="name">
             <string>Current</string>
            </void>
            <void property="value">
             <double>110700.0</double>
            </void>
            <void property="watermarks">
             <void property="hi">
              <double>277600.0</double>
             </void>
             <void property="lo">
              <double>109500.0</double>
             </void>
            </void>
           </object>
          </void>
         </array>
        </void>
       </object>
      </void>
     </array>
    </void>
    <void property="serMeasurements">
     <array class="com.ti.dvt.msp430.power.core.Measurement" length="2">
      <void index="0">
       <object class="com.ti.dvt.msp430.power.core.Measurement">
        <void property="name">
         <string>Energy</string>
        </void>
       </object>
      </void>
      <void index="1">
       <object class="com.ti.dvt.msp430.power.core.Measurement">
        <void property="name">
         <string>Cycle</string>
        </void>
       </object>
      </void>
     </array>
    </void>
   </object>
  </void>
  <void property="targetStopWatch">
   <void property="end">
    <long>300000083000</long>
   </void>
  </void>
 </object>
</java>


text:
.PHONY: verify-python-path

verify-python-path:
ifndef VPP_PYTHON_PREFIX
	$(error VPP_PYTHON_PREFIX is not set)
endif

PYTHON_VENV_PATH=$(VPP_PYTHON_PREFIX)/virtualenv
PYTHON_DEPENDS=scapy==2.3.3 pexpect
SCAPY_SOURCE=$(PYTHON_VENV_PATH)/lib/python2.7/site-packages/
BUILD_COV_DIR = $(BR)/test-cov

PIP_INSTALL_DONE=$(VPP_PYTHON_PREFIX)/pip-install.done
PIP_PATCH_DONE=$(VPP_PYTHON_PREFIX)/pip-patch.done
PAPI_INSTALL_DONE=$(VPP_PYTHON_PREFIX)/papi-install.done

PAPI_INSTALL_FLAGS=$(PIP_INSTALL_DONE) $(PIP_PATCH_DONE) $(PAPI_INSTALL_DONE)

$(PIP_INSTALL_DONE):
	@virtualenv $(PYTHON_VENV_PATH)
	@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS)"
	@touch $@

$(PIP_PATCH_DONE): $(PIP_INSTALL_DONE)
	@echo --- patching ---
	@sleep 1 # Ensure python recompiles patched *.py files -> *.pyc
	for f in $(CURDIR)/patches/scapy-2.3.3/*.patch ; do \
		echo Applying patch: $$(basename $$f) ; \
		patch -p1 -d $(SCAPY_SOURCE) < $$f ; \
	done
	@touch $@

$(PAPI_INSTALL_DONE): $(PIP_PATCH_DONE)
	@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && cd $(WS_ROOT)/vpp-api/python && python setup.py install"
	@touch $@

define retest-func
	@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py discover -p test_$(TEST)\"*.py\""
endef

test: reset verify-python-path $(PAPI_INSTALL_DONE)
	$(call retest-func)

retest: reset verify-python-path
	$(call retest-func)

.PHONY: wipe doc

reset:
	@rm -f /dev/shm/vpp-unittest-*
	@rm -rf /tmp/vpp-unittest-*

wipe: reset
	@rm -rf $(PYTHON_VENV_PATH)
	@rm -f $(PAPI_INSTALL_FLAGS)

doc: verify-python-path
	@virtualenv $(PYTHON_VENV_PATH)
	@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS) sphinx"
	@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && make -C doc WS_ROOT=$(WS_ROOT) BR=$(BR) NO_VPP_PAPI=1 html"

.PHONY: wipe-doc

wipe-doc:
	@make -C doc wipe BR=$(BR)

cov: wipe-cov reset verify-python-path $(PAPI_INSTALL_DONE)
	@lcov --zerocounters --directory $(VPP_TEST_BUILD_DIR)
	$(call retest-func)
	@mkdir $(BUILD_COV_DIR)
	@lcov --capture --directory $(VPP_TEST_BUILD_DIR) --output-file $(BUILD_COV_DIR)/coverage.info
	@genhtml $(BUILD_COV_DIR)/coverage.info --output-directory $(BUILD_COV_DIR)/html
	@echo
	@echo "Build finished. Code coverage report is in $(BUILD_COV_DIR)/html/index.html"

.PHONY: wipe-cov

wipe-cov: wipe
	@rm -rf $(BUILD_COV_DIR)

help:
	@echo "Running tests:"
	@echo ""
	@echo " test                - build and run functional tests"
	@echo " test-debug          - build and run functional tests (debug build)"
	@echo " retest              - run functional tests"
	@echo " retest-debug        - run functional tests (debug build)"
	@echo " test-wipe           - wipe (temporary) files generated by unit tests"
	@echo ""
	@echo "Arguments controlling test runs:"
	@echo " V=[0|1|2]            - set test verbosity level"
	@echo " DEBUG=<type>         - set VPP debugging kind"
	@echo "    DEBUG=core        - detect coredump and load it in gdb on crash"
	@echo "    DEBUG=gdb         - allow easy debugging by printing VPP PID "
	@echo "                        and waiting for user input before running "
	@echo "                        and tearing down a testcase"
	@echo "    DEBUG=gdbserver   - run gdb inside a gdb server, otherwise "
	@echo "                        same as above"
	@echo " STEP=[yes|no]        - ease debugging by stepping through a testcase "
	@echo " TEST=<name>          - only run specific test"
	@echo ""
	@echo "Creating test documentation"
	@echo " test-doc            - generate documentation for test framework"
	@echo " test-wipe-doc       - wipe documentation for test framework"
	@echo ""
	@echo "Creating test code coverage report"
	@echo " test-cov            - generate code coverage report for test framework"
	@echo " test-wipe-cov       - wipe code coverage report for test framework"
	@echo ""


text:
package com.neocotic.wal.view;

import com.neocotic.wal.exception.WalException;

public class ViewException extends WalException
{

    public ViewException()
    {
        super();
    }

    public ViewException(String message, Throwable cause)
    {
        super(message, cause);
    }

    public ViewException(String message)
    {
        super(message);
    }

    public ViewException(Throwable cause)
    {
        super(cause);
    }
}


text:
package com.inspiring.pugtsdb.repository;

import com.inspiring.pugtsdb.metric.Metric;
import java.util.List;

public interface MetricRepository extends Repository {

    default boolean notExistsMetric(Metric<?> metric) {
        return !existsMetric(metric);
    }

    boolean existsMetric(Metric<?> metric);

    List<String> selectMetricNames();

    <T> List<Metric<T>> selectMetricsByName(String name);

    <T> Metric<T> selectMetricById(String id);

    void insertMetric(Metric<?> metric);
}


text:
package com.malalaoshi.android.utils;

import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;

import com.malalaoshi.android.MalaApplication;

import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Mist util
 * Created by tianwei on 1/9/16.
 */
public class MiscUtil {

    private static Handler handler = new Handler(Looper.getMainLooper());

    public static boolean isMobilePhone(String phone) {
        Pattern p = Pattern.compile("^((17[0-9])|(13[0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");
        Matcher m = p.matcher(phone);
        return m.matches();
    }

    public static void toast(int rid) {
        Toast.makeText(MalaApplication.getInstance().getApplicationContext(),
                rid, Toast.LENGTH_SHORT).show();
    }

    public static void toast(String msg) {
        Toast.makeText(MalaApplication.getInstance().getApplicationContext(),
                msg, Toast.LENGTH_SHORT).show();
    }

    public static void runOnMainThread(Runnable task) {
        handler.post(task);
    }

    public static String formatDate(long value) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        return format.format(value);
    }

    public static <T> boolean isNotEmpty(Collection<T> list) {
        return list != null && list.size() > 0;
    }

    public static <T> boolean isEmpty(Collection<T> list) {
        return list == null || list.size() == 0;
    }
}


text:
module Taxonomy
  class TaxonsWithContentCountPresenter < SimpleDelegator
    MAXIMUM_BAR_WIDTH_PERCENTAGE = 30

    def bar_width_percentage(size)
      return 0 if max_size.zero?

      (size * MAXIMUM_BAR_WIDTH_PERCENTAGE) / max_size
    end
  end
end


text:
import React from 'react'

const Malt = React.createClass({
  render: function () {
    return (

      {this.props.name}
      {this.props.lb} lb
      {this.props.srm} srm

    )
  },

  propTypes: {
    name: React.PropTypes.string,
    lb: React.PropTypes.number,
    srm: React.PropTypes.number,
    potential: React.PropTypes.number,
    costLb: React.PropTypes.number
  }
})

export default Malt


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Publções Inst. Micol. Recife 672: 4 (1971)

#### Original name
Periconia batistae D. Rao

### Remarks
null


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oit.gl4.ab;

import static com.jogamp.opengl.GL2ES3.*;
import com.jogamp.opengl.GL4;
import static com.jogamp.opengl.GL4.GL_DYNAMIC_STORAGE_BIT;
import com.jogamp.opengl.util.GLBuffers;
import com.jogamp.opengl.util.glsl.ShaderCode;
import com.jogamp.opengl.util.glsl.ShaderProgram;
import glm.vec._4.Vec4;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import oit.framework.Resources;
import oit.gl4.OIT;
import oit.gl4.Scene;
import oit.gl4.Semantic;

/**
 *
 * @author GBarbieri
 */
public class ABuffer {

    private static final String SHADERS_ROOT = "/oit/gl4/ab/shaders/";
    private static final String[] VS_SRC = new String[]{"render", "passThrough", "passThrough"};
    private static final String[] FS_SRC = new String[]{"render", "display", "clear"};
    private static final int ABUFFER_SIZE = 16;

    private static final boolean useABuffer = true;
    private static final boolean useSorting = true;
    private static final boolean resolveAlphaCorrection = false;
    private static final boolean resolveGelly = false;
    private static final boolean useTextures = true;

    private class Program {

        public static final int RENDER = 0;
        public static final int DISPLAY = 1;
        public static final int CLEAR = 2;
        public static final int MAX = 3;
    }

    private class Texture {

        public static final int ABUFFER = 0;
        public static final int ABUFFER_COUNTER = 1;
        public static final int MAX = 2;
    }

    private static class Parameters {

        public static final int SIZE = 8 * Integer.BYTES + Vec4.SIZE;
        private static ByteBuffer buffer = GLBuffers.newDirectByteBuffer(SIZE);

        public static ByteBuffer getBuffer() {
            buffer
                    .putInt(Resources.imageSize.x).putInt(Resources.imageSize.y)
                    .putInt(useABuffer ? 1 : 0)
                    .putInt(ABUFFER_SIZE)
                    .putInt(useTextures ? 1 : 0)
                    .putInt(resolveGelly ? 1 : 0)
                    .putInt(useSorting ? 1 : 0)
                    .putInt(resolveAlphaCorrection ? 1 : 0)
                    .putFloat(Resources.backgroundColor.x).putFloat(Resources.backgroundColor.y)
                    .putFloat(Resources.backgroundColor.z).putFloat(0f)
                    .rewind();

            return buffer;
        }
    }

    private int[] programName = new int[Program.MAX];
    private IntBuffer textureName = GLBuffers.newDirectIntBuffer(Texture.MAX),
            bufferName = GLBuffers.newDirectIntBuffer(1);
    private FullscreenQuad fullscreenQuad;
    /**
     * https://jogamp.org/bugzilla/show_bug.cgi?id=1287
     */
    private boolean bug1287 = true;

    public ABuffer(GL4 gl4) {

        initPrograms(gl4);

        initBuffer(gl4);

        initTargets(gl4);

        fullscreenQuad = new FullscreenQuad(gl4);

        //Disable backface culling to keep all fragments
        gl4.glDisable(GL_CULL_FACE);
        gl4.glDisable(GL_DEPTH_TEST);
        gl4.glDisable(GL_STENCIL_TEST);
        gl4.glDisable(GL_BLEND);
    }

    private void initPrograms(GL4 gl4) {

        for (int program = Program.RENDER; program < Program.MAX; program++) {

            ShaderCode vertShader = ShaderCode.create(gl4, GL_VERTEX_SHADER, this.getClass(), SHADERS_ROOT, null,
                    VS_SRC[program], "vert", null, true);
            ShaderCode fragShader = ShaderCode.create(gl4, GL_FRAGMENT_SHADER, this.getClass(), SHADERS_ROOT, null,
                    FS_SRC[program], "frag", null, true);

            ShaderProgram shaderProgram = new ShaderProgram();
            shaderProgram.add(vertShader);
            shaderProgram.add(fragShader);

            shaderProgram.link(gl4, System.out);

            programName[program] = shaderProgram.program();
        }
    }

    private void initBuffer(GL4 gl4) {

        gl4.glCreateBuffers(1, bufferName);

        if (!bug1287) {

            gl4.glNamedBufferStorage(bufferName.get(0), Parameters.SIZE, Parameters.getBuffer(), GL_DYNAMIC_STORAGE_BIT);

        } else {

            gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(0));
            gl4.glBufferStorage(GL_UNIFORM_BUFFER, Parameters.SIZE, null, GL_DYNAMIC_STORAGE_BIT);
        }

        gl4.glBindBufferBase(GL_UNIFORM_BUFFER, Semantic.Uniform.PARAMETERS, bufferName.get(0));
    }

    /**
     * Initialize A-Buffer storage. It is composed of a fragment buffer with
     * ABUFFER_SIZE layers and a "counter" buffer used to maintain the number
     * of fragments stored per pixel.
     *
     * @param gl4
     */
    private void initTargets(GL4 gl4) {

        if (useTextures) {

            textureName.position(Texture.ABUFFER);
            gl4.glCreateTextures(GL_TEXTURE_2D_ARRAY, 1, textureName);
            textureName.position(Texture.ABUFFER_COUNTER);
            gl4.glCreateTextures(GL_TEXTURE_2D, 1, textureName);
            textureName.position(0);

            gl4.glTextureParameteri(textureName.get(Texture.ABUFFER), GL_TEXTURE_MIN_FILTER, GL_NEAREST);
            gl4.glTextureParameteri(textureName.get(Texture.ABUFFER), GL_TEXTURE_MAG_FILTER, GL_NEAREST);

            gl4.glTextureStorage3D(textureName.get(Texture.ABUFFER), 1, GL_RGBA32F, Resources.imageSize.x,
                    Resources.imageSize.y, ABUFFER_SIZE);

            gl4.glBindImageTexture(Semantic.Sampler.ABUFFER, textureName.get(Texture.ABUFFER), 0, true, 0, GL_READ_WRITE,
                    GL_RGBA32F);
            gl4.glBindSampler(Semantic.Sampler.ABUFFER, OIT.samplerName.get(0));

            gl4.glTextureParameteri(textureName.get(Texture.ABUFFER_COUNTER), GL_TEXTURE_MIN_FILTER, GL_NEAREST);
            gl4.glTextureParameteri(textureName.get(Texture.ABUFFER_COUNTER), GL_TEXTURE_MAG_FILTER, GL_NEAREST);

            gl4.glTextureStorage2D(textureName.get(Texture.ABUFFER_COUNTER), 1, GL_R32UI, Resources.imageSize.x,
                    Resources.imageSize.y);

            gl4.glBindImageTexture(Semantic.Sampler.ABUFFER_COUNTER, textureName.get(Texture.ABUFFER_COUNTER), 0, false,
                    0, GL_READ_WRITE, GL_R32UI);
            gl4.glBindSampler(Semantic.Sampler.ABUFFER_COUNTER, OIT.samplerName.get(0));

        } else {

            // TODO
        }
    }

    private void deleteTargets(GL4 gl4) {
        gl4.glDeleteTextures(Texture.MAX, textureName);
    }

    public void render(GL4 gl4, Scene scene) {

        {
            gl4.glNamedBufferSubData(bufferName.get(0), 0, Parameters.SIZE, Parameters.getBuffer());
        }

        gl4.glClearBufferfv(GL_COLOR, 0, Resources.clearColor.put(0, Resources.backgroundColor.x)
                .put(1, Resources.backgroundColor.y).put(2, Resources.backgroundColor.z).put(3, 1));
        gl4.glClearBufferfv(GL_DEPTH, 0, Resources.clearDepth.put(0, 1));

        gl4.glEnable(GL_DEPTH_TEST);

        // Clear A-Buffer
        if (useABuffer) {

            if (!useTextures) {
                // TODO
            }
            gl4.glClearNamedBufferData(GL_BUFFER, GL_R8_SNORM, GL_MAX, GL_RG, textureName);
            gl4.glUseProgram(programName[Program.CLEAR]);
            fullscreenQuad.render(gl4);

            // Ensure that all global memory write are done before starting to render
            gl4.glMemoryBarrier(0xffff);
        }

        // Renderg the model into the A-Buffer
        gl4.glUseProgram(programName[Program.RENDER]);
//        scene.renderTransparent(gl4);

        // Resolve A-Buffer
        if (useABuffer) {

            // Ensure that all global memory write are done before resolving
            gl4.glMemoryBarrier(0xffff);

            gl4.glUseProgram(programName[Program.DISPLAY]);
            fullscreenQuad.render(gl4);
        }
    }

    public void reshape(GL4 gl4) {
        initTargets(gl4);
        deleteTargets(gl4);
    }
}


text:
@interface ColourList : UITableViewController

@property (nonatomic, strong) Model *model;

@end


text:
using Azure.Core;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Synapse.Models;

namespace Azure.ResourceManager.Synapse
{
    /// <summary> A class representing the PrivateEndpointConnectionForPrivateLinkHub data model. </summary>
    public partial class PrivateEndpointConnectionForPrivateLinkHubData : ResourceData
    {
        /// <summary> Initializes a new instance of PrivateEndpointConnectionForPrivateLinkHubData. </summary>
        internal PrivateEndpointConnectionForPrivateLinkHubData()
        {
        }

        /// <summary> Initializes a new instance of PrivateEndpointConnectionForPrivateLinkHubData. </summary>
        /// <param name="id"> The id. </param>
        /// <param name="name"> The name. </param>
        /// <param name="resourceType"> The resourceType. </param>
        /// <param name="systemData"> The systemData. </param>
        /// <param name="properties"> Properties of a private endpoint connection. </param>
        internal PrivateEndpointConnectionForPrivateLinkHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PrivateEndpointConnectionProperties properties) : base(id, name, resourceType, systemData)
        {
            Properties = properties;
        }

        /// <summary> Properties of a private endpoint connection. </summary>
        public PrivateEndpointConnectionProperties Properties { get; }
    }
}


text:
/**
 * @fileoverview A visual containing a cylinder mesh.
 * @author Tony Parisi
 */
goog.provide('SB.CubeVisual');
goog.require('SB.Visual');

/**
 * @param {Object} param supports the following options:
 *   radiusTop (number): The top radius of the cylinder
 *   radiusBottom (number): The bottom radius of the cylinder
 *   height (number): The height of the cylinder
 *   segmentsRadius (number): The radius of the segments
 *   segmentsHeight (number): The height of the segments
 *   openEnded (boolean): Whether the cylinder is open ended
 * @constructor
 * @extends {SB.Visual}
 */
SB.CubeVisual = function(param) {
    SB.Visual.call(this, param);

    this.param = param || {};
}

goog.inherits(SB.CubeVisual, SB.Visual);

SB.CubeVisual.prototype.realize = function()
{
	SB.Visual.prototype.realize.call(this);

    var width = this.param.width || 2.0;
    var height = this.param.height || 2.0;
    var depth = this.param.depth || 2.0;
    var color;
    if (this.param.color === null)
    {
    	color = 0x808080;
    }
    else
    {
    	color = this.param.color;
    }

    var map = this.param.map;

    var ambient = this.param.ambient || 0;

	var geometry = new THREE.CubeGeometry(width, height, depth);
	this.object = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial( { color: color, map:map, opacity: 1, ambient: ambient, transparent: false, wireframe: false } ));

    this.addToScene();
}


text:
<?php

namespace Jalle19\VagrantRegistryGenerator\Registry\Manifest;

/**
 * Class FileMetadata
 * @package Jalle19\VagrantRegistryGenerator\Registry\Manifest
 */
class FileMetadata
{

    /**
     * @var string
     */
    private $fileName;

    /**
     * @var \DateTime
     */
    private $timestamp;

    /**
     * @var int
     */
    private $size;

    /**
     * FileMetadata constructor.
     *
     * @param string    $fileName
     * @param \DateTime $timestamp
     * @param int       $size
     */
    public function __construct($fileName, \DateTime $timestamp, $size)
    {
        $this->fileName  = $fileName;
        $this->timestamp = $timestamp;
        $this->size      = $size;
    }

    /**
     * @return string
     */
    public function getFileName()
    {
        return $this->fileName;
    }

    /**
     * @return \DateTime
     */
    public function getTimestamp()
    {
        return $this->timestamp;
    }

    /**
     * @return int
     */
    public function getSize()
    {
        return $this->size;
    }

}