text:
package secret

import (
	"reflect"
	"testing"

	"github.com/kubernetes/dashboard/src/app/backend/api"
	"github.com/kubernetes/dashboard/src/app/backend/resource/common"
	"github.com/kubernetes/dashboard/src/app/backend/resource/dataselect"
	metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/pkg/api/v1"
)

func TestToSecretList(t *testing.T) {
	cases := []struct {
		secrets   []v1.Secret
		expected  *SecretList
		namespace *common.NamespaceQuery
	}{
		{
			[]v1.Secret{
				{
					ObjectMeta: metaV1.ObjectMeta{
						Name:              "user1",
						Namespace:         "foo",
						CreationTimestamp: metaV1.Unix(111, 222),
					},
				},
				{
					ObjectMeta: metaV1.ObjectMeta{
						Name:              "user2",
						Namespace:         "foo",
						CreationTimestamp: metaV1.Unix(111, 222),
					},
				},
			},
			&SecretList{
				Secrets: []Secret{
					{
						ObjectMeta: api.ObjectMeta{
							Name:              "user1",
							Namespace:         "foo",
							CreationTimestamp: metaV1.Unix(111, 222),
						},
						TypeMeta: api.NewTypeMeta(api.ResourceKindSecret),
					},
					{
						ObjectMeta: api.ObjectMeta{
							Name:              "user2",
							Namespace:         "foo",
							CreationTimestamp: metaV1.Unix(111, 222),
						},
						TypeMeta: api.NewTypeMeta(api.ResourceKindSecret),
					},
				},
				ListMeta: api.ListMeta{
					TotalItems: 2,
				},
			},
			common.NewNamespaceQuery([]string{"foo"}),
		},
	}

	for _, c := range cases {
		actual := toSecretList(c.secrets, nil, dataselect.NoDataSelect)
		if !reflect.DeepEqual(actual, c.expected) {
			t.Errorf("toSecretList() ==\n%#v\nExpected: %#v", actual, c.expected)
		}
	}
}


text:
When the laptop is handy, but the remote is too far...

* Built with [RubyMotion](http://www.rubymotion.com/).
* Compiled .app [download here](https://samus.org/dist/romote.zip).
* BSD licensed
  * Except for public domain CocoaAsyncSocket code.

![](screenshot.png)

redpajama_set_name: RedPajamaGithub


text:
Chart - InvertIfNegative
========================

Can be set on a bar series or on a data point. It's not clear what its meaning
is on a non-bar data point. ``c:barSer/c:invertIfNegative`` is the target
element. Also valid on a bubble series.

Protocol
--------

::

    >>> assert isinstance(plot, pptx.chart.plot.BarPlot)
    >>> series = plot.series[0]
    >>> series
    <pptx.chart.series.BarSeries instance at 0x1deadbeef>
    >>> series.invert_if_negative
    True
    >>> series.invert_if_negative = False
    >>> series.invert_if_negative
    False

Semantics
---------

* Defaults to |True| if the ``<c:invertIfNegative>`` element is not present.
* Defaults to |True| if the parent element is present but the `val` attribute
  is not.

PowerPoint® behavior
--------------------

In my tests, the ``<c:invertIfNegative>`` element is always present in a new
bar chart and always explicitly initialized to False.

XML specimens
-------------

.. highlight:: xml

A series element from a simple column chart (single series)::

  <c:ser>
    <c:idx val="0"/>
    <c:order val="0"/>
    <c:tx>
      <!-- ... -->
    </c:tx>
    <c:invertIfNegative val="0"/>
    <c:dLbls>
      <!-- ... -->
    </c:dLbls>
    <c:cat>
      <!-- ... -->
    </c:cat>
    <c:val>
      <!-- ... -->
    </c:val>
  </c:ser>

Related Schema Definitions
--------------------------

::

  <xsd:complexType name="CT_BarSer">  <!-- denormalized -->
    <xsd:sequence>
      <xsd:element name="idx"              type="CT_UnsignedInt"/>
      <xsd:element name="order"            type="CT_UnsignedInt"/>
      <xsd:element name="tx"               type="CT_SerTx"             minOccurs="0"/>
      <xsd:element name="spPr"             type="a:CT_ShapeProperties" minOccurs="0"/>
      <xsd:element name="invertIfNegative" type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="pictureOptions"   type="CT_PictureOptions"    minOccurs="0"/>
      <xsd:element name="dPt"              type="CT_DPt"               minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="dLbls"            type="CT_DLbls"             minOccurs="0"/>
      <xsd:element name="trendline"        type="CT_Trendline"         minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="errBars"          type="CT_ErrBars"           minOccurs="0"/>
      <xsd:element name="cat"              type="CT_AxDataSource"      minOccurs="0"/>
      <xsd:element name="val"              type="CT_NumDataSource"     minOccurs="0"/>
      <xsd:element name="shape"            type="CT_Shape"             minOccurs="0"/>
      <xsd:element name="extLst"           type="CT_ExtensionList"     minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CT_BarSer">
    <xsd:sequence>
      <xsd:group   ref="EG_SerShared"/>
      <xsd:element name="invertIfNegative" type="CT_Boolean"        minOccurs="0"/>
      <xsd:element name="pictureOptions"   type="CT_PictureOptions" minOccurs="0"/>
      <xsd:element name="dPt"              type="CT_DPt"            minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="dLbls"            type="CT_DLbls"          minOccurs="0"/>
      <xsd:element name="trendline"        type="CT_Trendline"      minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="errBars"          type="CT_ErrBars"        minOccurs="0"/>
      <xsd:element name="cat"              type="CT_AxDataSource"   minOccurs="0"/>
      <xsd:element name="val"              type="CT_NumDataSource"  minOccurs="0"/>
      <xsd:element name="shape"            type="CT_Shape"          minOccurs="0"/>
      <xsd:element name="extLst"           type="CT_ExtensionList"  minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CT_BubbleSer">
    <xsd:sequence>
      <xsd:group ref="EG_SerShared"/>
      <xsd:element name="invertIfNegative" type="CT_Boolean"       minOccurs="0"/>
      <xsd:element name="dPt"              type="CT_DPt"           minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="dLbls"            type="CT_DLbls"         minOccurs="0"/>
      <xsd:element name="trendline"        type="CT_Trendline"     minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="errBars"          type="CT_ErrBars"       minOccurs="0" maxOccurs="2"/>
      <xsd:element name="xVal"             type="CT_AxDataSource"  minOccurs="0"/>
      <xsd:element name="yVal"             type="CT_NumDataSource" minOccurs="0"/>
      <xsd:element name="bubbleSize"       type="CT_NumDataSource" minOccurs="0"/>
      <xsd:element name="bubble3D"         type="CT_Boolean"       minOccurs="0"/>
      <xsd:element name="extLst"           type="CT_ExtensionList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


text:
namespace OpenIDConnect.Core.Domain.Models
{
    public class PageDetails
    {
        public PageDetails(int currentPage, int pageSize, int itemsOnPage, int totalPages, int totalItems)
        {
            this.CurrentPage = currentPage;
            this.PageSize = pageSize;
            this.ItemsOnPage = itemsOnPage;
            this.TotalPages = totalPages;
            this.TotalItems = totalItems;
        }

        public int CurrentPage { get; }

        public int PageSize { get; }

        public int ItemsOnPage { get; }

        public int TotalPages { get; }

        public int TotalItems { get; }
    }
}


text:
	<link rel="stylesheet" href="../../css/Matrixonator.css">
<title> Matrixonator Help - 2.0 Tutorials</title>

 Matrixonator-Java

 Help

 Click on a link below to get some help

 Help -> 2.0 Tutorials

2.1 : Getting Started

2.2 : Creating a New Matrix

2.3 : Editing Matrix Name

2.4 : Showing Matrix Data

2.5 : Performing Calulcations on a Matrix

Help Index

 2.0 : Tutorials

 2.1 : Getting Started

 When working with Matrixonator, you should see the following window:

What do those numbers mean?

(1) Top Menu

File -> Close Option to Close Matrixonator

(2) List of matrices Matrixonator has.

(3) List of properties and options for currently selected Matrix in (2)

(4) Matrix details, Name, Row and Column count and  Date created

(5) Show data button; when clicked will display the data stored in the currently selected matrix

(6) Matrix properties which Matrixonator can calculate

(7) Matrix option buttons

 New -> Create New Matrix and add to list

 Edit -> Modify matrix name

 Delete -> Removes the Matrix from list and gives option to remove some computer if has been saved

 Save -> Save matrix to computer for use everytime Matrixonator is run

Top | Help Index

 2.2 : Creating a New Matrix

 To create a new Matirx, click on the New button located at number (7) on the above image.

 Once clicked you should be presented with a window like below. Enter the name and number of rows and columns of the matrix. When have entered those details click Next to move onto next step. Click Cancel at any time to return and no new matrix will be added.

 After clicking next, you'll be asked to enter data into the rows and columns of the Matrix. Say you wished to have a matrix with 4 rows and 2 columns,  you'll see something looking like this:

 Fill out each of the boxes with a value. You must enter a value into each box to continue!. If you wish to add or remove rows or columns simply press Previous and modify the values in the window shown above. Once you've entered all the data, click Next

Your window will look something like this before clicking Next

 Once you've pressed next you should see a nice information message saying your matrix was created. Congratulations, you matrix is now appearing on the list and we can perform some calculations!

Top | Help Index

 2.3 : Editing Matrix Name

 To create a edit the matrix name, click on the Edit button located at number (7) on the above image.

 Once clicked you should be presented with a window like below. Enter the new matrix name. If you don't wish to make you changes click cancel. Click OK to accept changes.

Top | Help Index

 2.4 : Show Matrix Data

 To show the values in the selected matrix, click Show Data shown at number (5) on the above image. All the values stored will be presented to you. Click Close to close this window.

Top | Help Index

 2.5 : Performing Calculations on a Matrix

 To show calculate something from the selected matrix, click Calculate beside the property you wish to view shown at (6) on the above image. The result will be displayed to you. Click Close to close this window.

Top | Help Index


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

<TITLE>
Uses of Class gov.nih.nci.cabig.caaers.dao.index.AbstractIndexDao
</TITLE>

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

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
gov.nih.nci.cabig.caaers.dao.index.AbstractIndexDao

Packages that use AbstractIndexDao

gov.nih.nci.cabig.caaers.accesscontrol.dataproviders

gov.nih.nci.cabig.caaers.dao.index

Uses of AbstractIndexDao in gov.nih.nci.cabig.caaers.accesscontrol.dataproviders

Methods in gov.nih.nci.cabig.caaers.accesscontrol.dataproviders with parameters of type AbstractIndexDao

 void
FilteredDataLoader.updateAnIndex(java.lang.String userName,
              java.util.Set<UserGroupType> allRoles,
              java.util.Map<UserGroupType,IndexEntry> existingMap,
              java.util.Map<UserGroupType,IndexEntry> availableMap,
              AbstractIndexDao indexDao)

          Will take care of refreshing the indexes

Uses of AbstractIndexDao in gov.nih.nci.cabig.caaers.dao.index

Subclasses of AbstractIndexDao in gov.nih.nci.cabig.caaers.dao.index

 class
AdverseEventIndexDao

 class
ExpeditedAdverseEventReportIndexDao

 class
InvestigatorIndexDao

 class
OrganizationIndexDao

 class
ParticipantIndexDao

 class
ReportIndexDao

 class
ReportingPeriodIndexDao

 class
ResearchStaffIndexDao

 class
StudyIndexDao

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
A script to create a directivity sonogram based on measurements dumped out of [REW] (http://www.roomeqwizard.com/) (and until such time as http://www.hometheatershack.com/forums/rew-forum/111090-feature-request-polar-response-plots.html is implemented).

# What is a polar map?

See [this article] (http://www.acousticfrontiers.com/20131129controlled-directivity-speakers-open-up-your-acoustic-treatment-options/) for a summary. The approach, I believe, originates from Geddes and has been subsequently implemented in [ARTA] (http://www.artalabs.hr/). This implementation uses the same colour scheme (the matlab jet colourmap) for consistency.

# What do I need to get started?

* a set of measurements containing appropriately measured data of a loudspeaker taken at various angles
* either
    * a linux box
    * a windows box with cygwin - install from [here](https://www.cygwin.com/)
* gnuplot
* awk

# How do I generate a sonogram?

NB: these instructions assume you are using REW, other software probably works as they all seem to stick to the same space delimited [FRD] (http://www.cross-spectrum.com/weblog/2010/03/05) format.

## Prepare the Input Data

* take measurements in your usual fashion at various degrees off axis
* create a directory to store the exported data
* export each measurement to a text file in space delimited FRD format named `<degrees>.dat` (select measurement, file/export/measurement as text, enter file name)

NB: see the [sample] dir in this repo for an example of the exported data

## Generate the Plot

NB: assumes generate.sh from this repo is on your path and is executable

* open a shell in the directory containing the data

    generate.sh

* look for some png files in the output dir

if you want to know what the cmd line options are then just run generate.sh -v

    generate.sh -d -l 100 -h 22000 -m -x 1920 -y 1080 -p foo -z 30
        -d force delete of existing generated files
	-l sets the lo frequency for the data generated, if unset default to the minimum value in the input data (NB: actually 200 for now)
        -h sets the hi frequency for the data generated, if unset default to the maximum value in the input data (NB: actually 24000 for now)
        -m mirror mode
        -x width of image in pixels, default 1920
        -y height of image in pixels, default 1080
        -p file name prefix
        -z z axis range, defaults to 30dB

The generated plot will always have a black line indicating the -6dB contour.

# How do I change the reference SPL?

The reference SPL is set using the -r option, if the supplied value is greater than the detected max spl then this is used instead. The reference spl is the point from which the -6dB contour is calculated.

# My FRDs use a different file extension, how do I override it?

Use the -e option

# TODO

## Formatting

* label the contours as -3, -6, -9 etc


text:
<?php

namespace Shopware\PluginCreator\Services\IoAdapter;

/**
 * HardDrive IoAdapter actually performs IO on the hdd
 *
 * Class HardDrive
 * @package Shopware\PluginCreator\Services\IoAdapter
 */
class HardDrive implements IoAdapter
{
    /**
     * @param $path
     * @return bool
     */
    public function exists($path)
    {
        return file_exists($path);
    }

    public function createDirectory($path)
    {
        if ($this->exists($path)) {
            return;
        }

        $success = mkdir($path, 0777, true);

        if (!$success) {
            throw new \RuntimeException("Could not create »{$path}«. Check your directory permission");
        }
    }

    public function createFile($file, $content)
    {
        file_put_contents($file, $content);
    }
}


text:
package me.buddyrich.agility;

import org.parabot.environment.api.utils.Time;
import org.parabot.environment.scripts.framework.Strategy;
import org.rev317.min.api.methods.SceneObjects;
import org.rev317.min.api.wrappers.SceneObject;

public class Move implements Strategy {

	@Override
    public boolean activate() {
        SceneObject swing = getSwing();
        //Check if the Object Exist.
        if(swing != null) {
            if (swing.distanceTo() > 3) {
                return true;
            }
        }
        return false;
    }

    @Override
    public void execute() {
        SceneObject swing = getSwing();

        if(swing != null) {
            if (swing.distanceTo() > 3) {
                swing.getLocation().walkTo();
                Time.sleep(500);
            }
        }
    }

    /**
     * Gets the SceneObject
     * @return The SceneObject.
     */
    private SceneObject getSwing(){
        for(SceneObject swing : SceneObjects.getNearest(2283)){
            if(swing != null){
                return swing;
            }
        }
        return null;
    }
}


text:
package com.touzbi.ansa.util.fileutils.filereaderstrategy;

import java.io.IOException;
import java.io.InputStream;
import java.util.logging.LogManager;

/*
 * File reader implementation using class loader
 */
public class ClassPathRelativeFileReaderStrategy extends
		AbstractFileReaderStrategy {
	private static final Logger LOGGER = LogManager.getLogger();

	@Override
	public InputStream readToInputStream(String filePath) throws IOException {
		LOGGER.info("Reading file relative to class path: " + filePath);

		return Thread.currentThread().getContextClassLoader()
				.getResourceAsStream(filePath);
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Hardware Locality (hwloc): Interoperability with glibc sched affinity</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Hardware Locality (hwloc)
    1.9

Main Page

Related Pages

Modules

Data Structures

Functions

Interoperability with glibc sched affinity

Functions

static int 	hwloc_cpuset_to_glibc_sched_affinity (hwloc_topology_t topology, hwloc_const_cpuset_t hwlocset, cpu_set_t *schedset, size_t schedsetsize)

static int 	hwloc_cpuset_from_glibc_sched_affinity (hwloc_topology_t topology, hwloc_cpuset_t hwlocset, const cpu_set_t *schedset, size_t schedsetsize)

Detailed Description

This interface offers ways to convert between hwloc cpusets and glibc cpusets such as those manipulated by sched_getaffinity() or pthread_attr_setaffinity_np().

Note

Topology topology must match the current machine.

Function Documentation

          static int hwloc_cpuset_from_glibc_sched_affinity
          (
          hwloc_topology_t
          topology,

          hwloc_cpuset_t
          hwlocset,

          const cpu_set_t *
          schedset,

          size_t
          schedsetsize

          )

inlinestatic

Convert glibc sched affinity CPU set schedset into hwloc CPU set.

This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.

schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC

          static int hwloc_cpuset_to_glibc_sched_affinity
          (
          hwloc_topology_t
          topology,

          hwloc_const_cpuset_t
          hwlocset,

          cpu_set_t *
          schedset,

          size_t
          schedsetsize

          )

inlinestatic

Convert hwloc CPU set toposet into glibc sched affinity CPU set schedset.

This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.

schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC

<address class="footer">
Generated on Wed Mar 26 2014 11:09:47 for Hardware Locality (hwloc) by

 1.8.6
</address>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Trans. Br. mycol. Soc. 7: 158 (1921)

#### Original name
Nectria barbata Petch

### Remarks
null


text:
jquery.mobile.mvc
=================

Fluent implementation of ASP.NET-MVC HTML helpers for jQuery Mobile


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.synapse.generated;

import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties;
import com.azure.resourcemanager.synapse.models.CustomerManagedKeyDetails;
import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails;
import com.azure.resourcemanager.synapse.models.EncryptionDetails;
import com.azure.resourcemanager.synapse.models.KekIdentityProperties;
import com.azure.resourcemanager.synapse.models.ManagedIdentity;
import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings;
import com.azure.resourcemanager.synapse.models.PurviewConfiguration;
import com.azure.resourcemanager.synapse.models.ResourceIdentityType;
import com.azure.resourcemanager.synapse.models.UserAssignedManagedIdentity;
import com.azure.resourcemanager.synapse.models.WorkspaceKeyDetails;
import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess;
import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/** Samples for Workspaces CreateOrUpdate. */
public final class WorkspacesCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspace.json
     */
    /**
     * Sample code: Create or update a workspace.
     *
     * @param manager Entry point to SynapseManager.
     */
    public static void createOrUpdateAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) {
        manager
            .workspaces()
            .define("workspace1")
            .withRegion("East US")
            .withExistingResourceGroup("resourceGroup1")
            .withTags(mapOf("key", "value"))
            .withIdentity(
                new ManagedIdentity()
                    .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
                    .withUserAssignedIdentities(
                        mapOf(
                            "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1",
                            new UserAssignedManagedIdentity())))
            .withDefaultDataLakeStorage(
                new DataLakeStorageAccountDetails()
                    .withAccountUrl("https://accountname.dfs.core.windows.net")
                    .withFilesystem("default"))
            .withSqlAdministratorLoginPassword("password")
            .withManagedResourceGroupName("workspaceManagedResourceGroupUnique")
            .withSqlAdministratorLogin("login")
            .withManagedVirtualNetwork("default")
            .withEncryption(
                new EncryptionDetails()
                    .withCmk(
                        new CustomerManagedKeyDetails()
                            .withKey(
                                new WorkspaceKeyDetails()
                                    .withName("default")
                                    .withKeyVaultUrl("https://vault.azure.net/keys/key1"))
                            .withKekIdentity(
                                new KekIdentityProperties()
                                    .withUserAssignedIdentity(
                                        "/subscriptions/b64d7b94-73e7-4d36-94b2-7764ea3fd74a/resourcegroups/SynapseCI/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1")
                                    .withUseSystemAssignedIdentity(false))))
            .withManagedVirtualNetworkSettings(
                new ManagedVirtualNetworkSettings()
                    .withPreventDataExfiltration(false)
                    .withLinkedAccessCheckOnTargetResource(false)
                    .withAllowedAadTenantIdsForLinking(Arrays.asList("740239CE-A25B-485B-86A0-262F29F6EBDB")))
            .withWorkspaceRepositoryConfiguration(
                new WorkspaceRepositoryConfiguration()
                    .withType("FactoryGitHubConfiguration")
                    .withHostname("")
                    .withAccountName("mygithubaccount")
                    .withProjectName("myproject")
                    .withRepositoryName("myrepository")
                    .withCollaborationBranch("master")
                    .withRootFolder("/"))
            .withPurviewConfiguration(
                new PurviewConfiguration()
                    .withPurviewResourceId(
                        "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"))
            .withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED)
            .withCspWorkspaceAdminProperties(
                new CspWorkspaceAdminProperties()
                    .withInitialWorkspaceAdminObjectId("6c20646f-8050-49ec-b3b1-80a0e58e454d"))
            .create();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}


text:
"use strict";
var it = require('it'),
    assert = require('assert'),
    comb = require("../../index"),
    define = comb.define,
    hitch = comb.hitch;

it.describe("comb.plugins.MethodMissing", function (it) {
//Super of other classes
    var Missing = define(comb.plugins.MethodMissing, {
        instance: {

            constructor: function (options) {
                this._super(arguments);
                this._attributes = {};
            },

            instanceMethod: function (val, force) {
                if (force) {
                    this.randomValue = val;
                    return this;
                } else {
                    return this.instanceMethod(val, true);
                }
            },

            setMissingProperty: function (name, val) {
                this._attributes[name] = val;
            },

            getMissingProperty: function (name) {
                return this._attributes[name];
            }
        }
    });

    var MissingInherit = define(Missing);

    var o = new comb.plugins.MethodMissing();

    var missing = new Missing();

    it.should("use default JS behavior of the methods are not overridden ", function () {
        //This is true because they inherit from eachother!
        assert.isUndefined(o.name);
        o.name = "hello";
        assert.equal(o.name, "hello");
        assert.throws(function () {
            o.random();
        });
    });

    it.should("maintain type", function () {
        assert.instanceOf(missing, Missing);
        assert.instanceOf(missing, comb.plugins.MethodMissing);
        var inherit = new MissingInherit();
        assert.instanceOf(inherit, MissingInherit);
        assert.instanceOf(inherit, Missing);
        assert.instanceOf(inherit, comb.plugins.MethodMissing);

    });

    it.should("call the setPropertiesMethod when setting a property", function () {
        //This is true because they inherit from eachother!
        missing.name = "hello";
        assert.equal(missing._attributes.name, "hello");
    });

    it.should("call the getPropertiesMethod when setting a property", function () {
        //This is true because they inherit from eachother!
        o.name = "hello";
        assert.equal(missing.name, "hello");
    });

    it.should("allow the calling of functions", function () {
        //This is true because they inherit from eachother!
        missing.instanceMethod("comb is awesome!");
        assert.equal(missing.randomValue, "comb is awesome!");
    });

}).as(module);


text:
/*
 * NetLabel Network Address Lists
 *
 * This file contains network address list functions used to manage ordered
 * lists of network addresses for use by the NetLabel subsystem.  The NetLabel
 * system manages static and dynamic label mappings for network protocols such
 * as CIPSO and RIPSO.
 *
 * Author: Paul Moore <paul@paul-moore.com>
 *
 */

/*
 * (c) Copyright Hewlett-Packard Development Company, L.P., 2008
 *
 * This program is free software;  you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY;  without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 * the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program;  if not, see <http://www.gnu.org/licenses/>.
 *
 */

#include <linux/types.h>
#include <linux/rcupdate.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <linux/audit.h>

#include "netlabel_addrlist.h"

/*
 * Address List Functions
 */

/**
 * netlbl_af4list_search - Search for a matching IPv4 address entry
 * @addr: IPv4 address
 * @head: the list head
 *
 * Description:
 * Searches the IPv4 address list given by @head.  If a matching address entry
 * is found it is returned, otherwise NULL is returned.  The caller is
 * responsible for calling the rcu_read_[un]lock() functions.
 *
 */
struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
					     struct list_head *head)
{
	struct netlbl_af4list *iter;

	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid && (addr & iter->mask) == iter->addr)
			return iter;

	return NULL;
}

/**
 * netlbl_af4list_search_exact - Search for an exact IPv4 address entry
 * @addr: IPv4 address
 * @mask: IPv4 address mask
 * @head: the list head
 *
 * Description:
 * Searches the IPv4 address list given by @head.  If an exact match if found
 * it is returned, otherwise NULL is returned.  The caller is responsible for
 * calling the rcu_read_[un]lock() functions.
 *
 */
struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
						   __be32 mask,
						   struct list_head *head)
{
	struct netlbl_af4list *iter;

	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid && iter->addr == addr && iter->mask == mask)
			return iter;

	return NULL;
}

#if IS_ENABLED(CONFIG_IPV6)
/**
 * netlbl_af6list_search - Search for a matching IPv6 address entry
 * @addr: IPv6 address
 * @head: the list head
 *
 * Description:
 * Searches the IPv6 address list given by @head.  If a matching address entry
 * is found it is returned, otherwise NULL is returned.  The caller is
 * responsible for calling the rcu_read_[un]lock() functions.
 *
 */
struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr,
					     struct list_head *head)
{
	struct netlbl_af6list *iter;

	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid &&
		    ipv6_masked_addr_cmp(&iter->addr, &iter->mask, addr) == 0)
			return iter;

	return NULL;
}

/**
 * netlbl_af6list_search_exact - Search for an exact IPv6 address entry
 * @addr: IPv6 address
 * @mask: IPv6 address mask
 * @head: the list head
 *
 * Description:
 * Searches the IPv6 address list given by @head.  If an exact match if found
 * it is returned, otherwise NULL is returned.  The caller is responsible for
 * calling the rcu_read_[un]lock() functions.
 *
 */
struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
						   const struct in6_addr *mask,
						   struct list_head *head)
{
	struct netlbl_af6list *iter;

	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid &&
		    ipv6_addr_equal(&iter->addr, addr) &&
		    ipv6_addr_equal(&iter->mask, mask))
			return iter;

	return NULL;
}
#endif /* IPv6 */

/**
 * netlbl_af4list_add - Add a new IPv4 address entry to a list
 * @entry: address entry
 * @head: the list head
 *
 * Description:
 * Add a new address entry to the list pointed to by @head.  On success zero is
 * returned, otherwise a negative value is returned.  The caller is responsible
 * for calling the necessary locking functions.
 *
 */
int netlbl_af4list_add(struct netlbl_af4list *entry, struct list_head *head)
{
	struct netlbl_af4list *iter;

	iter = netlbl_af4list_search(entry->addr, head);
	if (iter != NULL &&
	    iter->addr == entry->addr && iter->mask == entry->mask)
		return -EEXIST;

	/* in order to speed up address searches through the list (the common
	 * case) we need to keep the list in order based on the size of the
	 * address mask such that the entry with the widest mask (smallest
	 * numerical value) appears first in the list */
	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid &&
		    ntohl(entry->mask) > ntohl(iter->mask)) {
			__list_add_rcu(&entry->list,
				       iter->list.prev,
				       &iter->list);
			return 0;
		}
	list_add_tail_rcu(&entry->list, head);
	return 0;
}

#if IS_ENABLED(CONFIG_IPV6)
/**
 * netlbl_af6list_add - Add a new IPv6 address entry to a list
 * @entry: address entry
 * @head: the list head
 *
 * Description:
 * Add a new address entry to the list pointed to by @head.  On success zero is
 * returned, otherwise a negative value is returned.  The caller is responsible
 * for calling the necessary locking functions.
 *
 */
int netlbl_af6list_add(struct netlbl_af6list *entry, struct list_head *head)
{
	struct netlbl_af6list *iter;

	iter = netlbl_af6list_search(&entry->addr, head);
	if (iter != NULL &&
	    ipv6_addr_equal(&iter->addr, &entry->addr) &&
	    ipv6_addr_equal(&iter->mask, &entry->mask))
		return -EEXIST;

	/* in order to speed up address searches through the list (the common
	 * case) we need to keep the list in order based on the size of the
	 * address mask such that the entry with the widest mask (smallest
	 * numerical value) appears first in the list */
	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid &&
		    ipv6_addr_cmp(&entry->mask, &iter->mask) > 0) {
			__list_add_rcu(&entry->list,
				       iter->list.prev,
				       &iter->list);
			return 0;
		}
	list_add_tail_rcu(&entry->list, head);
	return 0;
}
#endif /* IPv6 */

/**
 * netlbl_af4list_remove_entry - Remove an IPv4 address entry
 * @entry: address entry
 *
 * Description:
 * Remove the specified IP address entry.  The caller is responsible for
 * calling the necessary locking functions.
 *
 */
void netlbl_af4list_remove_entry(struct netlbl_af4list *entry)
{
	entry->valid = 0;
	list_del_rcu(&entry->list);
}

/**
 * netlbl_af4list_remove - Remove an IPv4 address entry
 * @addr: IP address
 * @mask: IP address mask
 * @head: the list head
 *
 * Description:
 * Remove an IP address entry from the list pointed to by @head.  Returns the
 * entry on success, NULL on failure.  The caller is responsible for calling
 * the necessary locking functions.
 *
 */
struct netlbl_af4list *netlbl_af4list_remove(__be32 addr, __be32 mask,
					     struct list_head *head)
{
	struct netlbl_af4list *entry;

	entry = netlbl_af4list_search_exact(addr, mask, head);
	if (entry == NULL)
		return NULL;
	netlbl_af4list_remove_entry(entry);
	return entry;
}

#if IS_ENABLED(CONFIG_IPV6)
/**
 * netlbl_af6list_remove_entry - Remove an IPv6 address entry
 * @entry: address entry
 *
 * Description:
 * Remove the specified IP address entry.  The caller is responsible for
 * calling the necessary locking functions.
 *
 */
void netlbl_af6list_remove_entry(struct netlbl_af6list *entry)
{
	entry->valid = 0;
	list_del_rcu(&entry->list);
}

/**
 * netlbl_af6list_remove - Remove an IPv6 address entry
 * @addr: IP address
 * @mask: IP address mask
 * @head: the list head
 *
 * Description:
 * Remove an IP address entry from the list pointed to by @head.  Returns the
 * entry on success, NULL on failure.  The caller is responsible for calling
 * the necessary locking functions.
 *
 */
struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr,
					     const struct in6_addr *mask,
					     struct list_head *head)
{
	struct netlbl_af6list *entry;

	entry = netlbl_af6list_search_exact(addr, mask, head);
	if (entry == NULL)
		return NULL;
	netlbl_af6list_remove_entry(entry);
	return entry;
}
#endif /* IPv6 */

/*
 * Audit Helper Functions
 */

#ifdef CONFIG_AUDIT
/**
 * netlbl_af4list_audit_addr - Audit an IPv4 address
 * @audit_buf: audit buffer
 * @src: true if source address, false if destination
 * @dev: network interface
 * @addr: IP address
 * @mask: IP address mask
 *
 * Description:
 * Write the IPv4 address and address mask, if necessary, to @audit_buf.
 *
 */
void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
					int src, const char *dev,
					__be32 addr, __be32 mask)
{
	u32 mask_val = ntohl(mask);
	char *dir = (src ? "src" : "dst");

	if (dev != NULL)
		audit_log_format(audit_buf, " netif=%s", dev);
	audit_log_format(audit_buf, " %s=%pI4", dir, &addr);
	if (mask_val != 0xffffffff) {
		u32 mask_len = 0;
		while (mask_val > 0) {
			mask_val <<= 1;
			mask_len++;
		}
		audit_log_format(audit_buf, " %s_prefixlen=%d", dir, mask_len);
	}
}

#if IS_ENABLED(CONFIG_IPV6)
/**
 * netlbl_af6list_audit_addr - Audit an IPv6 address
 * @audit_buf: audit buffer
 * @src: true if source address, false if destination
 * @dev: network interface
 * @addr: IP address
 * @mask: IP address mask
 *
 * Description:
 * Write the IPv6 address and address mask, if necessary, to @audit_buf.
 *
 */
void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
				 int src,
				 const char *dev,
				 const struct in6_addr *addr,
				 const struct in6_addr *mask)
{
	char *dir = (src ? "src" : "dst");

	if (dev != NULL)
		audit_log_format(audit_buf, " netif=%s", dev);
	audit_log_format(audit_buf, " %s=%pI6", dir, addr);
	if (ntohl(mask->s6_addr32[3]) != 0xffffffff) {
		u32 mask_len = 0;
		u32 mask_val;
		int iter = -1;
		while (ntohl(mask->s6_addr32[++iter]) == 0xffffffff)
			mask_len += 32;
		mask_val = ntohl(mask->s6_addr32[iter]);
		while (mask_val > 0) {
			mask_val <<= 1;
			mask_len++;
		}
		audit_log_format(audit_buf, " %s_prefixlen=%d", dir, mask_len);
	}
}
#endif /* IPv6 */
#endif /* CONFIG_AUDIT */


text:
/**
 * Created by AlexLiu on 2015/6/2.
 */

var React = require('react');
var Reflux = require('reflux');

var tableStore = require('../../stores/table-store');
var actions = require('../../actions/app-actions');

var ItemDetail = React.createClass({
    //mixins: [Reflux.ListenerMixin],

    getInitialState(){
        return {
            item:{}
        }
    },

    componentDidMount: function(){

        //this.listenTo(actions.loadPage, this.loadPage);
        //actions.loadPage();
       // alert('componentDidMount detail');
    },

    loadPage(){
        var item = tableStore.getItemById(this.props.params.itemId);
        this.setState({
            item:item
        });
    },
    render(){
        debugger;
        var item = tableStore.getItemById(this.props.params.itemId);
        return (

{item.id}

{item.name}

{item.stock}

        );
    }
});

module.exports = ItemDetail;


text:
package org.aksw.kbox.kibe;

public class KBFile {
	public final static String FORMAT = "kibe";
	public final static String VERSION = "0";
}


text:
class Post < ApplicationRecord
  belongs_to :user

  validates_presence_of :user_id
  validates_presence_of :restaurant_id

  mount_uploader :picture, PictureUploader

  extend FriendlyId
  friendly_id :title, use: :slugged

  # Transform this object into an hash compatible to JSON-LD format
  #
  # @return [Hash]
  def to_jsonld
  end
end


text:
from functools import wraps
from math import ceil
from time import time

from flask import render_template, session, redirect, url_for, flash, escape, abort, send_file, request, jsonify, send_from_directory
from werkzeug import check_password_hash

from .application import app
from .models import User, Photo
from . import forms
from . import photo_storage
from .upload import UploadSession, rotate_photo

def logged_in(f):
    @wraps(f)
    def wrapped(*args, **kwargs):
        if 'userid' not in session:
            flash('Du bist nicht angemeldet!')
            return redirect(url_for('login'))
        return f(*args, **kwargs)
    return wrapped

@app.route('/')
@logged_in
def index():
    return redirect(url_for('timeline'))

def safe_index(l, i, default=None):
    try:
        return l[i]
    except IndexError:
        return default

def last_item(iterable, default=None):
    for default in iterable:
        pass
    return default

def is_uploader(uid=None):
    if uid is None:
        uid = session['userid']
    try:
        return User.get(User.id == uid).uploader
    except User.DoesNotExist:
        return False

@app.route('/timeline')
@app.route('/timeline/<int:phid>')
@app.route('/timeline/<int:phid>/<order>')
@logged_in
def timeline(phid=-1, order='taken'):
    if order not in ('taken', 'added'):
        abort(500)

    if phid >= 0:
        try:
            Photo.get(Photo.id == phid)
        except Photo.DoesNotExist:
            abort(404)

    first = None
    last = None
    new1 = None
    new2 = None
    this = None
    old1 = None
    old2 = None

    if order == 'taken':
        q = Photo.select().order_by(Photo.date.desc())
    else:
        q = Photo.select().order_by(Photo.added.desc())

    if phid < 0:
        this = safe_index(q, 0)
        old1 = safe_index(q, 1)
        old2 = safe_index(q, 2)
        if old2 != None:
            last = last_item(q)
            if last == old2:
                last = None
    else:
        # save the iterator to a variable to make sure we do not loop more
        # than we need to
        enum = enumerate(q)
        for i, p in enum:
            if first is None:
                first = p
            new2 = new1
            new1 = this
            this = p
            if p.id == phid:
                old1 = safe_index(q, i+1)
                old2 = safe_index(q, i+2)
                break
        last = last_item(enum, (None, None))[1]
        if first == new1:
            first = None

    return render_template('timeline.html',
                           new1=new1, new2=new2,
                           this=this,
                           old1=old1, old2=old2,
                           first=first, last=last,
                           order=order,
                           photoid=this.id,
                           uploader=is_uploader())

@app.route('/gallery')
@app.route('/gallery/<order>')
@logged_in
def gallery(order='taken'):
    if order == 'taken':
        photos = Photo.select().order_by(Photo.date.desc())
    else:
        photos = Photo.select().order_by(Photo.added.desc())

    return render_template('gallery.html', photos=photos, uploader=is_uploader(), order=order)

@app.route('/login', methods=('GET', 'POST'))
def login():
    form = forms.LoginForm()
    if form.validate_on_submit():
        username = form.username.data
        password = form.password.data

        try:
            user = User.get(User.name == username)
        except User.DoesNotExist:
            flash('Unknown username or bad password')
            return render_template('login.html', form=form)

        if check_password_hash(user.password, password):
            session['userid'] = user.id
            return redirect(url_for('timeline'))
        else:
            flash('Unknown username or bad password YY')
            return render_template('login.html', form=form)

    return render_template('login.html', form=form)

@app.route('/logout')
def logout():
    session.pop('userid', None)
    flash('You were logged out')
    return redirect(url_for('login'))

@app.route('/photo/<int:phid>')
@app.route('/photo/<int:phid>/<size>')
@logged_in
def photo(phid, size='normal'):
    try:
        photo = Photo.get(Photo.id == phid)
    except Photo.DoesNotExist:
        abort(404)

    try:
        path = photo_storage.path(photo.chksum, size.lower() == 'small')
    except Exception as e:
        print(e)
        raise e
    return send_file(path, mimetype=photo.mimetype)

@app.route('/edit/<int:phid>', methods=('GET', 'POST'))
@logged_in
def edit(phid):
    try:
        u = User.get(User.id == session['userid'])
    except User.DoesNotExist:
        abort(500)

    if not u.uploader:
        abort(403)

    try:
        p = Photo.get(Photo.id == phid)
    except Photo.DoesNotExist:
        abort(500)

    form = forms.EditForm(recorded=p.date, comment=p.comment)
    if form.validate_on_submit():
        p.date = form.recorded.data
        p.comment = form.comment.data
        p.save()
        return redirect(url_for('timeline', phid=phid))

    return render_template('edit.html', photoid=p.id, form=form, p=p)

@app.route('/list')
@app.route('/list/<int:page>')
@logged_in
def list(page=1):
    page_size = 10

    photos = Photo.select().order_by(Photo.date.asc())
    page_max = ceil(photos.count() / page_size)

    if page < page_max - 1:
        first_page = page_max
    else:
        first_page = None

    return render_template('list.html',
                           page=page,
                           photos=photos.paginate(page, page_size),
                           newer=(page < page_max),
                           first_page=first_page,
                           uploader=is_uploader())

@app.route('/upload', methods=('GET', 'POST'))
@logged_in
def upload():
    if not is_uploader():
        abort(403)

    if request.method == 'GET':
        return render_template('upload.html')

    # POST request
    print('POSTing to upload')
    try:
        session_id = session['upload_session']
        us = UploadSession(session_id, 'load')
    except KeyError as e:
        print('no upload session:', e)
        abort(500)
    print('POSTing to upload: {0}'.format(session_id))

    for chksum, comment in request.form.items():
        if chksum not in us.images:
            print('chksum \'{0}\' missing in session'.format(chksum))
            abort(501)
        us.images[chksum]['comment'] = comment
        print('  ', us.images[chksum])
    us.dbimport(Photo)
    us.clear()

    return redirect(url_for('list'))

@app.route('/_upload_images', methods=('GET', 'POST'))
@logged_in
def upload_images():
    session_id = '{0}::{1}'.format(session['userid'], time())
    session['upload_session'] = session_id
    us = UploadSession(session_id, 'create')
    for f in request.files.getlist('files[]'):
        us.get_remote_file(f, f.filename)
    us.finish_uploads()
    images = [{'chksum': chksum,
               'date': im['date'].strftime('%d.%m.%Y %H:%M:%S')}
               for chksum, im in us.images.items()]
    ret = {'session': session_id, 'images': images}
    print('XX', ret)
    return jsonify(**ret)

@app.route('/preview/<chksum>')
@logged_in
def preview(chksum):
    print('preview', chksum)
    try:
        session_id = session['upload_session']
    except KeyError:
        abort(403)
    print('preview', session_id)

    us = UploadSession(session_id)
    return send_from_directory(us.thumbdir, chksum, mimetype='image/jpeg')

@app.route('/_rotate/<int:phid>/<direction>')
@logged_in
def rotate(phid, direction):
    if not is_uploader():
        abort(403)

    try:
        chksum = Photo.get(Photo.id == phid).chksum
    except Photo.DoesNotExist:
        abort(404)

    print('+++ rotating', phid, 'to the', direction, chksum)

    rotate_photo(chksum, direction)

    url = url_for('photo', phid=phid, size='small', _anchor='')

    return jsonify(status='success', url=url)


text:
import R from 'ramda';
import * as Action from "./action.js"

export const view = R.compose(R.fromPairs, R.map(x => [x,x])) ([
  'license',
  'loadingIndex',
  'loadingWork',
  'loadingType',
  'workList',
  'typeList',
  'valueList',
  'instanceList',
  'work',
  'word',
]);

export const initial = {
  visual: {
    view: view.loadingIndex,
  },
  data: {
    works: new Map(),
    types: new Map(),
  },
};

export function hasWork(state, workIndex) { return state.data.works.has(workIndex); }
export function hasValues(state, typeIndex) { return state.data.types.has(typeIndex); }

function updateMap(map, key, value) {
  const newMap = new Map(map);
  newMap.set(key, value);
  return newMap;
}

export function applyAction(state = {}, action) {
  const data = getData(state.data, action);
  const visual = getVisual(state.visual, action);
  const ephemeral = getEphemeral(action);

  return { data, visual, ephemeral };
}

export const getVisual = (state, action) => {
  switch (action.type) {
    case Action.types.viewLicense: return { view: view.license };
    case Action.types.requestIndex: return { view: view.loadingIndex };
    case Action.types.receiveIndex: return { view: view.workList };
    case Action.types.viewWorkList: return { view: view.workList };
    case Action.types.viewTypeList: return { view: view.typeList };
    case Action.types.requestWork: return { view: view.loadingWork, workIndex: action.workIndex };
    case Action.types.receiveWork: return { view: view.loadingWork, workIndex: action.workIndex };
    case Action.types.viewWork: return { view: view.work, workIndex: action.workIndex };
    case Action.types.viewWord: return { view: view.word, workIndex: action.workIndex, wordIndex: action.wordIndex };
    case Action.types.viewValueList: return { view: view.valueList, typeIndex: action.typeIndex };
    case Action.types.requestType: return { view: view.loadingType, typeIndex: action.typeIndex };
    case Action.types.receiveType: return { view: view.loadingType, typeIndex: action.typeIndex };
    case Action.types.viewInstanceList: return { view: view.instanceList, typeIndex: action.typeIndex, valueIndex: action.valueIndex };
    case Action.types.showAllLoading: return state;
    case Action.types.showAllItems: return state;
    case '@@redux/INIT': return {};
    default: console.log('Unknown action', action); return {};
  }
};

const getEphemeral = action => {
  switch (action.type) {
    case Action.types.showAllLoading: return { showAllLoading: true };
    case Action.types.showAllItems: return { showAllItems: true };
    default: return {};
  }
}

const getData = (data, action) => {
  switch (action.type) {
    case Action.types.requestIndex: return { ...data, index: { loading: true } };
    case Action.types.receiveIndex: return { ...data, index: action.index };
    case Action.types.requestWork: return { ...data, works: updateMap(data.works, action.workIndex, { loading: true }) };
    case Action.types.receiveWork: return { ...data, works: updateMap(data.works, action.workIndex, action.work) };
    case Action.types.requestType: return { ...data, types: updateMap(data.types, action.typeIndex, { loading: true }) };
    case Action.types.receiveType: return { ...data, types: updateMap(data.types, action.typeIndex, action.typeData) };
    default: return data;
  }
};

export const getActionForVisual = visual => {
  if (visual.view === view.license)
    return Action.viewLicense();
  if (visual.view === view.workList)
    return Action.fetchViewWorkList();
  if (visual.view === view.typeList)
    return Action.fetchViewTypeList();
  if (visual.view === view.work && !R.isNil(visual.workIndex))
    return Action.fetchViewWork(visual.workIndex);
  if (visual.view === view.word && !R.isNil(visual.workIndex) && !R.isNil(visual.wordIndex))
    return Action.fetchViewWord(visual.workIndex, visual.wordIndex);
  if (visual.view === view.valueList && !R.isNil(visual.typeIndex))
    return Action.fetchViewValueList(visual.typeIndex);
  if (visual.view === view.instanceList && !R.isNil(visual.typeIndex) && !R.isNil(visual.valueIndex))
    return Action.fetchViewInstanceList(visual.typeIndex, visual.valueIndex);
  else
    return undefined;
}


text:
/**
* CLASS: FrameVisualizer
Arash.info & DATE: 29/03/16
* AUTHOR: Kyle Morris
* DESCRIPTION: A frame is some GUI/box with contents in it displayable to user. Not something like a console/etc
*/
#ifndef MORRIS_AIMA_FRAMEVISUALIZER_H
#define MORRIS_AIMA_FRAMEVISUALIZER_H
#include <string>
#include "Visualizer.h"
#include <QApplication>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QtCore/qtimer.h>

class FrameVisualizer : public Visualizer{
protected:
    /**
     * Frame properties and default values.
     */
    int frameWidth = 700;
    int frameHeight = 700;

    QString frameName = "Frame Visualizer";

private:
    /**
     * The embodiement of the environment display, what is contained within it to be rendered.
     */
    QGraphicsScene *scene;

    /**
     * QT object for the view, that actually displays the scene.
     */
    QGraphicsView *view;

public:
    //default constructor
    FrameVisualizer();
    FrameVisualizer(int width, int height, std::string);

    /**
     * Main constructor, which will be delegated to by the default constructor/etc.
     * The actual parameters are set here. Other constructors allow for a user to not
     * specify certain parameters, and instead have them defaulted here.
     */
    virtual void Construct(int width, int height, std::string name);

    virtual ~FrameVisualizer();

    virtual void update(std::string state);

    /**
     * Update the view with changes made.
     */
    void render();

    /**
     * Update the displayed gui title if the frame name has been changed. This isn't to be confused with the frameName
     * which can be changed at any point. The gui must still be updated.
     */
    void updateFrameTitle();
/*========================================
         GETTERS AND SETTERS
 =========================================*/
    QGraphicsScene *getScene() const;

    void setScene(QGraphicsScene *scene);

    std::string getFrameName() const;

    void setFrameName(const std::string &newName);

    int getFrameHeight() const;

    void setFrameHeight(int frameHeight);

    int getFrameWidth() const;

    void setFrameWidth(int frameWidth);

    QGraphicsView *getView();
};
#endif //MORRIS_AIMA_FRAMEVISUALIZER_H


text:
.holder {
	border: 1px dotted navy;
	height: 400px;
	width: 320px;
	background-color: #EEF;
	font: 12px Verdana;
	position: relative;
	overflow-y: auto;
}

.scroller {
	position: absolute;
	bottom: 0px;
	width: 100%;
	overflow-y: auto;
	max-height: 400px;
}

.wrap {
	position: relative;
	width: 100%;
	padding-bottom: 8px;
}

.message {
	text-align: left;
	padding: 0 10px;
}

.message > div {
	display: block;
	background-color: #FFE;
	padding: 6px;
	margin: 4px 0px;
	border-radius: 10px;
}

.message .time {
	font-size: 8px;
	color: silver;
	margin-bottom: 0;
}

.message .index:after {
	content: ': ';
}

.message.mine > div, .message.their > div {
	display: inline-block;
}

.message.mine > div {
	border-bottom-left-radius: 0;
	position: relative;
}

.message.mine > div:before{
	content: "";
	width: 0;
	height: 0;
	border-bottom: 12px solid #FFE;
	border-left: 8px solid transparent;
	bottom: 0;
	left: -8px;
	position: absolute;
}

.message.their {
	text-align: right;
}

.message.their > div {
	background-color: #CCF;
	border-bottom-right-radius: 0;
	right: 0;
	position: relative;
}

.message.their > div:after{
	content: "";
	width: 0;
	height: 0;
	border-bottom: 12px solid #CCF;
	border-right: 8px solid transparent;
	bottom: 0;
	right: -8px;
	position: absolute;
}

.message.their .time {
	color: #8992D6;
}


text:
import React, { useContext } from 'react'
import PropTypes from 'prop-types'
import { ControlLabel } from 'react-bootstrap'
import { observer } from 'mobx-react-lite'
import styled from 'styled-components'
import { toJS } from 'mobx'

import Input from './Input'
import SelectInput from './SelectInput'
import storeContext from '../../storeContext'

const Container = styled.div`
  grid-area: areaNummern;
  background-color: white;
  box-shadow: inset 1em 1em 2em rgb(239, 239, 239),
    inset -1em -1em 2em rgb(239, 239, 239);
  outline: 1px solid #efefef;
  display: grid;
  /* can't use 1fr for first column - does not work correctly, no idea why */
  grid-template-columns: calc(100% - 183px) 8px 175px;
  grid-template-rows: auto;
  grid-template-areas:
    'areaNummernTitle areaNummernTitle labelNr'
    'labelIdGeschaeft . fieldIdGeschaeft'
    'labelGekoNr . fieldGekoNr'
    'labelEntscheidAwel . fieldEntscheidAwel'
    'labelEntscheidBdv . fieldEntscheidBdv'
    'labelEntscheidRrb . fieldEntscheidRrb'
    'labelEntscheidBvv . fieldEntscheidBvv'
    'labelEntscheidKr . fieldEntscheidKr'
    'fieldAktenstandort . fieldAktennummer';
  grid-row-gap: 2px;
  padding: 8px;
`
const Title = styled.div`
  font-weight: 900;
  font-size: 16px;
  grid-area: areaNummernTitle;
`
const LabelNrDiv = styled.div`
  position: absolute;
  bottom: 1px;
`
const LabelIdGeschaeft = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelIdGeschaeft;
`
const FieldIdGeschaeft = styled.div`
  grid-area: fieldIdGeschaeft;
`
const LabelGekoNr = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelGekoNr;
`
const FieldGekoNr = styled.div`
  grid-area: fieldGekoNr;
`
const LabelJahre = styled.div`
  color: #757575;
  font-size: 11px;
  font-weight: 500;
  grid-area: labelJahre;
  position: relative;
  min-height: 16px;
`
const LabelEntscheidAwel = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelEntscheidAwel;
`
const FieldEntscheidAwel = styled.div`
  grid-area: fieldEntscheidAwel;
`
const LabelEntscheidBdv = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelEntscheidBdv;
`
const FieldEntscheidBdv = styled.div`
  grid-area: fieldEntscheidBdv;
`
const LabelEntscheidRrb = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelEntscheidRrb;
`
const FieldEntscheidRrb = styled.div`
  grid-area: fieldEntscheidRrb;
`
const LabelEntscheidBvv = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelEntscheidBvv;
`
const FieldEntscheidBvv = styled.div`
  grid-area: fieldEntscheidBvv;
`
const LabelEntscheidKr = styled(ControlLabel)`
  margin-top: 11px;
  text-align: right;
  grid-area: labelEntscheidKr;
`
const FieldEntscheidKr = styled.div`
  grid-area: fieldEntscheidKr;
`
const FieldAktenstandort = styled.div`
  grid-area: fieldAktenstandort;
`
const FieldAktennummer = styled.div`
  grid-area: fieldAktennummer;
`

const AreaNummern = ({ values, firstTabIndex, change, changeComparator }) => {
  const store = useContext(storeContext)

  return (
    <Container>
      <Title>Nummern</Title>
      <LabelIdGeschaeft>ID</LabelIdGeschaeft>
      <FieldIdGeschaeft>
        <Input
          type="number"
          name="idGeschaeft"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={1 + firstTabIndex}
        />
      </FieldIdGeschaeft>
      <LabelGekoNr>Geko</LabelGekoNr>
      <FieldGekoNr>
        <Input
          type="text"
          name="gekoNr"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={2 + firstTabIndex}
        />
      </FieldGekoNr>
      <LabelJahre>
        <LabelNrDiv>Jahr</LabelNrDiv>
      </LabelJahre>
      <LabelEntscheidAwel>AWEL</LabelEntscheidAwel>
      <FieldEntscheidAwel>
        <Input
          name="entscheidAwel"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={3 + firstTabIndex}
        />
      </FieldEntscheidAwel>
      <LabelEntscheidBdv>BDV</LabelEntscheidBdv>
      <FieldEntscheidBdv>
        <Input
          name="entscheidBdv"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={5 + firstTabIndex}
        />
      </FieldEntscheidBdv>
      <LabelEntscheidRrb>RRB</LabelEntscheidRrb>
      <FieldEntscheidRrb>
        <Input
          name="entscheidRrb"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={7 + firstTabIndex}
        />
      </FieldEntscheidRrb>
      <LabelEntscheidBvv>BVV</LabelEntscheidBvv>
      <FieldEntscheidBvv>
        <Input
          name="entscheidBvv"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={9 + firstTabIndex}
        />
      </FieldEntscheidBvv>
      <LabelEntscheidKr>KR</LabelEntscheidKr>
      <FieldEntscheidKr>
        <Input
          name="entscheidKr"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={11 + firstTabIndex}
        />
      </FieldEntscheidKr>
      <FieldAktenstandort>
        <ControlLabel>Aktenstandort</ControlLabel>
        <SelectInput
          name="aktenstandort"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={13 + firstTabIndex}
          options={toJS(store.geschaefte.aktenstandortOptions)}
        />
      </FieldAktenstandort>
      <FieldAktennummer>
        <ControlLabel>Nr.</ControlLabel>
        <Input
          type="text"
          name="aktennummer"
          change={change}
          values={values}
          changeComparator={changeComparator}
          tabIndex={14 + firstTabIndex}
        />
      </FieldAktennummer>
    </Container>
  )
}

AreaNummern.displayName = 'AreaNummern'

AreaNummern.propTypes = {
  values: PropTypes.object,
  change: PropTypes.func.isRequired,
  firstTabIndex: PropTypes.number.isRequired,
  changeComparator: PropTypes.func.isRequired,
}

export default observer(AreaNummern)


text:
#ifndef SOFT_MPEG2_H_

#define SOFT_MPEG2_H_

#include <media/stagefright/omx/SoftVideoDecoderOMXComponent.h>
#include <sys/time.h>

namespace android {

#define ivd_aligned_malloc(alignment, size) memalign(alignment, size)
#define ivd_aligned_free(buf) free(buf)

/** Number of entries in the time-stamp array */
#define MAX_TIME_STAMPS 64

/** Maximum number of cores supported by the codec */
#define CODEC_MAX_NUM_CORES 4

#define CODEC_MAX_WIDTH     1920

#define CODEC_MAX_HEIGHT    1088

/** Input buffer size */
#define INPUT_BUF_SIZE (1024 * 1024)

#define MIN(a, b) ((a) < (b)) ? (a) : (b)

/** Used to remove warnings about unused parameters */
#define UNUSED(x) ((void)(x))

/** Get time */
#define GETTIME(a, b) gettimeofday(a, b);

/** Compute difference between start and end */
#define TIME_DIFF(start, end, diff) \
    diff = (((end).tv_sec - (start).tv_sec) * 1000000) + \
            ((end).tv_usec - (start).tv_usec);

struct SoftMPEG2 : public SoftVideoDecoderOMXComponent {
    SoftMPEG2(
            const char *name, const OMX_CALLBACKTYPE *callbacks,
            OMX_PTR appData, OMX_COMPONENTTYPE **component);

protected:
    virtual ~SoftMPEG2();

    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
    virtual void onReset();
    virtual int getColorAspectPreference();
    virtual OMX_ERRORTYPE internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR params);
private:
    // Number of input and output buffers
    enum {
        kNumBuffers = 8
    };

    iv_obj_t *mCodecCtx;         // Codec context
    iv_mem_rec_t *mMemRecords;   // Memory records requested by the codec
    size_t mNumMemRecords;       // Number of memory records requested by the codec

    size_t mNumCores;            // Number of cores to be uesd by the codec

    struct timeval mTimeStart;   // Time at the start of decode()
    struct timeval mTimeEnd;     // Time at the end of decode()

    // Internal buffer to be used to flush out the buffers from decoder
    uint8_t *mFlushOutBuffer;

    // Status of entries in the timestamp array
    bool mTimeStampsValid[MAX_TIME_STAMPS];

    // Timestamp array - Since codec does not take 64 bit timestamps,
    // they are maintained in the plugin
    OMX_S64 mTimeStamps[MAX_TIME_STAMPS];

#ifdef FILE_DUMP_ENABLE
    char mInFile[200];
#endif /* FILE_DUMP_ENABLE */

    OMX_COLOR_FORMATTYPE mOmxColorFormat;    // OMX Color format
    IV_COLOR_FORMAT_T mIvColorFormat;        // Ittiam Color format

    bool mIsInFlush;        // codec is flush mode
    bool mReceivedEOS;      // EOS is receieved on input port
    bool mInitNeeded;
    uint32_t mNewWidth;
    uint32_t mNewHeight;
    // The input stream has changed to a different resolution, which is still supported by the
    // codec. So the codec is switching to decode the new resolution.
    bool mChangingResolution;
    bool mFlushNeeded;
    bool mSignalledError;
    bool mWaitForI;
    size_t mStride;

    status_t initDecoder();
    status_t deInitDecoder();
    status_t setFlushMode();
    status_t setParams(size_t stride);
    void logVersion();
    status_t setNumCores();
    status_t resetDecoder();
    status_t resetPlugin();
    status_t reInitDecoder();

    bool setDecodeArgs(
            ivd_video_decode_ip_t *ps_dec_ip,
            ivd_video_decode_op_t *ps_dec_op,
            OMX_BUFFERHEADERTYPE *inHeader,
            OMX_BUFFERHEADERTYPE *outHeader,
            size_t timeStampIx);

    bool getSeqInfo();

    DISALLOW_EVIL_CONSTRUCTORS(SoftMPEG2);
};

#ifdef FILE_DUMP_ENABLE

#define INPUT_DUMP_PATH     "/sdcard/media/mpeg2d_input"
#define INPUT_DUMP_EXT      "m2v"

#define GENERATE_FILE_NAMES() {                         \
    GETTIME(&mTimeStart, NULL);                         \
    strcpy(mInFile, "");                                \
    sprintf(mInFile, "%s_%ld.%ld.%s", INPUT_DUMP_PATH,  \
            mTimeStart.tv_sec, mTimeStart.tv_usec,      \
            INPUT_DUMP_EXT);                            \
}

#define CREATE_DUMP_FILE(m_filename) {                  \
    FILE *fp = fopen(m_filename, "wb");                 \
    if (fp != NULL) {                                   \
        fclose(fp);                                     \
    } else {                                            \
        ALOGD("Could not open file %s", m_filename);    \
    }                                                   \
}
#define DUMP_TO_FILE(m_filename, m_buf, m_size)         \
{                                                       \
    FILE *fp = fopen(m_filename, "ab");                 \
    if (fp != NULL && m_buf != NULL) {                  \
        int i;                                          \
        i = fwrite(m_buf, 1, m_size, fp);               \
        ALOGD("fwrite ret %d to write %d", i, m_size);  \
        if (i != (int)m_size) {                         \
            ALOGD("Error in fwrite, returned %d", i);   \
            perror("Error in write to file");           \
        }                                               \
        fclose(fp);                                     \
    } else {                                            \
        ALOGD("Could not write to file %s", m_filename);\
    }                                                   \
}
#else /* FILE_DUMP_ENABLE */
#define INPUT_DUMP_PATH
#define INPUT_DUMP_EXT
#define OUTPUT_DUMP_PATH
#define OUTPUT_DUMP_EXT
#define GENERATE_FILE_NAMES()
#define CREATE_DUMP_FILE(m_filename)
#define DUMP_TO_FILE(m_filename, m_buf, m_size)
#endif /* FILE_DUMP_ENABLE */

} // namespace android

#endif  // SOFT_MPEG2_H_


text:
package org.apache.velocity.tools.view.context;

import java.util.Collections;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletContext;

import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;

/**
 *
Velocity context implementation specific to the Servlet environment.

 *
 *
It provides the following special features:

 *

 *
puts the request, response, session, and servlet context objects
 *       into the Velocity context for direct access, and keeps them
 *       read-only

 *
supports a read-only toolbox of view tools

 *
auto-searches servlet request attributes, session attributes and
 *       servlet context attribues for objects

 *

 *
 *
The {@link #internalGet(String key)} method implements the following search order
 * for objects:

 *

 *
toolbox

 *
servlet request, servlet response, servlet session, servlet context

 *
local hashtable of objects (traditional use)

 *
servlet request attribues, servlet session attribute, servlet context
 *     attributes

 *

 *
 *
The purpose of this class is to make it easy for web designer to work
 * with Java servlet based web applications. They do not need to be concerned
 * with the concepts of request, session or application attributes and the
 * lifetime of objects in these scopes.

 *
 *
Note that the put() method always puts objects into the local hashtable.
 *

 *
 * @author Geir Magnusson Jr.
 * @author Gabe Sidler
 *
 * @version $Id$
 */
public class ChainedContext extends VelocityContext implements ViewContext
{

    /* the current toolbox, request, response, and session */
    private Map toolbox;
    private HttpServletRequest request;
    private HttpServletResponse response;
    private HttpSession session;

    /* the servlet context */
    private ServletContext application;

    /* the velocity engine being used */
    private VelocityEngine velocity;

    public ChainedContext(VelocityEngine velocity,
                          HttpServletRequest request,
                          HttpServletResponse response,
                          ServletContext application)
    {
        this(null, velocity, request, response, application);
    }

    public ChainedContext(Context ctx,
                          VelocityEngine velocity,
                          HttpServletRequest request,
                          HttpServletResponse response,
                          ServletContext application)
    {
        super(null, ctx);

        this.velocity = velocity;
        this.request = request;
        this.response = response;
        this.session = request.getSession(false);
        this.application = application;
    }

    /**
     *
Sets the toolbox of view tools.

     *
     * @param box toolbox of view tools
     */
    public void setToolbox(Map box)
    {
        this.toolbox = box;
        /* just in case the servlet toolbox manager
         * had to create a new session to hold session tools
         * let's make sure this context's session ref is current */
        this.session = request.getSession(false);
    }

    /**
     *
Returns a read-only view of the toolbox {@link Map}
     * for this context.

     * @since VelocityTools 1.3
     * @return an unmodifiable version of the toolbox for this request
     *         or {@code null} if there is none
     */
    public Map getToolbox()
    {
        if (this.toolbox != null)
        {
            return Collections.unmodifiableMap(this.toolbox);
        }
        return null;
    }

    /**
     *
Looks up and returns the object with the specified key.

     *
See the class documentation for more details.

     *
     * @param key the key of the object requested
     * @return the requested object or null if not found
     */
    public Object internalGet( String key )
    {
        Object o = null;

        /* search the toolbox */
        if (toolbox != null)
        {
            o = toolbox.get(key);
            if (o != null)
            {
                return o;
            }
        }

        /* make the four scopes of the Apocalypse Read only */
        if (key.equals(REQUEST))
        {
            return request;
        }
        else if(key.equals(RESPONSE))
        {
            return response;
        }
        else if (key.equals(SESSION))
        {
            return session;
        }
        else if (key.equals(APPLICATION))
        {
            return application;
        }

        /* try the local hashtable */
        o = super.internalGet(key);
        if (o != null)
        {
            return o;
        }

        /* if not found, wander down the scopes... */
        return getAttribute(key);
    }

    /**
     *
Searches for the named attribute in request, session (if valid),
     * and application scope(s) in order and returns the value associated
     * or null.

     *
     * @since VelocityTools 1.1
     */
    public Object getAttribute(String key)
    {
        Object o = request.getAttribute(key);
        if (o == null)
        {
            if (session != null)
            {
                try
                {
                    o = session.getAttribute(key);
                }
                catch (IllegalStateException ise)
                {
                    // Handle invalidated session state
                    o = null;
                }
            }

            if (o == null)
            {
                o = application.getAttribute(key);
            }
        }
        return o;
    }

    /**
     *
Returns the current servlet request.

     */
    public HttpServletRequest getRequest()
    {
        return request;
    }

    /**
     *
Returns the current servlet response.

     */
    public HttpServletResponse getResponse()
    {
        return response;
    }

    /**
     *
Returns the servlet context.

     */
    public ServletContext getServletContext()
    {
        return application;
    }

    /**
     *
Returns a reference to the Velocity context (this object).

     */
    public Context getVelocityContext()
    {
        return this;
    }

    /**
     *
Returns a reference to the VelocityEngine.

     */
    public VelocityEngine getVelocityEngine()
    {
        return velocity;
    }

}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background" >

    <com.nozomi.autohidescrollview.view.AutoHideXScrollView
        android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/topic_bar"
        android:scrollbars="none" >

        <com.nozomi.view.BounceListView
            android:id="@+id/event_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@null"
            android:listSelector="@color/transparent" />
    </com.nozomi.autohidescrollview.view.AutoHideXScrollView>

    <RelativeLayout
        android:id="@+id/topic_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/topic_bar_height"
        android:background="@color/topic_bar" >

        <ImageButton
            android:id="@+id/back"
            android:layout_width="@dimen/button_medium"
            android:layout_height="@dimen/button_medium"
            android:layout_centerVertical="true"
            android:background="@drawable/back"
            android:contentDescription="@string/app_name" />

        <TextView
            android:id="@+id/topic"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="活动"
            android:textColor="@color/text_normal"
            android:textSize="@dimen/text_large" />
    </RelativeLayout>

    <TextView
        android:id="@+id/blank"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="您的周围没有活动~"
        android:textColor="@color/text_normal"
        android:textSize="@dimen/text_large"
        android:visibility="gone" />

    <com.nozomi.view.ProgressLayoutView
        android:id="@+id/progress_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</RelativeLayout>


text:
#ifndef NX_PHYSICS_NXJOINT
#define NX_PHYSICS_NXJOINT
/*----------------------------------------------------------------------------*\
|
|					Public Interface to NVIDIA PhysX Technology
|
|							     www.nvidia.com
|
\*----------------------------------------------------------------------------*/
/** \addtogroup physics
  @{
*/

#include "Nxp.h"

class NxActor;
class NxScene;
class NxRevoluteJoint;
class NxPointInPlaneJoint;
class NxPointOnLineJoint;
class NxPrismaticJoint;
class NxCylindricalJoint;
class NxSphericalJoint;
class NxFixedJoint;
class NxDistanceJoint;
class NxPulleyJoint;
class NxD6Joint;

/**
 \brief Abstract base class for the different types of joints.

 All joints are used to connect two dynamic actors, or an actor and the environment.

 A NULL actor represents the environment. Whenever the below comments mention two actors,
 one of them may always be the environment (NULL).

Visualizations:

\li #NX_VISUALIZE_JOINT_LOCAL_AXES
\li #NX_VISUALIZE_JOINT_WORLD_AXES
\li #NX_VISUALIZE_JOINT_LIMITS

Platform:
\li PC SW: Yes
\li GPU  : Yes [SW]
\li PS3  : Yes
\li XB360: Yes
\li WII	 : Yes

 @see NxJointDesc NxScene.createJoint()
 @see NxCylindricalJoint NxD6Joint NxDistanceJoint NxFixedJoint NxPointInPlaneJoint
NxPointOnLineJoint NxPrismaticJoint NxPulleyJoint NxRevoluteJointDesc NxSphericalJoint
*/
class NxJoint
	{
	protected:
	NX_INLINE					NxJoint() : userData(NULL), appData(NULL)
											{}
	virtual						~NxJoint()	{}

	public:

	/**
	\brief Retrieves the Actors involved.

	\param[out] actor1 First actor associated with joint.
	\param[out] actor2 Second actor associated with joint.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.actors NxActor
	*/
	virtual void getActors(NxActor** actor1, NxActor** actor2) = 0;

	/**
	\brief Sets the point where the two actors are attached, specified in global coordinates.

	Set this after setting the actors of the joint.

	Sleeping: This call wakes the actor(s) if they are sleeping.

	\param[in] vec Point the actors are attached at, specified in the global frame. Range: position vector

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.setGlobalAnchor() getGlobalAnchor()
	*/
	virtual void setGlobalAnchor(const NxVec3 &vec) = 0;

	/**
	\brief Sets the direction of the joint's primary axis, specified in global coordinates.

	The direction vector should be normalized to unit length.

	Sleeping: This call wakes the actor(s) if they are sleeping.

	\param[in] vec Direction of primary axis in the global frame. Range: direction vector

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.setGlobalAxis() getGlobalAxis()
	*/
	virtual void setGlobalAxis(const NxVec3 &vec) = 0;

	/**
	\brief Retrieves the joint anchor.

	\return The joints anchor point in the global frame.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setGlobalAnchor() getGlobalAxis()
	*/
	virtual	NxVec3	getGlobalAnchor()	const  = 0;

	/**
	\brief Retrieves the joint axis.

	\return The joints axis in the global frame.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setGlobalAxis() getGlobalAnchor()
	*/
	virtual	NxVec3	getGlobalAxis()		const = 0;

	/**
	\brief Returns the state of the joint.

	Joints are created in the NX_JS_UNBOUND state. Making certain changes to the simulation or the joint
	can also make joints become unbound.
	Unbound joints are automatically bound the next time Scene::run() is called, and this changes their
	state to NX_JS_SIMULATING. NX_JS_BROKEN means that a breakable joint has broken due to a large force
	or one of its actors has been deleted. In either case the joint was removed from the simulation,
	so it should be released by the user to free up its memory.

	\return The state of the joint. See #NxJointState.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointState setBreakable()
	*/
	virtual NxJointState getState() = 0;

	/**
	\brief Sets the maximum force magnitude that the joint is able to withstand without breaking.

	If the joint force rises above this threshold, the joint breaks, and becomes disabled. Additionally,
	the jointBreakNotify() method of the scene's user notify callback will be called.
	(You can set this with NxScene::setUserNotify()).

	There are two values, one for linear forces, and one for angular forces. Both values are used directly
	as a value for the maximum impulse tolerated by the joint constraints.

	Both force values are NX_MAX_REAL by default. This setting makes the joint unbreakable.
	The values should always be nonnegative.

	The distinction between maxForce and maxTorque is dependent on how the joint is implemented internally,
	which may not be obvious. For example what appears to be an angular degree of freedom may be constrained
	indirectly by a linear constraint.

    So in most practical applications the user should set both maxTorque and maxForce to low values.

	Sleeping: This call wakes the actor(s) if they are sleeping.

	\param[in] maxForce Maximum force the joint can withstand without breaking. Range: (0,inf]
	\param[in] maxTorque Maximum torque the joint can withstand without breaking. Range: (0,inf]

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.maxForce NxJointDesc.maxTorque getState() getBreakable()
	*/
	virtual void setBreakable(NxReal maxForce, NxReal maxTorque) = 0;

	/**
	\brief Retrieves the max forces of a breakable joint. See #setBreakable().

	\param[out] maxForce Retrieves the maximum force the joint can withstand without breaking.
	\param[out] maxTorque Retrieves the maximum torque the joint can withstand without breaking.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setBreakable NxJointDesc.maxForce NxJointDesc.maxTorque getState()
	*/
	virtual void getBreakable(NxReal & maxForce, NxReal & maxTorque) = 0;

	/**
	\brief Sets the solver extrapolation factor.

	\param[in] solverExtrapolationFactor The solver extrapolation factor.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.solverExtrapolationFactor
	*/

	virtual void setSolverExtrapolationFactor(NxReal solverExtrapolationFactor) = 0;

	/**
	\brief Retrieves the solver extrapolation factor.

	\return The solver extrapolation factor.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.solverExtrapolationFactor
	*/
	virtual NxReal getSolverExtrapolationFactor() const = 0;

	/**
	\brief Switch between acceleration and force based spring.

	\param[in] b {true: use acceleration spring, false: use force spring}.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.useAccelerationSpring
	*/
	virtual void setUseAccelerationSpring(bool b) = 0;

	/**
	\brief Checks whether acceleration spring is used.

	\return True if acceleration spring is used else false.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointDesc.useAccelerationSpring
	*/
	virtual bool getUseAccelerationSpring() const = 0;

/************************************************************************************************/

/** @name Limits
*/
//@{

	/**
	\brief Sets the limit point.

	The point is specified in the global coordinate frame.

	All types of joints may be limited with the same system:
	You may elect a point attached to one of the two actors to act as the limit point.
	You may also specify several planes attached to the other actor.

	The points and planes move together with the actor they are attached to.

	The simulation then makes certain that the pair of actors only move relative to each other
	so that the limit point stays on the positive side of all limit planes.

	the default limit point is (0,0,0) in the local frame of actor2.
	Calling this deletes all existing limit planes.

	Sleeping: This call wakes the actor(s) if they are sleeping.

	\param[in] point The limit reference point defined in the global frame. Range: position vector
	\param[in] pointIsOnActor2 if true the point is attached to the second actor. Otherwise it is attached to the first.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see getLimitPoint() addLimitPlane()
	*/

	virtual void setLimitPoint(const NxVec3 & point, bool pointIsOnActor2 = true) = 0;

	/**
	\brief Retrieves the global space limit point.

	Returns true if the point is fixed on actor2.

	\param[out] worldLimitPoint Used to store the global frame limit point.
	\return True if the point is fixed to actor 2 otherwise the point is fixed to actor 1.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setLimitPoint() addLimitPlane()
	*/
	virtual bool getLimitPoint(NxVec3 & worldLimitPoint) = 0;

	/**
	\brief Adds a limit plane.

	Both of the parameters are given in global coordinates. see setLimitPoint() for the meaning of limit planes.

	The plane is affixed to the	actor that does not have the limit point.

	The normal of the plane points toward the positive side of the plane, and thus toward the
	limit point. If the normal points away from the limit point at the time of this call, the
	method returns false and the limit plane is ignored.

	\note This function always returns true and adds the limit plane unlike earlier versions. This behavior
	was changed to allow the joint to be serialized easily.

	Sleeping: This call wakes the actor(s) if they are sleeping.

	\param[in] normal Normal for the limit plane in global coordinates. Range: direction vector
	\param[in] pointInPlane Point in the limit plane in global coordinates. Range: position vector
	\param[in] restitution Restitution of the limit plane.
	Range: [0.0, 1.0]
	Default: 0.0
	\return Always true.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setLimitPoint() purgeLimitPlanes() getNextLimitPlane()
	*/
	virtual bool addLimitPlane(const NxVec3 & normal, const NxVec3 & pointInPlane, NxReal restitution = 0.0f) = 0;

	/**
	\brief deletes all limit planes added to the joint.

	Invalidates limit plane iterator.

	Sleeping: Does NOT wake the associated actor up automatically.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see addLimitPlane() getNextLimitPlane()
	*/
	virtual void purgeLimitPlanes() = 0;

	/**
	\brief Restarts the limit plane iteration.

	Call before starting to iterate. This method may be used together with
	the below two methods to enumerate the limit planes.
	This iterator becomes invalid when planes
	are added or removed, or the plane iterator mechanism is
	invoked on another joint.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see hasMoreLimitPlanes() getNextLimitPlane()
	*/
	virtual void resetLimitPlaneIterator() = 0;

	/**
	\brief Returns true until the iterator reaches the end of the set of limit planes.

	Adding or removing elements does not reset the iterator.

	\return True if the iterator has not reached the end of the sequence of limit planes.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see resetLimitPlaneIterator() getNextLimitPlane()
	*/
	virtual bool hasMoreLimitPlanes() = 0;

	/**
	\brief Returns the next element pointed to by the limit plane iterator, and increments the iterator.

	Places the global frame plane equation (consisting of normal and d, the 4th
	element) coefficients in the argument references. The plane equation is of the form:

	dot(n,p) + d == 0 (n = normal, p = a point on the plane)

	\note This convention for the plane equation differs from the convention used by #NxPlaneShape

	\param[out] planeNormal Used to store the plane normal.
	\param[out] planeD Used to store the plane 'D'.
	\param[out] restitution Optional, used to store restitution of the limit plane.
	\return Returns true if the limit plane is satisfied.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see resetLimitPlaneIterator() hasMoreLimitPlanes()
	*/
	virtual bool getNextLimitPlane(NxVec3 & planeNormal, NxReal & planeD, NxReal * restitution = NULL) = 0;
//@}
/************************************************************************************************/

	/**
	\brief Retrieve the type of this joint.
	\return The type of joint.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointType
	*/
	virtual NxJointType  getType() const = 0;

/************************************************************************************************/

/** @name Is... Joint Type
*/
//@{

	/**
	\brief Type casting operator. The result may be cast to the desired subclass type.

	\param[in] type Used to query for a specific joint type.
	\return NULL if the object if not of type(see #NxJointType). Otherwise a pointer to this object.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxJointType
	*/
	virtual void* is(NxJointType type) = 0;

	/**
	\brief Attempts to perform a cast to a #NxRevoluteJoint.

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxRevoluteJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxRevoluteJoint
	*/
	NX_INLINE NxRevoluteJoint* isRevoluteJoint() { return (NxRevoluteJoint*)is(NX_JOINT_REVOLUTE);}

	/**
	\brief Attempts to perform a cast to a #NxPointInPlaneJoint.

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxPointInPlaneJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxPointInPlaneJoint
	*/
	NX_INLINE NxPointInPlaneJoint* isPointInPlaneJoint() { return (NxPointInPlaneJoint*)is(NX_JOINT_POINT_IN_PLANE);}

	/**
	\brief Attempts to perform a cast to a #NxPointOnLineJoint.

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxPointOnLineJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxPointOnLineJoint
	*/
	NX_INLINE NxPointOnLineJoint* isPointOnLineJoint() { return (NxPointOnLineJoint*)is(NX_JOINT_POINT_ON_LINE);}

	/**
	\brief Attempts to perform a cast to a #NxD6Joint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxD6Joint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxD6Joint
	*/
	NX_INLINE NxD6Joint* isD6Joint() { return (NxD6Joint*)is(NX_JOINT_D6);}

	/**
	\brief Attempts to perform a cast to a #NxPrismaticJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxPrismaticJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxPrismaticJoint
	*/
	NX_INLINE NxPrismaticJoint* isPrismaticJoint() { return (NxPrismaticJoint*)is(NX_JOINT_PRISMATIC);}

	/**
	\brief Attempts to perform a cast to a #NxCylindricalJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxCylindricalJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxCylindricalJoint
	*/
	NX_INLINE NxCylindricalJoint* isCylindricalJoint() { return (NxCylindricalJoint*)is(NX_JOINT_CYLINDRICAL);}

	/**
	\brief Attempts to perform a cast to a #NxSphericalJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxSphericalJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxSphericalJoint
	*/
	NX_INLINE NxSphericalJoint* isSphericalJoint() { return (NxSphericalJoint*)is(NX_JOINT_SPHERICAL);}

	/**
	\brief Attempts to perform a cast to a #NxFixedJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxFixedJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxFixedJoint
	*/
	NX_INLINE NxFixedJoint* isFixedJoint() { return (NxFixedJoint*)is(NX_JOINT_FIXED);}

	/**
	\brief Attempts to perform a cast to a #NxDistanceJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxDistanceJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxDistanceJoint
	*/
	NX_INLINE NxDistanceJoint* isDistanceJoint() { return (NxDistanceJoint*)is(NX_JOINT_DISTANCE);}

	/**
	\brief Attempts to perform a cast to a #NxPulleyJoint

	Returns NULL if this object is not of the appropriate type.

	\return NULL if this object is not a #NxPulleyJoint. Otherwise a pointer to this.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see is NxPulleyJoint
	*/
	NX_INLINE NxPulleyJoint* isPulleyJoint() { return (NxPulleyJoint*)is(NX_JOINT_PULLEY);}
//@}
/************************************************************************************************/

	/**
	\brief Sets a name string for the object that can be retrieved with getName().

	This is for debugging and is not used by the SDK. The string is not copied by the SDK, only the pointer is stored.

	\param[in] name String to set the objects name to.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see getName()
	*/
	virtual	void			setName(const char* name)		= 0;

	/**
	\brief Retrieves the name string set with setName().

	\return The name string for this object.

	Platform:
	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see setName()
	*/
	virtual	const char*		getName()			const	= 0;

	/**
	\brief Retrieves owner scene.

	\return The scene which owns this joint.

	Platform:

	\li PC SW: Yes
	\li GPU  : Yes [SW]
	\li PS3  : Yes
	\li XB360: Yes
	\li WII	 : Yes

	@see NxScene
	*/
	virtual	NxScene&		getScene() const = 0;

	void*			userData;	//!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.
	void*			appData;	//!< used internally, do not change.
	};

/** @} */
#endif
//NVIDIACOPYRIGHTBEGIN
///////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010 NVIDIA Corporation
// All rights reserved. www.nvidia.com
///////////////////////////////////////////////////////////////////////////
//NVIDIACOPYRIGHTEND