 {d3.Primitive}
   */
  public height(h?: d3.Primitive): d3.Primitive {
    if (h) {
      if (+h > 0) {
        this.aHeight = h;
      }
      else {
        throw new Error("Height must be a number and greater than 0. ");
      }
    }
    return this.aHeight;
  }

}import { Type1DMatrix, Type2DMatrix } from '../types';
/**
 * Augment dataset with an additional dummy feature.
 * This is useful for fitting an intercept term with implementations which cannot otherwise fit it directly.
 *
 * @example
 * import { add_dummy_feature } from 'machinelearn/preprocessing';
 * const dummy = add_dummy_feature([[0, 1, 2], [1, 0, 3]]);
 * console.log(dummy); // returns: [ [ 1, 0, 1, 2 ], [ 1, 1, 0, 3 ] ]
 *
 * @param X - A matrix of data
 * @param value - Value to use for the dummy feature.
 */
export declare function add_dummy_feature(X?: Type2DMatrix<number>, value?: number): number[][];
/**
 * Encode categorical integer features using a one-hot aka one-of-K scheme.
 *
 * The input to this transformer should be a matrix of integers, denoting the
 * values taken on by categorical (discrete) features. The output will be a sparse
 * matrix where each column corresponds to one possible value of one feature.
 * It is assumed that input features take on values in the range [0, n_values).
 *
 * This encoding is needed for feeding categorical data to many
 * scikit-learn estimators, notably linear models and SVMs with the standard kernels.
 *
 * Note: a one-hot encoding of y labels should use a LabelBinarizer instead.
 *
 * @example
 * const enc = new OneHotEncoder();
 * const planetList = [
 *  { planet: 'mars', isGasGiant: false, value: 10 },
 *  { planet: 'saturn', isGasGiant: true, value: 20 },
 *  { planet: 'jupiter', isGasGiant: true, value: 30 }
 * ];
 * const encodeInfo = enc.encode(planetList, {
 *  dataKeys: ['value', 'isGasGiant'],
 *  labelKeys: ['planet']
 * });
 * // encodeInfo.data -> [ [ -1, 0, 1, 0, 0 ], [ 0, 1, 0, 1, 0 ], [ 1, 1, 0, 0, 1 ] ]
 * const decodedInfo = enc.decode(encodeInfo.data, encodeInfo.decoders);
 * // gives you back the original value, which is `planetList`
 */
export declare class OneHotEncoder {
    /**
     * encode data according to dataKeys and labelKeys
     *
     * @param data - list of records to encode
     * @param options
     */
    encode(data?: any, {
    /**
     * Independent variables
     */
    dataKeys,
    /**
     * Depdenent variables
     */
    labelKeys, }?: {
        dataKeys: Type1DMatrix<string>;
        labelKeys: Type1DMatrix<string>;
    }): {
        /**
         * Encoded data
         */
        data: any[];
        /**
         * Decoder
         */
        decoders: any[];
    };
    /**
     * Decode the encoded data back into its original format
     */
    decode(encoded: any, decoders: any): any[];
    /**
     * Decode an encoded row back into its original format
     * @param row
     * @param decoders
     * @returns {Object}
     */
    private decodeRow;
    /**
     * Standardizing field
     * Example dataset:
     * [ { planet: 'mars', isGasGiant: false, value: 10 },
     * { planet: 'saturn', isGasGiant: true, value: 20 },
     * { planet: 'jupiter', isGasGiant: true, value: 30 } ]
     *
     * @param key


 de: &'a mut Deserializer<P>,
  fields: std::slice::Iter<'static, &'static str>,
}

impl<'a, P: PromptRequester> Struct<'a, P> {
  fn new(de: &'a mut Deserializer<P>, fields: &'static [&'static str]) -> Self {
    Struct {
      de,
      fields: fields.iter(),
    }
  }
}

impl<'de: 'a, 'a, P: PromptRequester> MapAccess<'de> for Struct<'a, P> {
  type Error = Error;

  fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>>
  where
    K: DeserializeSeed<'de>,
  {
    match self.fields.next() {
      Some(fld) => {
        self.de.begin_scope(fld, Some(1), ScopeLimit::Implicit)?;
        seed.deserialize(fld.into_deserializer()).map(Some)
      }
      None => Ok(None),
    }
  }

  fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value>
  where
    V: DeserializeSeed<'de>,
  {
    seed.deserialize(&mut *self.de)
  }
}

struct Seq<'a, P: PromptRequester> {
  de: &'a mut Deserializer<P>,
  index: usize,
}

impl<'a, P: PromptRequester> Seq<'a, P> {
  fn new(de: &'a mut Deserializer<P>) -> Self {
    Seq { de, index: 0 }
  }
}

impl<'de: 'a, 'a, P: PromptRequester> SeqAccess<'de> for Seq<'a, P> {
  type Error = Error;

  fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
  where
    T: DeserializeSeed<'de>,
  {
    self.de.begin_scope(
      &format!("[{}]", self.index),
      None,
      ScopeLimit::Implicit,
    )?;
    self.index += 1;
    if self.de.ask_yes_no("Add element?")? {
      seed.deserialize(&mut *self.de).map(Some)
    } else {
      self.de.end_implicit_scopes()?;
      Ok(None)
    }
  }
}

struct Tuple<'a, P: PromptRequester> {
  de: &'a mut Deserializer<P>,
  index: usize,
  len: usize,
}

impl<'a, P: PromptRequester> Tuple<'a, P> {
  fn new(de: &'a mut Deserializer<P>, len: usize) -> Self {
    Tuple { de, index: 0, len }
  }
}

impl<'de, 'a, P: PromptRequester> SeqAccess<'de> for Tuple<'a, P> {
  type Error = Error;

  fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
  where
    T: DeserializeSeed<'de>,
  {
    self.de.begin_scope(
      &format!("[{}/{}]", self.index + 1, self.len),
      None,
      ScopeLimit::Implicit,
    )?;
    if self.index < self.len {
      self.index += 1;
      seed.deserialize(&mut *self.de).map(Some)
    } else {
      self.de.end_implicit_scopes()?;
      Ok(None)
    }
  }
}

struct Map<'a, P: PromptRequester> {
  de: &'a mut Deserializer<P>,
  index: usize,
}

impl<'a, P: PromptRequester> Map<'a, P> {
  fn new(de: &'a mut Deserializer<


self.graphics.layout(),
                self.graphics.desc_set(0),
            );
        }
        self.cmd_buf.set_scissors(0, once(rect));
        self.cmd_buf.set_viewports(0, once(viewport));
        self.cmd_buf.draw(0..6, 0..1);
        self.cmd_buf.end_render_pass();

        // Step 2: Copy the now-composited backbuffer to the `dst` texture
        self.back_buf.set_layout(
            &mut self.cmd_buf,
            Layout::TransferSrcOptimal,
            PipelineStage::TRANSFER,
            ImageAccess::TRANSFER_READ,
        );
        self.dst.set_layout(
            &mut self.cmd_buf,
            Layout::TransferDstOptimal,
            PipelineStage::TRANSFER,
            ImageAccess::TRANSFER_WRITE,
        );
        self.cmd_buf.copy_image(
            self.back_buf.as_ref(),
            Layout::TransferSrcOptimal,
            self.dst.as_ref(),
            Layout::TransferDstOptimal,
            once(ImageCopy {
                src_subresource: SubresourceLayers {
                    aspects: Aspects::COLOR,
                    level: 0,
                    layers: 0..1,
                },
                src_offset: Offset::ZERO,
                dst_subresource: SubresourceLayers {
                    aspects: Aspects::COLOR,
                    level: 0,
                    layers: 0..1,
                },
                dst_offset: Offset::ZERO,
                extent: dims.as_extent_depth(1),
            }),
        );

        // Finish
        self.cmd_buf.finish();

        // Submit
        queue_mut().submit(once(&self.cmd_buf), empty(), empty(), Some(&mut self.fence));
    }
}

impl
 Drop for GradientOp

where
    P: SharedPointerKind,
{
    fn drop(&mut self) {
        unsafe {
            self.wait();
        }
    }
}

impl
 Op
 for GradientOp

where
    P: SharedPointerKind,
{
    fn as_any_mut(&mut self) -> &mut dyn Any {
        self
    }

    unsafe fn is_complete(&self) -> bool {
        Fence::status(&self.fence)
    }

    unsafe fn take_pool(&mut self) -> Lease<Pool
, P> {
        self.pool.take().unwrap()
    }

    unsafe fn wait(&self) {
        Fence::wait(&self.fence);
    }
}
use std::iter::range_step;

use bitboard::{BitBoard, east_one, west_one, north_one, south_one, single_bit, popcnt};
use square::{Square, file, rank};

static mut king_moves : [BitBoard; 64] = [BitBoard(0); 64];
static mut knight_moves : [BitBoard; 64] = [BitBoard(0); 64];
static mut rook_moves : [BitBoard; 102400] = [BitBoard(0); 102400];


      /// </summary>
        Part = 2 << 0,

        /// <summary>
        /// Assembly document
        /// </summary>
        Assembly = 2 << 1,

        /// <summary>
        /// Drawing document
        /// </summary>
        Drawing = 2 << 2,

        /// <summary>
        /// Part document edited in the context of the assembly
        /// </summary>
        InContextPart = 2 << 3,

        /// <summary>
        /// All SOLIDWORKS documents
        /// </summary>
        AllDocuments = Part | Assembly | Drawing,

        /// <summary>
        /// All environments
        /// </summary>
        All = AllDocuments | NoDocuments
    }
}


+OdgVw/uiz9c15b7PHpJ8gmPkSOri3qiiA80fxnwh4nxR7yETGvniwzNme7IsH2R8ska+OfgUAAAiCAgCAhaIAAGChKAAAWCgKAAAWigIAgIWiAABgoSgAAFgoCgAAFooCAICFogAAYKEoAABYKAoAABaKAgCAhaIAAGChKAAAWCgKAAAWigIAgIWiAABgoSgAoNFZFL1wJ/6P0yi6NPYwgBQFADQ7iaLr6/+7fzl67g9jzwJIUQBAs8fX4pX/6UfbHgBmhAIAWmxe++EFIMwQBQC0WD/4f+5/RbwAhPmhAIA29y9HES8AYYYoAKDVacQLQJgjCgBoFT8F4AkA5ocCANrEZwAlbwYA5oQCANqcRtE7UXR17DEANQoAaHH/cvTC//souvDp2IMAYhQA0OIkXvvjFuBFIMwMBQA0O9ueAXTCi0CYHQoAaLT9JIjN//MiEGaGAgAanaRngJ7xXgDMDQUAAAtFAQDAQlEAALBQFAAALBQFAAALRQEAwEJRAACwUBQAACwUBQAAC0UBAMBCUQAAsFAUAAAsFAUAAAtFAQDAQlEAALBQFAAALBQFAAALRQEAwEJRAACwUBQAACzU/wdMmOc7pIN76QAAAABJRU5ErkJggg==" width="768" />

Finally, our familiar satisfactory plot fits the bill again; the
spread does not change as you move horizontally.

createResidualPlot(linear_data) +
  ggtitle("Constant Variance Satisfied", subtitle = "Points show no obvious spreading out or funnelling in from left to right")

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABgAAAAMACAMAAADVCFz+AAABWVBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZpAAZrYzMzM6AAA6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kJA6kLY6kNtNTU1NTW5NTY5Nbo5NbqtNjshmAABmADpmOgBmOjpmZgBmZjpmZmZmZpBm


Shops = Shops or {}

Shops.Vending = {}

onPlayerLoaded(function()
	Wait(1000)
	for k, v in pairs(Locations) do
        if v.isVendingMachine == true and Config.Overrides.VendOverride then
			if v.coords and #v.coords > 0 then
				for i = 1, #v.coords do				-- Add custom vending machine locations
					if v.model then
						local modelPick = math.random(1, #v.model)
						if not IsModelAPed(v.model[i]) then
							makeDistProp({ prop = v.model[modelPick], coords = v.coords[i] }, true, false)
						end
					end
				end
			end
            createModelTarget(v.model, {
                {
                    action = function(data)
                        Shops.Vending.Menu({
                            isVendingMachine = true,
							shop = k,
							shopTable = v,
							entity = type(data) == "table" and data.entity or data
                        })
                    end,
                    icon = v.targetIcon,
                    label = v.targetLabel,
                },
            }, 1.5)
        end
	end
end, true)

Shops.Vending.Menu = function(data)
	local products, stashItems, vendID = data.shopTable.products, {}, data.vendID or nil
	local ShopMenu = {}
	local setheader = " "

	if Config.Overrides.generateStoreLimits then
		if not vendID then
			vendID = "Vend:["..string.sub(data.shopTable.label, 1, 4)..math.floor(GetEntityCoords(data.entity).x or 1)..math.floor(GetEntityCoords(data.entity).y or 1).."]"
		end
		stashItems = triggerCallback('jim-shops:callback:GetStashItems', vendID, data.shopTable)
	end

	for i = 1, #products do
		local amount, lock = products[i].amount, false

        local item = products[i].name:lower()
        if not doesItemExist(item) then
			print("^5Debug^7: ^3ShopItems ^7- ^1Can't ^2find item ^7'^6"..item.."^7'")
		else
            local price = products[i].price == 0 and "Free" or "Cost: $"..products[i].price

			local text = (products[i].info and products[i].info.item) and ("Item: "..products[i].info.item..br) or ""
			text = text..price..br.."Weight: "..(Items[item].weight / 1000)..Config.Overrides.Measurement

			if Config.Overrides.generateStoreLimits then
				if stashItems[item] then
					if not stashItems[item].amount or stashItems[item].amount == 0 then
						amount = 0
						lock = true
					else
						amount = tonumber(stashItems[item].amount)
					end
					text = price..br..(amount <= 0 and "Out Of Stock" or"Amount: x"..amount)..br.."Weight: "..(Items[item].weight / 1000)..Config.Overrides.Measurement
				else
					text = price..br.."Out Of Stock"..br.."Weight: "..(Items[item].weight / 1000)..Config.Overrides.Measurement
					lock = true
				end
			end

			local canSee = true
			if products[i].requiresItem then
				canSee = false
				for _, v in pairs(products[i].requiresItem) do
					canSee = hasItem(v)
					Wait(0)
				end
			end

			if canSee then
				ShopMenu[#ShopMenu+1] = {
					icon = invImg(item),
					isMenuHeader = lock,
					header = getItemLabel(item),
                    txt = text,
					onSelect = function()
						Shops.Vending.Charge({
							item = item,
							cost = products[i].price,
							info = products[i].info,
							shopTable = da


n your program in the conda environment as well. `torch`, `torchvision` and `tqdm` are needed to run the Fashion-MNIST example we provide:
```bash
pip install torch torchvision tqdm
```

---
## 5. Prepare Dataset
To run the Fashion-MNIST example provided by this tutorial on K8s, you should upload the dataset to the Volume (e.g. NFS) beforehand.

Please manually download the Fashion-MNIST dataset and put the data into the Volume. Note that PyTorch `FashionMNIST Dataset` requires unzipped files located in `FashionMNIST/raw/` under the dataset folder.

```bash
# PyTorch official dataset download link
git clone https://github.com/zalandoresearch/fashion-mnist.git

# Copy the dataset files to the folder FashionMNIST/raw in NFS
cp /path/to/fashion-mnist/data/fashion/* /path/to/nfs/dataset/FashionMNIST/raw

# Extract FashionMNIST archives
gzip -d /path/to/nfs/dataset/FashionMNIST/raw/*
```

In the given example, you can specify the argument `--data_dir` to be the directory on NFS for the Fashion-MNIST dataset. The directory should contain `FashionMNIST/raw/train-images-idx3-ubyte` and `FashionMNIST/raw/t10k-images-idx3`.

---
## 6. Prepare Custom Modules
Spark allows to upload Python files(`.py`), and zipped Python packages(`.zip`) across the cluster by setting `--py-files` option in Spark scripts or specifying `extra_python_lib` in `init_orca_context`.

The FasionMNIST example needs to import the modules from [`model.py`](https://github.com/intel-analytics/BigDL/blob/main/python/orca/tutorial/pytorch/FashionMNIST/model.py).

__Note:__ Please upload the extra Python dependency files to the Volume (e.g. NFS) when running the program on k8s-cluster mode (see __[Section 6.2.2](#id2)__ for more details).

* When using [`python` command](#use-python-command), please specify `extra_python_lib` in `init_orca_context`.
```python
init_orca_context(..., extra_python_lib="/path/to/model.py")
```
For more details, please see [BigDL Python Dependencies](https://bigdl.readthedocs.io/en/latest/doc/Orca/Overview/orca-context.html#python-dependencies).

* When using [`spark-submit`](#use-spark-submit), please specify `--py-files` option in the submit command.
```bash
spark-submit
    ...
    --py-files /path/to/model.py
    ...
```
For more details, please see [Spark Python Dependencies](https://spark.apache.org/docs/latest/submitting-applications.html).

* After uploading `model.py` to K8s, you can import this custom module as follows:
```python
from model import model_creator, optimizer_creator
```

If your program depends on a nested directory of Python files, you are recommended to follow the steps below to use a zipped package instead.

1. Compress the directory into a zipped package.
    ```bash
    zip -q -r FashionMNIST_zipped.zip FashionMNIST
    ```
2. Upload the zipped package (`FashionMNIST_zipped.zip`) to K8s by setting `--py-files` or specifying `extra_python_lib` as discussed above.

3. You can then import the custom modules from the unzipped file in your program as follows:
    ```python
    from FashionMNIST.model import model_creator, optimizer_creator
    ```

---
## 7. Run Jobs on K8s
In the remaining part of this tutorial, we will illustrate three ways to submit and run BigDL Orca applications on K8s.

* Use `python` command
* Use `spark-


                     fBuffer, 0,
                     byteBufferLimit - bytePos);
            fBufferLength = byteBufferLimit - bytePos;
            bytePos += fBufferLength;
            break mainLoop;
            }

            aByte = byteBuffer[bytePos++] & 0xFF;
            fCurrentWindow = (aByte & 0xE0) >> 5;
            fOffsets[fCurrentWindow] = 0x10000 +
            (0x80 * (((aByte & 0x1F) << 8)
                 | (byteBuffer[bytePos++] & 0xFF)));
            fMode = SINGLEBYTEMODE;
            break unicodeModeLoop;
            //break;

            // handle all change tags
        case UCHANGE0: case UCHANGE1: case UCHANGE2: case UCHANGE3:
        case UCHANGE4: case UCHANGE5: case UCHANGE6: case UCHANGE7:
            fCurrentWindow = aByte - UCHANGE0;
            fMode = SINGLEBYTEMODE;
            break unicodeModeLoop;
            //break;

            // quote unicode
        case UQUOTEU:
            // verify we have two bytes following tag
            // if not, save state and break out
            if(bytePos >= byteBufferLimit  - 1) {
            --bytePos;
            System.arraycopy(byteBuffer, bytePos,
                     fBuffer, 0,
                     byteBufferLimit - bytePos);
            fBufferLength = byteBufferLimit - bytePos;
            bytePos += fBufferLength;
            break mainLoop;
            }

            aByte = byteBuffer[bytePos++];
            charBuffer[ucPos++] = (char)
            (aByte << 8 | (byteBuffer[bytePos++] & 0xFF));
            break;

        default:
            // verify there is a byte following tag
            // if not, save state and break out
            if(bytePos >= byteBufferLimit ) {
            --bytePos;
            System.arraycopy(byteBuffer, bytePos,
                     fBuffer, 0,
                     byteBufferLimit - bytePos);
            fBufferLength = byteBufferLimit - bytePos;
            bytePos += fBufferLength;
            break mainLoop;
            }

            charBuffer[ucPos++] = (char)
            (aByte << 8 | (byteBuffer[bytePos++] & 0xFF));
            break;

        } // end switch
        } // end while
        break;

        } // end switch( fMode )
    } // end while

        // fill in output parameter
    if(bytesRead != null)
        bytesRead [0] = (bytePos - byteBufferStart);

        // return # of chars written
    return (ucPos - charBufferStart);
    }

    /**
     * Reset the decompressor to its initial state.
     * @stable ICU 2.4
     */
    public void reset()
    {
        // reset dynamic windows
        fOffsets[0] = 0x0080;    // Latin-1
        fOffsets[1] = 0x00C0;    // Latin-1 Supplement + Latin Extended-A
        fOffsets[2] = 0x0400;    // Cyrillic
        fOffsets[3] = 0x0600;    // Arabic
        fOffsets[4] = 0x0900;    // Devanagari
        fOffsets[5] = 0x3040;    // Hiragana
        fOffsets[6] = 0x30A0;    // Katakana
        fOffsets[7] = 0xFF00;    // Fullwidth ASCII

        fCurrentWindow  = 0;                // Make current window Latin-1
        fMode           = SINGLEBYTEMODE;   // Always start in single-byte mode
        fBufferLength   = 0;                // Empty buffer
    }
}
/*
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of


tiple threads... an input stream pump lives
    // on only one thread.

    if (!mWaiting) {
        nsresult rv = mAsyncStream->AsyncWait(this, 0, 0, mEventQ);
        if (NS_FAILED(rv)) {
            NS_ERROR("AsyncWait failed");
            return rv;
        }
        mWaiting = PR_TRUE;
    }
    return NS_OK;
}

//-----------------------------------------------------------------------------
// nsInputStreamPump::nsISupports
//-----------------------------------------------------------------------------

// although this class can only be accessed from one thread at a time, we do
// allow its ownership to move from thread to thread, assuming the consumer
// understands the limitations of this.
NS_IMPL_THREADSAFE_ISUPPORTS3(nsInputStreamPump,
                              nsIRequest,
                              nsIInputStreamCallback,
                              nsIInputStreamPump)

//-----------------------------------------------------------------------------
// nsInputStreamPump::nsIRequest
//-----------------------------------------------------------------------------

NS_IMETHODIMP
nsInputStreamPump::GetName(nsACString &result)
{
    result.Truncate();
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::IsPending(PRBool *result)
{
    *result = (mState != STATE_IDLE);
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::GetStatus(nsresult *status)
{
    *status = mStatus;
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::Cancel(nsresult status)
{
    LOG(("nsInputStreamPump::Cancel [this=%x status=%x]\n",
        this, status));

    if (NS_FAILED(mStatus)) {
        LOG(("  already canceled\n"));
        return NS_OK;
    }

    NS_ASSERTION(NS_FAILED(status), "cancel with non-failure status code");
    mStatus = status;

    // close input stream
    if (mAsyncStream) {
        mAsyncStream->CloseWithStatus(status);
        mSuspendCount = 0; // un-suspend
        EnsureWaiting();
    }
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::Suspend()
{
    LOG(("nsInputStreamPump::Suspend [this=%x]\n", this));
    NS_ENSURE_TRUE(mState != STATE_IDLE, NS_ERROR_UNEXPECTED);
    ++mSuspendCount;
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::Resume()
{
    LOG(("nsInputStreamPump::Resume [this=%x]\n", this));
    NS_ENSURE_TRUE(mSuspendCount > 0, NS_ERROR_UNEXPECTED);
    NS_ENSURE_TRUE(mState != STATE_IDLE, NS_ERROR_UNEXPECTED);

    if (--mSuspendCount == 0)
        EnsureWaiting();
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::GetLoadFlags(nsLoadFlags *aLoadFlags)
{
    *aLoadFlags = mLoadFlags;
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::SetLoadFlags(nsLoadFlags aLoadFlags)
{
    mLoadFlags = aLoadFlags;
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::GetLoadGroup(nsILoadGroup **aLoadGroup)
{
    NS_IF_ADDREF(*aLoadGroup = mLoadGroup);
    return NS_OK;
}

NS_IMETHODIMP
nsInputStreamPump::SetLoadGroup(nsILoadGroup *aLoadGroup)
{
    mLoadGroup = aLoadGroup;
    return NS_OK;
}

//-----------------------------------------------------------------------------
// nsInputStreamPump::nsIInputStreamPump implementation
//-----------------------------------------------------------------------------

NS_IMETHODIMP
nsInputStreamPump::


(Decielectronvolt::class, Decielectronvolt.serializer())
    subclass(Gigaelectronvolt::class, Gigaelectronvolt.serializer())
    subclass(Hectoelectronvolt::class, Hectoelectronvolt.serializer())
    subclass(Kiloelectronvolt::class, Kiloelectronvolt.serializer())
    subclass(Megaelectronvolt::class, Megaelectronvolt.serializer())
    subclass(Microelectronvolt::class, Microelectronvolt.serializer())
    subclass(Millielectronvolt::class, Millielectronvolt.serializer())
    subclass(Nanoelectronvolt::class, Nanoelectronvolt.serializer())
    subclass(Erg::class, Erg.serializer())
    subclass(Centierg::class, Centierg.serializer())
    subclass(Decaerg::class, Decaerg.serializer())
    subclass(Decierg::class, Decierg.serializer())
    subclass(Gigaerg::class, Gigaerg.serializer())
    subclass(Hectoerg::class, Hectoerg.serializer())
    subclass(Kiloerg::class, Kiloerg.serializer())
    subclass(Megaerg::class, Megaerg.serializer())
    subclass(Microerg::class, Microerg.serializer())
    subclass(Millierg::class, Millierg.serializer())
    subclass(Nanoerg::class, Nanoerg.serializer())
    subclass(Joule::class, Joule.serializer())
    subclass(Centijoule::class, Centijoule.serializer())
    subclass(Decajoule::class, Decajoule.serializer())
    subclass(Decijoule::class, Decijoule.serializer())
    subclass(Gigajoule::class, Gigajoule.serializer())
    subclass(Hectojoule::class, Hectojoule.serializer())
    subclass(Kilojoule::class, Kilojoule.serializer())
    subclass(Megajoule::class, Megajoule.serializer())
    subclass(Microjoule::class, Microjoule.serializer())
    subclass(Millijoule::class, Millijoule.serializer())
    subclass(Nanojoule::class, Nanojoule.serializer())
}

internal fun PolymorphicModuleBuilder<ImperialEnergy>.registerImperialEnergyClasses() {
    subclass(HorsepowerHour::class, HorsepowerHour.serializer())
    subclass(ImperialMetricAndImperialEnergyWrapper::class, ImperialMetricAndImperialEnergyWrapper.serializer())
    subclass(BritishThermalUnit::class, BritishThermalUnit.serializer())
    subclass(BritishThermalUnit.Thermal::class, BritishThermalUnit.Thermal.serializer())
    subclass(FootPoundForce::class, FootPoundForce.serializer())
    subclass(FootPoundal::class, FootPoundal.serializer())
    subclass(InchOunceForce::class, InchOunceForce.serializer())
    subclass(InchPoundForce::class, InchPoundForce.serializer())
}
/*
 Copyright 2022 Splendo Consulting B.V. The Netherlands

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

 */

package com.splendo.kaluga.scientific.unit

import com.splendo.kaluga.base.utils.Decimal
import com.splendo.kaluga.scientific.PhysicalQuantity
import kotlinx.serialization.Serializable
import kotlinx.serialization.modules.PolymorphicModuleBuilder
import kotlinx.serialization.modules.SerializersModuleBuilder
import kotlinx.serialization.modules.polymorp


k_properties":{},"content":"26 de mayo: Día de la Integración Andina","type":"text"},{"_id":"HPTX5I6GOFGZTFK7MOSQEBG3HA","additional_properties":{"comments":[],"inline_comments":[]},"block_properties":{},"content":"28 de mayo: Día Internacional del Juego","type":"text"},{"_id":"K4N5CXDIOJAFVOCKJHCDHQCIEY","additional_properties":{"comments":[],"inline_comments":[]},"block_properties":{},"content":"30 de mayo: Día Nacional de la Papa","type":"text"},{"_id":"APQQT4T7QJATFGRXUTRAPOK3PI","additional_properties":{"comments":[],"inline_comments":[]},"block_properties":{},"content":"31 de mayo: Día del no Fumador","type":"text"},{"_id":"3T43A3DXKFDV7MFTIIJKFHBXYY","additional_properties":{"comments":[],"inline_comments":[]},"block_properties":{},"content":"31 de mayo: Día de la Solidaridad","type":"text"}]},{"_id":"JBIEZTFYEVAO3DAJI5IP4EZ53I","type":"blockquote","additional_properties":{"_id":"456BXF4LZZFSPKXP72LJQBUP6Q","comments":[],"inline_comments":[]},"content":"PUEDES VER: ¿Qué es la Sunedu, cómo está conformada y para qué sirve?"},{"_id":"SCWQO6Y4DJA7HDE55GNDRH4QR4","type":"header","level":2,"additional_properties":{"_id":1651713888068,"comments":[],"inline_comments":[]},"content":"Minedu autorizó la apertura de quioscos, cafeterías y comedores escolares"},{"_id":"CTKLJXWLLBBIJMR25OR7VDVFAQ","type":"text","additional_properties":{"_id":1651713888069,"comments":[],"inline_comments":[]},"content":"Desde el pasado lunes 2 de mayo los quioscos, cafeterías y comedores escolares están autorizados de funcionar dentro de los centros educativos. Eso sí, estos espacios deberán contar con servicios de agua, desagüe y electricidad. El objetivo de esta medida es resguardar la seguridad y la salud de los alumnos quienes no podrán compartir alimentos ni utensilios."},{"_id":"RQTDHFPXQJEGRAPFC4X7KNYUQA","type":"header","level":2,"additional_properties":{"_id":1651670067004,"comments":[],"inline_comments":[]},"content":"¿Cuál es el nuevo incremento en los sueldos para docentes de colegios públicos?"},{"_id":"V7424OLKDJCNPD4KYPPUT36UAU","type":"text","additional_properties":{"_id":1651670067005,"comments":[],"inline_comments":[]},"content":"Los profesores recibirán un aumento en su salario este 2022 que se viene dando de forma progresiva. Revisa el cronograma según la escala magisterial y la jornada de trabajo que ha facilitado el Ministerio de Educación."},{"_id":"DYHEVVJ4WBHARK7EUMVZBBZIEI","additional_properties":{"fullSizeResizeUrl":"/resizer/bzo2AS7UxhpNAcHAQ7ta3qbTYNc=/arc-anglerfish-arc2-prod-gruporepublica/public/DYHEVVJ4WBHARK7EUMVZBBZIEI.webp","galleries":[],"ingestionMethod":"manual","mime_type":"application/octet-stream","originalName":"REALFPHWINFY3JNYHT


use interface for interacting with the Whirlpool Program. This SDK abstracts many of the underlying complexities, such as tick array management, and makes managing pools and positions, and executing swaps much simpler. It is suitable for developers who need efficient, high-level functionalities and want to minimize manual configuration and management.

### 2. Core SDK
The Core SDK provides essential utilities for math operations and quotes, required for working with liquidity pools. This library focuses on calculations such as determining position status, price conversions, and computing quotes on adjusting liquidity and swaps. It is written in Rust but has been compiled to WebAssembly (Wasm) for easy integration into TypeScript projects.

### 3. Low-Level SDK
#### Compatibility
- Compatible with `anchor` versions `^0.26` but `<0.30`. If you enable the `anchor` feature of `orca_whirlpools_client` in `cargo.toml` while using a version of anchor that's `^0.30` in your project, you may need to apply a lockfile patch to switch to a lower version:
    ```bash
    cargo update anchor:<current-version> --precise 0.29
    ```
- Compatible with `solana-program` versions `^1.18.0` but `<3.0.0`. By default, Cargo will install the latest version of Solana SDK `^v2`. This can cause dependcy issues when using older versions. To solve this you can apply a lockfile patch with the following command:
    ```bash
    cargo update solana-program:<current-version> --precise <required-version>
    ```
- NOTE: if you are dealing with compatibility issues for both `anchor` and `solana-program`, the order of the patches matters. First patch `anchor`, then patch `solana-program`.

#### Description
The Low-Level SDK is autogenerated from the Whirlpool Program's Interface Description Language (IDL). This SDK provides direct program interactions and is designed for developers who need complete, low-level control over Whirlpool operations. It covers direct access to Solana accounts, instructions, and transactions.# @orca-so/whirlpools-example-rust-repositioning-bot

## 0.2.2

### Patch Changes

- [#884](https://github.com/orca-so/whirlpools/pull/884) [`6cd51d6`](https://github.com/orca-so/whirlpools/commit/6cd51d64de8fe0f310c1bf2f3a5e659a68c426d0) Thanks [@calintje](https://github.com/calintje)! - Updated cargo.lock

## 0.2.1

### Patch Changes

- [#821](https://github.com/orca-so/whirlpools/pull/821) [`c72652d`](https://github.com/orca-so/whirlpools/commit/c72652dbb21a57d2b715415e14f3fcd65f4b0728) Thanks [@calintje](https://github.com/calintje)! - Fix calculation of position deviation

## 0.2.0

### Minor Changes

- [#726](https://github.com/orca-so/whirlpools/pull/726) [`7f0ca73`](https://github.com/orca-so/whirlpools/commit/7f0ca73f49ce8354bb9156bba326cd5d9e93d665) Thanks [@wjthieme](https://github.com/wjthieme)! - Add support for solana v2 crates

## 0.1.1

### Patch Changes

- [#679](https://github.com/orca-so/whirlpo


.Generator] [Debug] - WorkoutWotch.Services.Contracts
[PCLMock.CodeGeneration.Generator] [Debug] - WorkoutWotch.Services
[PCLMock.CodeGeneration.Generator] [Debug] - WorkoutWotch.Utility
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\PCLMock.CodeGeneration.T4.5.0.1-alpha\tools\PCLMock.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin\4.2.1.64\System.Reactive.Linq.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin\4.2.1.64\System.Reactive.Core.dll
[PCLMock.CodeGeneration.Generator] [Debug] Compilation generated for project 'WorkoutWotch.Services.iOS' with references:
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Genesis.Ensure.1.0.4-alpha\lib\portable-net45+win8+wp8+wpa81\Genesis.Ensure.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Genesis.Logging.1.0.7-alpha\lib\portable-net45+win8+wp8+wpa81\Genesis.Logging.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\mscorlib.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Core.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Rx-Core.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Rx-Interfaces.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Rx-Linq.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Users\Kent\Repository\WorkoutWotch\Src\packages\Rx-PlatformServices.2.2.5\lib\portable-windows8+net45+wp8\System.Reactive.PlatformServices.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Xml.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Xamarin.iOS.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\Microsoft.Win32.Primitives.dll
[PCLMock.CodeGeneration.Generator] [Debug] - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\Microsoft.Win32.Registry.AccessControl.dll
[PCLMock.Code


16C
/* 802770FC 0027263C  38 6D C7 38 */	addi r3, r13, lbl_806A13D8-_SDA_BASE_
/* 80277100 00272640  48 00 00 7D */	bl func_8027717C
/* 80277104 00272644  38 6D C7 3C */	addi r3, r13, lbl_806A13DC-_SDA_BASE_
/* 80277108 00272648  48 00 00 85 */	bl func_8027718C
/* 8027710C 0027264C  38 6D C7 40 */	addi r3, r13, lbl_806A13E0-_SDA_BASE_
/* 80277110 00272650  48 00 00 8D */	bl func_8027719C
/* 80277114 00272654  38 6D C7 44 */	addi r3, r13, lbl_806A13E4-_SDA_BASE_
/* 80277118 00272658  48 00 00 95 */	bl func_802771AC
/* 8027711C 0027265C  38 6D C7 48 */	addi r3, r13, lbl_806A13E8-_SDA_BASE_
/* 80277120 00272660  48 00 00 9D */	bl func_802771BC
/* 80277124 00272664  38 6D C7 4C */	addi r3, r13, lbl_806A13EC-_SDA_BASE_
/* 80277128 00272668  48 00 00 A5 */	bl func_802771CC
/* 8027712C 0027266C  38 6D C7 50 */	addi r3, r13, lbl_806A13F0-_SDA_BASE_
/* 80277130 00272670  48 00 00 AD */	bl func_802771DC
/* 80277134 00272674  38 6D C7 54 */	addi r3, r13, lbl_806A13F4-_SDA_BASE_
/* 80277138 00272678  48 00 00 B5 */	bl func_802771EC
/* 8027713C 0027267C  38 6D C7 58 */	addi r3, r13, lbl_806A13F8-_SDA_BASE_
/* 80277140 00272680  48 00 00 BD */	bl func_802771FC
/* 80277144 00272684  38 6D C7 5C */	addi r3, r13, lbl_806A13FC-_SDA_BASE_
/* 80277148 00272688  48 00 00 C5 */	bl func_8027720C
/* 8027714C 0027268C  80 01 00 14 */	lwz r0, 0x14(r1)
/* 80277150 00272690  7C 08 03 A6 */	mtlr r0
/* 80277154 00272694  38 21 00 10 */	addi r1, r1, 0x10
/* 80277158 00272698  4E 80 00 20 */	blr

.global func_8027715C
func_8027715C:
/* 8027715C 0027269C  3C 80 80 5A */	lis r4, lbl_8059C348@ha
/* 80277160 002726A0  38 84 C3 48 */	addi r4, r4, lbl_8059C348@l
/* 80277164 002726A4  90 83 00 00 */	stw r4, 0(r3)
/* 80277168 002726A8  4E 80 00 20 */	blr

.global func_8027716C
func_8027716C:
/* 8027716C 002726AC  3C 80 80 5A */	lis r4, lbl_8059C338@ha
/* 80277170 002726B0  38 84 C3 38 */	addi r4, r4, lbl_8059C338@l


       )

        goal_dist = (
            np.linalg.norm(traj.data[-1] - traj.goal_set[traj.goal_idx])
            if self.cfg.goal_set_proj
            else 0
        )

        terminate = (
            (collide <= self.cfg.allow_collision_point)
            and self.cfg.pre_terminate
            and (goal_dist < 0.01)
            and smoothness_loss_sum < self.cfg.terminate_smooth_loss
        )

        failure_terminate = (
            (collide >= self.cfg.allow_collision_point * 10)
            or smoothness_loss_sum >= self.cfg.terminate_smooth_loss * 2.5
        )

        execute = (collide <= self.cfg.allow_collision_point) and (
            smoothness_loss_sum < self.cfg.terminate_smooth_loss
        )
        standoff_idx = (
            len(traj.data) - self.cfg.reach_tail_length
            if self.cfg.use_standoff
            else len(traj.data) - 1
        )
        info = {
            "collision_pts": collision_pts,
            "obs": obstacle_loss_sum,
            "smooth": smoothness_loss_sum,
            "grasp": 0,
            "weighted_obs": weighted_obs,
            "weighted_smooth": weighted_smooth,
            "weighted_smooth_grad": np.linalg.norm(weighted_smooth_grad),
            "weighted_obs_grad": np.linalg.norm(weighted_obs_grad),
            "weighted_grasp_grad": 0,
            "weighted_grasp": 0,
            "gradient": grad,
            "failure_terminate": failure_terminate,
            "cost": cost,
            "grad": np.linalg.norm(grad),
            "terminate": terminate,
            "collide": collide,
            "standoff_idx": standoff_idx,
            "reach": goal_dist,
            "execute": execute,
            "cost_traj": cost_traj,
        }

        return cost, grad, info


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

from aliyunsdkcore.request import RpcRequest

class ListApprovalSchemasForApprovalProcessesRequest(RpcRequest):

	def __init__(self):
		RpcRequest.__init__(self, 'csas', '2023-01-20', 'ListApprovalSchemasForApprovalProcesses')
		self.set_method('GET')

	def get_ProcessIds(self): # Array
		return self.get_query_params().get('ProcessIds')

	def set_ProcessIds(self, ProcessIds):  # Array
		for index1, value1 in enumerate(ProcessIds):
			self.add_query_param('ProcessIds.' + str(index1 + 1), value1)


 fifo_B_PE_5_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_6_1;
#pragma HLS STREAM variable = fifo_B_PE_6_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_7_1;
#pragma HLS STREAM variable = fifo_B_PE_7_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_8_1;
#pragma HLS STREAM variable = fifo_B_PE_8_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_9_1;
#pragma HLS STREAM variable = fifo_B_PE_9_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_10_1;
#pragma HLS STREAM variable = fifo_B_PE_10_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_11_1;
#pragma HLS STREAM variable = fifo_B_PE_11_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_12_1;
#pragma HLS STREAM variable = fifo_B_PE_12_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_13_1;
#pragma HLS STREAM variable = fifo_B_PE_13_1 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_0_2;
#pragma HLS STREAM variable = fifo_B_PE_0_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_1_2;
#pragma HLS STREAM variable = fifo_B_PE_1_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_2_2;
#pragma HLS STREAM variable = fifo_B_PE_2_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_3_2;
#pragma HLS STREAM variable = fifo_B_PE_3_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_4_2;
#pragma HLS STREAM variable = fifo_B_PE_4_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_5_2;
#pragma HLS STREAM variable = fifo_B_PE_5_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_6_2;
#pragma HLS STREAM variable = fifo_B_PE_6_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_7_2;
#pragma HLS STREAM variable = fifo_B_PE_7_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_8_2;
#pragma HLS STREAM variable = fifo_B_PE_8_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_9_2;
#pragma HLS STREAM variable = fifo_B_PE_9_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_10_2;
#pragma HLS STREAM variable = fifo_B_PE_10_2 depth = 2
  /* PE fifo */ hls::stream<B_t8> fifo_B_PE_11_2;
#pragma HLS STREAM variable =


.Task Submit()
    {
        await form.Validate();

        if (form.IsValid)
        {

            var response = await _taskController.DeleteAttachment(attachment.Id);
            if (response.ToString() == "Microsoft.AspNetCore.Mvc.NoContentResult")
            {
                Snackbar.Add(@localizer["attachmentDeleted"], Severity.Success);
                MudDialog.Close(DialogResult.Ok(true));
            }
            else
            {
                Snackbar.Add(@localizer["attachmentDeletedError"], Severity.Error);
            }

        }
    }
}


 mut easy = Easy::new();
  let mut data = Vec::new();
  easy.url("https://api.apidash.dev/country/data?code=US").unwrap();
  easy.get(true).unwrap();

  {
    let mut transfer = easy.transfer();
    transfer.write_function(|new_data| {
        data.extend_from_slice(new_data);
        Ok(new_data.len())
    }).unwrap();
    transfer.perform().unwrap();
  }

  let response_body = String::from_utf8_lossy(&data);

  println!("Response body: {}", response_body);
  println!("Response code: {}", easy.response_code().unwrap());
}""";
      expect(
          codeGen.getCode(
            CodegenLanguage.rustCurl,
            requestModelGet2,
            SupportedUriSchemes.https,
          ),
          expectedCode);
    });
    test('GET3', () {
      const expectedCode = r"""
use curl::easy::Easy;

fn main() {
  let mut easy = Easy::new();
  let mut data = Vec::new();
  easy.url("https://api.apidash.dev/country/data?code=IND").unwrap();
  easy.get(true).unwrap();

  {
    let mut transfer = easy.transfer();
    transfer.write_function(|new_data| {
        data.extend_from_slice(new_data);
        Ok(new_data.len())
    }).unwrap();
    transfer.perform().unwrap();
  }

  let response_body = String::from_utf8_lossy(&data);

  println!("Response body: {}", response_body);
  println!("Response code: {}", easy.response_code().unwrap());
}""";
      expect(
          codeGen.getCode(
            CodegenLanguage.rustCurl,
            requestModelGet3,
            SupportedUriSchemes.https,
          ),
          expectedCode);
    });
    test('GET4', () {
      const expectedCode = r"""
use curl::easy::Easy;

fn main() {
  let mut easy = Easy::new();
  let mut data = Vec::new();
  easy.url("https://api.apidash.dev/humanize/social?num=8700000&digits=3&system=SS&add_space=true&trailing_zeros=true").unwrap();
  easy.get(true).unwrap();

  {
    let mut transfer = easy.transfer();
    transfer.write_function(|new_data| {
        data.extend_from_slice(new_data);
        Ok(new_data.len())
    }).unwrap();
    transfer.perform().unwrap();
  }

  let response_body = String::from_utf8_lossy(&data);

  println!("Response body: {}", response_body);
  println!("Response code: {}", easy.response_code().unwrap());
}""";
      expect(
          codeGen.getCode(
            CodegenLanguage.rustCurl,
            requestModelGet4,
            SupportedUriSchemes.https,
          ),
          expectedCode);
    });
    test('GET5', () {
      const expectedCode = r"""
use curl::easy::Easy;
use curl::easy::List;

fn main() {
  let mut easy = Easy::new();
  let mut data = Vec::new();
  easy.url("https://api.github.com/repos/foss42/apidash").unwrap();
  easy.get(true).unwrap();

  let mut list = List::new();
  list.append("User-Agent: Test Agent").unwrap();
  easy.http_headers(list).unwrap();

  {
    let mut transfer = easy.transfer();
    transfer.write_function(|new_data| {
        data.extend_from_slice(new_data);
        Ok(new_data.len())
    }).unwrap();
    transfer.perform().unwrap();
  }

  let response_body = String::from_utf


         // c         On exit dpmeps is the machine precision.
            // c
            // c     MINPACK-2 Project. February 1991.
            // c     Argonne National Laboratory and University of Minnesota.
            // c     Brett M. Averick.
            // c
            // c     *******

            // c     determine ibeta, beta ala malcolm.

            #endregion

            #region Body

            A = ONE;
            B = ONE;
        LABEL10:;
            A += A;
            TEMP = A + ONE;
            TEMP1 = TEMP - A;
            if (TEMP1 - ONE == ZERO) goto LABEL10;
        LABEL20:;
            B += B;
            TEMP = A + B;
            ITEMP = Convert.ToInt32(Math.Truncate(TEMP - A));
            if (ITEMP == 0) goto LABEL20;
            IBETA = ITEMP;
            BETA = Convert.ToDouble(IBETA);

            // c     determine it, irnd.

            IT = 0;
            B = ONE;
        LABEL30:;
            IT += 1;
            B *= BETA;
            TEMP = B + ONE;
            TEMP1 = TEMP - B;
            if (TEMP1 - ONE == ZERO) goto LABEL30;
            IRND = 0;
            BETAH = BETA / TWO;
            TEMP = A + BETAH;
            if (TEMP - A != ZERO) IRND = 1;
            TEMPA = A + BETA;
            TEMP = TEMPA + BETAH;
            if ((IRND == 0) && (TEMP - TEMPA != ZERO)) IRND = 2;

            // c     determine dpmeps.

            NEGEP = IT + 3;
            BETAIN = ONE / BETA;
            A = ONE;
            for (I = 1; I <= NEGEP; I++)
            {
                A *= BETAIN;
            }
        LABEL50:;
            TEMP = ONE + A;
            if (TEMP - ONE != ZERO) goto LABEL60;
            A *= BETA;
            goto LABEL50;
        LABEL60:;
            dpmeps = A;
            if ((IBETA == 2) || (IRND == 0)) goto LABEL70;
            A = (A * (ONE + A)) / TWO;
            TEMP = ONE + A;
            if (TEMP - ONE != ZERO) dpmeps = A;

        LABEL70:  return dpmeps;

        return dpmeps;

            #endregion

        }
    }

    // c====================== The end of dpmeps ==============================
}


#if defined(__AVR__)
#include <avr/io.h>
/* Automatically generated - do not edit */

	.section	.progmem.data,"a",@progbits
	.p2align	8
	.type	table_7, @object
	.size	table_7, 104
table_7:
	.byte	1
	.byte	2
	.byte	4
	.byte	8
	.byte	16
	.byte	32
	.byte	65
	.byte	3
	.byte	6
	.byte	12
	.byte	24
	.byte	48
	.byte	97
	.byte	66
	.byte	5
	.byte	10
	.byte	20
	.byte	40
	.byte	81
	.byte	35
	.byte	71
	.byte	15
	.byte	30
	.byte	60
	.byte	121
	.byte	114
	.byte	100
	.byte	72
	.byte	17
	.byte	34
	.byte	69
	.byte	11
	.byte	22
	.byte	44
	.byte	89
	.byte	51
	.byte	103
	.byte	78
	.byte	29
	.byte	58
	.byte	117
	.byte	106
	.byte	84
	.byte	41
	.byte	83
	.byte	39
	.byte	79
	.byte	31
	.byte	62
	.byte	125
	.byte	122
	.byte	116
	.byte	104
	.byte	80
	.byte	33
	.byte	67
	.byte	7
	.byte	14
	.byte	28
	.byte	56
	.byte	113
	.byte	98
	.byte	68
	.byte	9
	.byte	18
	.byte	36
	.byte	73
	.byte	19
	.byte	38
	.byte	77
	.byte	27
	.byte	54
	.byte	109
	.byte	90
	.byte	53
	.byte	107
	.byte	86
	.byte	45
	.byte	91
	.byte	55
	.byte	111
	.byte	94
	.byte	61
	.byte	123
	.byte	118
	.byte	108
	.byte	88
	.byte	49
	.byte	99
	.byte	70
	.byte	13
	.byte	26
	.byte	52
	.byte	105
	.byte	82
	.byte	37
	.byte	75
	.byte	23
	.byte	46
	.byte	93
	.byte	59
	.byte	119
	.byte	110
	.byte	92

	.text
.global knot384_permute_7
	.type knot384_permute_7, @function
knot384_permute_7:
	push r28
	push r29
	push r2
	push r3
	push r4
	push r5
	push r6
	push r7
	push r8
	push r9
	push r10
	push r11
	push r12
	push r13
	push r14
	movw r30,r24
	in r28,0x3d
	in r29,0x3e
	subi r28,72
	sbci r29,0
	in r0,0x3f
	cli
	out 0x3e,r29
	out 0x3f,r0
	out 0x3d,r2


        tEvent=(e as TouchEvent).touches[0];
      } else { // Allow external code to set focus and thus display the OSK on touch devices if required (KMEW-123)
        tEvent={clientX:0, clientY:0}
        // Will usually be called from setActiveElement, which should define DOMEventHandlers.states.lastActiveElement
        if(DOMEventHandlers.states.lastActiveElement) {
          tEvent.target = DOMEventHandlers.states.lastActiveElement['kmw_ip'];
        // but will default to first input or text area on page if DOMEventHandlers.states.lastActiveElement is null
        } else {
          tEvent.target = this.keyman.domManager.sortedInputs[0]['kmw_ip'];
        }
      }

      this.setFocusWithTouch(tEvent);
    }.bind(this);

    setFocusWithTouch(tEvent: {clientX: number, clientY: number, target?: EventTarget}) {
      var osk = this.keyman.osk;

      var touchX=tEvent.clientX,touchY=tEvent.clientY;
      var tTarg=tEvent.target as HTMLElement;
      var scroller: HTMLElement;

      // Identify the scroller element
      if(tTarg && dom.Utils.instanceof(tTarg, "HTMLSpanElement")) {
        scroller=tTarg.parentNode as HTMLElement;
      } else if(tTarg && (tTarg.className != null && tTarg.className.indexOf('keymanweb-input') >= 0)) {
        scroller=tTarg.firstChild as HTMLElement;
      } else {
        scroller=tTarg;
      }

      // And the actual target element
      var target=scroller.parentNode as dom.TouchAliasElement;

      // Move the caret and refocus if necessary
      if(DOMEventHandlers.states.activeElement != target) {
        // Hide the KMW caret
        let prevTarget = <dom.TouchAliasElement> DOMEventHandlers.states.activeElement;
        if(prevTarget) {
          prevTarget.hideCaret();
        }
        DOMEventHandlers.states.activeElement=target;
        // The issue here is that touching a DIV does not actually set the focus for iOS, even when enabled to accept focus (by setting tabIndex=0)
        // We must explicitly set the focus in order to remove focus from any non-KMW input
        target.focus();  //Android native browsers may not like this, but it is needed for Chrome, Safari
      }

      // Correct element directionality if required
      this.keyman.domManager._SetTargDir(target);
      // What we really want to do is to blur any active element that is not a KMW input,
      // but the following line does not work as might be expected, even though the correct element is referenced.
      // It is as though blur is ignored if focus is supposed to have been moved, even if it has not in fact been moved?
      //if(document.activeElement.nodeName != 'DIV' && document.activeElement.nodeName != 'BODY') document.activeElement.blur();

      // And display the OSK if not already visible
      if(osk.ready && !osk._Visible) {
        osk._Show();
      }

      // If clicked on DIV, set caret to end of text
      if(tTarg && dom.Utils.instanceof(tTarg, "TouchAliasElement")) {
        var x,cp;
        x=dom.Utils.getAbsoluteX(scroller.firstChild as HTMLElement);
        if(target.dir == 'rtl') {
          x += (scroller.firstChild as HTMLElement).offsetWidth;
          cp=(touchX > x ? 0 : 100000);
        } else {
          cp=(touchX<x ? 0 : 100000);
        }

        target.setTextCaret(cp);
        target.scrollInput();
      } else { // Otherwise, if clicked on text in SPAN, set at touch position
        var caret,cp,cpMin,cpMax,x,y,dy,yRow,iLoop;
        caret=scroller.child


expected_output = {
    "lisp_id": {
        0: {
            "instance_id": {
                8188: {
                    "eid_table": "Vlan 210",
                    "entries": 1,
                    "eid_prefix": {
                        "0017.0100.0001/48": {
                            "uptime": "01:11:07",
                            "expiry_time": "22:48:52",
                            "via": "map-reply",
                            "map_reply_state": "complete",
                            "prefix_location": "local-to-site",
                            "source_type": "map-reply",
                            "last_modified": "01:11:07,",
                            "source_ip": "1.1.1.10",
                            "prefix_state": "Active",
                            "encap": "dynamic-EID traffic",
                            "rloc_set": {
                                "1.1.1.10": {
                                    "uptime": "01:11:07",
                                    "rloc_state": "up",
                                    "priority": 10,
                                    "weight": 10,
                                    "encap_iid": "-",
                                    "last_state_change": {
                                        "time": "01:11:07",
                                        "count": 1,
                                    },
                                    "last_route_reach_change": {
                                        "time": "01:11:07",
                                        "count": 1,
                                    },
                                    "last_pri_weight_change": {
                                        "priority": "never",
                                        "weight": "never",
                                    },
                                    "rloc_probe_sent": {
                                        "time": "01:11:07",
                                        "rtt": 1,
                                        "rtt_unit": "ms",
                                    },
                                }
                            },
                        }
                    },
                }
            }
        }
    }
}


in')):
                os.mkdir(os.path.join(base_dir, 'origin'))
            if not os.path.exists(os.path.join(base_dir, 'optim')):
                os.mkdir(os.path.join(base_dir, 'optim'))
            if not os.path.exists(os.path.join(base_dir, 'show')):
                os.mkdir(os.path.join(base_dir, 'show'))

            original_img.save(os.path.join(base_dir, 'origin', f'{idx}.png'))
            golden_img.save(os.path.join(base_dir, 'optim', f'{idx}.png'))

            new_width = original_img.width + golden_img.width
            new_image = Image.new("RGB", (new_width, original_img.height))
            new_image.paste(original_img, (0, 0))
            new_image.paste(golden_img, (original_img.width, 0))
            # 保存拼接后的图片
            new_image.save(os.path.join(base_dir, 'show', f'{idx}.png'))

        if optimized is not None:
            optimized_img = self.pipeline(
                prompt=prompt,
                height=config.size,
                width=config.size,
                guidance_scale=config.guidance_scale,
                num_inference_steps=config.inference_step,
                latents=optimized).images[0]

            if save_postfix is not None:
                optimized_img.save(f'golden_img_optimized_{save_postfix}.png')

            if config.metric_version == 'PickScore':
                after_rewards, optimized_scores = reward_model.calc_probs(prompt, optimized_img)
            elif config.metric_version == 'HPSv2':
                optimized_scores = reward_model.score([optimized_img], prompt, hps_version="v2.1")
            elif config.metric_version == 'ImageReward':
                optimized_scores = reward_model.score(prompt, optimized_img)
            elif config.metric_version == 'AES':
                optimized_scores = reward_model(optimized_img)

        if config.metric_version == 'PickScore':
            before_rewards, original_scores = reward_model.calc_probs(prompt, original_img)
            golden_rewards, golden_scores = reward_model.calc_probs(prompt, golden_img)
        elif config.metric_version == 'HPSv2':
            original_scores = reward_model.score([original_img], prompt, hps_version="v2.1")[0]
            golden_scores = reward_model.score([golden_img], prompt, hps_version="v2.1")[0]
        elif config.metric_version == 'ImageReward':
            original_scores = reward_model.score(prompt, original_img)
            golden_scores = reward_model.score(prompt, golden_img)
        elif config.metric_version == 'AES':
            original_scores = reward_model(original_img)
            golden_scores = reward_model(golden_img)

        if save_postfix is not None:
            golden_img.save(f'golden_img_news_{save_postfix}.png')
            original_img.save(f'golden_img_originals_{save_postfix}.png')

        print(f'prompt:{prompt}')
        if optimized is not None:
            print(f'origin_score:{original_scores},  optim_score:{optimized_scores}, golden_score:{golden_scores}')
        else:
            print(f'origin_score:{original_scores}, golden_score:{golden_scores}')

        return original_scores, golden_scores


turn String.Format(info, "{{R:{0} G:{1} B:{2} A:{3}}}",
                new Object[] { R.ToString(info), G.ToString(info), B.ToString(info), A.ToString(info) });
        }
    }
}


entsInRange( newLocation );

						// We're not attached to a client, so simply send an Incoming
						foreach( NetState ns in eable )
						{
							if( ( ( isTeleport && ( !ns.HighSeas || !m_NoMoveHS ) ) || !Utility.InUpdateRange( oldLocation, ns.Mobile.Location )) && ns.Mobile.CanSee( this ) )
							{
								if ( ns.StygianAbyss ) {
									ns.Send( new MobileIncoming( ns.Mobile, this ) );

									if ( m_Poison != null )
										ns.Send( new HealthbarPoison( this ) );

									if ( m_Blessed || m_YellowHealthbar )
										ns.Send( new HealthbarYellow( this ) );
								} else {
									ns.Send( new MobileIncomingOld( ns.Mobile, this ) );
								}

								if( IsDeadBondedPet )
									ns.Send( new BondedStatus( 0, m_Serial, 1 ) );

								if( ObjectPropertyList.Enabled )
								{
									ns.Send( OPLPacket );

									//foreach ( Item item in m_Items )
									//	ns.Send( item.OPLPacket );
								}
							}
						}

						eable.Free();
					}
				}

				OnLocationChange( oldLocation );

				this.Region.OnLocationChanged( this, oldLocation );
			}
		}

		/// <summary>
		/// Overridable. Virtual event invoked when <see cref="Location" /> changes.
		/// </summary>
		protected virtual void OnLocationChange( Point3D oldLocation )
		{
		}

		public bool m_HarvestOrdinary;
		[CommandProperty( AccessLevel.GameMaster )]
		public bool HarvestOrdinary { get{ return m_HarvestOrdinary; } set{ m_HarvestOrdinary = value; } }

		public int m_ContainerLoot;
		[CommandProperty( AccessLevel.GameMaster )]
		public int ContainerLoot { get{ return m_ContainerLoot; } set{ m_ContainerLoot = value; } }

		public int m_ContainerHarvest;
		[CommandProperty( AccessLevel.GameMaster )]
		public int ContainerHarvest { get{ return m_ContainerHarvest; } set{ m_ContainerHarvest = value; } }

		public int m_ContainerCraft;
		[CommandProperty( AccessLevel.GameMaster )]
		public int ContainerCraft { get{ return m_ContainerCraft; } set{ m_ContainerCraft = value; } }

		public int m_RaceID;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceID { get{ return m_RaceID; } set{ m_RaceID = value; } }

		public int m_RaceAngerSound;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceAngerSound { get{ return m_RaceAngerSound; } set{ m_RaceAngerSound = value; } }

		public int m_RaceIdleSound;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceIdleSound { get{ return m_RaceIdleSound; } set{ m_RaceIdleSound = value; } }

		public int m_RaceDeathSound;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceDeathSound { get{ return m_RaceDeathSound; } set{ m_RaceDeathSound = value; } }

		public int m_RaceAttackSound;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceAttackSound { get{ return m_RaceAttackSound; } set{ m_RaceAttackSound = value; } }

		public int m_RaceHurtSound;
		[CommandProperty( AccessLevel.GameMaster )]
		public int RaceHurtSound { get{ return m_RaceHurtSound; } set{ m_RaceHurtSound = value; } }

		public bool m_RaceMakeSounds;
		[CommandProperty( AccessLevel.GameMaster )]
		public bool RaceM


result)) return result;
    return func(result.value).parse(input, result.index);
  });
};

_.assert = function <T>(
  this: Parser<T>,
  checkFn: (v: T) => boolean,
  desc = ""
) {
  return this.chain((value) => (checkFn(value) ? ok(value) : fail(desc)));
};

_.not = function <T>(this: Parser<T>, notParser: ParserLike, desc = "") {
  const _notParser = toParser(notParser);
  return makeParser((input, i, _, fail) => {
    const notReply = _notParser.parse(input, i);
    if (isOk(notReply)) {
      return fail(i, desc);
    }
    return this.parse(input, i);
  });
};

_.fallback = function <T, U>(this: Parser<T>, fallbackResult: U) {
  return alt(this, ok(fallbackResult));
};

_.wrap = function <T>(
  this: Parser<T>,
  leftLike: ParserLike,
  rightLike?: ParserLike
) {
  const left = toParser(leftLike);
  const right = rightLike ? toParser(rightLike) : left;
  const result = seqToMono(left, [this], right);
  return result;
};

_.trim = function <T>(
  this: Parser<T>,
  leftLike?: ParserLike,
  rightLike?: ParserLike
) {
  const left = leftLike ?? regexp(/[ \n\r\t]*/m);
  const right = rightLike ?? left;
  return this.wrap(left, right);
};

_.trimL = function <T>(this: Parser<T>, leftLike?: ParserLike) {
  const left = leftLike ?? regexp(/[ \n\r\t]*/);
  return seqToMono(toParser(left), [this]);
};

_.trimR = function <T>(this: Parser<T>, rightLike?: ParserLike) {
  const right = rightLike ?? regexp(/[ \n\r\t]*/);
  return seqToMono([this], toParser(right));
};

_.or = function <T, U extends ParserLike>(this: Parser<T>, altLike: U) {
  const altParser = toParser(altLike);
  return alt(this, altParser);
};

_.times = function <T>(this: Parser<T>, c1: number, c2?: number) {
  const max = c2 !== undefined ? c2 : c1;
  const min = c1;
  const self = this;
  return makeParser((input, i, ok, fail) => {
    let pos = i;
    let currentReply = self.parse(input, pos);
    let accum: T[] = isOk(currentReply) ? [currentReply.value] : [];
    let count = 0;
    while (count < max && isOk(currentReply)) {
      currentReply = self.parse(input, currentReply.index);
      accum = isOk(currentReply) ? [...accum, currentReply.value] : accum;
      if (isOk(currentReply)) pos = currentReply.index;
      count++;
    }
    if (count >= min) return ok(pos, accum);
    return fail(
      pos,
      isFail(currentReply)
        ? `max:${max} min:${min} of ${currentReply.expect}`
        : `max:${max} min:${min}`
    );
  });
};

_.atMost = function <T>(this: Parser<T>, n: number) {
  return this.times(0, n);
};

_.atLeast = function <T>(this: Parser<T>, n: number) {
  return seq(this.times(n), this.many()).map(([first, rest]) =>
    first.concat(rest)
  );
};

_.premap = function <T>(this: Parser<T>, fn: (input: string) => string) {
  const


/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Adapted from arm64 version.
 *
 * GNU linker script for the VDSO library.
 * Heavily based on the vDSO linker scripts for other archs.
 *
 * Copyright (C) 2012-2018 ARM Limited
 */

#include <linux/const.h>
#include <asm/page.h>
#include <asm/vdso.h>

OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)

SECTIONS
{
	PROVIDE_HIDDEN(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE);
#ifdef CONFIG_TIME_NS
	PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE);
#endif
	. = VDSO_LBASE + SIZEOF_HEADERS;

	.hash		: { *(.hash) }			:text
	.gnu.hash	: { *(.gnu.hash) }
	.dynsym		: { *(.dynsym) }
	.dynstr		: { *(.dynstr) }
	.gnu.version	: { *(.gnu.version) }
	.gnu.version_d	: { *(.gnu.version_d) }
	.gnu.version_r	: { *(.gnu.v


by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (
)
 *     +  for the section numbers
 *   - #toc for the Table of Contents ()
 *   - ul.index for Indices (term, in § N.M)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>,
, and
 for best results !
 *     -> use
 for extra-complex tables
 *     -> use  for paragraph-length cell content
 *     -> use  when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *     -> ins/del.c### for candidate and proposed changes (amendments)
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *   - .correction for "candidate corrections"       (div, aside, details, section)
 *   - .addition   for "candidate additions"         (div, aside, details, section)
 *   - .correction.proposed for "proposed corrections" (div, aside, details, section)
 *   - .addition.proposed   for "proposed additions"   (div, aside, details, section)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (3.2)
 *   - .marker for source-inserted example/figure/issue numbers (Issue 4)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Outdated warning for old specs
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *
 *   - js-added ToC jump links (see fixup.js)
 *
 *************************************************


	req := &longrunningpb.CancelOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
	}
	err = c.CancelOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func ExampleAnswerRecordsClient_GetOperation() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dialogflow.NewAnswerRecordsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.GetOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
	}
	resp, err := c.GetOperation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleAnswerRecordsClient_ListOperations() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dialogflow.NewAnswerRecordsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &longrunningpb.ListOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
	}
	it := c.ListOperations(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*longrunningpb.ListOperationsResponse)
	}
}
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go_gapic. DO NOT EDIT.

package dialogflow_test

import (
	"context"

	dialogflow "cloud.google.com/go/dialogflow/apiv2"
	dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb"
	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
	"google.golang.org/api/iterator"
	locationpb "google.golang.org/genproto/googleapis/cloud/location"
)

func ExampleNewEn


eHash = 0;
		for (const row of board.signMap)
		{
			let blackRowHash = 0;
			let whiteRowHash = 0;
			for (const stone of row)
			{
				blackRowHash *= 2;
				whiteRowHash *= 2;

				if (stone === 1)
					blackRowHash++;
				else if (stone === -1)
					whiteRowHash++;
			}

			blackHash *= 3;
			whiteHash *= 3;
			blackHash += blackRowHash;
			whiteHash += whiteRowHash;
		}
		return blackHash ^ whiteHash;
	}

	updateBoardState()
	{
		this.state.black.stones.clear();
		this.state.white.stones.clear();
		this.state.black.territory.clear();
		this.state.white.territory.clear();

		for (let i = 0; i < this.board.width * this.board.height; i++)
		{
			const vertex = this.toVertex(i);
			const stone = this.board.get(vertex);
			if (stone === 1)
				this.state.black.stones.add(i);
			else if (stone === -1)
				this.state.white.stones.add(i);

			if (this.countingBoard !== undefined)
			{
				var countingStone = this.countingBoard.get(vertex);
				if (countingStone === 1 && !this.state.black.territory.has(i))
				{
					for (const v of this.countingBoard.getConnectedComponent(vertex, v => this.countingBoard!.get(v) !== -1))
						this.state.black.territory.add(this.fromVertex(v));
				}
				else if (countingStone === -1 && !this.state.white.territory.has(i))
				{
					for (const v of this.countingBoard.getConnectedComponent(vertex, v => this.countingBoard!.get(v) !== 1))
						this.state.white.territory.add(this.fromVertex(v));
				}

				for (const neutral of this.state.black.territory.values())
				{
					if (this.state.white.territory.has(neutral))
					{
						this.state.black.territory.delete(neutral);
						this.state.white.territory.delete(neutral);
					}
				}
			}
		}
	}

	toVertex(position: number): Vertex
	{
		return [position % this.board.width, Math.floor(position / this.board.width)];
	}

	fromVertex([x, y]: Vertex): number
	{
		return y * this.board.width + x;
	}
}import AddressesClaimedModel from "../models/addresses-claimed";
import logger from "../helpers/pino-logger";

const log = logger.child({ from: "Provider: AddressesClaimed" });

type AddressesClaimedType = {
  address: string;
};

type MultipleExistsType = {
  existedCount: number,
  nonExistedCount: number,
};

class AddressesClaimed {
  model: any;

  constructor() {
    this.model = AddressesClaimedModel;
  }

  /**
   * Create record with a claimed address
   *
   * @param {AddressesClaimedType} addressesClaimedObj
   *
   * @returns {Promise<boolean>}
   */
  async create(addressesClaimedObj: AddressesClaimedType): Promise<boolean> {
    try {
      await this.model.create(addressesClaimedObj);
      return true;
    } catch (ex) {
      log.error("Creating new addresses-claimed record failed [mongo actions]:", { message: ex.message, addressesClaimedObj });
    }

    return false;
  }

  /**
   * Create multiple records with a provided claimed addresses
   *
   * @param {string[]} addresses
   *


 get testStatic;
  external set testStatic(int value);
}

@JS()
@anonymous
class PersonIdsItem extends PersistentObjectItem {
  external factory PersonIdsItem();
  external int get sessionId;
  external set sessionId(int value);
  external int get person;
  external set person(int value);
}

@JS()
@anonymous
class PersonItem extends PersistentObjectItem {
  external factory PersonItem();
  external String get firstName;
  external set firstName(String value);
  external String get lastName;
  external set lastName(String value);
  external int get father;
  external set father(int value);
  external int get mother;
  external set mother(int value);
  external int get occupation;
  external set occupation(int value);
}

@JS()
@anonymous
class AuthorItem extends PersistentObjectItem {
  external factory AuthorItem();
  external String get name;
  external set name(String value);
  external String get email;
  external set email(String value);
  external int get age;
  external set age(int value);
}
library persistent_object;

import 'query_builder.dart';
import 'package:bson/bson.dart';
import 'objectory_base.dart';
import 'dart:async';
import 'dart:collection';
import 'schema.dart';

PersistentObject getStub(int id) => new PersistentObject()..id = id;

class BasePersistentObject {
  Map _map = objectory.dataMapDecorator(new LinkedHashMap());

  Set<String> _dirtyFields = new Set<String>();
  bool saveOnUpdate = false;
  Map get map => _map;
  set map(Map newValue) {
    if (newValue != null) {
      _map = newValue;
    }
  }

  BasePersistentObject() {}
  Set<String> get dirtyFields => _dirtyFields;

//  PersistentList getPersistentList(Type classType, String property) {
//    PersistentList result = _compoundProperties[property];
//    if (result == null) {
//      result = new PersistentList(this, classType, property);
//      _compoundProperties[property] = result;
//    }
//    return result;
//  }

  PersistentObject getLinkedObject(String property, Type type) {
    var objId = map[property];
    if (objId == null) {
      return null;
    }
    assert(objId.runtimeType == objectory.idType);
    return objectory.findInCacheOrGetProxy(objId, type);
  }

  setLinkedObject(String property, PersistentObject value) {
    if (value == null) {
      if (map[property] == null) {
        return;
      }
      onValueChanging(property, null);
      map[property] = null;
    } else {
      if (value.id == null) {
        throw new Exception('Attemt to set link to unsaved object: $value');
      }
      if (this.map[property] == value.id) {
        return;
      }
      onValueChanging(property, value.id);
      map[property] = value.id;
    }
  }

  setForeignKey(String property, int fk) {
    if (fk == null) {
      throw new Exception('Attemt to set NULL value to foreign key');
    }
    if (this.map[property] == fk) {
      return;
    }
    onValueChanging(property, fk);
    map[property] = fk;
  }

  void _initMap() {}

  void setDirty(String fieldName) {
    if (_dirtyFields == null) {
      return;
    }
    _dirtyFields.add(fieldName);
  }

  void clearDirtyStatus() {
    _dirtyFields.clear();
  }

  void onValueChanging(String fieldName,


et)
        end
    else
        local session_id = get_session_id(ctx)
        if session_id ~= nil then
            return with_session_id(conf, ctx, session_id)
        end

        local ticket = ctx.var.arg_ticket
        if ticket ~= nil and uri == conf.cas_callback_uri then
            return validate_with_cas(conf, ctx, ticket)
        else
            return first_access(conf, ctx)
        end
    end
end

return _M


ANDM #01BE4h, *AR4(01BE3h)		; 72
	ANDM #01BE6h, *+AR4(01BE5h)		; 73
	ANDM #01BE8h, *+AR4(01BE7h)%		; 74
	ANDM #01BEAh, *(01BE9h)			; 75
	ANDM #01BEBh, *AR5			; 76
	ANDM #01BECh, *AR5-			; 77
	ANDM #01BEDh, *AR5+			; 78
	ANDM #01BEEh, *AR5-0B			; 79
	ANDM #01BEFh, *AR5-0			; 80
	ANDM #01BF0h, *AR5+0			; 81
	ANDM #01BF1h, *AR5+0B			; 82
	ANDM #01BF2h, *AR5-%			; 83
	ANDM #01BF3h, *AR5-0%			; 84
	ANDM #01BF4h, *AR5+%			; 85
	ANDM #01BF5h, *AR5+0%			; 86
	ANDM #01BF7h, *AR5(01BF6h)		; 87
	ANDM #01BF9h, *+AR5(01BF8h)		; 88
	ANDM #01BFBh, *+AR5(01BFAh)%		; 89
	ANDM #01BFDh, *(01BFCh)			; 90
	ANDM #01BFEh, *AR6			; 91
	ANDM #01BFFh, *AR6-			; 92
	ANDM #01C00h, *AR6+			; 93
	ANDM #01C01h, *AR6-0B			; 94
	ANDM #01C02h, *AR6-0			; 95
	ANDM #01C03h, *AR6+0			; 96
	ANDM #01C04h, *AR6+0B			; 97
	ANDM #01C05h, *AR6-%			; 98
	ANDM #01C06h, *AR6-0%			; 99
	ANDM #01C07h, *AR6+%			; 100
	ANDM #01C08h, *AR6+0%			; 101
	ANDM #01C0Ah, *AR6(01C09h)		; 102
	ANDM #01C0Ch, *+AR6(01C0Bh)		; 103
	ANDM #01C0Eh, *+AR6(01C0Dh)%		; 104
	ANDM #01C10h, *(01C0Fh)			; 105
	ANDM #01C11h, *AR7			; 106
	ANDM #01C12h, *AR7-			; 107
	ANDM #01C13h, *AR7+			; 108
	ANDM #01C14h, *AR7-0B			; 109
	ANDM #01C15h, *AR7-0			; 110
	ANDM #01C16h, *AR7+0			; 111
	ANDM #01C17h, *AR7+0B			; 112
	ANDM #01C18h, *AR7-%			; 113
	ANDM #01C19h, *AR7-0%			; 114
	ANDM #01C1Ah, *AR7+%			; 115
	ANDM #01C1Bh, *AR7+0%			; 116
	ANDM #01C1Dh, *AR7(01C1Ch)		; 117
	ANDM #01C1Fh, *+AR7(01C1Eh)		; 118
	ANDM #01C21h, *+AR7(01C20h)%		; 119
	ANDM #01C23h, *(01C22h)			; 120
	;  ANDlkShift : AND lk, SHFT2, AB, AB2 : 10


number_of_lines
  new_phrase2.loop_end = new_phrase2.number_of_lines / 2 + 1
  new_phrase2.loop_start = new_phrase2.loop_end + 2 -- shifts end to fit
  assert_error(function()
    new_phrase2.loop_end = new_phrase2.loop_start
  end)

  new_phrase2.shuffle = 0.0
  new_phrase2.shuffle = 1.0
  assert(new_phrase2.shuffle == 1.0)
  assert_error(function()
    new_phrase2.shuffle = 1.01
  end)
  new_phrase2.shuffle = 0.5
  assert(new_phrase2.shuffle == 0.5)

  new_phrase2.key_tracking = renoise.InstrumentPhrase.KEY_TRACKING_TRANSPOSE
  assert(new_phrase2.key_tracking == renoise.InstrumentPhrase.KEY_TRACKING_TRANSPOSE)

  new_phrase2.base_note = 12
  assert(new_phrase2.base_note == 12)
  assert_error(function()
    new_phrase2.base_note = -1
  end)
  assert_error(function()
    new_phrase2.base_note = 120
  end)

  ----------------------------------------------------------------------------
  -- phrase column properties

  new_phrase2:set_column_is_muted(1, true)
  assert_error(function()
    new_phrase2:set_column_is_muted(0, true)
  end)
  assert_error(function()


px;text-align: left;}}
.pricing-tabs__card-cta {margin-top: 40px;text-align: center;}
@media (max-width:767px) {.pricing-tabs__card-cta {margin-top: 24px;}}
.pricing-tabs__card-cta>.btn {display: inline-block;}
@media (max-width:767px) {.pricing-tabs__card-cta>.btn {background: none;color: #107aca;cursor: pointer;display: block;padding: 0;text-align: left;}
	.pricing-tabs__card-cta>.btn, .pricing-tabs__card-cta>.btn:after {-webkit-transition: .2s linear;-moz-transition: .2s linear;-ms-transition: .2s linear;-o-transition: .2s linear;transition: .2s linear;}
	.pricing-tabs__card-cta>.btn:after {content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNC41IiBoZWlnaHQ9IjE0LjUiIHZpZXdCb3g9IjAgMCAyMiAxNyIgZmlsbD0ibm9uZSIgYWxpZ25tZW50LWJhc2VsaW5lPSJjZW50ZXIiIHN0cm9rZT0iIzEwN0FDQSIgc3Ryb2tlLXdpZHRoPSIzLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTkgMTggNi02LTYtNiIvPjwvc3ZnPg==");display: inline-block;margin-left: 4px;text-align: center;width: 24px;}
	.pricing-tabs__card-cta>.btn:hover {color: #0d2339;}
	.pricing-tabs__card-cta>.btn:hover:after {content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNC41IiBoZWlnaHQ9IjE0LjUiIHZpZXdCb3g9IjAgMCAyMiAxNyIgZmlsbD0ibm9uZSIgYWxpZ25tZW50LWJhc2VsaW5lPSJjZW50ZXIiIHN0cm9rZT0iIzBEMjMzOSIgc3Ryb2tlLXdpZHRoPSIzLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTkgMTggNi02LTYtNiIvPjwvc3ZnPg==");margin-left: 8px;}}
.pricing-tabs__card .body-modal {text-align: left;}
@media (min-width:768px) {.pricing-tabs__expand__title {display: flex;justify-content: center;}}
@media (max-width:767px) {.pricing-tabs__expand__title .pricing-tabs__card__title {background: none;border-bottom-color: transparent;padding-bottom: 0;}}
.pricing-tabs__expand__title>a {color: #107aca;cursor: pointer;display: none;-webkit-transition: .2s linear;-moz-transition: .2s linear;-ms-transition: .2s linear;-o-transition: .2s linear;transition: .2s linear;}
@media (max-width:767px) {.pricing-tabs__expand__title>a {align-items: center;display: flex;}


::http::request::SendError;
use fastly::http::StatusCode;
use fastly::{Backend, Request};
use std::io::Read;

static HELLO_WORLD: &'static str = "hello, world!\n";
static HELLO_WORLD_GZ: &'static [u8] = include_bytes!("../../data/hello_world.gz");

fn main() -> Result<(), SendError> {
    let echo_server = Backend::from_name("echo").expect("Could not find echo backend?");

    // Test framework sanity check: a request without the auto_decompress flag
    // should bounce back to us unchanged.
    let standard_echo = Request::put("http://127.0.0.1:9000")
        .with_header("Content-Encoding", "gzip")
        .with_body_octet_stream(HELLO_WORLD_GZ)
        .send(echo_server.clone())?;

    assert_eq!(
        standard_echo.get_header_str("Content-Encoding"),
        Some("gzip")
    );
    assert_eq!(
        standard_echo.get_content_length(),
        Some(HELLO_WORLD_GZ.len())
    );

    // Similarly, if we set the auto_decompress flag to false, it should also
    // bounce back to us unchanged.
    let explicit_no = Request::put("http://127.0.0.1:9000")
        .with_header("Content-Encoding", "gzip")
        .with_body_octet_stream(HELLO_WORLD_GZ)
        .with_auto_decompress_gzip(false)
        .send(echo_server.clone())?;

    assert_eq!(explicit_no.get_header_str("Content-Encoding"), Some("gzip"));
    assert_eq!(explicit_no.get_content_length(), Some(HELLO_WORLD_GZ.len()));

    // But if we set the auto_decompress flag to true, and send a compressed
    // file, we should get the uncompressed version back
    let mut unpacked_echo = Request::put("http://127.0.0.1:9000")
        .with_header("Content-Encoding", "gzip")
        .with_body_octet_stream(HELLO_WORLD_GZ)
        .with_auto_decompress_gzip(true)
        .send(echo_server.clone())?;

    assert!(unpacked_echo.get_header("Content-Encoding").is_none());
    assert!(unpacked_echo.get_content_length().is_none());
    let hopefully_unpacked = unpacked_echo.take_body_str();
    assert_eq!(HELLO_WORLD, &hopefully_unpacked);

    // This should work when the header is "x-gzip", as well; see
    // https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#gzip.coding
    let mut xunpacked_echo = Request::put("http://127.0.0.1:9000")
        .with_header("Content-Encoding", "x-gzip")
        .with_body_octet_stream(HELLO_WORLD_GZ)
        .with_auto_decompress_gzip(true)
        .send(echo_server.clone())?;

    assert!(xunpacked_echo.get_header("Content-Encoding").is_none());
    assert!(xunpacked_echo.get_content_length().is_none());
    let xhopefully_unpacked = xunpacked_echo.take_body_str();
    assert_eq!(HELLO_WORLD, &xhopefully_unpacked);

    // The same, but now we're going to use await.
    let unpacked_echo_pending = Request::put("http://127.0.0.1:9000")
        .with_header("Content-Encoding", "gzip")


tial {
        type Output = ();
        fn callback<P>(self, producer: P) where P: Producer<Item=DropCounter<'a>> {
            let (a, _) = producer.split_at(5);
            a.into_iter().next();
        }
    }
}

#[test]
pub fn check_slice_exact_and_bounded() {
    let a = vec![1, 2, 3];
    is_bounded(a.par_iter());
    is_exact(a.par_iter());
    is_indexed(a.par_iter());
}

#[test]
pub fn check_slice_mut_exact_and_bounded() {
    let mut a = vec![1, 2, 3];
    is_bounded(a.par_iter_mut());
    is_exact(a.par_iter_mut());
    is_indexed(a.par_iter_mut());
}

#[test]
pub fn check_vec_exact_and_bounded() {
    let a = vec![1, 2, 3];
    is_bounded(a.clone().into_par_iter());
    is_exact(a.clone().into_par_iter());
    is_indexed(a.clone().into_par_iter());
}

#[test]
pub fn check_range_exact_and_bounded() {
    is_bounded((1..5).into_par_iter());
    is_exact((1..5).into_par_iter());
    is_indexed((1..5).into_par_iter());
}

#[test]
pub fn check_zip() {
    let mut a: Vec<usize> = (0..1024).rev().collect();
    let b: Vec<usize> = (0..1024).collect();

    a.par_iter_mut()
     .zip(&b[..])
     .for_each(|(a, &b)| *a += b);

    assert!(a.iter().all(|&x| x == a.len() - 1));
}

#[test]
pub fn check_zip_into_par_iter() {
    let mut a: Vec<usize> = (0..1024).rev().collect();
    let b: Vec<usize> = (0..1024).collect();

    a.par_iter_mut()
     .zip(&b) // here we rely on &b iterating over &usize
     .for_each(|(a, &b)| *a += b);

    assert!(a.iter().all(|&x| x == a.len() - 1));
}

#[test]
pub fn check_zip_into_mut_par_iter() {
    let a: Vec<usize> = (0..1024).rev().collect();
    let mut b: Vec<usize> = (0..1024).collect();

    a.par_iter()
     .zip(&mut b)
     .for_each(|(&a, b)| *b += a);

    assert!(b.iter().all(|&x| x == b.len() - 1));
}

#[test]
pub fn check_zip_range() {
    let mut a: Vec<usize> = (0..1024).rev().collect();

    a.par_iter_mut()
     .zip(0usize..1024)
     .for_each(|(a, b)| *a += b);

    assert!(a.iter().all(|&x| x == a.len() - 1));
}

#[test]
pub fn check_range_split_at_overflow() {
    // Note, this split index overflows i8!
    let (left, right) = (-100i8..100).into_par_iter().split_at(150);
    let r1 = left.map(|i| i as i32).sum();
    let r2 = right.map(|i| i as i32).sum();
    assert_eq!(r1 + r2, -100);
}

#[test]
pub fn check_sum_filtered_ints() {
    let a: Vec<i32> = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    let par_sum_evens =
        a.par_iter()
         .filter(|&x| (x & 1) == 0)
         .map(|&x| x)
         .sum();
    let seq_sum_evens =


)
        p_rendered, m_composite = torch.split(gen_outputs, [3, 1], 1)
        p_rendered = torch.tanh(p_rendered)
        m_composite = torch.sigmoid(m_composite)
        m_composite = m_composite * warped_prod_edge
        p_tryon = warped_cloth * m_composite + p_rendered * (1 - m_composite)
        k = p_tryon

        bz = pose.size(0)
        for bb in range(bz):
            combine = k[bb].squeeze()

            cv_img = (combine.permute(1, 2, 0).detach().cpu().numpy() + 1) / 2
            rgb = (cv_img * 255).astype(np.uint8)
            bgr = cv2.cvtColor(rgb, cv2.COLOR_RGB2BGR)

            cloth_id = data['color_path'][bb].split('/')[-1]
            person_id = data['img_path'][bb].split('/')[-1]
            c_type = data['c_type'][bb]
            save_path = person_id + '___' + cloth_id[:-4] + '.png'
            cv2.imwrite(save_path, bgr)

opt = TrainOptions().parse()
os.makedirs('sample/' + opt.name, exist_ok=True)
torch.cuda.set_device(opt.local_rank)

main()


TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Receiver `json:"items"`
}

func init() {
	SchemeBuilder.Register(&Receiver{}, &ReceiverList{})
}
/*
Copyright 2022 The Flux authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta2

// CrossNamespaceObjectReference contains enough information to let you locate the
// typed referenced object at cluster level
type CrossNamespaceObjectReference struct {
	// API version of the referent.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent.
	// +kubebuilder:validation:Enum=Bucket;GitRepository;Kustomization;HelmRelease;HelmChart;HelmRepository;ImageRepository;ImagePolicy;ImageUpdateAutomation;OCIRepository
	// +required
	Kind string `json:"kind,omitempty"`

	// Name of the referent.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=53
	// +required
	Name string `json:"name"`

	// Namespace of the referent.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=53
	// +kubebuilder:validation:Optional
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
	// map is equivalent to an element of matchExpressions, whose key field is "key", the
	// operator is "In", and the values array contains only "value". The requirements are ANDed.
	// +optional
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}
/*
Copyright 2022 The Flux authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package controller

import (
	"context"
	cryptotls "crypto/tls"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"os"
	"path/filepath"
	"regexp"
	"sort"
	"strings"
	"time"

	"github.com/Masterminds/semver/v3"
	"github.com/google/go-containerregistry/pkg/authn"
	"github.com/google/go-containerregistry/pkg/authn/k8schain"
	"github.com/google/go-containerregistry/pkg/name"
	gcrv1 "github.com/google/go-containerregistry/pkg/v1"
	"github.com/google/go-containerregis


using System;
using Microsoft.Maui.Controls;

namespace TalkingStage
{
    public partial class MainPage : ContentPage
    {
        private TalkingStageBot chatbot;

        public MainPage()
        {
            InitializeComponent();
            chatbot = new TalkingStageBot(); // Initialize the chatbot
        }

        private async void OnSendClicked(object sender, EventArgs e)
        {
            await SendMessage();
        }

        private async void OnEntryCompleted(object sender, EventArgs e)
        {
            await SendMessage();
        }

        private async Task SendMessage()
        {
            string question = UserInput.Text;
            if (string.IsNullOrEmpty(question))
            {
                System.Diagnostics.Debug.WriteLine("User input


frame_rate = frame_rate;
                let ui = imgui.frame();
                let gl_window = display.gl_window();

                support::gui(&ui, &mut state, &mut camera, &names);

                platform.prepare_render(&ui, gl_window.window());
                let draw_data = ui.render();
                renderer.render(&mut target, draw_data).unwrap();

                target.finish().unwrap();
            }
            Event::WindowEvent {
                event: glium::glutin::event::WindowEvent::CloseRequested,
                ..
            } => {
                *cf = glium::glutin::event_loop::ControlFlow::Exit;
            }
            event => {
                let gl_window = display.gl_window();
                platform.handle_event(imgui.io_mut(), gl_window.window(), &event);
                camera.handle(event);
            }
        }
    })
}
<filename>src/lib.rs
//! HID-to-UART driver for CP2110/CP2114 chipset.
//!
//! See more information [here][1].
//! [1]: https://www.silabs.com/products/interface/usb-bridges/classic-usb-bridges/device.cp2110-f01-gm

extern crate hid;
#[macro_use] extern crate error_chain;

use std::cmp::min;
use std::default::Default;
use std::time::{Duration, Instant};

mod error;
use error::*;
pub use error::Error;

const FEATURE_REPORT_LENGTH: usize = 64;
const INTERRUPT_REPORT_LENGTH: usize = 64;

const GETSET_UART_ENABLE: u8 = 0x41; // Get Set Receive Status
const PURGE_FIFOS: u8        = 0x43; // Purge FIFOs
const GETSET_UART_CONFIG: u8 = 0x50; // Get Set UART Config

const PURGE_TRANSMIT_MASK: u8 = 0x01;
const PURGE_RECEIVE_MASK: u8  = 0x02;

/// The number of data bits in [UART configuration](struct.UartConfig.html).
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum DataBits {
    /// 5 data bits
    Bits5,
    /// 6 data bits
    Bits6,
    /// 7 data bits
    Bits7,
    /// 8 data bits
    Bits8,
}

impl Default for DataBits {
    fn default() -> Self {
        DataBits::Bits8
    }
}

/// The parity in [UART configuration](struct.UartConfig.html).
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum Parity {
    /// No parity.
    None,
    /// Odd parity (sum of data bits is odd).
    Odd,
    /// Even parity (sum of data bits is even).
    Even,
    /// Mark parity (always 1).
    Mark,
    /// Space parity (always 0).
    Space,
}

impl Default for Parity {
    fn default() -> Self {
        Parity::None
    }
}

/// The number of stop bits in [UART configuration](struct.UartConfig.html).
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum StopBits {
    /// 1 stop bit.
    Short,
    /// 5 data bits: 1.5 stop bits, 6-8 data bits: 2 stop bits.
    Long,
}

impl Default for StopBits {
    fn default() -> Self {
        StopBits::Short
    }
}

/// The type of flow control in [UART configuration](struct.UartConfig.html).
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum FlowControl {
    /// No flow control.
    None,
    /// RTS/CTS hardware flow control.
    RtsCts,
}

impl Default for FlowControl {
    fn default() -> Self {
        FlowControl::None
    }
}

/// UART configuration.
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct UartConfig {
    pub baud_rate: u32,
    pub data_bits: DataBits,
    pub parity: Parity,
    pub stop_bits: StopBits,
    pub flow_control: FlowControl,
}

impl Default for UartConfig {
    fn default() -> Self {
        UartConfig {
            baud_rate: 9600,
            data_bits: DataBits::default(),
            parity: Parity::default(),
            stop_bits: StopBits::default(),
            flow_control: FlowControl::default(),
        }


    dt.tm_year = atoi(stime.substr(0,4).c_str()) - 1900;
    dt.tm_mon = atoi(stime.substr(4,2).c_str()) - 1;
    dt.tm_mday = atoi(stime.substr(6,2).c_str());
    dt.tm_hour = atoi(stime.substr(8,2).c_str());
    dt.tm_min = atoi(stime.substr(10,2).c_str());
    dt.tm_sec = atoi(stime.substr(12,2).c_str());
#else
    strptime(stime.c_str(), "%Y%m%d%H%M%S", &dt);
#endif

    if (format == FORMAT_SCHEDULED_COPY)
    {
        // let mktime interprete if time has Daylight Saving Time flag correction
        // TODO: would this work cross platformly? At least I believe it'll be consistent with localtime. Otherwise, we'd need to save that
        dt.tm_isdst = -1;
        return (mktime(&dt))*10;  // deciseconds
    }
    else
    {
        // user manually selects a date and a time to start the scheduled meeting in a specific time zone (independent fields on API)
        // so users should take into account daylight saving for the time zone they specified
        // this method should convert the specified string dateTime into Unix timestamp (UTC)
        dt.tm_isdst = 0;
        return mktime(&dt); // seconds
    }
}

std::string rfc1123_datetime( time_t time )
{
    struct tm * timeinfo;
    char buffer [80];
    timeinfo = gmtime(&time);
    strftime (buffer, 80, "%a, %d %b %Y %H:%M:%S GMT",timeinfo);
    return buffer;
}

string webdavurlescape(const string &value)
{
    ostringstream escaped;
    escaped.fill('0');
    escaped << std::hex;

    for (string::const_iterator i = value.begin(), n = value.end(); i != n; ++i)
    {
        string::value_type c = (*i);
        if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~' || c == '/' || c == ':')
        {
            escaped << c;
        }
        else
        {
            escaped << std::uppercase;
            escaped << '%' << std::setw(2) << int((unsigned char) c);
            escaped << std::nouppercase;
        }
    }

    return escaped.str();
}

string escapewebdavchar(const char c)
{
    static bool unintitialized = true;
    static std::map<int,const char *> escapesec;
    if (unintitialized)
    {
        escapesec[33] = "!"; // !  //For some reason &Exclamation; was not properly handled (crashed) by gvfsd-dav
        escapesec[34] = """; // "
        escapesec[37] = "%"; // %
        escapesec[38] = "&"; // &
        escapesec[39] = "'"; // '
        escapesec[43] = "&add;"; // +
        escapesec[60] = "<"; // <
        escapesec[61] = "="; // = //For some reason &equal; was not properly handled (crashed) by gvfsd-dav
        escapesec[62] = ">"; // >
        escapesec[160] = " "; //NO-BREAK SPACE
        escapesec[161] = "&ie