7,
    #[doc = "< Branch displacement"]
    M68K_OP_BR_DISP = 8,
}
#[doc = " Instruction's operand referring to memory"]
#[doc = " This is associated with M68K_OP_MEM operand type above"]
#[repr(C)]
#[derive(Debug, Copy)]
pub struct m68k_op_mem {
    #[doc = "< base register (or M68K_REG_INVALID if irrelevant)"]
    pub base_reg: m68k_reg::Type,
    #[doc = "< index register (or M68K_REG_INVALID if irrelevant)"]
    pub index_reg: m68k_reg::Type,
    #[doc = "< indirect base register (or M68K_REG_INVALID if irrelevant)"]
    pub in_base_reg: m68k_reg::Type,
    #[doc = "< indirect displacement"]
    pub in_disp: u32,
    #[doc = "< other displacement"]
    pub out_disp: u32,
    #[doc = "< displacement value"]
    pub disp: i16,
    #[doc = "< scale for index register"]
    pub scale: u8,
    #[doc = "< set to true if the two values below should be used"]
    pub bitfield: u8,
    #[doc = "< used for bf* instructions"]
    pub width: u8,
    #[doc = "< used for bf* instructions"]
    pub offset: u8,
    #[doc = "< 0 = w, 1 = l"]
    pub index_size: u8,
}
impl Clone for m68k_op_mem {
    fn clone(&self) -> Self {
        *self
    }
}
#[repr(u32)]
#[doc = " Operand type for instruction's operands"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum m68k_op_br_disp_size {
    #[doc = "< = CS_OP_INVALID (Uninitialized)."]
    M68K_OP_BR_DISP_SIZE_INVALID = 0,
    #[doc = "< signed 8-bit displacement"]
    M68K_OP_BR_DISP_SIZE_BYTE = 1,
    #[doc = "< signed 16-bit displacement"]
    M68K_OP_BR_DISP_SIZE_WORD = 2,
    #[doc = "< signed 32-bit displacement"]
    M68K_OP_BR_DISP_SIZE_LONG = 4,
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct m68k_op_br_disp {
    #[doc = "< displacement value"]
    pub disp: i32,
    #[doc = "< Size from m68k_op_br_disp_size type above"]
    pub disp_size: u8,
}
impl Clone for m68k_op_br_disp {
    fn clone(&self) -> Self {
        *self
    }
}
#[doc = " Register pair in one operand."]
#[repr(C)]
#[derive(Debug, Copy)]
pub struct cs_m68k_op_reg_pair {
    pub reg_0: m68k_reg::Type,
    pub reg_1: m68k_reg::Type,
}
impl Clone for cs_m68k_op_reg_pair {
    fn clone(&self) -> Self {
        *self
    }
}
#[doc = " Instruction operand"]
#[repr(C)]
#[derive(Copy)]
pub struct cs_m68k_op {
    pub __bindgen_anon_1: cs_m68k_op__bindgen_ty_1,
    #[doc = "< data when operand is targeting memory"]
    pub mem: m68k_op_mem,
    #[doc = "< data when operand is a branch displacement"]
    pub br_disp: m68k_op_br_disp,
    #[doc = "< register bits for movem etc. (always in d0-d7, a0-a7, fp0 - fp7 order)"]
    pub register_bits: u32,


::
Divide(const R3Grid& voxels)
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == voxels.grid_resolution[0]);
  assert(grid_resolution[1] == voxels.grid_resolution[1]);
  assert(grid_resolution[2] == voxels.grid_resolution[2]);

  // Divide passed grid values by corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = voxels.grid_values[i];
    if (RNIsNotZero(value, 1.0E-20)) grid_values[i] /= value;
  }
}

void R3Grid::
Pow(RNScalar exponent)
{
  // Raise each grid value to exponent
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = *grid_valuep;
    if (value < 0) value = -value;
    *(grid_valuep++) = pow(value, exponent);
  }
}

void R3Grid::
Mask(const R3Grid& mask)
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == mask.grid_resolution[0]);
  assert(grid_resolution[1] == mask.grid_resolution[1]);
  assert(grid_resolution[2] == mask.grid_resolution[2]);

  // Set values to zero where mask is zero
  for (int i = 0; i < grid_size; i++)
    if (mask.grid_values[i] == 0) grid_values[i] = 0;
}

void R3Grid::
Threshold(RNScalar threshold, RNScalar low, RNScalar high)
{
  // Set grid value to low (high) if less/equal (greater) than threshold
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    if (*grid_valuep <= threshold) {
      if (low != R3_GRID_KEEP_VALUE) *grid_valuep = low;
    }
    else {
      if (high != R3_GRID_KEEP_VALUE) *grid_valuep = high;
    }
    grid_valuep++;
  }
}

void R3Grid::
Voronoi(R3Grid *squared_distance_grid)
{
  int dist;
  int* old_dist;
  int* new_dist;
  RNScalar value;
  RNScalar *old_value;
  RNScalar *new_value;
  R3Grid *dgrid;
  int res,square,tmp_dist,first;
  int x,y,z,s,t,i;

  // Allocate distance grid
  if (squared_distance_grid) dgrid = squared_distance_grid;
  else dgrid = new R3Grid(XResolution(), YResolution(), ZResolution());
  assert(dgrid);
  dgrid->SetWorldToGridTransformation(WorldToGridTransformation());

  // Allocate temporary buffers
  res = XResolution();
  if (res < YResolution()) res = YResolution();
  if (res < ZResolution()) res = ZResolution();
  old_dist = new int[res];
  new_dist = new int[res];
  old_value = new RNScalar[res];
  new_value = new RNScalar[res];
  assert(old_dist && new_dist && old_value && new_value);

  // Initalize distance grid values (0 if was set, max_value if not)
  RNScalar max_value = 3 * (res+1) * (res+1) * (res+1);
  for (i = 0; i < grid_size; i++) {
    if (grid_values[i] == 0.0) dgrid->grid_values[i] = max_value;
    else dgrid->grid_values[i] = 0.0;
  }

  // Scan along z axis
  for (x = 0; x < XResolution(); x


/**
 * @file
 * @brief Header file for a basic NPDU handler
 * @author Steve Karg <skarg@users.sourceforge.net>
 * @date October 2019
 * @copyright SPDX-License-Identifier: MIT
 */
#ifndef BACNET_BASIC_NPDU_HANDLER_H
#define BACNET_BASIC_NPDU_HANDLER_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
/* BACnet Stack defines - first */
#include "bacnet/bacdef.h"
/* BACnet Stack API */
#include "bacnet/apdu.h"
#include "bacnet/npdu.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

BACNET_STACK_EXPORT
void npdu_handler(BACNET_ADDRESS *src, uint8_t *pdu, uint16_t pdu_len);

BACNET_STACK_EXPORT
uint16_t npdu_network_number(void);
BACNET_STACK_EXPORT
void npdu_network_number_set(uint16_t net);
BACNET_STACK_EXPORT
int npdu_send_network_number_is(
    BACNET_ADDRESS *dst, uint16_t net, uint8_t status);
BACNET_STACK_EXPORT
int npdu_send_what_is_network_number(BACNET_ADDRESS *dst);

BACNET_STACK_EXPORT
void npdu_handler_cleanup(void);
BACNET_STACK_EXPORT
void npdu_handler_init(uint16_t bip_net, uint16_t mstp_net);
BACNET_STACK_EXPORT
void npdu_router_handler(
    uint16_t snet, BACNET_ADDRESS *src, uint8_t *pdu, uint16_t pdu_len);
BACNET_STACK_EXPORT
int npdu_router_send_pdu(
    uint16_t dnet,
    BACNET_ADDRESS *dest,
    BACNET_NPDU_DATA *npdu_data,
    uint8_t *pdu,
    unsigned int pdu_len);
BACNET_STACK_EXPORT
void npdu_router_get_my_address(uint16_t dnet, BACNET_ADDRESS *my_address);
BACNET_STACK_EXPORT
int npdu_send_reject_message_to_network(BACNET_ADDRESS *dst, uint16_t net);

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif


fa_coga_dpba`: 固定资产折旧、油气资产折耗、生产性生物资产折旧
- `amort_intang_assets`: 无形资产摊销
- `lt_amort_deferred_exp`: 长期待摊费用摊销
- `credit_impa_loss`: 信用减值损失
- `use_right_asset_dep`: 使用权资产折旧

### 金融行业特有科目
- `n_depos_incr_fi`: 客户存款和同业存放款项净增加额
- `n_incr_loans_cb`: 向中央银行借款净增加额
- `n_inc_borr_oth_fi`: 向其他金融机构拆入资金净增加额
- `n_incr_clt_loan_adv`: 客户贷款及垫款净增加额
- `ifc_cash_incr`: 收取利息和手续费净增加额

### 保险行业特有科目
- `prem_fr_orig_contr`: 收到原保险合同保费取得的现金
- `n_incr_insured_dep`: 保户储金净增加额
- `n_reinsur_prem`: 收到再保业务现金净额
- `c_pay_claims_orig_inco`: 支付原保险合同赔付款项的现金
- `pay_comm_insur_plcy`: 支付保单红利的现金

## 使用方法

### 1. 测试程序（推荐先运行）

```bash
cd /Users/henrylin/PycharmProjects/stock/tushare_pl/local
python cash_flow_test.py
```

这个程序会：
- 获取单个测试股票（300474.SZ）的现金流量表数据
- 显示详细的现金流量分析
- 计算现金流量比率和结构分析
- 验证API连接和数据格式

### 2. 批量获取程序

```bash
cd /Users/henrylin/PycharmProjects/stock/tushare_pl/local
python cash_flow.py
```

这个程序会：
- 从数据库获取所有股票代码
- 批量调用Tushare API获取现金流量表数据
- 自动创建数据表并存储数据
- 显示处理进度和统计信息

## 程序特性

### API频率控制
- 单次调用间隔：0.2秒
- 批次间隔：3.3秒
- 批次大小：50只股票

### 错误处理
- 自动跳过无数据的股票
- 记录处理失败的股票数量
- 显示详细的错误信息

### 数据完整性
- 使用 `INSERT IGNORE` 避免重复数据
- 自动处理NaN值
- 保持数据类型一致性

## 现金流量分析应用

### 现金流量质量分析

#### 经营现金流量质量
- **经营现金流量与净利润比率** = 经营活动现


// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
// RUN:        | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
// RUN:        | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN:        | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \
// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST

sel     {z0.h, z1.h}, pn8, {z0.h, z1.h}, {z0.h, z1.h}  // 11000001-01100000-10000000-00000000
// CHECK-INST: sel     { z0.h, z1.h }, pn8, { z0.h, z1.h }, { z0.h, z1.h }
// CHECK-ENCODING: [0x00,0x80,0x60,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c1608000 <unknown>

sel     {z20.h, z21.h}, pn13, {z10.h, z11.h}, {z20.h, z21.h}  // 11000001-01110100-10010101-01010100
// CHECK-INST: sel     { z20.h, z21.h }, pn13, { z10.h, z11.h }, { z20.h, z21.h }
// CHECK-ENCODING: [0x54,0x95,0x74,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c1749554 <unknown>

sel     {z22.h, z23.h}, pn11, {z12.h, z13.h}, {z8.h, z9.h}  // 11000001-01101000-10001101-10010110
// CHECK-INST: sel     { z22.h, z23.h }, pn11, { z12.h, z13.h }, { z8.h, z9.h }
// CHECK-ENCODING: [0x96,0x8d,0x68,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c1688d96 <unknown>

sel     {z30.h, z31.h}, pn15, {z30.h, z31.h}, {z30.h, z31.h}  // 11000001-01111110-10011111-11011110
// CHECK-INST: sel     { z30.h, z31.h }, pn15, { z30.h, z31.h }, { z30.h, z31.h }
// CHECK-ENCODING: [0xde,0x9f,0x7e,0xc1]
// CHECK-ERROR: instruction requires: sme2
// CHECK-UNKNOWN: c17e9fde <unknown>

sel


aseEntity;
	}

}
package com.ansteel.report.excel.core;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.poi.ss.usermodel.CreationHelper;
import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ansteel.report.poi.utils.Excel;
import com.ansteel.report.excel.domain.ExcelReportSQL;

/**
 * 创 建 人：gugu
 * 创建日期：2015-05-08
 * 修 改 人：
 * 修改日 期：
 * 描   述：excel报表生成工厂。
 */
public class ExcelReportFactory {

	public Excel getExcel(String tplPath,Map<ExcelReportSQL,List> mapExcel){
		Excel excel = ExcelMakeUtils.getExcel(tplPath);
		return getExcel(excel, mapExcel);
	}

	public Excel getExcel(Map<ExcelReportSQL,List> mapExcel){
		return getExcel(new Excel(), mapExcel);
	}

	public Excel getExcel(Excel excel,Map<ExcelReportSQL,List> mapExcel){
		SeriesExcel seriesExcel=null;
		//先执行固定列数据填充
		for(Entry<ExcelReportSQL,List> entry:mapExcel.entrySet()){
			List list = entry.getValue();
			if(list.size()>0){
				ExcelReportSQL excelReportSQL=entry.getKey();
				String sheetName = ExcelMakeUtils.getSheetName(excelReportSQL.getSheetName());
				Sheet sheet=excel.getSheet(sheetName);
				if(excelReportSQL.getIsSeries()!=null&&excelReportSQL.getIsSeries()==1){
					if(seriesExcel==null){
						seriesExcel = new SeriesExcel();
						seriesExcel.setExcelReportSQL(excelReportSQL);
						seriesExcel.setList(list);
						seriesExcel.setSheet(sheet);
						seriesExcel.setExcel(excel);
					}
				}
				ExcelMakeUtils.setFixedSQLData(sheet,excelReportSQL,list);
				ExcelMakeUtils.setHeader(sheet,excelReportSQL,list);
				ExcelMakeUtils.setFooter(sheet,excelReportSQL,list);
			}
		}

		if(seriesExcel==null){
			BaseExcelReport excelReport = new BaseExcelReport();
			Excel exc = excelReport.getExcel(excel, mapExcel);
			this.evaluateAll(exc);
			return exc;
		}else{
			SeriesExcelReport seriesExcelReport = new SeriesExcelReport();
			Excel exc =  seriesExcelReport.getExcel(seriesExcel);
			this.evaluateAll(exc);
			return exc;
		}

	}

	/**
	 * 执行公式
	 * @param exc
	 */
	private void evaluateAll(Excel exc) {
		try {
			CreationHelper helper = exc.getWorkbook().getCreationHelper();
			FormulaEvaluator evaluator = helper.createFormulaEvaluator();
			evaluator.evaluateAll();
		}catch (Exception e){

		}
	}
}
package com.ansteel.report.excelin.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.ansteel.core.constant.Constants;
import com.ansteel.core.domain.OperEntity;

/**
 * 创 建 人：gugu
 * 创建日期：2015-05-10
 * 修 改 人：
 * 修改日 期：
 * 描   述：Excel导入实体。
 */
@Entity
@Table(name = Constants.G_TABLE_PREFIX + "ExcelIn")
public class ExcelIn  extends OperEntity {

	/**
	 *
	 */
	private static final long serialVersionUID = 2497003398267524869L;

	@Column(length = 4000)
	private String recode;

	private String sheetName;

	@Column( columnDefinition = "int default 1")


��ිමාණ වෙබ් අඩවි කළමනාකරණය. වෙබ් අඩවි සංවර්ධනකරු සහ මාස්ටර් (සෙබලුන්): අන්තර්ජාලය කර්තෘ සම්පීඩිත ආධාරක යෙදවීම, සම්භාව්ය කවුළු අතුරු මුහුණත මෙහෙයුම, ආරම්භ කිරීම සඳහා සහ සත්කාරක SSH මිදෙන්නට පහසු, ftp විධානය සංකීර්ණ කම්මැලි මෙහෙයුම්.

පෞද්ගලික පෞද්ගලික Cloud (නවකයෙක්): කළමනාකරණ ජාල තැටි සම්පත්, එම සම්භාව්ය කවුළු අතුරු මුහුණත මෙහෙයුම, ඔබ සංගීතය සැරිසරන්නට ජාල ධාවකය තැබිය හැකි, තිරය ගොනු, උඩුගත හා ඉක්මන් හා පහසු බාගත.

</di


# -*- coding: utf-8 -*-
"""
Created on Mon May 19 23:05:56 2025

@author: jwang
"""

def isVowel(ch):
    if ch == 'A' or ch == 'E' or ch == 'I' or ch == 'O' or ch == 'U':
        return True

    if ch == 'a' or ch == 'e' or ch == 'i' or ch == 'o' or ch == 'u':
        return True

    return False

def reverseVowels(s):
    """
    :type s: str
    :rtype: str
    """
    char_s = list(s)

    low = 0
    high = len(s) - 1
    while(low < high):
        if isVowel(s[low]) == False:
            low += 1
            continue
        if isVowel(s[high]) == False:
            high -= 1
            continue

        temp = s[low]
        char_s[low] = char_s[high]
        char_s[high] = temp

        low += 1
        high -= 1

    result = ""
    for ch in char_s:
        result += ch
    return result

print(reverseVowels("IceCreAm"))
print(reverseVowels("leetcode"))


>
                <polygon id="Shape" fill="#505F79" points="115.419998 3.38000011 115.419998 16.0025883 118.138607 16.0025883 118.138607 6.37717659 119.284461 8.93223541 123.129421 16.0025883 126.547243 16.0025883 126.547243 3.38000011 123.828635 3.38000011 123.828635 11.5261178 122.799317 9.16282364 119.711599 3.38000011"></polygon>
                <rect id="Rectangle-path" fill="#505F79" x="95.1600037" y="3.38000011" width="2.97118165" height="12.6225882"></rect>
                <path d="M91.7338614,12.2688956 C91.7338614,10.0594838 90.5492415,9.02183676 87.2091891,8.31124853 C85.3643595,7.90771912 84.9177191,7.504425 84.9177191,6.92795441 C84.9177191,6.19854265 85.5779288,5.89054265 86.8013146,5.89054265 C88.2772734,5.89054265 89.7337303,6.332425 91.1124176,6.94724853 L91.1124176,4.04607206 C89.7904126,3.45076937 88.3506066,3.15540879 86.8983483,3.18160147 C83.5970618,3.18160147 81.8882696,4.60324853 81.8882696,6.92795441 C81.8882696,8.79148382 82.7620486,10.2710132 86.1798707,10.9241897 C88.2190056,11.3477191 88.6461442,11.6733662 88.6461442,12.3458368 C88.6461442,12.9990132 88.2180543,13.4218368 86.7818127,13.4218368 C85.0459337,13.3909586 83.3447595,12.935538 81.8300018,12.0961897 L81.8300018,15.1314838 C82.8593202,15.6310132 84.2185056,16.1881897 86.7430468,16.1881897 C90.3161704,16.1881897 91.7338614,14.6117191 91.7338614,12.2688956" id="Shape" fill="#505F79"></path>
                <polygon id="Shape" fill="#505F79" points="46.4399986 3.38000011 46.4399986 16.0025883 52.5469387 16.0025883 53.5084762 13.2743531 49.4304443 13.2743531 49.4304443 3.38000011"></polygon>
                <polygon id="Shape" fill="#505F79" points="34.3699989 3.38000011 34.3699989 6.10800011 37.6712854 6.10800011 37.6712854 16.0025883 40.6617311 16.0025883 40.6617311 6.10800011 44.1960888 6.10800011 44.1960888 3.38000011"></polygon>
                <path d="M30.0382061,3.38000011 L26.1190431,3.38000011 L21.6700001,16.0025883 L25.0676068,16.0025883 L25.6983259,13.876706 C27.2516873,14.3279669 28.9034214,14.3279669 30.4567828,13.876706 L31.0875019,16.0025883 L34.4858222,16.0025883 L30.0382061,3.38000011 Z M28.0785057,11.6004707 C27.525056,11.600439 26.974457,11.5220766 26.4434402,11.3677648 L28.0785057,5.85929423 L29.7135712,11.3696472 C29.1824


  /**
   * Create a tsfile that contains data from device_1 and device_2; device_1's chunkgroups and
   * device_2's chunkgroups are interleaved.
   *
   * <p>Below is the created tsfile's statistics in one case. Note that the absolute values may
   * change under different tsfile versions or hardware environments.
   *
   * <p>| space pos | device.chunkgroup | time range of this chunkgroup | | [12,290545] |
   * device_1.chunkgroup_1 | [0,131044] | | [290545,1042103] | device_2.chunkgroup_1 | [0,262088] |
   * | [1042103,1345041] | device_1.chunkgroup_2 | [131045,254915] | | [1345041,2110092] |
   * device_2.chunkgroup_2 | [262090,509830] | | [2110092,2421676] | device_1.chunkgroup_3 |
   * [254916,376146] | | [2421676,3194704] | device_2.chunkgroup_3 | [509832,752292] | |
   * [3194704,3256098] | device_1.chunkgroup_4 | [376147,399999] | | [3256098,3410323] |
   * device_2.chunkgroup_4 | [752294,799998] |
   */
  public void create4(String tsfilePath) throws Exception {
    TSFileDescriptor.getInstance().getConfig().setGroupSizeInByte(1024 * 1024);
    File f = new File(tsfilePath);
    if (f.exists()) {
      f.delete();
    }
    TsFileWriter tsFileWriter = new TsFileWriter(f);

    tsFileWriter.registerTimeseries(
        new Path("device_1"),
        new MeasurementSchema("sensor_1", TSDataType.INT32, TSEncoding.RLE));
    tsFileWriter.registerTimeseries(
        new Path("device_2"),
        new MeasurementSchema("sensor_1", TSDataType.INT32, TSEncoding.RLE));
    tsFileWriter.registerTimeseries(
        new Path("device_2"),
        new MeasurementSchema("sensor_2", TSDataType.FLOAT, TSEncoding.RLE));
    tsFileWriter.registerTimeseries(
        new Path("device_2"),
        new MeasurementSchema("sensor_3", TSDataType.BOOLEAN, TSEncoding.RLE));

    int j = 0;
    for (int i = 0; i < 400000; i++) {
      TSRecord tsRecord_d1 = new TSRecord(i, "device_1");
      DataPoint dPoint = new IntDataPoint("sensor_1", i);
      tsRecord_d1.addTuple(dPoint);
      tsFileWriter.write(tsRecord_d1);

      j = i * 2; // mimic devices at two different sample rates
      TSRecord tsRecord_d2 = new TSRecord(j, "device_2");
      DataPoint dPoint1 = new IntDataPoint("sensor_1", j);
      DataPoint dPoint2 = new FloatDataPoint("sensor_2", (float) j);
      DataPoint dPoint3 = new BooleanDataPoint("sensor_3", j % 2 == 0);
      tsRecord_d2.addTuple(dPoint1);
      tsRecord_d2.addTuple(dPoint2);
      tsRecord_d2.addTuple(dPoint3);
      tsFileWriter.write(tsRecord_d2);
    }

    tsFileWriter.close();
  }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.optaplanner.constraint.streams.bavet;

import java.util.Set;
import java.util.function.Function;

import org.optaplanner.constraint.streams.bavet.common.BavetAbstractConstraintStream;
import org.optaplanner.constraint.stre


ciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4OGQwZTM2MC00NjkzLTRkZTgtYTU5MS0xZTA1NTljYWQyN2UiLCJpZCI6NTUwODUsImlhdCI6MTYyMDM5NjQ3NH0.lu_JBwyngYucPsvbCZt-xzmzgfwEKwcRXiYs5uV8uTM';
var viewer = null;

export var initMap = function (cesiumContainer) {
  viewer = new Cesium.Viewer(cesiumContainer, {
    baseLayer: Cesium.ImageryLayer.fromProviderAsync(
      Cesium.ArcGisMapServerImageryProvider.fromUrl(
        'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
      ),
      {},
    ),
    baseLayerPicker: false,   //图层选择器
    animation: false,   //左下角仪表
    fullscreenButton: false,   //全屏按钮
    geocoder: false,   //右上角查询搜索
    infoBox: false,   //信息框
    homeButton: false,   //home按钮
    sceneModePicker: false,  //3d 2d选择器
    selectionIndicator: false,  //
    timeline: false,   //时间轴
    navigationHelpButton: false,  //右上角帮助按钮
  })

  viewer.camera.setView({//镜头的经纬度、高度。镜头默认情况下，在指定经纬高度俯视（pitch=-90）地球
    destination: Cesium.Cartesian3.fromDegrees(110.60396458865515, 34.54408834959379, 15000000),//北京15000公里上空
    orientation: {
      heading: Cesium.Math.toRadians(0),
      pitch: Cesium.Math.toRadians(-90),
      roll: Cesium.Math.toRadians(0),
    },
  });
  viewer._cesiumWidget._creditContainer.style.display = "none";
  viewer.scene.fog.density = 0.0001; // 雾气中水分含量
  viewer.scene.globe.enableLighting = false;
  viewer.scene.skyBox.show = false;
  //显示刷新率和帧率
  viewer.scene.debugShowFramesPerSecond = true;
  // 加载地形
  // viewer.scene.terrainProvider = Cesium.createWorldTerrainAsync()

  // 启用深度测试以确保地形正确渲染
  viewer.scene.globe.depthTestAgainstTerrain = true;
  if(Cesium.FeatureDetection.supportsImageRenderingPixelated()){//判断是否支持图像渲染像素化处理
    viewer.resolutionScale = window.devicePixelRatio;
  }
  //开启抗锯齿
  viewer.scene.fxaa = true;
  viewer.scene.postProcessStages.fxaa.enabled = true;
}

export var getViewer = function(){
  return viewer;
}import * as Cesium from 'cesium'

export default (function () {

	var getFullscreenQuad = function () {
		var fullscreenQuad = new Cesium.Geometry({
			attributes: new Cesium.GeometryAttributes({
				position: new Cesium.GeometryAttribute({
					componentDatatype: Cesium.ComponentDatatype.FLOAT,
					componentsPerAttribute: 3,
					//  v3----v2
					//  |     |
					//  |     |
					//  v0----v1
					values: new Float32Array([
						-1, -1, 0, // v0
						1, -1, 0, // v1
						1, 1, 0, // v2
						-1, 1, 0, // v3
					])
				}),
				st: new Cesium.GeometryAttribute({
					componentDatatype: Cesium.ComponentDatatype.FLOAT,
					componentsPerAttribute: 2,
					values: new Float32Array([
						0, 0,
						1, 0,
						1, 1,


'提示'}",
        style: TextStyle(
          color: Colors.black54,
        ),
      ),
      icon: _tipIconShow
          ? Icon(
              _tipIconData,
              size: 28.0,
              color: _tipIconColor,
            )
          : null,
      duration: Duration(seconds: (_tipSecondDuration <= 0 || _tipSecondDuration >= 11) ? 1 : _tipSecondDuration),
      borderRadius: _tipBorderRadius,
      margin: EdgeInsets.all(_tipMargin),
      awesomeMessagePosition: AwesomeMessagePosition.TOP,
      shouldIconPulse: _tipIconPulse,
      showProgressIndicator: _tipShowProgress,
      awesomeMessageStyle: _tipStyleValue,
      backgroundColor: _tipStyleBackgroundColor!,
      borderColor: _tipStyleBorderColor,
      progressIndicatorBackgroundColor: _tipIndicatorColor,
      leftBarIndicatorColor: _tipIndicatorShow ? _tipIndicatorColor : null,
    );
  }

  Widget _getStatusToggle() {
    return ToggleButtons(
      textStyle: TextStyle(
        fontSize: 20,
      ),
      borderWidth: 5,
      borderColor: Colors.grey,
      selectedBorderColor: Colors.blue,
      borderRadius: BorderRadius.circular(5),
      onPressed: (int index) {
        setState(() {
          for (int i = 0; i < _toggleSelected.length; i++) {
            if (i == index) {
              _tipStyleBackgroundColor = _tipStyleColors[index];
              _tipIndicatorColor = _tipIndicatorColors[index];
              _tipStyleBorderColor = _tipIndicatorColors[index];
              _tipIconColor = _tipIconColors[index];
              _tipIconData = _tipIconDatas[index];
              _toggleSelected[index] = !_toggleSelected[index];
            } else {
              _toggleSelected[i] = false;
            }
          }
        });
      },
      children: _toggleLabels.map((String label) {
        return Text("$label");
      }).toList(),
      isSelected: _toggleSelected,
    );
  }

  @override
  void initState() {
    super.initState();
    _editingControllerTitle = TextEditingController(text: "title");
    _editingControllerContent = TextEditingController(text: "content");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Tip msg"),
      ),
      body: SingleChildScrollView(
        child: Container(
          margin: EdgeInsets.all(10),
          child: Column(
            children: [
              AppCardOutlinedStyleWidget.defaultStyle(
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    ToggleButtons(
                      isSelected: _tipStyleSelected,
                      onPressed: (int index) {
                        for (int i = 0, size = _tipStyleSelected.length; i < size; i++) {
                          if (i == index) {
                            _tipStyleSelected[i] = !_tipStyleSelected[index];
                            _tipStyleValue = _tipStyleValues[index];
                          } else {
                            _tipStyleSelected[i] = false;
                          }
                        }
                        setState(() {});
                      },
                      children: <Widget>[
                        Row(
                          children: <Widget>[
                            Icon(Icons.info_outline),


        .map(res => ({
          ...res,
          seq: res.seq.map(([row, col]) => `${row}${col}`).join(''),
        }))
        .sort(({ seq: seqA }, { seq: seqB }) => seqA.localeCompare(seqB))
    )
    const results = lengths.map(i =>
      solve(matrix, targets, i).sort(({ seq: seqA }, { seq: seqB }) =>
        seqA.localeCompare(seqB)
      )
    )
    expect(results).toEqual(originalResults)
  })
})
export interface Config {
  debug: boolean;
  showEnvs: boolean;
  unfold: string[];
  postponeInvalidSolution: boolean;
  useBase: boolean;
  writeToBase: boolean;
}
export const config: Config = {
  debug: false,
  showEnvs: false,
  unfold: [],
  postponeInvalidSolution: false,
  useBase: false,
  writeToBase: false,
};
export const setConfig = (c: Partial<Config>) => {
  for (let k in c) (config as any)[k] = (c as any)[k];
};

export const log = (msg: () => any) => {
  if (config.debug) console.log(msg());
};
import BefungeFunction from '../types/BefungeFunction';
import getFromCodeAtPosition from '../helpers/getFromCodeAtPosition';

const functionModeChar: BefungeFunction = ( {
	stack, codeChars, posX, posY,
} ) => {
	const character = getFromCodeAtPosition( codeChars, posX, posY );
	return character === '"'
		? { isStringMode: false }
		: { stack: [ ...stack, character.charCodeAt( 0 ) ] };
};

export default functionModeChar;
import { BaseGenerator } from './BaseGenerator'
import { OperationWrapper } from './OperationWrapper'
import { ParameterObject } from 'openapi3-ts'
import { isSimpleType, isArrayType, isObjectType } from './utils'

import endsWith from 'lodash/endsWith'
import startsWith from 'lodash/startsWith'
import isVarName from 'is-var-name'

export class UrlGenerator extends BaseGenerator<OperationWrapper> {
  generatePathSegment(param: ParameterObject): string {
    if (param.style && param.style !== 'simple') {
      throw new TypeError(`Only "simple" path parameters are allowed ("${param.style}" found}!`)
    }
    const value = isVarName(param.name) ? `params.${param.name}` : `params['${param.name}']`
    if (!param.schema || isSimpleType(param.schema)) {
      return value
    } else if (isArrayType(param.schema)) {
      return `${value}.join(',')`
    } else if (isObjectType(param.schema)) {
      if (param.explode) {
        return `Object.keys(${value}).map((key) => \`\${key}=${value}[\${key}]\`).join(',')`
      } else {
        return `Object.keys(${value}).map((key) => \`\${key},${value}[\${key}]\`).join(',')`
      }
    } else if (isObjectType(param.schema) && !param.explode) {
    } else {
      throw new TypeError(`Can't create serializer for param "${param.name}"`)
    }
  }

  generateQuerySegment(param: ParameterObject): string {
    if (param.style && param.style !== 'form') {
      throw new TypeError(`Only "form" query parameters are allowed ("${param.style}" found}!`)
    }
    const key = param


/*  Part of SWI-Prolog

    Author:        Jan Wielemaker
    E-mail:        J.Wielemaker@vu.nl
    WWW:           http://www.swi-prolog.org
    Copyright (c)  2022, University of Amsterdam
                         VU University Amsterdam
		         CWI, Amsterdam
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in
       the documentation and/or other materials provided with the
       distribution.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef BF_GMP_TYPES_H_INCLUDED
#define BF_GMP_TYPES_H_INCLUDED

#include "libbf.h"
#include "mersenne-twister.h"

#define HAVE_MP_BITCNT_T 1

typedef bf_t MP_INT;
typedef bf_t mpz_t[1];
typedef bf_t mpq_t[2];			/* Numerator/Denumerator */
typedef bf_t mpf_t[1];
typedef limb_t mp_limb_t;
typedef limb_t mp_bitcnt_t;
typedef MTState gmp_randstate_t[1];

#endif /*BF_GMP_TYPES_H_INCLUDED*/


Image1D(target, level, xoffset, x, y, width);
    }

    // --- [ glCopyTexSubImage2D ] ---

    /**
     * Respecifies a rectangular subregion of an existing texel array. No change is made to the {@code internalformat}, {@code width}, {@code height},
     * or {@code border} parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See
     * {@link #glCopyTexImage2D CopyTexImage2D} for more details.
     *
     * @param target  the texture target. One of:

{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}	{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}	{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}	{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}

     * @param level   the level-of-detail number
     * @param xoffset the left texel coordinate of the texture subregion to update
     * @param yoffset the lower texel coordinate of the texture subregion to update
     * @param x       the left framebuffer pixel coordinate
     * @param y       the lower framebuffer pixel coordinate
     * @param width   the texture subregion width
     * @param height  the texture subregion height
     *
     * @see Reference Page
     */
    public static void glCopyTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) {
        GL11C.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
    }

    // --- [ glTexParameteri ] ---

    /**
     * Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment.
     *
     * @param target the texture target. One of:

{@link GL11C#GL_TEXTURE_1D TEXTURE_1D}	{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}	{@link GL12#GL_TEXTURE_3D TEXTURE_3D}	{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}

{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}	{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}	{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}	{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}

{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}	{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}

     * @param pname  the parameter to set. One of:

{@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}	{@link GL11C#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}	{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}	{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC


:new();
        {
            let (x, y) = self.p_to_xy(p);

            let has_left = x > 0;
            let has_right = x < self.width - 1;
            let has_top = y > 0;
            let has_bottom = y < self.height - 1;

            if has_left {
                affected.push((x - 1, y))
            }
            if has_right {
                affected.push((x + 1, y))
            }
            if has_top {
                affected.push((x, y - 1));
            }
            if has_bottom {
                affected.push((x, y + 1));
            }
            if has_top && has_left {
                affected.push((x - 1, y - 1))
            }
            if has_top && has_right {
                affected.push((x + 1, y - 1))
            }
            if has_bottom && has_left {
                affected.push((x - 1, y + 1))
            }
            if has_bottom && has_right {
                affected.push((x + 1, y + 1))
            }
        }

        for (x, y) in affected {
            self.incr(x, y);
            if self.get_e(x, y) == 10 {
                ret.push(self.xy_to_p((x, y)))
            }
        }

        ret
    }
}

pub fn part2(filename: &str) -> usize {
    let strings = crate::util::read_lines(filename);
    let mut b = read_board(strings, PART2_WITH_IMG_GEN);

    let mut step = 1;
    let mut prev_flash_cnt = 0;
    loop {
        b.step(&step);
        let flash_cnt = b.flash_cnt;
        if flash_cnt - prev_flash_cnt == b.width * b.height {
            return step
        }
        prev_flash_cnt = flash_cnt;
        step += 1
    }
}

use bmp::{Image, Pixel};

fn output(b: &Board, fname: String) {
    let f = 20; // magnifying factor

    let mut img = Image::new((b.width * f) as u32, (b.height * f) as u32);
    for x in 0..b.width {
        for y in 0..b.height {
            let mut e = b.get_e(x, y) as u8;
            if e > 9 {
                e = 255;
            } else {
                e *= 15;
            }
            for dx in 0..f {
                for dy in 0..f {
                    img.set_pixel((x * f + dx) as u32, (y * f + dy) as u32, Pixel::new(e, e, e));
                }
            }
        }
    }
    let _ = img.save(fname);
}
<reponame>peter-wilkins/sled
use std::{
    future::Future,
    pin::Pin,
    sync::Arc,
    task::{Context, Poll, Waker},
};

use parking_lot::{Condvar, Mutex};

use super::Result;

#[derive(Debug)]
struct OneShotState<T> {
    filled: bool,
    fused: bool,
    item: Option<T>,
    waker: Option<Waker>,
}

impl<T> Default for OneShotState<T> {
    fn default() -> OneShotState<T> {
        OneShotState { filled: false, fused: false, item: None, waker: None }
    }
}

/// A Future value which may or may not be filled
#[derive(Debug)]
pub struct OneShot<T> {
    mu: Arc<Mutex<OneShotState<T>>>,
    cv: Arc<Cond


try {
			Class.forName("org.apache.velocity.VelocityContext");
			VelocityRender.init(servletContext);
		}
		catch (ClassNotFoundException e) {
			// System.out.println("Velocity can not be supported!");
		}
	}

	private void initFileRender(ServletContext servletContext) {
		FileRender.init(getFileRenderPath(), servletContext);
	}

	private String getFileRenderPath() {
		String result = constants.getFileRenderPath();
		if (result == null) {
			result = PathUtil.getWebRootPath() + DEFAULT_FILE_RENDER_BASE_PATH;
		}
		if (!result.endsWith(File.separator) && !result.endsWith("/")) {
			result = result + File.separator;
		}
		return result;
	}

	/**
	 * Return Render by default ViewType which config in JFinalConfig
	 */
	public Render getRender(String view) {
		return mainRenderFactory.getRender(view);
	}

	public Render getFreeMarkerRender(String view) {
		return new FreeMarkerRender(view);
	}

	public Render getJspRender(String view) {
		return new JspRender(view);
	}

	public Render getVelocityRender(String view) {
		return new VelocityRender(view);
	}

	public Render getJsonRender() {
		return new JsonRender();
	}

	public Render getJsonRender(String key, Object value) {
		return new JsonRender(key, value);
	}

	public Render getJsonRender(String[] attrs) {
		return new JsonRender(attrs);
	}

	public Render getTextRender(String text) {
		return new TextRender(text);
	}

	public Render getTextRender(String text, String contentType) {
		return new TextRender(text, contentType);
	}

	public Render getDefaultRender(String view) {
		ViewType viewType = constants.getViewType();
		if (viewType == ViewType.FREE_MARKER) {
			return new FreeMarkerRender(view + constants.getFreeMarkerViewExtension());
		}
		else if (viewType == ViewType.JSP) {
			return new JspRender(view + constants.getJspViewExtension());
		}
		else if (viewType == ViewType.VELOCITY) {
			return new VelocityRender(view + constants.getVelocityViewExtension());
		}
		else {
			return mainRenderFactory.getRender(view + mainRenderFactory.getViewExtension());
		}
	}

	public Render getError404Render() {
		String error404View = constants.getError404View();
		return error404View != null ? new Error404Render(error404View) : new Error404Render();
	}

	public Render getError404Render(String view) {
		return new Error404Render(view);
	}

	public Render getError500Render() {
		String error500View = constants.getError500View();
		return error500View != null ? new Error500Render(error500View) : new Error500Render();
	}

	public Render getError500Render(String view) {
		return new Error500Render(view);
	}

	public Render getFileRender(String fileName) {
		return new FileRender(fileName);
	}

	public Render getFileRender(File file) {
		return new FileRender(file);
	}

	public Render getRedirectRender(String url) {
		return new RedirectRender(url);
	}

	public Render getRedirectRender(String url, boolean withOutQueryString) {
		return new RedirectRender(url, withOutQueryString);
	}

	public Render getRedirect301Render(String url) {
		return new Redirect301Render(url);
	}

	public Render getRedirect301Render(String url, boolean withOutQueryString) {
		return new Redirect301Render(url, withOutQueryString);
	}

	public Render getNullRender() {
		return NullRender.me();
	}

	public Render getJavascriptRender(String jsText) {
		return new JavascriptRender(jsText);
	}

	public Render getHtmlRender(String htmlText) {
		return new


html>

			<title>RPM Hex Calculator v0.1</title>
			<link rel="stylesheet" href="${scriptUri1}"/>
			<link rel="icon" type="image/x-icon" href="favicon.ico">

RPN Hex Calculator

v0.1

A simple Hex calculator that uses reverse polish notation.

Thanks for trying our app!

- "Thatname Group"

		`;
	}
}

function getNonce() {
	let text = '';
	const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
	for (let i = 0; i < 32; i++) {
		text += possible.charAt(Math.floor(Math.random() * possible.length));
	}
	return text;
}
import { IUser } from "../models";

// tslint:disable-next-line:no-inferrable-types
const apiPrefix: string = "/api/user";

export const getAll: () => Promise<IUser[]> = (): Promise<IUser[]> =>
    fetch(apiPrefix)
        .then((res: Response) => res.json() as Promise<IUser[]>)
        .then((list: IUser[]) => list.map((u: IUser) => ({ ...u, birthDate: new Date(u.birthDate) })));

export const get: (id: number) => Promise<IUser> = (id: number): Promise<IUser> =>
    fetch(`${apiPrefix}/${id}`)
        .then((res: Response) => res.json() as Promise<IUser>)
        .then((user: IUser) => ({ ...user, birthDate: new Date(user.birthDate) }));

export const add: (user: IUser) => Promise<IUser> = (user: IUser): Promise<IUser> => {
    const reqInit: RequestInit = {
        body: JSON.stringify(user),
        headers: {
            "Content-Type": "application/json",
        },
        method: "POST",
    } as RequestInit;

    return fetch(apiPrefix, reqInit).then((res: Response) => res.json() as Promise<IUser>);
};

export const update: (user: IUser) => Promise<Response> = (user: IUser): Promise<Response> => {
    const reqInit: RequestInit = {
        body: JSON.stringify(user),
        headers: {
            "Content-Type": "application/json",
        },
        method: "PATCH",
    } as RequestInit;

    return fetch(`${apiPrefix}/${user.id}`, reqInit);
};

export const deleteUser: (id: number) => Promise<Response> = (id: number): Promise<Response> => {
    const reqInit: RequestInit = {
        headers: {
            "Content-Type": "application/json",
        },
        method: "DELETE",
    } as RequestInit;

    return fetch(`${apiPrefix}/${id}`, reqInit);
};
// Note: class renamed to Department2 to prevent name conflicts with basics.js

abstract class Department2 {
  protected employees: string[] = []; // protected gives subclasses access to this property, but still protects it from being accessed anywhere else.
  static fiscalYear = 2022;

  constructor(protected readonly id: string, public name: string) {
    // console.log(this.fiscalYear) // Static properties aren't available on class instances
    // console.log(Department2.fiscalYear); // Fine


a);
    return 0;
}

int fs_cnt_rw(uint32_t head_sid, void *buf, uint32_t offset, uint32_t size, int is_read) {
    vdisk_t *vdisk;
    uint8_t *data;
    uint32_t loca_sid;

    vdisk = fs_get_vdisk(SID_DISK(head_sid));

    if (vdisk == NULL || !vdisk_is_sector_used(vdisk, head_sid)) {
        sys_warning("[cnt_rw] Invalid sector id");
        return 1;
    }

    // check if sector is cnt header
    data = vdisk_load_sector(vdisk, head_sid);

    if (data[0] != SF_HEAD) {
        sys_warning("[cnt_rw] Sector is not cnt header");
        vdisk_unload_sector(vdisk, head_sid, data, NO_SAVE);
        return 1;
    }

    // check if offset + size is valid
    if (offset + size > *((uint32_t *) (data + 1 + META_MAXLEN))) {
        sys_warning("[cnt_rw] cannot %s beyond cnt size (%d requested, %d max)",
                is_read ? "read" : "write",
                offset + size,
                *((uint32_t *) (data + 1 + META_MAXLEN))
        );
        vdisk_unload_sector(vdisk, head_sid, data, NO_SAVE);
        return 1;
    }

    // rw locator
    loca_sid = *((uint32_t *) (data + LAST_SID_OFFSET));
    if (loca_sid != 0) {
        if (fs_cnt_rw_loca(loca_sid, (uint8_t *) buf, offset, (int) size, is_read)) {
            vdisk_unload_sector(vdisk, head_sid, data, NO_SAVE);
            return 1;
        }
    } else {
        sys_warning("[cnt_rw] No locator found");
        return 1;
    }

    vdisk_unload_sector(vdisk, head_sid, data, NO_SAVE);
    return 0;
}

int fs_cnt_read(uint32_t head_sid, void *buf, uint32_t offset, uint32_t size) {
    return fs_cnt_rw(head_sid, buf, offset, size, 1);
}

int fs_cnt_write(uint32_t head_sid, void *buf, uint32_t offset, uint32_t size) {
    return fs_cnt_rw(head_sid, buf, offset, size, 0);
}


rs     ColorschemeColors
	cache      ColorCache
	cacheMutex sync.RWMutex
}

var FgColorschemeColorsMap = map[string]fcolor.Attribute{
	"black":   fcolor.FgBlack,
	"blue":    fcolor.FgBlue,
	"cyan":    fcolor.FgCyan,
	"green":   fcolor.FgGreen,
	"magenta": fcolor.FgMagenta,
	"red":     fcolor.FgRed,
	"white":   fcolor.FgWhite,
	"yellow":  fcolor.FgYellow,
}

var BgColorschemeColorsMap = map[string]fcolor.Attribute{
	"black":   fcolor.BgBlack,
	"blue":    fcolor.BgBlue,
	"cyan":    fcolor.BgCyan,
	"green":   fcolor.BgGreen,
	"magenta": fcolor.BgMagenta,
	"red":     fcolor.BgRed,
	"white":   fcolor.BgWhite,
	"yellow":  fcolor.BgYellow,
}

// See more: vendor/github.com/mattn/go-colorable/colorable_windows.go:905
// any new color for the below mapping should be compatible with this above list

// TcellColorschemeColorsMap map colorscheme names to tcell colors
var TcellColorschemeColorsMap = map[string]tcell.Color{
	"black":   tcell.ColorBlack,
	"blue":    tcell.ColorNavy,
	"cyan":    tcell.ColorTeal,
	"green":   tcell.ColorGreen,
	"magenta": tcell.ColorPurple,
	"red":     tcell.ColorMaroon,
	"white":   tcell.ColorSilver,
	"yellow":  tcell.ColorOlive,
}

// NewColorscheme ...
func NewColorscheme(colors ColorschemeColors) *Colorscheme {
	// Build lookup table for defined values, then replace references to these
	const prefix = "define_"
	const reference = "$"
	defines := ColorschemeColors{}
	for k, v := range colors {
		if strings.HasPrefix(k, prefix) {
			defines[k[len(prefix):]] = v
		}
	}
	for k, v := range colors {
		if vs, ok := v.(string); ok {
			if strings.HasPrefix(vs, reference) {
				colors[k] = defines[vs[len(reference):]]
			}
		}
	}

	return &Colorscheme{
		colors:     colors,
		cache:      make(ColorCache),
		cacheMutex: sync.RWMutex{},
	}
}

func (c *Colorscheme) BaseStyle() tcell.Style {
	return c.Style("base")
}

// Chart ...
func (c *Colorscheme) Chart(a ...interface{}) string {
	return c.Color("chart", a...)
}

// Marketbar ...
func (c *Colorscheme) Marketbar(a ...interface{}) string {
	return c.Color("marketbar", a...)
}

// MarketbarSprintf ...
func (c *Colorscheme) MarketbarSprintf() ISprintf {
	return c.ToSprintf("marketbar")
}

// MarketbarChangeSprintf ...
func (c *Colorscheme) MarketbarChangeSprintf() ISprintf {
	// NOTE: reusing table styles
	return c.ToSprintf("table_column_change")
}

// MarketbarChangeDownSprintf ...
func (c *Colorscheme) MarketbarChangeDownSprintf() ISprintf {
	// NOTE: reusing table styles
	return c.ToSprintf("table_column_change_down")
}

// MarketbarChangeUpSprintf ...
func (c *Colorscheme) MarketbarChangeUpSprintf() ISprintf {
	// NOTE: reusing table styles
	return c.ToSprintf("table_column_change_up")
}

// MarketBarLabelActive ...
func (c *Colorscheme) MarketBarLabelActive(a ...interface{}) string {
	return c.Color("marketbar_label_active", a...)
}

// Menu ...
func (c *Colorscheme) Menu(a ...interface{}) string {
	return c.Color("menu", a...)
}

// MenuHeader ...
func (


ublic static void SetData(this UIGMComponent self, params object[] args)
        {
	        var all = GMConfigCategory.Instance.GetAll();
	        self.allList.SetData(all.Values.ToArray());
	        self.allList.SetSelectIndex(0);

	        var ss = PlayerPrefsHelper.Get(PlayerPrefsKey.GMCommon);
	        self.CommonUseList.AddRange(ss);
	        self.commonList.SetData(self.CommonUseList);
        }

        public static void OnRemove(this UIGMComponent self)
        {

        }

	}
}


,31),
							session.createQuery("select local date 1991-1-1 - 1 day")
									.getSingleResult() );
				}
		);
	}

	@Test
	@JiraKey("HHH-17074")
	@SkipForDialect(dialectClass = InformixDialect.class,
			reason = "Bad use of aggregate in this context")
	public void testDurationArithmeticWithParameters(SessionFactoryScope scope) {
		scope.inTransaction(
				session -> {
					assertEquals(
							1,
							session.createQuery( "from EntityOfBasics e where (:date - e.theTimestamp) by day > 1" )
									.setParameter( "date", Timestamp.valueOf( "2022-01-01 00:00:00" ) )
									.getResultList()
									.size()
					);
				}
		);
	}

	@Test
	public void testIntervalDiffExpressions(SessionFactoryScope scope) {
		scope.inTransaction(
				session -> {
					session.createQuery("select (e.theDate - e.theDate) by year from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theDate - e.theDate) by month from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theDate - e.theDate) by day from EntityOfBasics e", Long.class)
							.list();

					//TODO
//					session.createQuery("select (e.theDate - e.theDate) by week from EntityOfBasics e", Long.class)
//							.list();

					session.createQuery("select (e.theTimestamp - e.theTimestamp) by hour from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - e.theTimestamp) by minute from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - e.theTimestamp) by second from EntityOfBasics e", Long.class)
							.list();

					session.createQuery("select (e.theTimestamp - e.theTimestamp + 4 day) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - (e.theTimestamp + 4 day)) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp + 4 day - e.theTimestamp) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp + 4 day - 2 hour - e.theTimestamp) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - e.theTimestamp + 4 day + 2 hour) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - (e.theTimestamp + 4 day + 2 hour)) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp + (4 day - 1 week) - e.theTimestamp) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - e.theTimestamp + (4 day + 2 hour)) by second from EntityOfBasics e", Long.class)
							.list();
					session.createQuery("select (e.theTimestamp - (e.theTimestamp + (4 day + 2 hour))) by second from EntityOfBasics e", Long.class)
							.list();
				}
		);
	}

	@Test
	@SkipForDialect(dialectClass = PostgresPlusDialect.class,
			reason = "PT47H59M59.999999S instead of PT48H")
	public void testIntervalDiffExpressionsWithAssertions(SessionFactoryScope scope) {
		scope.inTransaction(
				session -> {
					assertThat( session.createQuery("select (local datetime + 2 day) - local datetime").getSingleResult(),
							is( Duration.ofDays( 2 ) ) );
					ass


v1.x * v2.x + v1.y * v2.y + v1.z * v2.z);
    }

    static void PrintV(HalfVector3 const& vect, bool nl = true) {
        std::cout << "(" << (float)vect.x << "," << (float)vect.y << "," << (float)vect.z << ")";
        if (nl) { std::cout << std::endl; }
    }
    static HalfVector3 MinVector(HalfVector3 vect1, HalfVector3 const& vect2) {
        vect1.x = myMin(vect1.x, vect2.x);
        vect1.y = myMin(vect1.y, vect2.y);
        vect1.z = myMin(vect1.z, vect2.z);
        return vect1;
    }
    static HalfVector3 MaxVector(HalfVector3 vect1, HalfVector3 const& vect2) {
        vect1.x = myMax(vect1.x, vect2.x);
        vect1.y = myMax(vect1.y, vect2.y);
        vect1.z = myMax(vect1.z, vect2.z);
        return vect1;
    }
};

const HalfVector3 HalfVector3::m_nullVector = HalfVector3();#pragma once
#include "RayMarching.cuh"
#include "..\Application\MyApplication.hpp"

#define RAY_PERPIXEL 10

__global__ void SendRay(GraphicObject** pp_objectsRendered, int numOfObjRendered, uint32 screenWidth, void* p_screenMemory, Quaternion cameraPosition, Quaternion xIncrement, Quaternion yIncrement, Quaternion startingPoint, float frameRNGCoefficent, int maxThreadId);

class Camera {

	// ATTRIBUTES
public:
	Quaternion m_position;
	Matrix_4x4 m_rotation;
	float m_nearPlaneDist;

	// CONSTRUCTORS
public:
	Camera(Quaternion position, float nearPlaneDist = 1) : m_position{ position }, m_rotation{}, m_nearPlaneDist{ nearPlaneDist } {

	}

	// METHODS
public:
	void Move(Quaternion const& step) {
		m_position += step;
	}
	void Render(ScreenBuffer& screen) {

	}
	void Render_GPU(ScreenBuffer& screen, bool marching = false) {
		//Check if the buffer is valid
		if (!screen.m_buffer.m_gpuAllocated) {
			std::cout << "[ERROR]: GPU render called on a CPU-allocated buffer\n"; return;
		}

		//Generate the rays:
		//Ill rotate the nearPlane and for each fragment on the plane ill generate the ray's direction
		//The nearPlane will always be ((-1,1,1),(1,1,1),(-1,-1,1),(1,-1,1)), rotated by the current camera rotation

		//Compute the nearplane position
		const Quaternion nearPlane_bottomLeftPoint = Quaternion(-1, -1, 1, 0);
		const Quaternion nearPlane_bottomRightPoint = Quaternion(1, -1, 1, 0);
		const Quaternion nearPlane_topLeftPoint = Quaternion(-1, 1, 1, 0);
		const Quaternion nearPlane_topRigthPoint = Quaternion(1, 1, 1, 0);
		const Scene* currentScene = Scene::GetCurrentScene();

		//Ill save the x,y,z increment not to compute them every time
		const Quaternion xIncrement = Quaternion(
			(nearPlane_topRigthPoint.r - nearPlane_topLeftPoint.r) / screen.m_width,
			(nearPlane_topRigthPoint.i - nearPlane_topLeftPoint.i) / screen.m_width,
			(nearPlane_topRigthPoint.j - nearPlane_topLeftPoint.j) / screen.m_width,
			(nearPlane_topRigthPoint.k - nearPlane_topLeftPoint.k) / screen


local mot = {};
mot.servos = {
    1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,
};
mot.keyframes = {
   {  --Straight out limbs.
     angles = vector.new({
         0, -30,
         -97.8,   13,   1.8,  -2.1,
          3.1,   0.4,  -6.7,  13.1, 64.1,   4.2,
         3.1,  -2.6,  -7.8,  16.4,  64.6,   4.6,
         -96.1,  17.7,  19.8, -11.3,
     })*math.pi/180,
     duration = 0.200;
   },
   {  --Bend in knees, rotate wrists
     angles = vector.new({
         0, -30,
         -97.7, 14.9,   1.6,  -1.2,
          -4.8,  -1.8, -31.9,    84,  41.9,    -4,
         -4.8,  -1.1, -36.4,  92.7,  37.5,  -2.5,
         -96.2,  17.1,  20.2, -11.2,
     })*math.pi/180,
     duration = 0.200;
   },
   {  --Pull in arms under tailbone
     angles = vector.new({
         0, -30.3,
         -122.3, 70.3,   9.1, -90,
         1,   7.9,  21.9,  96.9,  -3.2,   1.1,
         1,    -7,  25.4, 102.7,   -12,   1.2,
         -121.3,  69.7,   9.1,   -90,
     })*math.pi/180,
     duration = 0.200;
   },
    { --Re-extend legs, rotate body up
      angles = vector.new({
         -0.4, -30.3,
         -123.6,    8,   9,   -90,
          -0.2,   8.3,  19.1, 102.1, -5.2,  -0.7,
         -0.2,  -6.5,  24.4, 107.2, -15.3,   1.4,
         -120.9,  12.3,   6.9, -85.3,
     })*math.pi/180,
--     duration = 0.200;

     duration = 0.200;

    },
    { --Spread stance, rotate forearms down, bend knees
      angles = vector.new({
             0, -30,
             -117.2,  3.7,  -1.9, -70.9,
          6,  -2.5,    24,   7.9,64.7,   4.7,
         6,  -0.1,  25.7,   7.1,  64.9,   4.9,
         -122.9,  11.4,  -6.5, -77.1,
     })*math.pi/180,
--     duration = 0.200;
     duration = 0.200;
    },
   {  --Plant feet
      angles = vector.new({
         0, -30,
         -116.5,  9.4,  -0.8, -78.9,
         3,  -3.5,  -6.1,    -7,  63.9,   4.3,
         3,     4,  -4.8,  -6.9,  64.3,   4.5,
         -112.5,  11.3,   7.8, -78.4,
     })*math.pi/180,
     duration = 0.100;
    },
   {  --Left leg pull in
      an


DURATION) {
          this.invertTimer = 0;
          this.invertTrigger = false;
          this.invert(false);
        } else if (this.invertTimer) {
          this.invertTimer += deltaTime;
        } else {
          const actualDistance =
              this.distanceMeter.getActualDistance(Math.ceil(this.distanceRan));

          if (actualDistance > 0) {
            this.invertTrigger =
                !(actualDistance % this.config.INVERT_DISTANCE);

            if (this.invertTrigger && this.invertTimer === 0) {
              this.invertTimer += deltaTime;
              this.invert(false);
            }
          }
        }
      }
    }

    if (this.playing || (!this.activated &&
        this.tRex.blinkCount < Runner.config.MAX_BLINK_COUNT)) {
      this.tRex.update(deltaTime);
      this.scheduleNextUpdate();
    }
  },

  /**
   * Event handler.
   * @param {Event} e
   */
  handleEvent(e) {
    return (function(evtType, events) {
      switch (evtType) {
        case events.KEYDOWN:
        case events.TOUCHSTART:
        case events.POINTERDOWN:
          this.onKeyDown(e);
          break;
        case events.KEYUP:
        case events.TOUCHEND:
        case events.POINTERUP:
          this.onKeyUp(e);
          break;
        case events.GAMEPADCONNECTED:
          this.onGamepadConnected(e);
          break;
      }
    }.bind(this))(e.type, Runner.events);
  },

  /**
   * Initialize audio cues if activated by focus on the canvas element.
   * @param {Event} e
   */
  handleCanvasKeyPress(e) {
    if (!this.activated && !Runner.audioCues) {
      this.toggleSpeed();
      Runner.audioCues = true;
      this.generatedSoundFx.init();
      Runner.generatedSoundFx = this.generatedSoundFx;
      Runner.config.CLEAR_TIME *= 1.2;
    } else if (e.keyCode && Runner.keycodes.JUMP[e.keyCode]) {
      this.onKeyDown(e);
    }
  },

  /**
   * Prevent space key press from scrolling.
   * @param {Event} e
   */
  preventScrolling(e) {
    if (e.keyCode === 32) {
      e.preventDefault();
    }
  },

  /**
   * Toggle speed setting if toggle is shown.
   */
  toggleSpeed() {
    if (Runner.audioCues) {
      const speedChange = Runner.slowDown != this.slowSpeedCheckbox.checked;

      if (speedChange) {
        Runner.slowDown = this.slowSpeedCheckbox.checked;
        const updatedConfig =
            Runner.slowDown ? Runner.slowConfig : Runner.normalConfig;

        Runner.config = Object.assign(Runner.config, updatedConfig);
        this.currentSpeed = updatedConfig.SPEED;
        this.tRex.enableSlowConfig();
        this.horizon.adjustObstacleSpeed();
      }
      if (this.playing) {
        this.disableSpeedToggle(true);
      }
    }
  },

  /**
   * Show the speed toggle.
   * From focus event or when audio cues are activated.
   * @param {Event=} e
   */
  showSpeedToggle(e) {
    const isFocusEvent = e && e.type == 'focus';
    if (Runner.audioCues || isFocusEvent) {
      this.slowSpeedCheckboxLabel.classList.toggle(
          HIDDEN_CLASS, isFocusEvent ? false : !this.crashed);
    }
  },

  /**
   * Disable the speed toggle.
   * @param {boolean} disable
   */
  disableSpeedToggle(disable) {
    if (disable) {
      this.slowSpeedCheckbox.setAttribute('disabled', 'disabled');
    } else {
      this.slowSpeedCheckbox.removeAttribute('disabled');
    }
  },

  /**
   *


ButtonPressed@ {
    -moz-image-region: rect(36px, 648px, 72px, 612px);
  }

  #new-window-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 684px, 72px, 648px);
  }

  #e10s-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 684px, 72px, 648px);
  }

  #e10s-button > .toolbarbutton-icon {
    transform: scaleY(-1);
  }

  #webide-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 1476px, 72px, 1440px);
  }

  #pocket-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 1548px, 72px, 1512px);
  }

  #new-tab-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 720px, 72px, 684px);
  }

  #privatebrowsing-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 756px, 72px, 720px);
  }

  #find-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 792px, 72px, 756px);
  }

  #print-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 828px, 72px, 792px);
  }

  #restore-button:hover:active:not([disabled="true"]),
  #fullscreen-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 864px, 72px, 828px);
  }

  #fullscreen-button[cui-areatype="toolbar"][checked="true"] {
    -moz-image-region: rect(72px, 864px, 108px, 828px);
  }

  #fullscreen-button@toolbarButtonPressed@[checked="true"] {
    -moz-image-region: rect(108px, 864px, 144px, 828px);
  }

  #developer-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 900px, 72px, 864px);
  }

  #preferences-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 936px, 72px, 900px);
  }

  #PanelUI-menu-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 972px, 72px, 936px);
  }

  #edit-controls[cui-areatype="toolbar"] > #cut-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1008px, 72px, 972px);
  }

  #edit-controls[cui-areatype="toolbar"] > #copy-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1044px, 72px, 1008px);
  }

  #edit-controls[cui-areatype="toolbar"] > #paste-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1080px, 72px, 1044px);
  }

  #zoom-controls[cui-areatype="toolbar"] > #zoom-out-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1116px, 72px, 1080px);
  }

  #zoom-controls[cui-areatype="toolbar"] > #zoom-in-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1152px, 72px, 1116px);
  }

  #nav-bar-overflow-button:hover:active:not([disabled="true"]) {
    -moz-image-region: rect(36px, 1224px, 72px, 1188px);
  }

  #email-link-button@toolbarButtonPressed@ {
    -moz-image-region: rect(36px, 1332px, 72px, 1296px);


) * 1.e-2f, // From percent to fraction.
        fCompPB->GetFloat(kIntraRand) * 1.e-2f); // From percent to fraction.
}

/*==LICENSE==*

CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011  Cyan Worlds, Inc.

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

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

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Additional permissions under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.

You can contact Cyan Worlds, Inc. by email legal@cyan.com
 or by snail mail at:
      Cyan Worlds, Inc.
      14617 N Newport Hwy
      Mead, WA   99021

*==LICENSE==*/

#include "HeadSpin.h"
#include "plgDispatch.h"
#include "hsMath.h"
#include "hsResMgr.h"

#include "plComponent.h"
#include "plComponentReg.h"
#include "plAnimComponent.h"
#include "plActivatorBaseComponent.h"
#include "plNoteTrackDlgComp.h"
#include "MaxMain/plMaxNode.h"

#include "MaxMain/MaxAPI.h"

#include "resource.h"

#include "plClickDragComponent.h"

#include "pnSceneObject/plSceneObject.h"
#include "pnKeyedObject/hsKeyedObject.h"

#include "plPhysical/plCollisionDetector.h"  // MM
#include "plModifier/plLogicModifier.h"
#include "plModifier/plAxisAnimModifier.h"
#include "pnModifier/plConditionalObject.h"
#include "plPhysical/plPickingDetector.h"
#include "pfConditional/plActivatorConditionalObject.h"
#include "pfConditional/plFacingConditionalObject.h"
#include "pfConditional/plObjectInBoxConditionalObject.h"
#include "pnMessage/plObjRefMsg.h"
#include "pnMessage/plNotifyMsg.h"
#include "pnMessage/plCursorChangeMsg.h"
#include "pnMessage/plEventCallbackMsg.h"
#include "plMessage/plAnimCmdMsg.h"
#include "plInterp/plAnimEaseTypes.h"

#include "MaxConvert/plConvert.h"

#include "plResponderComponent.h"

#include "MaxMain/plPhysicalProps.h"
#include "pl


not distinguish omitted fields from those explicitly set to their default
values

requestHeadersPolicy

HeadersPolicy

(Optional)

The policy for managing request headers during proxying.

responseHeadersPolicy

HeadersPolicy

(Optional)

The policy for managing response headers during proxying.
Rewriting the ‘Host’ header is not supported.

cookieRewritePolicies

[]CookieRewritePolicy

(Optional)

The policies for rewriting Set-Cookie header attributes.

slowStartPolicy

SlowStartPolicy

(Optional)

Slow start will gradually increase amount of traffic to a newly added endpoint.

SlowStartPolicy

(Appears on:
Service)

SlowStartPolicy will gradually increase amount of traffic to a newly added endpoint.
It can be used only with RoundRobin and WeightedLeastRequest load balancing strategies.

Field
Description

window

string

The duration of slow start window.
Duration is expressed in the Go Duration format.
Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

aggression

string

(Optional)

The speed of traffic increase over the slow start window.
Defaults to 1.0, so that endpoint would get linearly increasing amount of traffic.
When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly.
The value of aggression parameter should be greater than 0.0.

More info: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/slow_start

<tr


-----------------------------------
-- Area: Bhaflau Thickets
--   NM: Mahishasura
-- !pos 206.510 -16.320 357.724 52
-----------------------------------
local ID = zones[xi.zone.BHAFLAU_THICKETS]
-----------------------------------
---@type TMobEntity
local entity = {}

entity.phList =
{
    [ID.mob.MAHISHASURA - 10] = ID.mob.MAHISHASURA, -- 215.000 -18.000 372.000
}

entity.spawnPoints =
{
    { x = 184.508, y = -15.544, z = 361.913 },
    { x = 183.842, y = -15.500, z = 358.673 },
    { x = 185.699, y = -15.714, z = 355.744 },
    { x = 187.088, y = -16.500, z = 352.352 },
    { x = 188.999, y = -16.667, z = 348.534 },
    { x = 195.647, y = -19.231, z = 340.745 },
    { x = 196.885, y = -20.250, z = 333.920 },
    { x = 200.946, y = -20.504, z = 331.376 },
    { x = 201.907, y = -20.250, z = 334.709 },
    { x = 201.515, y = -19.578, z = 339.896 },
    { x = 200.183, y = -18.000, z = 345.025 },
    { x = 200.116, y = -17.096, z = 350.583 },
    { x = 197.738, y = -16.000, z = 358.015 },
    { x = 195.547, y = -15.973, z = 363.126 },
    { x = 195.396, y = -17.010, z = 369.291 },
    { x = 198.457, y = -18.000, z = 373.081 },
    { x = 202.406, y = -17.199, z = 369.695 },
    { x = 207.671, y = -16.593, z = 365.180 },
    { x = 212.900, y = -18.000, z = 356.692 },
    { x = 216.934, y = -19.256, z = 352.868 },
    { x = 217.174, y = -19.500, z = 349.820 },
    { x = 218.245, y = -19.500, z = 346.316 },
    { x = 224.295, y = -19.720, z = 345.830 },
    { x = 223.605, y = -19.500, z = 349.228 },
    { x = 220.65


# =============================================================================== #
#                                                                                #
#    This file has been generated automatically!! Do not change this manually!    #
#                                                                                #
# =============================================================================== #
from __future__ import annotations

import typing

from pydantic import Field

from ..types.base import *

from ..types.all import (
    InputFile,
    MaskPosition,
)

class SetStickerMaskPosition(BaseObject):
    """
    Changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user

    :param sticker: Sticker
    :type sticker: :class:`InputFile`
    :param mask_position: Position where the mask is placed; pass null to remove mask position, defaults to None
    :type mask_position: :class:`MaskPosition`, optional
    """

    ID: typing.Literal["setStickerMaskPosition"] = Field(
        "setStickerMaskPosition", validation_alias="@type", alias="@type"
    )
    sticker: InputFile
    mask_position: typing.Optional[MaskPosition] = None


DataObject::DATA_OBJECT()));

  if (!cmeshInfo)
  {
    return 0;
  }
  vtkPolyData* cmesh = vtkPolyData::SafeDownCast(cmeshInfo->Get(vtkDataObject::DATA_OBJECT()));
  if (!cmesh)
  {
    return 0;
  }

  // Pass the input attributes to the output
  output->CopyStructure(input);
  output->GetPointData()->PassData(input->GetPointData());
  output->GetCellData()->PassData(input->GetCellData());

  // Gather initial information
  vtkIdType numberOfPointSetPoints = input->GetNumberOfPoints();
  vtkIdType numberOfPointSetCells = input->GetNumberOfCells();
  vtkPoints* inPts = input->GetPoints();
  vtkPoints* cmeshPts = cmesh->GetPoints();
  if (!inPts || !cmeshPts)
  {
    return 0;
  }
  vtkCellArray* cmeshPolys = cmesh->GetPolys();
  vtkIdType numberOfControlMeshPoints = cmeshPts->GetNumberOfPoints();
  vtkIdType numberOfControlMeshCells = cmeshPolys->GetNumberOfCells();
  vtkIdType numTriangles = cmeshPolys->GetNumberOfConnectivityIds() / 3;
  if (numTriangles != numberOfControlMeshCells)
  {
    vtkErrorMacro("Control mesh must be a closed, manifold triangular mesh");
    return 0;
  }

  // We will be modifying the points
  vtkPoints* outPts = input->GetPoints()->NewInstance();
  outPts->SetDataType(input->GetPoints()->GetDataType());
  outPts->SetNumberOfPoints(numberOfPointSetPoints);
  output->SetPoints(outPts);

  // Start by determining whether weights must be computed or not
  bool abort = false;
  vtkIdType progressInterval = (numberOfPointSetPoints / 10 + 1);
  int workLoad = 1;
  double x[3], *weights;
  vtkIdType ptId, pid;
  if (this->InitializeWeights ||
    this->InitialNumberOfControlMeshPoints != numberOfControlMeshPoints ||
    this->InitialNumberOfControlMeshCells != numberOfControlMeshCells ||
    this->InitialNumberOfPointSetPoints != numberOfPointSetPoints ||
    this->InitialNumberOfPointSetCells != numberOfPointSetCells)
  {
    workLoad = 2;
    // reallocate the weights
    this->Weights->Reset();
    this->Weights->SetNumberOfComponents(numberOfControlMeshPoints);
    this->Weights->SetNumberOfTuples(numberOfPointSetPoints);

    // compute the interpolation weights
    for (ptId = 0; ptId < numberOfPointSetPoints && !abort; ++ptId)
    {
      if (!(ptId % progressInterval))
      {
        vtkDebugMacro(<< "Processing #" << ptId);
        this->UpdateProgress(ptId / (workLoad * numberOfPointSetPoints));
        abort = this->CheckAbort();
      }

      inPts->GetPoint(ptId, x);
      weights = this->Weights->GetPointer(ptId * numberOfControlMeshPoints);
      vtkMeanValueCoordinatesInterpolator::ComputeInterpolationWeights(
        x, cmeshPts, cmeshPolys, weights);
    }

    // prepare for next execution
    this->InitializeWeights = 0;
    this->InitialNumberOfControlMeshPoints = numberOfControlMeshPoints;
    this->InitialNumberOfControlMeshCells = numberOfControlMeshCells;
    this->InitialNumberOfPointSetPoints = numberOfPointSetPoints;
    this->InitialNumberOfPointSetCells = numberOfPointSetCells;
  }

  // Okay weights are computed, now interpolate
  double xx[3];
  for (ptId = 0; ptId < numberOfPointSetPoints && !abort; ++ptId)


 return *this;
}
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Copyright (c) 2022 The Dogecoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "rpc/server.h"

#include "chainparams.h"
#include "clientversion.h"
#include "validation.h"
#include "net.h"
#include "net_processing.h"
#include "netbase.h"
#include "policy/policy.h"
#include "protocol.h"
#include "sync.h"
#include "timedata.h"
#include "ui_interface.h"
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
#include "version.h"

#include <boost/foreach.hpp>

#include <univalue.h>

using namespace std;

UniValue getconnectioncount(const JSONRPCRequest& request)
{
    if (request.fHelp || request.params.size() != 0)
        throw runtime_error(
            "getconnectioncount\n"
            "\nReturns the number of connections to other nodes.\n"
            "\nResult:\n"
            "n          (numeric) The connection count\n"
            "\nExamples:\n"
            + HelpExampleCli("getconnectioncount", "")
            + HelpExampleRpc("getconnectioncount", "")
        );

    if(!g_connman)
        throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");

    return (int)g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL);
}

UniValue setmaxconnections(const JSONRPCRequest& request)
{
    int newMaxCount = 0;
    const std::string minConnCount = to_string(MAX_ADDNODE_CONNECTIONS);

    if (request.fHelp || request.params.size() != 1)
        throw runtime_error(
            "setmaxconnections\n"
            "\nSets the maximum number of connections to other nodes.\n"
            "\nArguments:\n"
            "1. maxconnectioncount     (numeric, required) The new maximum connection count (must be >= " + minConnCount + ")\n"
            "\nResult:\n"
            "n          (boolean) True or false connection count\n"
            "\nExamples:\n"
            + HelpExampleCli("setmaxconnections", "20")
            + HelpExampleRpc("setmaxconnections", minConnCount)
        );
    else
        newMaxCount = request.params[0].get_int();

    if (newMaxCount < MAX_ADDNODE_CONNECTIONS)
        throw JSONRPCError(RPC_INVALID_PARAMETER, "Error: maxconnectioncount must be >= " + minConnCount);

    if(!g_connman)
        throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");

    g_connman->SetMaxConnections(newMaxCount);

    return true;
}

UniValue ping(const JSONRPCRequest&


* sobely[1, 1] + GetPixel(oldScan0, oldData.Stride, x + 1, y).A * sobely[1, 2]
                           + GetPixel(oldScan0, oldData.Stride, x - 1, y + 1).A * sobely[2, 0] + GetPixel(oldScan0, oldData.Stride, x, y + 1).A * sobely[2, 1] + GetPixel(oldScan0, oldData.Stride, x + 1, y + 1).A * sobely[2, 2];
                    int derivata = (dx * dx) + (dy * dy);

                    var pixel = GetPixel(oldScan0, oldData.Stride, x, y);
                    if (derivata > 255 * 255)
                    {
                        SetPixel(newScan0, newData.Stride, x, y, Color.FromArgb(0, pixel.R, pixel.G, pixel.B));
                    }
                    else
                    {
                        SetPixel(newScan0, newData.Stride, x, y, Color.FromArgb(0xFF - (int)Math.Sqrt(derivata), pixel.R, pixel.G, pixel.B));
                    }
                }
            });

            oldBitmap.UnlockBits(oldData);
            newBitmap.UnlockBits(newData);
            return newBitmap;
        }

        //Original HLSL's C# equivalent.
        //public static void ComputeGradient(ref Bitmap bm)
        //{
        //    Bitmap temp = new Bitmap(bm.Width, bm.Height);

        //    for (int x = 0; x < bm.Width - 1; x++)
        //    {
        //        for (int y = 0; y < bm.Height - 1; y++)
        //        {
        //            //Default translation constants
        //            int xn = -1;
        //            int xp = 1;
        //            int yn = -1;
        //            int yp = 1;

        //            //If x or y is on the border, don't move out of bounds
        //            if (x == 0)
        //            {
        //                xn = 0;
        //            }
        //            else if (x == bm.Width - 1)
        //            {
        //                xp = 0;
        //            }
        //            if (y == 0)
        //            {
        //                yn = 0;
        //            }
        //            else if (y == bm.Height - 1)
        //            {
        //                yp = 0;
        //            }

        //            var kernel = new List<Point>();
        //            //Top column
        //            //Point tl = new Point(x + xn, y + yn);
        //            //Point tc = new Point(x, y + yn);
        //            //Point tr = new Point(x + xp, y + yn);
        //            var tl = bm.GetPixel(x + xn, y + yn);
        //            var tc = bm.GetPixel(x, y + yn);
        //            var tr = bm.GetPixel(x + xp, y + yn);

        //            //Middle column
        //            //Point ml = new Point(x + xn, y);
        //            //Point mc = new Point(x, y);
        //            //Point mr = new Point(x + xp, y);
        //            var ml = bm.GetPixel(x + xn, y);
        //            var mc = bm.GetPixel(x, y);
        //            var mr = bm.GetPixel(x + xp, y);

        //            //Bottom column
        //            //Point bl = new Point(x + xn, y + yp);
        //            //Point bc = new Point(x, y + yp);
        //            //Point br = new Point(x + xp, y + yp);
        //            var bl = bm.GetPixel(x + xn, y + yp);
        //            var bc = bm.GetPixel(x, y +


	}()

	Infof(ctx, "processing %d Amazon S3 Objects", len(objectList))

	smallFiles := false

	totalSize := int64(0)
	for _, o := range objectList {
		totalSize += *o.Size
		if *o.Size < int64(beginningPad) {
			smallFiles = true
		}
	}
	Infof(ctx, "final size %s (without tar headers + padding)", formatBytes(totalSize))

	if totalSize > fileSizeMax {
		return fmt.Errorf("total size (%d) of all objects is more than 5TB. Reduce the number of objects", totalSize)
	}

	concatObj := NewS3Obj()
	if opts.ConcatInMemory || totalSize < fileSizeMin {
		Debugf(ctx, "Processing small files in-memory")
		var err error
		concatObj, err = buildInMemoryConcat(ctx, svc, objectList, totalSize, opts)
		if err != nil {
			return err
		}
	} else if smallFiles {
		Debugf(ctx, "Processing small files")
		var err error
		rc, err = NewRecursiveConcat(ctx, RecursiveConcatOptions{
			Client:      svc,
			Bucket:      opts.DstBucket,
			DstPrefix:   opts.DstPrefix,
			DstKey:      opts.DstKey,
			Region:      opts.Region,
			EndpointUrl: opts.EndpointUrl,
		})
		if err != nil {
			return err
		}
		headList := make([]*s3.HeadObjectOutput, len(objectList))
		if opts.PreservePOSIXMetadata {
			var wg sync.WaitGroup
			for i, obj := range objectList {
				wg.Add(1)
				go func(i int, obj *S3Obj) {
					defer wg.Done()
					if obj.NoHeaderRequired {
						headList[i] = nil
					} else {
						head := fetchS3ObjectHead(ctx, svc, obj)
						headList[i] = head
					}
				}(i, obj)
			}
			wg.Wait()
		}

		Debugf(ctx, "building toc")
		manifestObj, _, err := buildToc(ctx, objectList)
		if err != nil {
			fmt.Printf("buildToc: %s", err.Error())
			return err
		}
		objectList = append([]*S3Obj{manifestObj}, objectList...)
		headList = append([]*s3.HeadObjectOutput{nil}, headList...)
		Debugf(ctx, "prepended toc: %s Size: %d len.Data: %d", *manifestObj.Key, *manifestObj.Size, len(manifestObj.Data))
		concatObj, err = processSmallFiles(ctx, svc, objectList, headList, opts.DstKey, opts)
		if err != nil {
			return err
		}
	} else {
		Debugf(ctx, "Processing large files")
		var err error
		concatObj, err = processLargeFiles(ctx, svc, objectList, opts)
		if err != nil {
			return err
		}
	}

	Infof(ctx, "Final Object: s3://%s/%s", concatObj.Bucket, *concatObj.Key)
	return nil
}

func cleanUp(ctx context.Context, svc *s3.Client, opts *S3TarS3Options) {
	Infof(ctx, "deleting all intermediate objects")
	scratchDirs := []string{
		filepath.Join(opts.DstPrefix, opts.DstKey+".parts"),
		filepath.Join(opts.DstPrefix, opts.DstKey, "headers"),
	}
	for _, path := range scratchDirs {
		if path == "" || path == "/" {
			continue
		}
		deleteList, _, _ := ListAllObjects(ctx, svc, opts.DstBucket, path)
		err := deleteObjectList(ctx, svc, opts, deleteList)
		i


er,
        food: &FoodManager,
    ) {
        if let Some(ref mut inner) = self.inner {
            if let Some(brain) = brains.item_mut(inner.brain) {
                if let Some(body) = physics.item(inner.body) {
                    let (position, rotation, radius) = {
                        let state = body.cached_state();
                        (state.position, state.rotation, state.radius)
                    };
                    if !inner.detectors.is_empty() {
                        let fov = PI / inner.detectors.len() as Scalar;
                        for (sensor, detector_state) in &mut inner.detectors {
                            let r = rotation + detector_state.angle;
                            let direction = Vec2::new(r.cos(), r.sin());
                            let potential = physics.sample_field_of_view(
                                position,
                                direction,
                                fov,
                                None,
                                |spatial| food.item_by_body(spatial.body).is_some(),
                            );
                            if potential > 0.1 && self.calories > 0.0 {
                                drop(brain.sensor_trigger_impulse(*sensor, potential));
                                detector_state.potential = potential;
                                self.calories -= potential * POTENTIAL_CALORIES_SCALE;
                            }
                        }
                    }
                    for (effector, leg_state) in &mut inner.legs {
                        if let Ok(potential) = brain.effector_potential_release(*effector) {
                            if potential > 0.1 && self.calories > 0.0 {
                                leg_state.phase = (leg_state.phase + 1) % 4;
                                let r = rotation + leg_state.angle;
                                let f = Vec2::new(r.cos(), r.sin()) * radius * -0.1;
                                physics.apply_fluid_force(position, f);
                                self.calories -= potential * POTENTIAL_CALORIES_SCALE;
                            }
                        }
                    }
                }
            }
        }
    }
}
// Example:
//
//     cargo run --release --example fast_publisher -- --payload-len 32

mod common;

use std::convert::TryInto;
use std::io::{Read, Write};

#[derive(Debug, structopt::StructOpt)]
struct Options {
    /// Address of the MQTT server.
    #[structopt(long, default_value = "[::1]:1883")]
    server: std::net::SocketAddr,

    /// The length of the payload.
    #[structopt(long)]
    payload_len: usize,
}

fn main() {
    let Options {
        server,
        payload_len,
    } = common::init("fast_publisher");

    let payload: bytes::Bytes = std::iter::repeat("1234567890").flat_map(str::as_bytes).take(payload_len).copied().collect();
    let payload = std::convert::TryInto::try_into(payload).unwrap();

    let mut stream = std::net::TcpStream::connect(server).unwrap();

    let connect = encode(mqtt3::proto::Packet::Connect(mqtt3::proto::Connect {
        username: None,
        password: <PASSWORD>,
        will: None,
        client_id: mqtt3::proto::ClientId::ServerGenerated,
        keep_alive: std::time::Duration::from_secs(0),
        protocol_name: mqtt3::PROTOCOL_NAME,
        protocol_level: mqtt3::PROTOCOL_LEVEL,
    }));
    let () = stream.write_all(&*connect).unwrap();

    let mut conn_ack = [0_u8; 4];
    let () = stream.read_exact(&mut conn_ack).unwrap();
    assert_eq!(conn_ack, *b"\x20\x02\x00\x00");

    let publish = encode(mqtt3::proto::Packet::Publish(mqtt3::proto::Publish {
        packet_identifier_dup_qos: mqtt3::proto::PacketIdentifierDupQoS::AtMostOnce,
        retain: false,
        topic_name: "foo".to_owned().try_


w)return
this.w=a
this.ai()},
e4:function(a){if(this.w)return
this.m8(a)}}
E.z9.prototype={
cF:function(a){var t=this.y2$
if(t!=null)return t.fg(a)
return this.qP(a)}}
E.za.prototype={
am:function(a){var t=this
t.jP(a)
t.cI$.aT(0,t.gkz())
t.nl()},
a2:function(a){this.cI$.aM(0,this.gkz())
this.i8(0)},
aG:function(a,b){var t,s=this,r=s.y2$
if(r!=null){t=s.bi$
if(t===0){s.db=null
return}if(t===255){s.db=null
a.ew(r,b)
return}s.db=a.wi(b,t,E.cB.prototype.gh0.call(s),u.Dl.a(s.db))}}}
E.pP.prototype={
am:function(a){var t
this.e9(a)
t=this.y2$
if(t!=null)t.am(a)},
a2:function(a){var t
this.dk(0)
t=this.y2$
if(t!=null)t.a2(0)}}
E.pQ.prototype={
cF:function(a){var t=this.y2$
if(t!=null)return t.fg(a)
return this.qI(a)}}
T.vp.prototype={
cF:function(a){var t,s,r=this.y2$
if(r!=null){t=r.fg(a)
s=u.G.a(this.y2$.d)
if(t!=null)t+=s.a.b}else t=this.qI(a)
return t},
aG:function(a,b){var t=this.y2$
if(t!=null)a.ew(t,u.G.a(t.d).a.L(0,b))},
ck:function(a,b){var t,s=this.y2$
if(s!=null){t=u.G.a(s.d)
return a.kF(new T.Hg(this,b,t),t.a,b)}return!1}}
T.Hg.prototype={
$2:function(a,b){return this.a.y2$.bM(a,b)}}
T.vg.prototype={
nb:function(){var t=this
if(t.w!=null)return
t.w=t.G.a9(t.a1)},
sdY:function(a,b){var t=this
if(J.d(t.G,b))return
t.G=b
t.w=null
t.U()},
sbc:function(a){var t=this
if(t.a1==a)return
t.a1=a
t.w=null
t.U()},
c4:function(){var t,s,r,q,p,o,n,m,l,k=this,j=K.u.prototype.gaF.call(k)
k.nb()
if(k.y2$==null){t=k.w
k.k4=j.cg(new P.ao(t.a+t.c,t.b+t.d))
return}t=k.w
j.toString
s=t.gvI()
r=t.gbI(t)+t.gbS(t)
q=Math.max(0,j.a-s)
p=Math.max(0,j.c-r)
t=Math.max(q,


66825246-0
csi-hostpath-zp2dg           2/2       Running   0          19m       10.240.0.35   k8s-agentpool-66825246-1
```

## Basic Usage
### 1. Create a hostpath CSI storage class
```
kubectl create -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/csi/hostpath/storageclass-csi-hostpath.yaml
```

### 2. Create a hostpath CSI PVC
```
kubectl create -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/csi/hostpath/pvc-csi-hostpath.yaml
```
make sure pvc is created successfully
```
watch kubectl describe pvc pvc-csi-hostpath
```

### 3. create a pod with hostpath CSI PVC
```
kubectl create -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/csi/hostpath/nginx-pod-csi-hostpath.yaml
```

### 4. enter the pod container to do validation
```
azureuser@k8s-master-87187153-0:~$ kubectl exec -it  nginx-csi-hostpath -- bash
root@nginx-csi-hostpath:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          30G  8.9G   21G  31% /
tmpfs           3.4G     0  3.4G   0% /dev
tmpfs           3.4G     0  3.4G   0% /sys/fs/cgroup
overlay          30G  8.9G   21G  31% /data
/dev/sda1        30G  8.9G   21G  31% /etc/hosts
shm              64M     0   64M   0% /dev/shm
tmpfs           3.4G   12K  3.4G   1% /run/secrets/kubernetes.io/serviceaccount
```

#### Note
 - CSI hostpath driver would mkdir under `/var/lib/kubelet/pods/5a6d98a3-1c57-11e8-a48d-000d3afdbef1/volumes/kubernetes.io~csi/kubernetes-dynamic-pvc-5a7519c9-1c57-11e8-99dd-bab516dca496/mount`, mount to `/data` dir in the above example
 - clean up all clusterroles & clusterrolebindings:
```
kubectl delete namespace hostpath
kubectl delete clusterrole hostpath:external-provisioner-runner
kubectl delete clusterrole hostpath:external-attacher-runner
kubectl delete clusterrole csi-hostpath
kubectl delete clusterrolebinding csi-hostpath-provisioner-role
kubectl delete clusterrolebinding csi-hostpath-attacher-role
kubectl delete clusterrolebinding csi-hostpath
```

#### Links
[Introducing Container Storage Interface (CSI) Alpha for Kubernetes](http://blog.kubernetes.io/2018/01/introducing-container-storage-interface.html)

[Kubernetes CSI Documentation](https://kubernetes-csi.github.io/docs/Home.html)

[CSI Volume Plugins in Kubernetes Design Doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/container-storage-interface.md)
# dysk FlexVolume driver for Kubernetes (Deprecated)
**WARNING**: This driver is Deprecated. Do NOT use this driver in a production environment in its current state.

 - supported Kubernetes version: available from v1.7
 - supported agent OS: Linux
> Note: This driver **only** supports `kubelet` running as native daemon (other than containerized kubelet), `kubelet` in [acs-engine v0.16.0 or above](https://github.com/Azure/acs-engine) and [AKS](https://azure.microsoft.com/en-us/services/container-service/) cluster is already running as native daemon. [Check whether k


ble-layout);

// Border-collapse.
//
// @link http://docs.webplatform.org/wiki/css/properties/border-collapse

$ucss-border-collapse: (
  "collapse": collapse,
  "separate": separate
) !default;

@include ucss-export-property(border-collapse, $ucss-border-collapse);

// Border-spacing.
//
// @link http://docs.webplatform.org/wiki/css/properties/border-spacing

$ucss-border-spacing: () !default;

@include ucss-export-property(border-spacing, $ucss-border-spacing);

// Empty-cells.
//
// @link http://docs.webplatform.org/wiki/css/properties/empty-cells

$ucss-empty-cells: (
  "show": show,
  "hide": hide
) !default;

@include ucss-export-property(empty-cells, $ucss-empty-cells);
//
// List Properties.
//
// Support:
//
// * list-style-type
// * list-style-image
// * list-style-position
// * list-style
//

// List-style-type.
//
// @link http://docs.webplatform.org/wiki/css/properties/list-style-type

$ucss-list-style-type: (
  "disc":                 disc,
  "circle":               circle,
  "square":               square,
  "decimal":              decimal,
  "decimal-leading-zero": decimal-leading-zero,
  "lower-roman":          lower-roman,
  "upper-roman":          upper-roman,
  "lower-greek":          lower-greek,
  "lower-latin":          lower-latin,
  "upper-latin":          upper-latin,
  "armenian":             armenian,
  "georgian":             georgian,
  "lower-alpha":          lower-alpha,
  "upper-alpha":          upper-alpha
) !default;

@include ucss-export-property(list-style-type, $ucss-list-style-type);

// List-style-image.
//
// @link http://docs.webplatform.org/wiki/css/properties/list-style-image

$ucss-list-style-image: () !default;

@include ucss-export-property(list-style-image, $ucss-list-style-image);

// List-style-position.
//
// @link http://docs.webplatform.org/wiki/css/properties/list-style-position

$ucss-list-style-position: (
  "inside":  inside,
  "outside": outside
) !default;

@include ucss-export-property(list-style-position, $ucss-list-style-position);

// List-style.
//
// @link http://docs.webplatform.org/wiki/css/properties/list-style

$ucss-list-style: () !default;

@include ucss-export-property(list-style, $ucss-list-style);
@import url(https://fonts.googleapis.com/css?family=Hind:400,300,500,700,600);
@import url(https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic);
@import url(https://fonts.googleapis.com/css?family=Cousine);

body, html {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	font-size: 100%;
	background: #fafafa;
}

h2 {
	font-family: Hind;
	font-size: 1rem;
	font-weight: 500;
	color: #666666;
	margin: 0;
	display: inline-block;
	text-align: right;
	vertical-align: bottom;
}


      }

                _player.LoggedIn = false;
                _player.Ready = false;
                Running = false;

                if (_keepAliveTimer != null)
                {
                    _keepAliveTimer.Dispose();
                    _keepAliveTimer = null;
                }
            }
            else
            {
                Server.Logger.Log(LogLevel.Info, "Disposing {0}", Username);
                Running = false;
                Server.RemoveClient(this);
                Server.Logger.Log(LogLevel.Info, "Clients online: {0}", Server.Clients.Count);
                Server.FreeConnectionSlot();
            }

            _chunkSendTimer.Dispose();
            _chunkSendTimer = null;

            RecvBufferPool.ReleaseBuffer(_recvBuffer);
            SendSocketEventPool.Push(_sendSocketEvent);
            RecvSocketEventPool.Push(_recvSocketEvent);

            if (_socket.Connected)
            {
                try
                {
                    _socket.Shutdown(SocketShutdown.Both);
                }
                catch(SocketException)
                {
                    // Ignore errors in socket shutdown (e.g. if client crashes there is a no connection error when trying to shutdown)
                }
            }
            _socket.Close();

            //GC.Collect();
        }

        public void MarkToDispose()
        {
            lock (_disposeLock)
            {
                if (Running)
                {
                    Running = false;
                    StopUpdateChunks();
                }
            }
        }

        internal void DisposeSendSystem()
        {
            lock(_disposeLock)
            {
                if (!_sendSystemDisposed)
                {
                    _sendSystemDisposed = true;
                    if (_recvSystemDisposed)
                    {
                        Server.ClientsToDispose.Enqueue(this);
                        Server.NetworkSignal.Set();
                    }
                }
            }
        }

        internal void DisposeRecvSystem()
        {
            lock (_disposeLock)
            {
                if (!_recvSystemDisposed)
                {
                    _recvSystemDisposed = true;
                    if (_sendSystemDisposed)
                    {
                        Server.ClientsToDispose.Enqueue(this);
                        Server.NetworkSignal.Set();
                    }
                }
            }
        }

        /// <summary>
        /// Sends a message to the player via chat.
        /// </summary>
        /// <param name="message">The message to be displayed in the chat HUD.</param>
        public void SendMessage(string message)
        {
            SendPacket(new ChatMessagePacket
            {
                Message = message
            });
        }

        private void StartKeepAliveTimer()
        {
            _keepAliveTimer = new Timer(KeepAliveTimer_Callback, null, 10000, 10000);
        }
    }
}


 type="range"
                           min="0"
                           max="100"
                           step="1"
                           list="from-0-to-100-percent">
                    <svg for="linkSaturationLimit"
                         role="button"
                         class="ml-input-range-icon low"
                         viewBox="0 0 24 24"
                         xmlns="http://www.w3.org/2000/svg">
                        <path d="M0 0h24v24H0z"
                              fill="none" />
                        <path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"
                        />
                    </svg>
                    <svg for="linkSaturationLimit"
                         role="button"
                         class="ml-input-range-icon high"
                         viewBox="0 0 24 24"
                         xmlns="http://www.w3.org/2000/svg">
                        <path d="M0 0h24v24H0z"
                              fill="none" />
                        <path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"
                        />
                        <ellipse rx="3"
                                 ry="3"
                                 cy="12"
                                 cx="12" />
                    </svg>
                </div