text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright 2010 The ForPlay Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
  <inherits name='com.google.gwt.user.User'/>
  <source path='core'/>
  <source path='box2d'/>
  <source path='html'/>

  <!--
    Speed up compile time. Target only modern HTML5 browsers.
    The value 'safari' exists solely for for historical reasons.
    Your ForPlay game should work in Chrome, Firefox 3.6/4.0, Safari, IE9.
  -->
  <set-property name='user.agent' value='safari'/>
  <set-configuration-property name="user.agent.runtimeWarning" value="false" />

  <!-- Flash/HTML5/Native audio support -->
  <inherits name="com.allen_sauer.gwt.voices.gwt-voices" />
  <!--
    This allows us to replace the normal compile time deferred binding implementation
    decision, with a runtime decision, based on the runtime user agent. Doing so, allows us to use
    'safari' as a single 'user.agent' permutation, which speeds up compile time,
    but still provides Flash detection in IE.
  -->
  <replace-with class="com.allen_sauer.gwt.voices.client.ui.impl.FlashMovieImplForPlay">
    <when-type-is class="com.allen_sauer.gwt.voices.client.ui.impl.FlashMovieImpl" />
  </replace-with>

  <!-- By default, we log to System.out in Development Mode -->
  <replace-with class="forplay.html.HtmlLogSimple">
    <when-type-assignable class="forplay.html.HtmlLog" />
  </replace-with>

  <!--
    Optionally, enable gwt-log's advanced logging features, add
    this to your game's .gwt.xml module:

      <inherits name="forplay.logging.Enhanced" />
  -->

  <!-- Auto ClientBundle -->
  <generate-with class="forplay.rebind.AutoClientBundleGenerator">
    <when-type-assignable class="forplay.core.AutoClientBundleWithLookup" />
  </generate-with>

  <inherits name="org.jbox2d.GwtBox2D" />
  <inherits name="com.google.gwt.webgl.WebGL" />

  <define-linker name="appcachelinker" class="forplay.appcachelinker.AppCacheLinker" />
  <!--
    By default, we don't use the appcachelinker. If you would like to use it in your project,
    add the following line to your game's .gwt.xml module:

      <add-linker name="appcachelinker" />
  -->
</module>


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows.Documents;
using System.Windows.Media.Imaging;

namespace KyleHughes.AboutDialog.WPF
{
    /// <summary>
    ///     Represents an object which has information pertaining to its version, such as
    ///     product name, version, license information, etc.
    /// </summary>
    public interface IVersionable
    {
        /// <summary>
        ///     Gets or sets a 64x64 image to display.
        /// </summary>
        BitmapImage Image { get; set; }

        /// <summary>
        ///     Gets or sets additional text which can be formatted
        /// </summary>
        string Copy { get; set; }

        /// <summary>
        ///     Gets or sets the name of this product.
        /// </summary>
        string Product { get; set; }

        /// <summary>
        ///     Gets or sets the title of the product.
        /// </summary>
        string Title { get; set; }

        /// <summary>
        ///     Gets or sets the copyright string for this product.
        /// </summary>
        string Copyright { get; set; }

        /// <summary>
        ///     Gets or sets a user-friendly representation of the version of the product, e.g. 1.0.4.
        /// </summary>
        string Version { get; set; }

        /// <summary>
        ///     Gets or sets a descriptive overview of the product.
        /// </summary>
        string Description { get; set; }

        /// <summary>
        ///     Gets or sets the author or creator of the product.
        /// </summary>
        string Author { get; set; }

        /// <summary>
        ///     Gets or sets the owner or rights holder of the product.
        /// </summary>
        string Owner { get; set; }

        /// <summary>
        ///     Gets or sets the license information of the product, ideally would include copyright notice.
        /// </summary>
        string License { get; set; }

        /// <summary>
        ///     Gets or sets the years this license applies to.
        /// </summary>
        int[] Years { get; set; }

        /// <summary>
        ///     Gets or sets whether to show multiple years as a range (i.e. 2013-2015) or as a sequence (i.e. 2013, 2014, 2015).
        /// </summary>
        bool ShowYearsAsRange { get; set; }

        /// <summary>
        ///     Gets or sets a list of pairs of strings and Uris representing clickable links.
        /// </summary>
        IList<Tuple<string, Uri>> Links { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
""" Title: Read in CSV data of the route """
""" Description: Read in and store the CSV data into usable Python structures.
This will include the following info from the CSV:
Step Information
Approx. Kms from start: distance of step
Feature: name of landmark on step
Action/Remark: road info and traveling instructions
Note: Useful info """

import unittest
from Source import Route, CSVReader, Step

class TestCSV(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        CSVReader.read_CSV("WSC_Route.csv")

    # Checks that Step objects were created and added to the list of steps
    def test_read_step_obj(self):
        third_step = Route.get_step(3)
        self.assertIs(type(third_step), Step.step)
        self.assertTrue(third_step in Route.steps.values())

    # Checks proper iteration through steps
    def test_get_next_step(self):
        first_step = Route.get_cur_step()
        self.assertEqual(first_step.distance, 0.0,
                         "Didn't get correct cur_step")
        Route.advance_step()
        second_step = Route.get_cur_step()
        self.assertEqual(second_step.distance, 0.2,
                         "Didn't advance_step correctly")
        second_step = Route.get_cur_step()
        self.assertEqual(second_step.distance, 0.2,
                    "Repeat call of get_cur_step should be the same correctly")

    # Checks that all the properties were read in correctly
    def test_get_first(self):
        first_step = Route.get_step(1)
        self.assertEqual(first_step.distance, 0.0, "Wrong distance")
        self.assertEqual(first_step.feature, "Exit to Mitchell Street",
                         "Wrong Feature")
        self.assertEqual(first_step.action, "Under normal traffic conditions",
                         "Wrong Action")
        self.assertEqual(first_step.note, "", "Wrong Note")
        self.assertEqual(first_step.speed, 50, "Wrong Speed")

    # Checks that all the properties were read in correctly
    # of semi-randomly selected step
    def test_get_tenth(self):
        tenth_step = Route.get_step(10)
        self.assertEqual(tenth_step.distance, 4.8, "Wrong distance")
        self.assertEqual(tenth_step.interval, 0.3, "Wrong interval")
        self.assertEqual(tenth_step.feature, "Speed 100", "Wrong Feature")
        self.assertEqual(tenth_step.action, "Speed limit", "Wrong Action")
        self.assertEqual(tenth_step.note, "", "Wrong Note")
        self.assertEqual(tenth_step.speed, 80, "Wrong Speed")

    # Checks the speed property is properly stored, changed, and held
    def test_get_speed(self):
        step = Route.get_step(4)
        self.assertEqual(step.speed, 60, "Didn't get correct speed")
        step = Route.get_step(5)
        self.assertEqual(step.speed, 80, "Didn't get new speed")
        step = Route.get_step(6)
        self.assertEqual(step.speed, 80, "Didn't hold correct speed")

    # Checks the calculation of the interval between steps
    def test_get_interval(self):
        third_step = Route.get_step(3)
        fourth_step = Route.get_step(4)
        self.assertEqual(fourth_step.interval,
                         fourth_step.distance - third_step.distance,
                         "Incorrect Interval")
        self.assertEqual(fourth_step.interval, 0.5, "Incorrect Interval")

    # Checks the note property
    def test_get_note(self):
        seventh_step = Route.get_step(7)
        self.assertEqual(seventh_step.note, "Straight ahead", "Incorrect Note")

    # Checks the action property
    def test_get_action(self):
        third_step = Route.get_step(3)
        self.assertEqual(third_step.action, "Traffic Light", "Incorrect Action")

    # Python unittest provided function to be executed
    #  after all tests in the class are completed
    def tearDown(self):
        pass

if __name__ == '__main__':
    unittest.main()


text:
/// @file xed-address-width-enum.h

// This file was automatically generated.
// Do not edit this file.

#if !defined(_XED_ADDRESS_WIDTH_ENUM_H_)
# define _XED_ADDRESS_WIDTH_ENUM_H_
#include "xed-common-hdrs.h"
typedef enum {
  XED_ADDRESS_WIDTH_INVALID=0,
  XED_ADDRESS_WIDTH_16b=2, ///< 16b addressing
  XED_ADDRESS_WIDTH_32b=4, ///< 32b addressing
  XED_ADDRESS_WIDTH_64b=8, ///< 64b addressing
  XED_ADDRESS_WIDTH_LAST
} xed_address_width_enum_t;

/// This converts strings to #xed_address_width_enum_t types.
/// @param s A C-string.
/// @return #xed_address_width_enum_t
/// @ingroup ENUM
XED_DLL_EXPORT xed_address_width_enum_t str2xed_address_width_enum_t(const char* s);
/// This converts strings to #xed_address_width_enum_t types.
/// @param p An enumeration element of type xed_address_width_enum_t.
/// @return string
/// @ingroup ENUM
XED_DLL_EXPORT const char* xed_address_width_enum_t2str(const xed_address_width_enum_t p);

/// Returns the last element of the enumeration
/// @return xed_address_width_enum_t The last element of the enumeration.
/// @ingroup ENUM
XED_DLL_EXPORT xed_address_width_enum_t xed_address_width_enum_t_last(void);
#endif


text:
require "spec_helper"

describe Seymour do
  let(:user) { User.create(full_name: "Brian McManus") }

  describe '#configure' do
    it 'takes a block to allow configuration' do
      Seymour.configure do |config|
        config.activity_collection = :testing
      end
      Seymour::Config.activity_collection.should == :testing
    end
  end

  describe '#publish' do
    it 'initializes and distributes the activity' do
      data = {actor: user}
      Seymour::Distribution.should_receive(:distribute)
      Seymour.publish(:new_post, data).class.should include(Seymour::ActivityDocument)
    end
  end
end


text:
#include "config.h"

#include "modules/filesystem/FileWriterSync.h"

#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "core/fileapi/Blob.h"
#include "core/fileapi/FileError.h"
#include "modules/filesystem/AsyncFileWriter.h"

namespace WebCore {

void FileWriterSync::write(Blob* data, ExceptionState& es)
{
    ASSERT(writer());
    ASSERT(m_complete);
    if (!data) {
        es.throwDOMException(TypeMismatchError, FileError::typeMismatchErrorMessage);
        return;
    }

    prepareForWrite();
    writer()->write(position(), data);
    writer()->waitForOperationToComplete();
    ASSERT(m_complete);
    if (m_error) {
        FileError::throwDOMException(es, m_error);
        return;
    }
    setPosition(position() + data->size());
    if (position() > length())
        setLength(position());
}

void FileWriterSync::seek(long long position, ExceptionState& es)
{
    ASSERT(writer());
    ASSERT(m_complete);
    seekInternal(position);
}

void FileWriterSync::truncate(long long offset, ExceptionState& es)
{
    ASSERT(writer());
    ASSERT(m_complete);
    if (offset < 0) {
        es.throwDOMException(InvalidStateError, FileError::invalidStateErrorMessage);
        return;
    }
    prepareForWrite();
    writer()->truncate(offset);
    writer()->waitForOperationToComplete();
    ASSERT(m_complete);
    if (m_error) {
        FileError::throwDOMException(es, m_error);
        return;
    }
    if (offset < position())
        setPosition(offset);
    setLength(offset);
}

void FileWriterSync::didWrite(long long bytes, bool complete)
{
    ASSERT(m_error == FileError::OK);
    ASSERT(!m_complete);
#ifndef NDEBUG
    m_complete = complete;
#else
    ASSERT_UNUSED(complete, complete);
#endif
}

void FileWriterSync::didTruncate()
{
    ASSERT(m_error == FileError::OK);
    ASSERT(!m_complete);
#ifndef NDEBUG
    m_complete = true;
#endif
}

void FileWriterSync::didFail(FileError::ErrorCode error)
{
    ASSERT(m_error == FileError::OK);
    m_error = error;
    ASSERT(!m_complete);
#ifndef NDEBUG
    m_complete = true;
#endif
}

FileWriterSync::FileWriterSync()
    : m_error(FileError::OK)
#ifndef NDEBUG
    , m_complete(true)
#endif
{
    ScriptWrappable::init(this);
}

void FileWriterSync::prepareForWrite()
{
    ASSERT(m_complete);
    m_error = FileError::OK;
#ifndef NDEBUG
    m_complete = false;
#endif
}

FileWriterSync::~FileWriterSync()
{
}

} // namespace WebCore


text:
package ru.fly.client.ui.multipleupload;

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.Style;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.xhr.client.XMLHttpRequest;
import ru.fly.client.ui.Component;
import ru.fly.client.ui.FElement;
import ru.fly.client.ui.multipleupload.decor.UploadDecor;
import ru.fly.client.ui.multipleupload.event.AbortEvent;
import ru.fly.client.ui.multipleupload.event.ErrorEvent;
import ru.fly.client.ui.multipleupload.event.LoadEvent;
import ru.fly.client.ui.multipleupload.event.ProgressEvent;

/**
 * upload bar with embedded xhr upload logic
 *
 * @author fil
 */
public class UploadProgressItem extends Component {

    @SuppressWarnings({"unused", "FieldCanBeLocal"})
    private final XMLHttpRequest xhr;
    private String url;
    private JavaScriptObject file;
    private String fileName;

    public UploadProgressItem(String url, JavaScriptObject file) {
        super(DOM.createDiv());
        xhr = XMLHttpRequest.create();
        this.url = url;
        this.file = file;
        UploadDecor decor = GWT.create(UploadDecor.class);
        setStyleName(decor.css().progress());
        FElement label = DOM.createDiv().cast();
        label.setClassName(decor.css().label());
        fileName = getName(file);
        label.setInnerText(fileName);
        getElement().appendChild(label);
        FElement bar = DOM.createDiv().cast();
        bar.setClassName(decor.css().bar());
        getElement().appendChild(bar);
        final FElement barBg = DOM.createDiv().cast();
        barBg.setClassName(decor.css().barBg());
        bar.appendChild(barBg);

        setProgressHandler(new ProgressEvent.ProgressHandler() {
            @Override
            public void onProgress(Event nativeEvent) {
                barBg.getStyle().setWidth(getProgressPercent(nativeEvent), Style.Unit.PCT);
            }
        });
    }

    public void send() {
        send(url, file);
    }

    public String getFileName() {
        return fileName;
    }

    public native HandlerRegistration setAbortHandler(AbortEvent.AbortHandler h) /*-{
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.onabort = $entry(function (e) {
            h.@ru.fly.client.ui.multipleupload.event.AbortEvent.AbortHandler::onAbort(*)(e);
        });
    }-*/;

    public native HandlerRegistration setErrorHandler(ErrorEvent.ErrorHandler h) /*-{
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.onerror = $entry(function (e) {
            h.@ru.fly.client.ui.multipleupload.event.ErrorEvent.ErrorHandler::onError(*)(e);
        });
    }-*/;

    public native HandlerRegistration setLoadHandler(LoadEvent.LoadHandler h) /*-{
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.onload = $entry(function (e) {
            h.@ru.fly.client.ui.multipleupload.event.LoadEvent.LoadHandler::onLoad(*)(e);
        });
    }-*/;

    public native String getResponseText() /*-{
        return this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.responseText;
    }-*/;

    // ------------- privates -------------

    private native void send(String url, JavaScriptObject file)/*-{
        var formData = new FormData();
        formData.append("fileUpload", file);
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.open("POST", url);
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.send(formData);
    }-*/;

    private native HandlerRegistration setProgressHandler(ProgressEvent.ProgressHandler h) /*-{
        this.@ru.fly.client.ui.multipleupload.UploadProgressItem::xhr.upload.onprogress = $entry(function (e) {
            h.@ru.fly.client.ui.multipleupload.event.ProgressEvent.ProgressHandler::onProgress(*)(e);
        });
    }-*/;

    private native String getName(JavaScriptObject file) /*-{
        return file.name;
    }-*/;

    private native float getProgressPercent(Event e) /*-{
        return e.loaded / e.total * 100;
    }-*/;
}


text:
<?php

namespace ZendTest\Json\TestAsset;

use Zend\Json\Json;

/**
 * Serializable class exposing both toArray() and toJson() methods.
 */
class ZF11167ToArrayToJsonClass extends ZF11167ToArrayClass
{
    public function toJson()
    {
        return Json::encode('bogus');
    }
}


text:
#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_
#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_

#include <memory>

#include "webrtc/system_wrappers/include/ntp_time.h"
#include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
#include "webrtc/typedefs.h"

namespace webrtc {

// January 1970, in NTP seconds.
const uint32_t kNtpJan1970 = 2208988800UL;

// Magic NTP fractional unit.
const double kMagicNtpFractionalUnit = 4.294967296E+9;

// A clock interface that allows reading of absolute and relative timestamps.
class Clock {
 public:
  virtual ~Clock() {}

  // Return a timestamp in milliseconds relative to some arbitrary source; the
  // source is fixed for this clock.
  virtual int64_t TimeInMilliseconds() const = 0;

  // Return a timestamp in microseconds relative to some arbitrary source; the
  // source is fixed for this clock.
  virtual int64_t TimeInMicroseconds() const = 0;

  // Retrieve an NTP absolute timestamp.
  virtual NtpTime CurrentNtpTime() const = 0;

  // Retrieve an NTP absolute timestamp in milliseconds.
  virtual int64_t CurrentNtpInMilliseconds() const = 0;

  // Converts an NTP timestamp to a millisecond timestamp.
  static int64_t NtpToMs(uint32_t seconds, uint32_t fractions) {
    return NtpTime(seconds, fractions).ToMs();
  }

  // Returns an instance of the real-time system clock implementation.
  static Clock* GetRealTimeClock();
};

class SimulatedClock : public Clock {
 public:
  explicit SimulatedClock(int64_t initial_time_us);

  ~SimulatedClock() override;

  // Return a timestamp in milliseconds relative to some arbitrary source; the
  // source is fixed for this clock.
  int64_t TimeInMilliseconds() const override;

  // Return a timestamp in microseconds relative to some arbitrary source; the
  // source is fixed for this clock.
  int64_t TimeInMicroseconds() const override;

  // Retrieve an NTP absolute timestamp.
  NtpTime CurrentNtpTime() const override;

  // Converts an NTP timestamp to a millisecond timestamp.
  int64_t CurrentNtpInMilliseconds() const override;

  // Advance the simulated clock with a given number of milliseconds or
  // microseconds.
  void AdvanceTimeMilliseconds(int64_t milliseconds);
  void AdvanceTimeMicroseconds(int64_t microseconds);

 private:
  int64_t time_us_;
  std::unique_ptr<RWLockWrapper> lock_;
};

};  // namespace webrtc

#endif  // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_


text:
/**
 *  \file   dcan.h
 *
 *  \brief  DCAN APIs and macros.
 *
 *   This file contains the driver API prototypes and macro definitions for
 *   DCAN peripheral.
 */

/*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*/
/*
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*
*    Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
*
*    Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the
*    distribution.
*
*    Neither the name of Texas Instruments Incorporated nor the names of
*    its contributors may be used to endorse or promote products derived
*    from this software without specific prior written permission.
*
*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
*  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
*  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
*  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
*  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
*  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
*  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
*  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

#ifndef __DCAN_H__
#define __DCAN_H__

#include "hw_dcan.h"

#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
/*
** Values that can be passed to DCAN APIs
*/

/******************************************************************************/
/*
** Values that can be passed to 'DCANIntLineEnable' and 'DCANIntLineDisable'APIs
** as 'enableLine' and 'disableLine' respectively.
** 'enableLine','disableLine' can take both the values.
** For e.g. (DCAN_INT_LINE0 | DCAN_INT_LINE1) can be passed.
*/
/* Enable/Disable Interrupt line 0 of DCAN peripheral */
#define DCAN_INT_LINE0                       (DCAN_CTL_IE0)
/* Enable/Disable Interrupt line 1 of DCAN peripheral */
#define DCAN_INT_LINE1                       (DCAN_CTL_IE1)

/******************************************************************************/
/*
** Values that can be passed to 'DCANIntEnable' and 'DCANIntDisable' APIs as
** 'intFlags'.
** 'intFlags' can take more than one value.
** For e.g. (DCAN_STATUS_CHANGE_INT | DCAN_ERROR_INT) can be passed.
*/
/* Enable/Disable the Status change interrupt of DCAN peripheral */
#define DCAN_STATUS_CHANGE_INT               (0x00000004u)
/* Enable/Disable the error interrupt of DCAN peripheral */
#define DCAN_ERROR_INT                       (0x00000008u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANAutoReTransmitControl' API as 'autoReTxn'.
*/
/* Enable Auto Re-transmission of DCAN peripheral */
#define DCAN_AUTO_RETXN_ENABLE               (0x00000000u)
/* Disable Auto Re-transmission of DCAN peripheral */
#define DCAN_AUTO_RETXN_DISABLE              (0x00000020u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANConfigRegWriteAccessControl' API as
** 'regConfig'.
*/
/* CPU has write access to the configuration registers */
#define DCAN_CONF_REG_WR_ACCESS_ENABLE       (DCAN_CTL_CCE)
/* CPU has no write access to the configuration registers */
#define DCAN_CONF_REG_WR_ACCESS_DISABLE      (DCAN_CTL_CCE_NOACCESS)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTestModeControl' API as 'testMode'.
*/
/* Enable Test mode of operation */
#define DCAN_TEST_MODE_ENABLE                (DCAN_CTL_TEST)
/* Disable Test mode of operation */
#define DCAN_TEST_MODE_DISABLE               (DCAN_CTL_TEST_NORMALMODE)

/******************************************************************************/
/*
** Values that can be passed to 'DCANDebugSuspendModeConfig' API as 'modeConfig'.
*/
/*
** DCAN will wait for a started transmission or reception to be completed before
** entering debug/suspend mode.
*/
#define DCAN_DEBUG_SUSPEND_WAIT              (DCAN_CTL_IDS_WAIT)
/*
** DCAN will interrupt any transmission or reception, and enter debug/suspend
** mode immediately.
*/
#define DCAN_DEBUG_SUSPEND_INTERRUPT         (DCAN_CTL_IDS)

/******************************************************************************/
/*
** Values that can be passed to 'DCANAutoBusOnControl' API as 'busControl'.
*/
/* Enable the Auto-bus-on feature */
#define DCAN_AUTO_BUS_ON_ENABLE              (DCAN_CTL_ABO)
/* Disable the Auto-bus-on feature */
#define DCAN_AUTO_BUS_ON_DISABLE             (DCAN_CTL_ABO_DISABLED)

/******************************************************************************/
/*
** Values that can be passed to 'DCANParityControl' API as 'paritySet'.
*/
/* Enable Parity function */
#define DCAN_PARITY_FUNC_ENABLE              (DCAN_CTL_PMD_ENABLED << \
                                              DCAN_CTL_PMD_SHIFT)
/* Disable Parity function */
#define DCAN_PARITY_FUNC_DISABLE             (DCAN_CTL_PMD_DISABLED << \
                                              DCAN_CTL_PMD_SHIFT)

/******************************************************************************/
/*
** Values that can be used to return the status from 'DCANInternalDebugStatusGet'
** API.
*/
/* Peripheral is not in debug mode */
#define DCAN_NOT_IN_DEBUG_MODE               (DCAN_CTL_INITDBG_DISABLED)
/* Peripheral is in debug mode or is ready for debug access */
#define DCAN_IN_DEBUG_MODE                   (DCAN_CTL_INITDBG)

/******************************************************************************/
/*
** Values that can be passed to 'DCANDmaRequestLineEnable' and
** 'DCANDmaRequestLineDisable' APIs as 'ifRegFlags'.
** 'ifRegFlags' can take more than one value.
** For e.g. (DCAN_DMA_REQUEST_LINE_ENABLE_IF1 | DCAN_DMA_REQUEST_LINE_ENABLE_IF2)
** can be passed as 'ifRegFlags'
*/
/* Enable/Disable DMA request line for IF1 */
#define DCAN_DMA_REQUEST_LINE_IF1            (DCAN_CTL_DE1)
/* Enable/Disable DMA request line for IF2 */
#define DCAN_DMA_REQUEST_LINE_IF2            (DCAN_CTL_DE2)
/* Enable/Disable DMA request line for IF3 */
#define DCAN_DMA_REQUEST_LINE_IF3            (DCAN_CTL_DE3)

/******************************************************************************/
/*
** Values that can be passed to 'DCANPwrDwnControl' as 'pwrDwnCtl'
*/
/* Local power down is not requested */
#define DCAN_LOCAL_PWR_DWN_OFF               (DCAN_CTL_PDR_NOTPOWERDOWN)
/* Local power down mode is requested */
#define DCAN_LOCAL_PWR_DWN_ON                (DCAN_CTL_PDR)

/******************************************************************************/
/*
** Values that can be passed on to 'DCANPwrDwnWkUpControl' API as 'wkUpCtl'
*/
/* No detection of a dominant CAN bus level when in local power down mode */
#define DCAN_WKUP_DETECTION_DISABLED         (DCAN_CTL_WUBA_NODETECTION)
/* Detection of a dominant CAN bus level when in local power down is enabled */
#define DCAN_WKUP_DETECTION_ENABLED          (DCAN_CTL_WUBA)

/******************************************************************************/
/*
** Values that can be used to check the status of DCAN_ES register got from
** 'DCANErrAndStatusRegInfoGet' API.
*/
/* No error is detected */
#define DCAN_LST_ERRCODE_NO_ERR              (DCAN_ES_LEC_NOERROR)
/* Stuff error is detected */
#define DCAN_LST_ERRCODE_STUFF_ERR           (DCAN_ES_LEC_STUFFERROR)
/* Form error is detected */
#define DCAN_LST_ERRCODE_FORM_ERR            (DCAN_ES_LEC_FORMERROR)
/* Ack error is detected */
#define DCAN_LST_ERRCODE_ACK_ERR             (DCAN_ES_LEC_ACKERROR)
/* Bit1 error is detected */
#define DCAN_LST_ERRCODE_BIT1_ERR            (DCAN_ES_LEC_BIT1ERROR)
/* Bit0 error is detected */
#define DCAN_LST_ERRCODE_BIT0_ERR            (DCAN_ES_LEC_BIT0ERROR)
/* CRC error detected */
#define DCAN_LST_ERRCODE_CRC_ERR             (DCAN_ES_LEC_CRCERROR)
/* No event is generated on the CAN bus since last read of DCAN_ES */
#define DCAN_NO_EVENT_ON_CAN_BUS             (DCAN_ES_LEC_NOEVENT)
/* DCAN transmitted message successfully */
#define DCAN_TXD_MSG_SUCCESSFULLY            (DCAN_ES_TXOK)
/* DCAN received message successfully */
#define DCAN_RXD_MSG_SUCCESSFULLY            (DCAN_ES_RXOK)
/* DCAN is in error passive state */
#define DCAN_CORE_IN_ERR_PASSIVE             (DCAN_ES_EPASS)
/* Atleast one of the counters have reached the error warning limit */
#define DCAN_ERR_WARN_STATE_RCHD             (DCAN_ES_EWARN)
/* DCAN is in Bus off state */
#define DCAN_MOD_IN_BUS_OFF_STATE            (DCAN_ES_BOFF)
/* Parity error detected */
#define DCAN_PARITY_ERR_DETECTED             (DCAN_ES_PER)
/* DCAN initiated system wakeup */
#define DCAN_INITIATED_SYSTEM_WKUP           (DCAN_ES_WAKEUPPND)
/* DCAN is in local power down mode */
#define DCAN_IN_LOCAL_PWR_DWN_MODE           (DCAN_ES_PDA)

/******************************************************************************/
/*
** Values that can be sent to 'DCANErrCntrRegStatusGet' API as 'cntrFlags'.
** 'cntrFlags' can take more than one value.
** For e.g. (DCAN_TX_ERR_CNTR | DCAN_RX_ERR_CNTR | DCAN_RX_ERR_PASSIVE) can be
** sent as 'cntrFlags'.
*/
/* Macro used to return the status of TEC[7:0] field of DCAN_ERRC register */
#define DCAN_TX_ERR_CNTR                     (DCAN_ERRC_TEC)
/* Macro used to return the status of REC[6:0] field of DCAN_ERRC register*/
#define DCAN_RX_ERR_CNTR                     (DCAN_ERRC_REC)
/* Macro used to return the status of RP field of DCAN_ERRC register */
#define DCAN_RX_ERR_PASSIVE                  (DCAN_ERRC_RP)

/******************************************************************************/
/*
** Values that can be passed to 'DCANIntRegStatusGet' API as 'intLnFlag'.
** 'intLnFlag' can take more than one value.
** For e.g. (DCAN_INT_LINE0_STAT | DCAN_INT_LINE1_STAT) can be passed as
** 'intLnFlag'.
*/
/* Macro used to return the status of INT0ID[15:0] field of DCAN_INT register */
#define DCAN_INT_LINE0_STAT                  (DCAN_INT_INT0ID)
/* Macro used to return the status of INT1ID[23:16] field of DCAN_INT register */
#define DCAN_INT_LINE1_STAT                  (DCAN_INT_INT1ID)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTestModesEnable' and 'DCANTestModesDisable'
** API as 'tstMode'.
*/
/* Macro that can be used to enable/disable silent mode */
#define DCAN_TST_SILENT_MD                   (DCAN_TEST_SILENT)
/* Macro that can be used to enable/disable loopback mode */
#define DCAN_TST_LPBCK_MD                    (DCAN_TEST_LBACK)
/* Macro that can be used to enable/disable external loopback mode */
#define DCAN_TST_EXTLPBCK_MD                 (DCAN_TEST_EXL)
/* Macro that can be used to enable/disable loopback with silent mode */
#define DCAN_TST_LPBCK_SILENT_MD             (DCAN_TEST_LBACK | \
                                              DCAN_TEST_SILENT)
/* Macro that can be used to enable/disable direct access to RAM */
#define DCAN_TST_RAM_DIRECT_ACCESS           (DCAN_TEST_RDA)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTxPinControl' API as 'pinCtl'.
*/
/* CAN_TX pin is controlled by CAN core */
#define DCAN_TST_TX_NRML_OP                 (DCAN_TEST_TX_NORMAL)
/* Sample point can be monitored at CAN_TX pin */
#define DCAN_TST_TX_SAMPLE_PT_MNTR          (DCAN_TEST_TX_SAMPLEPOINT << \
                                             DCAN_TEST_TX_SHIFT)
/* CAN_TX pin drives a dominant value */
#define DCAN_TST_TX_DRIV_DOM_VAL            (DCAN_TEST_TX_DOMINANT << \
                                             DCAN_TEST_TX_SHIFT)
/* CAN_TX pin drives a recessive value */
#define DCAN_TST_TX_DRIV_RSV_VAL            (DCAN_TEST_TX_RECESSIVE << \
                                             DCAN_TEST_TX_SHIFT)

/******************************************************************************/
/*
** Values that can be used to check the status received from 'DCANRxPinStatusGet'
** API.
*/
/* CAN bus is dominant */
#define DCAN_TST_RX_IS_DOM                  (DCAN_TEST_RX_DOMINANT)
/* CAN bus is recessive */
#define DCAN_TST_RX_IS_RSV                  (DCAN_TEST_RX)

/******************************************************************************/
/*
** Values that can be used to check the status received from
** 'DCANParityErrCdRegStatusGet' API.
*/
/* Macro used to return the message number status from DCAN_PERR register */
#define DCAN_PARITY_ERR_MSG_NUM             (DCAN_PERR_MESSAGE_NUMBER)
/* Macro used to return the word number status from DCAN_PERR register */
#define DCAN_PARITY_ERR_WRD_NUM             (DCAN_PERR_WORD_NUMBER)

/******************************************************************************/
/*
** Value that can be used while checking the status obtained from
** 'DCANTxRqstXStatusGet' API.
** 'n' can take these values
** 1 <= n <= 8.
*/
/* Value that can be used to check the status of DCAN_TXRQST_X register */
#define DCAN_TXRQST_X_REG(n)                (DCAN_TXRQ_X_TXRQSTREG1 <<  \
                                            (((n) - 1) * 2))

/******************************************************************************/
/*
** Value that can be used while checking the status obtained from
** 'DCANNewDataXStatusGet' API.
** 'n' can take these values
** 1 <= n <= 8.
*/
/* Value that can be used to check the status of DCAN_NWDAT_X register */
#define DCAN_NEWDAT_X_REG(n)                (DCAN_NWDAT_X_NEWDATREG1 << \
                                            (((n) - 1) * 2))

/******************************************************************************/
/*
** Value that can be used while checking the status obtained from
** 'DCANMsgValidXStatusGet' API.
** 'n' can take these values
** 1 <= n <= 8.
*/
/* Value that can be used to check the status of DCAN_MSGVAL_X register */
#define DCAN_MSGVAL_X_REG(n)                (DCAN_MSGVAL_X_MSGVALREG1 << \
                                            (((n) - 1) * 2))

/******************************************************************************/
/*
** Value that can be used while checking the status obtained from
** 'DCANIntPendingXStatusGet' API.
** 'n' can take these values
** 1 <= n <= 8.
*/
/* Value that can be used to check the status of DCAN_INTPND_X register */
#define DCAN_INTPND_X_REG(n)                (DCAN_INTPND_X_INTPNDREG1 << \
                                            (((n) - 1) * 2))

/******************************************************************************/
/*
** Values can be used to check the status obtained from 'DCANIFBusyStatusGet'
** API.
*/
/* Transfer between IF1/IF2 register set and message RAM is in progress */
#define DCAN_IF_BUSY                        (DCAN_IFCMD_BUSY)
/* No transfer between IF1/IF2 register set and message RAM */
#define DCAN_IF_NOT_BUSY                    (DCAN_IFCMD_BUSY_NOTRANSFER)

/******************************************************************************/
/*
** Values that can be sent to 'DCANMsgIdSet' API as 'idLength'.
*/
/* Identifier of 11 bit size is used */
#define DCAN_11_BIT_ID                      (DCAN_IFARB_XTD_11_BIT)
/* Identifier of 29 bit size is used */
#define DCAN_29_BIT_ID                      (DCAN_IFARB_XTD)

/******************************************************************************/
/*
** Values that can be sent to 'DCANIntMuxConfig' API as 'intLine'
*/
/* DCANINT0 line is active if corresponding IntPnd flag is one */
#define DCAN_INT0_ACTIVE                    (0x00000000u)
/* DCANINT1 line is active if corresponding IntPnd flag is one */
#define DCAN_INT1_ACTIVE                    (0x00000001u)

/******************************************************************************/
/*
** Values that can be sent to 'DCANMsgObjValidate', 'DCANMsgObjInvalidate,
** 'DCANCommandRegSet', 'DCANIFBusyStatusGet, 'DCANMsgIdSet',
** 'DCANMsgDirectionSet', 'DCANDataWrite', 'DCANDataRead', 'DCANDataLengthCodeSet',
** 'DCANRemoteEnableControl', 'DCANMsgObjIntEnable', 'DCANMsgObjIntDisable',
** 'DCANFIFOEndOfBlockControl', 'DCANMsgObjectDirectionConfig',
** 'DCANMsgObjectMskConfig', APIs as ''regNum'.
*/
/* Interface register 1 is used */
#define DCAN_IF1_REG                        (1u)
/* Interface register 2 is used */
#define DCAN_IF2_REG                        (2u)
/* Interface register 3 is used */
#define DCAN_IF3_REG                        (3u)

/******************************************************************************/
/*
** Values that can be sent to 'DCANMsgDirectionSet' API as 'msgDir'.
*/
/* Message object set to transmit a message*/
#define DCAN_TX_DIR                         (DCAN_IFARB_DIR)
/* Message object set to receive a message*/
#define DCAN_RX_DIR                         (DCAN_IFARB_DIR_RECEIVE)

/******************************************************************************/
/*
** Values that can be sent to 'DCANRemoteEnableControl' API as 'remEnable'.
*/
/* At the reception of a remote frame TxRqst is set */
#define DCAN_REMOTE_ENABLE                  (DCAN_IFMCTL_RMTEN)
/* At the reception of a remote frame TxRqst is not changed */
#define DCAN_REMOTE_DISABLE                 (DCAN_IFMCTL_RMTEN_DISABLE)

/******************************************************************************/
/*
** Values that can be sent to 'DCANMsgObjIntEnable' and 'DCANMsgObjIntDisable'
** APIs as 'intFlags'.
*/
/* Enable/disable transmit interrupt */
#define DCAN_TRANSMIT_INT            (DCAN_IFMCTL_TXIE)
/* Enable/disable receive interrupt */
#define DCAN_RECEIVE_INT            (DCAN_IFMCTL_RXIE)

/******************************************************************************/
/*
** Values that can be sent to 'DCANFIFOEndOfBlockControl' API as 'eob'.
*/
/* Enable end of block */
#define DCAN_END_OF_BLOCK_ENABLE            (DCAN_IFMCTL_EOB)
/* Disable end of block */
#define DCAN_END_OF_BLOCK_DISABLE           (0x00000000u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANCommandRegSet' API as 'cmdFlags'.
** 'cmdFlags' can be passed by combining more than one macro.
** For e.g. (DCAN_DMA_ACTIVE | DCAN_DAT_A_ACCESS | DCAN_DAT_B_ACCESS)
*/
/* Enable DMA feature */
#define DCAN_DMA_ACTIVE                     (DCAN_IFCMD_DMAACTIVE)
/* Access data from IF DataA register */
#define DCAN_DAT_A_ACCESS                   (DCAN_IFCMD_DATAA)
/* Access data from IF DataB register */
#define DCAN_DAT_B_ACCESS                   (DCAN_IFCMD_DATAB)
/* Access the TxRqst bit */
#define DCAN_TXRQST_ACCESS                  (DCAN_IFCMD_TXRQST_NEWDAT)
/* Clear the IntPnd bit */
#define DCAN_CLR_INTPND                     (DCAN_IFCMD_CLRINTPND)
/* Access control bits */
#define DCAN_ACCESS_CTL_BITS                (DCAN_IFCMD_CONTROL)
/* Access Arbitration bits */
#define DCAN_ACCESS_ARB_BITS                (DCAN_IFCMD_ARB)
/* Access the mask bits */
#define DCAN_ACCESS_MSK_BITS                (DCAN_IFCMD_MASK)
/* Transfer direction is from IF registers to message RAM */
#define DCAN_MSG_WRITE                      (DCAN_IFCMD_WR_RD)
/* Transfer direction is from message RAM to IF registers */
#define DCAN_MSG_READ                       (0x00000000u)

/******************************************************************************/
/*
** Values that can be passed to 'DCAN_IDENTIFIER_MSK' macro as idType.
*/
/* 11 bit id is used */
#define DCAN_ID_MSK_11_BIT                  (18u)
/* 29 bit id is used */
#define DCAN_ID_MSK_29_BIT                  (0u)

/******************************************************************************/
/*
** Value that can be passed to 'DCANMsgObjectMskConfig' API as 'idMsk'.
** 'mask' can take values between 0 <= idMsk <= 0x1FFFFFFF \n
** 'idType' can take the following values \n
** DCAN_ID_MSK_11_BIT - 11 bit identifier is used \n
** DCAN_ID_MSK_29_BIT - 29 bit identifier is used \n
*/
#define DCAN_IDENTIFIER_MSK(mask, idType)  (mask << idType)

/******************************************************************************/
/*
** Values that can be passed to 'DCANMsgObjectMskConfig' API as 'msgDir'.
*/
/* Message direction bit is used for acceptance filtering */
#define DCAN_MSK_MSGDIR_ENABLE              (DCAN_IFMSK_MDIR)
/* Message direction bit has no effect on acceptance filtering */
#define DCAN_MSK_MSGDIR_DISABLE             (DCAN_IFMSK_MDIR_NOTUSED)

/******************************************************************************/
/*
** Values that can be passed to 'DCANMsgObjectMskConfig' API as 'extId'.
*/
/* The IDE bit is used for acceptance filtering */
#define DCAN_MSK_EXT_ID_ENABLE              (DCAN_IFMSK_MXTD)
/* The IDE bit is not used for acceptance filtering */
#define DCAN_MSK_EXT_ID_DISABLE             (DCAN_IFMSK_MXTD_NOTUSED)

/******************************************************************************/
/*
** Values that can be passed to 'DCANIF3ObservationFlagSet' API as 'obsFlags'.
** 'obsFlags' can take more than 1 value.
** For e.g. (DCAN_MASK_DATA | DCAN_ARB_DATA)
*/
/* Mask data read observation */
#define DCAN_MASK_DATA                      (DCAN_IF3OBS_MASK)
/* Arbitration data read observation */
#define DCAN_ARB_DATA                       (DCAN_IF3OBS_ARB)
/* Ctrl read observation */
#define DCAN_CTRL_DATA                      (DCAN_IF3OBS_CTRL)
/* Data A read observation */
#define DCAN_DAT_A_DATA                     (DCAN_IF3OBS_DATAA)
/* Data B read observation */
#define DCAN_DAT_B_DATA                     (DCAN_IF3OBS_DATAB)

/******************************************************************************/
/*
** Values that can be used to check the status obtained from
** 'DCANIF3ObservationFlagStatGet' API.
*/
/* IF3 status of Mask data read access */
#define DCAN_IF3_MASK_STATUS                (DCAN_IF3OBS_IF3SM)
/* IF3 status of Arbitration data read access */
#define DCAN_IF3_ARB_STATUS                 (DCAN_IF3OBS_IF3SA)
/* IF3 status of Control bits read access */
#define DCAN_IF3_CTRL_STATUS                (DCAN_IF3OBS_IF3SC)
/* IF3 status of Data A read access */
#define DCAN_IF3_DAT_A_STATUS               (DCAN_IF3OBS_IF3SDA)
/* IF3 status of Data B read access */
#define DCAN_IF3_DAT_B_STATUS               (DCAN_IF3OBS_IF3SDB)
/* IF3 Update data status */
#define DCAN_IF3_UPDATE_STATUS              (DCAN_IF3OBS_IF3UPD)

/******************************************************************************/
/*
** Values that can be used to check the status obtained from
** 'DCANIF3MaskStatusGet' API.
*/
/* Read Identifier mask */
#define DCAN_ID_MSK_READ                    (DCAN_IF3MSK_MSK)
/* Read mask message direction */
#define DCAN_MSK_MSG_DIR_READ               (DCAN_IF3MSK_MDIR)
/* Read mask extended identifier */
#define DCAN_MSK_EXT_ID_READ                (DCAN_IF3MSK_MXTD)

/******************************************************************************/
/*
** Values that can be used to check the status obtained from 'DCANIF3ArbStatusGet'
** API.
*/
/* Read message identifier */
#define DCAN_MSG_ID_READ                    (DCAN_IF3ARB_MSK)
/* Read message direction */
#define DCAN_MSG_DIR_READ                   (DCAN_IF3ARB_DIR)
/* Read extended identifier */
#define DCAN_EXT_ID_READ                    (DCAN_IF3ARB_XTD)
/* Read message valid status */
#define DCAN_MSGVAL_READ                    (DCAN_IF3ARB_MSGVAL)

/******************************************************************************/
/*
** Values that can be used to check the status obtained from
** 'DCANIFMsgCtlStatusGet' API.
*/
/* Read data length code */
#define DCAN_DAT_LEN_CODE_READ              (DCAN_IF3MCTL_DATALENGTHCODE)
/* Read end of block bit */
#define DCAN_END_OF_BLOCK_READ              (DCAN_IF3MCTL_EOB)
/* Read transmit request bit */
#define DCAN_TXRQST_READ                    (DCAN_IF3MCTL_TXRQST)
/* Read remote enable bit */
#define DCAN_RMT_ENABLE_READ                (DCAN_IF3MCTL_RMTEN)
/* Read Rx interrupt enable bit */
#define DCAN_RX_INT_ENABLE_READ             (DCAN_IF3MCTL_RXIE)
/* Read Tx interrupt enable bit */
#define DCAN_TX_INT_ENABLE_READ             (DCAN_IF3MCTL_TXIE)
/* Read use acceptance mask bit */
#define DCAN_UMASK_READ                     (DCAN_IF3MCTL_UMASK)
/* Read interrupt pending status */
#define DCAN_INTPND_READ                    (DCAN_IF3MCTL_INTPND)
/* Read message lost status */
#define DCAN_MSG_LOST_READ                  (DCAN_IF3MCTL_MSGLST)
/* Read new data status */
#define DCAN_NEWDAT_READ                    (DCAN_IF3MCTL_NEWDAT)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTxPinModeConfig' API as 'txPinMode'.
*/
/* DCAN Tx Pin is used as general purpose pin */
#define DCAN_TX_PIN_GIO_MODE                (0x00000000u)
/* DCAN Tx Pin is used as functional pin */
#define DCAN_TX_PIN_FUNC_MODE               (0x00000008u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTxPinInputDirConfig' API as 'pinLogic'.
*/
/* DCAN Tx pin is used as an input pin with logic low */
#define DCAN_TX_PIN_IN_LOGIC_LOW            (0x00000000u)
/* DCAN Tx pin is used as an input pin with logic high */
#define DCAN_TX_PIN_IN_LOGIC_HIGH           (0x00000001u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTxPinOutputDirConfig' API as 'pinLogic'.
*/
/* DCAN Tx pin is used as an output pin with logic low */
#define DCAN_TX_PIN_OUT_LOGIC_LOW           (0x00000000u)
/* DCAN Tx pin is used as an output pin with logic high */
#define DCAN_TX_PIN_OUT_LOGIC_HIGH          (0x00000002u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANRxPinModeConfig' API as 'rxPinMode'.
*/
/* DCAN Rx Pin is used as general purpose pin */
#define DCAN_RX_PIN_GIO_MODE                (0x00000000u)
/* DCAN Rx Pin is used as functional pin */
#define DCAN_RX_PIN_FUNC_MODE               (0x00000008u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANRxPinInputDirConfig' API as 'pinLogic'.
*/
/* DCAN Rx pin is used as an input pin with logic low */
#define DCAN_RX_PIN_IN_LOGIC_LOW            (0x00000000u)
/* DCAN Rx pin is used as an input pin with logic high */
#define DCAN_RX_PIN_IN_LOGIC_HIGH           (0x00000001u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANRxPinOutputDirConfig' API as 'pinLogic'.
*/
/* DCAN Rx pin is used as an output pin with logic low */
#define DCAN_RX_PIN_OUT_LOGIC_LOW           (0x00000000u)
/* DCAN Rx pin is used as an output pin with logic high */
#define DCAN_RX_PIN_OUT_LOGIC_HIGH          (0x00000002u)

/******************************************************************************/
/*
** Values that can be passed to 'DCANNewDataControl' API as 'newDat'.
*/
/* Set NewDat */
#define DCAN_NEW_DAT_SET                    (DCAN_IFMCTL_NEWDAT)
/* Clear NewDat */
#define DCAN_NEW_DAT_CLR                    (DCAN_IFMCTL_NEWDAT_NONEWDATA)

/******************************************************************************/
/*
** Values that can be passed to 'DCANUseAcceptanceMaskControl' API as 'uMask'
*/
/* Use acceptance mask */
#define DCAN_MASK_USED                      (DCAN_IFMCTL_UMASK)
/* Acceptance mask not used */
#define DCAN_MASK_IGNORED                   (DCAN_IFMCTL_UMASK_IGNORED)

/******************************************************************************/
/*
** Values that can be passed to 'DCANTransmitRequestControl' API as 'txRqst'
*/
/* Request for transmission */
#define DCAN_TRANSMIT_REQUESTED             (DCAN_IFMCTL_TXRQST)
/* Transmission not requested */
#define DCAN_TRANSMIT_NOT_REQUESTED         (DCAN_IFMCTL_TXRQST_NOREQUESTED)

/******************************************************************************/
/*                        DCAN API PROTOTYPES                                 */
/******************************************************************************/
extern void DCANInitModeSet(unsigned int baseAdd);
extern void DCANNormalModeSet(unsigned int baseAdd);
extern void DCANBitTimingConfig(unsigned int baseAdd,
                                unsigned int btrValue);
extern void DCANReset(unsigned int baseAdd);
extern void DCANIntEnable(unsigned int baseAdd, unsigned int intFlags);
extern void DCANIntDisable(unsigned int baseAdd, unsigned int intFlags);
extern void DCANAutoReTransmitControl(unsigned int baseAdd, unsigned int autoReTxn);
extern void DCANConfigRegWriteAccessControl(unsigned int baseAdd,
                                     unsigned int regConfig);
extern void DCANTestModeControl(unsigned int baseAdd, unsigned int testMode);
extern void DCANDebugSuspendModeConfig(unsigned int baseAdd, unsigned int modeConfig);
extern void DCANAutoBusOnControl(unsigned int baseAdd, unsigned int busControl);
extern void DCANParityControl(unsigned int baseAdd, unsigned int paritySet);
extern unsigned int DCANInternalDebugStatusGet(unsigned int baseAdd);
extern void DCANIntLineEnable(unsigned int baseAdd, unsigned int enableLine);
extern void DCANIntLineDisable(unsigned int baseAdd, unsigned int disableLine);
extern void DCANDmaRequestLineEnable(unsigned int baseAdd, unsigned int ifRegFlags);
extern void DCANDmaRequestLineDisable(unsigned int baseAdd, unsigned int ifRegFlags);
extern void DCANPwrDwnControl(unsigned int baseAdd, unsigned int pwrDwnCtl);
extern void DCANPwrDwnWkUpControl(unsigned int baseAdd, unsigned int wkUpCtl);
extern unsigned int DCANIntRegStatusGet(unsigned int baseAdd, unsigned int intLnFlag);
extern unsigned int DCANErrAndStatusRegInfoGet(unsigned int baseAdd);
extern void DCANParityEndOfIntSet(unsigned int baseAdd);
extern unsigned int DCANErrCntrRegStatusGet(unsigned int baseAdd,
                                     unsigned int cntrFlags);
extern void DCANTestModesEnable(unsigned int baseAdd, unsigned int tstMode);
extern void DCANTestModesDisable(unsigned int baseAdd, unsigned int tstMode);
extern void DCANTxPinControl(unsigned int baseAdd, unsigned int pinCtl);
extern unsigned int DCANRxPinStatusGet(unsigned int baseAdd);
extern unsigned int DCANParityErrCdRegStatusGet(unsigned int baseAdd,
                                         unsigned int statFlg);
extern void DCANAutoBusOnTimeValSet(unsigned int baseAdd, unsigned int timeVal);
extern unsigned int DCANAutoBusOnTimeValGet(unsigned int baseAdd);
extern unsigned int DCANTxRqstXStatusGet(unsigned int baseAdd);
extern unsigned int DCANTxRqstStatusGet(unsigned int baseAdd, unsigned int msgNum);
extern unsigned int DCANTxRqstStatGet(unsigned int baseAdd);
extern unsigned int DCANNewDataXStatusGet(unsigned int baseAdd);
extern unsigned int DCANNewDataStatusGet(unsigned int baseAdd, unsigned int msgNum);
extern unsigned int DCANNewDataStatGet(unsigned int baseAdd);
extern void DCANMsgObjValidate(unsigned int baseAdd, unsigned int regNum);
extern void DCANMsgObjInvalidate(unsigned baseAdd, unsigned int regNum);
extern void DCANCommandRegSet(unsigned int baseAdd, unsigned int cmdFlags,
                              unsigned int objNum, unsigned int regNum);
extern unsigned int DCANIntPendingXStatusGet(unsigned int baseAdd);
extern unsigned int DCANIntPendingStatusGet(unsigned int baseAdd, unsigned int msgNum);
extern unsigned int DCANMsgValidXStatusGet(unsigned int baseAdd);
extern unsigned int DCANMsgValidStatusGet(unsigned int baseAdd, unsigned int msgNum);
extern void DCANIntMuxConfig(unsigned int baseAdd, unsigned int intLine,
                             unsigned int msgNum);
extern unsigned int DCANIFBusyStatusGet(unsigned int baseAdd, unsigned int regNum);
extern void DCANMsgIdSet(unsigned int baseAdd, unsigned int msgId,
                         unsigned int idLength, unsigned int regNum);
extern void DCANMsgDirectionSet(unsigned int baseAdd, unsigned int msgDir,
                         unsigned int regNum);
extern void DCANDataWrite(unsigned int baseAdd, unsigned int* dataPtr,
                   unsigned int regNum);
extern void DCANDataRead(unsigned int baseAdd, unsigned int* data, unsigned int regNum);
extern void DCANDataLengthCodeSet(unsigned int baseAdd, unsigned int dlc,
                           unsigned int regNum);
extern void DCANRemoteEnableControl(unsigned int baseAdd, unsigned int remEnable,
                            unsigned int regNum);
extern void DCANMsgObjIntEnable(unsigned int baseAdd, unsigned int intFlags,
                         unsigned int regNum);
extern void DCANMsgObjIntDisable(unsigned int baseAdd, unsigned int intFlags,
                          unsigned int regNum);
extern void DCANFIFOEndOfBlockControl(unsigned int baseAdd, unsigned int eob,
                              unsigned int regNum);
extern void DCANMsgObjectMskConfig(unsigned int baseAdd, unsigned int idMsk,
                            unsigned int msgDir, unsigned int extId,
                            unsigned int regNum);
extern void DCANIF3RegUpdateEnableSet(unsigned int baseAdd,
                                       unsigned int msgNum);
extern unsigned char DCANIF3ObservationFlagStatGet(unsigned int baseAdd);
extern void DCANIF3ObservationFlagSet(unsigned int baseAdd, unsigned int obsFlags);
extern void DCANIF3ObservationFlagClear(unsigned int baseAdd, unsigned int obsFlags);
extern unsigned int DCANIF3MaskStatusGet(unsigned int baseAdd);
extern unsigned int DCANIF3ArbStatusGet(unsigned int baseAdd);
extern unsigned int DCANIFMsgCtlStatusGet(unsigned int baseAdd, unsigned int regNum);
extern void DCANTxPinModeConfig(unsigned int baseAdd, unsigned int txPinMode);
extern void DCANTxPinInputDirConfig(unsigned int baseAdd, unsigned int pinLogic);
extern void DCANTxPinOutputDirConfig(unsigned int baseAdd, unsigned int pinLogic);
extern void DCANRxPinModeConfig(unsigned int baseAdd, unsigned int rxPinMode);
extern void DCANRxPinInputDirConfig(unsigned int baseAdd, unsigned int pinLogic);
extern void DCANRxPinOutputDirConfig(unsigned int baseAdd, unsigned int pinLogic);
extern void DCANClrIntPnd(unsigned int baseAdd, unsigned int regNum);
extern void DCANNewDataControl(unsigned int baseAdd, unsigned int newDat,
                        unsigned int regNum);
extern void DCANUseAcceptanceMaskControl(unsigned int baseAdd, unsigned int uMask,
                                  unsigned int regNum);
extern void DCANTransmitRequestControl(unsigned int baseAdd, unsigned int txRqst,
                                unsigned int regNum);
#ifdef __cplusplus
}
#endif

#endif


text:
OMNI_NAMESPACE_BEGIN(omni)

struct OutputTableEntry;
struct InputTableEntry;

class OutputValueTracker : public ValueIndirectionTracker {
public:
  OutputValueTracker();
  virtual ~OutputValueTracker();

  inline CORBA::Boolean valid()
  {
    return pd_magic == PD_MAGIC;
  }

  CORBA::Long addValue(const CORBA::ValueBase* val,
		       CORBA::Long             current);
  // Look to see if the value has been marshalled before. If so,
  // return its offset; if not, add it to the table and return -1.

  CORBA::Long addRepoId(const char*  repoId,
			CORBA::ULong hashval,
			CORBA::Long  current);
  // As above, for a single repository id.

  CORBA::Long addRepoIds(const _omni_ValueIds* repoIds,
			 CORBA::Long           current);
  // As above, for a list of repository ids.

  inline void startTruncatable() {
    pd_in_truncatable++;
  }
  inline void endTruncatable() {
    pd_in_truncatable--;
  }
  inline CORBA::Boolean inTruncatable() {
    return (pd_in_truncatable > 0);
  }
  // Inside a truncatable value, repoIds of nested values must always
  // be sent, in case the receiver truncates the first instance of the
  // nested value away, but later receives an indirection to it.

private:
  void resizeTable();

  inline void add()
  {
    if (++pd_table_count == pd_table_limit)
      resizeTable();
  }

  static _dyn_attr const CORBA::ULong PD_MAGIC; // "C+OV"
  CORBA::ULong       pd_magic;

  CORBA::ULong       pd_in_truncatable;
  OutputTableEntry** pd_table;
  CORBA::ULong       pd_table_count;
  CORBA::ULong       pd_table_size;
  CORBA::ULong       pd_table_limit;
  CORBA::ULong       pd_table_next_idx;
};

class InputValueTracker : public ValueIndirectionTracker {
public:
  InputValueTracker();
  virtual ~InputValueTracker();

  inline CORBA::Boolean valid()
  {
    return pd_magic == PD_MAGIC;
  }

  void addValue(CORBA::ValueBase* val, CORBA::Long current);
  // Add record of unmarshalled value. Takes ownership of the reference.

  void addRepoId(char* repoId, CORBA::Long current);
  // Add record of unmarshalled repoId. Takes ownership of the string.

  void addRepoIds(_omni_ValueIds* repoIds, CORBA::Long current);
  // Add record of list of unmarshalled repoIds. Takes ownership of
  // the list structure. The strings stored in the list are _not_
  // owned, since they are separately registered with addRepoId.

  CORBA::ValueBase* lookupValue(CORBA::Long pos,
				CORBA::Long current,
				CORBA::CompletionStatus comp);
  // Lookup value at specified position, from the current position.
  // Throw MARSHAL_InvalidIndirection if not found. Caller must
  // add_ref if it needs to keep the value.

  const char* lookupRepoId(CORBA::Long pos,
			   CORBA::Long current,
			   CORBA::CompletionStatus comp);
  // As above for single repoId.

  const _omni_ValueIds* lookupRepoIds(CORBA::Long pos,
				      CORBA::Long current,
				      CORBA::CompletionStatus comp);
  // As above for list of repoIds.

private:
  void resizeTable();

  inline void add()
  {
    if (++pd_table_count == pd_table_limit)
      resizeTable();
  }

  static _dyn_attr const CORBA::ULong PD_MAGIC; // "C+IV"
  CORBA::ULong      pd_magic;

  CORBA::ULong      pd_in_truncatable;
  InputTableEntry** pd_table;
  CORBA::ULong      pd_table_count;
  CORBA::ULong      pd_table_size;
  CORBA::ULong      pd_table_limit;
  CORBA::ULong      pd_table_next_idx;
};

OMNI_NAMESPACE_END(omni)

#undef _dyn_attr

#endif // __VALUETRACKERIMPL_H__


text:
require 'spec_helper'

describe Nvr do
  describe "via validations" do
    it "should verify presence of nip" do
      @nvr = Nvr.new(nil)
      @nvr.should_not be_valid
    end

    context "should verify length of nip" do
      it { Nvr.new("12345").should_not be_valid }

      it { Nvr.new("12345678901").should_not be_valid }
    end

    context "should verify numericality of nip" do
      it { Nvr.new("abcdefghij").should_not be_valid }

      it { Nvr.new("12345678a0").should_not be_valid }
    end

    it "nip always should be a string" do
      @nvr = Nvr.new(1234567890)
      @nvr.nip.should eq("1234567890")
    end

    it "should remove all spaces from nip" do
      @nvr = Nvr.new("123 45 67 890")
      @nvr.nip.should eq("1234567890")
    end

    it "should remove all dashes from nip" do
      @nvr = Nvr.new("123-45-67-890")
      @nvr.nip.should eq("1234567890")
    end

    context "checksum" do
      it "shouldn't accept incorrect nip number" do
        Nvr.new("1234567890").should_not be_valid
      end

      context "should accept correct nip numbers" do
        it { Nvr.new("0000262817").should be_valid }

        it { Nvr.new("2010000304").should be_valid }

        it { Nvr.new("6480002952").should be_valid }
      end
    end
  end
end


text:
    Container-to-Container Networking Opsfiles
    Description

- type: replace
  path: /instance_groups/name=diego-cell/jobs/name=vxlan_policy_agent/properties/iptables_logging?
  value: true

      The default value for iptables_logging is false.

    (Optional) Change the value to true to enable logging for Container-to-Container policy iptables rules.

- type: replace
  path: /instance_groups/name=diego-cell/jobs/name=cni/properties/iptables_logging?
  value: true

      The default value for iptables_logging is false.

    (Optional) Change the value to true to enable
    logging for Application Security Group (ASG) iptables rules.

- type: replace
  path: /instance_groups/name=diego-cell/jobs/name=silk-controller/properties/network?
  value: REPLACE-WITH-OVERLAY-NETWORK-CIDR

      (Optional) Enter an IP range for the overlay network. The CIDR must specify an RFC 1918 range. If you do not set a custom range, the deployment uses 10.255.0.0/16.

See App Instance Communication for more information.

- type: replace
  path: /instance_groups/name=diego-cell/jobs/name=cni/properties/mtu?
  value: REPLACE-WITH-MTU

      (Optional) You can manually configure the Maximum Transmission Unit (MTU) value to support additional encapsulation overhead.


text:
from aux.system.base import BaseSystem
from aux.authentication import BaseCredentials
from aux.api import ssh

class LinuxDevice(BaseSystem):
    def __init__(self, hostname):
        super(LinuxDevice, self).__init__(hostname)
        self.hostname = self.identifier
        self.ssh = ssh
        # self.ssh.set_hostname(self.identifier)


text:
Give Back/Pay it Forward
----------------------

.. toctree::
   :maxdepth: 4

   data-commons-data-donation
   contribute


text:
package com.intuit.wasabi.util;

import org.slf4j.Logger;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;

import static java.util.Calendar.HOUR_OF_DAY;
import static java.util.Calendar.MILLISECOND;
import static java.util.Calendar.MINUTE;
import static java.util.Calendar.SECOND;
import static java.util.TimeZone.getTimeZone;
import static org.slf4j.LoggerFactory.getLogger;

public class DateUtil {

    private static final String[] ISO_8601_FORMATS = {
            "yyyy-MM-dd'T'HH:mm:ssXX",
            "yyyy-MM-dd'T'HH:mm:ss",
            "yyyy-MM-dd"
    };
    private static final Logger LOGGER = getLogger(DateUtil.class);

    //Add private constructor to not allowing people to create new instance of this class
    //since everything is static method here
    private DateUtil() {
    }

    /**
     * Parses an ISOTimestamp String to a Timestamp object
     * returns null, if the format is not recognized
     *
     * Acceptable formats are:
     *

     *
"yyyy-MM-dd'T'HH:mm:ssXX"

     *
"yyyy-MM-dd'T'HH:mm:ss"

     *
"yyyy-MM-dd"

     *

     *
     * @param timestampStr The input string in one of the formats given above
     * @return Timestamp object, if successful; null if unsuccessful
     */
    public static Date parseISOTimestamp(String timestampStr) {
        for (String iso8601Format : ISO_8601_FORMATS) {
            try {
                SimpleDateFormat dateFmt = new SimpleDateFormat(iso8601Format);
                /* The default in java.text.DateFormat.parse() is to treat the condensed ("yyyy-MM-DDThh:mm:ss")
                 * timestamp string as localtime. By explicitly setting the timezone to "UTC" we are forcing
                 * interpretation of all input times as UTC.
                 */

                dateFmt.setTimeZone(getTimeZone("UTC"));
                dateFmt.setLenient(false);

                return dateFmt.parse(timestampStr);
            } catch (Exception ex) {
                LOGGER.error("unable to parse date", ex);
            }
        }

        return null;
    }

    /**
     * Creates a calendar with hour, minute, second, millisecond set to zero for given Date.
     *
     * @param date the date to use
     * @return calendar object create from date and set to midnight
     */
    public static Calendar createCalendarMidnight(final Date date) {
        Calendar cal = new GregorianCalendar(getTimeZone("GMT+0"));

        cal.setTime(date);
        cal.set(HOUR_OF_DAY, 0);
        cal.set(MINUTE, 0);
        cal.set(SECOND, 0);
        cal.set(MILLISECOND, 0);

        return cal;
    }

    /**
     * Returns current time in UTC timezone as string
     * @return string
     */
    public static String getUTCTime() {
        Date currentTime = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("EEE, MMM d, yyyy hh:mm:ss a z");
        sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
        return sdf.format(currentTime);
    }
}


text:
#include "api/rtp_transceiver_interface.h"

#include "rtc_base/checks.h"

namespace webrtc {

RtpTransceiverInit::RtpTransceiverInit() = default;

RtpTransceiverInit::RtpTransceiverInit(const RtpTransceiverInit& rhs) = default;

RtpTransceiverInit::~RtpTransceiverInit() = default;

absl::optional<RtpTransceiverDirection>
RtpTransceiverInterface::fired_direction() const {
  return absl::nullopt;
}

RTCError RtpTransceiverInterface::SetCodecPreferences(
    rtc::ArrayView<RtpCodecCapability>) {
  RTC_NOTREACHED() << "Not implemented";
  return {};
}

std::vector<RtpCodecCapability> RtpTransceiverInterface::codec_preferences()
    const {
  return {};
}

std::vector<RtpHeaderExtensionCapability>
RtpTransceiverInterface::HeaderExtensionsToOffer() const {
  return {};
}

}  // namespace webrtc


text:
require 'uri'
require 'cgi'
require 'date'
require 'json'
require 'base64'
require 'erb'
require 'securerandom'
require 'time'
require 'timeliness'
require 'faraday'
require 'faraday-cookie_jar'
require 'concurrent'
require 'ms_rest'
require 'generated/azure_mgmt_event_hub/module_definition'
require 'ms_rest_azure'

module Azure::ARM::EventHub
  autoload :Namespaces,                                         'generated/azure_mgmt_event_hub/namespaces.rb'
  autoload :EventHubs,                                          'generated/azure_mgmt_event_hub/event_hubs.rb'
  autoload :ConsumerGroups,                                     'generated/azure_mgmt_event_hub/consumer_groups.rb'
  autoload :EventHubManagementClient,                           'generated/azure_mgmt_event_hub/event_hub_management_client.rb'

  module Models
    autoload :ResourceListKeys,                                   'generated/azure_mgmt_event_hub/models/resource_list_keys.rb'
    autoload :RegenerateKeysParameters,                           'generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb'
    autoload :NamespaceCreateOrUpdateParameters,                  'generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb'
    autoload :EventHubCreateOrUpdateParameters,                   'generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb'
    autoload :NamespaceListResult,                                'generated/azure_mgmt_event_hub/models/namespace_list_result.rb'
    autoload :EventHubProperties,                                 'generated/azure_mgmt_event_hub/models/event_hub_properties.rb'
    autoload :SharedAccessAuthorizationRuleCreateOrUpdateParameters, 'generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb'
    autoload :SharedAccessAuthorizationRuleListResult,            'generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb'
    autoload :ConsumerGroupListResult,                            'generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb'
    autoload :ConsumerGroupCreateOrUpdateParameters,              'generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb'
    autoload :Sku,                                                'generated/azure_mgmt_event_hub/models/sku.rb'
    autoload :EventHubListResult,                                 'generated/azure_mgmt_event_hub/models/event_hub_list_result.rb'
    autoload :NamespaceResource,                                  'generated/azure_mgmt_event_hub/models/namespace_resource.rb'
    autoload :SharedAccessAuthorizationRuleResource,              'generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb'
    autoload :EventHubResource,                                   'generated/azure_mgmt_event_hub/models/event_hub_resource.rb'
    autoload :ConsumerGroupResource,                              'generated/azure_mgmt_event_hub/models/consumer_group_resource.rb'
    autoload :SkuName,                                            'generated/azure_mgmt_event_hub/models/sku_name.rb'
    autoload :SkuTier,                                            'generated/azure_mgmt_event_hub/models/sku_tier.rb'
    autoload :NamespaceState,                                     'generated/azure_mgmt_event_hub/models/namespace_state.rb'
    autoload :AccessRights,                                       'generated/azure_mgmt_event_hub/models/access_rights.rb'
    autoload :Policykey,                                          'generated/azure_mgmt_event_hub/models/policykey.rb'
    autoload :EntityStatus,                                       'generated/azure_mgmt_event_hub/models/entity_status.rb'
  end
end


text:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>

<link href="doc-style.css" type="text/css" rel="StyleSheet">

Managed Object Types	Data Object Types	All Properties	All Methods

Fault - InvalidBundle

Thrown by

RestoreFirmwareConfiguration

Extends

PlatformConfigFault

Since

VI API 2.5

Fault
                  Description

         An Invalid Bundle fault is thrown if an operation fails because of a
  problem with the supplied bundle.

Properties

	          Name

	          Type

	          Description

None

						Properties inherited from PlatformConfigFault

text

						Properties inherited from HostConfigFault

None

						Properties inherited from VimFault

None

						Properties inherited from MethodFault

dynamicProperty, dynamicType, faultCause, faultMessage

Show WSDL type definition

<textarea cols="20" rows="10" name="wsdl-textarea" wrap="off" readonly="1" id="wsdl-textarea">         <complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vim25="urn:vim25" name="InvalidBundle">
            <complexContent>
               <extension base="vim25:PlatformConfigFault">
                  <sequence>
                  </sequence>
               </extension>
            </complexContent>
         </complexType></textarea>

Top of page

Managed Object Types	Data Object Types	All Properties	All Methods


text:
namespace org.apache.commons.math3.analysis.solvers
{

    using DerivativeStructure = org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
    using UnivariateDifferentiableFunction = org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
    using FastMath = org.apache.commons.math3.util.FastMath;
    using TooManyEvaluationsException = org.apache.commons.math3.exception.TooManyEvaluationsException;

    ///
    /// Implements
    /// Newton's Method for finding zeros of real univariate differentiable
    /// functions.
    ///
    /// @since 3.1
    /// @version $Id: NewtonRaphsonSolver.java 1383441 2012-09-11 14:56:39Z luc $
    ///
    public class NewtonRaphsonSolver : AbstractUnivariateDifferentiableSolver
    {
        ///
        /// Default absolute accuracy.
        private const double DEFAULT_ABSOLUTE_ACCURACY = 1e-6;

        ///
        /// Construct a solver.
        ///
        public NewtonRaphsonSolver() : this(DEFAULT_ABSOLUTE_ACCURACY)
        {
        }
        ///
        /// Construct a solver.
        ///
        /// <param name="absoluteAccuracy"> Absolute accuracy. </param>
        public NewtonRaphsonSolver(double absoluteAccuracy) : base(absoluteAccuracy)
        {
        }

        ///
        /// Find a zero near the midpoint of {@code min} and {@code max}.
        ///
        /// <param name="f"> Function to solve. </param>
        /// <param name="min"> Lower bound for the interval. </param>
        /// <param name="max"> Upper bound for the interval. </param>
        /// <param name="maxEval"> Maximum number of evaluations. </param>
        /// <returns> the value where the function is zero. </returns>
        /// <exception cref="org.apache.commons.math3.exception.TooManyEvaluationsException">
        /// if the maximum evaluation count is exceeded. </exception>
        /// <exception cref="org.apache.commons.math3.exception.NumberIsTooLargeException">
        /// if {@code min >= max}. </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public double solve(int maxEval, final org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction f, final double min, final double max) throws org.apache.commons.math3.exception.TooManyEvaluationsException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
        public override double Solve(int maxEval, UnivariateDifferentiableFunction f, double min, double max)
        {
            return base.Solve(maxEval, f, UnivariateSolverUtils.Midpoint(min, max));
        }

        ///
        /// {@inheritDoc}
        ///
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override protected double doSolve() throws org.apache.commons.math3.exception.TooManyEvaluationsException
        protected internal override double DoSolve()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double startValue = getStartValue();
            double startValue = StartValue;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double absoluteAccuracy = getAbsoluteAccuracy();
            double absoluteAccuracy = AbsoluteAccuracy;

            double x0 = startValue;
            double x1;
            while (true)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.apache.commons.math3.analysis.differentiation.DerivativeStructure y0 = computeObjectiveValueAndDerivative(x0);
                DerivativeStructure y0 = ComputeObjectiveValueAndDerivative(x0);
                x1 = x0 - (y0.Value / y0.getPartialDerivative(1));
                if (FastMath.abs(x1 - x0) <= absoluteAccuracy)
                {
                    return x1;
                }

                x0 = x1;
            }
        }
    }

}


text:
<?php

namespace Loo\Exception;

/**
 * Not allowed.
 */
class NotAllowedException extends \Exception
{
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable

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

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

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

    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!DOCTYPE Test SYSTEM "test.dtd">

<!-- Author: Alexander V. Esin
     Version: $Revision: 1.1 $ -->

<Test ID="ldc0802"
  date-of-creation="2006-05-17"
  timeout="1" >

  <Author value="Alexander V. Esin"/>
  <Description>
      Checks that ldc instruction pushes a reference to
      an instance of java.lang.Class object, which
      represents java.lang.String class, onto the
      operand stack and no errors or exceptions are thrown.

      Covered assertions assert_instr28a082_02

  </Description>

  <Keyword name="JVMS3ed_specific"/>

  <Source name="ldc0802p.j"/>
  <Runner ID="Runtime">
      <Param name="toRun" value="org.apache.harmony.vts.test.vm.jvms.instructions.loadStore.ldc.ldc08.ldc0802.ldc0802p"/>
  </Runner>
</Test>


text:
using System;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace MemoryMappedFilesSample
{
    public class Program
    {
        private ManualResetEventSlim _mapCreated = new ManualResetEventSlim(initialState: false);
        private ManualResetEventSlim _dataWrittenEvent = new ManualResetEventSlim(initialState: false);
        private const string MAPNAME = "SampleMap";
        private static readonly string[] options = { "-f", "-s" };

        public static void Main(string[] args)
        {
            if (args.Length != 1 || !options.Contains(args[0]))
            {
                ShowUsage();
                return;
            }
            var p = new Program();
            if (args[0] == "-f")
            {
                p.Run();
            }
            else if (args[0] == "-s")
            {
                p.RunWithStreams();
            }

            Console.ReadLine();
        }

        private static void ShowUsage()
        {
            Console.WriteLine($"{nameof(MemoryMappedFilesSample)} [-f|-s]");
            Console.WriteLine("Options:");
            Console.WriteLine("-f\tFiles");
            Console.WriteLine("-s\tStreams");
        }

        public void Run()
        {
            Task.Run(() => WriterAsync());
            Task.Run(() => Reader());
            Console.WriteLine("tasks started");
        }

        public void RunWithStreams()
        {
            Task.Run(() => WriterUsingStreamsAsync());
            Task.Run(() => ReaderUsingStreamsAsync());
            Console.WriteLine("tasks started");
        }

        private async Task WriterAsync()
        {
            try
            {
                using (MemoryMappedFile mappedFile = MemoryMappedFile.CreateOrOpen(MAPNAME, 10000, MemoryMappedFileAccess.ReadWrite))
                // MemoryMappedFile mappedFile = MemoryMappedFile.CreateFromFile("./memoryMappedFile", FileMode.Create, MAPNAME, 10000);
                {
                    _mapCreated.Set(); // signal shared memory segment created
                    Console.WriteLine("shared memory segment created");

                    using (MemoryMappedViewAccessor accessor = mappedFile.CreateViewAccessor(0, 10000, MemoryMappedFileAccess.Write))
                    {
                        for (int i = 0, pos = 0; i < 100; i++, pos += 4)
                        {
                            accessor.Write(pos, i);
                            Console.WriteLine($"written {i} at position {pos}");
                            await Task.Delay(10);
                        }
                        _dataWrittenEvent.Set(); // signal all data written
                        Console.WriteLine("data written");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"writer {ex.Message}");
            }
        }

        private async Task WriterUsingStreamsAsync()
        {
            try
            {
                using (MemoryMappedFile mappedFile = MemoryMappedFile.CreateOrOpen(MAPNAME, 10000, MemoryMappedFileAccess.ReadWrite))
                // MemoryMappedFile mappedFile = MemoryMappedFile.CreateFromFile("./memoryMappedFile", FileMode.Create, MAPNAME, 10000);
                {
                    _mapCreated.Set(); // signal shared memory segment created
                    Console.WriteLine("shared memory segment created");

                    MemoryMappedViewStream stream = mappedFile.CreateViewStream(0, 10000, MemoryMappedFileAccess.Write);
                    using (var writer = new StreamWriter(stream))
                    {
                        writer.AutoFlush = true;
                        for (int i = 0; i < 100; i++)
                        {
                            string s = $"some data {i}";
                            Console.WriteLine($"writing {s} at {stream.Position}");
                            await writer.WriteLineAsync(s);
                        }
                    }
                    _dataWrittenEvent.Set(); // signal all data written
                    Console.WriteLine("data written");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"writer {ex.Message}");
            }
        }

        private void Reader()
        {
            try
            {
                Console.WriteLine("reader");
                _mapCreated.Wait();
                Console.WriteLine("reader starting");

                using (MemoryMappedFile mappedFile = MemoryMappedFile.OpenExisting(MAPNAME, MemoryMappedFileRights.Read))
                {
                    using (MemoryMappedViewAccessor accessor = mappedFile.CreateViewAccessor(0, 10000, MemoryMappedFileAccess.Read))
                    {
                        _dataWrittenEvent.Wait();
                        Console.WriteLine("reading can start now");

                        for (int i = 0; i < 400; i += 4)
                        {
                            int result = accessor.ReadInt32(i);
                            Console.WriteLine($"reading {result} from position {i}");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"reader {ex.Message}");
            }
        }

        private async Task ReaderUsingStreamsAsync()
        {
            try
            {
                Console.WriteLine("reader");
                _mapCreated.Wait();
                Console.WriteLine("reader starting");

                using (MemoryMappedFile mappedFile = MemoryMappedFile.OpenExisting(MAPNAME, MemoryMappedFileRights.Read))
                {
                    MemoryMappedViewStream stream = mappedFile.CreateViewStream(0, 10000, MemoryMappedFileAccess.Read);
                    using (var reader = new StreamReader(stream))
                    {
                        _dataWrittenEvent.Wait();
                        Console.WriteLine("reading can start now");

                        for (int i = 0; i < 100; i++)
                        {
                            long pos = stream.Position;
                            string s = await reader.ReadLineAsync();
                            Console.WriteLine($"read {s} from {pos}");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"reader {ex.Message}");
            }
        }
    }
}


text:
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 generiert
// Siehe https://javaee.github.io/jaxb-v2/
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2020.03.13 um 12:48:52 PM CET
//

package net.opengis.ows._1;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java-Klasse für anonymous complex type.
 *
 *
Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="ProviderName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="ProviderSite" type="{http://www.opengis.net/ows/1.1}OnlineResourceType" minOccurs="0"/>
 *         <element name="ServiceContact" type="{http://www.opengis.net/ows/1.1}ResponsiblePartySubsetType"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "providerName",
    "providerSite",
    "serviceContact"
})
@XmlRootElement(name = "ServiceProvider")
public class ServiceProvider {

    @XmlElement(name = "ProviderName", required = true)
    protected String providerName;
    @XmlElement(name = "ProviderSite")
    protected OnlineResourceType providerSite;
    @XmlElement(name = "ServiceContact", required = true)
    protected ResponsiblePartySubsetType serviceContact;

    /**
     * Ruft den Wert der providerName-Eigenschaft ab.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getProviderName() {
        return providerName;
    }

    /**
     * Legt den Wert der providerName-Eigenschaft fest.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setProviderName(String value) {
        this.providerName = value;
    }

    public boolean isSetProviderName() {
        return (this.providerName!= null);
    }

    /**
     * Ruft den Wert der providerSite-Eigenschaft ab.
     *
     * @return
     *     possible object is
     *     {@link OnlineResourceType }
     *
     */
    public OnlineResourceType getProviderSite() {
        return providerSite;
    }

    /**
     * Legt den Wert der providerSite-Eigenschaft fest.
     *
     * @param value
     *     allowed object is
     *     {@link OnlineResourceType }
     *
     */
    public void setProviderSite(OnlineResourceType value) {
        this.providerSite = value;
    }

    public boolean isSetProviderSite() {
        return (this.providerSite!= null);
    }

    /**
     * Ruft den Wert der serviceContact-Eigenschaft ab.
     *
     * @return
     *     possible object is
     *     {@link ResponsiblePartySubsetType }
     *
     */
    public ResponsiblePartySubsetType getServiceContact() {
        return serviceContact;
    }

    /**
     * Legt den Wert der serviceContact-Eigenschaft fest.
     *
     * @param value
     *     allowed object is
     *     {@link ResponsiblePartySubsetType }
     *
     */
    public void setServiceContact(ResponsiblePartySubsetType value) {
        this.serviceContact = value;
    }

    public boolean isSetServiceContact() {
        return (this.serviceContact!= null);
    }

}


text:
package org.apache.cassandra.io.compress;

import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.util.zip.Adler32;
import java.util.zip.Checksum;

import org.apache.cassandra.io.FSReadError;
import org.apache.cassandra.io.FSWriteError;
import org.apache.cassandra.io.sstable.CorruptSSTableException;
import org.apache.cassandra.io.sstable.Descriptor;
import org.apache.cassandra.io.sstable.metadata.MetadataCollector;
import org.apache.cassandra.io.util.DataIntegrityMetadata;
import org.apache.cassandra.io.util.FileMark;
import org.apache.cassandra.io.util.SequentialWriter;

public class CompressedSequentialWriter extends SequentialWriter
{
    private final DataIntegrityMetadata.ChecksumWriter crcMetadata;

    // holds offset in the file where current chunk should be written
    // changed only by flush() method where data buffer gets compressed and stored to the file
    private long chunkOffset = 0;

    // index file writer (random I/O)
    private final CompressionMetadata.Writer metadataWriter;
    private final ICompressor compressor;

    // used to store compressed data
    private final ICompressor.WrappedArray compressed;

    // holds a number of already written chunks
    private int chunkCount = 0;

    private long originalSize = 0, compressedSize = 0;

    private final MetadataCollector sstableMetadataCollector;

    public CompressedSequentialWriter(File file,
                                      String offsetsPath,
                                      boolean skipIOCache,
                                      CompressionParameters parameters,
                                      MetadataCollector sstableMetadataCollector)
    {
        super(file, parameters.chunkLength(), skipIOCache);
        this.compressor = parameters.sstableCompressor;

        // buffer for compression should be the same size as buffer itself
        compressed = new ICompressor.WrappedArray(new byte[compressor.initialCompressedBufferLength(buffer.length)]);

        /* Index File (-CompressionInfo.db component) and it's header */
        metadataWriter = CompressionMetadata.Writer.open(offsetsPath);
        metadataWriter.writeHeader(parameters);

        this.sstableMetadataCollector = sstableMetadataCollector;
        crcMetadata = new DataIntegrityMetadata.ChecksumWriter(out);
    }

    @Override
    public long getOnDiskFilePointer()
    {
        try
        {
            return out.getFilePointer();
        }
        catch (IOException e)
        {
            throw new FSReadError(e, getPath());
        }
    }

    @Override
    public void sync()
    {
        throw new UnsupportedOperationException();
    }

    @Override
    public void flush()
    {
        throw new UnsupportedOperationException();
    }

    @Override
    protected void flushData()
    {
        seekToChunkStart();

        int compressedLength;
        try
        {
            // compressing data with buffer re-use
            compressedLength = compressor.compress(buffer, 0, validBufferBytes, compressed, 0);
        }
        catch (IOException e)
        {
            throw new RuntimeException("Compression exception", e); // shouldn't happen
        }

        originalSize += validBufferBytes;
        compressedSize += compressedLength;

        try
        {
            // write an offset of the newly written chunk to the index file
            metadataWriter.writeLong(chunkOffset);
            chunkCount++;

            assert compressedLength <= compressed.buffer.length;

            // write data itself
            out.write(compressed.buffer, 0, compressedLength);
            // write corresponding checksum
            crcMetadata.append(compressed.buffer, 0, compressedLength);
        }
        catch (IOException e)
        {
            throw new FSWriteError(e, getPath());
        }

        // next chunk should be written right after current + length of the checksum (int)
        chunkOffset += compressedLength + 4;
    }

    @Override
    public FileMark mark()
    {
        return new CompressedFileWriterMark(chunkOffset, current, validBufferBytes, chunkCount + 1);
    }

    @Override
    public synchronized void resetAndTruncate(FileMark mark)
    {
        assert mark instanceof CompressedFileWriterMark;

        CompressedFileWriterMark realMark = (CompressedFileWriterMark) mark;

        // reset position
        current = realMark.uncDataOffset;

        if (realMark.chunkOffset == chunkOffset) // current buffer
        {
            // just reset a buffer offset and return
            validBufferBytes = realMark.bufferOffset;
            return;
        }

        // synchronize current buffer with disk
        // because we don't want any data loss
        syncInternal();

        // setting marker as a current offset
        chunkOffset = realMark.chunkOffset;

        // compressed chunk size (- 4 bytes reserved for checksum)
        int chunkSize = (int) (metadataWriter.chunkOffsetBy(realMark.nextChunkIndex) - chunkOffset - 4);
        if (compressed.buffer.length < chunkSize)
            compressed.buffer = new byte[chunkSize];

        try
        {
            out.seek(chunkOffset);
            out.readFully(compressed.buffer, 0, chunkSize);

            try
            {
                // repopulate buffer
                compressor.uncompress(compressed.buffer, 0, chunkSize, buffer, 0);
            }
            catch (IOException e)
            {
                throw new CorruptBlockException(getPath(), chunkOffset, chunkSize);
            }

            Checksum checksum = new Adler32();
            checksum.update(compressed.buffer, 0, chunkSize);

            if (out.readInt() != (int) checksum.getValue())
                throw new CorruptBlockException(getPath(), chunkOffset, chunkSize);
        }
        catch (CorruptBlockException e)
        {
            throw new CorruptSSTableException(e, getPath());
        }
        catch (EOFException e)
        {
            throw new CorruptSSTableException(new CorruptBlockException(getPath(), chunkOffset, chunkSize), getPath());
        }
        catch (IOException e)
        {
            throw new FSReadError(e, getPath());
        }

        // reset buffer
        validBufferBytes = realMark.bufferOffset;
        bufferOffset = current - validBufferBytes;
        chunkCount = realMark.nextChunkIndex - 1;

        // truncate data and index file
        truncate(chunkOffset);
        metadataWriter.resetAndTruncate(realMark.nextChunkIndex - 1);
    }

    /**
     * Seek to the offset where next compressed data chunk should be stored.
     */
    private void seekToChunkStart()
    {
        if (getOnDiskFilePointer() != chunkOffset)
        {
            try
            {
                out.seek(chunkOffset);
            }
            catch (IOException e)
            {
                throw new FSReadError(e, getPath());
            }
        }
    }

    @Override
    public void close()
    {
        if (buffer == null)
            return; // already closed

        super.close();
        sstableMetadataCollector.addCompressionRatio(compressedSize, originalSize);
        metadataWriter.finalizeHeader(current, chunkCount);
        try
        {
            metadataWriter.close();
        }
        catch (IOException e)
        {
            throw new FSWriteError(e, getPath());
        }
    }

    @Override
    public void writeFullChecksum(Descriptor descriptor)
    {
        crcMetadata.writeFullChecksum(descriptor);
    }

    /**
     * Class to hold a mark to the position of the file
     */
    protected static class CompressedFileWriterMark implements FileMark
    {
        // chunk offset in the compressed file
        final long chunkOffset;
        // uncompressed data offset (real data offset)
        final long uncDataOffset;

        final int bufferOffset;
        final int nextChunkIndex;

        public CompressedFileWriterMark(long chunkOffset, long uncDataOffset, int bufferOffset, int nextChunkIndex)
        {
            this.chunkOffset = chunkOffset;
            this.uncDataOffset = uncDataOffset;
            this.bufferOffset = bufferOffset;
            this.nextChunkIndex = nextChunkIndex;
        }
    }
}


text:
layout: post
title: Webgl Rain Effects
date: 2017-07-07
categories: THREE.JS
---