text:
<TITLE>range_error</TITLE>
<LINK REL=StyleSheet HREF="../rw.css" TYPE="text/css" TITLE="Rogue Wave Standard Stylesheet">

Rogue Wave C++ Standard Library Reference Guide

range_error

Module:  Standard C++ Library   Library:  Diagnostics

range_error  runtime_error  exception

Local Index

Summary

Synopsis

Description

Interface

See Also

Standards Conformance

Local Index

No Entries

Summary

An exception class

Synopsis

#include <stdexcept>

Description

Objects of class range_error are thrown if the implementation encounters a range error. The class is derived from runtime_error.

Interface

namespace std {
  class range_error : public runtime_error {
  public:
    explicit range_error(const string&  what_arg );
  };
}

See Also

Exceptions, bad_alloc, bad_cast, bad_exception, bad_typeid, domain_error, exception, invalid_argument, ios_base::failure, length_error, logic_error, out_of_range, overflow_error, runtime_error, underflow_error

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section 19.1.7


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Threading;

namespace System.Diagnostics.PerformanceData
{
    /// <summary>
    /// CounterData class is used to store actual raw counter data. It is the value element within
    /// CounterSetInstanceCounterDataSet, which is part of CounterSetInstance.
    /// </summary>
    public sealed class CounterData
    {
        unsafe private long* _offset;

        /// <summary>
        /// CounterData constructor
        /// </summary>
        /// <param name="counterId"> counterId would come from CounterSet::AddCounter() parameter </param>
        /// <param name="pCounterData"> The memory location to store raw counter data </param>
        unsafe internal CounterData(long* pCounterData)
        {
            _offset = pCounterData;
            *_offset = 0;
        }

        /// <summary>
        /// Value property it used to query/update actual raw counter data.
        /// </summary>
        public long Value
        {
            get
            {
                unsafe
                {
                    return Interlocked.Read(ref (*_offset));
                }
            }
            set
            {
                unsafe
                {
                    Interlocked.Exchange(ref (*_offset), value);
                }
            }
        }

        public void Increment()
        {
            unsafe
            {
                Interlocked.Increment(ref (*_offset));
            }
        }

        public void Decrement()
        {
            unsafe
            {
                Interlocked.Decrement(ref (*_offset));
            }
        }

        public void IncrementBy(long value)
        {
            unsafe
            {
                Interlocked.Add(ref (*_offset), value);
            }
        }

        /// <summary>
        /// RawValue property it used to query/update actual raw counter data.
        /// This property is not thread-safe and should only be used
        /// for performance-critical single-threaded access.
        /// </summary>
        public long RawValue
        {
            get
            {
                unsafe
                {
                    return (*_offset);
                }
            }
            set
            {
                unsafe
                {
                    *_offset = value;
                }
            }
        }
    }

    /// <summary>
    /// CounterSetInstanceCounterDataSet is part of CounterSetInstance class, and is used to store raw counter data
    /// for all counters added in CounterSet.
    /// </summary>
    public sealed class CounterSetInstanceCounterDataSet : IDisposable
    {
        internal CounterSetInstance _instance;
        private Dictionary<int, CounterData> _counters;
        private int _disposed;
        unsafe internal byte* _dataBlock;

        internal CounterSetInstanceCounterDataSet(CounterSetInstance thisInst)
        {
            _instance = thisInst;
            _counters = new Dictionary<int, CounterData>();

            unsafe
            {
                if (_instance._counterSet._provider == null)
                {
                    throw new ArgumentException(SR.Format(SR.Perflib_Argument_ProviderNotFound, _instance._counterSet._providerGuid), "ProviderGuid");
                }
                if (_instance._counterSet._provider._hProvider.IsInvalid)
                {
                    throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _instance._counterSet._providerGuid));
                }

                _dataBlock = (byte*)Marshal.AllocHGlobal(_instance._counterSet._idToCounter.Count * sizeof(long));
                if (_dataBlock == null)
                {
                    throw new InsufficientMemoryException(SR.Format(SR.Perflib_InsufficientMemory_InstanceCounterBlock, _instance._counterSet._counterSet, _instance._instName));
                }

                int CounterOffset = 0;

                foreach (KeyValuePair<int, CounterType> CounterDef in _instance._counterSet._idToCounter)
                {
                    CounterData thisCounterData = new CounterData((long*)(_dataBlock + CounterOffset * sizeof(long)));

                    _counters.Add(CounterDef.Key, thisCounterData);

                    // ArgumentNullException - CounterName is NULL
                    // ArgumentException - CounterName already exists.
                    uint Status = Interop.PerfCounter.PerfSetCounterRefValue(
                                    _instance._counterSet._provider._hProvider,
                                    _instance._nativeInst,
                                    (uint)CounterDef.Key,
                                    (void*)(_dataBlock + CounterOffset * sizeof(long)));
                    if (Status != (uint)Interop.Errors.ERROR_SUCCESS)
                    {
                        Dispose(true);

                        // ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND
                        switch (Status)
                        {
                            case (uint)Interop.Errors.ERROR_NOT_FOUND:
                                throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterRefValue, _instance._counterSet._counterSet, CounterDef.Key, _instance._instName));

                            default:
                                throw new Win32Exception((int)Status);
                        }
                    }
                    CounterOffset++;
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        ~CounterSetInstanceCounterDataSet()
        {
            Dispose(false);
        }

        private void Dispose(bool disposing)
        {
            if (Interlocked.Exchange(ref _disposed, 1) == 0)
            {
                unsafe
                {
                    if (_dataBlock != null)
                    {
                        // Need to free allocated heap memory that is used to store all raw counter data.
                        Marshal.FreeHGlobal((IntPtr)_dataBlock);
                        _dataBlock = null;
                    }
                }
            }
        }

        /// <summary>
        /// CounterId indexer to access specific CounterData object.
        /// </summary>
        /// <param name="counterId">CounterId that matches one CounterSet::AddCounter()call</param>
        /// <returns>CounterData object with matched counterId</returns>
        public CounterData this[int counterId]
        {
            get
            {
                if (_disposed != 0)
                {
                    return null;
                }

                try
                {
                    return _counters[counterId];
                }
                catch (KeyNotFoundException)
                {
                    return null;
                }
                catch
                {
                    throw;
                }
            }
        }

        /// <summary>
        /// CounterName indexer to access specific CounterData object.
        /// </summary>
        /// <param name="counterName">CounterName that matches one CounterSet::AddCounter() call</param>
        /// <returns>CounterData object with matched counterName</returns>
        public CounterData this[string counterName]
        {
            get
            {
                if (counterName == null)
                {
                    throw new ArgumentNullException(nameof(counterName));
                }
                if (counterName.Length == 0)
                {
                    throw new ArgumentNullException(nameof(counterName));
                }
                if (_disposed != 0)
                {
                    return null;
                }

                try
                {
                    int CounterId = _instance._counterSet._stringToId[counterName];
                    try
                    {
                        return _counters[CounterId];
                    }
                    catch (KeyNotFoundException)
                    {
                        return null;
                    }
                    catch
                    {
                        throw;
                    }
                }
                catch (KeyNotFoundException)
                {
                    return null;
                }
                catch
                {
                    throw;
                }
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
It is a JavaScript based application for drawing basic free-hand shapes, logos and drawings.

In this the Canvas area is divided into number of Square boxes.

It is based on simple Array of Boolean flags for coloring a square and inverting it back using Mouse Pointer.

You can view a sample drawing here : http://www.codeproject.com/KB/scripting/786240/heart.jpeg


text:
var tromp = require('../tromp')

tromp('.')
  .reject(/node_modules/)
  .on('listed', function (listing) {
    console.log(listing.inspect()) })


text:
package com.giggs.heroquest.game.gui.items;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.giggs.heroquest.R;
import com.giggs.heroquest.models.characters.Hero;
import com.giggs.heroquest.models.items.Item;
import com.giggs.heroquest.models.items.consumables.Potion;
import com.giggs.heroquest.models.items.consumables.ThrowableItem;

/**
 * Created by guillaume on 1/14/15.
 */
public class ItemInfoInGame extends ItemInfo {

    public ItemInfoInGame(Context context, final Item item, Hero hero, final OnItemActionSelected onItemActionSelected) {
        super(context, item);

        // actions
        TextView mainActionButton = (TextView) findViewById(R.id.main_action_btn);
        TextView secondaryActionButton = (TextView) findViewById(R.id.secondary_action_btn);

        if (item instanceof Potion) {
            // drink potion
            mainActionButton.setText(R.string.drink);
            mainActionButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    dismiss();
                    onItemActionSelected.onActionExecuted(ItemActionsInGame.DRINK);
                }
            });
            mainActionButton.setVisibility(View.VISIBLE);
        } else if (item instanceof ThrowableItem) {
            // throw item
            mainActionButton.setText(R.string.throw_item);
            mainActionButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    dismiss();
                    onItemActionSelected.onActionExecuted(ItemActionsInGame.THROW);
                }
            });
            mainActionButton.setVisibility(View.VISIBLE);
        }
    }

    public enum ItemActionsInGame {
        USE, DRINK, THROW
    }

    public static interface OnItemActionSelected {

        public void onActionExecuted(ItemActionsInGame action);

    }

}


text:
import React from "react";
import {
  fireEvent,
  wait,
  render,
  waitForElement,
} from "@testing-library/react";
import { RequestModule } from "../components";
import { act } from "react-dom/test-utils";

describe("Request Module Component", () => {
  it("renders the page", () => {
    const wrapper = render(<RequestModule />);
    expect(wrapper).toBeDefined();
  });

  it("displays errors when form is submitted without a token, url, and HTTP method.", async () => {
    const { getByText, container } = render(<RequestModule />);
    // Finding button to submit request form.
    const button = await waitForElement(() => container.querySelector("Form"));

    // Submitting the form.
    await wait(() => {
      fireEvent.submit(button);
    });

    expect(getByText("Token required.")).not.toBeNull();
    expect(getByText("HTTP method required.")).not.toBeNull();
    expect(getByText("URL required.")).not.toBeNull();
  });

  it("displays optional dialog box when option button is clicked", async () => {
    const { getByText, getByTestId } = render(<RequestModule />);
    // Finding the button that shows the request options.
    const button = await waitForElement(() => getByText("Options"));

    // Clicking the options button.
    await wait(() => {
      fireEvent.click(button);
    });

    expect(getByTestId("option-menu")).not.toBeNull();
  });

  it("displays optional header box when 'Add Header' is clicked in the options menu", async () => {
    const { getByText, getByTestId } = render(<RequestModule />);
    // Finding the button that shows the request options
    const button = await waitForElement(() => getByText("Options"));

    // Clicking the options button.
    await wait(() => {
      fireEvent.click(button);
    });

    // Finding button to add the request headers.
    const headerButton = await waitForElement(() => getByText("Add Header"));
    // Clicking the button to add the request headers.
    await wait(() => {
      fireEvent.click(headerButton);
    });

    expect(getByTestId("header-box")).not.toBeNull();
  });

  it("displays optional body box when 'Add Body' is clicked in the options menu", async () => {
    const { getByText, getByTestId } = render(<RequestModule />);
    // Finding the button that shows the request options.
    const button = await waitForElement(() => getByText("Options"));

    // Clicking the options button.
    await wait(() => {
      fireEvent.click(button);
    });

    // Finding the button to add the request body.
    const headerButton = await waitForElement(() => getByText("Add Body"));
    // Clicking the button to add the request body.
    await wait(() => {
      fireEvent.click(headerButton);
    });

    expect(getByTestId("body-box")).not.toBeNull();
  });

  it("displays optional content box when clicked when 'Add Content' is clicked in the options menu", async () => {
    const { getByText, getByTestId } = render(<RequestModule />);
    // Finding the button that shows the request options.
    const button = await waitForElement(() => getByText("Options"));
    await wait(() => {
      fireEvent.click(button);
    });

    // Finding the button that adds content type.
    const headerButton = await waitForElement(() =>
      getByText("Add Content Type")
    );
    // Clicking the button that adds the content type.
    await wait(() => {
      fireEvent.click(headerButton);
    });

    expect(getByTestId("content-box")).not.toBeNull();
  });

  it("it submits form when URL, HTTP Method, and Token has been submitted", async () => {
    const { getByText, container, getByTestId } = render(<RequestModule />);
    // Finding button to submit request form.
    const button = await waitForElement(() => container.querySelector("Form"));
    // Finding the input for the token.
    const tokenInput = await waitForElement(() => getByTestId("token-field"));
    // Finding the input for the URL.
    const urlInput = await waitForElement(() => getByTestId("url-field"));
    // Finding the input for the HTTP method.
    const httpInput = await waitForElement(() => getByTestId("http-field"));

    // Entering the token.
    await wait(() => {
      fireEvent.change(tokenInput, {
        target: {
          value: "ya.testtoken",
        },
      });
    });

    // Entering the URL.
    await wait(() => {
      fireEvent.change(urlInput, {
        target: {
          value: "testurl",
        },
      });
    });

    // Entering the HTTP Method.
    await wait(() => {
      fireEvent.change(httpInput, {
        target: {
          value: "GET",
        },
      });
    });

    // Submitting the form.
    await act(async () => {
      fireEvent.submit(button);
    });

    expect(getByText("Submitting")).not.toBeNull();
  });
});


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Symb. bot. upsal. 32(no. 1): 285 (1997)

#### Original name
Cryptothecia scripta G. Thor

### Remarks
null


text:
from wexcon.pair import Pair
from wexcon.request_handler import APIRequestHandler, APIResponseError

class Trader:
    """
    API to query WEX server for public data and all common trading transactions
    """

    def __init__(self, key, secret):
        self._NONCE = 0
        self._api_handler = APIRequestHandler(key=key, secret=secret)
        self._set_nonce()

    def _get_nonce(self):
        self._NONCE += 1
        return self._NONCE

    def _set_nonce(self):
        """Sets up initial nonce number"""
        try:
            self.get_info()
        except APIResponseError as api_exception:
            error = api_exception.args[0][0]
            if "invalid nonce" in error:
                nonce = int(error.split(":")[3]) - 1
                self._NONCE = nonce
            else:
                raise

    def __str__(self):
        return "({}. at nonce: {})".format(self.__class__.__name__, self._NONCE)

    def __repr__(self):
        return "({}. at nonce: {})".format(self.__class__.__name__, self._NONCE)

    # PUBLIC API METHODS
    def depth_public(self, pairs, limit=30):
        """
        This method provides the information about active orders on the pair.
        Additionally it accepts an optional GET-parameter limit, which indicates how many orders
        should be displayed (150 by default). Is set to less than 2000.

        :returns
        asks: Sell orders.
        bids: Buy orders.
        """
        dept_formatted_url = self._api_handler.PUBLIC_DEPTH_URL + '-'.join(pairs) + "?limit={}".format(limit)
        return self._api_handler.request_public_api(url=dept_formatted_url)

    def ticker_public(self):
        """
        This method provides all the information about currently active pairs, such as:
        the maximum price, the minimum price, average price, trade volume, trade volume in currency,
        the last trade, Buy and Sell price. All information is provided over the past 24 hours.

        :returns
        high: maximum price.
        low: minimum price.
        avg: average price.
        vol: trade volume.
        vol_cur: trade volume in currency.
        last: the price of the last trade.
        buy: buy price.
        sell: sell price.
        updated: last update of cache.
        """

        dept_formatted_url = self._api_handler.PUBLIC_TICKER_URL + '-'.join(
            Pair.get_available_pairs(self.public_info()))
        return self._api_handler.request_public_api(url=dept_formatted_url)

    def public_trades(self, pairs, limit=30):
        """
        This method provides the information about the last trades.
        Additionally it accepts an optional GET-parameter limit, which indicates how many orders should be displayed.
        The maximum allowable value is 2000.

        :returns
        type: ask – Sell, bid – Buy.
        price: Buy price/Sell price.
        amount: the amount of asset bought/sold.
        tid: trade ID.
        timestamp: UNIX time of the trade.
        """
        dept_formatted_url = self._api_handler.PUBLIC_TRADES_URL + '-'.join(pairs) + "?limit={}".format(limit)
        return self._api_handler.request_public_api(url=dept_formatted_url)

    def public_info(self):
        """
        This method provides all the information about currently active pairs, such as:
        the maximum number of digits after the decimal point, the minimum price, the maximum price,
        the minimum transaction size, whether the pair is hidden, the commission for each pair.

        :returns
        decimal_places: number of decimals allowed during trading.
        min_price: minimum price allowed during trading.
        max_price: maximum price allowed during trading.
        min_amount: minimum sell / buy transaction size.
        hidden: whether the pair is hidden, 0 or 1.
        fee: commission for this pair.
        """
        return self._api_handler.request_public_api(url=self._api_handler.PUBLIC_INFO_URL)

    # TRADE API METHODS
    def get_info(self):
        """Returns information about the user's current balance, API-key privileges,
        the number of open orders and Server Time. To use this method you need a privilege of the key info.

        :returns
        funds: Your account balance available for trading. Doesn't include funds on your open orders.
        rights: The privileges of the current API key. At this time the privilege to withdraw is not used anywhere.
        transaction_count: Deprecated, is equal to 0.
        open_orders: The number of your open orders.
        server_time: Server time (MSK).
        """
        parameters = dict(nonce=self._get_nonce(), method="getInfo")
        return self._api_handler.request_trade_api(parameters)

    def trade(self, pair, trans_type, rate, amount):
        """The basic method that can be used for creating orders and trading on the exchange. To use this method
            you need an API key privilege to trade.

        :returns
        received: The amount of currency bought/sold.
        remains: The remaining amount of currency to be bought/sold (and the initial order amount).
        order_id: Is equal to 0 if the request was fully "matched" by the opposite orders,
            otherwise the ID of the executed order will be returned.
        funds: Balance after the request.
        """
        parameters = dict(nonce=self._get_nonce(), method="Trade", pair=pair, type=trans_type, rate=rate,
                          amount=amount)
        return self._api_handler.request_trade_api(parameters)

    def active_orders(self, pair):
        """
        Returns the list of your active orders. To use this method you need a privilege of the info key.

        :returns
        Array key : Order ID.
        pair: The pair on which the order was created.
        type: Order type, buy/sell.
        amount: The amount of currency to be bought/sold.
        rate: Sell/Buy price.
        timestamp_created: The time when the order was created.
        status: Deprecated, is always equal to 0
        """
        parameters = dict(nonce=self._get_nonce(), method="ActiveOrders", pair=pair)
        return self._api_handler.request_trade_api(parameters)

    def order_info(self, order_id):
        """
        Returns the information on particular order. To use this method you need a privilege of the info key.

        :returns
        Array key: Order ID.
        pair: The pair on which the order was created
        type: Order type, buy/sell.
        start_amount: The initial amount at the time of order creation.
        amount: The remaining amount of currency to be bought/sold.
        rate: Sell/Buy price.
        timestamp_created: The time when the order was created.
        status: 0 - active, 1 – executed order, 2 - canceled, 3 – canceled, but was partially executed.
        """
        parameters = dict(nonce=self._get_nonce(), method="OrderInfo", order_id=order_id)
        return self._api_handler.request_trade_api(parameters)

    def cancel_order(self, order_id):
        """
        This method is used for order cancelation. To use this method you need a privilege of the trade key.

        :returns
        order_id: The ID of canceled order.
        funds: Balance upon request.
        """
        parameters = dict(nonce=self._get_nonce(), method="CancelOrder", order_id=order_id)
        return self._api_handler.request_trade_api(parameters)

    def trade_history(self, from_order=0, count=1000, from_id=0, end_id=1000000000, order="DESC", since=0, pair=""):
        """
        Returns trade history. To use this method you need a privilege of the info key.

        :returns
        Array keys: Trade ID.
        pair: The pair on which the trade was executed.
        type: Trade type, buy/sell.
        amount: The amount of currency was bought/sold.
        rate: Sell/Buy price.
        order_id: Order ID.
        is_your_order: Is equal to 1 if order_id is your order, otherwise is equal to 0.
        timestamp: Trade execution time.
        """
        parameters = dict(nonce=self._get_nonce(), method="TradeHistory", from_order=from_order,
                          count=count, from_id=from_id, end_id=end_id, order=order, since=since, end="", pair=pair)
        return self._api_handler.request_trade_api(parameters)

    def transactions_history(self, from_order=0, count=1000, from_id=0, end_id=1000000000, order="DESC", since=0, ):
        """Returns the history of transactions. To use this method you need a privilege of the info key.

        :returns
        Array keys: Transaction ID.
        type: Transaction type. 1/2 - deposit/withdrawal, 4/5 - credit/debit.
        amount: Transaction amount.
        currency: Transaction currency.
        desc: Transaction description.
        status: Transaction status. 0 - canceled/failed, 1 - waiting for acceptance, 2 - successful, 3 – not confirmed
        timestamp: Transaction time.
        """
        parameters = dict(nonce=self._get_nonce(), method="TransHistory", from_order=from_order,
                          count=count, from_id=from_id, end_id=end_id, order=order, since=since, end="")
        return self._api_handler.request_trade_api(parameters)

    def withdraw_coin(self, coin, amount):
        """
        The method is designed for cryptocurrency withdrawals.
        Please note: You need to have the privilege of the Withdraw key to be able to use this method.
        You can make a request for enabling this privilege by submitting a ticket to Support.
        You need to create the API key that you are going to use for this method in advance.
        Please provide the first 8 characters of the key (e.g. HKG82W66) in your ticket to support.
        We'll enable the Withdraw privilege for this key.
        When using this method, there will be no additional confirmations of withdrawal.
        Please note that you are fully responsible for keeping the secret of the API key safe
            after we have enabled the Withdraw privilege for it.

        :returns
        tId: Transaction ID.
        amountSent: The amount sent including commission.
        funds: Balance after the request.
        """
        parameters = dict(nonce=self._get_nonce(), method="WithdrawCoin", coinName=coin, amount=amount,
                          address="")
        return self._api_handler.request_trade_api(parameters)

    def create_coupon(self, currency, amount):
        """
        This method allows you to create Coupons.
        Please, note: In order to use this method, you need the Coupon key privilege.
        You can make a request to enable it by submitting a ticket to Support..
        You need to create the API key that you are going to use for this method in advance.
        Please provide the first 8 characters of the key (e.g. HKG82W66) in your ticket to support.
         We'll enable the Coupon privilege for this key.
        You must also provide us the IP-addresses from which you will be accessing the API.
        When using this method, there will be no additional confirmations of transactions.
        Please note that you are fully responsible for keeping the secret of the API key safe
            after we have enabled the Withdraw privilege for it.

        :returns
        coupon: Generated coupon.
        transID: Transaction ID.
        funds: Balance after the request.
        """
        parameters = dict(nonce=self._get_nonce(), method="CreateCoupon", currency=currency, amount=amount)
        return self._api_handler.request_trade_api(parameters)

    def redeem_coupon(self, coupon):
        """
        This method is used to redeem coupons.
        Please, note: In order to use this method, you need the Coupon key privilege.
        You can make a request to enable it by submitting a ticket to Support..
        You need to create the API key that you are going to use for this method in advance.
        Please provide the first 8 characters of the key (e.g. HKG82W66) in your ticket to support.
        We'll enable the Coupon privilege for this key.
        You must also provide us the IP-addresses from which you will be accessing the API.
        When using this method, there will be no additional confirmations of transactions.
        Please note that you are fully responsible for keeping the secret of the API key safe
            after we have enabled the Withdraw privilege for it.

        :returns
        couponAmount: The amount that has been redeemed.
        couponCurrency: The currency of the coupon that has been redeemed.
        transID: Transaction ID.
        funds: Balance after the request.
        """
        parameters = dict(nonce=self._get_nonce(), method="RedeemCoupon", coupon=coupon)
        return self._api_handler.request_trade_api(parameters)


text:
package mesosphere.marathon.state

import mesosphere.marathon.api.v2.Validation._
import mesosphere.marathon.test.MarathonSpec
import org.scalatest.Matchers

class ResourceRoleTest extends MarathonSpec with Matchers {

  test("If `acceptedResourceRoles` is not provided, an app should be valid regardless of its residency.") {
    optional(ResourceRole.validAcceptedResourceRoles(isResident = false))(None).isSuccess shouldBe true
    optional(ResourceRole.validAcceptedResourceRoles(isResident = true))(None).isSuccess shouldBe true
  }

  test("If `acceptedResourceRoles` is provided, a non-resident app is valid only if it contains valid role names.") {
    val validate = ResourceRole.validAcceptedResourceRoles(isResident = false)

    // Valid cases.

    validate(Set("*")).isSuccess shouldBe true
    validate(Set("role")).isSuccess shouldBe true
    validate(Set("role1", "role2")).isSuccess shouldBe true
    validate(Set("...", "<<>>")).isSuccess shouldBe true
    validate(Set("role--")).isSuccess shouldBe true

    // Invalid cases.

    validate(Set.empty).isSuccess shouldBe false
    validate(Set.empty).toString should include("must not be empty")

    validate(Set("")).isSuccess shouldBe false
    validate(Set("")).toString should include("must not be \"\"")

    validate(Set(".")).isSuccess shouldBe false
    validate(Set(".")).toString should include("must not be \".\"")

    validate(Set("..")).isSuccess shouldBe false
    validate(Set("..")).toString should include("must not be \"..\"")

    validate(Set("-role")).isSuccess shouldBe false
    validate(Set("-role")).toString should include("must not start with a '-'")

    validate(Set(" ")).isSuccess shouldBe false
    validate(Set(" ")).toString should include("must not include a space")

    validate(Set("x\ny")).isSuccess shouldBe false
    validate(Set("x\ny")).toString should include("must not include a line feed")

    validate(Set("x\n", "y\n\r")).isSuccess shouldBe false
    validate(Set("x\n", "y\n\r")).toString should include("must not include a line feed")
    validate(Set("x\n", "y\n\r")).toString should include("must not include a carriage return")
  }

  test("""If `acceptedResourceRoles` is provided, a resident app is valid only if it is set to ["*"].""") {
    val validate = ResourceRole.validAcceptedResourceRoles(isResident = true)

    // Valid case.

    validate(Set("*")).isSuccess shouldBe true

    // Invalid cases.

    validate(Set("role")).isSuccess shouldBe false
    validate(Set("role")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("role1", "role2")).isSuccess shouldBe false
    validate(Set("role1", "role2")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    // Invalid role names are still invalid. The final error has the residency violation augmented.

    validate(Set.empty).isSuccess shouldBe false
    validate(Set.empty).toString should include("must not be empty")
    validate(Set.empty).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("")).isSuccess shouldBe false
    validate(Set("")).toString should include("must not be \"\"")
    validate(Set("")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set(".")).isSuccess shouldBe false
    validate(Set(".")).toString should include("must not be \".\"")
    validate(Set(".")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("..")).isSuccess shouldBe false
    validate(Set("..")).toString should include("must not be \"..\"")
    validate(Set("..")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("-role")).isSuccess shouldBe false
    validate(Set("-role")).toString should include("must not start with a '-'")
    validate(Set("-role")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set(" ")).isSuccess shouldBe false
    validate(Set(" ")).toString should include("must not include a space")
    validate(Set(" ")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("x\ny")).isSuccess shouldBe false
    validate(Set("x\ny")).toString should include("must not include a line feed")
    validate(Set("x\ny")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")

    validate(Set("x\n", "y\n\r")).isSuccess shouldBe false
    validate(Set("x\n", "y\n\r")).toString should include("must not include a line feed")
    validate(Set("x\n", "y\n\r")).toString should include("must not include a carriage return")
    validate(Set("x\n", "y\n\r")).toString should include("""must have `acceptedResourceRoles = ["*"]`""")
  }
}


text:
import React, { Component } from 'react';
import { View as RNView } from 'react-native';
import PropTypes from 'prop-types';
import withStyles from '../../withStyles';

const propTypes = {
  children: PropTypes.node,
  columns: PropTypes.number,
};
const defaultProps = {
  children: null,
  columns: undefined,
};
const childContextTypes = {
  columns: PropTypes.number,
};
const contextTypes = {
  columns: PropTypes.number,
};

class GridRow extends Component {
  constructor(props, context) {
    super(props, context);

    this.state = {};
  }

  getChildContext() {
    const { columns: propColumns } = this.props;
    const { columns: contextColumns } = this.context;
    return { columns: propColumns || contextColumns };
  }

  render() {
    const {
      children,
      style,
      ...restProps
    } = this.props;

    let rowStyle;
    let firstElement = children;
    if (Array.isArray(children)) {
      firstElement = children[0];
    }

    if (firstElement.type.displayName === 'StyledGridColumn') {
      rowStyle = {
        flexDirection: 'row',
        flexWrap: 'wrap',
      };
    }

    return (
      <RNView
        {...restProps}
        style={[
          rowStyle,
          style,
        ]}
      >
        {children}
      </RNView>
    );
  }
}

GridRow.propTypes = propTypes;
GridRow.defaultProps = defaultProps;
GridRow.childContextTypes = childContextTypes;
GridRow.contextTypes = contextTypes;

export default withStyles('GridRow')(GridRow);


text:
package com.hp.hpl.jena.datatypes.xsd.impl;

import com.hp.hpl.jena.datatypes.xsd.AbstractDateTime;
import com.hp.hpl.jena.datatypes.xsd.XSDDateTime;

/**
 * Type processor for date, most of the machinery is in the
 * base XSDAbstractDateTimeType class.
 *
 * @author Dave Reynolds
 * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:58 $
 */
public class XSDDateType extends XSDAbstractDateTimeType {

    /**
     * Constructor
     */
    public XSDDateType(String typename) {
        super(typename);
    }

    /**
     * Parse a validated date. This is invoked from
     * XSDDatatype.convertValidatedDataValue rather then from a local
     * parse method to make the implementation of XSDGenericType easier.
     */
    @Override
    public Object parseValidated(String str) {
        int len = str.length();
        int[] date = new int[TOTAL_SIZE];
        int[] timeZone = new int[2];

        int end = getDate(str, 0, len, date);
        parseTimeZone (str, end, len, date, timeZone);

        if ( date[utc]!=0 && date[utc]!='Z' ) {
            AbstractDateTime.normalize(date, timeZone);
        }

        return new XSDDateTime(date, YEAR_MASK | MONTH_MASK | DAY_MASK);
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Bon & Van Haluwyn, Docums Mycol. 11(no. 44): 32 (1981)

#### Original name
Paxillus involutus f. subrubicundulus Bon

### Remarks
null


text:
scriptname="${1}"                               # name of the script to execute
returncode=0                                    # default return code

if [ ${#} -ge 1 ] ; then
	if [ -x "$scriptname" ] ; then                # start an executable script?
		"${@}"
	else
    awk -f "${@}"                              # start a script which is not executable
	fi
	returncode=$?
	[ $returncode -ne 0 ] && printf "'${@}' returned ${returncode}\n"
else
  printf "\n!! ${0} : no argument(s) !!\n"
fi

read -p "... press return key ... " dummy
exit $returncode


text:
<?xml version="1.0" encoding="utf-8"?>
<labels>
	システムの設定 [完了]
	コマンドラインインターフェイス [完了]
	デバグ [完了]
	ロールと権限の管理 [完了]
	パスワード強度の定義 [完了]
	ロゴの変更 [完了]
	todoyu ID の入力 [完了]
</labels>


text:
/*!
 * @file pipe_mgr_dbg.h
 * @date
 *
 * Debug utilities for pipe_mgr.
 */
#ifndef __PIPE_MGR_DBG_H__
#define __PIPE_MGR_DBG_H__

#include "pipe_mgr/shared/pipe_mgr_infra.h"
#include "pipe_mgr/shared/pipe_mgr_mat.h"
#include "pipe_mgr/shared/infra/pipe_mgr_int.h"
#include "pipe_mgr/shared/pipe_mgr_value_lookup.h"

void pipe_mgr_print_match_spec(struct pipe_tbl_match_spec *match_spec);
void pipe_mgr_print_action_spec(struct pipe_action_spec *action_spec);
void pipe_mgr_print_dal_mat_buf(struct pipe_mgr_mat_ctx *mat_ctx);
void pipe_mgr_print_data_spec(struct pipe_data_spec *data_spec);

#endif


text:
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Route | Session ', function(hooks) {
  setupTest(hooks);

  test('it exists', function(assert) {
    var route = this.owner.lookup('route:session');
    assert.ok(route);
  });
});


text:
namespace Ignition.Sc
{
	public struct IgnitionConstants
	{
		public struct Placeholders
		{
			public struct Layout
			{
				public const string LayoutContent = "layoutContent";
				public const string LayoutHead = "layoutHead";
				public const string LayoutHeader = "layoutHeader";
				public const string LayoutFrame = "layoutFrame";
				public const string LayoutFooter = "layoutFooter";
				public const string LayoutFooterScript = "layoutFooterScript";
				public const string LayoutPageEditor = "layoutExperienceEditor";
			}

			public struct Head
			{
				public const string HeadMetadata = "headMetadata";
				public const string HeadSeo = "headSeo";
				public const string HeadTaxonomy = "headTaxonomy";
				public const string HeadScript = "headScript";
				public const string HeadStyle = "headStyle";
			}

			public struct Footer
			{
			}

			public struct Content
			{
				public const string Main = "contentMain";
				public const string Left = "contentLeft";
				public const string Right = "contentRight";
				public const string FlexibleCol = "contentFlexibleColumn";
				public const string FlexibleRow = "contentFlexibleRow";
			}
			public struct About
		    {
		        public const string AboutPeopleGrid = "aboutpeoplegrid";

		    }

			public struct News
		    {
		        public const string FeaturedNews = "featurednews";
		        public const string LatestNews = "latestnews";
		    }
			public struct Product
		    {
		        public const string ProductSummary = "productsummary";
		    }
		}
	}
}


text:
<?php

declare(strict_types=1);

namespace Codeception\Step;

use Codeception\Attribute\DataProvider;
use PHPUnit\Framework\TestCase;

final class ExecutorTest extends TestCase
{
    #[DataProvider('valuesProvider')]
    public function testRun(bool $returnValue)
    {
        $expected = $returnValue;

        $executor = new Executor(fn (): bool => $returnValue);
        $actual = $executor->run();

        $this->assertSame($expected, $actual);
    }

    /**
     * @return bool[][]
     */
    public function valuesProvider(): array
    {
        return [
            [true],
            [false],
        ];
    }
}


text:
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.components.stylus_handwriting;

import android.content.Context;

import androidx.annotation.Nullable;

import org.chromium.base.BuildInfo;
import org.chromium.content_public.browser.StylusWritingHandler;
import org.chromium.content_public.browser.WebContents;

/**
 * Helper class to determine whether Direct writing service is in consideration or the Android
 * platform Stylus Writing feature, and to set the appropriate handler to WebContents.
 */
public class StylusWritingController {
    private final Context mContext;
    private WebContents mCurrentWebContents;

    @Nullable
    private AndroidStylusWritingHandler mAndroidHandler;
    @Nullable
    private DirectWritingTrigger mDirectWritingTrigger;
    @Nullable
    private DisabledStylusWritingHandler mDisabledStylusWritingHandler;

    /**
     * Creates a new instance of this class.
     */
    public StylusWritingController(Context context) {
        mContext = context;
    }

    /**
     * Returns the appropriate StylusWritingHandler - this may change at runtime if the user
     * enables/disables the stylus writing feature in their Android settings.
     */
    private StylusApiOption getHandler() {
        if (DirectWritingSettingsHelper.isEnabled(mContext)) {
            // Lazily initialize the various handlers since a lot of the time only one will be used.
            if (mDirectWritingTrigger == null) {
                mDirectWritingTrigger = new DirectWritingTrigger();
            }

            return mDirectWritingTrigger;
        }

        // The check for Android T is already in isEnabled but we are adding it here too to make
        // lint happy.
        if (BuildInfo.isAtLeastT() && AndroidStylusWritingHandler.isEnabled(mContext)) {
            if (mAndroidHandler == null) {
                mAndroidHandler = new AndroidStylusWritingHandler(mContext);
            }

            return mAndroidHandler;
        }

        if (mDisabledStylusWritingHandler == null) {
            mDisabledStylusWritingHandler = new DisabledStylusWritingHandler();
        }

        return mDisabledStylusWritingHandler;
    }

    /**
     * Notifies the applicable {@link StylusWritingHandler} so that stylus writing messages can be
     * received and handled for performing handwriting recognition.
     *
     * @param webContents current web contents
     */
    public void onWebContentsChanged(WebContents webContents) {
        if (webContents.getViewAndroidDelegate() == null) return;

        mCurrentWebContents = webContents;
        StylusApiOption handler = getHandler();
        handler.onWebContentsChanged(mContext, webContents);
        webContents.getViewAndroidDelegate().setStylusWritingCursorHandler(
                handler.getStylusWritingCursorHandler());
    }

    /**
     * Notify window focus has changed
     *
     * @param hasFocus whether window gained or lost focus
     */
    public void onWindowFocusChanged(boolean hasFocus) {
        // This notification is used to determine if the Stylus writing feature is enabled or not
        // from System settings as it can be changed while Chrome is in background.
        StylusApiOption handler = getHandler();
        handler.onWindowFocusChanged(mContext, hasFocus);

        if (mCurrentWebContents == null) return;
        handler.onWebContentsChanged(mContext, mCurrentWebContents);
        if (mCurrentWebContents.getViewAndroidDelegate() == null) return;
        mCurrentWebContents.getViewAndroidDelegate().setStylusWritingCursorHandler(
                handler.getStylusWritingCursorHandler());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Hyak.Common;
using Microsoft.Azure;

namespace Microsoft.WindowsAzure.Management.Scheduler.Models
{
    /// <summary>
    /// The Resource Provider Get Properties operation response.
    /// </summary>
    public partial class ResourceProviderGetPropertiesResponse : AzureOperationResponse
    {
        private IDictionary<string, string> _properties;

        /// <summary>
        /// Optional.
        /// </summary>
        public IDictionary<string, string> Properties
        {
            get { return this._properties; }
            set { this._properties = value; }
        }

        /// <summary>
        /// Initializes a new instance of the
        /// ResourceProviderGetPropertiesResponse class.
        /// </summary>
        public ResourceProviderGetPropertiesResponse()
        {
            this.Properties = new LazyDictionary<string, string>();
        }
    }
}


text:
package net.sourceforge.plantuml.command;

import java.util.List;

import net.sourceforge.plantuml.UmlDiagram;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.DisplayPositionned;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.VerticalAlignment;

public class CommandHeader extends SingleLineCommand<UmlDiagram> {

	public CommandHeader() {
		super("(?i)^(?:(left|right|center)?[%s]*)header(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$");
	}

	@Override
	protected CommandExecutionResult executeArg(UmlDiagram diagram, List<String> arg) {
		final String align = arg.get(0);
		diagram.setHeader(new DisplayPositionned(Display.getWithNewlines(arg.get(1)), HorizontalAlignment.fromString(
				align, HorizontalAlignment.RIGHT), VerticalAlignment.TOP));
		return CommandExecutionResult.ok();
	}
}


text:
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;

namespace JollyRaft
{
    public partial class Node
    {
        public class Leader : IRequestHandler
        {
            private readonly Node node;

            public Leader(Node node)
            {
                if (node == null)
                {
                    throw new ArgumentNullException("node");
                }
                this.node = node;
            }

            public async Task<AppendEntriesResult> AppendEntries(AppendEntriesRequest request)
            {
                Debug.WriteLine("{0}: GOT APPEND ENTRIES CALL {1}: leader commit {2} : entries: {3}", node.NodeInfo(), request.Id, request.CommitIndex, String.Concat(request.Entries.Select(e => e.Log + " ")));
                if (request.Term <= node.Term)
                {
                    return new AppendEntriesResult(node.Term, false);
                }

                node.CurrentLeader = request.Id;
                node.requestHandler = new Follower(node);
                node.Term = request.Term;
                node.lastHeartBeat = node.settings.Scheduler.Now;
                return await node.requestHandler.AppendEntries(request);
            }

            public async Task<VoteResult> Vote(VoteRequest request)
            {
                if (request.Term < node.Term)
                {
                    return new VoteResult(node.Term, false);
                }
                //this needs some sort of lock around it. although it would be very rare in a deployed system, the nodes in unit tests have hit
                //this block at the exact same time, resulting in both nodes getting the vote.
                //using a lock for now. should be replaced at some point with interlocked for perf
                lock (node.grantVoteLocker)
                {
                    if (request.Term > node.Term)
                    {
                        node.StepDown(node.Term, request.Id);
                    }

                    return new VoteResult(node.Term, false);
                }
            }

            public async Task<LogResult> AddLog(string log)
            {
                Debug.WriteLine("{0}: Adding Log {1}", node.NodeInfo(), log);
                return await node.SendAppendEntries(log, false);
            }

            public async Task SendHeartBeat()
            {
                Debug.WriteLine(string.Format("{0}: Sending HearthBeat", node.NodeInfo()));
                await node.SendAppendEntries(null, true);
            }

            public async Task StartElection()
            {

            }
        }
    }
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>CadeMeuCarro</title>

  <link rel="stylesheet" href="css/main.css">

INÍCIO

SOBRE O PROJETO

CONTATO

Slogan

      Conheça o Projeto

Sobre o Projeto

Projeto aberto da comunidade Dev-ES com a finalidade de criar um serviço de rastreio geográfico de carros roubados.

O principal objetivo é identificar a placa, consultar a api para saber o status do mesmo, se estiver marcado como roubado vamos gravar uma foto e a localização do GPS para reportar a ocorrência ao dono do carro. Futuramente, podemos considerar a parceria com os serviços de segurança local.

Como funciona

Captura a Placa

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mag.

Pesquisa no Servidor

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mag.

Aciona o sistema de Segurança

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mag.

Apoio


text:
/**
 *     This code was auto-generated by a Codezu.
 *
 *     Changes to this file may cause incorrect behavior and will be lost if
 *     the code is regenerated.
 */
package com.mozu.api.clients.commerce.orders;

import org.joda.time.DateTime;
import java.util.List;
import java.util.ArrayList;
import com.mozu.api.MozuClient;
import com.mozu.api.MozuClientFactory;
import com.mozu.api.MozuUrl;
import com.mozu.api.Headers;

import com.mozu.api.security.AuthTicket;
import org.apache.commons.lang.StringUtils;

/**
 * Use this subresource to retrieve details about items in an active order.
 *
 */
public class OrderItemClient {

	/**
	 * Retrieves an order item with the order line ID.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient=GetOrderItemViaLineIdClient( orderId,  lineId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItem orderItem = client.Result();
	 *

	 * @param lineId
	 * @param orderId Unique identifier of the order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItem>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> getOrderItemViaLineIdClient(String orderId, Integer lineId) throws Exception
	{
		return getOrderItemViaLineIdClient( orderId,  lineId,  null,  null);
	}

	/**
	 * Retrieves an order item with the order line ID.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient=GetOrderItemViaLineIdClient( orderId,  lineId,  draft,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItem orderItem = client.Result();
	 *

	 * @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components.
	 * @param lineId
	 * @param orderId Unique identifier of the order.
	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. For example, ) returns only the  and  items inside the  array of the specified product.This paramter should only be used to retrieve data. Attempting to update data using this parmater may cause data loss.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItem>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> getOrderItemViaLineIdClient(String orderId, Integer lineId, Boolean draft, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.getOrderItemViaLineIdUrl(draft, lineId, orderId, responseFields);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.OrderItem.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Retrieves the details of a single order item.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient=GetOrderItemClient( orderId,  orderItemId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItem orderItem = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItem>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> getOrderItemClient(String orderId, String orderItemId) throws Exception
	{
		return getOrderItemClient( orderId,  orderItemId,  null,  null);
	}

	/**
	 * Retrieves the details of a single order item.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient=GetOrderItemClient( orderId,  orderItemId,  draft,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItem orderItem = client.Result();
	 *

	 * @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components.
	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItem>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> getOrderItemClient(String orderId, String orderItemId, Boolean draft, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.getOrderItemUrl(draft, orderId, orderItemId, responseFields);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.OrderItem.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Retrieves the details of all items in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection> mozuClient=GetOrderItemsClient( orderId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItemCollection orderItemCollection = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection> getOrderItemsClient(String orderId) throws Exception
	{
		return getOrderItemsClient( orderId,  null,  null);
	}

	/**
	 * Retrieves the details of all items in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection> mozuClient=GetOrderItemsClient( orderId,  draft,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * OrderItemCollection orderItemCollection = client.Result();
	 *

	 * @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components.
	 * @param orderId Unique identifier of the order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection>
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection> getOrderItemsClient(String orderId, Boolean draft, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.getOrderItemsUrl(draft, orderId, responseFields);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItemCollection>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Adds a new item to a defined order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=CreateOrderItemClient( orderItem,  orderId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItem The details associated with a specific item in an order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> createOrderItemClient(com.mozu.api.contracts.commerceruntime.orders.OrderItem orderItem, String orderId) throws Exception
	{
		return createOrderItemClient( orderItem,  orderId,  null,  null,  null,  null);
	}

	/**
	 * Adds a new item to a defined order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=CreateOrderItemClient( orderItem,  orderId,  updateMode,  version,  skipInventoryCheck,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param skipInventoryCheck If true, skip the process to validate inventory when creating this product reservation.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @param orderItem The details associated with a specific item in an order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> createOrderItemClient(com.mozu.api.contracts.commerceruntime.orders.OrderItem orderItem, String orderId, String updateMode, String version, Boolean skipInventoryCheck, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.createOrderItemUrl(orderId, responseFields, skipInventoryCheck, updateMode, version);
		String verb = "POST";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(orderItem);
		return mozuClient;

	}

	/**
	 * Update the discount applied to an item in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateOrderItemDiscountClient( discount,  orderId,  orderItemId,  discountId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param discountId discountId parameter description DOCUMENT_HERE
	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param discount Properties of all applied discounts for an associated cart, order, or product.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateOrderItemDiscountClient(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, String orderItemId, Integer discountId) throws Exception
	{
		return updateOrderItemDiscountClient( discount,  orderId,  orderItemId,  discountId,  null,  null,  null);
	}

	/**
	 * Update the discount applied to an item in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateOrderItemDiscountClient( discount,  orderId,  orderItemId,  discountId,  updateMode,  version,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param discountId discountId parameter description DOCUMENT_HERE
	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @param discount Properties of all applied discounts for an associated cart, order, or product.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateOrderItemDiscountClient(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, String orderItemId, Integer discountId, String updateMode, String version, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.updateOrderItemDiscountUrl(discountId, orderId, orderItemId, responseFields, updateMode, version);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(discount);
		return mozuClient;

	}

	/**
	 * Update the duty fee information for an order item.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemDutyClient( orderId,  orderItemId,  dutyAmount);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param dutyAmount The amount added to the order item for duty fees.

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemDutyClient(String orderId, String orderItemId, Double dutyAmount) throws Exception
	{
		return updateItemDutyClient( orderId,  orderItemId,  dutyAmount,  null,  null,  null);
	}

	/**
	 * Update the duty fee information for an order item.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemDutyClient( orderId,  orderItemId,  dutyAmount,  updateMode,  version,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param dutyAmount The amount added to the order item for duty fees.

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. For example, ) returns only the  and  items inside the  array of the specified product.This paramter should only be used to retrieve data. Attempting to update data using this parmater may cause data loss.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version Determines whether or not to check versioning of items for concurrency purposes.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemDutyClient(String orderId, String orderItemId, Double dutyAmount, String updateMode, String version, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.updateItemDutyUrl(dutyAmount, orderId, orderItemId, responseFields, updateMode, version);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Updates the item fulfillment information for the order specified in the request.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemFulfillmentClient( orderItem,  orderId,  orderItemId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param orderItem The details associated with a specific item in an order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemFulfillmentClient(com.mozu.api.contracts.commerceruntime.orders.OrderItem orderItem, String orderId, String orderItemId) throws Exception
	{
		return updateItemFulfillmentClient( orderItem,  orderId,  orderItemId,  null,  null,  null);
	}

	/**
	 * Updates the item fulfillment information for the order specified in the request.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemFulfillmentClient( orderItem,  orderId,  orderItemId,  updateMode,  version,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @param orderItem The details associated with a specific item in an order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 * @see com.mozu.api.contracts.commerceruntime.orders.OrderItem
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemFulfillmentClient(com.mozu.api.contracts.commerceruntime.orders.OrderItem orderItem, String orderId, String orderItemId, String updateMode, String version, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.updateItemFulfillmentUrl(orderId, orderItemId, responseFields, updateMode, version);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(orderItem);
		return mozuClient;

	}

	/**
	 * Override the price of an individual product on a line item in the specified order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemProductPriceClient( orderId,  orderItemId,  price);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param price The override price to specify for this item in the specified order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemProductPriceClient(String orderId, String orderItemId, Double price) throws Exception
	{
		return updateItemProductPriceClient( orderId,  orderItemId,  price,  null,  null,  null);
	}

	/**
	 * Override the price of an individual product on a line item in the specified order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemProductPriceClient( orderId,  orderItemId,  price,  updateMode,  version,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param price The override price to specify for this item in the specified order.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemProductPriceClient(String orderId, String orderItemId, Double price, String updateMode, String version, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.updateItemProductPriceUrl(orderId, orderItemId, price, responseFields, updateMode, version);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Update the quantity of an item in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemQuantityClient( orderId,  orderItemId,  quantity);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param quantity The number of cart items in the shopper's active cart.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemQuantityClient(String orderId, String orderItemId, Integer quantity) throws Exception
	{
		return updateItemQuantityClient( orderId,  orderItemId,  quantity,  null,  null,  null);
	}

	/**
	 * Update the quantity of an item in an order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=UpdateItemQuantityClient( orderId,  orderItemId,  quantity,  updateMode,  version,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param quantity The number of cart items in the shopper's active cart.
	 * @param responseFields Use this field to include those fields which are not included by default.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> updateItemQuantityClient(String orderId, String orderItemId, Integer quantity, String updateMode, String version, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.updateItemQuantityUrl(orderId, orderItemId, quantity, responseFields, updateMode, version);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Removes a previously added item from a defined order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=DeleteOrderItemClient( orderId,  orderItemId);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> deleteOrderItemClient(String orderId, String orderItemId) throws Exception
	{
		return deleteOrderItemClient( orderId,  orderItemId,  null,  null);
	}

	/**
	 * Removes a previously added item from a defined order.
	 *

	 * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=DeleteOrderItemClient( orderId,  orderItemId,  updateMode,  version);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * Order order = client.Result();
	 *

	 * @param orderId Unique identifier of the order.
	 * @param orderItemId Unique identifier of the item to remove from the order.
	 * @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
	 * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one.
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.Order>
	 * @see com.mozu.api.contracts.commerceruntime.orders.Order
	 */
	public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> deleteOrderItemClient(String orderId, String orderItemId, String updateMode, String version) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.deleteOrderItemUrl(orderId, orderItemId, updateMode, version);
		String verb = "DELETE";
		Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.Order.class;
		MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

}


text:
package:
	rm -f package.zip
	zip package.zip LICENSE manifest.json travis-cat.js


text:
<?php

namespace Frontend\UserBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;

class DefaultController extends Controller
{
    public function indexAction($name)
    {
        return $this->render('FrontendUserBundle:Default:index.html.twig', array('name' => $name));
    }

    public function showMyContentAction(Request $request)
    {
        $user = $this->getUser()->getId();

        $content = $this->getDoctrine()
            ->getRepository('FrontendUserBundle:User')
            ->findOneById($user);

        $data = $content->getContents();

        return $this->render('FrontendUserBundle:Mycontent:mycontent_all.html.twig',
            array(
                'data' => $data
            ));
    }

    public function addMyContentAction(Request $request)
    {
        //find content
        $id_content = $request->request->get('id');
        $content = $this->getDoctrine()
            ->getRepository('FrontendAndroidBundle:Content')
            ->findOneById($id_content);

        //find user
        $id_user = $this->getUser()->getId();
        $user_data = $this->getDoctrine()
            ->getRepository('FrontendUserBundle:User')
            ->findOneById($id_user);

        //add new content for user
        $user_data->addContent($content);

        $em = $this->getDoctrine()->getManager();
        $em->flush();

        return new Response(1);
    }

    public function delMyContentAction(Request $request)
    {
        //find content
        $id_content = $request->request->get('id');
        $content = $this->getDoctrine()
            ->getRepository('FrontendAndroidBundle:Content')
            ->findOneById($id_content);

        //find user
        $id_user = $this->getUser()->getId();
        $user_data = $this->getDoctrine()
            ->getRepository('FrontendUserBundle:User')
            ->findOneById($id_user);

        //add new content for user
        $user_data->removeContent($content);

        $em = $this->getDoctrine()->getManager();
        $em->flush();

        return new Response(1);
    }
}


text:
package edu.emory.bmi.datacafe.client.conf;

import edu.emory.bmi.datacafe.core.hazelcast.config.HzConfigReader;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * The class that reads the Data Cafe properties from the properties file.
 */
public class ClientConfigReader extends HzConfigReader {

    private static Logger logger = LogManager.getLogger(ClientConfigReader.class.getName());

    /**
     * Drill properties
     */
    private static String drillJdbc;
    private static String drillUsername;
    private static String drillPassword;

    /**
     * Initiating Data Cafe from the configuration file.
     */
    public static void readConfig() {

        logger.info("Initiating Data Cafe client from the configurations file");
        HzConfigReader.readConfig();

        drillJdbc = prop.getProperty("drillJdbc");
        drillUsername = prop.getProperty("drillUsername");
        drillPassword = prop.getProperty("drillPassword");
    }

    public static String getDrillJdbc() {
        return drillJdbc;
    }

    public static String getDrillUsername() {
        return drillUsername;
    }

    public static String getDrillPassword() {
        return drillPassword;
    }
}


text:
#include "internal.h"

#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <malloc.h>

// These constants are missing on MinGW
#ifndef EDS_ROTATEDMODE
 #define EDS_ROTATEDMODE 0x00000004
#endif
#ifndef DISPLAY_DEVICE_ACTIVE
 #define DISPLAY_DEVICE_ACTIVE 0x00000001
#endif

//////////////////////////////////////////////////////////////////////////
//////                       GLFW internal API                      //////
//////////////////////////////////////////////////////////////////////////

// Change the current video mode
//
GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired)
{
    GLFWvidmode current;
    const GLFWvidmode* best;
    DEVMODEW dm;

    best = _glfwChooseVideoMode(monitor, desired);
    _glfwPlatformGetVideoMode(monitor, &current);
    if (_glfwCompareVideoModes(&current, best) == 0)
        return GL_TRUE;

    ZeroMemory(&dm, sizeof(dm));
    dm.dmSize = sizeof(DEVMODEW);
    dm.dmFields           = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL |
                            DM_DISPLAYFREQUENCY;
    dm.dmPelsWidth        = best->width;
    dm.dmPelsHeight       = best->height;
    dm.dmBitsPerPel       = best->redBits + best->greenBits + best->blueBits;
    dm.dmDisplayFrequency = best->refreshRate;

    if (dm.dmBitsPerPel < 15 || dm.dmBitsPerPel >= 24)
        dm.dmBitsPerPel = 32;

    if (ChangeDisplaySettingsExW(monitor->win32.adapterName,
                                 &dm,
                                 NULL,
                                 CDS_FULLSCREEN,
                                 NULL) != DISP_CHANGE_SUCCESSFUL)
    {
        _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to set video mode");
        return GL_FALSE;
    }

    monitor->win32.modeChanged = GL_TRUE;
    return GL_TRUE;
}

// Restore the previously saved (original) video mode
//
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
{
    if (monitor->win32.modeChanged)
    {
        ChangeDisplaySettingsExW(monitor->win32.adapterName,
                                 NULL, NULL, CDS_FULLSCREEN, NULL);
        monitor->win32.modeChanged = GL_FALSE;
    }
}

//////////////////////////////////////////////////////////////////////////
//////                       GLFW platform API                      //////
//////////////////////////////////////////////////////////////////////////

_GLFWmonitor** _glfwPlatformGetMonitors(int* count)
{
    int found = 0;
    _GLFWmonitor** monitors = NULL;
    DWORD adapterIndex, displayIndex;

    *count = 0;

    for (adapterIndex = 0;  ;  adapterIndex++)
    {
        DISPLAY_DEVICEW adapter;

        ZeroMemory(&adapter, sizeof(DISPLAY_DEVICEW));
        adapter.cb = sizeof(DISPLAY_DEVICEW);

        if (!EnumDisplayDevicesW(NULL, adapterIndex, &adapter, 0))
            break;

        if (!(adapter.StateFlags & DISPLAY_DEVICE_ACTIVE))
            continue;

        for (displayIndex = 0;  ;  displayIndex++)
        {
            DISPLAY_DEVICEW display;
            _GLFWmonitor* monitor;
            char* name;
            HDC dc;

            ZeroMemory(&display, sizeof(DISPLAY_DEVICEW));
            display.cb = sizeof(DISPLAY_DEVICEW);

            if (!EnumDisplayDevicesW(adapter.DeviceName, displayIndex, &display, 0))
                break;

            name = _glfwCreateUTF8FromWideString(display.DeviceString);
            if (!name)
            {
                _glfwInputError(GLFW_PLATFORM_ERROR,
                                "Win32: Failed to convert string to UTF-8");
                continue;
            }

            dc = CreateDCW(L"DISPLAY", adapter.DeviceName, NULL, NULL);

            monitor = _glfwAllocMonitor(name,
                                        GetDeviceCaps(dc, HORZSIZE),
                                        GetDeviceCaps(dc, VERTSIZE));

            DeleteDC(dc);
            free(name);

            if (adapter.StateFlags & DISPLAY_DEVICE_MODESPRUNED)
                monitor->win32.modesPruned = GL_TRUE;

            wcscpy(monitor->win32.adapterName, adapter.DeviceName);
            wcscpy(monitor->win32.displayName, display.DeviceName);

            WideCharToMultiByte(CP_UTF8, 0,
                                adapter.DeviceName, -1,
                                monitor->win32.publicAdapterName,
                                sizeof(monitor->win32.publicAdapterName),
                                NULL, NULL);

            WideCharToMultiByte(CP_UTF8, 0,
                                display.DeviceName, -1,
                                monitor->win32.publicDisplayName,
                                sizeof(monitor->win32.publicDisplayName),
                                NULL, NULL);

            found++;
            monitors = realloc(monitors, sizeof(_GLFWmonitor*) * found);
            monitors[found - 1] = monitor;

            if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE &&
                displayIndex == 0)
            {
                _GLFW_SWAP_POINTERS(monitors[0], monitors[found - 1]);
            }
        }
    }

    *count = found;
    return monitors;
}

GLboolean _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second)
{
    return wcscmp(first->win32.displayName, second->win32.displayName) == 0;
}

void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
{
    DEVMODEW settings;
    ZeroMemory(&settings, sizeof(DEVMODEW));
    settings.dmSize = sizeof(DEVMODEW);

    EnumDisplaySettingsExW(monitor->win32.adapterName,
                           ENUM_CURRENT_SETTINGS,
                           &settings,
                           EDS_ROTATEDMODE);

    if (xpos)
        *xpos = settings.dmPosition.x;
    if (ypos)
        *ypos = settings.dmPosition.y;
}

GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
{
    int modeIndex = 0, size = 0;
    GLFWvidmode* result = NULL;

    *count = 0;

    for (;;)
    {
        int i;
        GLFWvidmode mode;
        DEVMODEW dm;

        ZeroMemory(&dm, sizeof(DEVMODEW));
        dm.dmSize = sizeof(DEVMODEW);

        if (!EnumDisplaySettingsW(monitor->win32.adapterName, modeIndex, &dm))
            break;

        modeIndex++;

        // Skip modes with less than 15 BPP
        if (dm.dmBitsPerPel < 15)
            continue;

        mode.width  = dm.dmPelsWidth;
        mode.height = dm.dmPelsHeight;
        mode.refreshRate = dm.dmDisplayFrequency;
        _glfwSplitBPP(dm.dmBitsPerPel,
                      &mode.redBits,
                      &mode.greenBits,
                      &mode.blueBits);

        for (i = 0;  i < *count;  i++)
        {
            if (_glfwCompareVideoModes(result + i, &mode) == 0)
                break;
        }

        // Skip duplicate modes
        if (i < *count)
            continue;

        if (monitor->win32.modesPruned)
        {
            // Skip modes not supported by the connected displays
            if (ChangeDisplaySettingsExW(monitor->win32.adapterName,
                                         &dm,
                                         NULL,
                                         CDS_TEST,
                                         NULL) != DISP_CHANGE_SUCCESSFUL)
            {
                continue;
            }
        }

        if (*count == size)
        {
            if (*count)
                size *= 2;
            else
                size = 128;

            result = (GLFWvidmode*) realloc(result, size * sizeof(GLFWvidmode));
        }

        (*count)++;
        result[*count - 1] = mode;
    }

    return result;
}

void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
{
    DEVMODEW dm;

    ZeroMemory(&dm, sizeof(DEVMODEW));
    dm.dmSize = sizeof(DEVMODEW);

    EnumDisplaySettingsW(monitor->win32.adapterName, ENUM_CURRENT_SETTINGS, &dm);

    mode->width  = dm.dmPelsWidth;
    mode->height = dm.dmPelsHeight;
    mode->refreshRate = dm.dmDisplayFrequency;
    _glfwSplitBPP(dm.dmBitsPerPel,
                  &mode->redBits,
                  &mode->greenBits,
                  &mode->blueBits);
}

void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
{
    HDC dc;
    WORD values[768];

    dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
    GetDeviceGammaRamp(dc, values);
    DeleteDC(dc);

    _glfwAllocGammaArrays(ramp, 256);

    memcpy(ramp->red,   values +   0, 256 * sizeof(unsigned short));
    memcpy(ramp->green, values + 256, 256 * sizeof(unsigned short));
    memcpy(ramp->blue,  values + 512, 256 * sizeof(unsigned short));
}

void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
{
    HDC dc;
    WORD values[768];

    if (ramp->size != 256)
    {
        _glfwInputError(GLFW_PLATFORM_ERROR,
                        "Win32: Gamma ramp size must be 256");
        return;
    }

    memcpy(values +   0, ramp->red,   256 * sizeof(unsigned short));
    memcpy(values + 256, ramp->green, 256 * sizeof(unsigned short));
    memcpy(values + 512, ramp->blue,  256 * sizeof(unsigned short));

    dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
    SetDeviceGammaRamp(dc, values);
    DeleteDC(dc);
}

//////////////////////////////////////////////////////////////////////////
//////                        GLFW native API                       //////
//////////////////////////////////////////////////////////////////////////

GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* handle)
{
    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
    return monitor->win32.publicAdapterName;
}

GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* handle)
{
    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;
    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
    return monitor->win32.publicDisplayName;
}


text:
Stop and search
===============

.. currentmodule:: police_api.stop_and_search
.. py:module:: police_api.stop_and_search

.. autoclass:: Stop
   :members: