 us, so we'll send the diagnostics immediately, then rethrow
     */
    try {
      const json = JSON.parse(text)
      console.log("Parsed")

      console.log("Context")

      // const ld = await jsonld.compact(json, json["@context"])
      const myContext = await myParser.parse(json)
      const ld = myContext.getContextRaw()

      console.log(`Context: ${JSON.stringify(ld, undefined, 4)}`)
      return ld
    } catch (error) {
      this.connection.sendDiagnostics({
        uri: item.uri,
        diagnostics: [
          {
            severity: DiagnosticSeverity.Error,
            message: `Failed with error ${error}`,
            range: {
              start: item.positionAt(0),
              end: item.positionAt(0),
            },
          },
        ],
      })
      throw error
    }
  }
}

export const createContextCache = (conn: Connection) =>
  new Cacher(new ContextCacheOperator(conn))
// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
//
// When running the script with `npx hardhat run <script>` you'll find the Hardhat
// Runtime Environment's members available in the global scope.
import { ethers } from "hardhat";

async function main() {
  // Hardhat always runs the compile task when running scripts with its command
  // line interface.
  //
  // If this script is run directly using `node` you may want to call compile
  // manually to make sure everything is compiled
  // await hre.run('compile');

  // We get the contract to deploy
  const Unilearn = await hre.ethers.getContractFactory('Unilearn');
  const unilearn = await Unilearn.deploy();
  await unilearn.deployed();
  console.log('Unilearn deployed to: ', unilearn.address);

  const UnilearnNFT = await hre.ethers.getContractFactory('UnilearnNFT');
  const nft = await UnilearnNFT.deploy(market.address);
  await nft.deployed();
  console.log('UnilearnNFT deployed to: ', nft.address);
}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
import { Styles, createProperties, parse, Data, LoggerInterface } from './common'

const colorsMapping: {
  [key: string]: string
} = {
  black: 'black',
  red: 'rgb(187,0,0)',
  green: 'rgb(0,187,0)',
  yellow: 'rgb(187,187,0)',
  blue: 'rgb(0,0,187)',
  magenta: 'rgb(187,0,187)',
  cyan: 'rgb(0,187,187)',
  white: 'white',
  gray: 'gray',
}

const weightsMapping: {
  [key: string]: string | number
} = {
  bold: 'bold',
  dim: 200,
}

const decorationsMapping: {
  [key: string]: string
} = {
  strikethrough: 'line-through',
  underline: 'underline'
}

function marshal(styles: Styles): string {
  return Object.keys(styles).reduce((acc: string, key: string): string => (
    `${acc}${key}:${styles[ key as keyof Styles ]};`
  ), '')
}

function transform(value: any, args: any[]): string {

  const valueType = typeof value

  if (valueType === 'number' || valueType === 'string' || value instanceof String) {
    return value
  } else if (value instanceof Data) {

    const {
      text,
      styles
    } = value
    const cssStyles: { [key: string]: any } = {}

    if (styles.color) {
      cssStyles[styles.inverse ? 'ba


		f := typeOfT.Field(i)

		if f.PkgPath != "" {
			// Not exported
			continue
		}

		fieldName := typeOfT.Field(i).Name
		fieldTag := f.Tag.Get("json")
		fieldValRaw := s.Field(i)
		fieldVal := fieldValRaw.Interface()

		// Ignore slices
		if fieldValRaw.Kind() == reflect.Slice {
			continue
		}

		// Check if json parser would ordinarily hide the value anyway
		if fieldTag == "-" || (strings.HasSuffix(fieldTag, ",omitempty") && reflect.DeepEqual(fieldVal, reflect.Zero(reflect.TypeOf(fieldVal)).Interface())) {
			continue
		}

		if fieldTag == "" {
			out[fieldName] = fieldVal
		} else {
			out[strings.TrimSuffix(fieldTag, ",omitempty")] = fieldVal
		}
	}

	b, _ := json.Marshal(out)
	str, _ := compactJson(b)

	return str
}

// compactJson will remove insignificant spaces to minimize storage space.
func compactJson(src []byte) (string, error) {

	dst := new(bytes.Buffer)

	err := json.Compact(dst, src)
	if err != nil {
		return "", err
	}

	return dst.String(), nil
}
// Copyright 2018-21 PJ Engineering and Business Solutions Pty. Ltd. All rights reserved.

package memory

import (
	"context"
	"time"

	"github.com/patrickmn/go-cache"
	"github.com/rocketlaunchr/remember-go"
)

// NoExpiration is used to indicate that data should not expire from the cache.
const NoExpiration time.Duration = -1

// MemoryStore is used to create an in-memory cache.
type MemoryStore struct {
	cache *cache.Cache
}

// NewMemoryStore creates an in-memory cache where the expired items
// are deleted based on the cleanupInterval duration.
func NewMemoryStore(cleanupInterval time.Duration) *MemoryStore {
	return &MemoryStore{
		cache: cache.New(cache.NoExpiration, cleanupInterval),
	}
}

// NewMemoryStoreFrom creates an in-memory cache directly from a *cache.Cache object.
func NewMemoryStoreFrom(cache *cache.Cache) *MemoryStore {
	return &MemoryStore{
		cache: cache,
	}
}

// Conn does nothing for this storage driver.
func (c *MemoryStore) Conn(ctx context.Context) (remember.Cacher, error) {
	return c, nil
}

// StorePointer sets whether a storage driver requires itemToStore to be
// stored as a pointer or as a concrete value.
func (c *MemoryStore) StorePointer() bool {
	return false
}

// Get returns a value from the cache if the key exists.
func (c *MemoryStore) Get(key string) (_ interface{}, found bool, _ error) {
	item, found := c.cache.Get(key)
	return item, found, nil
}

// Set sets a item into the cache for a particular key.
func (c *MemoryStore) Set(key string, expiration time.Duration, itemToStore interface{}) error {
	c.cache.Set(key, itemToStore, expiration)
	return nil
}

// Close returns the connection back to the pool for storage drivers that utilize a pool.
// For this driver, it does nothing.
func (c *MemoryStore) Close() {}

// Forget clears the value from the cache for the particular key.
func (c *MemoryStore) Forget(key string) error {
	c.cache.Delete(key)
	return nil
}

// ForgetAll clears all values from the cache.
func (c *MemoryStore) ForgetAll() error {
	c.cache.Flush()
	return nil
}
package main

import (
	"fmt"
	"log"


cal current_src      = PANDOC_STATE.input_files[1]
if current_src == '-' then
  current_src = nil
end

---@class IncludeDoc
---@field id string|nil The document id.
---@field index integer The index in the `includes` array.
---@field src string The document source (URI or path).
---@field subs integer[] The indexes in the `includes` array of its included sub-documents.
---@field meta table|nil The `Meta` object of the included document.

--- An array of tables representing the included sources (documents).
---@type IncludeDoc[]
local includes         = {}

-- the id of the root document
local root_id          = idFromSrc(current_src) or "root"
-- the src of the root document
local root_src         = current_src or SRC_STDIN
-- the format of the root document
local root_format      = current_src and pandoc.format.from_path(current_src) or ''
-- the SHA1 of the root document contents
local root_sha1

--- When it's `true`, the included documents' metadata are imported
-- under the main document's metadata at the key specified by @{INCLUDE_DOC_SUB_META}
local include_all_meta = VARIABLES[INCLUDE_DOC_SUB_META_VAR] or false

local script_dir       = pandoc_path.directory(PANDOC_SCRIPT_FILE)
package.path           = package.path
    .. ";" .. script_dir .. '/?.lua;'
    .. script_dir .. '/?/init.lua'
local logging          = require("logging")
local logging_info     = logging.info
local logging_warning  = logging.warning
local logging_error    = logging.error

if include_all_meta then
  logging_warning('including metadata of included sub documents')
end

---Check whether a Pandoc item with an `Attr` has a class.
---@param elem WithAttr The `Block` or `Inline` with an `Attr`.
---@param class string The class to look for among the ones in `Attr`'s classes.
---@return boolean
local function hasClass(elem, class)
  if elem and elem.attr and elem.attr.classes then
    local classes = elem.attr.classes
    for i = 1, #classes do
      if classes[i] == class then
        return true
      end
    end
  end
  return false
end

---Fetch the contents of a source as a Pandoc document.
---See [pandoc.mediabag.fetch](https://pandoc.org/lua-filters.html#pandoc.mediabag.fetch).
---@param src string The source to fetch.
---@return string|nil content # The file contents or nil when not successful.
local function srcToMarkup(src)
  local status, mime, content = xpcall(pandoc.mediabag.fetch, function(err)
    logging_warning('source "' .. src .. '" not included: ' .. tostring(err))
  end, src)
  return content
end

---Looks for a source in the @{includes} array and appends it if it's not there yet.
---@param src string The source (URI or path) to look for.
---@return integer index # The index of the source in the @{includes} array and the element in the same array.
---@return IncludeDoc|nil # A new included document with that source when it is not found.
local function indexOfIncluded(src)
  for j = 1, #includes do
    if includes[j].src == src then
      return j
    end
  end
  local index = #includes + 1
  ---@type IncludeDoc
  local incl =
  {
    index = index,
    src = src,
    subs = {},
  }
  table_insert(includes, incl)
  return index, incl
end

---Normalize an id (lowercase, no special chars, at least one letter, don't start with a number)
---@param id string The string to be normalized as an identifier.
---@return string|nil # The normalized identifier or nil when it's not normalizeable.
local function normalizeId(id)
  if id then
    local nid = string.lower(id)
    nid = string_gsub(nid, "[^_0-9a-z-]+


ird);

            mocks.VerifyAll();
        }

        [Fact]
        public void SetupResultWithNestedOrdering()
        {
            MockRepository mocks = new MockRepository();
            ISongBird maleBird = (ISongBird)mocks.StrictMock(typeof(ISongBird)),
                femaleBird = (ISongBird)mocks.StrictMock(typeof(ISongBird));

            SetupResult.On(maleBird).Call(maleBird.Sing()).Return("");
            using (mocks.Ordered())
            {
                using (mocks.Unordered())
                {
                    maleBird.Eat("seeds", 250);
                    femaleBird.Eat("seeds", 250);
                }

                using (mocks.Unordered())
                {
                    maleBird.Mate(femaleBird);
                    femaleB


-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-


"0.0.0.0:3000".parse().unwrap())
        .serve(app.into_make_service())
        .await
        .unwrap();
}
// Copyright Materialize, Inc. All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use assert_cmd::assert::Assert;
use assert_cmd::cargo::CommandCargoExt;
use rand::Rng;
use std::error::Error;
use std::ffi::OsStr;
use std::process::{Child, Command, Stdio};

#[test]
fn test_pingpong() -> Result<(), Box<dyn Error>> {
    fn spawn<I>(args: I) -> Result<Child, Box<dyn Error>>
    where
        I: IntoIterator,
        I::Item: AsRef<OsStr>,
    {
        Ok(Command::cargo_bin("examples/pingpong")?
            .args(args)
            .stdout(Stdio::piped())
            .stderr(Stdio::piped())
            .spawn()?)
    }
    let n = rand::thread_rng().gen::<u8>().to_string();
    let p0 = spawn(&["-p0", &n])?;
    let p1 = spawn(&["-p1"])?;
    let p2 = spawn(&["-p2"])?;
    let stdout_pred = predicates::str::contains(format!("magic number: {}", n));
    Assert::new(p0.wait_with_output()?).success();
    Assert::new(p1.wait_with_output()?)
        .success()
        .stdout(stdout_pred.clone());
    Assert::new(p2.wait_with_output()?)
        .success()
        .stdout(stdout_pred);
    Ok(())
}
<reponame>MattsSe/rosrust<filename>rosrust/src/tcpros/util/mod.rs
pub mod streamfork;
pub mod tcpconnection;
extern crate rltk;

use std::string::ToString;

use specs::prelude::*;

use crate::{CONSOLE_INDEX, Context, get_screen_bounds, Map, Name, Position};

use self::rltk::{ColorPair, Point, RGB};

pub struct TooltipDrawer<'a, 'b> {
    pub ecs: &'a World,
    pub context: &'a mut Context<'b>,
}

pub enum TooltipOrientation { Left, Right, Auto }

impl<'a, 'b> TooltipDrawer<'a, 'b> {
    pub fn draw_tooltip(&mut self, screen_x: i32, screen_y: i32, orientation: TooltipOrientation) {
        self.context.set_target(CONSOLE_INDEX.ui);

        self.draw_tooltip_internal(screen_x, screen_y, orientation);

        self.context.set_target(CONSOLE_INDEX.base);
    }

    fn draw_tooltip_internal(&mut self, screen_x: i32, screen_y: i32, orientation: TooltipOrientation) {
        let (min_x, _, min_y, _) = get_screen_bounds(&self.ecs, self.context);
        let map_x = screen_x + min_x;
        let map_y = screen_y + min_y;
        let map = self.ecs.fetch::<Map>();
        let names = self.ecs.read_storage::<Name>();
        let positions = self.ecs.read_storage::<Position>();

        if !map.is_valid(map_x, map_y) || !map.is_visible(map_x, map_y) {
            return;
        }

        let mut tooltip: Vec<String> = Vec::new();
        for (name, position) in (&names, &positions).join() {
            if position.x == map_x && position.y == map_y {
                tooltip.insert(0, name.name.to_string());
            }
        }

        if tooltip.is_empty() {
            return;
        }

        let max_width = t


instances, otherwises for AppleFramebuffer-enabled only.

  @retval EFI_SUCCESS on success.
**/
EFI_STATUS
OcProvideGopPassThrough (
  IN BOOLEAN  ForAll
  );

/**
  Install and initialise Apple Framebuffer Info protocol
  on top of GOP protocol. For EfiBoot 10.4, which can only
  use UGA, this is the only way to obtain framebuffer base
  for XNU kernel PE Boot_args.

  @param[in] Reinstall  Overwrite installed protocol.

  @retval installed or located protocol or NULL.
**/
APPLE_FRAMEBUFFER_INFO_PROTOCOL *
OcAppleFbInfoInstallProtocol (
  IN BOOLEAN  Reinstall
  );

/**
  Install and initialise Apple EG2 Info protocol
  on top of GOP protocol. For newer EfiBoot this is the way
  to obtain screen rotation angle.

  @param[in] Reinstall  Overwrite installed protocol.

  @retval installed or located protocol or NULL.
**/
APPLE_EG2_INFO_PROTOCOL *
OcAppleEg2InfoInstallProtocol (
  IN BOOLEAN  Reinstall
  );

/**
  Dump GOP info to the specified directory.

  @param[in]  Root     Directory to write CPU data.

  @retval EFI_SUCCESS on success.
**/
EFI_STATUS
OcGopInfoDump (
  IN EFI_FILE_PROTOCOL  *Root
  );

#endif // OC_CONSOLE_LIB_H


4 80873D84 34C6D70A */  ori     $a2, $a2, 0xD70A           ## $a2 = 3BA3D70A
/* 01558 80873D88 26040308 */  addiu   $a0, $s0, 0x0308           ## $a0 = 00000308
/* 0155C 80873D8C 0C01E123 */  jal     Math_SmoothDownscaleMaxF

/* 01560 80873D90 8E050318 */  lw      $a1, 0x0318($s0)           ## 00000318
/* 01564 80873D94 3C053F4C */  lui     $a1, 0x3F4C                ## $a1 = 3F4C0000
/* 01568 80873D98 3C063DCC */  lui     $a2, 0x3DCC                ## $a2 = 3DCC0000
/* 0156C 80873D9C 3C073CA3 */  lui     $a3, 0x3CA3                ## $a3 = 3CA30000
/* 01570 80873DA0 34E7D70A */  ori     $a3, $a3, 0xD70A           ## $a3 = 3CA3D70A
/* 01574 80873DA4 34C6CCCD */  ori     $a2, $a2, 0xCCCD           ## $a2 = 3DCCCCCD
/* 01578 80873DA8 34A5CCCD */  ori     $a1, $a1, 0xCCCD           ## $a1 = 3F4CCCCD
/* 0157C 80873DAC 0C01E107 */  jal     Math_SmoothScaleMaxF

/* 01580 80873DB0 26040314 */  addiu   $a0, $s0, 0x0314           ## $a0 = 00000314
/* 01584 80873DB4 3C053E4C */  lui     $a1, 0x3E4C                ## $a1 = 3E4C0000
/* 01588 80873DB8 3C063CF5 */  lui     $a2, 0x3CF5                ## $a2 = 3CF50000
/* 0158C 80873DBC 3C073D4C */  lui     $a3, 0x3D4C                ## $a3 = 3D4C0000
/* 01590 80873DC0 34E7CCCD */  ori     $a3, $a3, 0xCCCD           ## $a3 = 3D4CCCCD
/* 01594 80873DC4 34C6C28F */  ori     $a2, $a2, 0xC28F           ## $a2 = 3CF5C28F
/* 01598 80873DC8 34A5CCCD */  ori     $a1, $a1, 0xCCCD           ## $a1 = 3E4CCCCD
/* 0159C 80873DCC 0C01E107 */  jal     Math_SmoothScaleMaxF

/* 015A0 80873DD0 26040318 */  addiu   $a0, $s0, 0x0318           ## $a0 = 00000318
/* 015A4 80873DD4 861900B6 */  lh      $t9, 0x00B6($s0)           ## 000000B6
/* 015A8 80873DD8 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 015AC 80873DDC 00003025 */  or      $a2, $zero, $zero          ## $a2 = 00000000
/* 015B0 80873DE0 27280BB8 */  addiu   $t0, $t9, 0x0BB8           ## $t0 = 00000BB8
/* 015B4 80873DE4 A60800B6 */  sh      $t0, 0x00B6($s0)           ## 000000B6
/* 015B8 80873DE8 0C21CA58 */  jal     func_80872960
/* 015BC 80873DEC 8FA50024 */  lw      $a1, 0x0024($sp)
.L


6 0,#fcfcfc 100%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  color: var(--bt-gcp-333);
  border-color: var(--bt-gcp-ccc);
  font-weight: bold;
}
[ct] [state="creator-studio"] #watch7-sub-count {
  display: none;
}
[ct] [state="subscribed"] #watch7-sub-button:active,
[ct] [state="creator-studio"] #watch7-sub-button:active {
  background: linear-gradient(to top,#e7e7e7 0,#ededed 100%);
  box-shadow: inset 0 1px 0 #ddd;
}
html[watch-metadata-style^="hitchhiker-2013-1"][layout] #watch7-sub-button {
  color: #333;
  background: linear-gradient(to bottom,#fff 0,#e0e0e0 100%);
  font-weight: bold;
  border: 1px solid #ccc;
  font-size: 12px;
  padding: 0 8px 0 5.5px;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
html[watch-metadata-style^="hitchhiker-2013-1"][layout] #watch7-sub-button:hover {
  box-shadow: 0 1px 0 rgba(0,0,0,.20);
  border: 1px solid #333;
  background: linear-gradient(to bottom,#fff 0,#d2d2d2 100%);
}
html[watch-metadata-style^="hitchhiker-2013-1"][layout] #watch7-sub-button:active {
  box-shadow: inset 0 1px 0 rgba(0,0,0,.30);
  border: 1px solid #333;
  background: linear-gradient(to top,#fff 0,#d2d2d2 100%);
}
html[watch-metadata-style^="hitchhiker-2013-1"] [state="subscribe"] .watch7-sub-icon {
  background: no-repeat url(http://s.ytimg.com/yts/imgbin/www-hitchhiker-vflaJ9wdK.png) 4px -143px;
  background-size: auto;
  width: 24px;
  height: 22px;
  background-color: #a9382e;
  border: 1px solid #880904;
  position: relative;
  left: -6px;
  border-radius: 2px 0 0 2px;
}
[ct] #watch7-notif-button {
  background: #f8f8f8;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  color: var(--bt-gcp-999);
  border: 1px solid #d3d3d3;
  border-left: none !important;
  border-radius: 0 2px 2px 0;
  height: 22px;
  display: flex;
  align-items: center;
  width: 22px;
  cursor: pointer;
}
[ct] #watch7-notif-button:hover {
  background: #f0f0f0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.10);
  border: 1px solid #c6c6c6;
}
[ct] #watch7-notif-button:active {
  background: #e9e9e9;
  box-shadow: inset 0 1px 0 #ddd;
  border: 1px solid #c6c6c6;
}
[ct] .watch7-notif-icon {
  background: no-repeat url(https://s.ytimg.com/yts/imgbin/www-hitchhiker-vflEXP50f.png) -35px -305px;
  width: 12px;
  height: 12px;
  display: block;
  margin: 0 auto;
}
[ct] #watch7-notif-button:hover .watch7-notif-icon {
  background-pos


_gpu *particles, tool_3d_gpu *tool) {
	char buf[256] = "results/vtk_tool_";

	vtk_writer_write(particles);
	vtk_writer_write(tool, buf);
}

void vtk_writer_write(tool_3d_gpu *tool, particle_gpu *particles) {
	char buf[256] = "results/vtk_tool_";

	vtk_writer_write(particles);
	vtk_writer_write(tool, buf);
}

void vtk_writer_write(std::vector<tool_3d_gpu *> tool, particle_gpu *particles) {

	vtk_writer_write(particles);

	unsigned int number_of_tool = 0;
	char filename[256] = "results/vtk_tool";

	if (!m_individual_tool_files) {
		vtk_writer_write_unified(tool, filename);
	} else {
		for (auto current_tool : tool) {
			sprintf(filename, "results/vtk_tool_%01d", number_of_tool);
			vtk_writer_write(current_tool, filename);
			number_of_tool++;
		}
	}

	if (global_blanking) {
		vtk_writer_write_blanking();
	}
}

void vtk_writer_write(particle_gpu *particles, std::vector<tool_3d_gpu *> tool) {	// write multiple tools  & particles, based on iwf_mfree version; HK, Mo, 25.06.2018
	vtk_writer_write(tool, particles);
}
//Copyright ETH Zurich, IWF

//This file is part of iwf_mfree_gpu_3d.

//iwf_mfree_gpu_3d 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.

//iwf_mfree_gpu_3d 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 mfree_iwf.  If not, see <http://www.gnu.org/licenses/>.

#include "vtk_reader.h"

template<typename Out>
static void split(const std::string &s, char delim, Out &result) {
    std::stringstream ss(s);
    std::string item;
    while (std::getline(ss, item, delim)) {
        result.push_back(item);
    }
}

std::vector<float4_t> vtk_read_init_pos(std::string file_name) {
	std::vector<float4_t> points;

	std::string line;
	std::string point_id("POINTS");
	std::string stop_id("CELLS");

	bool point_sec = false;
	std::ifstream infile(file_name, std::ifstream::in);

	while (std::getline(infile, line)) {
		if (line.find(point_id) != std::string::npos) {
			point_sec = true;
			continue;
		}

		if (line.compare(" ") == 0) {
			continue;
		}

		if (point_sec && line.find(stop_id) != std::str


div style="background: #eee; padding: 2px;">uriloader/exthandler/nsIExternalProtocolService.idlScriptable

The external protocol service is used for finding and launching web handlers (a la registerProtocolHandler in the HTML5 draft) or platform-specific applications for handling particular protocols.

Inherits from: nsISupports
Last changed in Gecko 1.9 (Firefox 3)

You can ask the external protocol service if it has an external handler for a given protocol scheme. And you can ask it to load the url using the default handler.

Method overview

 boolean externalProtocolHandlerExists(in string aProtocolScheme);

 AString getApplicationDescription(in AUTF8String aScheme);

 nsIHandlerInfo getProtocolHandlerInfo(in ACString aProtocolScheme);

 nsIHandlerInfo getProtocolHandlerInfoFromOS(in ACString aProtocolScheme, out boolean aFound);

 boolean isExposedProtocol(in string aProtocolScheme);

 void loadURI(in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext);

 void loadUrl(in nsIURI aURL);

 void setProtocolHandlerDefaults(in nsIHandlerInfo aHandlerInfo, in boolean aOSHandlerExists);

Methods

externalProtocolHandlerExists()

Check whether a handler for a specific protocol exists. Specifically, this looks to see whether there are any known possible application handlers in either the nsIHandlerService datastore or registered with the OS.

boolean externalProtocolHandlerExists(
  in string aProtocolScheme
);

Parameters

aProtocolScheme

The scheme from a url: http, ftp, mailto, and so on.
Note: aProtocolScheme should not include a trailing colon, which is part of the URI syntax, not part of the scheme itself. That


Settings;
  const YaruSettings._();

  String? getThemeName();
  String? getAccentColor();
  bool? getStatusShapes();
  Stream<String?> get themeNameChanged;
  Stream<String?> get accentColorChanged;
  Stream<bool?> get statusShapesChanged;
  void init();
  Future<void> dispose();
}

class YaruGtkSettings extends YaruSettings {
  YaruGtkSettings([
    @visibleForTesting GtkSettings? settings,
    @visibleForTesting GSettingsService? settingsService,
  ]) : _gtkSettings = settings ?? GtkSettings(),
       _gSettingsService = settingsService ?? GSettingsService(),
       super._();

  final GtkSettings _gtkSettings;
  final GSettingsService _gSettingsService;
  GnomeSettings? _gSettings;
  GnomeSettings? _gA11ySettings;

  @override
  String? getThemeName() => _gtkSettings.getProperty(kGtkThemeName) as String?;

  @override
  Stream<String?> get themeNameChanged =>
      _gtkSettings.notifyProperty(kGtkThemeName).cast<String?>();

  final _accentColorController = StreamController<String?>.broadcast();
  @override
  Stream<String?> get accentColorChanged => _accentColorController.stream;

  final _statusShapesController = StreamController<bool?>.broadcast();
  @override
  Stream<bool?> get statusShapesChanged => _statusShapesController.stream;

  @override
  void init() {
    _gSettings ??= _gSettingsService.lookup(kSchemaInterface);
    _gSettings?.addListener(() => _accentColorController.add(getAccentColor()));

    _gA11ySettings ??= _gSettingsService.lookup(kA11ySchemaInterface);
    _gA11ySettings?.addListener(
      () => _statusShapesController.add(getStatusShapes()),
    );
  }

  @override
  Future<void> dispose() async {
    await _accentColorController.close();
    await _gSettingsService.dispose();
  }

  @override
  String? getAccentColor() => _gSettings?.stringValue(kAccentColorKey);

  @override
  bool? getStatusShapes() => _gA11ySettings?.boolValue(kStatusShapesKey);
}
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:yaru/constants.dart';

import 'yaru_check_button.dart';
import 'yaru_checkbox_theme.dart';
import 'yaru_radio.dart';
import 'yaru_switch.dart';
import 'yaru_togglable.dart';

// NOTE: keep in sync with Radio
const _kCheckboxActivableAreaPadding = EdgeInsets.all(6);
const _kCheckboxTogglableSize = Size.square(20);

const _kCheckboxBorderRadius = Radius.circular(kYaruCheckRadius);
const _kCheckboxDashStroke = 2.0;
const _kDashSizeFactor = 0.52;

/// A Yaru checkbox.
///
/// The checkbox itself does not maintain any state. Instead, when the state of
/// the checkbox changes, the widget calls the [onChanged] callback. Most
/// widgets that use a checkbox will listen for the [onChanged] callback and
/// rebuild the checkbox with a new [value] to update the visual appearance of
/// the checkbox.
///
/// The checkbox can optionally display three values - true, false, and null -
/// if [tristate] is true. When [value] is null a dash is displayed. By default
/// [tristate] is false and the checkbox's [value] must be true or false.
///
/// See also:
///
///  * [YaruCheckButton], a desktop style check button with an interactive label.
///  * [YaruSwitch], a widget with semantics similar to [Checkbox].
///  * [YaruRadio], for selecting among a set of explicit values.
///  * [Slider], for selecting a value in a range.
class YaruCheckbox extends StatefulWidget implements YaruTogglable<bool?> {
  /// A Yaru checkbox.
  ///
  /// T


interpolation_length],
          sizeof(int16_t) * (input_length_per_channel - interpolation_length));
    }

    // Do overlap and mix linearly.
    int16_t increment =
        static_cast<int16_t>(16384 / (interpolation_length + 1));  // In Q14.
    int16_t local_mute_factor = 16384 - increment;
    memmove(temp_data_.data(), expanded_channel.get(),
            sizeof(int16_t) * best_correlation_index);
    DspHelper::CrossFade(&expanded_channel[best_correlation_index],
                         input_channel.get(), interpolation_length,
                         &local_mute_factor, increment, decoded_output);

    output_length = best_correlation_index + input_length_per_channel;
    if (channel == 0) {
      RTC_DCHECK(output->Empty());  // Output should be empty at this point.
      output->AssertSize(output_length);
    } else {
      RTC_DCHECK_EQ(output->Size(), output_length);
    }
    (*output)[channel].OverwriteAt(temp_data_.data(), output_length, 0);
  }

  // Copy back the first part of the data to `sync_buffer_` and remove it from
  // `output`.
  sync_buffer_->ReplaceAtIndex(*output, old_length, sync_buffer_->next_index());
  output->PopFront(old_length);

  // Return new added length. `old_length` samples were borrowed from
  // `sync_buffer_`.
  RTC_DCHECK_GE(output_length, old_length);
  return output_length - old_length;
}

size_t Merge::GetExpandedSignal(size_t* old_length, size_t* expand_period) {
  // Check how much data that is left since earlier.
  *old_length = sync_buffer_->FutureLength();
  // Should never be less than overlap_length.
  RTC_DCHECK_GE(*old_length, expand_->overlap_length());
  // Generate data to merge the overlap with using expand.
  expand_->SetParametersForMergeAfterExpand();

  if (*old_length >= 210 * kMaxSampleRate / 8000) {
    // TODO(hlundin): Write test case for this.
    // The number of samples available in the sync buffer is more than what fits
    // in expanded_signal. Keep the first 210 * kMaxSampleRate / 8000 samples,
    // but shift them towards the end of the buffer. This is ok, since all of
    // the buffer will be expand data anyway, so as long as the beginning is
    // left untouched, we're fine.
    size_t length_diff = *old_length - 210 * kMaxSampleRate / 8000;
    sync_buffer_->InsertZerosAtIndex(length_diff, sync_buffer_->next_index());
    *old_length = 210 * kMaxSampleRate / 8000;
    // This is the truncated length.
  }
  // This assert should always be true thanks to the if statement above.
  RTC_DCHECK_GE(210 * kMaxSampleRate / 8000, *old_length);

  AudioMultiVector expanded_temp(num_channels_);
  expand_->Process(&expanded_temp);
  *expand_period = expanded_temp.Size();  // Samples per channel.

  expanded_.Clear();
  // Copy what is left since earlier into the expanded vector.
  expanded_.PushBackFromIndex(*sync_buffer_, sync_buffer_->next_index());
  RTC_DCHECK_EQ(expanded_.Size(), *old_length);
  RTC_DCHECK_GT(expanded_temp.Size(), 0);
  // Do "ugly" copy and paste from the expanded in order to generate more data
  // to correlate (but not interpolate) with.
  const size_t required_length = static_cast<size_t>((120 + 80 + 2) * fs_mult_);
  if (expanded_.Size() < required_length) {


// Copyright (c) 2014-2019 The Dash Core developers
// Copyright (c) 2020 The Neoxa developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef NETFULFILLEDMAN_H
#define NETFULFILLEDMAN_H

#include "netaddress.h"
#include "serialize.h"
#include "sync.h"

class CNetFulfilledRequestManager;
extern CNetFulfilledRequestManager netfulfilledman;

// Fulfilled requests are used to prevent nodes from asking for the same data on sync
// and from being banned for doing so too often.
class CNetFulfilledRequestManager
{
private:
    typedef std::map<std::string, int64_t> fulfilledreqmapentry_t;
    typedef std::map<CService, fulfilledreqmapentry_t> fulfilledreqmap_t;

    //keep track of what node has/was asked for and when
    fulfilledreqmap_t mapFulfilledRequests;
    CCriticalSection cs_mapFulfilledRequests;

    void RemoveFulfilledRequest(const CService& addr, const std::string& strRequest);

public:
    CNetFulfilledRequestManager() {}

    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action) {
        LOCK(cs_mapFulfilledRequests);
        READWRITE(mapFulfilledRequests);
    }

    void AddFulfilledRequest(const CService& addr, const std::string& strRequest);
    bool HasFulfilledRequest(const CService& addr, const std::string& strRequest);

    void RemoveAllFulfilledRequests(const CService& addr);

    void CheckAndRemove();
    void Clear();

    std::string ToString() const;

    void DoMaintenance();
};

#endif


0,c:[{bK:"and not"}].concat(c)},u={b:t+"\\s*:",rB:!0,e:"[;}]",r:0,c:[{cN:"attribute",b:t,e:":",eE:!0,starts:{eW:!0,i:"[<=$]",r:0,c:c}}]},l={cN:"keyword",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},C={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:i}},p={v:[{b:"[\\.#:&\\[>]",e:"[;{}]"},{b:t,e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",r:0,c:[e.CLCM,e.CBCM,o,b("keyword","all\\b"),b("variable","@{"+r+"}"),b("selector-tag",t+"%?",0),b("selector-id","#"+t),b("selector-class","\\."+t,0),b("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"\\(",e:"\\)",c:i},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,C,u,p),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),r={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},i=e.C("--","$"),o=e.C("\\(\\*","\\*\\)",{c:["self",i]}),n=[i,o,e.HCM];return{aliases:["osascript"],k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"built_in",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|


ue alineado, pero nesecitamos crear un "STACK FRAME", para que cada llamada
; guarde su punto de regreso sin corromper el punto guardado por la llamada anterior.
recursion1:
  push rbp
  mov rbp, rsp
  sub rsp, 16
  mov rcx, rdi
  mov [rbp - 16], rcx
  lea rdi, [printf_mask]
  mov rsi, rcx
  call printf
  mov rcx, [rbp - 16]
  dec rcx
  mov rdi, rcx
  test rcx, rcx
  jz .done
  call recursion1
.done:
  add rsp, 16
  pop rbp
  ret

; RDI: posición del elemento de la sucesión de Fibonacci a calcular.
; NOTA: esta función es muy lenta. Se puede optimizar bastante puesto que para cada recursión calcula
; todos los numeros de fibonacci anteriores.
fibonacci:
  push rbp
  mov rbp, rsp
  sub rsp, 32
  mov [rbp - 32], rdi

  cmp rdi, 1
  mov rax, rdi
  jle .return
  sub rdi, 1
  call fibonacci
  mov [rbp - 16], rax
  mov rdi, [rbp - 32]
  sub rdi, 2
  call fibonacci
  add rax, [rbp - 16]
  jmp .return
.return:
  add rsp, 32
  pop rbp
  ret

; RDI: el número del cual se va a calcular el factorial.
factorial:
  push rbp
  mov rbp, rsp
  sub rsp, 32
  mov [rbp - 32], rdi
  cmp rdi, 1
  jg .calculate
  mov rax, 1
  jmp .return
.calculate:
  dec rdi
  call factorial
  inc rdi
  mul rdi
  jmp .return
.return:
  add rsp, 32
  pop rbp
  ret

section .data
  printf_mask: db "%d ", 0x00
  fibonacci_mask: db "El elemento [%d] de fibonacci es: %d", 0x0A, 0x00
  factorial_mask: db "El factorial de [%d] es: %d", 0x0A, 0x00
  LF: db 0x0A, 0x00

section .bss


= testCase.model.lookup<NumberShape>("test#${testCase.shapeName}")

        val codegenContext = serverTestCodegenContext(testCase.model)
        val symbolProvider = codegenContext.symbolProvider

        val project = TestWorkspace.testProject(symbolProvider)

        project.withModule(ServerRustModule.Model) {
            TestUtility.generateIsDisplay().invoke(this)
            TestUtility.generateIsError().invoke(this)

            ConstrainedNumberGenerator(
                codegenContext,
                this.createTestInlineModuleCreator(),
                this,
                shape,
                SmithyValidationExceptionConversionGenerator(codegenContext),
            ).render()

            unitTest(
                name = "try_from_success",
                test = """
                    let _constrained: ${testCase.shapeName} = ${testCase.validValue}.try_into().unwrap();
                """,
            )
            unitTest(
                name = "try_from_fail",
                test = """
                    let constrained_res: Result<${testCase.shapeName}, _> = ${testCase.invalidValue}.try_into();
                    let error = constrained_res.unwrap_err();
                    is_error(&error);
                    is_display(&error);
                """,
            )
            unitTest(
                name = "inner",
                test = """
                    let constrained = ${testCase.shapeName}::try_from(${testCase.validValue}).unwrap();
                    assert_eq!(constrained.inner(), &${testCase.validValue});
                """,
            )
            unitTest(
                name = "into_inner",
                test = """
                    let v = ${testCase.validValue};
                    let constrained = ${testCase.shapeName}::try_from(v).unwrap();

                    assert_eq!(constrained.into_inner(), v);
                """,
            )
        }

        project.compileAndTest()
    }

    class NoStructuralConstructorTestProvider : ArgumentsProvider {
        override fun provideArguments(context: ExtensionContext?): Stream<out Arguments> =
            listOf(
                Triple("byte", "ConstrainedByte", "i8"),
                Triple("short", "ConstrainedShort", "i16"),
                Triple("integer", "ConstrainedInteger", "i32"),
                Triple("long", "ConstrainedLong", "i64"),
            ).map { Arguments.of(it) }.stream()
    }

    @ParameterizedTest
    @ArgumentsSource(NoStructuralConstructorTestProvider::class)
    fun `type should not be constructable without using a constructor`(args: Triple<String, String, String>) {
        val (smithyType, shapeName, rustType) = args
        val model =
            """
            namespace test

            @range(min: -1, max: 5)
            $smithyType $shapeName
            """.asSmithyModel()
        val constrainedShape = model.lookup<NumberShape>("test#$shapeName")

        val codegenContext = serverTestCodegenContext(model)

        val writer = RustWriter.forModule(ServerRustModule.Model.name)
        ConstrainedNumberGenerator(
            codegenContext,
            writer.createTestInlineModuleCreator(),
            writer,
            constrainedShape,
            SmithyValidationExceptionConversionGenerator(codegenContext),
        ).render()

        // Check that the wrapped type is `pub(crate)`.
        writer.toString() shouldContain "pub struct $shapeName(pub(crate) $rustType);"
    }
}
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

package software.amazon.smithy.rust.codegen.server.smithy.generators

import org.junit.jupiter.api.Test
import software.amazon.smithy.rust.codegen.core.rustlang.rust
import software.amazon.smithy.rust.codegen.core.testutil.asSmithyModel
import software.amazon.smithy.rust.codegen.core.


    pow(double x,
        int y);                 // (5) C++03まで
  long double
    pow(long double x,
        int y);                 // (6) C++03まで

  floating-point-type
    pow(floating-point-type x,
        floating-point-type y); // (7) C++23
  constexpr floating-point-type
    pow(floating-point-type x,
        floating-point-type y); // (7) C++26

  Promoted
    pow(Arithmetic1 x,
        Arithmetic2 y);         // (8) C++11
  constexpr Promoted
    pow(Arithmetic1 x,
        Arithmetic2 y);         // (8) C++26

  float
    powf(float x,
         float y);              // (9) C++17
  constexpr float
    powf(float x,
         float y);              // (9) C++26

  long double
    powl(long double x,
         long double y);        // (10) C++17
  constexpr long double
    powl(long double x,
         long double y);        // (10) C++26
}
```
* Promoted[italic]
* Arithmetic1[italic]
* Arithmetic2[italic]

## 概要
`x` の `y` 乗を求める。

- (1) : `float`に対するオーバーロード
- (2) : `double`に対するオーバーロード
- (3) : `long double`に対するオーバーロード
- (4) : `float`に対するオーバーロードで、`int`型の`y`をとる
- (5) : `double`に対するオーバーロードで、`int`型の`y`をとる
- (6) : `long double`に対するオーバーロードで、`int`型の`y`をとる
- (7) : 浮動小数点数型に対するオーバーロード
- (8) : 算術型に対するオーバーロード (大きい精度にキャストして計算される。整数は`double`で計算される)
- (9) : `float`型規定
- (10) : `long double`型規定

## 戻り値
`x` を `y` 乗した値を返す。

`x` が負の有限値で `y` が有限値でかつ整数ではない場合には、定義域エラーが発生する。オーバーフローエラー、アンダーフローエラーが発生する可能性がある。`x` と `y` が両方ともゼロの場合には、定義域エラーが発生する可能性がある。`x` がゼロで `y` がゼロ未満の場合には、定義域エラーか極エラーが発生する可能性がある。

## 備考
- $$ f(x, y) =


_CMD("1000"),
    PLAYER_ITEM_LORE_GAMES_PLAYED("Amount of games played: <green>%s</green>"),
    PLAYER_ITEM_LORE_TOTAL_PLAYTIME("Total playtime: <green>%s</green>"),
    PLAYER_ITEM_LORE_HIGH_SCORE("HiScore: <green>%s</green>"),
    PLAYER_ITEM_LORE_AVERAGE_SCORE("Average Score: <green>%s</green>"),
    PLAYER_ITEM_LORE_CURRENT_SCORE("Current score: <green>%s</green>"),
    PLAYER_ITEM_LORE_CURRENT_PLAYTIME("Current playtime: <green>%s</green>"),

    HELP_GUI_TITLE("     <blue>MC2048 HELP WINDOW"),
    HELP_GUI_FILLER_MATERIAL("LIGHT_BLUE_STAINED_GLASS_PANE"),
    HELP_GUI_FILLER_MATERIAL_CMD("1000"),
    HELP_GUI_LEGEND_ITEM_NAME_PREFIX("Points: "),

    START_BUTTON_MATERIAL("NETHERITE_UPGRADE_SMITHING_TEMPLATE"),
    START_BUTTON_MATERIAL_CMD("1000"),
    START_BUTTON_NAME("Click to start game!"),
    START_BUTTON_LORE_1("Click to play the iconic 2048 game!"),
    START_BUTTON_LORE_2(""),

    HIGH_SCORE_ITEM_NAME("<blue><bold>High scores"),
    HIGH_SCORE_ITEM_MATERIAL("SKULL_BANNER_PATTERN"),
    HIGH_SCORE_ITEM_MATERIAL_CMD("1000"),
    HIGH_SCORE_ITEM_LORE_FORMAT("<aqua>%s</aqua>"),

    INFO_ITEM_NAME("MC2048 Information"),
    INFO_ITEM_MATERIAL("AMETHYST_CLUSTER"),
    INFO_ITEM_MATERIAL_CMD("1000"),
    INFO_ITEM_LORE_1("MC2048 is a game where you match numbers."),
    INFO_ITEM_LORE_2("If you put two of the same numbers together, they combine into their sum."),
    INFO_ITEM_LORE_3("Keep combining numbers to make the biggest one you can."),
    INFO_ITEM_LORE_4("If the board fills up, the game is over."),
    INFO_ITEM_LORE_5("Aim for the highest number!"),

    MATERIAL_TWO("RAW_COPPER"),
    MATERIAL_TWO_CMD("1000"),
    MATERIAL_FOUR("COPPER_INGOT"),
    MATERIAL_FOUR_CMD("1000"),
    MATERIAL_EIGHT("COPPER_BLOCK"),
    MATERIAL_EIGHT_CMD("1000"),
    MATERIAL_SIXTEEN("RAW_IRON"),
    MATERIAL_SIXTEEN_CMD("1000"),
    MATERIAL_THIRTY_TWO("IRON_NUGGET"),
    MATERIAL_THIRTY_TWO_CMD("1000"),
    MATERIAL_SIXTY_FOUR("IRON_INGOT"),
    MATERIAL_SIXTY_FOUR_CMD("1000"),
    MATERIAL_HUNDRED_TWENTY_EIGHT("IRON_BLOCK"),
    MATERIAL_HUNDRED_TWENTY_EIGHT_CMD("1000"),
    MATERIAL_TWO_HUNDRED_FIFTY_SIX("RAW_GOLD"),
    MATERIAL_TWO_HUNDRED_FIFTY_SIX_CMD("1000"),
    MATERIAL_FIVE_HUNDRED_TWELVE("GOLD_NUGGET"),
    MATERIAL_FIVE_HUNDRED_TWELVE_CMD("1000"),
    MATERIAL_ONE_THOUSAND_TWENTY_FOUR("GOLD_INGOT"),
    MATERIAL_ONE_THOUSAND_TWENTY_FOUR_CMD("1000"),
    MATERIAL_TWO_THOUSAND_FORTY_EIGHT("GOLD_BLOCK"),
    MATERIAL_TWO_THOUSAND_FORTY_EIGHT_CMD("1000"),
    MATERIAL_FOUR_THOUSAND_NINETY_SIX("EMERALD"),
    MATERIAL_FOUR_THOUSAND_NINETY_SIX_CMD("1000"),
    MATERIAL_EIGHT_THOUSAND_ONE_HUNDRED_NINETY_TWO("EMERALD_BLOCK"),
    MATERIAL_EIGHT_THOUSAND_ONE_HUNDRED_NINETY_TWO_CMD("1000"),
    MATERIAL_SIXTEEN_THOUSAND_THREE_HUNDRED_EIGHTY_FOUR("LAPIS_LAZULI"),
    M


也算是专业对口，就专门做些接待和培训上的工作。

“首长。”

苏爱走了进来，恭恭敬敬的裣衽福了一福。虽然已经不是第一次见面，依旧是万般恭顺，行过礼，立刻站到一旁垂手听候吩咐。

要在过去，于私她是裴丽秀的“手帕交”，无话不谈的闺中好友；于公，她是堂堂的广州巡按身边最得宠的如夫人，裴丽秀与她相交，那是攀附。

现在可不大相同，裴丽秀不但是正儿八经的统治广州城，乃至整个广东的元老院的元老，在大宋是“贵不可言”；亦是这自己能栖身维生的紫明楼的大掌柜。自己不过是“丧家之犬”，在她手下靠着过去的交情混口饭吃。这两者的关系可不能搞错了。

所以她到紫明楼之后，从来不敢以裴丽秀“故人”的身份自居，总是毕恭毕敬，做小伏低。

裴丽秀对她这套做派也见怪不怪了，心里也颇为受用。她将手一摆，客气道：

“我们姐妹还客气这个做什么，坐，坐，陪我聊会天。”

“是，多谢首长。”裴丽秀低声道，小心翼翼的在下首凳子上坐下。

裴丽秀把苏爱叫来，自然不是和她叙旧或是谈诗论词――当初苏爱就知道，这位裴姑娘是个草包，别说诗词歌赋，就是写几个字，还不如书香世家的丫鬟。充其量也就是识几个字罢了。

过去的紫明楼的贵妇沙龙里，裴丽秀扮演的不过是一个好客热情的女主人罢了，要谈到风雅的东西，她是一窍不通的。

裴丽秀其实是在打访春院的算盘――访春院她虽然没去过，但是听人说过这是城里数一数二的大行院，不但房屋宏丽，地理位置也极好。如果紫明楼能占下来，对未来的业务发展大有好处。

这还是其一，裴丽秀的野心还不止于此，在她看来，旧行院丰富的人力亦是可观的资源，正是补充紫明楼日益扩大的的员工队伍的合适人选，对开展多种经营有莫大的好处。

不过，她到底是个现代女人


key, val in pairs(v) do
						 fdt[k] = fdt[k] or {}
						 fdt[k][key] = val
					 end
				 else
					 fdt[k] = v
				 end
			 end

			 local flag = true
			 params.filters = params.filters or {}
			 for k, v in pairs(params.filters) do
				 -- to redundant query condition, once meet, jump immediately
				 if not fdt[k] then
					 -- if k == 'vl' then self.__fields[field][k] = 0 end
					 if k == 'vl' then fdt[k] = 0 end
				 end

				 if type(v) == 'function' then
					 flag = v(fdt[k] or '')
					 if not flag then break end
				 else
					 if fdt[k] ~= v then flag=false; break end
				 end
			 end

			 if flag then
				 output = output .. fdt:toHtml(self, field, params.format or nil)
			 end

		 end

		 return output
	 end


:
	addi 	sp, sp, -4			# Aloca espaco
	sw 	ra, 0(sp)			    # salva ra
	la 	t0, TEMP_BUFFER			# carrega o Endereco do Buffer da String

	bge 	a0, zero, ehpos_print_int		# Se eh positvo
	li 	t1, '-'				# carrega o sinal -
	sb 	t1, 0(t0)			# coloca no buffer
	addi 	t0, t0, 1		# incrementa endereco do buffer
	sub 	a0, zero, a0	# torna o numero positivo

ehpos_print_int:
	li 	t2, 10				# carrega numero 10
	li 	t1, 0				# carrega numero de digitos com 0

loop1_print_int:
	div 	t4, a0, t2			# divide por 10 (quociente)
	rem 	t3, a0, t2			# resto
	addi  sp, sp, -4			        # aloca espaco na pilha
	sw 	t3, 0(sp)			# coloca resto na pilha
	mv 	a0, t4				# atualiza o numero com o quociente
	addi 	t1, t1, 1			# incrementa o contador de digitos
	bne 	a0, zero, loop1_print_int		# verifica se o numero eh zero

loop2_print_int:
	lw 	t2, 0(sp)			    # le digito da pilha
	addi 	sp, sp, 4			# libera espaco
	addi 	t2, t2, 48			# converte o digito para ascii
	sb 	t2, 0(t0)			    # coloca caractere no buffer
	addi 	t0, t0, 1			# incrementa endereco do buffer
	addi 	t1, t1, -1			# decrementa contador de digitos
	bne 	t1, zero, loop2_print_int		# eh o ultimo?
	sb 	zero, 0(t0)			    # insere \NULL na string

	la 	a0, TEMP_BUFFER			# Endereco do buffer da srting
	jal 	PRINT_STRING		# chama o print string

	lw 	ra, 0(sp)			# recupera a
	addi 	sp, sp, 4			# libera espaco
fim_print_int:
	ret					# retorna

#########################################################
#	Desenha uma string na tela                            #
#########################################################
#  a0    =  endereco da string                          #
#  a1    =  x                                           #
#  a2    =  y                                           #
#  a3    =  cor		    	                                #
#########################################################

PRINT_STRING:
	addi	sp, sp, -12                        # aloca espaco
	sw	ra, 0(sp)                           # salva ra
  	sw	s0, 4(sp)                           # salva s0
	sw  s1, 8(sp)
	mv	s0, a0                              # s0 = endereco do caractere na string
	mv s1, a1                               # s1 = x para voltar caso \n

loop_PRINT_STRING:
	lb	a0, 0(s0)                           # le em a0 o caracter a ser impresso
	beq     a0, zero, fimloop_PRINT_STRING  # string ASCIIZ termina com NULL

	li t6, '\n'
	beq a0, t6, pula_linha_PRINT_STRING     # Checking if char is \n

	jal     PRINT_CHAR                      # imprime char


sdk-online-cpu-0.1.6 (f99925110d27)
- 2023/11/09:   中文实时语音听写服务 1.5 发布，修复无实时结果的问题，dokcer镜像版本funasr-runtime-sdk-online-cpu-0.1.5 (b16584b6d38b)
- 2023/11/08:   中文实时语音听写服务 1.4 发布，支持服务端加载热词(更新热词通信协议)、runtime结构变化适配（FunASR/funasr/runtime->FunASR/runtime），dokcer镜像版本funasr-runtime-sdk-online-cpu-0.1.4 (691974017c38)
- 2023/09/19:   中文实时语音听写服务 1.2 发布，2pass模式支持热词、时间戳、ITN模型，dokcer镜像版本funasr-runtime-sdk-online-cpu-0.1.2 (7222c5319bcf)
- 2023/08/11:   中文实时语音听写服务 1.1 发布，修复了部分已知的bug(包括server崩溃等)，dokcer镜像版本funasr-runtime-sdk-online-cpu-0.1.1 (bdbdd0b27dee)
- 2023/08/07:   中文实时语音听写服务 1.0 发布，dokcer镜像版本funasr-runtime-sdk-online-cpu-0.1.0 (bdbdd0b27dee)，原理介绍文档（[点击此处](https://mp.weixin.qq.com/s/8He081-FM-9IEI4D-lxZ9w)）

### 部署与开发文档

部署模型来自于ModelScope，或者用户finetune，支持用户定制服务，详细文档参考（[点击此处](./docs/SDK_advanced_guide_online_zh.md)）

## 中文离线文件转写服务（CPU版本）

中文语音离线文件服务部署（CPU版本），拥有完整的语音识别链路，可以将几十个小时的长音频与视频识别成带标点的文字，而且支持上百路请求同时进行转写。
为了支持不同用户的需求，针对不同场景，准备了不同的图文教程：

### 最新动态
- 2024/05/15:   中文离线文件转写服务 4.5 发布，适配FunASR 1.0模型结构，dokcer镜像版本funasr-runtime-sdk-cpu-0.4.5 (058b9882ae67)
- 2024/03/05:   中文离线文件转写服务 4.4 发布，docker镜像支持arm64平台，升级modelscope版本，dokcer镜像版本funasr-runtime-sdk-cpu-0.4.4 (2dc87b86dc49)
- 2024/01/25:   中文离线文件转写服务 4.2 发布，优化vad数据处理方式，大幅降低峰值内存占用，内存泄漏优


open(struct inode *inode, struct file *file)
{
	return single_open(file, sync_debugfs_show, inode->i_private);
}

static const struct file_operations sync_info_debugfs_fops = {
	.open           = sync_info_debugfs_open,
	.read           = seq_read,
	.llseek         = seq_lseek,
	.release        = single_release,
};

static __init int sync_debugfs_init(void)
{
	dbgfs = debugfs_create_dir("sync", NULL);

	/*
	 * The debugfs files won't ever get removed and thus, there is
	 * no need to protect it against removal races. The use of
	 * debugfs_create_file_unsafe() is actually safe here.
	 */
	debugfs_create_file_unsafe("info", 0444, dbgfs, NULL,
				   &sync_info_debugfs_fops);
	debugfs_create_file_unsafe("sw_sync", 0644, dbgfs, NULL,
				   &sw_sync_debugfs_fops);

	return 0;
}
late_initcall(sync_debugfs_init);

#define DUMP_CHUNK 256
static char sync_dump_buf[64 * 1024];
void sync_dump(void)
{
	struct seq_file s = {
		.buf = sync_dump_buf,
		.size = sizeof(sync_dump_buf) - 1,
	};
	int i;

	sync_debugfs_show(&s, NULL);

	for (i = 0; i < s.count; i += DUMP_CHUNK) {
		if ((s.count - i) > DUMP_CHUNK) {
			char c = s.buf[i + DUMP_CHUNK];

			s.buf[i + DUMP_CHUNK] = 0;
			pr_cont("%s", s.buf + i);
			s.buf[i + DUMP_CHUNK] = c;
		} else {
			s.buf[s.count] = 0;
			pr_cont("%s", s.buf + i);
		}
	}
}


// SPDX-License-Identifier: GPL-2.0+
/*
 * Andestech ATFTMR010 timer driver
 *
 * (C) Copyright 2016
 * Rick Chen, NDS32 Software Engineering, rick@andestech.com
 */
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
#include <linux/io.h>

/*
 * Timer Control Register
 */
#define T3_UPDOWN	(1 << 11)
#define T2_UPDOWN	(1 << 10)
#define T1_UPDOWN	(1 << 9)
#define T3_OFENABLE	(1 << 8)
#define T3_CLOCK	(1 << 7)
#define T3_ENABLE	(1 << 6)
#define T2_OFENABLE	(1 << 5)
#define T2_CLOCK	(1 << 4)
#define T2_ENABLE	(1 << 3)
#define T1_OFENABLE	(1 << 2)
#define T1_CLOCK	(1 << 1)
#define T1_ENABLE	(1 << 0)

/*
 * Timer Interrupt State & Mask Registers
 */
#define T3_OVERFLOW	(1 << 8)
#define T3_MATCH2	(1 << 7)
#define T3_MATCH1	(1 << 6)
#define T2_OVERFLOW	(1 << 5)
#define T2_MATCH2	(1 << 4)
#define T2_MATCH1	(1 << 3)
#define T1_OVERFLOW	(1 << 2)
#define T1_MATCH2	(1 << 1)
#define T1_MATCH1	(1 << 0)

struct atftmr_timer_regs {
	u32	t1_counter;		/* 0x00 */
	u32	t1_load;		/* 0x04 */
	u32	t1_match1;		/* 0x08 */
	u32	t1_match2;		/* 0x0c */
	u32	t2_counter;		/* 0x10 */
	u32	t2_load;		/* 0x14 */
	u32	t2_match1;		/* 0x18 */
	u32	t2_match2;		/* 0x1c */
	u32	t3_counter;		/* 0x20 */
	u32	t3_load;		/* 0x24 */
	u32	t3_match1;		/* 0x28 */
	u32	t3_match2;		/* 0x2c */
	u32	cr;			/* 0x30 */
	u32	int_state;		/* 0x34 */
	u32	int_mask;		/* 0x38 */
};

struct atftmr_timer_platdata {
	struct atftmr_timer_regs *regs;
};

static int atftmr_timer_get_count(struct udevice *dev, u64 *count)
{
	struct atftmr_timer_platdata *plat = dev->platdata;
	struct atftmr_timer_regs *const regs = plat->regs;
	u32 val;
	val = readl(&regs->t3_counter);
	*count = timer_conv_64(val);
	return 0;
}

static int atftmr_timer_probe(struct udevice *dev)
{
	struct atftmr_timer_platdata *plat = dev->platdata;
	struct atftmr_timer_regs *const regs = plat->regs;
	u32 cr;
	writel(0, &regs->t3_load);
	writel(0, &regs->t3_counter);
	writel(TIMER_LOAD_VAL, &regs->t3_match1);
	writel(TIMER_LOAD_VAL, &regs->t3_match2);
	/* disable interrupts */
	writel(T3_MATCH1|T3_MATCH2|T3_OVERFLOW , &regs->int_mask);
	cr = readl(&regs->cr);
	cr |= (T3_ENABLE|T3_UPDOWN);
	writel(cr, &regs->cr);
	return 0;
}

static int atftme_timer_ofdata_to_platdata(struct udevice *dev)
{
	struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
	plat->regs = map_physmem(devfdt_get_addr(dev),
				 sizeof(struct atftmr_timer_regs),
				 MAP_NOCACHE);
	return 0;
}

static const struct timer_ops ag101p_timer_ops = {
	.get_count = atftmr_timer_get_count,
};

static const struct udevice_id ag101p_timer_ids[] = {
	{ .compatible = "andestech,attmr010" },
	{}
};

U_BOOT_DRIVER(altera_timer) = {
	.name	= "ag101p_timer",
	.id	= UCLASS_TIMER,
	.of_match = ag101p_timer_ids,
	.ofdata_to_platdata = atftme_timer_ofdata_to_platdata,
	.platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata),
	.probe = atftmr_timer_probe,
	.ops	= &ag101p_timer_ops,
};


ogamp.graph.curve.OutlineShape;
import com.jogamp.graph.curve.Region;
import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.curve.opengl.RegionRenderer;
import com.jogamp.graph.ui.layout.Padding;
import com.jogamp.math.Vec3f;
import com.jogamp.math.Vec4f;
import com.jogamp.math.geom.AABBox;
import com.jogamp.opengl.GL2ES2;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.util.texture.TextureSequence;

/**
 * Graph based {@link GLRegion} {@link Shape}
 *

 * GraphUI is GPU based and resolution independent.
 *

 *

 * GraphUI is intended to become an immediate- and retained-mode API.
 *

 * @see Scene
 */
public abstract class GraphShape extends Shape {
    protected final int renderModesReq;
    protected int renderModes;
    protected int pass2TexUnit = GLRegion.DEFAULT_TWO_PASS_TEXTURE_UNIT;
    protected GLRegion region = null;
    protected float oshapeSharpness = OutlineShape.DEFAULT_SHARPNESS;
    private final List<GLRegion> dirtyRegions = new ArrayList<GLRegion>();

    /**
     * Create a generic Graph based {@link GLRegion} UI {@link Shape}.
     *
     * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
     */
    protected GraphShape(final int renderModes) {
        super();
        this.renderModesReq = renderModes;
        this.renderModes = renderModes;
    }

    /** Returns requested Graph {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}. */
    public final int getRenderModesReq() { return renderModesReq; }

    /**
     * Returns validated Graph {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
     *

     * May differ from {@link #getRenderModesReq()}, e.g. adding a {@link Region#COLORCHANNEL_RENDERING_BIT} for {@link #hasBorder()} etc.
     *

     *

     * Potentially modified during {@link #validate(GL2ES2)} or {@link #validate(GLProfile)}.
     *

     */
    public final int getRenderModes() { return renderModes; }

    /** Set the 2nd pass texture unit. */
    public void setTextureUnit(final int pass2TexUnit) {
        this.pass2TexUnit = pass2TexUnit;
        if( null != region ) {
            region.setTextureUnit(pass2TexUnit);
        }
    }

    /**
     * Sets the shape's Graph {@link OutlineShape}'s sharpness parameter. Default is {@link OutlineShape#DEFAULT_SHARPNESS}.
     *
     * Method issues {@link #markShapeDirty()}.
     *
     * @param sharpness Graph {@link OutlineShape}'s sharpness value, default is {@link OutlineShape#DEFAULT_SHARPNESS}.
     * @return this shape for chaining.
     */
    public final GraphShape setSharpness(final float sharpness) {
        this.oshapeSharpness = sharpness;
        markShapeDirty();
        return this;
    }
    /**
     * Return the shape's Graph {@link OutlineShape}'s sharpness value.
     * @see #setSharpness(float)
     */
    public final float getSharpness() {
        return oshapeSharpness;
    }

    @Override
    public boolean hasColorChannel() {
        return Region.hasColorChannel(renderModes) || Region.hasColorTexture(renderModes);
    }

    private final void clearDirtyRegions(final GL2ES2 gl) {
        for(final GLRegion r : dirtyRegions) {
            r.destroy(gl);
        }
        dirtyRegions.clear()


 = new();
        c.RawRepresentation = raw;
        Assert.Same(raw, c.RawRepresentation);

        Assert.Null(c.AdditionalProperties);
        AdditionalPropertiesDictionary props = new() { { "key", "value" } };
        c.AdditionalProperties = props;
        Assert.Same(props, c.AdditionalProperties);

        Assert.Equal(string.Empty, c.Text);
        c.Text = "text";
        Assert.Equal("text", c.Text);
        Assert.Equal("text", c.ToString());

        c.Text = null;
        Assert.Equal(string.Empty, c.Text);
        Assert.Equal(string.Empty, c.ToString());

        c.Text = string.Empty;
        Assert.Equal(string.Empty, c.Text);
        Assert.Equal(string.Empty, c.ToString());
    }
}


()
				if (inst.sg.mem.lastfootstep or -math.huge) + 0.5 < t then
					inst.sg.mem.lastfootstep = t
					inst.SoundEmitter:PlaySound(inst.footstep)
				end
			end),
		},
	}

	local fns =
	{
		startonenter = OnEnterWalkingStates,
		walkonenter = OnEnterWalkingStates,
		endonenter = OnEnterWalkingStates,
		endonexit = function(inst)
			if not inst.sg.statemem.noexitstep then
				local t = GetTime()
				if (inst.sg.mem.lastfootstep or -math.huge) + 0.5 < t then
					inst.sg.mem.lastfootstep = t
					inst.SoundEmitter:PlaySound(inst.footstep, nil, 0.5)
				end
			end
		end,
	}

	if override_timelines then
		shallowcopy(override_timelines, timelines)
	end
	if override_fns then
		shallowcopy(override_fns, fns)
	end

	CommonStates.AddWalkStates(states, timelines, nil, nil, nil, fns)
end

SGDaywalkerCommon.AddRunStates = function(states, override_timelines, override_fns)
	local timelines =
	{
		starttimeline =
		{
			FrameEvent(0, function(inst) DoFootstep(inst, 0.5) end),
		},
		runtimeline =
		{
			FrameEvent(9, DoFootstep),
			FrameEvent(22, DoFootstep),
		},
		endtimeline =
		{
			FrameEvent(0, function(inst)
				inst.sg.statemem.noexitstep = true
				local t = GetTime()
				if (inst.sg.mem.lastfootstep or -math.huge) + 0.3 < t then
					inst.sg.mem.lastfootstep = t
					inst.SoundEmitter:PlaySound(inst.footstep)
				end
			end),
		},
	}

	local fns =
	{
		startonenter = function(inst)
			inst:SetStalking(nil)
		end,
		endonexit = function(inst)
			if not inst.sg.statemem.noexitstep then
				local t = GetTime()
				if (inst.sg.mem.lastfootstep or -math.huge) + 0.3 < t then
					inst.sg.mem.lastfootstep = t
					inst.SoundEmitter:PlaySound(inst.footstep, nil, 0.5)
				end
			end
		end,
	}

	if override_timelines then
		shallowcopy(override_timelines, timelines)
	end
	if override_fns then
		shallowcopy(override_fns, fns)
	end

	CommonStates.AddRunStates(states, timelines, nil, nil, nil, fns)
end

--------------------------------------------------------------------------

return SGDaywalkerCommon


ource.join(&inode.path))?;
        Ok(path.into_os_string())
    }

    fn do_opendir(&mut self, op: &op::Opendir<'_>) -> io::Result<OpenOut> {
        let inode = self.inodes.get(op.ino()).ok_or_else(no_entry)?;

        let fh = self.dirs.insert(DirHandle {
            read_dir: fs::read_dir(self.source.join(&inode.path))?,
            last_entry: None,
            offset: 1,
        }) as u64;

        let mut out = OpenOut::default();
        out.fh(fh);

        Ok(out)
    }

    fn do_readdir(&mut self, op: &op::Readdir<'_>) -> io::Result<ReaddirOut> {
        if op.mode() == op::ReaddirMode::Plus {
            return Err(io::Error::from_raw_os_error(libc::ENOSYS));
        }

        let dir = Slab::get_mut(&mut self.dirs, op.fh() as usize).ok_or_else(invalid_handle)?;

        let mut out = ReaddirOut::new(op.size() as usize);
        let mut at_least_one_entry = false;

        if let Some(entry) = dir.last_entry.take() {
            let full = out.entry(entry.name.as_ref(), entry.ino, entry.typ, dir.offset);
            if full {
                dir.last_entry.replace(entry);
                return Err(io::Error::from_raw_os_error(libc::ERANGE));
            }
            at_least_one_entry = true;
            dir.offset += 1;
        }

        while let Some(entry) = dir.read_dir.next() {
            let entry = entry?;
            match entry.file_name() {
                name if name.as_bytes() == b"." || name.as_bytes() == b".." => continue,
                _ => (),
            }

            let metadata = entry.metadata()?;
            let file_type = metadata.file_type();
            let typ = if file_type.is_file() {
                libc::DT_REG as u32
            } else if file_type.is_dir() {
                libc::DT_DIR as u32
            } else if file_type.is_symlink() {
                libc::DT_LNK as u32
            } else {
                libc::DT_UNKNOWN as u32
            };

            let full = out.entry(&entry.file_name(), metadata.ino(), typ, dir.offset);
            if full {
                dir.last_entry.replace(DirEntry {
                    name: entry.file_name(),
                    ino: metadata.ino(),
                    typ,
                });
                if !at_least_one_entry {
                    return Err(io::Error::from_raw_os_error(libc::ERANGE));
                }
                break;
            }

            at_least_one_entry = true;
            dir.offset += 1;
        }

        Ok(out)
    }

    fn do_releasedir(&mut self, op: &op::Releasedir<'_>) -> io::Result<()> {
        let _dir = self.dirs.remove(op.fh() as usize);
        Ok(())
    }

    fn do_open(&mut self, op: &op::Open<'_>) -> io::Result<OpenOut> {
        let inode = self.inodes.get(op.ino()).ok_or_else(no_entry)?;

        let mut options = OpenOptions::new();
        match op.flags() as i32 & libc::O_ACCMODE {
            libc::O_RDONLY => {
                options.read(true);
            }
            libc::O_WRONLY => {
                options.write(true);
            }
            libc::O_RDWR => {
                options.read(true).write(true);
            }
            _ => (),
        }
        options.custom_flags(op.flags()


>pablodeymo/time-format-conversion<filename>src/lib.rs
#[macro_use]
extern crate lazy_static;
extern crate regex;
use regex::Regex;
use std::error;
use std::fmt;
use std::str::FromStr;

pub type Millis = u32;

#[derive(Debug)]
struct TimeUtilsError(String);

impl error::Error for TimeUtilsError {}

impl fmt::Display for TimeUtilsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "There is an error: {}", self.0)
    }
}

pub fn calcular_tiempo_en_millis_from_minuto_y_segundo(minutes: u32, seconds: u32) -> Millis {
    minutes * 60_000 + seconds * 1000
}

pub fn calcular_tiempo_en_millis_from_minuto_y_segundo_str(
    minute_and_second: &str,
) -> Result<Millis, Box<dyn error::Error>> {
    let v: Vec<&str> = minute_and_second.split(':').collect();
    if v.len() != 2 {
        return Result::Err(Box::new(TimeUtilsError("Invalid time format".into())));
    }

    let minutes: u32 = FromStr::from_str(v[0])?;
    let seconds: u32 = FromStr::from_str(v[1])?;
    Ok(minutes * 60_000 + seconds * 1000)
}

pub fn calcular_tiempo_en_millis_from_hora_minuto(
    hour_minute: &str,
) -> Result<Millis, Box<dyn error::Error>> {
    let v: Vec<&str> = hour_minute.split(':').collect();
    if v.len() != 2 {
        return Result::Err(Box::new(TimeUtilsError("Invalid time format".into())));
    }

    let hour: u32 = FromStr::from_str(v[0])?;
    let minutes: u32 = FromStr::from_str(v[1])?;
    Ok((hour * 3600 + minutes * 60) * 1000)
}

pub fn millis_to_string(millis: Millis) -> String {
    let mut count_minutes = millis / 60000;
    let mut count_seconds = millis / 1000;
    let count_millis = millis - (count_seconds * 1000);
    count_seconds %= 60;
    count_minutes %= 60;
    let count_hours = millis / 3_600_000;
    match count_hours {
        0 => format!("{}:{:02}.{:03}", count_minutes, count_seconds, count_millis),
        _ => format!(
            "{}:{:02}:{:02}.{:03}",
            count_hours, count_minutes, count_seconds, count_millis
        ),
    }
}

pub fn millis_hora_minuto_to_string(millis: Millis) -> String {
    let count_minutes = millis / 60000;
    let hour = count_minutes / 60;
    let minutes = count_minutes - (hour * 60);
    format!("{}:{:02}", hour, minutes)
}

pub fn convertir_tiempo_from_string_to_millis(input: &str) -> Option<Millis> {
    lazy_static! {
        static ref RE1: Regex = Regex::new(r"(\d+):(\d+):(\d{2})\.(\d{3})").unwrap();
        static ref RE2: Regex = Regex::new(r"(\d+):(\d{2})\.(\d{3})").unwrap();
        static ref RE3: Regex = Regex::new(r"(\d{1,2})\.(\d{3})").unwrap();
    }

    let millis: u32;
    let seconds: u32;
    let mut minutes: u32 = 0;
    let mut hours:


		{
			return (int)EditorTools.InvokeNonPublicStaticMethod(typeof(ShaderUtil), "GetCurrentShaderVariantCollectionShaderCount");
		}
		public static int GetCurrentShaderVariantCollectionVariantCount()
		{
			return (int)EditorTools.InvokeNonPublicStaticMethod(typeof(ShaderUtil), "GetCurrentShaderVariantCollectionVariantCount");
		}

		/// <summary>
		/// 获取着色器的变种总数量
		/// </summary>
		public static string GetShaderVariantCount(string assetPath)
		{
			Shader shader = AssetDatabase.LoadAssetAtPath<Shader>(assetPath);
			var variantCount = EditorTools.InvokeNonPublicStaticMethod(typeof(ShaderUtil), "GetVariantCount", shader, true);
			return variantCount.ToString();
		}
	}
}


warp)   	ReduceAdd (cutlass::reduction::thread)   	VoltaTensorOpPolicy< WarpShape_, gemm::GemmShape< 32, 32, 4 >, float, layout::RowMajor > (cutlass::epilogue::warp)

Gemm< ElementA, LayoutA, ElementB, LayoutB, ElementC, LayoutC, ScalarType, ComputeType, arch::OpMultiplyAddSaturate > (cutlass::reference::host)   	MmaSimtTileIterator< Shape_, Operand::kC, Element_, layout::RowMajor, Policy_ > (cutlass::gemm::warp)   	ReduceSplitK (cutlass::reduction::kernel)   	VoltaTensorOpPolicy< WarpShape_, gemm::GemmShape< 32, 32, 4 >, half_t, layout::RowMajor > (cutlass::epilogue::warp)

BatchedGemmCoord (cutlass::gemm)   	Gemm< ElementA, LayoutA, ElementB, LayoutB, ElementC, LayoutC, ScalarType, ComputeType, arch::OpXorPop


71.9 6.6\nQ 72.3 6.6, 72.5 6.4\nQ 72.7 6.2, 72.7 5.9\nQ 72.7 5.5, 72.5 5.3\nQ 72.3 5.1, 71.9 5.1\nL 71.2 5.1\nL 71.2 6.6\n' fill='#191919'/>\n<path class='atom-21' d='M 74.2 8.4\nL 75.1 8.4\nL 75.1 5.2\nL 74.1 5.5\nL 74.0 5.2\nL 75.3 4.6\nL 75.7 4.7\nL 75.7 8.4\nL 76.5 8.4\nL 76.5 8.9\nL 74.2 8.9\nL 74.2 8.4\n' fill='#191919'/>\n<path class='atom-23' d='M 49.1 43.0\nL 50.5 45.3\nQ 50.6 45.5, 50.8 45.9\nQ 51.1 46.3, 51.1 46.3\nL 51.1 43.0\nL 51.6 43.0\nL 51.6 47.3\nL 51.0 47.3\nL 49.6 44.8\nQ 49.4 44.5, 49.2 44.2\nQ 49.0 43.9, 49.0 43.7\nL 49.0 47.3\nL 48.4 47.3\nL 48.4 43.0\nL 49.1 43.0\n' fill='#0000FF'/>\n<path class='atom-25' d='M 40.7 57.9\nQ 40.7 56.9, 41.2 56.4\nQ 41.7 55.8, 42.7 55.8\nQ 43.6 55.8, 44.1 56.4\nQ 44.6 56.9, 44.6 57.9\nQ 44.6 59.0, 44.1 59.6\nQ 43.6 60.2, 42.7 60.2\nQ 41.7 60.2, 41.2 59.6\nQ 40.7 59.0, 40.7 57.9\nM 42.7 59.7\nQ 43.3 59.7, 43.7 59.2\nQ 44.0 58.8, 44.0 57.9\nQ 44.0 57.1, 43.7 56.7\nQ 43.3 56.3, 42.7 56.3\nQ 42.0 56.3, 41.7 56.7\nQ 41.3 57.1, 41.3 57.9\nQ 41.3 58.8, 41.7 59.2\nQ 42.0 59.7, 42.7 59.7\n' fill='#FF0000'/>\n<path class='atom-29' d='M 10.6 60.1\nL 9.6 58.4\nL 9.6 58.4\nL 8.9 58.4\nL 8.9 60.1\nL 8.3 60.1\nL 8.3 55.9\nL 9.6 55.9\nQ 10.3 55.9, 10.7 56.2\nQ 11.1 56.5, 11.1 57.1\nQ 11.1 57.6, 10.8 57.9\nQ 10.6 58.2, 10.2 58.3\nL 11.3 60.1\nL 10.6 60.1\nM 8.9 57.9\nL 9.6 57.9\nQ 10.0 57.9, 10.2 57.7\nQ 10.5 57.5, 10.5 57.1\nQ 10.5 56.8, 10.2 56.6\nQ 10.0 56.4, 9.6 56.4\nL 8.9 56.4\nL 8.9 57.9\n' fill='#191919'/>\n<path class='atom-29' d='M 11.7 56.7\n


的宠物医院咨询并预约接种时间。 兽医诊所：兽医诊所也可以提供小狗疫苗接种服务，通常价格相对较低。

2、宠物医院宠物医院是给狗打疫苗的首选地点。宠物医院通常会提供常见的疫苗服务，例如狂犬病、脱粪病、犬瘟热和肺炎等。一般来说，你可以提前预约，特别是在疫苗增多、假期和周末等高峰期，提前预约可以更好地安排时间。

3、您可以在宠物医院、宠物诊所、甚至一些宠物商店购买狗防疫针。这些地方通常会提供关于疫苗的详细信息，以及何时应该给您的狗接种疫苗的建议。请注意，某些地区可能需要您证明您已获得兽医许可证才能购买狗防疫针。

4、给狗狗免费打疫苗的地方有：


           [1] = 'La tienda puede tener comodines {C:attention}estorbantes{}',
                    [2] = '{C:inactive,s:0.8}(Se queda en su lugar hasta el fin de la ronda despues de ser vendido)'
                }
            },
            stake_bunc_magenta = {
                ['name'] = 'Pozo magenta',
                ['text'] = {
                    [1] = 'La tienda puede tener comodines {C:attention}reactivos{}',
                    [2] = '{C:inactive,s:0.8}(Se debilita si no se omite ninguna ciega esta apuesta inicial)'
                }
            }
        }
    }
}


float "z1",

		float "x2",

		float "y2",

		float "z2",

		float "radius",

		int "flags",

		Entity "entity",

		int "p9",
	}
	returns	"int"

--[[!
<summary>
	Performs the same type of trace as START_SHAPE_TEST_CAPSULE, but with some different hardcoded parameters.
</summary>
]]--
native "0xE6AC6C45FBE83004"
	hash "0xE6AC6C45FBE83004"
	jhash (0x4559460A)
	arguments {
		float "x1",

		float "y1",

		float "z1",

		float "x2",

		float "y2",

		float "z2",

		float "radius",

		int "flags",

		Entity "entity",

		Any "p9",
	}
	returns	"int"

--[[!
<summary>
	Actual name starts with START_SHAPE_TEST_??? and it returns a ShapeTest handle that can be used with GET_SHAPE_TEST_RESULT.

	In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7
</summary>
]]--
native "0xFF6BE494C7987F34"
	hash "0xFF6BE494C7987F34"
	arguments {
		Vector3Ptr "pVec1",

		Vector3Ptr "pVec2",

		int "flag",

		Entity "entity",

		int "flag2",
	}
	returns	"int"

--[[!
<summary>
	Parameters:
	rayHandle - Ray Handle from a casted ray, as returned by CAST_RAY_POINT_TO_POINT
	hit - Where to store whether or not it hit anything. False is when the ray reached its destination.
	endCoords - Where to store the world-coords of where the ray was stopped (by hitting its desired max range or by colliding with an entity/the map)
	surfaceNormal - Where to store the surface-normal coords (NOT relative to the game world) of where the entity was hit by the ray
	entityHit - Where to store the handle of the entity hit by the ray

	Returns:
	Result? Some type of enum.

	NOTE: To get the offset-coords of where the ray hit relative to the entity that it hit (which is NOT the same as surfaceNormal), you can use these two natives:
	Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS(entityHit, endCoords.x, endCoords.y, endCoords.z);
	Vector3 entitySpotCoords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entityHit, offset.x, offset.y, offset.z);

	Use ENTITY::GET_ENTITY_TYPE(entityHit) to quickly distinguish what type of entity you hit (ped/vehicle/object - 1/2/3)
</summary>
]]--
native "GET_SHAPE_TEST_RESULT"
	hash "0x3D87450E15D98694"
	jhash (0xF3C2875A)
	arguments {
		int "rayHandle",

		BOOLPtr "hit",

		Vector3Ptr "endCoords",

		Vector3Ptr "surfaceNormal",

		EntityPtr "entityHit",
	}
	returns	"int"

--[[!
<summary>
	behaves exactly the same way as GET_SHAPE_TEST_RESULT except it has one extra parameter (_materialHash).

	Quick disassembly seems to indicate that the unknown is a hash. EDIT: Seems to b


extern "C" {
    pub fn cdecklink_output_display_video_frame_sync(
        obj: *mut cdecklink_output_t,
        theFrame: *mut cdecklink_video_frame_t,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_schedule_video_frame(
        obj: *mut cdecklink_output_t,
        theFrame: *mut cdecklink_video_frame_t,
        displayTime: DecklinkTimeValue,
        displayDuration: DecklinkTimeValue,
        timeScale: DecklinkTimeScale,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_set_scheduled_frame_completion_callback(
        obj: *mut cdecklink_output_t,
        ctx: *mut ::std::os::raw::c_void,
        cb0: cdecklink_video_output_callback_scheduled_frame_completed,
        cb1: cdecklink_video_output_callback_scheduled_playback_has_stopped,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_get_buffered_video_frame_count(
        obj: *mut cdecklink_output_t,
        bufferedFrameCount: *mut u32,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_enable_audio_output(
        obj: *mut cdecklink_output_t,
        sampleRate: DecklinkAudioSampleRate,
        sampleType: DecklinkAudioSampleType,
        channelCount: u32,
        streamType: DecklinkAudioOutputStreamType,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_disable_audio_output(obj: *mut cdecklink_output_t) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_write_audio_samples_sync(
        obj: *mut cdecklink_output_t,
        buffer: *mut ::std::os::raw::c_void,
        sampleFrameCount: u32,
        sampleFramesWritten: *mut u32,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_begin_audio_preroll(obj: *mut cdecklink_output_t) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_end_audio_preroll(obj: *mut cdecklink_output_t) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_schedule_audio_samples(
        obj: *mut cdecklink_output_t,
        buffer: *mut ::std::os::raw::c_void,
        sampleFrameCount: u32,
        streamTime: DecklinkTimeValue,
        timeScale: DecklinkTimeScale,
        sampleFramesWritten: *mut u32,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_get_buffered_audio_sample_frame_count(
        obj: *mut cdecklink_output_t,
        bufferedSampleFrameCount: *mut u32,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_flush_buffered_audio_samples(obj: *mut cdecklink_output_t) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_set_audio_callback(
        obj: *mut cdecklink_output_t,
        ctx: *mut ::std::os::raw::c_void,
        cb0: cdecklink_audio_output_callback_render_audio_samples,
    ) -> HRESULT;
}
extern "C" {
    pub fn cdecklink_output_start_scheduled_playback(
        obj: *mut cdecklink_output_t,
        playbackStartTime: DecklinkTimeValue,
        timeScale: DecklinkTimeScale,
        playbackSpeed: f64,


Millisecond")
                    currentTimeInMillisecond = lastcurrentTimeInMillisecond
                    invalidate()
                    checkVideo = lastCheckState
                    if (mOnBarMoveListener != null) {
                        mOnBarMoveListener!!.onBarMove(screenLeftTimeInMillisecond, screenRightTimeInMillisecond, -1)
                    }
                } else {
                    if (mOnBarMoveListener != null) {
                        mOnBarMoveListener!!.OnBarMoveFinish(screenLeftTimeInMillisecond, screenRightTimeInMillisecond, currentTimeInMillisecond)
                    }
                }
            } else {
                if (mOnBarMoveListener != null) {
                    mOnBarMoveListener!!.OnBarMoveFinish(screenLeftTimeInMillisecond, screenRightTimeInMillisecond, currentTimeInMillisecond)
                }
            }
        }
        false
    })
    private var readyCheck = false
    private var mDrag = true

    constructor(context: Context?) : super(context) {
        init(null, 0)
    }

    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
        init(attrs, defStyleAttr)
    }

    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
        init(attrs, 0)
    }

    fun getRecordDataExistTimeClipsList(): List<TRecordDataExistTimeSection>? {
        return recordDataExistTimeClipsList
    }

    fun setRecordDataExistTimeClipsList(recordDataExistTimeClipsList: MutableList<TRecordDataExistTimeSection>?) {
        this.recordDataExistTimeClipsList = recordDataExistTimeClipsList
        arrangeRecordDataExistTimeClipsIntoMap(recordDataExistTimeClipsList)
    }

    private fun arrangeRecordDataExistTimeClipsIntoMap(clipsList: List<TRecordDataExistTimeSection>?) {
        recordDataExistTimeClipsListMap = HashMap()
        if (clipsList != null) {
            for (clipItem in clipsList) {
                for (dateZeroOClockItem in clipItem.getCoverDateZeroOClockList()) {
                    var list: MutableList<TRecordDataExistTimeSection>? = null
                    if (recordDataExistTimeClipsListMap?.get(dateZeroOClockItem).also { list = it as MutableList<TRecordDataExistTimeSection>? } == null) {
                        list = ArrayList()
                        recordDataExistTimeClipsListMap!![dateZeroOClockItem] = list as ArrayList<TRecordDataExistTimeSection>
                    }
                    list!!.add(clipItem)
                }
            }
        }
        postInvalidate()
    }

    fun initTimebarLengthAndPosition(mostLeftTime: Long, mostRightTime: Long, currentTime: Long) {
        mostLeftTimeInMillisecond = mostLeftTime
        mostRightTimeInMillisecond = mostRightTime
        currentTimeInMillisecond = currentTime
        WHOLE_TIMEBAR_TOTAL_SECONDS = (mostRightTime - mostLeftTime) / 1000
        initTVideoTimelineTickCriterionMap()
        resetToStandardWidth()
    }

    private fun init(attrs: AttributeSet?, defStyleAttr: Int) {
        path = Path()
        val a = context.theme.obtainStyledAttributes(attrs, R.styleable.TVideoTimeline, defStyleAttr, 0)
        val n = a.indexCount
        for (i in 0 until n) {
            val attr = a.getIndex(i)
            if (attr == R.styleable.TVideoTimeline_middleCursorColor) {
                middleCursorColor = a.getColor(attr, Color.RED)
            } else if (attr == R.styleable.TVideoTimeline_recordBackgroundColor) { // 默认颜色设置为橘黄色
                recordBackgroundColor = a.getColor(attr, Color.argb(200, 251, 180, 76))
            }


concat(), &mut export_key)
            .map_err(|_| InternalError::HkdfError)?;

        let mut hmac =
            Hmac::<CS::Hash>::new_from_slice(&hmac_key).map_err(|_| InternalError::HmacError)?;
        hmac.update(nonce);
        hmac.update(aad);

        let hmac_bytes = hmac.finalize().into_bytes();

        Ok((
            Self {
                mode,
                nonce: nonce.to_vec(),
                hmac: hmac_bytes,
            },
            GenericArray::clone_from_slice(&export_key),
            #[cfg(test)]
            hmac_key,
        ))
    }

    pub(crate) fn open(
        &self,
        key: &[u8],
        server_s_pk: &[u8],
        optional_ids: &Option<Identifiers>,
    ) -> Result<OpenedEnvelope<CS>, ProtocolError> {
        let client_static_keypair = match self.mode {
            InnerEnvelopeMode::Zero => {
                return Err(InternalError::IncompatibleEnvelopeModeError.into())
            }
            InnerEnvelopeMode::Internal => recover_keys_internal::<CS>(key, &self.nonce)?,
        };

        let (id_u, id_s) = bytestrings_from_identifiers(
            optional_ids,
            &client_static_keypair.public().to_arr(),
            server_s_pk,
        )?;
        let aad = construct_aad(&id_u, &id_s, server_s_pk);

        let opened = self.open_raw(key, &aad)?;

        Ok(OpenedEnvelope {
            client_static_keypair,
            export_key: opened.export_key,
            id_u,
            id_s,
        })
    }

    /// Attempts to decrypt the envelope using a key, which is successful only if the key and
    /// aad used to construct the envelope are the same.
    pub(crate) fn open_raw(
        &self,
        key: &[u8],
        aad: &[u8],
    ) -> Result<OpenedInnerEnvelope<CS::Hash>, InternalError> {
        let h = Hkdf::<CS::Hash>::new(None, key);
        let mut hmac_key = vec![0u8; Self::hmac_key_size()];
        let mut export_key = vec![0u8; Self::export_key_size()];

        h.expand(&[&self.nonce, STR_AUTH_KEY].concat(), &mut hmac_key)
            .map_err(|_| InternalError::HkdfError)?;
        h.expand(&[&self.nonce, STR_EXPORT_KEY].concat(), &mut export_key)
            .map_err(|_| InternalError::HkdfError)?;

        let mut hmac =
            Hmac::<CS::Hash>::new_from_slice(&hmac_key).map_err(|_| InternalError::HmacError)?;
        hmac.update(&self.nonce);
        hmac.update(aad);
        if hmac.verify(&self.hmac).is_err() {
            return Err(InternalError::SealOpenHmacError);
        }

        Ok(OpenedInnerEnvelope {
            export_key: GenericArray::<u8, <CS::Hash as Digest>::OutputSize>::clone_from_slice(
                &export_key,
            ),
        })
    }

    // Creates a dummy envelope object that serializes to the all-zeros byte string
    pub(crate) fn dummy() -> Self {
        Self {
            mode: InnerEnvelopeMode::Zero,
            nonce: vec![0u8; NONCE_LEN],
            hmac: GenericArray::clone_from_slice(&vec![


#include <ansi.h>
#include <combat.h>

#define KUANG "「" HIR "狂风落叶" NOR "」"

inherit F_SSERVER;

int perform(object me, object target)
{
        int extra;
        object weapon;
        string msg;

        extra=me->query_skill("hongye-daofa",1);

        if( !target ) target = offensive_target(me);

        if( !target||!target->is_character()||!me->is_fighting(target) )
                return notify_fail("你只能对战斗中的对手使用" KUANG "。\n");

        if( (int)me->query_skill("hongye-daofa",1) < 150)
                return notify_fail("你目前功力还使不出" KUANG "。\n");

        if (!objectp(weapon = me->query_temp("weapon"))
                || (string)weapon->query("skill_type") != "blade")
                        return notify_fail("你使用的武器不对。\n");

        if( (int)me->query("neili") < 800 )
                        return notify_fail("你的内力不够。\n");

        me->add("neili", -300);
        msg = HIC "$N淡然一笑，本就快捷绝伦的刀法骤然变得更加凌厉！\n"
              HIC "就在这一瞬之间，$N已快速劈出六刀！刀夹杂着风，风里含着刀影！\n"
              HIC "$n只觉得心跳都停止了！" NOR;

        message_vision(msg, me, target);

        message_combatd(HIY  "$N从左面劈出两刀！\n" NOR, me, target);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);

        message_combatd(HIY  "$N紧跟$n从右面劈出两刀！\n" NOR, me, target);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);

        message_combatd(HIY  "$N竟然又从上面劈出两刀！\n" NOR, me, target);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);
        COMBAT_D->do_attack(me,target, me->query_temp("weapon"), TYPE_REGULAR, msg);

        me->start_busy(2 + random(2));
        return 1;
}


nit/pir)

```clike
# init --- Effective IO: PORTA | PORTB | PORTC
unit_pir = unit.get(unit.PIR, unit.PORTB)
# return 0 or 1
state = pir.state
```

### Button

- [Product Deteil](zh_CN/unit/button)

```clike
# init --- Effective IO: PORTA | PORTB | PORTC
unit_btn = unit.get(unit.BUTTON, unit.PORTB)

# Method
# if set the callback param, it will interrupt callback function
# or if not set param it will return result(True or False) at once
unit_btn.wasPressed(callback=None)
unit_btn.wasReleased(callback=None)
unit_btn.wasDoublePress(callback=None)
# holdTime: sec
unit_btn.pressFor(holdTime=1.0, callback=None):

#example
def on_wasPressed():
  lcd.print('Button was Pressed\n')

def on_wasReleased():
  lcd.print('Button was Released\n')

def on_pressFor():
  lcd.print('Button press for 1.2s press hold\n')

def on_doublePress():
  lcd.print('Button was double press\n')

unit_btn.wasPressed(on_wasPressed)
unit_btn.wasReleased(on_wasReleased)
unit_btn.wasDoublePress(on_doublePress)
unit_btn.pressFor(1.2, on_pressFor)
```

### Dual Button

- [Product Deteil](zh_CN/unit/button)

```clike
# init --- Effective IO: PORTA | PORTB | PORTC
unit_dualButton = unit.get(unit.DUAL_BUTTON, unit.PORTB)
# btnRed, btnRed method like button unit
btnRed = unit_dualButton.btnRed
btnRed = unit_dualButton.btnBlue
```

### Relay

- [Product Deteil](zh_CN/unit/relay)

```clike
# init --- Effective IO: PORTA | PORTB | PORTC
unit_relay = unit.get(unit.RELAY, unit.PORTB)
# select com connect on
unit_relay.on()
# select com connect off
unit_relay.off()
```

### IR

- [Product Deteil](zh_CN/unit/ir)

```clike
# init --- Effective IO: PORTA | PORTB | PORTC
unit_ir = unit.get(unit.IR, unit.PORTB)
# ir tx 25hz signal with 38khz signal carrier
unit_ir.txOn()
# off tx off
unit_ir.txOff()
# if receive ir signal return 1 else return 0
value = unit.rxStatus()
```

### Angle

Analog Device ( [Product Deteil](zh_CN/unit/angle)

```clike
# init --- Effective IO: PORTB
unit_angle = unit.get(unit.ANGLE, unit.PORTB)

# get raw value, range 0 ~ 4095
adValue = unit_angle.readraw()

# get filter value, range 0 ~ 1023
filterValue = unit_angle.read()
```

### Light

- [Product Deteil](zh_CN/unit/light)

```clike
# init --- Effective IO: PORTB
unit_light = unit.get(unit.LIGHT, unit.PORTB)
# adc value, range 0 ~ 1024
analogValue = unit_light.analogValue
# digital value, only 0 or 1, base rotate the knob
digitalValue = unit_light.digitalValue
```

### Earth

- [Product Deteil](zh_CN/unit/light)

```clike
# init --- Effective IO: PORTB
unit_earth = unit.get(unit.LIGHT, unit.PORTB)
# adc value, range 0


      break;
    case Js::OpCode::JAE:
        branchInstr->m_opcode = Js::OpCode::JBE;
        break;
    case Js::OpCode::JB:
        branchInstr->m_opcode = Js::OpCode::JA;
        break;
    case Js::OpCode::JBE:
        branchInstr->m_opcode = Js::OpCode::JAE;
        break;
    case Js::OpCode::JGE:
        branchInstr->m_opcode = Js::OpCode::JLE;
        break;
    case Js::OpCode::JGT:
        branchInstr->m_opcode = Js::OpCode::JLT;
        break;
    case Js::OpCode::JLT:
        branchInstr->m_opcode = Js::OpCode::JGT;
        break;
    case Js::OpCode::JLE:
        branchInstr->m_opcode = Js::OpCode::JGE;
        break;
    case Js::OpCode::JEQ:
    case Js::OpCode::JNE:
    case Js::OpCode::JO:
    case Js::OpCode::JNO:
    case Js::OpCode::JP:
    case Js::OpCode::JNP:
    case Js::OpCode::JSB:
    case Js::OpCode::JNSB:
        break;
    default:
        AssertMsg(UNREACHED, "JCC missing in ReverseBranch()");
    }
}

IR::Instr *
LowererMD::LowerCallHelper(IR::Instr *instrCall)
{
    IR::Opnd           *argOpnd      = instrCall->UnlinkSrc2();
    IR::Instr          *prevInstr    = nullptr;
    IR::JnHelperMethod  helperMethod = instrCall->GetSrc1()->AsHelperCallOpnd()->m_fnHelper;

    instrCall->FreeSrc1();

#ifndef _M_X64
    bool callHasDst = instrCall->GetDst() != nullptr;
    prevInstr = ChangeToHelperCall(instrCall, helperMethod);
    if (callHasDst)
    {
        prevInstr = prevInstr->m_prev;
    }
    Assert(prevInstr->GetSrc1()->IsHelperCallOpnd() && prevInstr->GetSrc1()->AsHelperCallOpnd()->m_fnHelper == helperMethod);
#else
    prevInstr = instrCall;
#endif

    while (argOpnd)
    {
        Assert(argOpnd->IsRegOpnd());
        IR::RegOpnd *regArg = argOpnd->AsRegOpnd();

        Assert(regArg->m_sym->m_isSingleDef);
        IR::Instr *instrArg = regArg->m_sym->m_instrDef;

        Assert(instrArg->m_opcode == Js::OpCode::ArgOut_A || instrArg->m_opcode == Js::OpCode::ExtendArg_A &&
        (
            helperMethod == IR::JnHelperMethod::HelperOP_InitCachedScope ||
            helperMethod == IR::JnHelperMethod::HelperScrFunc_OP_NewScFuncHomeObj ||
            helperMethod == IR::JnHelperMethod::HelperScrFunc_OP_NewScGenFuncHomeObj ||
            helperMethod == IR::JnHelperMethod::HelperRestify ||
            helperMethod == IR::JnHelperMethod::HelperStPropIdArrFromVar
        ));
        prevInstr = LoadHelperArgument(prevInstr, instrArg->GetSrc1());

        argOpnd = instrArg->GetSrc2();

        if (prevInstr == instrArg)
        {
            prevInstr = prevInstr->m_prev;
        }

        if (instrArg->m_opcode == Js::OpCode::ArgOut_A)
        {
            instrArg->UnlinkSrc1();
            if (argOpnd)
            {
                instrArg->UnlinkSrc2();
            }

            regArg->Free(this->m_func);
            instrArg->Remove();
        }
        else if (instrArg->m_opcode == Js::OpCode::ExtendArg_A)


*/ class Request {\n    constructor(input){\n        let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        let parsedURL;\n        // normalize input\n        if (!isRequest(input)) {\n            if (input && input.href) {\n                // in order to support Node.js' Url objects; though WHATWG's URL objects\n                // will fall into this branch also (since their `toString()` will return\n                // `href` property anyway)\n                parsedURL = parseURL(input.href);\n            } else {\n                // coerce input to a string before attempting to parse\n                parsedURL = parseURL(`${input}`);\n            }\n            input = {};\n        } else {\n            parsedURL = parseURL(input.url);\n        }\n        let method = init.method || input.method || \"GET\";\n        method = method.toUpperCase();\n        if ((init.body != null || isRequest(input) && input.body !== null) && (method === \"GET\" || method === \"HEAD\")) {\n            throw new TypeError(\"Request with GET/HEAD method cannot have body\");\n        }\n        let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n        Body.call(this, inputBody, {\n            timeout: init.timeout || input.timeout || 0,\n            size: init.size || input.size || 0\n        });\n        const headers = new Headers(init.headers || input.headers || {});\n        if (inputBody != null && !headers.has(\"Content-Type\")) {\n            const contentType = extractContentType(inputBody);\n            if (contentType) {\n                headers.append(\"Content-Type\", contentType);\n            }\n        }\n        let signal = isRequest(input) ? input.signal : null;\n        if (\"signal\" in init) signal = init.signal;\n        if (signal != null && !isAbortSignal(signal)) {\n            throw new TypeError(\"Expected signal to be an instanceof AbortSignal\");\n        }\n        this[INTERNALS$2] = {\n            method,\n            redirect: init.redirect || input.redirect || \"follow\",\n            headers,\n            parsedURL,\n            signal\n        };\n        // node-fetch-only options\n        this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n        this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n        this.counter = init.counter || input.counter || 0;\n        this.agent = init.agent || input.agent;\n    }\n    get method() {\n        return this[INTERNALS$2].method;\n    }\n    get url() {\n        return format_url(this[INTERNALS$2].parsedURL);\n    }\n    get headers() {\n        return this[INTERNALS$2].headers;\n    }\n    get redirect() {\n        return this[INTERNALS$2].redirect;\n    }\n    get signal() {\n        return this[INTERNALS$2].signal;\n    }\n    /**\n  * Clone this request\n  *\n  * @return  Request\n  */ clone() {\n        return new Request(this);\n    }\n}\nBody.mixIn(Request.prototype);\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n    value: \"Request\",\n    writable: false,\n    enumerable: false,\n    configurable: true\n});\nObject.defineProperties(Request.prototype, {\n    method: {\n        enumerable: true\n    },\n    url: {\n        enumerable: true\n    },\n    headers: {\n        enumerable: true\n    },\n    redirect: {\n        enum


的，我们也要争取团结他们，不是看到他们的意见与我们不同，看到他们的意见错误就不管他。只有这样，才能逐渐地把百分之九十五以上的人团结在我们共青团周围，团结在党的周围，团结在毛泽东思想的周围，彻底斗垮黑帮，彻底斗垮资产阶级权威，彻底把教育制度进行革命。

   第四条，就是要有民主作风。没有民主作风就没有真正的群众路线，没有民主作风就不可能团结绝大多数人。这一条，青年同志们要特别注意，要倾听不同意见，不要认为一种意见与我们不同就不愿意听，甚至那种意见是不对的，我们也要听，不对的意见更可以证明我们的意见是对的。要让少数有不同意见的人讲话，要尊重他们的意见，倾听他们的意见，真正实行民主。同志们要记住民主作风和群众路线是分不开的，群众路线是我们党的政策的一条原则。

   第五条，就是要善於批评和自我批评，这一点青年同志们要学会。批评和自我批评是不容易的，讲起来容易，遇到现实斗争，就不一定能实现的，但它恰恰是推动我们前进的动力，没有批评和自我批评，党的生命就会停止，同时革命就会停止。我们的文化大革命就不能真正地很好地进行，我们的观点，路线就不能正确地很好地贯彻下去。

   最後，我同同志们讲，我很赞成拥护你们坚定的阶级路线和阶级观点。同时我也希望同志们要善於去研究，实现这种阶级路线的毛泽东思想的阶级政策。这方面同志们还要多加努力，要把阶级路线同我们的阶级政策密切结合起来。政策是路线的生命，没有政策，我们的路线就不能实现。希望同志们真正把二者辩证地统一起来。

   看到同志们朝气勃勃的革命热情，我是很高兴的。我常说，你们这种豪迈气概有一千丈。陈伯达同志给我改了一下说，你们的革命豪杰气概有一万丈。我赞成，我说你们是豪杰气概万丈的青年。

   你们碰到什�


ntityRegKey**](iuseridentity-openidentityregkey.md) | Deprecated. Retrieves the key in the registry that corresponds to this user identity.
 |

## Remarks

This interface provides information that corresponds to a specific user identity present on the system. You can access this user identity's identity folder, its registry key, and its identification cookie, as well as retrieve the name associated with the user identity.

## Requirements

| Requirement | Value |
|-------------------------------------|----------------------------------------------------------------------------------------|
| Minimum supported client
 | Windows 2000 Professional \[desktop apps only\]
                             |
| Minimum supported server
 | Windows 2000 Server \[desktop apps only\]
                                   |
| End of client support
    | Windows 2000 Professional
                                                   |
| End of server support
    | Windows 2000 Server
                                                         |
| Header
                   |

Msident.h

   |
| IDL
                      |

Msident.idl

 |
| DLL
                      |

Msident.dll

 |

## See also

[**IUserIdentity2**](iuseridentity2.md)

[**IUserIdentityManager**](iuseridentitymanager.md)

[**IEnumUserIdentity**](ienumuseridentity.md)

---
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
external help file: Microsoft.FailoverClusters.PowerShell.dll-Help.xml
Module Name: FailoverClusters
ms.date: 12/20/2016
online version: https://learn.microsoft.com/powershell/module/failoverclusters/get-clusternode?view=windowsserver2019-ps&wt.mc_id=ps-gethelp
schema: 2.0.0
title: Get-ClusterNode
---

# Get-ClusterNode

## SYNOPSIS
Gets information about one or more nodes, or servers, in a failover cluster.

## SYNTAX

```
Get-ClusterNode [[-Name] <StringCollection>] [-InputObject <PSObject>] [-Cluster <String>] [<CommonParameters>]
```

## DESCRIPTION
The **Get-ClusterNode** cmdlet gets information about one or more nodes, or servers, in a failover cluster.

Use this cmdlet to obtain information about the node status.
To see the resources currently owned by a particular node, specify that node in this cmdlet and then pipe the results through the **Get-ClusterResource** cmdlet.

## EXAMPLES

### Example 1
```
PS C:\> Get-ClusterNode
Name           ID    State
----           --    -----
node1           1     Up
node2           2     Up
node3           3     Up
node4           4     Up
```

This example displays the name, id, and state of each node, or server, in the local cluster.

### Example 2
```
PS C:\> Get-ClusterNode -Cluster cluster1
Name           ID    State
----           --    -----
node1           1     Up
node2           2     Up
```

This example displays the name, id, and state of each node, or server, in the cluster named cluster1.

### Example 3
```
PS C:\> Get-ClusterNode -Name node1 | Get-ClusterResource
Name                State               Group               ResourceType
----                -----               -----               ------------
Cluster Disk 1      Online              Cluster Group       Physical Disk
Cluster IP Address  Online              Cluster Group       IP Address
Cluster IP Addre... Online              Cluster Group       IPv6 Address
Cluster Name        Online              Cluster Group       Network Name
File Share Witness  Offline             Cluster Group       File Share Witness
```

This example lists all cluster resources that are currently owned by node named node1 on the local cluster.

## PARAMETERS

### -Cluster
Specifies the name of the cluster on which to run this cmdlet.