text:
using System;
using LanguageExt.ClassInstances;

namespace LanguageExt
{
    /// <summary>
    /// A proxy for `Ref`, returned by `commute`.  This allows the transaction system to know that the
    /// result is a commutative and therefore give you a result based on the live state rather than
    /// the transaction.
    /// </summary>
    /// <remarks>
    /// See the [concurrency section](https://github.com/louthy/language-ext/wiki/Concurrency) of the wiki for more info.
    /// </remarks>
    public readonly struct CommuteRef<A>
    {
        internal CommuteRef(Ref<A> r) => Ref = r;
        internal readonly Ref<A> Ref;
        public A Value
        {
            get => Ref.Value;
            set => Ref.Value = value;
        }
        public static implicit operator A(CommuteRef<A> r) => r.Value;
        public override string ToString() => Value?.ToString() ?? "[null]";
        public override int GetHashCode() => Value?.GetHashCode() ?? 0;
        public override bool Equals(object obj) => obj is A val && Equals(val);
        public bool Equals(A other) => default(EqDefault<A>).Equals(other, Value);
        public A Swap(Func<A, A> f) => Ref.Swap(f);
        public A Swap<X>(X x, Func<X, A, A> f) => Ref.Swap(x, f);
        public A Swap<X, Y>(X x, Y y, Func<X, Y, A, A> f) => Ref.Swap(x, y, f);
        public CommuteRef<A> Commute(Func<A, A> f) => Ref.Commute(f);
        public A Commute<X>(X x, Func<X, A, A> f) => Ref.Commute(x, f);
        public A Commute<X, Y>(X x, Y y, Func<X, Y, A, A> f) => Ref.Commute(x, y, f);
    }
}


text:
<?php

/**
 * PHPExcel_Writer_Excel5_Font
 *
 * @category   PHPExcel
 * @package    PHPExcel_Writer_Excel5
 * @copyright  Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
 */
class PHPExcel_Writer_Excel5_Font
{
	/**
	 * BIFF version
	 *
	 * @var int
	 */
	private $_BIFFVersion;

	/**
	 * Color index
	 *
	 * @var int
	 */
	private $_colorIndex;

	/**
	 * Font
	 *
	 * @var PHPExcel_Style_Font
	 */
	private $_font;

	/**
	 * Constructor
	 *
	 * @param PHPExcel_Style_Font $font
	 */
	public function __construct(PHPExcel_Style_Font $font = null)
	{
		$this->_BIFFVersion = 0x0600;
		$this->_colorIndex = 0x7FFF;
		$this->_font = $font;
	}

	/**
	 * Set the color index
	 *
	 * @param int $colorIndex
	 */
	public function setColorIndex($colorIndex)
	{
		$this->_colorIndex = $colorIndex;
	}

	/**
	 * Get font record data
	 *
	 * @return string
	 */
	public function writeFont()
	{
		$font_outline = 0;
		$font_shadow = 0;

		$icv = $this->_colorIndex; // Index to color palette
		if ($this->_font->getSuperScript()) {
			$sss = 1;
		} else if ($this->_font->getSubScript()) {
			$sss = 2;
		} else {
			$sss = 0;
		}
		$bFamily = 0; // Font family
		$bCharSet = PHPExcel_Shared_Font::getCharsetFromFontName($this->_font->getName()); // Character set

		$record = 0x31; // Record identifier
		$reserved = 0x00; // Reserved
		$grbit = 0x00; // Font attributes
		if ($this->_font->getItalic()) {
			$grbit |= 0x02;
		}
		if ($this->_font->getStrikethrough()) {
			$grbit |= 0x08;
		}
		if ($font_outline) {
			$grbit |= 0x10;
		}
		if ($font_shadow) {
			$grbit |= 0x20;
		}

		if ($this->_BIFFVersion == 0x0500) {
			$data = pack("vvvvvCCCCC",
				$this->_font->getSize() * 20,
				$grbit,
				$icv,
				$this->_mapBold($this->_font->getBold()),
				$sss,
				$this->_mapUnderline($this->_font->getUnderline()),
				$bFamily,
				$bCharSet,
				$reserved,
				strlen($this->_font->getName())
			);
			$data .= $this->_font->getName();
		} elseif ($this->_BIFFVersion == 0x0600) {
			$data = pack("vvvvvCCCC",
				$this->_font->getSize() * 20,
				$grbit,
				$icv,
				$this->_mapBold($this->_font->getBold()),
				$sss,
				$this->_mapUnderline($this->_font->getUnderline()),
				$bFamily,
				$bCharSet,
				$reserved
			);
			$data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($this->_font->getName());
		}

		$length = strlen($data);
		$header = pack("vv", $record, $length);

		return($header . $data);
	}

	/**
	 * Set BIFF version
	 *
	 * @param int $BIFFVersion
	 */
	public function setBIFFVersion($BIFFVersion)
	{
		$this->_BIFFVersion = $BIFFVersion;
	}

	/**
	 * Map to BIFF5-BIFF8 codes for bold
	 *
	 * @param boolean $bold
	 * @return int
	 */
	private function _mapBold($bold) {
		if ($bold) {
			return 0x2BC;
		}
		return 0x190;
	}

	/**
	 * Map underline
	 *
	 * @param string
	 * @return int
	 */
	private function _mapUnderline($underline) {
		switch ($underline) {
			case PHPExcel_Style_Font::UNDERLINE_NONE:				return 0x00;
			case PHPExcel_Style_Font::UNDERLINE_SINGLE:				return 0x01;
			case PHPExcel_Style_Font::UNDERLINE_DOUBLE:				return 0x02;
			case PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING:	return 0x21;
			case PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING:	return 0x22;
			default:												return 0x00;
		}
	}

}

redpajama_set_name: RedPajamaGithub


text:
package com.dassmeta.passport.dal.dataobject;

import java.util.Date;

public class AuOrgInfo {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Long id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.parent_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Long parentId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.org_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String orgName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.id_full_path
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String idFullPath;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.org_code
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String orgCode;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.ordering
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Integer ordering;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.contacter
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String contacter;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.contact_phone
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String contactPhone;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.description
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String description;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Date createTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Date modifyTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_org_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String deleted;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.id
     *
     * @return the value of au_org_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Long getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.id
     *
     * @param id the value for au_org_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.parent_id
     *
     * @return the value of au_org_info.parent_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Long getParentId() {
        return parentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.parent_id
     *
     * @param parentId the value for au_org_info.parent_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.org_name
     *
     * @return the value of au_org_info.org_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getOrgName() {
        return orgName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.org_name
     *
     * @param orgName the value for au_org_info.org_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.id_full_path
     *
     * @return the value of au_org_info.id_full_path
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getIdFullPath() {
        return idFullPath;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.id_full_path
     *
     * @param idFullPath the value for au_org_info.id_full_path
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setIdFullPath(String idFullPath) {
        this.idFullPath = idFullPath;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.org_code
     *
     * @return the value of au_org_info.org_code
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getOrgCode() {
        return orgCode;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.org_code
     *
     * @param orgCode the value for au_org_info.org_code
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.ordering
     *
     * @return the value of au_org_info.ordering
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Integer getOrdering() {
        return ordering;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.ordering
     *
     * @param ordering the value for au_org_info.ordering
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setOrdering(Integer ordering) {
        this.ordering = ordering;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.contacter
     *
     * @return the value of au_org_info.contacter
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getContacter() {
        return contacter;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.contacter
     *
     * @param contacter the value for au_org_info.contacter
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setContacter(String contacter) {
        this.contacter = contacter;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.contact_phone
     *
     * @return the value of au_org_info.contact_phone
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getContactPhone() {
        return contactPhone;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.contact_phone
     *
     * @param contactPhone the value for au_org_info.contact_phone
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.description
     *
     * @return the value of au_org_info.description
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getDescription() {
        return description;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.description
     *
     * @param description the value for au_org_info.description
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.create_time
     *
     * @return the value of au_org_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.create_time
     *
     * @param createTime the value for au_org_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.modify_time
     *
     * @return the value of au_org_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Date getModifyTime() {
        return modifyTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.modify_time
     *
     * @param modifyTime the value for au_org_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_org_info.deleted
     *
     * @return the value of au_org_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getDeleted() {
        return deleted;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_org_info.deleted
     *
     * @param deleted the value for au_org_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }
}


text:
$ErrorActionPreference = "SilentlyContinue";

$repoRoot = (Split-Path $PSScriptRoot -Parent)
$helpFile = "$repoRoot\help.md"
$command = "vsts"
$currentDirectory = (Get-Location).path

$commands = @(
    "-h",
    "browse -h",
    "builds -h",
    "builds logs -h",
    "builds queue -h",
    "code -h",
    "pullrequests -h",
    "pullrequests create -h",
    "workitems -h"
    "workitems add -h"
)

$readme = "$repoRoot\readme.md"
$helpOutputSection = "## Current Supported Commands"

$readmelines = (Get-Content $readme).Split([Environment]::NewLine)
New-Item -ItemType File $readme -Force | Out-Null
foreach ($line in $readmelines) {
    if ($line -eq $helpOutputSection) {
        break;
    }
    $line | Add-Content -Encoding Ascii -Path $readme
}

Write-Output $helpOutputSection | Out-File -Encoding ascii -Append -FilePath $readme

$commands | ForEach-Object {
    $commandOutput = Invoke-CommandString -command $command -commandArgs $_
    Write-Output "### $command $_" | Out-File -Encoding ascii -Append -FilePath $readme
    Write-Output '```' | Out-File -Encoding ascii -Append -FilePath $readme
    $commandOutput | `
        Select-String -NotMatch -SimpleMatch $currentDirectory | `
        Out-File -Encoding ascii -Append -FilePath $readme
    Write-Output '```' | Out-File -Encoding ascii -Append -FilePath $readme
}

(Get-Content $readme -Raw) -replace "(\r\n){3,}", "`r`n" | Out-File -Encoding ascii -FilePath $readme


text:
<?php
namespace budyaga\users\models\forms;

use Yii;
use yii\base\Model;
use yii\rbac\Item;

class AssignmentForm extends Model
{
    public $model;
    public $assigned;
    public $unassigned;
    public $target;
    public $action;

    public function rules()
    {
        return [
            [['assigned', 'unassigned', 'action'], 'safe'],
            [['action'], 'required'],
            [['unassigned'], 'noEmpty', 'skipOnEmpty' => false, 'params' => ['action' => 'assign']],
            [['assigned'], 'noEmpty', 'skipOnEmpty' => false, 'params' => ['action' => 'revoke']],
        ];
    }

    public function attributeLabels()
    {
        return [
            'assigned' => Yii::t('users', 'RBAC_ASSIGNED'),
            'unassigned' => Yii::t('users', 'RBAC_UNASSIGNED'),
        ];
    }

    public function noEmpty($attribute, $parameters)
    {
        if ($this->action == $parameters['action']) {
            $items = $this->{$attribute};
            if (!is_array($items) || !count($items)) {
                $this->addError($attribute, Yii::t('users', 'CHOOSE_ITEMS'));
            }
        }
    }

    public function save()
    {
        if (!$this->validate()) {
            return false;
        }

        if ($this->target) {
            if ($this->action == 'assign') {
                return $this->saveChildren($this->unassigned, 'addChild');
            } else {
                return $this->saveChildren($this->assigned, 'removeChild');
            }
        } else {
            if ($this->action == 'assign') {
                return $this->saveAssignments($this->unassigned, 'assign');
            } else {
                return $this->saveAssignments($this->assigned, 'revoke');
            }
        }

        return true;
    }

    protected function saveChildren($items, $method)
    {
        $allSuccess = true;
        $auth = Yii::$app->authManager;

        foreach ($items as $item) {
            $allSuccess = $allSuccess && $auth->$method($this->target, $this->getItem($item));
        }

        return $allSuccess;
    }

    protected function saveAssignments($items, $method)
    {
        $allSuccess = true;
        $auth = Yii::$app->authManager;

        foreach ($items as $item) {
            $allSuccess = $allSuccess && $auth->$method($this->getItem($item), $this->model->id);
        }

        return $allSuccess;
    }

    protected function getItem($serialize)
    {
        $item = unserialize($serialize);
        $auth = Yii::$app->authManager;
        return ($item[1] == Item::TYPE_ROLE) ? $auth->getRole($item[0]) : $auth->getPermission($item[0]);
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Scripta Mycol. , Tartu 20: 54 (2004)

#### Original name
Urceolella pseudopani Hosoya

### Remarks
null


text:
// Boost.Range library
//
//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
//  distribution is subject to the Boost Software License, Version
//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//

#ifndef BOOST_RANGE_SIZE_HPP
#define BOOST_RANGE_SIZE_HPP

#if defined(_MSC_VER)
# pragma once
#endif

#include <boost/range/config.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/size_type.hpp>
#include <boost/range/detail/has_member_size.hpp>
#include <boost/assert.hpp>
#include <boost/cstdint.hpp>
#include <boost/utility.hpp>

namespace boost
{
    namespace range_detail
    {

        template<class SinglePassRange>
        inline typename ::boost::enable_if<
            has_member_size<SinglePassRange>,
            typename range_size<const SinglePassRange>::type
        >::type
        range_calculate_size(const SinglePassRange& rng)
        {
            return rng.size();
        }

        template<class SinglePassRange>
        inline typename disable_if<
            has_member_size<SinglePassRange>,
            typename range_size<const SinglePassRange>::type
        >::type
        range_calculate_size(const SinglePassRange& rng)
        {
            return std::distance(boost::begin(rng), boost::end(rng));
        }
    }

    template<class SinglePassRange>
    inline typename range_size<const SinglePassRange>::type
    size(const SinglePassRange& rng)
    {
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
    !BOOST_WORKAROUND(__GNUC__, < 3) \
    /**/
        using namespace range_detail;
#endif
        return range_calculate_size(rng);
    }

} // namespace 'boost'

#endif


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cn.jpush.im.android.api.event (android API)</title>
<meta name="date" content="2018-02-28">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package cn.jpush.im.android.api.event

Class Summary

Class
Description

BaseNotificationEvent

BaseNotificationEvent.Builder

ChatRoomMessageEvent

聊天室消息事件。
 用户进入聊天室之后,收到聊天室消息时,sdk会主动上抛此事件通知上层.

CommandNotificationEvent

命令透传事件。当收到对方发送透传消息过来时,sdk会抛出此事件通知上层。

CommandNotificationEvent.GetTargetInfoCallback

ContactNotifyEvent

联系人相关通知事件类。收到任何联系人相关的事件时,sdk将会抛出此事件通知上层。
 通过ContactNotifyEvent.getType()接口可以获取事件具体类型原因。

 详见官方文档事件处理
 一节

ContactNotifyEvent.Builder

ConversationRefreshEvent

会话刷新事件.

GroupApprovalEvent

群成员审批事件,收到群成员审批通知时,sdk将会抛出此事件通知上层。
 只有公开群组的群主和管理员会收到此事件, 管理员相关见GroupInfo.addGroupKeeper(List, BasicCallback)
 群主和群管理员都可以进行审批,且只要一人审批过,其余人不能再审批
 通过GroupApprovalEvent.getType()接口可以获取事件具体类型原因。
 通过GroupApprovalEvent.acceptGroupApproval(String, String, BasicCallback)进行入群审批同意操作
 通过GroupApprovalEvent.refuseGroupApproval(String, String, String, BasicCallback)进行入群审批拒绝操作

GroupApprovalEvent.Builder

GroupApprovalRefuseEvent

群成员审批拒绝通知事件,收到群成员审批拒绝通知时,sdk将会抛出此事件通知上层
 只有发起过入群审批请求(主动申请加入公开群组或邀请其他用户加入公开群组)且群主入群审批拒绝时才会收到该事件

GroupApprovalRefuseEvent.Builder

GroupApprovedNotificationEvent

群成员审批事件已经被审批通知事件,当有一个群管理员或群主审批过群成员审批事件,sdk将会抛出此事件通知上层
 只有该审批事件对应群的群主和群管理员会收到此事件

LoginStateChangeEvent

用户登陆状态变更事件。当前用户的登陆状态变更时,sdk将会抛出此事件通知上层。
 通过LoginStateChangeEvent.getReason()接口可以获取状态变更原因。

 详见官方文档事件处理
 一节

MessageBaseEvent

MessageEvent

在线消息事件.

MessageReceiptStatusChangeEvent

会话中消息的已回执人数变更事件。

MessageReceiptStatusChangeEvent.MessageReceiptMeta

消息对应未回执数相关元信息。

MessageRetractEvent

消息被发送方撤回事件.

MyInfoUpdatedEvent

当前登陆用户的用户信息被更新事件.

NotificationClickEvent

通知栏点击事件。如果上层使用了sdk提供的通知栏通知,则当点击通知栏时,sdk将会发送此事件给上层,
 ,上层通过onEvent方法接收事件,可以自定义点击通知栏之后的跳转。

 详见官方文档事件处理
 一节

OfflineMessageEvent

离线消息事件.

UserDeletedEvent
Deprecated

deprecated in sdk version 1.2.0,use LoginStateChangeEvent instead.

UserLogoutEvent
Deprecated

deprecated in sdk version 1.2.0 , use LoginStateChangeEvent instead.

Enum Summary

Enum
Description

CommandNotificationEvent.Type

ContactNotifyEvent.Type

联系人通知事件类型

ConversationRefreshEvent.Reason

事件发生的原因

GroupApprovalEvent.Type

群成员审批通知事件类型

LoginStateChangeEvent.Reason

登陆状态变更原因。

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes


text:
from msrest.paging import Paged

class AutoscaleSettingResourcePaged(Paged):
    """
    A paging container for iterating over a list of :class:`AutoscaleSettingResource <azure.mgmt.monitor.models.AutoscaleSettingResource>` object
    """

    _attribute_map = {
        'next_link': {'key': 'nextLink', 'type': 'str'},
        'current_page': {'key': 'value', 'type': '[AutoscaleSettingResource]'}
    }

    def __init__(self, *args, **kwargs):

        super(AutoscaleSettingResourcePaged, self).__init__(*args, **kwargs)


text:
/* See license.txt for terms of usage */

"use strict";

module.metadata = {
  "stability": "experimental"
};

const { Cu, Ci } = require("chrome");
const { Trace, TraceError } = require("../sdk/core/trace.js").get(module.id);
const { EventTarget } = require("sdk/event/target");
const { extend } = require("sdk/core/heritage");
const { Context } = require("./context.js");
const { defer, resolve } = require("sdk/core/promise");

// DevTools
const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});

/**
 * TODO docs
 */
var ToolboxChrome = extend(EventTarget.prototype,
/** @lends ToolboxChrome */
{
  // Initialization

  initialize: function() {
    this.initialized = true;
    this.contexts = new Map();
    this.registeredOverlays = new Map();

    // Bind DevTools event handlers.
    this.onToolboxCreated = this.onToolboxCreated.bind(this);
    this.onToolboxReady = this.onToolboxReady.bind(this);
    this.onToolboxDestroy = this.onToolboxDestroy.bind(this);
    this.onToolboxClosed = this.onToolboxClosed.bind(this);

    // Hook developer tools events.
    gDevTools.on("toolbox-created", this.onToolboxCreated);
    gDevTools.on("toolbox-ready", this.onToolboxReady);
    gDevTools.on("toolbox-destroy", this.onToolboxDestroy);
    gDevTools.on("toolbox-destroyed", this.onToolboxClosed);
  },

  shutdown: function() {
    gDevTools.off("toolbox-created", this.onToolboxCreated);
    gDevTools.off("toolbox-ready", this.onToolboxReady);
    gDevTools.off("toolbox-destroy", this.onToolboxDestroy);
    gDevTools.off("toolbox-destroyed", this.onToolboxClosed);
  },

  // DevTools Event Handlers

  onToolboxCreated: function(eventId, toolbox) {
    Trace.sysout("ToolboxChrome.onToolboxCreated;", toolbox);

    // Make sure to create the toolbox context as soon as possible.
    // 'toolbox-created' has been introduced in Fx 39, so use
    // 'toolbox-ready' for previous versions.
    let context = this.getContext(toolbox);
  },

  onToolboxReady: function(event, toolbox) {
    Trace.sysout("ToolboxChrome.onToolboxReady; ", toolbox);

    // Make sure to create the toolbox context as soon as possible.
    let context = this.getContext(toolbox);
  },

  onToolboxDestroy: function(eventId, target) {
    Trace.sysout("ToolboxChrome.onToolboxDestroy;", target);

    let context = this.contexts.get(target);
    if (!context) {
      Trace.sysout("ToolboxChrome.onToolboxDestroy; ERROR unknown target!",
        target);
      return;
    }

    this.contexts.delete(target);

    context.destroy();
  },

  onToolboxClosed: function(eventId, target) {
    Trace.sysout("ToolboxChrome.onToolboxClosed;", target);

    let context = this.contexts.get(target);
    if (!context) {
      Trace.sysout("ToolboxChrome.onToolboxClosed; ERROR unknown target!",
        target);
      return;
    }
  },

  // Overlays

  registerPanelOverlay: function(overlay) {
    let overlayId = overlay.prototype.overlayId;
    let panelId = overlay.prototype.panelId;

    Trace.sysout("ToolboxChrome.registerOverlay; " + overlayId, overlay);

    // Listen for panel initialization event.
    let onApplyOverlay = (eventId, toolbox, panelFrame) => {
      Trace.sysout("ToolboxChrome.onApplyOverlay; " + overlayId, panelFrame);

      let context = this.getContext(toolbox);

      try {
        // Create instance of an overlay
        let instance = new overlay({
          panelFrame: panelFrame,
          toolbox: toolbox,
          chrome: this,
          context: context
        });

        context.overlays.set(overlayId, instance);

        // Register for 'build' event (panel instance created).
        toolbox.once(panelId + "-build", (eventId, panel) => {
          Trace.sysout("ToolboxChrome.applyOverlay; " + eventId, panel);
          instance.onBuild({toolbox: toolbox, panel: panel});
        });

        // Register for 'ready' event (panel frame loaded).
        toolbox.once(panelId + "-ready", (eventId, panel) => {
          Trace.sysout("ToolboxChrome.applyOverlay; " + eventId, panel);
          instance.onReady({toolbox: toolbox, panel: panel});
        });
      }
      catch (err) {
        TraceError.sysout("ToolboxChrome.initialize; Overlay for: " +
          overlay.id + " EXCEPTION " + err, err);
      }
    };

    // Use 'on' (not 'once') listener since the '*-init' event is sent
    // every time the toolbox is closed and opened again. The listener
    // will be removed in destroyOverlay method when the extension is
    // destroyed.
    gDevTools.on(panelId + "-init", onApplyOverlay);

    this.registeredOverlays.set(overlayId, {
      ctor: overlay,
      creator: onApplyOverlay
    })
  },

  unregisterPanelOverlay: function(overlay) {
    let overlayId = overlay.prototype.overlayId;

    Trace.sysout("ToolboxChrome.unregisterOverlay; " + overlayId, overlay);

    let entry = this.registeredOverlays.get(overlayId);
    gDevTools.off(overlayId + "-init", entry.creator);

    this.registeredOverlays.delete(overlayId);
  },

  registerToolboxOverlay: function(overlay) {
    let overlayId = overlay.prototype.overlayId;

    Trace.sysout("ToolboxChrome.registerToolboxOverlay; " +
      overlayId, overlay);

    let onApplyOverlay = (eventId, toolbox) => {
      Trace.sysout("ToolboxChrome.onApplyToolboxOverlay; " +
        overlayId, toolbox);

      let context = this.getContext(toolbox);

      // Bail out if the overlay already exists for this context/toolbox.
      if (context.getOverlay(overlayId)) {
        return;
      }

      try {
        // Create instance of an overlay
        let instance = new overlay({
          toolbox: toolbox,
          chrome: this,
          context: context,
        });

        context.overlays.set(overlayId, instance);

        // xxxHonza: execute when 'toolbox-ready' is fired.
        instance.onReady({toolbox: toolbox});
      }
      catch (err) {
        TraceError.sysout("ToolboxChrome.initialize; Overlay for: " +
          overlay.id + " EXCEPTION " + err, err);
      }
    };

    // Use 'on' (not 'once') listener since the create event is sent
    // every time a toolbox is opened (can be also on another browser tab).
    gDevTools.on("toolbox-ready", onApplyOverlay);

    this.registeredOverlays.set(overlayId, {
      ctor: overlay,
      creator: onApplyOverlay
    })

    // Apply the overlay on all existing toolboxes
    for (let [target, toolbox] of gDevTools._toolboxes) {
      if (toolbox.isReady) {
        onApplyOverlay("toolbox-ready", toolbox);
      }
    }
  },

  unregisterToolboxOverlay: function(overlay) {
    let overlayId = overlay.prototype.overlayId;

    Trace.sysout("ToolboxChrome.unregisterToolboxOverlay; " +
      overlayId, overlay);

    let entry = this.registeredOverlays.get(overlayId);
    gDevTools.off("toolbox-ready", entry.creator);

    this.registeredOverlays.delete(overlayId);
  },

  // Context

  getContext: function(toolbox) {
    let target = toolbox.target;
    let context = this.contexts.get(target);
    if (!context) {
      context = new Context(toolbox);
      this.contexts.set(target, context);
    }
    return context;
  },
});

function getToolboxWhenReady(toolId) {
  let deferred = defer();
  showToolbox(toolId).then(toolbox => {
    deferred.resolve(toolbox);
  });
  return deferred.promise;
}

// Exports from this module
exports.ToolboxChrome = ToolboxChrome;


text:
package com.glaf.base.modules.workspace.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.glaf.base.modules.sys.model.SysUser;
import com.glaf.base.modules.workspace.util.MessageJsonFactory;
import com.glaf.core.base.JSONable;

@Entity
@Table(name = "MESSAGE")
public class Message implements Serializable, JSONable {

	private static final long serialVersionUID = -3111749338365950889L;

	@Id
	@Column(name = "ID", nullable = false)
	protected long id;

	/**
	 * 消息类型
	 */
	@Column(name = "TYPE")
	protected int type;

	@Column(name = "SYSTYPE")
	protected int sysType;

	/**
	 * 接收人列表
	 */
	@Column(name = "RECVERLIST", length = 500)
	protected String recverList;

	/**
	 * 标题
	 */
	@Column(name = "TITLE", length = 250)
	protected String title;

	/**
	 * 内容
	 */
	@Lob
	@Column(name = "CONTENT", length = 2000)
	protected String content;

	/**
	 * 创建时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATEDATE")
	protected Date createDate;

	/**
	 * 已读标记
	 */
	@Column(name = "READED")
	protected int readed;

	/**
	 * 分类
	 */
	@Column(name = "CATEGORY")
	protected int category;

	/**
	 * 发送者
	 */
	@Column(name = "SENDER")
	protected long senderId;

	/**
	 * 接收者
	 */
	@Column(name = "RECVER")
	protected long recverId;

	@javax.persistence.Transient
	protected SysUser recver;

	@javax.persistence.Transient
	protected SysUser sender;

	public int getCategory() {
		return category;
	}

	public String getContent() {
		return content;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public long getId() {
		return id;
	}

	public int getReaded() {
		return readed;
	}

	public SysUser getRecver() {
		return recver;
	}

	public long getRecverId() {
		return recverId;
	}

	public String getRecverList() {
		return recverList;
	}

	public SysUser getSender() {
		return sender;
	}

	public long getSenderId() {
		return senderId;
	}

	public int getSysType() {
		return sysType;
	}

	public String getTitle() {
		return title;
	}

	public int getType() {
		return type;
	}

	public void setCategory(int category) {
		this.category = category;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setReaded(int readed) {
		this.readed = readed;
	}

	public void setRecver(SysUser recver) {
		this.recver = recver;
	}

	public void setRecverId(long recverId) {
		this.recverId = recverId;
	}

	public void setRecverList(String recverList) {
		this.recverList = recverList;
	}

	public void setSender(SysUser sender) {
		this.sender = sender;
	}

	public void setSenderId(long senderId) {
		this.senderId = senderId;
	}

	public void setSysType(int sysType) {
		this.sysType = sysType;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Message jsonToObject(JSONObject jsonObject) {
		return MessageJsonFactory.jsonToObject(jsonObject);
	}

	public JSONObject toJsonObject() {
		return MessageJsonFactory.toJsonObject(this);
	}

	public ObjectNode toObjectNode() {
		return MessageJsonFactory.toObjectNode(this);
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

}


text:
(function() {
  var vexDialogFactory;

  vexDialogFactory = function($, vex) {
    var $formToObject, dialog;
    if (vex == null) {
      return $.error('Vex is required to use vex.dialog');
    }
    $formToObject = function($form) {
      var object;
      object = {};
      $.each($form.serializeArray(), function() {
        if (object[this.name]) {
          if (!object[this.name].push) {
            object[this.name] = [object[this.name]];
          }
          return object[this.name].push(this.value || '');
        } else {
          return object[this.name] = this.value || '';
        }
      });
      return object;
    };
    dialog = {};
    dialog.buttons = {
      YES: {
        text: 'OK',
        type: 'submit',
        className: 'vex-dialog-button-primary'
      },
      NO: {
        text: 'Cancel',
        type: 'button',
        className: 'vex-dialog-button-secondary',
        click: function($vexContent, event) {
          $vexContent.data().vex.value = false;
          return vex.close($vexContent.data().vex.id);
        }
      }
    };
    dialog.defaultOptions = {
      callback: function(value) {},
      afterOpen: function() {},
      message: 'Message',
      input: "<input name=\"vex\" type=\"hidden\" value=\"_vex-empty-value\" />",
      value: false,
      buttons: [dialog.buttons.YES, dialog.buttons.NO],
      showCloseButton: false,
      onSubmit: function(event) {
        var $form, $vexContent;
        $form = $(this);
        $vexContent = $form.parent();
        event.preventDefault();
        event.stopPropagation();
        $vexContent.data().vex.value = dialog.getFormValueOnSubmit($formToObject($form));
        return vex.close($vexContent.data().vex.id);
      },
      focusFirstInput: true
    };
    dialog.defaultAlertOptions = {
      message: 'Alert',
      buttons: [dialog.buttons.YES]
    };
    dialog.defaultConfirmOptions = {
      message: 'Confirm'
    };
    dialog.open = function(options) {
      var $vexContent;
      options = $.extend({}, vex.defaultOptions, dialog.defaultOptions, options);
      options.content = dialog.buildDialogForm(options);
      options.beforeClose = function($vexContent) {
        return options.callback($vexContent.data().vex.value);
      };
      $vexContent = vex.open(options);
      if (options.focusFirstInput) {
        $vexContent.find('input[type="text"], input[type="submit"]').first().focus();
      }
      return $vexContent;
    };
    dialog.alert = function(options) {
      if (typeof options === 'string') {
        options = {
          message: options
        };
      }
      options = $.extend({}, dialog.defaultAlertOptions, options);
      return dialog.open(options);
    };
    dialog.confirm = function(options) {
      if (typeof options === 'string') {
        return $.error('dialog.confirm(options) requires options.callback.');
      }
      options = $.extend({}, dialog.defaultConfirmOptions, options);
      return dialog.open(options);
    };
    dialog.prompt = function(options) {
      var defaultPromptOptions;
      if (typeof options === 'string') {
        return $.error('dialog.prompt(options) requires options.callback.');
      }
      defaultPromptOptions = {
        message: "" + (options.label || 'Prompt:') + "",
        input: "<input name=\"vex\" type=\"text\" class=\"vex-dialog-prompt-input\" placeholder=\"" + (options.placeholder || '') + "\" />"
      };
      options = $.extend({}, defaultPromptOptions, options);
      return dialog.open(options);
    };
    dialog.buildDialogForm = function(options) {
      var $form, $input, $message;
      $form = $('<form class="vex-dialog-form" />');
      $message = $('
');
      $input = $('
');
      $form.append($message.append(options.message)).append($input.append(options.input)).append(dialog.buttonsToDOM(options.buttons)).bind('submit.vex', options.onSubmit);
      return $form;
    };
    dialog.getFormValueOnSubmit = function(formData) {
      if (formData.vex) {
        if (formData.vex === '_vex-empty-value') {
          return true;
        }
        return formData.vex;
      } else {
        return formData;
      }
    };
    dialog.buttonsToDOM = function(buttons) {
      var $buttons;
      $buttons = $('
');
      $.each(buttons, function(index, button) {
        return $buttons.append($("<input type=\"" + button.type + "\" />").val(button.text).addClass(button.className + ' vex-dialog-button ' + (index === 0 ? 'vex-first ' : '') + (index === buttons.length - 1 ? 'vex-last ' : '')).bind('click.vex', function(e) {
          if (button.click) {
            return button.click($(this).parents("." + vex.baseClassNames.content), e);
          }
        }));
      });
      return $buttons;
    };
    return dialog;
  };

  if (typeof define === 'function' && define.amd) {
    define(['jquery', 'vex'], vexDialogFactory);
  } else if (typeof exports === 'object') {
    module.exports = vexDialogFactory(require('jquery'), require('vex'));
  } else {
    window.vex.dialog = vexDialogFactory(window.jQuery, window.vex);
  }

}).call(this);
Contact GitHub API Training Shop Blog About


text:
Starting with the 2.0 version, you can have distinct configurations that you can use in your app, concurrently. These configurations can connect to connect in `:direct` mode to different Neo4j servers, or the same but with different credentials, pool sizes, etc.

> This is not recommended for connecting to a causal cluster; the `:routing` mode, respectively.

To differentiate between multiple `:direct` configurations, you'll use a new parameter: `:role`. Let's see a some code examples, for brevity.

```elixir
frontend_config = [
    url: "bolt://localhost",
    basic_auth: [username: "neo4j", password: "test"],
    pool_size: 10,
    max_overflow: 2,
    role: :frontend
  ]

backend_config = [
    url: "bolt://not_my_localhost:12345",
    basic_auth: [username: "xxxxx", password: "yyyyy"],
    pool_size: 10,
    max_overflow: 2,
    role: :backend
  ]

{:ok, _pid} = Bolt.Sips.start_link(frontend_config)
{:ok, _pid} = Bolt.Sips.start_link(backend_config)

:frontend = Bolt.Sips.conn(:frontend)
:backend = Bolt.Sips.conn(:backend)

%Response{results: [%{"n" => 1}]} = Bolt.Sips.query!(:frontend, "RETURN 1 as n")
%Response{results: [%{"n" => 1}]} = Bolt.Sips.query!(:backend, "RETURN 1 as n")

```

The last two Cypher queries above will be executed on two different servers. And yes you can run them concurrently since their respective pools will not compete for the same resources.

If you desire to terminate a role-based connection, you can easily do so. Just like this: `:ok = Bolt.Sips.terminate_connections(:backend)`.


text:
package com.microrisc.simply.iqrf.dpa.v21x.examples.std_per.thermometer;

import com.microrisc.simply.CallRequestProcessingState;
import com.microrisc.simply.Network;
import com.microrisc.simply.Node;
import com.microrisc.simply.Simply;
import com.microrisc.simply.SimplyException;
import com.microrisc.simply.errors.CallRequestProcessingError;
import com.microrisc.simply.iqrf.dpa.DPA_ResponseCode;
import com.microrisc.simply.iqrf.dpa.v21x.DPA_SimplyFactory;
import com.microrisc.simply.iqrf.dpa.v21x.devices.Thermometer;
import com.microrisc.simply.iqrf.dpa.v21x.types.DPA_AdditionalInfo;
import com.microrisc.simply.iqrf.dpa.v21x.types.Thermometer_values;
import java.io.File;
import java.util.UUID;

/**
 * Example of getting temperature on some node in a network.
 *
 * @author Michal Konopa
 * @author Rostislav Spinar
 */
public class GetTemperature {
    // reference to Simply
    private static Simply simply = null;

    // prints out specified message, destroys the Simply and exits
    private static void printMessageAndExit(String message) {

        System.out.println(message);
        if ( simply != null) {
            simply.destroy();
        }

        System.exit(1);
    }

    public static void main(String[] args) throws InterruptedException {
        // creating Simply instance
        try {
            simply = DPA_SimplyFactory.getSimply("config" + File.separator + "Simply.properties");
        } catch ( SimplyException ex ) {
            printMessageAndExit("Error while creating Simply: " + ex.getMessage());
        }

        // getting network 1
        Network network1 = simply.getNetwork("1", Network.class);
        if ( network1 == null ) {
            printMessageAndExit("Network 1 doesn't exist");
        }

        // getting node 1
        Node node1 = network1.getNode("1");
        if ( node1 == null ) {
            printMessageAndExit("Node 1 doesn't exist");
        }

        // getting Thermometer interface
        Thermometer thermo = node1.getDeviceObject(Thermometer.class);
        if ( thermo == null ) {
            printMessageAndExit("Thermometer doesn't exist on node 1");
        }

        // getting actual temperature
        Thermometer_values thermoValues = null;
        UUID tempRequestUid = thermo.async_get();

        // maximal number of attempts of getting a result
        final int MAX_RESULT_GETTING = 10;
        int attempt = 0;
        while ( attempt++ < MAX_RESULT_GETTING ) {

            CallRequestProcessingState procState = thermo.getCallRequestProcessingState(
                    tempRequestUid
            );

            if ( procState == CallRequestProcessingState.RESULT_ARRIVED ) {
                thermoValues = thermo.getCallResultImmediately(tempRequestUid, Thermometer_values.class);
                //result = thermo.getCallResultInDefaultWaitingTimeout(getStateRequestUid, LED_State.class);
                break;
            }

            if ( procState == CallRequestProcessingState.ERROR ) {

                // general call error
                CallRequestProcessingError error = thermo.getCallRequestProcessingErrorOfLastCall();

                // specific call error
                DPA_AdditionalInfo dpaAddInfo = thermo.getDPA_AdditionalInfoOfLastCall();
                DPA_ResponseCode dpaResponseCode = dpaAddInfo.getResponseCode();

                printMessageAndExit("Getting temperature failed: " + error + ", DPA error: " + dpaResponseCode);
            } else {
                System.out.println("Getting temperature hasn't been processed yet: " + procState);
            }

            Thread.sleep(500);
        }

        if ( thermoValues != null ) {
            // printing results
            System.out.println("Temperature on the node " + node1.getId() + ": " +
                thermoValues.getValue() + "." + thermoValues.getFractialValue() + " *C"
            );
            //System.out.println("Temperature: \n" + thermoValues.toPrettyFormattedString());
        } else {
            System.out.println("Result has not arrived.");
        }

        // end working with Simply
        simply.destroy();
    }
}


text:
path=$1

now=$(date)
echo -e \\n$now: BEGIN linguist script\\n

ruby linguist.rb $path > $path/linguistfiles.log

echo -e "linguistfile.log was generated in $path folder:  \\n"
now=$(date)
echo -e $now: END linguist script\\n


text:
using System;
using System.Runtime.Serialization;

namespace ESI.NET.Enumerations
{
    [Flags]
    public enum SearchCategory
    {
        [EnumMember(Value="agent")]          /**/ Agent = 1,
        [EnumMember(Value="alliance")]       /**/ Alliance = 2,
        [EnumMember(Value="character")]      /**/ Character = 4,
        [EnumMember(Value="constellation")]  /**/ Constellation = 8,
        [EnumMember(Value="corporation")]    /**/ Corporation = 16,
        [EnumMember(Value="faction")]        /**/ Faction = 32,
        [EnumMember(Value="inventory_type")] /**/ InventoryType = 64,
        [EnumMember(Value="region")]         /**/ Region = 128,
        [EnumMember(Value="solar_system")]   /**/ SolarSystem = 256,
        [EnumMember(Value="station")]        /**/ Station = 512,
        [EnumMember(Value="structure")]      /**/ Structure = 1024
    }
}


text:
layout: post
status: publish
published: true
title: ThoughtWorks Xmas Party
author:
  display_name: Fabio Pereira
  login: admin
  email: fabiopereira.me@gmail.com
  url: http://fabiopereira.me
author_login: admin
author_email: fabiopereira.me@gmail.com
author_url: http://fabiopereira.me
wordpress_id: 59
wordpress_url: http://fabiopereira.me/blog/?p=59
date: '2008-12-15 23:55:42 +0'
date_gmt: '2008-12-16 06:55:42 +0'
categories:
- Personal
tags:
- ThoughtWorks
- Party
- Sydney
comments: []
---

On the last saturday, 13th of december, we celebrated ThoughtWorks Xmas in Sydney. It was a wonderful party. Pretty well organized. Congratulation!!!

The theme was Gangster and when we got to the party we were surprised with the fact that we would have chips to play poker, roulette and blackjack.

It was a glamourous night with wine, friends, gambling (fake money) and delicious food.

You can see all the photos here.

Do you want to see more photos?

My picasa

If you really liked the party and want to see other people's photos:

Bernarda Maia

Professional photographer

Alex


text:
using System;

namespace PipServices.Azure.Persistence
{
    public class CosmosDbAuthHelper
    {
        public static string GenerateMasterKeyAuthorizationSignature(string verb, string resourceId, string resourceType, string key, string keyType, string tokenVersion, string utcNow)
        {
            var hmacSha256 = new System.Security.Cryptography.HMACSHA256 { Key = Convert.FromBase64String(key) };

            string payLoad = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}\n{1}\n{2}\n{3}\n{4}\n",
                    verb.ToLowerInvariant(),
                    resourceType.ToLowerInvariant(),
                    resourceId,
                    utcNow.ToLowerInvariant(),
                    ""
            );

            var hashPayLoad = hmacSha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(payLoad));
            var signature = Convert.ToBase64String(hashPayLoad);

            return System.Web.HttpUtility.UrlEncode(string.Format(System.Globalization.CultureInfo.InvariantCulture, "type={0}&ver={1}&sig={2}",
                keyType,
                tokenVersion,
                signature));
        }
    }
}


text:
require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'json'
require 'socket'
require 'serverspec'
require 'sensu-plugin/check/cli'

class CheckServerspec < Sensu::Plugin::Check::CLI

  option :tests_dir,
    :short => '-d /tmp/dir',
    :long => '--tests-dir /tmp/dir',
    :required => true

  option :spec_tests,
    :short => '-t spec/test',
    :long => '--spec-tests spec/test',
    :default => nil

  option :handler,
    :short => '-l HANDLER',
    :long => '--handler HANDLER',
    :default => 'default'

  def sensu_client_socket(msg)
    u = UDPSocket.new
    u.send(msg + "\n", 0, '127.0.0.1', 3030)
  end

  def send_ok(check_name, msg)
    d = { 'name' => check_name, 'status' => 0, 'output' => 'OK: ' + msg, 'handler' => config[:handler] }
    sensu_client_socket d.to_json
  end

  def send_warning(check_name, msg)
    d = { 'name' => check_name, 'status' => 1, 'output' => 'WARNING: ' + msg, 'handler' => config[:handler] }
    sensu_client_socket d.to_json
  end

  def send_critical(check_name, msg)
    d = { 'name' => check_name, 'status' => 2, 'output' => 'CRITICAL: ' + msg, 'handler' => config[:handler] }
    sensu_client_socket d.to_json
  end

  def run
    serverspec_results = `cd #{config[:tests_dir]} ; ruby -S rspec #{config[:spec_tests]} --format json`
    parsed = JSON.parse(serverspec_results)

    parsed["examples"].each do |serverspec_test|
      test_name = serverspec_test["file_path"].split('/')[-1] + "_" + serverspec_test["line_number"].to_s
      output = serverspec_test["full_description"].gsub!(/\"/, '')

      if serverspec_test["status"] == "passed"
        send_ok(
          test_name,
          output
        )
      else
        send_warning(
          test_name,
          output
        )
      end

    end

    puts parsed["summary_line"]
    failures = parsed["summary_line"].split[2]
    if failures != '0'
      exit_with(
        :critical,
        parsed["summary_line"]
      )
    else
      exit_with(
        :ok,
        parsed["summary_line"]
      )
    end

  end

  def exit_with(sym, message)
    case sym
    when :ok
      ok message
    when :critical
      critical message
    else
      unknown message
    end
  end

end


text: Tiny benchmarking library for Python


text:
layout: post
title: CSS position, box-model
date: 2018-05-10 20:00:00
img: css.jpg
---
<iframe width="100%" height="600" src="/project/codespitz/css/box-model-and-position.html" frameborder="0" allowfullscreen></iframe>


text:
package com.prolificinteractive.materialcalendarview.format;

import android.support.annotation.NonNull;

import com.prolificinteractive.materialcalendarview.CalendarDay;

import java.text.SimpleDateFormat;

/**
 * Supply labels for a given day. Default implementation is to format using a {@linkplain SimpleDateFormat}
 */
public interface DayFormatter {

    /**
     * Format a given day into a string
     *
     * @param day the day
     * @return a label for the day
     */
    @NonNull String format(@NonNull CalendarDay day);

    /**
     * Default implementation used by {@linkplain com.prolificinteractive.materialcalendarview.MaterialCalendarView}
     */
    public static final DayFormatter DEFAULT = new DateFormatDayFormatter();
}


text:
import os
import logging

import pandas as pd
import numpy as np

import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches

class trading_env:
    def __init__(self, env_id, obs_data_len, step_len,
                 df, fee, max_position=5, deal_col_name='price',
                 feature_names=['price', 'volume'],
                 fluc_div=100.0, gameover_limit=5,
                 *args, **kwargs):
        """
        #assert df
        # need deal price as essential and specified the df format
        # obs_data_leng -> observation data length
        # step_len -> when call step rolling windows will + step_len
        # df -> dataframe that contain data for trading(format as...)
            # price
            # datetime
            # serial_number -> serial num of deal at each day recalculating

        # fee -> when each deal will pay the fee, set with your product
        # max_position -> the max market position for you trading share
        # deal_col_name -> the column name for cucalate reward used.
        # feature_names -> list contain the feature columns to use in trading status.
        # ?day trade option set as default if don't use this need modify
        """
        logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(message)s')
        self.logger = logging.getLogger(env_id)
        #self.file_loc_path = os.environ.get('FILEPATH', '')

        self.df = df
        self.action_space = np.array([3,])
        self.gym_actions = range(3)

        self.obs_len = obs_data_len
        self.feature_len = len(feature_names)
        self.observation_space = np.array([self.obs_len*self.feature_len,])
        self.using_feature = feature_names
        self.price_name = deal_col_name

        self.step_len = step_len
        self.fee = fee
        self.max_position = max_position

        self.fluc_div = fluc_div
        self.gameover = gameover_limit

        self.begin_fs = self.df[self.df['serial_number']==0]
        self.date_leng = len(self.begin_fs)

        self.render_on = 0
        self.buy_color, self.sell_color = (1, 2)
        self.new_rotation, self.cover_rotation = (1, 2)
        self.transaction_details = pd.DataFrame()
        self.logger.info('Making new env: {}'.format(env_id))

    def reset(self):
        self.gameover = None
        self.df_sample = self.df
        self.step_st = 0
        self.price = self.df_sample[self.price_name].as_matrix()
        self.obs_features = self.df_sample[self.using_feature].as_matrix()
        self.obs_res = self.obs_features[self.step_st: self.step_st+self.obs_len]

        #maybe make market position feature in final feature, set as option
        self.posi_l = [0]*self.obs_len
        # self.position_feature = np.array(self.posi_l[self.step_st:self.step_st+self.obs_len])/(self.max_position*2)+0.5

        self.reward_sum = 0
        self.reward_fluctuant = 0
        self.reward_ret = 0
        self.transaction_details = pd.DataFrame()
        self.reward_curve = []
        self.t_index = 0

        self.buy_color, self.sell_color = (1, 2)
        self.new_rotation, self.cover_rotation = (1, 2)
        return self.obs_res

    def step(self, action):
        #price_current can be change next one to some avg of next_N or simulate with slippage
        next_index = self.step_st+self.obs_len+1
        self.price_current = self.price[next_index]
        self.make_real = 0
        reward = 0.0
        if action == 1 and self.max_position > self.posi_l[-1] >= 0:
            self.buy_price = self.price_current
            if self.posi_l[-1] > 0:
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                abs_pos = abs(self.position_share)
                self.reward_fluctuant = self.price_current*self.position_share - self.transaction_details.iloc[-1]['price_mean']*self.position_share - self.fee*abs_pos
                self.price_mean = (self.transaction_details.iloc[-1]['price_mean']*self.position_share + self.buy_price)/(self.position_share+1.0)
                self.position_share += 1
            else:
                self.reward_fluctuant = 0.0
                self.position_share = 1.0
                self.price_mean = self.buy_price
            self.posi_l += ([self.posi_l[-1] + 1 ]*self.step_len)
            self.t_index += 1
            transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact': 'Buy',
                                       'transact_type': 'new',
                                       'price': self.buy_price, 'share': 1,
                                       'price_mean': self.price_mean, 'position': self.position_share,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward': reward, 'reward_sum': self.reward_sum,
                                       'color': self.buy_color, 'rotation': self.new_rotation}
             ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
            self.transaction_details = pd.concat([self.transaction_details,transact_n])

        elif action == 2 and -self.max_position < self.posi_l[-1] <= 0:
            self.sell_price = self.price_current
            if self.posi_l[-1] < 0:
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                abs_pos = abs(self.position_share)
                self.reward_fluctuant = self.price_current*self.position_share - self.transaction_details.iloc[-1]['price_mean']*self.position_share  - self.fee*abs_pos
                self.price_mean = (-self.transaction_details.iloc[-1]['price_mean']*self.position_share + self.sell_price)/-(self.position_share-1.0)
                self.position_share -= 1
            else:
                self.reward_fluctuant = 0.0
                self.position_share = -1.0
                self.price_mean = self.sell_price

            self.posi_l+=([self.posi_l[-1] - 1 ]*self.step_len)
            self.t_index += 1
            transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact': 'Sell',
                                       'transact_type': 'new',
                                       'price': self.sell_price, 'share':-1,
                                       'price_mean': self.price_mean, 'position': self.position_share,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward': reward, 'reward_sum': self.reward_sum,
                                       'color': self.sell_color,'rotation': self.new_rotation}
             ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
            self.transaction_details = pd.concat([self.transaction_details,transact_n])

        elif action == 1 and self.posi_l[-1]<0:
            self.buy_price = self.price_current

            self.position_share = self.transaction_details.iloc[-1].loc['position']
            abs_pos = abs(self.position_share)
            self.reward_fluctuant = self.price_current*self.position_share - self.transaction_details.iloc[-1]['price_mean']*self.position_share - self.fee*abs_pos
            self.position_share +=1

            reward = self.transaction_details.iloc[-1]['price_mean'] - self.buy_price - self.fee
            self.reward_sum += reward
            self.make_real = 1
            self.posi_l += ([self.posi_l[-1] + 1 ]*self.step_len)
            self.t_index += 1
            transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Buy',
                                       'transact_type':'cover',
                                       'price':self.buy_price,'share':1,
                                       'price_mean':self.price_mean, 'position':self.position_share,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.buy_color,'rotation':self.cover_rotation}
             ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
            self.transaction_details = pd.concat([self.transaction_details,transact_n])

        elif action == 2 and self.posi_l[-1]>0:
            self.sell_price = self.price_current

            self.position_share = self.transaction_details.iloc[-1].loc['position']
            abs_pos = abs(self.position_share)
            self.reward_fluctuant = self.price_current*self.position_share - self.transaction_details.iloc[-1]['price_mean']*self.position_share - self.fee*abs_pos
            self.position_share -=1

            reward = self.sell_price - self.transaction_details.iloc[-1]['price_mean'] - self.fee
            self.reward_sum += reward
            self.make_real = 1
            self.posi_l+=([self.posi_l[-1] - 1 ]*self.step_len)
            self.t_index +=1
            transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Sell',
                                       'transact_type':'cover',
                                       'price':self.sell_price,'share':-1,
                                       'price_mean':self.price_mean, 'position':self.position_share,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.sell_color,'rotation':self.cover_rotation}
             ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
            self.transaction_details = pd.concat([self.transaction_details,transact_n])

        elif action ==1 and self.posi_l[-1]==self.max_position:
            action = 0
        elif action == 2 and self.posi_l[-1]== -self.max_position:
            action = 0

        if action ==0:
            if self.posi_l[-1] != 0:
                self.posi_l+=([self.posi_l[-1]]*self.step_len)
                self.t_index +=1
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                abs_pos = abs(self.position_share)
                self.reward_fluctuant = self.price_current*self.position_share - self.transaction_details.iloc[-1]['price_mean']*self.position_share - self.fee*abs_pos
            else:
                self.posi_l+=([self.posi_l[-1]]*self.step_len)
                self.t_index +=1
                self.reward_fluctuant = 0.0

        self.reward_curve.append((self.step_st+self.obs_len, self.reward_fluctuant+self.reward_sum))

        self.step_st += self.step_len
        done = False
        if self.step_st+self.obs_len+self.step_len >= len(self.price):
            done = True
            if self.posi_l[-1] < 0:
                self.make_real = 1
                self.buy_price = self.price_current
                self.posi_l+=([0]*self.step_len)
                self.t_index += 1
                self.reward_fluctuant = 0.0
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                reward = (self.transaction_details.iloc[-1]['price_mean'] - self.buy_price - self.fee)*(-self.position_share)
                self.reward_sum +=reward
                transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Buy',
                                       'transact_type':'cover',
                                       'price':self.buy_price,'share':-self.position_share,
                                       'price_mean':self.price_mean, 'position':0,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.buy_color,'rotation':self.cover_rotation}
                ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
                self.transaction_details = pd.concat([self.transaction_details,transact_n])

            if self.posi_l[-1] > 0:
                self.make_real = 1
                self.sell_price = self.price_current
                self.posi_l+=([0]*self.step_len)
                self.t_index += 1
                self.reward_fluctuant = 0.0
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                reward = (self.sell_price - self.transaction_details.iloc[-1]['price_mean'] - self.fee)*self.position_share
                self.reward_sum +=reward
                transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Sell',
                                       'transact_type':'cover',
                                       'price':self.sell_price,'share':-self.position_share,
                                       'price_mean':self.price_mean, 'position':0,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.sell_color,'rotation':self.cover_rotation}
                ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
                self.transaction_details = pd.concat([self.transaction_details,transact_n])

        elif self.gameover and self.reward_sum+self.reward_fluctuant < -self.gameover:#3.5:
            done = True
            if self.posi_l[-1] < 0:
                self.make_real = 1
                self.buy_price = self.price_current
                self.posi_l+=([0]*self.step_len)
                self.t_index += 1
                self.reward_fluctuant = 0.0
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                reward = (self.transaction_details.iloc[-1]['price_mean'] - self.buy_price - self.fee)*(-self.position_share)
                self.reward_sum +=reward
                transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Buy',
                                       'transact_type':'cover',
                                       'price':self.buy_price,'share':-self.position_share,
                                       'price_mean':self.price_mean, 'position':0,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.buy_color,'rotation':self.cover_rotation}
                ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
                self.transaction_details = pd.concat([self.transaction_details,transact_n])

            if self.posi_l[-1] > 0:
                self.make_real = 1
                self.sell_price = self.price_current
                self.posi_l+=([0]*self.step_len)
                self.t_index += 1
                self.reward_fluctuant = 0.0
                self.position_share = self.transaction_details.iloc[-1].loc['position']
                reward = (self.sell_price - self.transaction_details.iloc[-1]['price_mean'] - self.fee)*self.position_share
                self.reward_sum +=reward
                transact_n = pd.DataFrame({'step': next_index,
                                       'datetime': self.df_sample.iloc[next_index].datetime,
                                       'transact':'Sell',
                                       'transact_type':'cover',
                                       'price':self.sell_price,'share':-self.position_share,
                                       'price_mean':self.price_mean, 'position':0,
                                       'reward_fluc': self.reward_fluctuant,
                                       'reward':reward,'reward_sum':self.reward_sum,
                                       'color':self.sell_color,'rotation':self.cover_rotation}
                ,index=[self.t_index],columns=['step','datetime','transact','transact_type','price','share','price_mean','position','reward_fluc',
                                            'reward','reward_sum','color','rotation'])
                self.transaction_details = pd.concat([self.transaction_details,transact_n])

        #self.logger.debug('Setp %d : make action %d'%(self.t_index,action))
        self.obs_res = self.obs_features[self.step_st: self.step_st+self.obs_len]

        # position feature
        #self.position_feature = np.array(self.posi_l[self.step_st:self.step_st+self.obs_len])/(self.max_position*2)+0.5
        #self.obs_res = np.array([self.price_feature,self.up_down_feature,self.ask_bid_feature,self.vol_feature,self.position_feature]).reshape(1,self.obs_len,self.feature_len)
        #self.obs_pv = np.concatenate([self.price_feature,self.up_down_feature,self.ask_bid_feature,self.vol_feature])
        self.reward_ret = 0.0
        if self.make_real == 0:
            self.reward_ret = self.reward_fluctuant/self.fluc_div
        elif self.make_real ==1:
            self.reward_ret = reward
        #if self.reward_ret < 0:
            #self.reward_ret = -0.005
        #self.obs_res = np.concatenate((self.obs_pv.reshape(self.obs_len*self.feature_len),self.position))#.astype(float)
        info = None
        return self.obs_res, self.reward_ret, done, info

    def render(self, save=False):
        if self.render_on == 0:
            matplotlib.style.use('dark_background')
            self.render_on = 1

            left, width = 0.1, 0.8
            rect1 = [left, 0.4, width, 0.55]
            rect2 = [left, 0.2, width, 0.2]
            rect3 = [left, 0.05, width, 0.15]

            self.fig = plt.figure(figsize=(15,8))
            self.fig.suptitle('%s'%self.df_sample['datetime'].iloc[0].date(), fontsize=14, fontweight='bold')
            #self.ax = self.fig.add_subplot(1,1,1)
            self.ax = self.fig.add_axes(rect1)  # left, bottom, width, height
            self.ax2 = self.fig.add_axes(rect2, sharex=self.ax)
            self.ax3 = self.fig.add_axes(rect3, sharex=self.ax)
            #fig, ax = plt.subplots()
            price_x = list(range(len(self.price[:self.step_st+self.obs_len])))
            self.price_plot = self.ax.plot(price_x, self.price[:self.step_st+self.obs_len], 'dodgerblue',zorder=1)
            self.vol_plot = self.ax3.plot(price_x, self.obs_features[:self.step_st+self.obs_len, 1], 'cyan')
            rect_high = self.price[self.step_st:self.step_st+self.obs_len].max() - self.price[self.step_st:self.step_st+self.obs_len].min()
            self.target_box = self.ax.add_patch(
                              patches.Rectangle(
                              (self.step_st, self.price[self.step_st:self.step_st+self.obs_len].min()),self.obs_len,rect_high,
                              label='observation',edgecolor=(1,1,1),facecolor=(0.95,1,0.1,0.8),linestyle=':',linewidth=2,
                              fill=True)
                              )     # remove background)
            self.fluc_reward_plot = self.ax2.fill_between([x[0] for x in self.reward_curve],0,[y[1] for y in self.reward_curve],facecolor='yellow',alpha=0.8)
            if len(self.transaction_details)!=0:
                self.reward_plot = self.ax2.fill_between(self.transaction_details.step,0,self.transaction_details.reward_sum,facecolor='cyan', alpha=0.5)
                self.share_plot = self.ax2.fill_between(self.transaction_details.step,0,self.transaction_details.position,facecolor='r', alpha=0.5)
                buy_record = self.transaction_details[self.transaction_details['transact']=='Buy']
                if len(buy_record)!=0:
                    trade_x = buy_record.step
                    trade_y = [self.price[i] for i in trade_x]
                    trade_color = [(1,0,0) if i =='new' else (1,0.7,0.7) for i in buy_record.transact_type]
                #trade_marker = ['v' if i =='Sell' else '^' for i in self.transaction_details.transact]
                    self.trade_plot = self.ax.scatter(x=trade_x,y=trade_y,s=100,marker='^',c=trade_color,edgecolors='none', zorder=2)
                sell_record = self.transaction_details[self.transaction_details['transact']=='Sell']
                if len(sell_record)!=0:
                    trade_x = sell_record.step
                    trade_y = [self.price[i] for i in trade_x]
                    trade_color = [(0,1,0) if i =='new' else (0.7,1,0.7) for i in sell_record.transact_type]
                    self.trade_plot = self.ax.scatter(x=trade_x,y=trade_y,s=100,marker='v',c=trade_color,edgecolors='none',zorder=2)

            self.ax.set_xlim(0,len(self.price[:self.step_st+self.obs_len])+200)
            plt.ion()
            #self.fig.tight_layout()
            plt.show()
            if save:
                self.fig.savefig('fig/%s.png' % str(self.t_index))
        elif self.render_on == 1:
            self.ax.lines.remove(self.price_plot[0])
            self.ax3.lines.remove(self.vol_plot[0])
            price_x = list(range(len(self.price[:self.step_st+self.obs_len])))
            self.price_plot = self.ax.plot(price_x, self.price[:self.step_st+self.obs_len], 'dodgerblue',zorder=1)
            self.vol_plot = self.ax3.plot(price_x, self.obs_features[:self.step_st+self.obs_len, 1], 'cyan')
            self.fluc_reward_plot.remove()
            self.target_box.remove()
            try:
                self.reward_plot.remove()
                self.share_plot.remove()
            except:
                pass
            self.fluc_reward_plot = self.ax2.fill_between([x[0] for x in self.reward_curve],0,[y[1] for y in self.reward_curve],facecolor='yellow',alpha=0.8)
            rect_high = self.price[self.step_st:self.step_st+self.obs_len].max() - self.price[self.step_st:self.step_st+self.obs_len].min()
            self.target_box = self.ax.add_patch(
                              patches.Rectangle(
                              (self.step_st, self.price[self.step_st:self.step_st+self.obs_len].min()),self.obs_len,rect_high,
                              label='observation',edgecolor=(1,1,1),facecolor=(0.95,1,0.1,0.75),linestyle=':',linewidth=2,
                              fill=True)
                              )

            if len(self.transaction_details)!=0:
                try:
                    self.trade_plot.remove()
                except:
                    pass
                self.reward_plot = self.ax2.fill_between(self.transaction_details.step,0,self.transaction_details.reward_sum,edgecolors='cyan',facecolor='cyan')
                self.share_plot = self.ax2.fill_between(self.transaction_details.step,0,self.transaction_details.position,facecolor='r', alpha=0.5)

                buy_record = self.transaction_details[self.transaction_details['transact']=='Buy']
                if len(buy_record)!=0:
                    trade_x = buy_record.step
                    trade_y = [self.price[i] for i in trade_x]
                    trade_color = [(0.8,0,0) if i =='new' else (1,0.7,0.7) for i in buy_record.transact_type]
                #trade_marker = ['v' if i =='Sell' else '^' for i in self.transaction_details.transact]
                    self.trade_plot = self.ax.scatter(x=trade_x,y=trade_y,s=100,marker='^',c=trade_color,edgecolors='none', zorder=2)
                sell_record = self.transaction_details[self.transaction_details['transact']=='Sell']
                if len(sell_record)!=0:
                    trade_x = sell_record.step
                    trade_y = [self.price[i] for i in trade_x]
                    trade_color = [(0,1,0) if i =='new' else (0.7,1,0.7) for i in sell_record.transact_type]
                    self.trade_plot = self.ax.scatter(x=trade_x,y=trade_y,s=100,marker='v',c=trade_color,edgecolors='none',zorder=2)
            self.ax.set_xlim(0,len(self.price[:self.step_st+self.obs_len])+200)
            if save:
                self.fig.savefig('fig/%s.png' % str(self.t_index))
            plt.pause(0.0001)

    def show_pattern(self, transact_index):
        record_index = self.transaction_details.loc[transact_index]['step']
        return self.df_sample.iloc[record_index-self.obs_len-1:record_index]

    def show_future(self, transact_index):
        record_index = self.transaction_details.loc[transact_index]['step']
        nextdf = self.df_sample.iloc[record_index:]
        next_sess_index = nextdf[nextdf['serial_number']==0].iloc[0].name
        return nextdf.loc[:next_sess_index]


text:
/* global describe, it, require */
'use strict';

// MODULES //

var // Expectation library:
	chai = require( 'chai' ),

	// Validate a value is NaN:
	isnan = require( 'validate.io-nan' ),

	// Module to be tested:
	skewness = require( './../lib/number.js' );

// VARIABLES //

var expect = chai.expect,
	assert = chai.assert;

// TESTS //

describe( 'number skewness', function tests() {

	it( 'should export a function', function test() {
		expect( skewness ).to.be.a( 'function' );
	});

	it( 'should compute the distribution skewness', function test() {
		assert.isTrue( isnan( skewness( 2 ) ) );
		assert.closeTo( skewness( 4  ), 0, 1e-5 );
		assert.closeTo( skewness( 8  ), 0, 1e-5 );
		assert.closeTo( skewness( 16  ), 0, 1e-5 );
	});

	it( 'should return `NaN` for invalid values of parameter v', function test() {
		assert.isTrue( isnan( skewness( -1 ) ) );
	});

});


text:
using JetBrains.Annotations;

namespace System.Threading
{
    public static class SynchronizationContextExtensions
    {
        public static void Send([NotNull] this SynchronizationContext context, [NotNull] Action action)
        {
            if (context == null) throw new ArgumentNullException(nameof(context));
            if (action == null) throw new ArgumentNullException(nameof(action));

            context.Send(_ => action(), null);
        }

        public static void Send<T>([NotNull] this SynchronizationContext context, [NotNull] Action<T> action, T state)
        {
            if (context == null) throw new ArgumentNullException(nameof(context));
            if (action == null) throw new ArgumentNullException(nameof(action));

            context.Send(_ => action(state), null);
        }

        public static void Post([NotNull] this SynchronizationContext context, [NotNull] Action action)
        {
            if (context == null) throw new ArgumentNullException(nameof(context));
            if (action == null) throw new ArgumentNullException(nameof(action));

            context.Post(_ => action(), null);
        }

        public static void Post<T>([NotNull] this SynchronizationContext context, [NotNull] Action<T> action, T state)
        {
            if (context == null) throw new ArgumentNullException(nameof(context));
            if (action == null) throw new ArgumentNullException(nameof(action));

            context.Post(_ => action(state), null);
        }
    }
}


text:
package sword.bitstream;

import java.io.Closeable;
import java.io.IOException;

/**
 * Set of methods to write serialized content.
 */
public interface OutputBitStream extends Closeable {

    /**
     * Write a boolean into the stream.
     *

     * This method assumes that a byte has 8 bits and that a boolean can be
     * represented with a single bit. In other words, its possible to include
     * 8 booleans in each byte. With this assumption, this method will only
     * write into the wrapped stream once every 8 calls, once it has the values
     * for each of the booleans composing a byte.
     *

     * Note that calling {@link #close()} in this class is required in order to
     * store all buffered booleans before closing the stream.
     *

     * This is a key method within the class and all other methods depends on it.
     *
     * @param value boolean to be encoded and written into the stream.
     * @throws IOException if it is unable to write into the stream.
     */
    void writeBoolean(boolean value) throws IOException;
}


text:
mkdir -p vis_dump
../mpegflow mpi_sintel_final_alley_1.avi | ../vis mpi_sintel_final_alley_1.avi vis_dump

# visualize motion vectors and occupancy info
mkdir -p vis_dump
../mpegflow --occupancy mpi_sintel_final_alley_1.avi | ../vis --occupancy mpi_sintel_final_alley.avi vis_dump


text:
Demo how to put up a website on GH Pages using GitHub Desktop Client for Codefirst:Girls
[Watch the corresponding YouTube video here](https://youtu.be/_88k5Y_2Mlw)


text:
set(COMPONENT_NAME oidn)

set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE})
if (INSTALL_IN_SEPARATE_DIRECTORIES)
  set(COMPONENT_PATH ${INSTALL_DIR_ABSOLUTE}/${COMPONENT_NAME})
endif()

if (BUILD_OIDN_FROM_SOURCE)
  ExternalProject_Add(${COMPONENT_NAME}
    PREFIX ${COMPONENT_NAME}
    DOWNLOAD_DIR ${COMPONENT_NAME}
    STAMP_DIR ${COMPONENT_NAME}/stamp
    SOURCE_DIR ${COMPONENT_NAME}/src
    BINARY_DIR ${COMPONENT_NAME}/build
    LIST_SEPARATOR | # Use the alternate list separator
    GIT_REPOSITORY "https://www.github.com/OpenImageDenoise/oidn.git"
    GIT_SHALLOW ON
    CMAKE_ARGS
      -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
      -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH}
      -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
      -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
      -DCMAKE_INSTALL_DOCDIR=${CMAKE_INSTALL_DOCDIR}
      -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
      $<$<BOOL:${DOWNLOAD_TBB}>:-DTBB_ROOT=${TBB_PATH}>
      $<$<BOOL:${DOWNLOAD_ISPC}>:-DISPC_EXECUTABLE=${ISPC_PATH}>
      -DCMAKE_BUILD_TYPE=${DEPENDENCIES_BUILD_TYPE}
      -DOIDN_APPS=OFF
    BUILD_COMMAND ${DEFAULT_BUILD_COMMAND}
    BUILD_ALWAYS ${ALWAYS_REBUILD}
  )

  if (DOWNLOAD_TBB)
    ExternalProject_Add_StepDependencies(${COMPONENT_NAME} configure tbb)
  endif()
  if (DOWNLOAD_ISPC)
    ExternalProject_Add_StepDependencies(${COMPONENT_NAME} configure ispc)
  endif()
else()
  string(REPLACE "v" "" OIDN_VERSION_NUMBER ${BUILD_OIDN_VERSION})

  if (APPLE)
    set(OIDN_URL "http://github.com/OpenImageDenoise/oidn/releases/download/${BUILD_OIDN_VERSION}/oidn-${OIDN_VERSION_NUMBER}.x86_64.macos.tar.gz")
  elseif (WIN32)
    set(OIDN_URL "http://github.com/OpenImageDenoise/oidn/releases/download/${BUILD_OIDN_VERSION}/oidn-${OIDN_VERSION_NUMBER}.x64.vc14.windows.zip")
  else()
    set(OIDN_URL "http://github.com/OpenImageDenoise/oidn/releases/download/${BUILD_OIDN_VERSION}/oidn-${OIDN_VERSION_NUMBER}.x86_64.linux.tar.gz")
  endif()

  ExternalProject_Add(${COMPONENT_NAME}
    PREFIX ${COMPONENT_NAME}
    DOWNLOAD_DIR ${COMPONENT_NAME}
    STAMP_DIR ${COMPONENT_NAME}/stamp
    SOURCE_DIR ${COMPONENT_NAME}/src
    BINARY_DIR ${COMPONENT_NAME}
    URL ${OIDN_URL}
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND "${CMAKE_COMMAND}" -E copy_directory
      <SOURCE_DIR>/
      ${COMPONENT_PATH}
    BUILD_ALWAYS OFF
  )
endif()

list(APPEND CMAKE_PREFIX_PATH ${COMPONENT_PATH})
string(REPLACE ";" "|" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}")


text:
package homebrew

import (
	"bytes"
	"errors"
	"github.com/watermint/toolbox/domain/github/api/gh_conn"
	"github.com/watermint/toolbox/domain/github/model/mo_commit"
	"github.com/watermint/toolbox/domain/github/service/sv_content"
	"github.com/watermint/toolbox/essentials/file/es_filehash"
	"github.com/watermint/toolbox/essentials/go/es_project"
	"github.com/watermint/toolbox/essentials/log/esl"
	"github.com/watermint/toolbox/essentials/model/mo_path"
	"github.com/watermint/toolbox/infra/app"
	"github.com/watermint/toolbox/infra/control/app_control"
	"github.com/watermint/toolbox/infra/control/app_resource"
	"github.com/watermint/toolbox/infra/recipe/rc_exec"
	"github.com/watermint/toolbox/infra/recipe/rc_recipe"
	"github.com/watermint/toolbox/infra/report/rp_model"
	"path/filepath"
	"text/template"
	"time"
)

var (
	ErrorNotAFile = errors.New("not a file")
)

type Formula struct {
	AssetPathLinuxArm     mo_path.ExistingFileSystemPath
	AssetPathLinuxIntel   mo_path.ExistingFileSystemPath
	AssetPathMacArm       mo_path.ExistingFileSystemPath
	AssetPathMacIntel     mo_path.ExistingFileSystemPath
	DownloadUrlLinuxArm   string
	DownloadUrlLinuxIntel string
	DownloadUrlMacArm     string
	DownloadUrlMacIntel   string
	Message               string
	Branch                string
	Owner                 string
	Repository            string
	FormulaName           string
	Peer                  gh_conn.ConnGithubRepo
	Commit                rp_model.RowReport
}

func (z *Formula) Preset() {
	z.Commit.SetModel(&mo_commit.Commit{})
}

func (z *Formula) makeFormula(c app_control.Control) (formula string, err error) {
	l := c.Log()
	h := es_filehash.NewHash(l)
	sha256LinuxIntel, err := h.SHA256(z.AssetPathLinuxIntel.Path())
	if err != nil {
		l.Debug("Unable to calculate SHA sum of the asset", esl.Error(err))
		return "", err
	}
	sha256LinuxArm, err := h.SHA256(z.AssetPathLinuxArm.Path())
	if err != nil {
		l.Debug("Unable to calculate SHA sum of the asset", esl.Error(err))
		return "", err
	}
	sha256MacIntel, err := h.SHA256(z.AssetPathMacIntel.Path())
	if err != nil {
		l.Debug("Unable to calculate SHA sum of the asset", esl.Error(err))
		return "", err
	}
	sha256MacArm, err := h.SHA256(z.AssetPathMacArm.Path())
	if err != nil {
		l.Debug("Unable to calculate SHA sum of the asset", esl.Error(err))
		return "", err
	}

	resBundle := app_resource.Bundle()
	formulaSrc, err := resBundle.Templates().Bytes("homebrew-toolbox.rb.tmpl")
	if err != nil {
		l.Debug("Unable to find a template resource", esl.Error(err))
		return "", err
	}

	formulaTmpl, err := template.New("formula").Parse(string(formulaSrc))
	if err != nil {
		l.Debug("Unable to parse", esl.Error(err))
		return "", err
	}

	var buf bytes.Buffer
	err = formulaTmpl.Execute(&buf, map[string]string{
		"Version":               app.BuildId,
		"DownloadUrlLinuxArm":   z.DownloadUrlLinuxArm,
		"DownloadUrlLinuxIntel": z.DownloadUrlLinuxIntel,
		"DownloadUrlMacArm":     z.DownloadUrlMacArm,
		"DownloadUrlMacIntel":   z.DownloadUrlMacIntel,
		"Sha256LinuxArm":        sha256LinuxArm,
		"Sha256LinuxIntel":      sha256LinuxIntel,
		"Sha256MacArm":          sha256MacArm,
		"Sha256MacIntel":        sha256MacIntel,
	})
	if err != nil {
		l.Debug("Unable to compile template", esl.Error(err))
		return "", err
	}
	return buf.String(), nil
}

func (z *Formula) getCurrentSha(c app_control.Control) (sha string, err error) {
	l := c.Log()
	svc := sv_content.New(z.Peer.Client(), z.Owner, z.Repository)
	opts := make([]sv_content.ContentOpt, 0)
	opts = append(opts, sv_content.Ref(z.Branch))

	cts, err := svc.Get(z.FormulaName, opts...)
	if err != nil {
		l.Debug("Unable to retrieve content metadata", esl.Error(err))
		return "", err
	}
	if f, ok := cts.File(); ok {
		l.Debug("Content metadata", esl.Any("file", f))
		return f.Sha, nil
	}
	l.Debug("not a file", esl.Any("cts", cts))
	return "", ErrorNotAFile
}

func (z *Formula) updateFormula(c app_control.Control, formula, sha string) error {
	l := c.Log()
	svc := sv_content.New(z.Peer.Client(), z.Owner, z.Repository)
	opts := make([]sv_content.ContentOpt, 0)
	opts = append(opts, sv_content.Branch(z.Branch))
	opts = append(opts, sv_content.Sha(sha))

	cts, commit, err := svc.Put(z.FormulaName, z.Message, formula, opts...)
	if err != nil {
		l.Debug("Unable to commit the change", esl.Error(err))
		return err
	}
	l.Debug("contents metadata", esl.Any("contents", cts))
	l.Debug("commit metadata", esl.Any("commit", commit))

	z.Commit.Row(commit)

	return nil
}

func (z *Formula) Exec(c app_control.Control) error {
	if err := z.Commit.Open(); err != nil {
		return err
	}

	formula, err := z.makeFormula(c)
	if err != nil {
		return err
	}

	sha, err := z.getCurrentSha(c)
	if err != nil {
		return err
	}

	return z.updateFormula(c, formula, sha)
}

func (z *Formula) Test(c app_control.Control) error {
	root, err := es_project.DetectRepositoryRoot()
	if err != nil {
		return err
	}

	return rc_exec.Exec(c, &Formula{}, func(r rc_recipe.Recipe) {
		m := r.(*Formula)
		m.AssetPathLinuxArm = mo_path.NewExistingFileSystemPath(filepath.Join(root, "SECURITY_AND_PRIVACY.md"))
		m.AssetPathLinuxIntel = mo_path.NewExistingFileSystemPath(filepath.Join(root, "README.md"))
		m.AssetPathMacArm = mo_path.NewExistingFileSystemPath(filepath.Join(root, "LICENSE.md"))
		m.AssetPathMacIntel = mo_path.NewExistingFileSystemPath(filepath.Join(root, "CONTRIBUTING.md"))
		m.DownloadUrlLinuxArm = "https://raw.githubusercontent.com/watermint/toolbox/master/SECURITY_AND_PRIVACY.md"
		m.DownloadUrlLinuxIntel = "https://raw.githubusercontent.com/watermint/toolbox/master/README.md"
		m.DownloadUrlMacArm = "https://raw.githubusercontent.com/watermint/toolbox/master/LICENSE.md"
		m.DownloadUrlMacIntel = "https://raw.githubusercontent.com/watermint/toolbox/master/CONTRIBUTING.md"
		m.Message = "Release:" + time.Now().Format(time.RFC3339)
		m.FormulaName = "toolbox.rb"
		m.Branch = "current"
		m.Owner = "watermint"
		m.Repository = "toolbox_sandbox"
	})
}


text:
class PrefRegistrySimple;

namespace enterprise {

// The name of the preference that stores the generated profile GUID.
extern const char kProfileGUIDPref[];

void RegisterIdentifiersProfilePrefs(PrefRegistrySimple* registry);

}  // namespace enterprise

#endif  // COMPONENTS_ENTERPRISE_BROWSER_IDENTIFIERS_IDENTIFIERS_PREFS_H_


text:
function UpdatePlotArea

    % Load handles from base workspace
    handles = evalin('base','handles');

    TempCurrent = sortrows(handles.Current,1);
    TempVoltage = sortrows(handles.Voltage,1);

    set(handles.GraphCurrent,...
        'XData',TempCurrent(:,1),...
        'YData',TempCurrent(:,3));
    set(handles.GraphVoltage,...
        'XData',TempVoltage(:,1),...
    	'YData',TempVoltage(:,3));
    set(handles.GraphNominalCurrent,...
        'XData',TempCurrent(:,1),...
        'YData',TempCurrent(:,2));
    set(handles.GraphNominalVoltage,...
        'XData',TempVoltage(:,1),...
        'YData',TempVoltage(:,2));

    [plotTicksCurrent] = GeneratePlotTicks(handles.minCurrentDivision,...
        reshape(handles.Current(:,2:3),2*handles.numTimePointsPlot,1));
    [plotTicksVoltage] = GeneratePlotTicks(handles.minVoltageDivision,...
        reshape(handles.Voltage(:,2:3),2*handles.numTimePointsPlot,1));

    % Modify axis limits
    set(handles.Axes(1),'XLim',[min(handles.Current(:,1)),handles.Current(handles.CurrTimePoint)]);
    set(handles.Axes(1),'YLim',[plotTicksCurrent(1),plotTicksCurrent(end)]);
    set(handles.Axes(1),'XTick',linspace(min(handles.Current(:,1)),handles.Current(handles.CurrTimePoint),10));
    set(handles.Axes(1),'YTick',plotTicksCurrent);
    set(handles.Axes(1),'YTickLabel',sprintf('%4.1f\n',plotTicksCurrent));

    set(handles.Axes(2),'XLim',[min(handles.Voltage(:,1)),handles.Voltage(handles.CurrTimePoint)]);
    set(handles.Axes(2),'YLim',[plotTicksVoltage(1),plotTicksVoltage(end)]);
    set(handles.Axes(2),'XTick',linspace(min(handles.Voltage(:,1)),handles.Voltage(handles.CurrTimePoint),10));
    set(handles.Axes(2),'YTick',plotTicksVoltage);
    set(handles.Axes(2),'YTickLabel',sprintf('%4.2f\n',plotTicksVoltage));

    datetick(handles.Axes(1),'x','MM:SS','keepticks');
    datetick(handles.Axes(2),'x','MM:SS','keepticks');

    % Update time point
    if(handles.CurrTimePoint < handles.numTimePoints)
        handles.CurrTimePoint = handles.CurrTimePoint + 1;
    elseif(handles.CurrTimePoint == handles.numTimePoints)
        handles.CurrTimePoint = 1;
    end

    % Save handles in base workspace
    assignin('base','handles',handles)

end


text:
<?xml version="1.0" encoding="utf-8"?>
<item xmlns="http://www.supermemo.net/2006/smux">
  <question>How to selector the first p element after a h2 element? <spellpad correct="h2+p" /></question>
  <answer>An adjacent selector will only match an element if it's adjacent to another specified element.

White spaces should be eschewed.

</answer>
  <modified>2011-01-29</modified>
  <template-id>1</template-id>
</item>


text:
package api

import ApiResponse._
import ApiError._
import models.ApiLog
import play.api.mvc.Results._
import play.api.mvc.{ Result, RequestHeader }
import play.api.libs.json._
import play.api.libs.json.Json._
import play.api.i18n.Lang

/*
* The result of an ApiRequest.
*/
trait ApiResult {
  val status: Int
  val json: JsValue
  val headers: Seq[(String, String)]

  /*
	* Saves into DB an ApiLog for this ApiResponse
	*/
  def saveLog[R <: RequestHeader](implicit request: ApiRequestHeader[R]): ApiResult = {
    ApiLog.insert(request, status, json)
    this
  }

  /*
	* Envelopes the resulting JSON in case the API client couldn't access to the headers
	*/
  def envelopedJson(implicit lang: Lang): JsValue = Json.obj(
    "data" -> json,
    "status" -> status,
    "headers" -> JsObject((headers ++ Api.basicHeaders).map(h => h._1 -> JsString(h._2)))
  )

  /*
	* Returns a Result with the ApiResult information.
	* If needed, it envelopes the resulting JSON in case the API client couldn't access to the headers
	*/
  def toResult[R <: RequestHeader](implicit request: R, lang: Lang): Result = {
    val envelope = request.getQueryString("envelope") == Some("true")
    toResult(envelope)
  }
  def toResult(envelope: Boolean = false)(implicit lang: Lang): Result = {
    val js = if (envelope) envelopedJson else json
    (status match {
      case STATUS_CREATED => if (js == JsNull) Created else Created(js)
      case STATUS_ACCEPTED => if (js == JsNull) Accepted else Accepted(js)
      case STATUS_NOCONTENT => NoContent
      case s if s < 300 => if (js == JsNull) Ok else Ok(js)

      case STATUS_BADREQUEST => BadRequest(js)
      case STATUS_UNAUTHORIZED => Unauthorized(js)
      case STATUS_FORBIDDEN => Forbidden(js)
      case STATUS_NOTFOUND => NotFound(js)
      case s if s > 400 && s < 500 => BadRequest(js)
      case _ => InternalServerError(js)
    }).withHeaders((headers ++ Api.basicHeaders): _*)
  }
}


text:
namespace sp { namespace graphics { namespace ui {

	class Widget;

	class Panel : public Layer2D
	{
	private:
		std::vector<Widget*> m_Widgets;
	public:
		Panel();
		~Panel();

		Widget* Add(Widget* widget);
		void Remove(Widget* widget);
		void Clear();

		void OnEvent(events::Event& e) override;
		bool OnMousePressedEvent(events::MousePressedEvent& e);
		bool OnMouseReleasedEvent(events::MouseReleasedEvent& e);
		bool OnMouseMovedEvent(events::MouseMovedEvent& e);

		void OnUpdate(const Timestep& ts) override;
		void OnRender(Renderer2D& renderer) override;

		inline const std::vector<Widget*>& GetWidgets() const { return m_Widgets; }
	};

} } }