text:
<!DOCTYPE html>

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

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

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

<title>HTTP/2 Directives - Configure - H2O - the optimized HTTP/2 server</title>

H2O

the optimized HTTP/1.x, HTTP/2 server

<form id="searchform">
<input class="search" type="search" name="search" id="search" results="5" value="" placeholder="Search" />

×

Powered by Oktavia

</form>

Top
Install
Configure
FAQ
Blog
Source

Configure >
HTTP/2 Directives

H2O provides one of the world's most sophisticated HTTP/2 protocol implementation, including following features.

Prioritization

H2O is one of the few servers that fully implement prioritization of HTTP responses conformant to what is defined in the HTTP/2 specification.
The server implements a O(1) scheduler that determines which HTTP response should be sent to the client, per every 16KB chunk.

Unfortunately, some web browsers fail to specify response priorities that lead to best end-user experience.
H2O is capable of detecting such web browsers, and if it does, uses server-driven prioritization; i.e. send responses with certain MIME-types before others.

It is possible to tune or turn off server-driven prioritization using directives: file.mime.addtypes, http2-reprioritize-blocking-assets.

See also:

Download Timings Benchmark

HTTP/2 (and H2O) improves user experience over HTTP/1.1 or SPDY

Server push

H2O recognizes link headers with preload keyword sent by a backend application server (reverse proxy or FastCGI) or an mruby handler, and pushes the designated resource to a client.

Example. A link response header triggering HTTP/2 push

link: </assets/jquery.js>; rel=preload

When the HTTP/2 driver of H2O recognizes a link response header with rel=preload attribute set, and if all of the following conditions are met, the specified resource is pushed to the client.

the link header does not have the nopush attribute set

the link header is not part of a pushed response

the client does not disable HTTP/2 push

number of the pushed responses in-flight is below the negotiated threshold

authority of the resource specified is equivalent to the request that tried to trigger the push

(for handlers that return the status code synchronously) the status code of the response to be pushed does not indicate an error (i.e. 4xx or 5xx)

The server also provides a mechanism to track the clients' cache state via cookies, and to push the resources specified with the link header only when it does not exist within the clients' cache.  For details, please refer to the documentation of http2-casper configuration directive.

When a resource is pushed, the priority is determined using the priority attribute of the MIME-type configuration.  If the priority is set to highest then the resource will be sent to the client before anything else; otherwise the resource will be sent to client after the main content, as per defined by the HTTP/2 specification.

Pushed responses will have x-http2-push: pushed header set; by looking for the header, it is possible to determine if a resource has been pushed.
It is also possible to log the value in the access log by specifying %{x-http2-push}o, push responses but cancelled by CASPER will have the value of the header logged as cancelled.

See also:

Optimizing performance of multi-tier web applications using HTTP/2 push

The following describes the configuration directives for controlling the HTTP/2 protocol handler.

"http2-casper"

Description:

Configures CASPer (cache-aware server-push).

When enabled, H2O maintains a fingerprint of the web browser cache, and cancels server-push suggested by the handlers if the client is known to be in possention of the content.
The fingerprint is stored in a cookie named h2o_casper using Golomb-compressed sets (a compressed encoding of Bloom filter).

If the value is OFF, the feature is disabled.
Push requests (made by the handlers through the use of Link: rel=preload header) are processed regardless of whether if client already has the responses in its cache.
If the value is ON, the feature is enabled with the defaults value specified below.
If the value is mapping, the feature is enabled, recognizing the following attributes.

capacity-bits:

number of bits used for the fingerprinting.
Roughly speaking, the number of bits should be log2(1/P * number-of-assets-to-track) where P being the probability of false positives.
Default is 13, enough for tracking about 100 asset files with 1/100 chance of false positives (i.e. log2(100 * 100) =~ 213).

tracking-types:

specifies the types of the content tracked by casper.
If omitted or set to blocking-assets, maintains fingerprint (and cancels server push) for resources with mime-type of highest priority.
If set to all, tracks all responses.

It should be noted that the size of the cookie will be log2(P) * number-of-assets-being-tracked bits multiplied by the overhead of Base 64 encoding (4/3).
Therefore with current cookie-based implementation, it is necessary in many cases to restrict the resources being tracked to those have significant effect to user-percieved response time.

Example. Enabling CASPer

http2-casper: ON

# `ON` is equivalent to:
# http2-casper:
#   capacity-bits:  13
#   tracking-types: blocking-assets

Level:

global, host

Default:

http2-casper: OFF

See also:

file.mime.addtypes,
issue #421

"http2-idle-timeout"

Description:

Timeout for idle connections in seconds.

Level:

global

Default:

http2-idle-timeout: 10

"http2-max-concurrent-requests-per-connection"

Description:

Maximum number of requests to be handled concurrently within a single HTTP/2 connection.

The value cannot exceed 256.

Level:

global

Default:

http2-max-concurrent-requests-per-connection: 100

"http2-reprioritize-blocking-assets"

Description:

A boolean flag (ON or OFF) indicating if the server should send contents with highest priority before anything else.

To maximize the user-perceived reponsiveness of a web page, it is essential for the web server to send blocking assets (i.e. CSS and JavaScript files in <HEAD>) before any other files such as images.
HTTP/2 provides a way for web browsers to specify such priorities to the web server.
However, as of Sep. 2015, no major web browsers except Mozilla Firefox take advantage of the feature.

This option, when enabled, works as a workaround for such web browsers, thereby improving experience of users using the web browsers.

Technically speaking, it does the following:

if the client uses dependency-based prioritization, do not reprioritize

if the client does not use dependency-based prioritization, send the contents of which their types are given highest priority before any other responses

Level:

global

Default:

http2-reprioritize-blocking-assets: ON

See also:

file.mime.addtypes,
HTTP/2 (and H2O) improves user experience over HTTP/1.1 or SPDY

Copyright © 2015 DeNA Co., Ltd. et al.


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Sung, Hywel-Jones, Sung, Luangsa-ard, Shrestha & Spatafora, Stud. Mycol. 57: 44 (2007)

#### Original name
Cordyceps kangdingensis M. Zang & Kinjo

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
<#
.SYNOPSIS
Exports applications from a Citrix XenDesktop or XenApp 7.8 desktop group

.PARAMETER ExportFolder
Folder where to save the exported files. In this folder the script creates a folder for each DesktopGroup.

.PARAMETER DesktopGroup
The Citrix Studio Desktop Delivery Group which will be the source for the export

.EXAMPLE .\Export-XenDesktopApplications.ps1 -ExportFolder C:\Export -DesktopGroup ProductionDesktop
Exports all published apps which are published to the desktop delivery group "ProductionDesktop" to the folder "C:\Export"
#>

Param(
    [Parameter(Position=0,
    Mandatory=$True)]
    [ValidateNotNullOrEmpty()]
	[String]$ExportFolder,

    [Parameter(Position=1,
    Mandatory=$True)]
    [ValidateNotNullOrEmpty()]
    [String]$DesktopGroup
)

$scriptDirectory = Split-Path $myInvocation.MyCommand.Path
function Test-IsAdmin {

([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')

}

#region Script
if (!(Test-IsAdmin)){
    throw 'Please run this script with admin priviliges'
}

Add-PSSnapin citrix* -Verbose

if (!(Test-Path -Path $ExportFolder\$DesktopGroup))
{
    Write-Verbose "Exportfolder $ExportFolder does not exist. Create it."
    New-Item -ItemType directory -Path $ExportFolder\$DesktopGroup|out-null
}

$DesktopGroupUid = (Get-BrokerDesktopGroup -Name $DesktopGroup).Uid
Get-BrokerApplication -DesktopGroupUid $DesktopGroupUid | ForEach-Object{
    $CurrentAppHashTable = @{}
    $CurrentApp = $_
    $CurrentApp|Get-Member -MemberType Property|foreach-object{
    $_.name
    }|foreach-object{
        $CurrentAppHashTable.Add($_, $(($CurrentApp).$($_)))
    }
    $BrokerIconUid = ($CurrentApp).IconUid
    $BrokerEnCodedIconData = (Get-BrokerIcon -Uid $BrokerIconUid).EncodedIconData
    $CurrentAppHashTable.Add('EncodedIconData', $BrokerEnCodedIconData)

    Get-BrokerConfiguredFTA | Where-Object {$_.ApplicationUid -eq $CurrentApp.Uid} | ForEach-Object -Process {
        $FTAUid = "FTA-" + "$($_.Uid)"
        $FTA = @{}
        $FTA.Add('ContentType',$_.ContentType)
        $FTA.Add('ExtensionName',$_.ExtensionName)
        $FTA.Add('HandlerDescription',$_.HandlerDescription)
        $FTA.Add('HandlerName',$_.HandlerName)
        $FTA.Add('HandlerOpenArguments',$_.HandlerOpenArguments)
        $CurrentAppHashTable.Add("$FTAUid", $FTA)
    }

    $AppName = $_.ApplicationName -replace ' ','_'
    $Extension = 'json'
    $Filename = $Appname + '.' + $Extension
    $Content = $CurrentAppHashTable|ConvertTo-Json -Compress #-Compress is needed because of a bug in PowerShell -> http://stackoverflow.com/questions/23552000/convertto-json-throws-error-when-using-a-string-terminating-in-backslash
    $Content|Set-Content -Path $(join-path $ExportFolder\$DesktopGroup $Filename) -Force
}

Write-Verbose 'Finished'

#endregion


text:
package net.lkrnac.lib.patere;

import java.nio.file.FileSystems;

import org.apache.commons.lang3.StringUtils;

/**
 * Simple utility class for building test resources path. It reads stack trace
 * of current thread and uses the packages, class name and optionally test
 * method name to build belonging test resources path. This can be handy when
 * test suite uses resources heavily. Helps categorize resources into similar
 * directory structure as tests.
 *
 * @author lubos krnac
 */
public class Patere {
	private static final String SEPARATOR = FileSystems.getDefault().getSeparator();

	/**
	 * Default base path for test resources. Maven default test resources
	 * relative path is used: 'src/test/resources'.
	 */
	private static final String DEFAULT_TEST_RESOURCES_PATH = "src" + SEPARATOR + "test"
			+ SEPARATOR + "resources";

	private String baseTestResourcesPath;
	private boolean flatPackageRepresentation;

	/**
	 * Creates Patere utility instance with default test resources path (that is
	 * Maven default "src/test/resources") and uses flat package representation
	 * (package is represented as one directory with dots -> e.g.
	 * net.lkrnac.lib.patere)
	 */
	public Patere() {
		this(true, DEFAULT_TEST_RESOURCES_PATH);
	}

	/**
	 * Creates Patere utility instance with given base path. Uses flat package
	 * representation (package is represented as one directory with dots -> e.g.
	 * net.lkrnac.lib.patere)
	 *
	 * @param baseTestResourcesPath
	 *            custom base path for test resources
	 */
	public Patere(String baseTestResourcesPath) {
		this(true, baseTestResourcesPath);
	}

	/**
	 * Creates Patere utility instance with given base path and package
	 * representation flag.
	 *
	 * @param flatPackageRepresentation
	 *            true - flat package representation is used
	 *            (package is one directory with dots -> e.g.
	 *            net.lkrnac.lib.patere); false - hierarchical
	 *            package representation is used (package structure represented
	 *            as various sub-directories -> e.g. net/lkrnac/lib/patere)
	 * @param baseTestResourcesPath
	 *            custom base path for test resources
	 */
	public Patere(boolean flatPackageRepresentation, String baseTestResourcesPath) {
		this.baseTestResourcesPath = StringUtils.removeEnd(baseTestResourcesPath, SEPARATOR);
		this.flatPackageRepresentation = flatPackageRepresentation;

	}

	/**
	 * Creates Patere utility instance with default test resources path (that is
	 * Maven default "src/test/resources") and given package representation
	 * flag.
	 *
	 * @param flatPackageRepresentation
	 *            true - flat package representation is used
	 *            (package is one directory with dots -> e.g.
	 *            net.lkrnac.lib.patere); false - hierarchical
	 *            package representation is used (package structure represented
	 *            as various sub-directories -> e.g. net/lkrnac/lib/patere)
	 */
	public Patere(boolean flatPackageRepresentation) {
		this(flatPackageRepresentation, DEFAULT_TEST_RESOURCES_PATH);
	}

	/**
	 * Returns relative path where test resources for calling test method should
	 * be stored.
	 *

	 * This method expects that is called directly from testing method (not
	 * from some "helper" method)
	 *

	 * Desired path would be [base_test_resources_path]
	 * /[test_package]/[test_class]/[test_method]
	 *

	 * Uses SEPARATOR constant so it is platform independent.
	 *
	 * @return relative path to belonging test resources
	 */
	public String getResourcesPathForMethod() {
		final StackTraceElement[] ste = Thread.currentThread().getStackTrace();
		StackTraceElement stackTraceElement = ste[2];
		return getResourcesPathForClass(stackTraceElement.getClassName())
				+ stackTraceElement.getMethodName() + SEPARATOR;
	}

	/**
	 * Returns relative path where test resources for given test class should be
	 * stored.
	 *

	 * Desired path would be [base_test_resources_path]
	 * /[test_package]/[test_class]
	 *
	 * @param fullClassName
	 *            full class name of unit test class
	 * @return relative path to belonging test resources
	 */
	public String getResourcesPathForClass(String fullClassName) {
		StringBuilder pathBuilder = new StringBuilder();

		//@formatter:off
		pathBuilder
			.append(baseTestResourcesPath)
			.append(SEPARATOR)
			.append(fullClassName);
		//@formatter:on

		int lastIndexOf = pathBuilder.lastIndexOf(".");

		//update path based on desired package representation
		if (flatPackageRepresentation) {
			pathBuilder.replace(lastIndexOf, lastIndexOf + 1, SEPARATOR);
		} else {
			String tmpPath = StringUtils.replace(pathBuilder.toString(), ".", SEPARATOR);
			pathBuilder = new StringBuilder(tmpPath);
		}
		pathBuilder.append(SEPARATOR);
		return pathBuilder.toString();
	}
}


text:
    #pragma hdrstop
#endif

#if wxUSE_XRC

#include "wx/xrc/xh_scwin.h"

#ifndef WX_PRECOMP
    #include "wx/frame.h"
    #include "wx/scrolwin.h"
#endif

IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)

wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
: wxXmlResourceHandler()
{
    XRC_ADD_STYLE(wxHSCROLL);
    XRC_ADD_STYLE(wxVSCROLL);

    // wxPanel styles
#if WXWIN_COMPATIBILITY_2_6
    XRC_ADD_STYLE(wxNO_3D);
#endif // WXWIN_COMPATIBILITY_2_6
    XRC_ADD_STYLE(wxTAB_TRAVERSAL);
    XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);

    AddWindowStyles();
}

wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
{
    XRC_MAKE_INSTANCE(control, wxScrolledWindow)

    control->Create(m_parentAsWindow,
                    GetID(),
                    GetPosition(), GetSize(),
                    GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL),
                    GetName());

    SetupWindow(control);
    CreateChildren(control);

    if ( HasParam(wxT("scrollrate")) )
    {
        wxSize rate = GetSize(wxT("scrollrate"));
        control->SetScrollRate(rate.x, rate.y);
    }

    return control;
}

bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxScrolledWindow"));
}

#endif // wxUSE_XRC


text:
_mdatools_ is a free open source toolbox for analysis of multivariate
experimental data based on methods widespread in [Chemometrics](http://en.wikipedia.org/wiki/Chemometrics).
The toolbox can work with conventional two-way datasets (where rows are objects or measurements and
columns are variables) as well as with colour and hyperspectral images. Currently only command line
tools are available, old GUI version has been removed from the project and new is now under developing.

All documentation is [available](https://www.gitbook.com/book/svkucheryavski/mdatoolsm/details) at GitBook.
It is recommended to start learning the toolbox with a
quick start guide, which gives a brief overview of basic methods with a lot of examples.
It allows you to start working with the toolbox after 30 minutes learning. Then just continue with
the user guide to get acquainted with all available features and details.

The last version of the toolbox was tested using MATLAB 2018b but should also work in earlier
varsion. For the basic functionality you do not need any additional toolboxes
installed. All methods were tested using well-known datasets, but there still could be some bugs,
in this case please report to <svkucheryavski@gmail.com>.

## Installation ##

The current version is _0.1.7_ (from 31.10.2018).

Installation is easy and the procedure is similar to most of the others 3rd party MATLAB Toolboxes.
Download zip archive for the latest release and unzip it to the folder you use to keep you MATLAB code,
for example to _Documents/MATLAB_ or _Documents/MATLAB/Toolboxes_. Open the folder in MATLAB
environment and run `install.m` script, which will do the rest.

If you upgrade from previous version, run `uninstall` on the old version first (it will clear the path
list and remove folder with toolbox), then unzip the new version and follow the instructions above.

## Bug reports and suggestions ##

If you find a bug, please, send a message to [svkucheryavski@gmail.com](mailto:svkucheryavski@gmail.com)
with detailed description or use a form on GitHub. Any comments and suggestions will also be
highly appreciated.


text:
{% block content %}
{% load images_extras %}
{% load i18n %}

{% ifequal count 0 %}

{% trans 'drag the items you want to download here' %} {% trans 'or click the small grey arrow' %}

{% endifequal %}
{% ifnotequal count 0 %}

download

{% endifnotequal %}
{% for currentItem in itemList%}

		{% if currentItem.group_name|length_is:"0" %}

		{% else %}

		{% endif %}

			<input type="checkbox" id="LN-toolbar-cart-resolution-checkbox" onclick="doUpdateBasket({{ currentItem.pk }})" {% ifequal currentItem.resolution 'HR' %}checked{% endifequal %} />

			Download HR

{% if not currentItem.group_name|length_is:"0" %}

	{{currentItem.group_name|safe}}

{% endif %}

{% endfor %}

{% ifnotequal count 0 %}

{% trans 'Empty your basket' %}

{% endifnotequal %}
{% endblock %}


text:
#import "MXRoomFilter.h"

#import "MXJSONModel.h"

@implementation MXRoomFilter

- (void)setRooms:(NSArray<NSString *> *)rooms
{
    dictionary[@"rooms"] = rooms;
}

- (NSArray<NSString *> *)rooms
{
    NSArray<NSString *> *rooms;
    MXJSONModelSetArray(rooms, dictionary[@"rooms"]);
    return rooms;
}

- (void)setNotRooms:(NSArray<NSString *> *)notRooms
{
    dictionary[@"not_rooms"] = notRooms;
}

- (NSArray<NSString *> *)notRooms
{
    NSArray<NSString *> *notRooms;
    MXJSONModelSetArray(notRooms, dictionary[@"not_rooms"]);
    return notRooms;
}

- (void)setIncludeLeave:(BOOL)includeLeave
{
    dictionary[@"include_leave"] = @(includeLeave);
}

- (BOOL)includeLeave
{
    BOOL includeLeave = NO;
    MXJSONModelSetBoolean(includeLeave, dictionary[@"include_leave"]);
    return includeLeave;
}

#pragma mark - MXFilterObject override

- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    NSMutableDictionary *flatDictionary = [dictionary mutableCopy];
    [flatDictionary removeObjectsForKeys:@[@"ephemeral", @"state", @"timeline", @"account_data"]];

    self = [super initWithDictionary:flatDictionary];
    if (self)
    {
        if (dictionary[@"ephemeral"])
        {
            _ephemeral = [[MXRoomEventFilter alloc] initWithDictionary:dictionary[@"ephemeral"]];
        }
        if (dictionary[@"state"])
        {
            _state = [[MXRoomEventFilter alloc] initWithDictionary:dictionary[@"state"]];
        }
        if (dictionary[@"timeline"])
        {
            _timeline = [[MXRoomEventFilter alloc] initWithDictionary:dictionary[@"timeline"]];
        }
        if (dictionary[@"account_data"])
        {
            _accountData = [[MXRoomEventFilter alloc] initWithDictionary:dictionary[@"account_data"]];
        }
    }
    return self;
}

- (NSDictionary<NSString *,id> *)dictionary
{
    NSMutableDictionary *flatDictionary = [super.dictionary mutableCopy];

    // And JSONify exposed models
    if (_ephemeral)
    {
        flatDictionary[@"ephemeral"] = _ephemeral.dictionary;
    }
    if (_state)
    {
        flatDictionary[@"state"] = _state.dictionary;
    }
    if (_timeline)
    {
        flatDictionary[@"timeline"] = _timeline.dictionary;
    }
    if (_accountData)
    {
        flatDictionary[@"account_data"] = _accountData.dictionary;
    }

    return flatDictionary;
}

@end


text:
    <ng-form name="forms.cube_setting_form">

Aggregation Groups

                Visit aggregation group for more about aggregation group.

 0"
                 class="table table-hover list">

              ID

                Aggregation Groups

                  Max Dimension Combination:
                  <input onInput="this.value=this.value.replace(/[^0-9]/g, '')" type="text" ng-model="dim_cap" ng-change="changeDimCap(dim_cap)" ng-disabled="state.mode !== 'edit'" style="margin-left:5px; width:20px;">

                {{($index + 1)}}

                      Includes

                      <ui-select
                        autofocus="true"
                        close-on-select="false"    ng-disabled="instance.status=='READY'"
                        on-select="refreshAggregationGroup(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group)"
                        on-remove="refreshAggregationGroup(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group)"
                        ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="aggregation_group.includes">
                        <ui-select-match placeholder="Select Column...">{{$item.column}}</ui-select-match>
                        <ui-select-choices
                          repeat="rowkey_column.column as rowkey_column in cubeMetaFrame.rowkey.rowkey_columns | filter:$select.search">
                          {{rowkey_column.column}}
                        </ui-select-choices>
                      </ui-select>

                        {{aggregation_group.includes}}

                      Mandatory Dimensions

                      <ui-select
                        close-on-select="false"
                        autofocus="true"       ng-disabled="instance.status=='READY'"
                        on-select="refreshAggregationGroup(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group)"
                        on-remove="refreshAggregationGroup(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group)"
                        ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="aggregation_group.select_rule.mandatory_dims">
                        <ui-select-match placeholder="Select Column...">{{$item}}</ui-select-match>
                        <ui-select-choices
                          repeat="column in aggregation_group.includes | filter:$select.search">
                          {{column}}
                        </ui-select-choices>
                      </ui-select>

                        {{aggregation_group.select_rule.mandatory_dims}}

                      Hierarchy Dimensions

                            <ui-select
                              close-on-select="false"
                              autofocus="true"      ng-disabled="instance.status=='READY'"
                              on-select="refreshAggregationHierarchy(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group,$index,hierarchyDims)"
                              on-remove="refreshAggregationHierarchy(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group,$index,hierarchyDims)"
                              ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="hierarchyDims">
                              <ui-select-match placeholder="Select Column...">{{$item}}</ui-select-match>
                              <ui-select-choices
                                repeat="column in aggregation_group.includes | filter:$select.search">
                                {{column}}
                              </ui-select-choices>
                            </ui-select>

                              {{hierarchyDims}}

                            <button class="btn btn-sm btn-info"  ng-disabled="instance.status=='READY'"
                                    ng-click="removeHierarchy(aggregation_group,hierarchyDims)"
                                    ng-show="state.mode=='edit'">
                            </button>

                            <button class="btn btn-sm btn-info"     ng-disabled="instance.status=='READY'"
                                    ng-click="addNewHierarchy(aggregation_group)" ng-show="state.mode=='edit'">New Hierarchy
                            </button>

                      Joint Dimensions

                            <ui-select
                              close-on-select="false"
                              autofocus="true"    ng-disabled="instance.status=='READY'"
                              on-select="refreshAggregationJoint(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group,$index,jointDims)"
                              on-remove="refreshAggregationJoint(cubeMetaFrame.aggregation_groups, rowIndex, aggregation_group,$index,jointDims)"
                              ng-if="state.mode=='edit'" style="width: 100%" multiple ng-model="jointDims">
                              <ui-select-match placeholder="Select Column...">{{$item}}</ui-select-match>
                              <ui-select-choices
                                repeat="column in aggregation_group.includes | filter:$select.search">
                                {{column}}
                              </ui-select-choices>
                            </ui-select>

                              {{jointDims}}

                            <button class="btn btn-sm btn-info"   ng-disabled="instance.status=='READY'"
                                    ng-click="removeJointDims(aggregation_group,jointDims)"
                                    ng-show="state.mode=='edit'">
                            </button>

                            <button class="btn btn-sm btn-info"      ng-disabled="instance.status=='READY'"
                                    ng-click="addNewJoint(aggregation_group)" ng-show="state.mode=='edit'">New Joint
                            </button>

                <button class="btn btn-xs btn-info"   ng-disabled="instance.status=='READY'"
                        ng-click="removeElement(cubeMetaFrame.aggregation_groups, aggregation_group)">
                </button>

          <button class="btn btn-sm btn-info" style="margin-left:42px" ng-click="addNewAggregationGroup()"  ng-disabled="instance.status=='READY'"
                  ng-show="state.mode=='edit'">New Aggregation Group
          </button>

Rowkeys

            Important: Dimension's positioin on HBase rowkey is critical for performance. You can drag and drop to adjust the sequence. In short, put filtering dimension before non-filtering dimension, and  put high cardinality dimension before low cardinality dimension.

 0"
                       class="table table-hover table-bordered list">

                    ID
                    Column
                    Encoding
                    Length
                    Shard By

                    {{($index + 1)}}

                    {{rowkey_column.column}}

                    {{rowkey_column.encoding}}

                    {{rowkey_column.valueLength}}

                   {{rowkey_column.isShardBy}}

                      {{($index + 1)}}

                      <input type="text" class="form-control" placeholder="Column Name.."
                             ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column)"  ng-disabled="true"
                             tooltip="rowkey column name.." tooltip-trigger="focus"
                             ng-model="rowkey_column.column" class="form-control">

                      <select  style="width:180px;"     ng-disabled="instance.status=='READY'"
                              chosen ng-model="rowkey_column.encoding"
                              ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column);"
                              ng-options="dt.value as dt.name for dt in getEncodings(rowkey_column.column)">
                        <option value=""></option>
                      </select>

                      <input type="text" class="form-control" placeholder="Column Length.."
                             tooltip="rowkey column length.." tooltip-trigger="focus"
                             ng-disabled="rowkey_column.encoding.indexOf('dict')>=0||rowkey_column.encoding.indexOf('date')>=0||rowkey_column.encoding.indexOf('time')>=0||instance.status=='READY'"
                             ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column);"
                             ng-model="rowkey_column.valueLength" class="form-control">

                      =0 && (rowkey_column.valueLength>8 || rowkey_column.valueLength<1)">integer encoding column length should between 1 and 8

                      <select  style="width:180px;"
                              chosen ng-model="rowkey_column.isShardBy"
                              tooltip="false by default"     ng-disabled="instance.status=='READY'"
                              data-placeholder="false by default"
                              ng-change="refreshRowKey(convertedRowkeys,$index,rowkey_column,true)"
                              ng-options="dt as dt for dt in cubeConfig.rowKeyShardOptions">
                        <option value=""></option>
                      </select>
                      at most one 'shard by' column is allowed.

 0 && state.mode!=='edit')">

Mandatory Cuboids

 0 && state.mode!=='edit'" class="table table-hover table-bordered list" style="table-layout: fixed;width:92%;">

                    Cuboids

{{dimensionSet}}

                    Cuboids

                      <ui-select multiple ng-model="dimensionSet" theme="bootstrap" sortable="true" close-on-select="false" class="form-control">
                        <ui-select-match placeholder="Select Dimension...">{{$item.column}}</ui-select-match>
                        <ui-select-choices repeat="dimension.column as dimension in cubeMetaFrame.rowkey.rowkey_columns | filter:$select.search">

                        </ui-select-choices>
                      </ui-select>

                      <button class="btn btn-xs btn-info" ng-click="removeDimensionSet($index)">
                      </button>

                      <ui-select multiple ng-model="mandatoryDimensionSet.select" theme="bootstrap" sortable="true" close-on-select="false" class="form-control">
                        <ui-select-match placeholder="Select Dimension...">{{$item.column}}</ui-select-match>
                        <ui-select-choices repeat="dimension.column as dimension in cubeMetaFrame.rowkey.rowkey_columns | filter:$select.search">

                        </ui-select-choices>
                      </ui-select>

                      <button class="btn btn-xs btn-info" ng-click="addDimensionSet()">
                      </button>

                      Import cuboids from file:
                      <input type="file" name="cuboids" id="cuboids" style="display: inline;"/>
                      <button class="btn btn-xs btn-info" ng-click="uploadMandatoryDimensionSetList()">Upload</button>

Cube Engine

            Engine Type :

              <select style="width: 100%" chosen
                      ng-model="cubeMetaFrame.engine_type"
                      ng-if="state.mode=='edit'"
                      ng-options="et.value as et.name for et in cubeConfig.engineType">
                <option value="">--Select Engine Type--</option>
              </select>
              MapReduce
              Spark

Advanced Dictionaries

                  Column
                  Builder Class
                  Reuse
                  Actions

                      {{dictionaries.column}}

                      {{dictionaries.builder}}

                      {{dictionaries.reuse}}

                      <button class="btn btn-xs btn-info" ng-click="addNewDictionaries(dictionaries, $index)" ng-disabled="instance.status=='READY'">

                      </button>

                      <button class="btn btn-xs  btn-danger" ng-click="removeElement(cubeMetaFrame.dictionaries, dictionaries)" ng-disabled="instance.status=='READY'">

                      </button>

          <button class="btn btn-sm btn-info" ng-click="addNewDictionaries()" ng-show="state.mode=='edit' && !addNew" ng-disabled="instance.status=='READY'">
             Dictionaries
          </button>

       <ng-form name="edit_mes_form" style="margin-left:42px;">

Edit Dictionaries

                     Column

                       <select class="form-control" chosen
                               ng-model="newDictionaries.column"
                               ng-change="measureReturnTypeUpdate();"
                               ng-options="column as column for column in getFactColumns()" required>
                         <option value="">-- Select a Column --</option>
                       </select>

                       <input type="radio" name="reuse" ng-value=false ng-model="isReuse"  ng-change="change()"/>Builder Class

                       <input type="radio" name="reuse"  ng-value=true ng-model="isReuse" ng-change="change()"/>Reuse

                     Builder Class

                       <select class="form-control" chosen
                               ng-model="newDictionaries.builder"
                               ng-options="item.value as item.name for item in cubeConfig.buildDictionaries"
                               required>
                         <option value="">-- Select a builder class--</option>
                       </select>

                     Reuse

                       <select class="form-control" chosen
                               ng-model="newDictionaries.reuse"
                               ng-change="measureReturnTypeUpdate();"
                               ng-options="column as column for column in getFactColumns()" required>
                         <option value="">-- Select a Column --</option>
                       </select>

             <button class="btn btn-sm btn-info" ng-disabled="edit_mes_form.$invalid"
                     ng-click="saveNewDictionaries()" ng-show="state.mode=='edit'">OK</button>
             <button class="btn btn-link" ng-click="clearNewDictionaries()">Cancel</button>

Advanced Snapshot Table

                   Snapshot Table
                   Type
                   Global
                   Actions

{{snapshotTable.table_name}}

{{snapshotTable.storage_type}}

                       <input type="checkbox" ng-model="snapshotTable.global" disabled="true">

                       <button class="btn btn-xs btn-info" ng-click="addNewSnapshot(snapshotTable, $index)" ng-disabled="instance.status=='READY'">

                       </button>
                       <button class="btn btn-xs  btn-danger" ng-click="removeSnapshotTable($index)" ng-disabled="instance.status=='READY'">

                       </button>

             <button class="btn btn-sm btn-info" ng-click="addNewSnapshot()" ng-show="state.mode=='edit' && !addNewSanpshot" ng-disabled="instance.status=='READY'">
                Snapshot Table
             </button>

Edit Snapshot

                       Snapshot Table

                         <select style="width:95%" chosen ng-model="newSnapshot.select.table_name"
                              ng-options="tableName as tableName for tableName in cubeLookups">
                         <option value=""></option>
                       </select>

                       Type

                         <select style="width:95%" chosen ng-model="newSnapshot.select.storage_type"
                              ng-change="changeSnapshotStorage(newSnapshot.select)"
                              ng-options="storageType.value as storageType.name for storageType in cubeConfig.snapshotStorageTypes">
                           <option value=""></option>
                         </select>

                       Global

                         <input type="checkbox" ng-model="newSnapshot.select.global" ng-disabled="(newSnapshot.select.storage_type == 'hbase')">

               <button class="btn btn-sm btn-info"
                     ng-click="addSnapshot(newSnapshot.select)" ng-show="state.mode=='edit'">OK</button>
               <button class="btn btn-link" ng-click="cancelEditSnapshot()">Cancel</button>

Advanced ColumnFamily

 0">

                     CF
                     Measures

                       {{colFamily.name}}

                       {{colFamily.columns[0].measure_refs}}

 0"
                        class="table table-hover">

                     CF
                     Measures
                     Actions

                       {{colFamily.name}}

                       <ui-select
                         style="width: 100%"
                         close-on-select="false"
                         on-select="refreshColumnFamily(cubeMetaFrame.hbase_mapping.column_family, rowIndex, colFamily)"
                         on-remove="refreshColumnFamily(cubeMetaFrame.hbase_mapping.column_family, rowIndex, colFamily)"
                         ng-model="colFamily.columns[0].measure_refs"
                         multiple>
                         <ui-select-match placeholder="Select Measure...">{{$item}}</ui-select-match>
                         <ui-select-choices repeat="measure in getAllMeasureNames() | filter:$select.search |assignedMeasureNames:getAssignedMeasureNames()">
                           {{measure}}
                         </ui-select-choices>
                       </ui-select>

                       <button ng-if="colFamily.columns[0].measure_refs.length == 0" class="btn btn-xs btn-info" ng-click="removeElement(cubeMetaFrame.hbase_mapping.column_family, colFamily)">

                       </button>

                 <button class="btn btn-sm btn-info" ng-click="addColumnFamily()" ng-show="state.mode=='edit'">
                    ColumnFamily
                 </button>

       </ng-form>

   </ng-form>


text:
<?xml version="1.0" encoding="utf-8"?>

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/white">

    <!-- Find folder / will display always -->
    <item android:id="@+id/action_folder"
        android:icon="@drawable/ic_action_storage"
        android:title="@string/action_folder"
        android:showAsAction="ifRoom" />

    <!-- Upload / will display always -->
    <item android:id="@+id/action_upload"
        android:icon="@drawable/ic_action_upload"
        android:title="@string/action_upload"
        android:onClick="onOptionsItemSelected"
        android:showAsAction="ifRoom"/>

    <item
        android:id="@+id/action_refresh"
        android:icon="@drawable/ic_action_refresh"
        android:showAsAction="ifRoom"
        android:title="@string/action_refresh">
    </item>

</menu>


text:
#include <freerdp/utils/event.h>
#include <freerdp/utils/hexdump.h>
#include <freerdp/utils/rail.h>
#include <freerdp/rail/rail.h>

#include "wf_window.h"
#include "wf_rail.h"

void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom)
{
}

void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail)
{
}

void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command)
{
}

void wf_rail_send_activate(wfInfo* wfi, HWND window, boolean enabled)
{
}

void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event)
{
}

void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window)
{
}

void wf_rail_end_local_move(wfInfo* wfi, rdpWindow *window)
{
}


text:
"""
The MIT license

Copyright (c) 2010 Jonas Nockert

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---

Configuration for molnetbot.

Copy 'molnetbot.conf.sample' to 'molnetbot.conf' and edit options.

"""
from ConfigParser import ConfigParser
import subprocess

def version():
    """Get version number as latest git tag."""

    p = subprocess.Popen('git describe',
                         shell=True,
                         stdout=subprocess.PIPE)
    if p.poll() != 0:
        # Process exited with error, set version manually
        return "na"
    else:
        return proc.communicate()[0].strip()

config = ConfigParser()
config.read('molnetbot.conf')

# JID and password to use for this bot
JID = config.get('xmpp', 'jid')
PASSWORD = config.get('xmpp', 'password')

# notifications configuration
NOTIFY_JIDS = config.get('notifications', 'jids').split(' ')
NOTIFY_ON_SUBSCRIBES = config.getboolean('notifications',
                                         'notify_on_subscribes')
NOTIFY_ON_UNSUBSCRIBES = config.getboolean('notifications',
                                           'notify_on_unsubscribes')
NOTIFY_ON_QUERIES = config.getboolean('notifications',
                                      'notify_on_queries')

# smtp configuration
SMTP_HOST = config.get('smtp', 'host')
EMAIL_FROM = config.get('smtp', 'from')
EMAIL_TO = config.get('smtp', 'to').split(' ')

# API configuration
API_SEARCH_URL = config.get('molnet', 'api_search_url')

# vCard
AVATAR_IMAGE_PATH = config.get('vCard', 'avatar_path')

# Log traffic?
LOG_TRAFFIC = config.getboolean('debug', 'log_traffic')


text:
#include <chrono>
#include <infrastructure/exception.h>
#include <infrastructure/logging.h>
#include <graphics/mdfmaterials.h>
#include "aas/aas.h"

#include "aas_animated_model.h"
#include "aas_anim_events.h"
#include "aas_mesh.h"
#include "aas_skeleton.h"

namespace aas {

	using std::chrono::system_clock;

	struct ActiveModel {
		const AasHandle handle;
		gfx::EncodedAnimId animId = gfx::EncodedAnimId(gfx::WeaponAnim::None);
		float floatconst = 6.3940001f;
		system_clock::time_point timeLoaded = system_clock::now();
		std::unique_ptr<AnimatedModel> model;
		std::unique_ptr<Mesh> mesh;
		std::shared_ptr<Skeleton> skeleton;
		std::vector<std::unique_ptr<Mesh>> additionalMeshes;

		ActiveModel(AasHandle handle) : handle(handle) {}
	};

	struct SkeletonCacheEntry {
		std::weak_ptr<Skeleton> data;
	};

	class EventHandler : public IAnimEventHandler {
	public:

		EventHandler(std::function<void(const std::string&)> scriptInterpreter) : scriptInterpreter_(scriptInterpreter) {}

		virtual void HandleEvent(int frame, float frameTime, AnimEventType type, std::string_view args) override;

		void SetFlagsOut(AnimEvents *flagsOut) {
			flagsOut_ = flagsOut;
		}
		void ClearFlagsOut() {
			flagsOut_ = nullptr;
		}

	private:
		AnimEvents * flagsOut_ = nullptr;
		std::function<void(const std::string&)> scriptInterpreter_;
	};

	AasSystem::AasSystem(std::function<std::string(int)> getSkeletonFilename,
		std::function<std::string(int)> getMeshFilename,
		std::function<void(const std::string&)> runScript,
		std::unique_ptr<IMaterialResolver> materialResolver)
	{
		getMeshFilename_ = getMeshFilename;
		getSkeletonFilename_ = getSkeletonFilename;

		materialResolver_ = std::move(materialResolver);

		eventHandler_ = std::make_unique<EventHandler>(runScript);
	}

	AasSystem::~AasSystem() = default;

	bool AasSystem::IsValidHandle(AasHandle handle) const {
		return handle >= 1 && handle < MaxAnims && activeModels_[handle];
	}

	ActiveModel &AasSystem::GetActiveModel(AasHandle handle) const {
		if (IsValidHandle(handle)) {
			return *activeModels_[handle];
		} else {
			throw TempleException("Invalid animation handle: {}", handle);
		}
	}

	AnimatedModel &AasSystem::GetAnimatedModel(AasHandle handle) const {
		return *GetActiveModel(handle).model;
	}

	void EventHandler::HandleEvent(int frame, float frameTime, AnimEventType type, std::string_view args)
	{
		switch (type) {
		case AnimEventType::Action:
			if (flagsOut_) {
				flagsOut_->action = true;
			}
			break;
		case AnimEventType::End:
			if (flagsOut_) {
				flagsOut_->end = true;
			}
			break;
		case AnimEventType::Script:
			if (scriptInterpreter_) {
				scriptInterpreter_(args.data());
			}
			break;
		}
	}

	Matrix3x4 AasSystem::GetWorldMatrix(const AasAnimParams & params) const
	{
		static constexpr float rotation_offset = 2.3561945f;

		Matrix3x4 scale = scaleMatrix(-1.0f, 1.0f, 1.0f);
		Quaternion q = quaternionAxisAngle(0.0f, 1.0f, 0.0f, params.rotation - rotation_offset);
		auto rotation = rotationMatrix(q);

		float x = worldScaleX_ * (params.locX + 0.5f) + params.offsetX;
		float y = params.offsetZ;
		float z = worldScaleY_ * (params.locY + 0.5f) + params.offsetY;
		auto translation = translationMatrix(x, y, z);

		auto worldMatrix = multiplyMatrix3x3_3x4(multiplyMatrix3x3(scale, rotation), translation);

		if ((params.flags & 2) != 0 && IsValidHandle(params.parentAnim)) {
			auto &parentModel = GetAnimatedModel(params.parentAnim);
			auto mat = parentModel.GetBoneMatrix(params.attachedBoneName, &translation);

			worldMatrix = makeMatrixOrthogonal(*mat);
		}
		return worldMatrix;
	}

	Matrix3x4 AasSystem::GetWorldMatrixForParticles(const AasAnimParams & params) const
	{
		Matrix3x4 scale = scaleMatrix(-1.0f, 1.0f, 1.0f);
		auto rotationYaw = rotationMatrix(quaternionAxisAngle(0.0f, 0.0f, 1.0f, params.rotationYaw));
		auto rotationPitch = rotationMatrix(quaternionAxisAngle(1.0f, 0.0f, 0.0f, params.rotationPitch));
		auto rotationRoll = rotationMatrix(quaternionAxisAngle(0.0f, 1.0f, 0.0f, params.rotationRoll));

		float x = worldScaleX_ * (params.locX + 0.5f) + params.offsetX;
		float y = params.offsetZ;
		float z = worldScaleY_ * (params.locY + 0.5f) + params.offsetY;
		auto translation = translationMatrix(x, y, z);

		auto worldMatrix = multiplyMatrix3x3_3x4(multiplyMatrix3x3(multiplyMatrix3x3(multiplyMatrix3x3(scale, rotationRoll), rotationPitch), rotationYaw), translation);

		if ((params.flags & 2) != 0 && IsValidHandle(params.parentAnim)) {
			auto &parentModel = GetAnimatedModel(params.parentAnim);
			auto mat = parentModel.GetBoneMatrix(params.attachedBoneName, &translation);

			worldMatrix = makeMatrixOrthogonal(*mat);
		}

		return worldMatrix;
	}

	// Originally @ 0x102641B0
	AasHandle AasSystem::CreateModelFromIds(int meshId, int skeletonId, gfx::EncodedAnimId idleAnimId, const AasAnimParams& params)
	{
		auto skeletonFilename = getSkeletonFilename_(skeletonId);
		if (skeletonFilename.empty()) {
			throw TempleException("Could not resolve the filename for skeleton id {}", skeletonId);
		}

		auto meshFilename = getMeshFilename_(meshId);
		if (meshFilename.empty()) {
			throw TempleException("Could not resolve the filename for mesh id {}", meshId);
		}

		return CreateModel(meshFilename, skeletonFilename, idleAnimId, params);
	}

	AasHandle AasSystem::CreateModel(std::string_view meshFilename, std::string_view skeletonFilename, gfx::EncodedAnimId idleAnimId, const AasAnimParams & params)
	{
		auto animHandle = FindFreeHandle();

		auto activeModel = std::make_unique<ActiveModel>(animHandle);

		activeModel->skeleton = LoadSkeletonFile(skeletonFilename);

		// Get SKM data
		activeModel->mesh = LoadMeshFile(meshFilename);

		activeModel->model = std::make_unique<AnimatedModel>();
		activeModel->model->SetSkeleton(activeModel->skeleton);
		activeModel->model->AddMesh(activeModel->mesh.get(), materialResolver_.get());
		activeModel->model->SetEventHandler(eventHandler_.get());

		activeModels_[animHandle] = std::move(activeModel);

		try {
			SetAnimById(animHandle, idleAnimId);
			Advance(animHandle, 0, 0, 0, params);
		} catch (...) {
			ReleaseModel(animHandle);
			throw;
		}

		return animHandle;
	}

	// Originally @ 10262540
	bool AasSystem::SetAnimById(AasHandle handle, gfx::EncodedAnimId animId)
	{
		/*if (functions.SetAnimId(handle, animId) != AAS_OK) {
		throw AasException("Unable to set anim id {} for handle {}", animId, handle);
		}*/

		auto &anim = GetActiveModel(handle);

		anim.animId = animId;

		int fallbackState = 0;
		while (true)
		{
			if (anim.model->SetAnimByName(animId.GetName().c_str())) {
				return true;
			}

			if (animId.ToFallback()) {
				continue;
			}

			if (fallbackState == 0) {
				fallbackState = 1;
				if (animId.IsWeaponAnim()) {
					// Retry with unarmed version
					animId = gfx::EncodedAnimId(animId.GetWeaponAnim());
					continue;
				}
			}

			if (fallbackState == 1) {
				fallbackState = 2;
				animId = gfx::EncodedAnimId(gfx::NormalAnimType::ItemIdle);
				continue;
			}

			if (fallbackState == 2) {
				break;
			}
		}

		logger->error("aas_anim_set: ERROR: could not fallback anim {:x} ({})", (int)animId, animId.GetName());
		logger->error("            : Anim File: '{}', Mesh File: '{}'", anim.skeleton->GetFilename(), anim.mesh->GetFilename());
		return false;

	}

	// Originally @ 10262690
	bool AasSystem::HasAnimId(AasHandle handle, gfx::EncodedAnimId animId) const
	{
		auto &anim = GetActiveModel(handle);

		int fallbackState = 0;
		while (true)
		{
			if (anim.model->HasAnimation(animId.GetName().c_str())) {
				return true;
			}

			if (animId.ToFallback()) {
				continue;
			}

			if (fallbackState == 0) {
				fallbackState = 1;
				if (animId.IsWeaponAnim()) {
					// Retry with unarmed version
					animId = gfx::EncodedAnimId(animId.GetWeaponAnim());
					continue;
				}
			}

			if (fallbackState == 1) {
				fallbackState = 2;
				animId = gfx::EncodedAnimId(gfx::NormalAnimType::ItemIdle);
				continue;
			}

			if (fallbackState == 2) {
				break;
			}
		}

		logger->error("aas_anim_set: ERROR: could not fallback anim {:x} ({})", (int)animId, animId.GetName());
		logger->error("            : Anim File: '{}', Mesh File: '{}'", anim.skeleton->GetFilename(), anim.mesh->GetFilename());
		return false;
	}

	gfx::EncodedAnimId AasSystem::GetAnimId(AasHandle handle) const
	{
		return GetActiveModel(handle).animId;
	}

	AnimEvents AasSystem::Advance(AasHandle handle, float deltaTimeInSecs, float deltaDistance, float deltaRotation, const AasAnimParams & params)
	{
		auto worldMatrix = GetWorldMatrix(params);

		AnimEvents events;

		auto &model = GetAnimatedModel(handle);

		eventHandler_->SetFlagsOut(&events);
		model.SetScale(params.scale);
		model.Advance(
			worldMatrix,
			deltaTimeInSecs,
			deltaDistance,
			deltaRotation);
		eventHandler_->ClearFlagsOut();

		return events;
	}

	void AasSystem::UpdateWorldMatrix(AasHandle handle, const AasAnimParams & params, bool forParticles)
	{
		auto &model = GetAnimatedModel(handle);

		if (forParticles) {
			model.SetWorldMatrix(GetWorldMatrixForParticles(params));
		} else {
			model.SetWorldMatrix(GetWorldMatrix(params));
		}
		model.SetScale(params.scale);

	}

	std::unique_ptr<gfx::Submesh> AasSystem::GetSubmesh(AasHandle handle, const AasAnimParams &params, int submeshIdx)
	{
		auto &model = GetAnimatedModel(handle);
		UpdateWorldMatrix(handle, params);
		return model.GetSubmesh(submeshIdx);
	}

	std::unique_ptr<gfx::Submesh> AasSystem::GetSubmeshForParticles(AasHandle handle, const AasAnimParams & params, int submeshIdx)
	{
		auto &model = GetAnimatedModel(handle);
		UpdateWorldMatrix(handle, params, true);
		return model.GetSubmesh(submeshIdx);

	}

	void AasSystem::ReleaseModel(AasHandle handle)
	{
		if (IsValidHandle(handle)) {
			activeModels_[handle].reset();
		}
	}

	void AasSystem::ReleaseAllModels()
	{
		for (auto &activeModel : activeModels_) {
			activeModel.reset();
		}
	}

	void AasSystem::AddAdditionalMesh(AasHandle handle, std::string_view filename)
	{
		auto &anim = GetActiveModel(handle);

		// Should actually check if it's already loaded
		auto mesh = anim.additionalMeshes.emplace_back(LoadMeshFile(filename)).get();

		anim.model->AddMesh(mesh, materialResolver_.get());
	}

	void AasSystem::ClearAddmeshes(AasHandle handle)
	{
		auto &anim = GetActiveModel(handle);

		for (auto &mesh : anim.additionalMeshes) {
			anim.model->RemoveMesh(mesh.get());
		}

		anim.additionalMeshes.clear();
	}

	bool AasSystem::GetBoneWorldMatrixByName(AasHandle handle, const AasAnimParams & params, std::string_view boneName, DX::XMFLOAT4X4 * worldMatrixOut)
	{
		auto &model = GetAnimatedModel(handle);

		auto worldMatrix = GetWorldMatrix(params);

		model.GetBoneMatrix(boneName, &worldMatrix);
		*worldMatrixOut = worldMatrix.ToFloat4x4();
		return true;
	}

	bool AasSystem::GetBoneWorldMatrixByNameForChild(AasHandle parentHandle, AasHandle handle, const AasAnimParams & params, std::string_view boneName, DX::XMFLOAT4X4 * worldMatrixOut)
	{
		// TODO: This function just seems pointless.....
		// If it ever succeeds, it's using the children's bone matrix, ignoring the parent completely

		auto &model = GetAnimatedModel(handle);

		auto worldMatrix = GetWorldMatrix(params);

		if (parentHandle) {
			auto &parentModel = GetAnimatedModel(parentHandle);
			model.GetBoneMatrix(params.attachedBoneName, &worldMatrix);
		}

		model.GetBoneMatrix(boneName, &worldMatrix);
		*worldMatrixOut = worldMatrix.ToFloat4x4();
		return true;
	}

	void AasSystem::SetTime(AasHandle handle, float time, const AasAnimParams &params)
	{
		auto &model = GetAnimatedModel(handle);

		auto worldMatrix = GetWorldMatrixForParticles(params);

		model.SetTime(time, worldMatrix);

	}

	void AasSystem::ReplaceMaterial(AasHandle handle, gfx::MaterialPlaceholderSlot slot, AasMaterial material)
	{
		auto &model = GetAnimatedModel(handle);
		model.SetSpecialMaterial(slot, material);
	}

	AasHandle AasSystem::FindFreeHandle() const
	{
		for (auto i = 1; i < MaxAnims; i++) {
			if (!activeModels_[i]) {
				return i;
			}
		}

		throw TempleException("Maximum number of active animated models has been exceded.");
	}

}


text:
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */
public class Solution {
    public int rob(TreeNode root) {
        if (root == null) return 0;
        this.rob(root.left);
        this.rob(root.right);
        int robRoot = root.val;
        if (root.left != null) {
            if (root.left.left != null) {
                robRoot += root.left.left.val;
            }
            if (root.left.right != null) {
                robRoot += root.left.right.val;
            }
        }
        if (root.right != null) {
            if (root.right.left != null) {
                robRoot += root.right.left.val;
            }
            if (root.right.right != null) {
                robRoot += root.right.right.val;
            }
        }

        int notRobRoot = 0;
        if (root.left != null) {
            notRobRoot += root.left.val;
        }
        if (root.right != null) {
            notRobRoot += root.right.val;
        }
        root.val = (robRoot > notRobRoot) ? robRoot : notRobRoot;
        return root.val;
    }
}


text:
(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(['exports', './html-base-api'], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports, require('./html-base-api'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.htmlBaseApi);
    global.htmlAudioApi = mod.exports;
  }
})(this, function (exports, _htmlBaseApi) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.BetaMaxHtmlAudioAPI = exports.default = undefined;

  var _htmlBaseApi2 = _interopRequireDefault(_htmlBaseApi);

  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      default: obj
    };
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _possibleConstructorReturn(self, call) {
    if (!self) {
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    }

    return call && (typeof call === "object" || typeof call === "function") ? call : self;
  }

  function _inherits(subClass, superClass) {
    if (typeof superClass !== "function" && superClass !== null) {
      throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
    }

    subClass.prototype = Object.create(superClass && superClass.prototype, {
      constructor: {
        value: subClass,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
    if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  }

  var BetaMaxHtmlAudioAPI = function (_BetaMaxHtmlBaseMedia) {
    _inherits(BetaMaxHtmlAudioAPI, _BetaMaxHtmlBaseMedia);

    function BetaMaxHtmlAudioAPI(_ref) {
      var $mediaObj = _ref.$mediaObj;
      var events = _ref.events;

      _classCallCheck(this, BetaMaxHtmlAudioAPI);

      return _possibleConstructorReturn(this, Object.getPrototypeOf(BetaMaxHtmlAudioAPI).call(this, { $mediaObj: $mediaObj, events: events }));
    }

    return BetaMaxHtmlAudioAPI;
  }(_htmlBaseApi2.default);

  exports.default = BetaMaxHtmlAudioAPI;
  exports.BetaMaxHtmlAudioAPI = BetaMaxHtmlAudioAPI;
});


text:
#include "OSPRayDataManager.h"

#include <cstring>
#include <stdio.h>

using namespace SCIRun::Render;
using namespace SCIRun::Core::Datatypes;

OSPRayDataManager::OSPRayDataManager()
{
  ospInit();
}

OSPRayDataManager::~OSPRayDataManager()
{
  ospShutdown();
}

OSPGeometry OSPRayDataManager::updateAndGetMesh(OsprayGeometryObject* obj, uint32_t vertsPerPoly)
{
  auto search = geomMap_.find(obj->id);
  if(search != geomMap_.end())
  {
    if(search->second.version == obj->version) return search->second.geometry;
    else                                  geomMap_.erase(search);
  }
  return addMesh(obj, vertsPerPoly);
}

OSPVolume OSPRayDataManager::updateAndgetStructuredVolume(OsprayGeometryObject* obj)
{
  auto search = geomMap_.find(obj->id);
  if(search != geomMap_.end())
  {
    if(search->second.version == obj->version) return search->second.volume;
    else                                  geomMap_.erase(search);
  }
  return addStructuredVolume(obj);
}

OSPGeometry OSPRayDataManager::addMesh(OsprayGeometryObject* obj, uint32_t vertsPerPoly)
{
  OsprayGeometryObject::FieldData& data = obj->data;
  float* vertices   = data.vertex.size()   > 0 ? data.vertex.data()   : nullptr;
  float* colors     = data.color.size()    > 0 ? data.color.data()    : nullptr;
  float* normals    = data.normal.size()   > 0 ? data.normal.data()   : nullptr;
  float* texCoords  = data.texCoord.size() > 0 ? data.texCoord.data() : nullptr;
  uint32_t* indices = data.index.size()    > 0 ? data.index.data()    : nullptr;

  uint32_t numVertices = data.vertex.size() / DIMENSIONS_;
  size_t numPolygons = data.index.size() / vertsPerPoly;

  geomMap_.emplace(obj->id, ObjectData());
  ObjectData* obj_data = &geomMap_[obj->id];

  obj_data->geometry = ospNewGeometry("mesh");
  obj_data->version = obj->version;

  std::vector<OSPData> sdata, odata;
  std::vector<std::string> paramName;
  if(vertices)
  {
    paramName.push_back("vertex.position");
    sdata.push_back(ospNewSharedData(vertices, OSP_VEC3F, numVertices));
    odata.push_back(ospNewData(OSP_VEC3F, numVertices));
  }

  if(normals)
  {
    paramName.push_back("vertex.normal");
    sdata.push_back(ospNewSharedData(normals, OSP_VEC3F, numVertices));
    odata.push_back(ospNewData(OSP_VEC3F, numVertices));
  }

  if(colors)
  {
    sdata.push_back(ospNewSharedData(colors, OSP_VEC4F, numVertices));
    paramName.push_back("vertex.color");
    odata.push_back(ospNewData(OSP_VEC4F, numVertices));
  }

  if(texCoords)
  {
    paramName.push_back("vertex.texcoord");
    sdata.push_back(ospNewSharedData(texCoords, OSP_VEC2F, numVertices));
    odata.push_back(ospNewData(OSP_VEC2F, numVertices));
  }

  if(indices)
  {
    paramName.push_back("index");
    OSPDataType dataType = vertsPerPoly == 3 ? OSP_VEC3UI : OSP_VEC4UI;
    sdata.push_back(ospNewSharedData(indices, dataType, numPolygons));
    odata.push_back(ospNewData(dataType, numPolygons));
  }

  for (int i = 0; i < sdata.size(); ++i)
  {
    ospCopyData(sdata[i], odata[i]);
    ospSetParam(obj_data->geometry, paramName[i].data(), OSP_DATA, &(odata[i]));
    ospRelease(sdata[i]);
    ospRelease(odata[i]);
  }

  ospCommit(obj_data->geometry);
  return obj_data->geometry;
}

OSPVolume OSPRayDataManager::addStructuredVolume(OsprayGeometryObject* obj)
{
  geomMap_.emplace(obj->id, ObjectData());
  ObjectData* obj_data = &geomMap_[obj->id];

  obj_data->volume = ospNewVolume("structuredRegular");
  obj_data->version = obj->version;

  ospSetParam(obj_data->volume, "gridOrigin", OSP_VEC3F, obj->data.origin);
  ospSetParam(obj_data->volume, "gridSpacing", OSP_VEC3F, obj->data.spacing);

  {
    OSPData sdata = ospNewSharedData(obj->data.color.data(), OSP_FLOAT, obj->data.dim[0], 0, obj->data.dim[1], 0, obj->data.dim[2], 0);
    OSPData odata = ospNewData(OSP_FLOAT, obj->data.dim[0], obj->data.dim[1], obj->data.dim[2]);
    ospCopyData(sdata, odata);
    ospRelease(sdata);

    ospSetParam(obj_data->volume, "data", OSP_DATA, &odata);
    ospRelease(odata);
  }

  ospCommit(obj_data->volume);
  return obj_data->volume;
}

OSPGeometry OSPRayDataManager::getMesh(uint64_t id)
{
  auto search = geomMap_.find(id);
  if(search != geomMap_.end())
    return search->second.geometry;
  return nullptr;
}

OSPVolume OSPRayDataManager::getVolume(uint64_t id)
{
  auto search = geomMap_.find(id);
  if(search != geomMap_.end())
    return search->second.volume;
  return nullptr;
}

void OSPRayDataManager::removeObject(uint64_t id)
{
  auto search = geomMap_.find(id);
  if(search != geomMap_.end())
    geomMap_.erase(search);
}