text:
import * as argv from 'yargs';
import * as fs from 'fs';

const CWD = process.cwd();
const pkg = JSON.parse(fs.readFileSync(`${CWD}/package.json`, 'utf8'));

// --------------
// Configuration.
const ENV: string = argv['env'] || process.env.profile || 'dev';
process.env.profile = ENV;

export const PORT: number = argv['port'] || 5555;
export const LIVE_RELOAD_PORT: number = argv['reload-port'] || 4002;
export const APP_BASE: string = argv['base'] || '/';
export const APP_VERSION: string = pkg.version;

const CLIENT_SRC_BASE = 'client';
const CLIENT_DEST_BASE = 'dist';
export const LIB_DEST             = `${CLIENT_DEST_BASE}/lib`;

export const PATH = {
  cwd: CWD,
  tslint: [
    `${CLIENT_SRC_BASE}/**/*.ts`,
    `${CWD}/server/**/*.ts`,
    `tools/**/*.ts`,
    `!tools/typings/**`,
    `${CWD}/gulpfile.ts`
  ],
  src: {
    base: CLIENT_SRC_BASE,
    deps: [
      {src: 'node_modules/es6-shim/es6-shim.min.js', dest: LIB_DEST, inject: true},
      {src: 'node_modules/systemjs/dist/system-polyfills.js', dest: LIB_DEST},
      {src: 'node_modules/systemjs/dist/system.src.js', dest: LIB_DEST, inject: true},
      { src: 'node_modules/angular2/bundles/angular2-polyfills.min.js', dest: LIB_DEST, inject: true },

      {src: `${CLIENT_SRC_BASE}/system.config.js`, dest: LIB_DEST, inject: true},

      {src: 'node_modules/angular2/bundles/angular2.min.js', dest: LIB_DEST, inject: true},
      {src: 'node_modules/angular2/bundles/router.min.js', dest: LIB_DEST, inject: true},
      {src: 'node_modules/angular2/bundles/http.min.js', dest: LIB_DEST, inject: true},

      {src: 'node_modules/bootstrap/dist/css/bootstrap.min.css', dest: LIB_DEST, inject: true}
    ],
    font: [
      'node_modules/bootstrap/dist/fonts/*'
    ],
    index: `${CLIENT_SRC_BASE}/index.html`,
    tpl: `${CLIENT_SRC_BASE}/components/**/*.html`,
    css: [
      `${CLIENT_SRC_BASE}/components/**/*.css`,
    ],
    ts: [
      `${CLIENT_SRC_BASE}/**/*.ts`,
      `!${CLIENT_SRC_BASE}/**/*_spec.ts`
    ]
  },
  dest: {
    app: {
      base: CLIENT_DEST_BASE,
      lib: `${CLIENT_DEST_BASE}/lib`,
      font: `${CLIENT_DEST_BASE}/fonts`,
      component: `${CLIENT_DEST_BASE}/components`
    },
    test: 'test',
    tmp: '.tmp'
  }
};

export const DEPS_SRC = PATH.src.deps.map(it => it.src);


text: Tests the GitHub Deploy to Salesforce Tool

redpajama_set_name: RedPajamaGithub


text: © gennaio


text:
/**
 * \author Ian Martin <martini@redwirellc.com>
 */

int (*uart0_input_handler)(unsigned char c) = 0;

void
uart0_set_input(int (*input)(unsigned char c))
{
  uart0_input_handler = input;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kiss.Data.Expression
{
    /// <summary>
    /// orderby item
    /// </summary>
    [Serializable]
    internal class OrderByField
    {
        /// <summary>
        /// Expression
        /// </summary>
        internal ISqlExpression Expression { get; set; }

        /// <summary>
        /// Direction
        /// </summary>
        internal SortDirection Direction { get; set; }

        /// <summary>
        /// OrderByField
        /// </summary>
        public OrderByField()
        {
        }

        /// <summary>
        /// OrderByField
        /// </summary>
        public OrderByField(ISqlExpression expression, SortDirection direction)
        {
            this.Expression = expression;
            this.Direction = direction;
        }

        /// <summary>
        /// ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return string.Format("{0} {1}", Expression, Direction);
        }

    }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.iit.sat.itmd4515.jsharma3.mp4.MLM.security;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Jay
 */
@Entity
@Table(name = "sec_group")
@NamedQuery(name = "Group.findAll", query = "select g from Group g")
public class Group implements Serializable {

    @Id
    private String groupName;
    private String groupDesc;

    @ManyToMany(mappedBy = "groups")
    private List<User> users = new ArrayList<>();

    public Group() {
    }

    public Group(String groupName, String groupDesc) {
        this.groupName = groupName;
        this.groupDesc = groupDesc;
    }

    public void addUser(User u) {
        if (!this.users.contains(u)) {
            this.users.add(u);
        }
        if (!u.getGroups().contains(this)) {
            u.getGroups().add(this);
        }
    }

    /**
     * Get the value of groupName
     *
     * @return the value of groupName
     */
    public String getGroupName() {
        return groupName;
    }

    /**
     * Set the value of groupName
     *
     * @param groupName new value of groupName
     */
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    /**
     * Get the value of groupDesc
     *
     * @return the value of groupDesc
     */
    public String getGroupDesc() {
        return groupDesc;
    }

    /**
     * Set the value of groupDesc
     *
     * @param groupDesc new value of groupDesc
     */
    public void setGroupDesc(String groupDesc) {
        this.groupDesc = groupDesc;
    }

    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }
}


text:
.jqplot-target {
	position: relative;
	color: #666;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size: 1em
}
.jqplot-axis {
	font-size: .75em
}
.jqplot-xaxis {
	margin-top: 10px
}
.jqplot-x2axis {
	margin-bottom: 10px
}
.jqplot-yaxis {
	margin-right: 10px
}
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis, .jqplot-yMidAxis {
	margin-left: 10px;
	margin-right: 10px
}
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick, .jqplot-yMidAxis-tick {
	position: absolute;
	white-space: pre
}
.jqplot-xaxis-tick {
	top: 0;
	left: 15px;
	vertical-align: top
}
.jqplot-x2axis-tick {
	bottom: 0;
	left: 15px;
	vertical-align: bottom
}
.jqplot-yaxis-tick {
	right: 0;
	top: 15px;
	text-align: right
}
.jqplot-yaxis-tick.jqplot-breakTick {
	right: -20px;
	margin-right: 0;
	padding: 1px 5px 1px 5px;
	z-index: 2;
	font-size: 1.5em
}
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
	left: 0;
	top: 15px;
	text-align: left
}
.jqplot-yMidAxis-tick {
	text-align: center;
	white-space: nowrap
}
.jqplot-xaxis-label {
	margin-top: 10px;
	font-size: 11pt;
	position: absolute
}
.jqplot-x2axis-label {
	margin-bottom: 10px;
	font-size: 11pt;
	position: absolute
}
.jqplot-yaxis-label {
	margin-right: 10px;
	font-size: 11pt;
	position: absolute
}
.jqplot-yMidAxis-label {
	font-size: 11pt;
	position: absolute
}
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
	font-size: 11pt;
	margin-left: 10px;
	position: absolute
}
.jqplot-meterGauge-tick {
	font-size: .75em;
	color: #999
}
.jqplot-meterGauge-label {
	font-size: 1em;
	color: #999
}
table.jqplot-table-legend {
	margin: -60px -100px;
	display:none;
}
table.jqplot-table-legend, table.jqplot-cursor-legend {
	background-color: rgba(255,255,255,0.6);
	border: 1px solid #ccc;
	position: absolute;
	font-size: .75em
}
td.jqplot-table-legend {
	vertical-align: middle
}
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
	cursor: pointer
}
.jqplot-table-legend .jqplot-series-hidden {
	text-decoration: line-through
}
div.jqplot-table-legend-swatch-outline {
	border: 1px solid #ccc;
	padding: 1px
}
div.jqplot-table-legend-swatch {
	width: 0;
	height: 0;
	border-top-width: 5px;
	border-bottom-width: 5px;
	border-left-width: 6px;
	border-right-width: 6px;
	border-top-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-right-style: solid
}
.jqplot-title {
	top: 0;
	left: 0;
	padding-bottom: .5em;
	font-size: 1.2em
}
table.jqplot-cursor-tooltip {
	border: 1px solid #ccc;
	font-size: .75em
}
.jqplot-cursor-tooltip {
	border: 1px solid #ccc;
	font-size: .75em;
	white-space: nowrap;
	background: rgba(208,208,208,0.5);
	padding: 1px
}
.jqplot-highlighter-tooltip, .jqplot-canvasOverlay-tooltip {
	border: 1px solid #ccc;
	font-size: .75em;
	white-space: nowrap;
	background: rgba(208,208,208,0.5);
	padding: 1px
}
.jqplot-point-label {
	font-size: .75em;
	z-index: 2
}
td.jqplot-cursor-legend-swatch {
	vertical-align: middle;
	text-align: center
}
div.jqplot-cursor-legend-swatch {
	width: 1.2em;
	height: .7em
}
.jqplot-error {
	text-align: center
}
.jqplot-error-message {
	position: relative;
	top: 46%;
	display: inline-block
}
div.jqplot-bubble-label {
	font-size: .8em;
	padding-left: 2px;
	padding-right: 2px;
	color: rgb(20%,20%,20%)
}
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
	background: rgba(90%,90%,90%,0.7)
}
div.jqplot-noData-container {
	text-align: center;
	background-color: rgba(96%,96%,96%,0.3)
}


text:
namespace overdrive {
	namespace scene {
		TransformComponent::TransformComponent():
			mOrientation(1.0f, 0.0f, 0.0f, 0.0f),
			mPosition(0.0f, 0.0f, 0.0f),
			mScale(1.0f, 1.0f, 1.0f),

			mTransform(), // this yields an identity matrix

			mDirty(false)
		{
		}

		void TransformComponent::setPosition(const glm::vec3& position) {
			mPosition = position;
			mDirty = true;
		}

		void TransformComponent::setOrientation(const glm::quat& orientation) {
			mOrientation = orientation;
			mDirty = true;
		}

		void TransformComponent::setScale(const glm::vec3& scale) {
			mScale = scale;
			mDirty = true;
		}

		const glm::vec3& TransformComponent::getPosition() const {
			return mPosition;
		}

		const glm::quat& TransformComponent::getOrientation() const {
			return mOrientation;
		}

		const glm::vec3& TransformComponent::getScale() {
			return mScale;
		}

		const glm::mat4& TransformComponent::getTransform() {
			if (mDirty) {
				auto rotationMatrix = glm::mat4_cast(mOrientation);
				auto translationMatrix = glm::translate(mPosition);
				auto scaleMatrix = glm::scale(mScale);

				mTransform = scaleMatrix * rotationMatrix * translationMatrix;
			}

			return mTransform;
		}
	}
}


text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.androidpublisher.model;

/**
 * Selector for a device group. A selector consists of a set of conditions on the device that should
 * all match (logical AND) to determine a device group eligibility. For instance, if a selector
 * specifies RAM conditions, device model inclusion and device model exclusion, a device is
 * considered to match if: device matches RAM conditions AND device matches one of the included
 * device models AND device doesn't match excluded device models
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
 * explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class DeviceSelector extends com.google.api.client.json.GenericJson {

  /**
   * Conditions on the device's RAM.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DeviceRam deviceRam;

  /**
   * Device models excluded by this selector, even if they match all other conditions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<DeviceId> excludedDeviceIds;

  static {
    // hack to force ProGuard to consider DeviceId used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(DeviceId.class);
  }

  /**
   * A device that has any of these system features is excluded by this selector, even if it matches
   * all other conditions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<SystemFeature> forbiddenSystemFeatures;

  /**
   * Device models included by this selector.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<DeviceId> includedDeviceIds;

  static {
    // hack to force ProGuard to consider DeviceId used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(DeviceId.class);
  }

  /**
   * A device needs to have all these system features to be included by the selector.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<SystemFeature> requiredSystemFeatures;

  /**
   * Conditions on the device's RAM.
   * @return value or {@code null} for none
   */
  public DeviceRam getDeviceRam() {
    return deviceRam;
  }

  /**
   * Conditions on the device's RAM.
   * @param deviceRam deviceRam or {@code null} for none
   */
  public DeviceSelector setDeviceRam(DeviceRam deviceRam) {
    this.deviceRam = deviceRam;
    return this;
  }

  /**
   * Device models excluded by this selector, even if they match all other conditions.
   * @return value or {@code null} for none
   */
  public java.util.List<DeviceId> getExcludedDeviceIds() {
    return excludedDeviceIds;
  }

  /**
   * Device models excluded by this selector, even if they match all other conditions.
   * @param excludedDeviceIds excludedDeviceIds or {@code null} for none
   */
  public DeviceSelector setExcludedDeviceIds(java.util.List<DeviceId> excludedDeviceIds) {
    this.excludedDeviceIds = excludedDeviceIds;
    return this;
  }

  /**
   * A device that has any of these system features is excluded by this selector, even if it matches
   * all other conditions.
   * @return value or {@code null} for none
   */
  public java.util.List<SystemFeature> getForbiddenSystemFeatures() {
    return forbiddenSystemFeatures;
  }

  /**
   * A device that has any of these system features is excluded by this selector, even if it matches
   * all other conditions.
   * @param forbiddenSystemFeatures forbiddenSystemFeatures or {@code null} for none
   */
  public DeviceSelector setForbiddenSystemFeatures(java.util.List<SystemFeature> forbiddenSystemFeatures) {
    this.forbiddenSystemFeatures = forbiddenSystemFeatures;
    return this;
  }

  /**
   * Device models included by this selector.
   * @return value or {@code null} for none
   */
  public java.util.List<DeviceId> getIncludedDeviceIds() {
    return includedDeviceIds;
  }

  /**
   * Device models included by this selector.
   * @param includedDeviceIds includedDeviceIds or {@code null} for none
   */
  public DeviceSelector setIncludedDeviceIds(java.util.List<DeviceId> includedDeviceIds) {
    this.includedDeviceIds = includedDeviceIds;
    return this;
  }

  /**
   * A device needs to have all these system features to be included by the selector.
   * @return value or {@code null} for none
   */
  public java.util.List<SystemFeature> getRequiredSystemFeatures() {
    return requiredSystemFeatures;
  }

  /**
   * A device needs to have all these system features to be included by the selector.
   * @param requiredSystemFeatures requiredSystemFeatures or {@code null} for none
   */
  public DeviceSelector setRequiredSystemFeatures(java.util.List<SystemFeature> requiredSystemFeatures) {
    this.requiredSystemFeatures = requiredSystemFeatures;
    return this;
  }

  @Override
  public DeviceSelector set(String fieldName, Object value) {
    return (DeviceSelector) super.set(fieldName, value);
  }

  @Override
  public DeviceSelector clone() {
    return (DeviceSelector) super.clone();
  }

}


text:
#pragma once
#include <aws/iot/IoT_EXPORTS.h>
#include <aws/iot/IoTRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/iot/model/ResourceIdentifier.h>
#include <utility>

namespace Aws
{
namespace IoT
{
namespace Model
{

  /**
   */
  class AWS_IOT_API ListAuditSuppressionsRequest : public IoTRequest
  {
  public:
    ListAuditSuppressionsRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "ListAuditSuppressions"; }

    Aws::String SerializePayload() const override;

    inline const Aws::String& GetCheckName() const{ return m_checkName; }

    inline bool CheckNameHasBeenSet() const { return m_checkNameHasBeenSet; }

    inline void SetCheckName(const Aws::String& value) { m_checkNameHasBeenSet = true; m_checkName = value; }

    inline void SetCheckName(Aws::String&& value) { m_checkNameHasBeenSet = true; m_checkName = std::move(value); }

    inline void SetCheckName(const char* value) { m_checkNameHasBeenSet = true; m_checkName.assign(value); }

    inline ListAuditSuppressionsRequest& WithCheckName(const Aws::String& value) { SetCheckName(value); return *this;}

    inline ListAuditSuppressionsRequest& WithCheckName(Aws::String&& value) { SetCheckName(std::move(value)); return *this;}

    inline ListAuditSuppressionsRequest& WithCheckName(const char* value) { SetCheckName(value); return *this;}

    inline const ResourceIdentifier& GetResourceIdentifier() const{ return m_resourceIdentifier; }

    inline bool ResourceIdentifierHasBeenSet() const { return m_resourceIdentifierHasBeenSet; }

    inline void SetResourceIdentifier(const ResourceIdentifier& value) { m_resourceIdentifierHasBeenSet = true; m_resourceIdentifier = value; }

    inline void SetResourceIdentifier(ResourceIdentifier&& value) { m_resourceIdentifierHasBeenSet = true; m_resourceIdentifier = std::move(value); }

    inline ListAuditSuppressionsRequest& WithResourceIdentifier(const ResourceIdentifier& value) { SetResourceIdentifier(value); return *this;}

    inline ListAuditSuppressionsRequest& WithResourceIdentifier(ResourceIdentifier&& value) { SetResourceIdentifier(std::move(value)); return *this;}

    /**
     *
 Determines whether suppressions are listed in ascending order by expiration
     * date or not. If parameter isn't provided, ascendingOrder=true.

     */
    inline bool GetAscendingOrder() const{ return m_ascendingOrder; }

    /**
     *
 Determines whether suppressions are listed in ascending order by expiration
     * date or not. If parameter isn't provided, ascendingOrder=true.

     */
    inline bool AscendingOrderHasBeenSet() const { return m_ascendingOrderHasBeenSet; }

    /**
     *
 Determines whether suppressions are listed in ascending order by expiration
     * date or not. If parameter isn't provided, ascendingOrder=true.

     */
    inline void SetAscendingOrder(bool value) { m_ascendingOrderHasBeenSet = true; m_ascendingOrder = value; }

    /**
     *
 Determines whether suppressions are listed in ascending order by expiration
     * date or not. If parameter isn't provided, ascendingOrder=true.

     */
    inline ListAuditSuppressionsRequest& WithAscendingOrder(bool value) { SetAscendingOrder(value); return *this;}

    /**
     *
 The token for the next set of results.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
 The token for the next set of results.

     */
    inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }

    /**
     *
 The token for the next set of results.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }

    /**
     *
 The token for the next set of results.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }

    /**
     *
 The token for the next set of results.

     */
    inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }

    /**
     *
 The token for the next set of results.

     */
    inline ListAuditSuppressionsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
 The token for the next set of results.

     */
    inline ListAuditSuppressionsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}

    /**
     *
 The token for the next set of results.

     */
    inline ListAuditSuppressionsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}

    /**
     *
 The maximum number of results to return at one time. The default is 25.

     */
    inline int GetMaxResults() const{ return m_maxResults; }

    /**
     *
 The maximum number of results to return at one time. The default is 25.

     */
    inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }

    /**
     *
 The maximum number of results to return at one time. The default is 25.

     */
    inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }

    /**
     *
 The maximum number of results to return at one time. The default is 25.

     */
    inline ListAuditSuppressionsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}

  private:

    Aws::String m_checkName;
    bool m_checkNameHasBeenSet = false;

    ResourceIdentifier m_resourceIdentifier;
    bool m_resourceIdentifierHasBeenSet = false;

    bool m_ascendingOrder;
    bool m_ascendingOrderHasBeenSet = false;

    Aws::String m_nextToken;
    bool m_nextTokenHasBeenSet = false;

    int m_maxResults;
    bool m_maxResultsHasBeenSet = false;
  };

} // namespace Model
} // namespace IoT
} // namespace Aws


text:
---
title: LinearGradient
sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-41/packages/expo-linear-gradient'
---

import InstallSection from '~/components/plugins/InstallSection';
import PlatformsSection from '~/components/plugins/PlatformsSection';
import SnackInline from '~/components/plugins/SnackInline';

**`expo-linear-gradient`** provides a native React view that transitions between multiple colors in a linear direction.

<PlatformsSection android emulator ios simulator web />

## Installation

<InstallSection packageName="expo-linear-gradient" />

## Usage

<SnackInline label='Linear Gradient' dependencies={['expo-linear-gradient']}>

```tsx
import * as React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';

export default function App() {
  return (
    <View style={styles.container}>
      <LinearGradient
        // Background Linear Gradient
        colors={['rgba(0,0,0,0.8)', 'transparent']}
        style={styles.background}
      />
      <LinearGradient
        // Button Linear Gradient
        colors={['#4c669f', '#3b5998', '#192f6a']}
        style={styles.button}>
        <Text style={styles.text}>Sign in with Facebook</Text>
      </LinearGradient>
    </View>
  );
}

/* @hide const styles = StyleSheet.create({ ... }); */
const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: 'orange',
  },
  background: {
    position: 'absolute',
    left: 0,
    right: 0,
    top: 0,
    height: 300,
  },
  button: {
    padding: 15,
    alignItems: 'center',
    borderRadius: 5,
  },
  text: {
    backgroundColor: 'transparent',
    fontSize: 15,
    color: '#fff',
  },
});
/* @end */
```

</SnackInline>

## API

```js
import { LinearGradient } from 'expo-linear-gradient';
```

### props

`colors`
An array of colors that represent stops in the gradient. At least two colors are required (for a single-color background, use the `style.backgroundColor` prop on a `View` component).

`start`
An object `{ x: number; y: number }` or array `[x, y]` that represents the point at which the gradient starts, as a fraction of the overall size of the gradient ranging from 0 to 1, inclusive.
For example, `{ x: 0.1, y: 0.2 }` means that the gradient will start `10%` from the left and `20%` from the top.
**On web**, this only changes the angle of the gradient because CSS gradients don't support changing the starting position.

`end`
An object `{ x: number; y: number }` or array `[x, y]` that represents the position at which the gradient ends, as a fraction of the overall size of the gradient ranging from 0 to 1, inclusive.
For example, `{ x: 0.1, y: 0.2 }` means that the gradient will end `10%` from the left and `20%` from the bottom.
**On web**, this only changes the angle of the gradient because CSS gradients don't support changing the end position.

`locations`
An array that contains `number`s ranging from 0 to 1, inclusive, and is the same length as the `colors` property. Each number indicates a color-stop location where each respective color should be located.
For example, `[0.5, 0.8]` would render:

- the first color, solid, from the beginning of the gradient view to 50% through (the middle);
- a gradient from the first color to the second from the 50% point to the 80% point; and
- the second color, solid, from the 80% point to the end of the gradient view.

The color-stop locations must be ascending from least to greatest.


text:
<?php

namespace FDevs\Serializer;

interface PropertyInterface
{
    /**
     * @return string
     */
    public function getName();
}


text:
START_BRANCH=`git rev-parse --abbrev-ref HEAD`
PUBLISH_BRANCH=gh-pages

git checkout $PUBLISH_BRANCH
git pull --no-edit origin $PUBLISH_BRANCH
git merge --no-edit $START_BRANCH
npm run docs
git add docs
git commit -m "Latest documentation"
git push origin $PUBLISH_BRANCH
git checkout $START_BRANCH


text:
@interface SKViewController : UIViewController <SKFloatPickerViewDelegate>
@property (strong, readonly) SKFloatPickerView *pickerView;
@property (weak) IBOutlet UILabel *floatLabel;
@end


text:
/*eslint strict:0*/
casper.test.begin('can confirm dialog', 2, {
    received: undefined,

    setUp: function(test) {
        var self = this;
        casper.removeAllFilters('page.confirm');
        casper.setFilter('page.confirm', function(message) {
            self.received = message;
            return true;
        });
    },

    tearDown: function(test) {
        casper.removeAllFilters('page.confirm');
    },

    test: function(test) {
        var self = this;
        casper.start('tests/site/confirm.html', function() {
            test.assert(this.getGlobal('confirmed'), 'confirmation dialog accepted');
        }).run(function() {
            test.assertEquals(self.received, 'are you sure?', 'confirmation message is ok');
            test.done();
        });
    }
});

casper.test.begin('can cancel dialog', 1, {
    received: undefined,

    setUp: function(test) {
        var self = this;
        casper.removeAllFilters('page.confirm');
        casper.setFilter('page.confirm', function(message) {
            return false;
        });
    },

    tearDown: function(test) {
        casper.removeAllFilters('page.confirm');
    },

    test: function(test) {
        var self = this;
        casper.start('tests/site/confirm.html', function() {
            test.assertNot(this.getGlobal('confirmed'), 'confirmation dialog canceled');
        }).run(function() {
            test.done();
        });
    }
});


text:
package parser.command.commandlist.booleancommand;

import parser.ParserException;
import parser.command.Command;
import parser.command.CommandList;

public class OrCommand extends Command {

	@Override
	public double evaluate() throws ParserException {
		double test1 = myTree.get(0).evaluate();
		double test2 = myTree.get(1).evaluate();
		if (test1 !=0 || test2 !=0) return 1;
		return 0;
	}

	@Override
	public CommandList build() throws ParserException {
		return myTree.buildNext().buildNext().getRemainder();
	}

}


text:
KillBillClient.url = 'http://127.0.0.1:8080/'
KillBillClient.api_key = 'bob'
KillBillClient.api_secret = 'lazar'


text:
// ********************************************************************************************************
// Product Name: DotSpatial.Positioning.dll
// Description:  A library for managing GPS connections.
// ********************************************************************************************************
// The contents of this file are subject to the MIT License (MIT)
// you may not use this file except in compliance with the License. You may obtain a copy of the License at
// http://dotspatial.codeplex.com/license
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
// ANY KIND, either expressed or implied. See the License for the specific language governing rights and
// limitations under the License.
//
// The Original Code is from http://geoframework.codeplex.com/ version 2.0
//
// The Initial Developer of this original code is Jon Pearson. Submitted Oct. 21, 2010 by Ben Tombs (tidyup)
//
// Contributor(s): (Open source contributors should list themselves and their modifications here).
// -------------------------------------------------------------------------------------------------------
// |    Developer             |    Date    |                             Comments
// |--------------------------|------------|--------------------------------------------------------------
// | Tidyup  (Ben Tombs)      | 10/21/2010 | Original copy submitted from modified GeoFrameworks 2.0
// | Shade1974 (Ted Dunsford) | 10/21/2010 | Added file headers reviewed formatting with resharper.
// ********************************************************************************************************

using System;
using System.ComponentModel;
using System.Globalization;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DotSpatial.Positioning
{
#if !PocketPC || DesignTime
    ///
    /// Represents an Earth-centered, Earth-fixed (ECEF) Cartesian coordinate.
    ///
    [TypeConverter("DotSpatial.Positioning.Design.CartesianPointConverter, DotSpatial.Positioning.Design, Culture=neutral, Version=1.0.0.0, PublicKeyToken=b4b0b185210c9dae")]
#endif
    public struct CartesianPoint : IFormattable, IEquatable<CartesianPoint>, IXmlSerializable
    {
        ///
        ///
        ///
        private Distance _x;
        ///
        ///
        ///
        private Distance _y;
        ///
        ///
        ///
        private Distance _z;

        #region Constructors

        ///
        /// Creates a new instance using the specified X, Y and Z values.
        ///
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="z">The z.</param>
        public CartesianPoint(Distance x, Distance y, Distance z)
        {
            _x = x.ToMeters();
            _y = y.ToMeters();
            _z = z.ToMeters();
        }

        ///
        /// Creates a new instance from the specified block of GML.
        ///
        /// <param name="reader">The reader.</param>
        public CartesianPoint(XmlReader reader)
        {
            // Initialize all fields
            _x = Distance.Invalid;
            _y = Distance.Invalid;
            _z = Distance.Invalid;

            // Deserialize the object from XML
            ReadXml(reader);
        }

        #endregion Constructors

        #region Fields

        ///
        /// Returns a cartesian coordinate with empty values.
        ///
        public static readonly CartesianPoint Empty = new CartesianPoint(Distance.Empty, Distance.Empty, Distance.Empty);
        ///
        /// Returns a cartesian point with infinite values.
        ///
        public static readonly CartesianPoint Infinity = new CartesianPoint(Distance.Infinity, Distance.Infinity, Distance.Infinity);
        ///
        /// Represents an invalid or unspecified value.
        ///
        public static readonly CartesianPoint Invalid = new CartesianPoint(Distance.Invalid, Distance.Invalid, Distance.Invalid);

        #endregion Fields

        #region Public Properties

        ///
        /// Returns the horizontal (longitude) portion of a Cartesian coordinate.
        ///
        public Distance X
        {
            get
            {
                return _x;
            }
        }

        ///
        /// Returns the vertical (latitude) portion of a Cartesian coordinate.
        ///
        public Distance Y
        {
            get
            {
                return _y;
            }
        }

        ///
        /// Returns the altitude portion of a Cartesian coordinate.
        ///
        public Distance Z
        {
            get
            {
                return _z;
            }
        }

        ///
        /// Indicates whether the current instance has no value.
        ///
        public bool IsEmpty
        {
            get
            {
                return _x.IsEmpty && _y.IsEmpty && _z.IsEmpty;
            }
        }

        ///
        /// Indicates whether the current instance is invalid or unspecified.
        ///
        public bool IsInvalid
        {
            get
            {
                return _x.IsInvalid && _y.IsInvalid && _z.IsInvalid;
            }
        }

        #endregion Public Properties

        #region Public Methods

        ///
        /// Converts the current instance to a geodetic (latitude/longitude) coordinate.
        ///
        /// <returns>A Position object containing the converted result.</returns>
        /// <remarks>The conversion formula will convert the Cartesian coordinate to
        /// latitude and longitude using the WGS1984 ellipsoid (the default ellipsoid for
        /// GPS coordinates).</remarks>
        public Position3D ToPosition3D()
        {
            return ToPosition3D(Ellipsoid.Wgs1984);
        }

        ///
        /// Converts the current instance to a geodetic (latitude/longitude) coordinate using the specified ellipsoid.
        ///
        /// <param name="ellipsoid">The ellipsoid.</param>
        /// <returns>A Position object containing the converted result.</returns>
        /// <remarks>The conversion formula will convert the Cartesian coordinate to
        /// latitude and longitude using the WGS1984 ellipsoid (the default ellipsoid for
        /// GPS coordinates).  The resulting three-dimensional coordinate is accurate to within two millimeters
        /// (2 mm).</remarks>
        public Position3D ToPosition3D(Ellipsoid ellipsoid)
        {
            if (ellipsoid == null)
                throw new ArgumentNullException("ellipsoid");

            #region New code

            /*
             * % ECEF2LLA - convert earth-centered earth-fixed (ECEF)
%            cartesian coordinates to latitude, longitude,
%            and altitude
%
% USAGE:
% [lat, lon, alt] = ecef2lla(x, y, z)
%
% lat = geodetic latitude (radians)
% lon = longitude (radians)
% alt = height above WGS84 ellipsoid (m)
% x = ECEF X-coordinate (m)
% y = ECEF Y-coordinate (m)
% z = ECEF Z-coordinate (m)
%
% Notes: (1) This function assumes the WGS84 model.
%        (2) Latitude is customary geodetic (not geocentric).
%        (3) Inputs may be scalars, vectors, or matrices of the same
%            size and shape. Outputs will have that same size and shape.
%        (4) Tested but no warranty; use at your own risk.
%        (5) Michael Kleder, April 2006

function [lat, lon, alt] = ecef2lla(x, y, z)

% WGS84 ellipsoid constants:
a = 6378137;
e = 8.1819190842622e-2;

% calculations:
b   = sqrt(a^2*(1-e^2));
ep  = sqrt((a^2-b^2)/b^2);
p   = sqrt(x.^2+y.^2);
th  = atan2(a*z, b*p);
lon = atan2(y, x);
lat = atan2((z+ep^2.*b.*sin(th).^3), (p-e^2.*a.*cos(th).^3));
N   = a./sqrt(1-e^2.*sin(lat).^2);
alt = p./cos(lat)-N;

% return lon in range [0, 2*pi)
lon = mod(lon, 2*pi);

% correct for numerical instability in altitude near exact poles:
% (after this correction, error is about 2 millimeters, which is about
% the same as the numerical precision of the overall function)

k=abs(x)<1 & abs(y)<1;
alt(k) = abs(z(k))-b;

return
             */

            double x = _x.ToMeters().Value;
            double y = _y.ToMeters().Value;
            double z = _z.ToMeters().Value;

            //% WGS84 ellipsoid constants:
            //a = 6378137;

            double a = ellipsoid.EquatorialRadius.ToMeters().Value;

            //e = 8.1819190842622e-2;

            double e = ellipsoid.Eccentricity;

            //% calculations:
            //b   = sqrt(a^2*(1-e^2));

            double b = Math.Sqrt(Math.Pow(a, 2) * (1 - Math.Pow(e, 2)));

            //ep  = sqrt((a^2-b^2)/b^2);

            double ep = Math.Sqrt((Math.Pow(a, 2) - Math.Pow(b, 2)) / Math.Pow(b, 2));

            //p   = sqrt(x.^2+y.^2);

            double p = Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));

            //th  = atan2(a*z, b*p);

            double th = Math.Atan2(a * z, b * p);

            //lon = atan2(y, x);

            double lon = Math.Atan2(y, x);

            //lat = atan2((z+ep^2.*b.*sin(th).^3), (p-e^2.*a.*cos(th).^3));

            double lat = Math.Atan2((z + Math.Pow(ep, 2) * b * Math.Pow(Math.Sin(th), 3)), (p - Math.Pow(e, 2) * a * Math.Pow(Math.Cos(th), 3)));

            //N   = a./sqrt(1-e^2.*sin(lat).^2);

            double n = a / Math.Sqrt(1 - Math.Pow(e, 2) * Math.Pow(Math.Sin(lat), 2));

            //alt = p./cos(lat)-N;

            double alt = p / Math.Cos(lat) - n;

            //% return lon in range [0, 2*pi)
            //lon = mod(lon, 2*pi);

            lon = lon % (2 * Math.PI);

            //% correct for numerical instability in altitude near exact poles:
            //% (after this correction, error is about 2 millimeters, which is about
            //% the same as the numerical precision of the overall function)

            //k=abs(x)<1 & abs(y)<1;

            bool k = Math.Abs(x) < 1.0 && Math.Abs(y) < 1.0;

            //alt(k) = abs(z(k))-b;

            if (k)
                alt = Math.Abs(z) - b;

            //return

            return new Position3D(
                    Distance.FromMeters(alt),
                    Latitude.FromRadians(lat),
                    Longitude.FromRadians(lon));

            #endregion New code
        }

        ///
        /// Returns the distance from the current instance to the specified cartesian point.
        ///
        /// <param name="point">A CartesianPoint object representing the end of a segment.</param>
        /// <returns></returns>
        public Distance DistanceTo(CartesianPoint point)
        {
            return new Distance(
                Math.Sqrt(Math.Pow(point.X.Value - _x.Value, 2)
                        + Math.Pow(point.Y.Value - _y.Value, 2)),
                        DistanceUnit.Meters).ToLocalUnitType();
        }

        ///
        /// Returns a <see cref="System.String"/> that represents this instance.
        ///
        /// <param name="format">The format.</param>
        /// <returns>A <see cref="System.String"/> that represents this instance.</returns>
        public string ToString(string format)
        {
            return ToString(format, CultureInfo.CurrentCulture);
        }

        #endregion Public Methods

        #region Overrides

        ///
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
        ///
        /// <param name="obj">Another object to compare to.</param>
        /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            if (obj is CartesianPoint)
                return Equals((CartesianPoint)obj);
            return false;
        }

        ///
        /// Returns a hash code for this instance.
        ///
        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
        public override int GetHashCode()
        {
            return _x.GetHashCode() ^ _y.GetHashCode() ^ _z.GetHashCode();
        }

        ///
        /// Returns a <see cref="System.String"/> that represents this instance.
        ///
        /// <returns>A <see cref="System.String"/> that represents this instance.</returns>
        public override string ToString()
        {
            return ToString("G", CultureInfo.CurrentCulture);
        }

        #endregion Overrides

        #region IFormattable Members

        ///
        /// Returns a <see cref="System.String"/> that represents this instance.
        ///
        /// <param name="format">The format to use.-or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the <see cref="T:System.IFormattable"/> implementation.</param>
        /// <param name="formatProvider">The provider to use to format the value.-or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.</param>
        /// <returns>A <see cref="System.String"/> that represents this instance.</returns>
        public string ToString(string format, IFormatProvider formatProvider)
        {
            CultureInfo culture = (CultureInfo)formatProvider ?? CultureInfo.CurrentCulture;

            if (string.IsNullOrEmpty(format))
                format = "G";

            return _x.ToString(format, culture) + culture.TextInfo.ListSeparator
                + _y.ToString(format, culture) + culture.TextInfo.ListSeparator
                + _z.ToString(format, culture);
        }

        #endregion IFormattable Members

        #region IEquatable<CartesianPoint> Members

        ///
        /// Indicates whether the current object is equal to another object of the same type.
        ///
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.</returns>
        public bool Equals(CartesianPoint other)
        {
            return _x.Equals(other.X)
                && _y.Equals(other.Y)
                && _z.Equals(other.Z);
        }

        #endregion IEquatable<CartesianPoint> Members

        #region IXmlSerializable Members

        ///
        /// This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"/> to the class.
        ///
        /// <returns>An <see cref="T:System.Xml.Schema.XmlSchema"/> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"/> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"/> method.</returns>
        XmlSchema IXmlSerializable.GetSchema()
        {
            return null;
        }

        ///
        /// Converts an object into its XML representation.
        ///
        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"/> stream to which the object is serialized.</param>
        public void WriteXml(XmlWriter writer)
        {
            /* The position class uses the GML 3.0 specification for XML.
             *
             * <gml:pos>X Y Z</gml:pos>
             *
             */
            writer.WriteStartElement(Xml.GML_XML_PREFIX, "pos", Xml.GML_XML_NAMESPACE);
            writer.WriteString(_x.ToMeters().Value.ToString("G17", CultureInfo.InvariantCulture));
            writer.WriteString(" ");
            writer.WriteString(_y.ToMeters().Value.ToString("G17", CultureInfo.InvariantCulture));
            writer.WriteString(" ");
            writer.WriteString(_z.ToMeters().Value.ToString("G17", CultureInfo.InvariantCulture));
            writer.WriteEndElement();
        }

        ///
        /// Generates an object from its XML representation.
        ///
        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"/> stream from which the object is deserialized.</param>
        public void ReadXml(XmlReader reader)
        {
            /* The position class uses the GML 3.0 specification for XML.
             *
             * <gml:pos>X Y Z</gml:pos>
             *
             * ... but it is also helpful to be able to READ older versions
             * of GML, such as this one for GML 2.0:
             *
             * <gml:coord>
             *      <gml:X>double</gml:X>
             *      <gml:Y>double</gml:Y>  // optional
             *      <gml:Z>double</gml:Z>  // optional
             * </gml:coord>
             *
             */

            // .NET whines if we don't fully assign all values
            _x = Distance.Empty;
            _y = Distance.Empty;
            _z = Distance.Empty;

            // Move to the <gml:pos> or <gml:coord> element
            if (!reader.IsStartElement("pos", Xml.GML_XML_NAMESPACE)
                && !reader.IsStartElement("coord", Xml.GML_XML_NAMESPACE))
                reader.ReadStartElement();

            switch (reader.LocalName.ToLower(CultureInfo.InvariantCulture))
            {
                case "pos":
                    // Read the "X Y" string, then split by the space between them
                    string[] values = reader.ReadElementContentAsString().Split(' ');
                    // Deserialize the X
                    _x = Distance.FromMeters(double.Parse(values[0], CultureInfo.InvariantCulture));

                    // Deserialize the Y
                    if (values.Length >= 2)
                        _y = Distance.FromMeters(double.Parse(values[1], CultureInfo.InvariantCulture));

                    // Deserialize the Z
                    if (values.Length == 3)
                        _z = Distance.FromMeters(double.Parse(values[2], CultureInfo.InvariantCulture));

                    break;
                case "coord":
                    // Read the <gml:coord> start tag
                    reader.ReadStartElement();
                    // Now read up to 3 elements: X, and optionally Y or Z
                    for (int index = 0; index < 3; index++)
                    {
                        switch (reader.LocalName.ToLower(CultureInfo.InvariantCulture))
                        {
                            case "x":
                                // Read X as meters (there's no unit type in the spec :P morons)
                                _x = Distance.FromMeters(reader.ReadElementContentAsDouble());
                                break;
                            case "y":
                                // Read Y as meters (there's no unit type in the spec :P morons)
                                _y = Distance.FromMeters(reader.ReadElementContentAsDouble());
                                break;
                            case "z":
                                // Read Z as meters (there's no unit type in the spec :P morons)
                                _z = Distance.FromMeters(reader.ReadElementContentAsDouble());
                                break;
                        }

                        // If we're at an end element, stop
                        if (reader.NodeType == XmlNodeType.EndElement)
                            break;
                    }
                    // Read the </gml:coord> end tag
                    reader.ReadEndElement();
                    break;
            }
            reader.Read();
        }

        #endregion IXmlSerializable Members

        #region Operators

        ///
        /// Implements the operator +.
        ///
        /// <param name="a">A.</param>
        /// <param name="b">The b.</param>
        /// <returns>The result of the operator.</returns>
        public static CartesianPoint operator +(CartesianPoint a, CartesianPoint b)
        {
            return new CartesianPoint(a.X.Add(b.X), a.Y.Add(b.Y), a.Z.Add(b.Z));
        }

        ///
        /// Implements the operator -.
        ///
        /// <param name="a">A.</param>
        /// <param name="b">The b.</param>
        /// <returns>The result of the operator.</returns>
        public static CartesianPoint operator -(CartesianPoint a, CartesianPoint b)
        {
            return new CartesianPoint(a.X.Subtract(b.X), a.Y.Subtract(b.Y), a.Z.Subtract(b.Z));
        }

        ///
        /// Implements the operator *.
        ///
        /// <param name="a">A.</param>
        /// <param name="b">The b.</param>
        /// <returns>The result of the operator.</returns>
        public static CartesianPoint operator *(CartesianPoint a, CartesianPoint b)
        {
            return new CartesianPoint(a.X.Multiply(b.X), a.Y.Multiply(b.Y), a.Z.Multiply(b.Z));
        }

        ///
        /// Implements the operator /.
        ///
        /// <param name="a">A.</param>
        /// <param name="b">The b.</param>
        /// <returns>The result of the operator.</returns>
        public static CartesianPoint operator /(CartesianPoint a, CartesianPoint b)
        {
            return new CartesianPoint(a.X.Divide(b.X), a.Y.Divide(b.Y), a.Z.Divide(b.Z));
        }

        ///
        /// Performs an explicit conversion from <see cref="DotSpatial.Positioning.Position"/> to <see cref="DotSpatial.Positioning.CartesianPoint"/>.
        ///
        /// <param name="value">The value.</param>
        /// <returns>The result of the conversion.</returns>
        public static explicit operator CartesianPoint(Position value)
        {
            return value.ToCartesianPoint();
        }

        ///
        /// Performs an explicit conversion from <see cref="DotSpatial.Positioning.Position3D"/> to <see cref="DotSpatial.Positioning.CartesianPoint"/>.
        ///
        /// <param name="value">The value.</param>
        /// <returns>The result of the conversion.</returns>
        public static explicit operator CartesianPoint(Position3D value)
        {
            return value.ToCartesianPoint();
        }

        #endregion Operators
    }
}


text:
import { appendToFile, createDir, moveFile, prependToFile } from '../../utils/fs';
import { ng, silentNpm } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { expectToFail } from '../../utils/utils';

export default async function () {
  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '*': ['./node_modules/*'],
    };
  });
  await ng('build');

  await createDir('xyz');
  await moveFile(
    'node_modules/@angular/common',
    'xyz/common',
  );

  await expectToFail(() => ng('build'));

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '@angular/common': [ './xyz/common' ],
    };
  });
  await ng('build');

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '*': ['./node_modules/*'],
      '@angular/common': [ './xyz/common' ],
    };
  });
  await ng('build');

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '@angular/common': [ './xyz/common' ],
      '*': ['./node_modules/*'],
    };
  });
  await ng('build');

  await updateJsonFile('tsconfig.json', tsconfig => {
    delete tsconfig.compilerOptions.paths;
  });

  await prependToFile('src/app/app.module.ts', 'import * as firebase from \'firebase\';');
  await appendToFile('src/app/app.module.ts', 'firebase.initializeApp({});');

  await silentNpm('install', 'firebase@3.7.8');
  await ng('build', '--aot');
  await ng('test', '--watch=false');

  await silentNpm('install', 'firebase@4.9.0');
  await ng('build', '--aot');
  await ng('test', '--watch=false');

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {};
  });
  await ng('build');

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '@app/*': ['*'],
      '@lib/*/test': ['*/test'],
    };
  });
  await ng('build');

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '@firebase/polyfill': ['./node_modules/@firebase/polyfill/index.ts'],
    };
  });
  await expectToFail(() => ng('build'));

  await updateJsonFile('tsconfig.json', tsconfig => {
    tsconfig.compilerOptions.paths = {
      '@firebase/polyfill*': ['./node_modules/@firebase/polyfill/index.ts'],
    };
  });
  await expectToFail(() => ng('build'));
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>mne.read_epochs_fieldtrip — MNE 0.21.2 documentation</title>
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../_static/bootstrap_divs.css" />
    <link rel="stylesheet" type="text/css" href="../_static/gallery.css" />
    <link rel="stylesheet" type="text/css" href="../_static/gallery-binder.css" />
    <link rel="stylesheet" type="text/css" href="../_static/gallery-dataframe.css" />
    <link rel="stylesheet" type="text/css" href="../_static/gallery-rendered-html.css" />

    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />

    <link rel="canonical" href="https://mne.tools/stable/index.html" />

    <link rel="stylesheet" href="../_static/style.css " type="text/css" />
    <link rel="stylesheet" href="../_static/font-awesome.css" type="text/css" />
    <link rel="stylesheet" href="../_static/font-source-code-pro.css" type="text/css" />
    <link rel="stylesheet" href="../_static/font-source-sans-pro.css" type="text/css" />
    <link rel="stylesheet" href="../_static/flag-icon.css" type="text/css" />

<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">

        </button>

        0.21.2

Install

Overview

Tutorials

Examples

Glossary

API

              More

 GitHub

 Get help

 Contribute

 Cite MNE

              <button type="button" class="btn btn-primary btn-sm navbar-btn dropdown-toggle" id="dLabelMore" data-toggle="dropdown" style="margin-left: 10px">
              v0.21.2

            </button>

Development

v0.21 (stable)

v0.20

v0.19

v0.18

v0.17

v0.16

v0.15

v0.14

v0.13

v0.12

v0.11

<form class="navbar-form navbar-right" action="../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

mne.read_epochs_fieldtrip¶

mne.read_epochs_fieldtrip(fname, info, data_name='data', trialinfo_column=0)[source]¶

Load epoched data from a FieldTrip preprocessing structure.

This function expects to find epoched data in the structure data_name is
pointing at.

Warning

Only epochs with the same amount of channels and samples are
supported!

Warning

FieldTrip does not normally store the original information
concerning channel location, orientation, type etc. It is
therefore highly recommended to provide the info field.
This can be obtained by reading the original raw data file
with MNE functions (without preload). The returned object
contains the necessary info field.

Parameters

fnamestr

Path and filename of the .mat file containing the data.

infodict or None

The info dict of the raw data file corresponding to the data to import.
If this is set to None, limited information is extracted from the
FieldTrip structure.

data_namestr

Name of heading dict/ variable name under which the data was originally
saved in MATLAB.

trialinfo_columnint

Column of the trialinfo matrix to use for the event codes.

Returns

epochsinstance of EpochsArray

An EpochsArray containing the loaded data.

Examples using mne.read_epochs_fieldtrip¶

Importing data from MEG devices¶

© Copyright 2012-2020, MNE Developers. Last updated on 2020-03-27.


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _mod = require('mod');

Object.keys(_mod).forEach(function (key) {
  if (key === "default") return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _mod[key];
    }
  });
});


text:
package io.fabric8.kubernetes.client.dsl;

public interface Prettyable<T> {

    T withPrettyOutput();
}


text:
{% extends "subnav_base.html" %}

{% load i18n %}

{% block body_class %}profile{% endblock %}

{% block subnav %}
    {% if user.is_authenticated %}

{% trans "Profile" %}

{% trans "Your Profile" %}

{% trans "All Profiles" %}

    {% else %}

    {% endif %}
{% endblock %}


text:
using blink::WebBlobData;
using blink::WebString;
using blink::WebThreadSafeData;
using blink::WebURL;

namespace content {

MockWebBlobRegistryImpl::MockWebBlobRegistryImpl() {
}

MockWebBlobRegistryImpl::~MockWebBlobRegistryImpl() {
}

void MockWebBlobRegistryImpl::registerBlobData(const WebString& uuid,
                                               const WebBlobData& data) {
}

void MockWebBlobRegistryImpl::addBlobDataRef(const WebString& uuid) {
}

void MockWebBlobRegistryImpl::removeBlobDataRef(const WebString& uuid) {
}

void MockWebBlobRegistryImpl::registerPublicBlobURL(const WebURL& url,
                                                    const WebString& uuid) {
}

void MockWebBlobRegistryImpl::revokePublicBlobURL(const WebURL& url) {
}

void MockWebBlobRegistryImpl::registerStreamURL(const WebURL& url,
                                                const WebString& content_type) {
}

void MockWebBlobRegistryImpl::registerStreamURL(const WebURL& url,
                                                const blink::WebURL& src_url) {
}

void MockWebBlobRegistryImpl::addDataToStream(const WebURL& url,
                                              WebThreadSafeData& data) {
}

void MockWebBlobRegistryImpl::finalizeStream(const WebURL& url) {
}

void MockWebBlobRegistryImpl::abortStream(const WebURL& url) {
}

void MockWebBlobRegistryImpl::unregisterStreamURL(const WebURL& url) {
}

}  // namespace content


text:
#if FEATURE_NATIVE

using System.Collections.Generic;

using Microsoft.Scripting;

using IronPython.Runtime;
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;

namespace IronPython.Modules {
    /// <summary>
    /// Provides support for interop with native code from Python code.
    /// </summary>
    public static partial class CTypes {

        /// <summary>
        /// Base class for data structures.  Subclasses can define _fields_ which
        /// specifies the in memory layout of the values.  Instances can then
        /// be created with the initial values provided as the array.  The values
        /// can then be accessed from the instance by field name.  The value can also
        /// be passed to a foreign C API and the type can be used in other structures.
        ///
        /// class MyStructure(Structure):
        ///     _fields_ = [('a', c_int), ('b', c_int)]
        ///
        /// MyStructure(1, 2).a
        /// MyStructure()
        ///
        /// class MyOtherStructure(Structure):
        ///     _fields_ = [('c', MyStructure), ('b', c_int)]
        ///
        /// MyOtherStructure((1, 2), 3)
        /// MyOtherStructure(MyStructure(1, 2), 3)
        /// </summary>
        [PythonType("Structure")]
        public abstract class _Structure : CData {
            protected _Structure() {
                ((StructType)NativeType).EnsureFinal();
                _memHolder = new MemoryHolder(NativeType.Size);
            }

            public void __init__(params object[] args) {
                CheckAbstract();

                INativeType nativeType = NativeType;
                StructType st = (StructType)nativeType;

                st.SetValueInternal(_memHolder, 0, args);
            }

            public void __init__(CodeContext/*!*/ context, [ParamDictionary]IDictionary<string, object> kwargs) {
                CheckAbstract();

                foreach (var x in kwargs) {
                    PythonOps.SetAttr(context, this, x.Key, x.Value);
                }
            }

            private void CheckAbstract() {
                object abstractCls;
                if (((PythonType)NativeType).TryGetBoundAttr(((PythonType)NativeType).Context.SharedContext,
                    this,
                    "_abstract_",
                    out abstractCls)) {
                    throw PythonOps.TypeError("abstract class");
                }
            }
        }
    }

}
#endif


text:
namespace EverlastingStudent.Web.Areas.HelpPage.ModelDescriptions
{
    public class CollectionModelDescription : ModelDescription
    {
        public ModelDescription ElementDescription { get; set; }
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.AccessControl;
using Microsoft.Protocols.TestTools.StackSdk;
using Microsoft.Protocols.TestTools.StackSdk.Messages;

namespace Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Cifs
{
    /// <summary>
    /// Packets for SmbNtTransactCreate Request
    /// </summary>
    public class SmbNtTransactCreateRequestPacket : SmbNtTransactRequestPacket
    {
        #region Fields

        private NT_TRANSACT_CREATE_Request_NT_Trans_Parameters ntTransParameters;
        private NT_TRANSACT_CREATE_Request_NT_Trans_Data ntTransData;
        // Size of padding data before Name field in NT_Trans_Parameters structure.
        private const byte PaddingSize = 1;

        #endregion

        #region Properties

        /// <summary>
        /// get or set the NT_Trans_Parameters:NT_TRANSACT_CREATE_Request_NT_Trans_Parameters
        /// </summary>
        public NT_TRANSACT_CREATE_Request_NT_Trans_Parameters NtTransParameters
        {
            get
            {
                return this.ntTransParameters;
            }
            set
            {
                this.ntTransParameters = value;
            }
        }

        /// <summary>
        /// get or set the NT_Trans_Data:NT_TRANSACT_CREATE_Request_NT_Trans_Data
        /// </summary>
        public NT_TRANSACT_CREATE_Request_NT_Trans_Data NtTransData
        {
            get
            {
                return this.ntTransData;
            }
            set
            {
                this.ntTransData = value;
            }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor.
        /// </summary>
        public SmbNtTransactCreateRequestPacket()
            : base()
        {
            this.InitDefaultValue();
        }

        /// <summary>
        /// Constructor: Create a request directly from a buffer.
        /// </summary>
        public SmbNtTransactCreateRequestPacket(byte[] data)
            : base(data)
        {
        }

        /// <summary>
        /// Deep copy constructor.
        /// </summary>
        public SmbNtTransactCreateRequestPacket(SmbNtTransactCreateRequestPacket packet)
            : base(packet)
        {
            this.InitDefaultValue();

            this.ntTransParameters.Flags = packet.ntTransParameters.Flags;
            this.ntTransParameters.RootDirectoryFID = packet.ntTransParameters.RootDirectoryFID;
            this.ntTransParameters.DesiredAccess = packet.ntTransParameters.DesiredAccess;
            this.ntTransParameters.AllocationSize = packet.ntTransParameters.AllocationSize;
            this.ntTransParameters.ExtFileAttributes = packet.ntTransParameters.ExtFileAttributes;
            this.ntTransParameters.ShareAccess = packet.ntTransParameters.ShareAccess;
            this.ntTransParameters.CreateDisposition = packet.ntTransParameters.CreateDisposition;
            this.ntTransParameters.CreateOptions = packet.ntTransParameters.CreateOptions;
            this.ntTransParameters.SecurityDescriptorLength = packet.ntTransParameters.SecurityDescriptorLength;
            this.ntTransParameters.EALength = packet.ntTransParameters.EALength;
            this.ntTransParameters.NameLength = packet.ntTransParameters.NameLength;
            this.ntTransParameters.ImpersonationLevel = packet.ntTransParameters.ImpersonationLevel;
            this.ntTransParameters.SecurityFlags = packet.ntTransParameters.SecurityFlags;

            if (packet.ntTransParameters.Name != null)
            {
                this.ntTransParameters.Name = new byte[packet.ntTransParameters.NameLength];
                Array.Copy(packet.ntTransParameters.Name,
                    this.ntTransParameters.Name, packet.ntTransParameters.NameLength);
            }
            else
            {
                this.ntTransParameters.Name = new byte[0];
            }
            this.ntTransData.SecurityDescriptor = packet.ntTransData.SecurityDescriptor;

            if (packet.ntTransData.ExtendedAttributes != null)
            {
                this.ntTransData.ExtendedAttributes = new FILE_FULL_EA_INFORMATION[packet.ntTransData.ExtendedAttributes.Length];
                Array.Copy(packet.ntTransData.ExtendedAttributes,
                    this.ntTransData.ExtendedAttributes, packet.ntTransData.ExtendedAttributes.Length);
            }
            else
            {
                this.ntTransData.ExtendedAttributes = new FILE_FULL_EA_INFORMATION[0];
            }
        }

        #endregion

        #region override methods

        /// <summary>
        /// to create an instance of the StackPacket class that is identical to the current StackPacket.
        /// </summary>
        /// <returns>a new Packet cloned from this.</returns>
        public override StackPacket Clone()
        {
            return new SmbNtTransactCreateRequestPacket(this);
        }

        /// <summary>
        /// Encode the struct of NtTransParameters into the byte array in SmbData.NT_Trans_Parameters
        /// </summary>
        protected override void EncodeNtTransParameters()
        {
            if ((this.smbHeader.Flags2 & SmbFlags2.SMB_FLAGS2_UNICODE) == SmbFlags2.SMB_FLAGS2_UNICODE)
            {
                int ntTransParameterSize = CifsMessageUtils.GetSize<NT_TRANSACT_CREATE_Request_NT_Trans_Parameters>(
                    this.ntTransParameters) + PaddingSize;
                this.smbData.NT_Trans_Parameters = new byte[ntTransParameterSize];

                using (MemoryStream memoryStream = new MemoryStream(this.smbData.NT_Trans_Parameters))
                {
                    using (Channel channel = new Channel(null, memoryStream))
                    {
                        channel.BeginWriteGroup();
                        channel.Write<NtTransactFlags>(this.ntTransParameters.Flags);
                        channel.Write<uint>(this.ntTransParameters.RootDirectoryFID);
                        channel.Write<NtTransactDesiredAccess>(this.ntTransParameters.DesiredAccess);
                        channel.Write<ulong>(this.ntTransParameters.AllocationSize);
                        channel.Write<SMB_EXT_FILE_ATTR>(this.ntTransParameters.ExtFileAttributes);
                        channel.Write<NtTransactShareAccess>(this.ntTransParameters.ShareAccess);
                        channel.Write<NtTransactCreateDisposition>(this.ntTransParameters.CreateDisposition);
                        channel.Write<NtTransactCreateOptions>(this.ntTransParameters.CreateOptions);
                        channel.Write<uint>(this.ntTransParameters.SecurityDescriptorLength);
                        channel.Write<uint>(this.ntTransParameters.EALength);
                        channel.Write<uint>(this.ntTransParameters.NameLength);
                        channel.Write<NtTransactImpersonationLevel>(this.ntTransParameters.ImpersonationLevel);
                        channel.Write<NtTransactSecurityFlags>(this.ntTransParameters.SecurityFlags);
                        // Padding data
                        channel.WriteBytes(new byte[PaddingSize]);
                        channel.WriteBytes(this.ntTransParameters.Name);
                        channel.EndWriteGroup();
                    }
                }
            }
            else
            {
                this.smbData.NT_Trans_Parameters =
                    CifsMessageUtils.ToBytes<NT_TRANSACT_CREATE_Request_NT_Trans_Parameters>(this.ntTransParameters);
            }
        }

        /// <summary>
        /// Encode the struct of NtTransData into the byte array in SmbData.NT_Trans_Data
        /// </summary>
        protected override void EncodeNtTransData()
        {
            byte[] securicyInformation = null;

            if (this.ntTransData.SecurityDescriptor != null)
            {
                securicyInformation = new byte[this.ntTransData.SecurityDescriptor.BinaryLength];
                this.ntTransData.SecurityDescriptor.GetBinaryForm(securicyInformation, 0);
                this.smbData.NT_Trans_Data = securicyInformation;
            }
            else
            {
                securicyInformation = new byte[0];
            }
            this.smbData.NT_Trans_Data = new byte[this.ntTransParameters.SecurityDescriptorLength +
                this.ntTransParameters.EALength];
            using (MemoryStream memoryStream = new MemoryStream(this.smbData.NT_Trans_Data))
            {
                using (Channel channel = new Channel(null, memoryStream))
                {
                    channel.BeginWriteGroup();
                    channel.WriteBytes(securicyInformation);

                    if (this.ntTransData.ExtendedAttributes != null)
                    {
                        for (int i = 0; i < this.ntTransData.ExtendedAttributes.Length; i++)
                        {
                            channel.Write<uint>(this.ntTransData.ExtendedAttributes[i].NextEntryOffset);
                            channel.Write<FULL_EA_FLAGS>(this.ntTransData.ExtendedAttributes[i].Flags);
                            channel.Write<byte>(this.ntTransData.ExtendedAttributes[i].EaNameLength);
                            channel.Write<ushort>(this.ntTransData.ExtendedAttributes[i].EaValueLength);
                            int size = 0;

                            if (this.ntTransData.ExtendedAttributes[i].EaName != null)
                            {
                                channel.WriteBytes(this.ntTransData.ExtendedAttributes[i].EaName);
                                size += this.ntTransData.ExtendedAttributes[i].EaName.Length;
                            }
                            if (this.ntTransData.ExtendedAttributes[i].EaValue != null)
                            {
                                channel.WriteBytes(this.ntTransData.ExtendedAttributes[i].EaValue);
                                size += this.ntTransData.ExtendedAttributes[i].EaValue.Length;
                            }
                            int pad = (int)(this.ntTransData.ExtendedAttributes[i].NextEntryOffset - EA.FULL_EA_FIXED_SIZE - size);

                            if (pad > 0)
                            {
                                channel.WriteBytes(new byte[pad]);
                            }
                        }
                    }
                    channel.EndWriteGroup();
                }
            }
        }

        /// <summary>
        /// to decode the NtTrans parameters: from the general NtTransParameters to the concrete NtTrans Parameters.
        /// </summary>
        protected override void DecodeNtTransParameters()
        {
            if (this.smbData.NT_Trans_Parameters != null)
            {
                if ((this.smbHeader.Flags2 & SmbFlags2.SMB_FLAGS2_UNICODE) == SmbFlags2.SMB_FLAGS2_UNICODE)
                {
                    using (MemoryStream memoryStream = new MemoryStream(this.smbData.NT_Trans_Parameters))
                    {
                        using (Channel channel = new Channel(null, memoryStream))
                        {
                            this.ntTransParameters.Flags = channel.Read<NtTransactFlags>();
                            this.ntTransParameters.RootDirectoryFID = channel.Read<uint>();
                            this.ntTransParameters.DesiredAccess = channel.Read<NtTransactDesiredAccess>();
                            this.ntTransParameters.AllocationSize = channel.Read<ulong>();
                            this.ntTransParameters.ExtFileAttributes = channel.Read<SMB_EXT_FILE_ATTR>();
                            this.ntTransParameters.ShareAccess = channel.Read<NtTransactShareAccess>();
                            this.ntTransParameters.CreateDisposition = channel.Read<NtTransactCreateDisposition>();
                            this.ntTransParameters.CreateOptions = channel.Read<NtTransactCreateOptions>();
                            this.ntTransParameters.SecurityDescriptorLength = channel.Read<uint>();
                            this.ntTransParameters.EALength = channel.Read<uint>();
                            this.ntTransParameters.NameLength = channel.Read<uint>();
                            this.ntTransParameters.ImpersonationLevel = channel.Read<NtTransactImpersonationLevel>();
                            this.ntTransParameters.SecurityFlags = channel.Read<NtTransactSecurityFlags>();
                            // Padding data
                            channel.ReadBytes(PaddingSize);
                            this.ntTransParameters.Name = channel.ReadBytes((int)this.ntTransParameters.NameLength);
                        }
                    }
                }
                else
                {
                    this.ntTransParameters = TypeMarshal.ToStruct<NT_TRANSACT_CREATE_Request_NT_Trans_Parameters>(
                        this.smbData.NT_Trans_Parameters);
                }
            }
        }

        /// <summary>
        /// to decode the NtTrans data: from the general NtTransDada to the concrete NtTrans Data.
        /// </summary>
        protected override void DecodeNtTransData()
        {
            if (this.smbData.NT_Trans_Data != null)
            {
                using (MemoryStream memoryStream = new MemoryStream(this.smbData.NT_Trans_Data))
                {
                    using (Channel channel = new Channel(null, memoryStream))
                    {
                        if (this.ntTransParameters.SecurityDescriptorLength > 0)
                        {
                            byte[] securicyInformation = channel.ReadBytes((int)this.ntTransParameters.SecurityDescriptorLength);
                            this.ntTransData.SecurityDescriptor = new RawSecurityDescriptor(securicyInformation, 0);
                        }
                        uint sizeOfListInBytes = this.ntTransParameters.EALength;
                        List<FILE_FULL_EA_INFORMATION> attributeList = new List<FILE_FULL_EA_INFORMATION>();

                        while (sizeOfListInBytes > 0)
                        {
                            FILE_FULL_EA_INFORMATION eaInformation = channel.Read<FILE_FULL_EA_INFORMATION>();
                            attributeList.Add(eaInformation);
                            sizeOfListInBytes -= (uint)(EA.FULL_EA_FIXED_SIZE + eaInformation.EaName.Length +
                                eaInformation.EaValue.Length);
                        }
                        this.ntTransData.ExtendedAttributes = attributeList.ToArray();
                    }
                }
            }
        }

        #endregion

        #region initialize fields with default value

        /// <summary>
        /// init packet, set default field data
        /// </summary>
        private void InitDefaultValue()
        {
        }

        #endregion
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="CornerVew">
        <attr name="cv_text" format="string" />
        <attr name="cv_text_color" format="color" />
        <attr name="cv_text_size" format="dimension" />
        <attr name="cv_text_bold" format="boolean" />
        <attr name="cv_text_all_caps" format="boolean" />
        <attr name="cv_background_color" format="color" />
        <attr name="cv_min_size" format="dimension" />
        <attr name="cv_padding" format="dimension" />
        <attr name="cv_gravity" format="enum">
            <enum name="TOP_LEFT" value="51" />
            <enum name="TOP_RIGHT" value="53" />
            <enum name="BOTTOM_LEFT" value="83" />
            <enum name="BOTTOM_RIGHT" value="85" />
        </attr>
        <attr name="cv_fill_triangle" format="boolean" />
    </declare-styleable>
</resources>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Package edu.icom4029.cool.core</title>
<meta name="date" content="2014-10-19">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
edu.icom4029.cool.core

Packages that use edu.icom4029.cool.core

Package
Description

edu.icom4029.cool.core

Classes in edu.icom4029.cool.core used by edu.icom4029.cool.core

Class and Description

AbstractSymbol

String table entry

 There are three kinds of string table entries:

   a true string,
   a string representation of an identifier, and
   a string representation of an integer.

AbstractTable

Abstract string table implementation.

IdTable

IntTable

StringTable

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
from importlib import import_module

from metis import app
from metis.common.lazy import LazyObjectMetaclass
from metis.core.query.plan import parse

class ExecutorService(object):
  __metaclass__ = LazyObjectMetaclass

  def __init__(self):
    self.executors = {}
    self.default_executor = app.config['DEFAULT_EXECUTOR']

    for executor_path in app.config['EXECUTORS']:
      executor_module, executor_cls = executor_path.rsplit('.', 1)
      executor_module = import_module(executor_module)
      executor_cls = getattr(executor_module, executor_cls)
      self.executors[executor_path] = executor_cls()

    assert self.default_executor in self.executors

  def execute_plan(self, plan, executor=None):
    if executor is None:
      executor = self.default_executor
    executor = self.executors[executor]
    return executor.finalize(executor.execute(parse(plan)))

service = ExecutorService()


text:
package Email;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class SmtpAuthenticator extends Authenticator{
	public SmtpAuthenticator() {

	    super();
	}

	@Override
	public PasswordAuthentication getPasswordAuthentication() {
	 String username = "cz3003timecrisis@gmail.com";
	 String password = "3003liuyang";
	    if ((username != null) && (username.length() > 0) && (password != null)
	      && (password.length   () > 0)) {

	        return new PasswordAuthentication(username, password);
	    }

	    return null;
	}
}


text:
module Rdpl
  # Represents a line to be printed in the label.
  class Line
    DEFAULT_CHARACTER = 'l'

    include LinesAndBoxes

    def data
      DEFAULT_CHARACTER + formatted_horizontal_width + formatted_vertical_width
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/month"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text="@string/month"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/comment_body"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/month"
        android:text="@string/comment"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/part_number_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/month"
        android:text="@string/forward_slash"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/day"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/part_number_view"
        android:text="@string/day"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/part_quantity_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/day"
        android:text="@string/forward_slash"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/year"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toRightOf="@+id/part_quantity_view"
        android:text="@string/Year"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>


text:
package sftp

import (
	"errors"
	"syscall"
)

func fakeFileInfoSys() interface{} {
	return &syscall.Stat_t{Uid: 65534, Gid: 65534}
}

func testOsSys(sys interface{}) error {
	fstat := sys.(*FileStat)
	if fstat.UID != uint32(65534) {
		return errors.New("Uid failed to match")
	}
	if fstat.GID != uint32(65534) {
		return errors.New("Gid failed to match")
	}
	return nil
}


text:
package carsmart.upgrade.manager.download;

public interface OnDownloadListener {

    void onFailed(int reason);

    void onProgress(int size, int totalSize);
}


text:
package cn.fuyoushuo.fqbb.view.flagment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.trello.rxlifecycle.components.support.RxDialogFragment;
import com.umeng.analytics.MobclickAgent;

import java.net.URLEncoder;

import cn.fuyoushuo.fqbb.R;
import cn.fuyoushuo.fqbb.ext.LocalStatisticInfo;
import cn.fuyoushuo.fqbb.presenter.impl.TaobaoInterPresenter;
import cn.fuyoushuo.fqbb.view.activity.HelpActivity;
import cn.fuyoushuo.fqbb.view.activity.MainActivity;

public class TixianFlagment extends RxDialogFragment {

    public static final String VOLLEY_TAG_NAME = "my_tixian_flagment";

    MainActivity parentActivity;

    public WebView mytixianWebview;

    private String tixianPageUrl = "http://media.alimama.com/account/overview.htm";

    TextView tixianTitleText;

    boolean firstAccess = true;

    LinearLayout reflashTixianLl;

    LinearLayout howToTixianLl;

    RelativeLayout closeArea;

    FrameLayout funArea;

    TextView funText;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStyle(DialogFragment.STYLE_NORMAL, R.style.fullScreenDialog);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
        View view =  inflater.inflate(R.layout.flagment_tixian, container, false);
        parentActivity = (MainActivity) getActivity();

        funArea = (FrameLayout) view.findViewById(R.id.tixian_FrameLayout);
        funText = (TextView) view.findViewById(R.id.tixian_fun_text);

        funText.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AlimamaLoginDialogFragment.newInstance(AlimamaLoginDialogFragment.FROM_TIXIAN_PAGE).show(getFragmentManager(),"AlimamaLoginDialogFragment");
            }
        });

        reflashTixianLl = (LinearLayout) view.findViewById(R.id.reflashTixianLl);
        reflashTixianLl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                reloadTixianPage();
            }
        });

        howToTixianLl = (LinearLayout) view.findViewById(R.id.howToTixianLl);
        howToTixianLl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(parentActivity, HelpActivity.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
                intent.putExtra("howToTixian", true);
                startActivity(intent);
            }
        });

        closeArea = (RelativeLayout) view.findViewById(R.id.closeArea);
        closeArea.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               dismissAllowingStateLoss();
            }
        });

        tixianTitleText = (TextView) view.findViewById(R.id.tixianTitleText);

        mytixianWebview = (WebView) view.findViewById(R.id.tixianWebview);
        mytixianWebview.getSettings().setJavaScriptEnabled(true);
        //mytixianWebview.getSettings().setBuiltInZoomControls(true);//是否显示缩放按钮,默认false
        mytixianWebview.getSettings().setSupportZoom(true);//是否可以缩放,默认true
        mytixianWebview.getSettings().setDomStorageEnabled(true);

        mytixianWebview.getSettings().setUseWideViewPort(true);// 设置此属性,可任意比例缩放。大视图模式
        mytixianWebview.getSettings().setLoadWithOverviewMode(true);// 和setUseWideViewPort(true)一起解决网页自适应问题

        mytixianWebview.getSettings().setSupportZoom(true);
        mytixianWebview.getSettings().setBuiltInZoomControls(true);
        mytixianWebview.getSettings().setDisplayZoomControls(false);

        mytixianWebview.requestFocusFromTouch();
        mytixianWebview.setWebChromeClient(new WebChromeClient());

        mytixianWebview.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("www://")){
                    String replaceUrl = url.replace("https://", "").replace("http://", "");
                    /*if(replaceUrl.startsWith("h5.m.taobao.com/awp/core/detail.htm")
                            || replaceUrl.startsWith("item.taobao.com/item.htm")
                            || replaceUrl.startsWith("detail.m.tmall.com")
                            || replaceUrl.startsWith("detail.tmall.com/item.htm")
                            || replaceUrl.startsWith("www.taobao.com/market/ju/detail_wap.php")
                            ){//是商品详情页
                        parentActivity.showWebviewFragment(url, false, false);
                        return true;
                    }*/
                    if(replaceUrl.equals("www.alimama.com/member/login.htm")){//用户登录过了,然后退出了阿里妈妈,那么刷新会到登录页;这个时候就需要跳到我们的阿里妈妈登录页
//                        mytixianWebview.loadUrl(TaobaoInterPresenter.TAOBAOKE_LOGINURL);
//                        tixianTitleText.setText("淘宝账户登录");
                        showTbLoginTip();
                        return true;
                    }
                    return false;
                }else{
                    return true;
                }
            }

            @Override
            public void onPageFinished(WebView view, String url) {
                super.onPageFinished(view, url);

                //统计页面跳转
                try {
                    LocalStatisticInfo.getIntance().appWvLoad(URLEncoder.encode(url,"utf-8"),"");
                } catch (Exception e) {
                }

                Log.i("TixianWebview", url);
                if(url.startsWith("http://www.alimama.com/index.htm")){//已登录
                    TaobaoInterPresenter.saveLoginCookie(url);
                    tixianTitleText.setText("淘宝联盟");
                    mytixianWebview.loadUrl(tixianPageUrl);
                    return;
                }
            }
        });

        return view;
    }

    @Override
    public void onStart() {
        super.onStart();
        loadWebviewPage();
    }

    public static TixianFlagment newInstance() {
        TixianFlagment fragment = new TixianFlagment();
        return fragment;
    }

    public void loadWebviewPage(){
        if(firstAccess){//第一次访问
            firstAccess = false;
            reloadTixianPage();
        }else{//当前页面是登录页
            if(mytixianWebview.getUrl()!=null && !"".equals(mytixianWebview.getUrl().trim())){
                String replaceUrl = mytixianWebview.getUrl().replace("https://", "").replace("http://", "");
                if(replaceUrl.startsWith("login.taobao.com/member/login") || replaceUrl.contains("www.alimama.com/member/login.htm") || replaceUrl.startsWith("login.m.taobao.com/login.htm")){//当前页面是登录页(比如未登录访问了订单页面,后面提现页面登陆过了,订单页面还是显示着登录页)
                    reloadTixianPage();
                }
            }else{
                reloadTixianPage();
            }
        }
    }

    public void reloadTixianPage(){
        TaobaoInterPresenter.judgeAlimamaLogin(new TaobaoInterPresenter.LoginCallback() {
            @Override
            public void hasLoginCallback() {
                if(mytixianWebview!=null){
                    funArea.setVisibility(View.GONE);
                    tixianTitleText.setText("淘宝联盟");
                    mytixianWebview.loadUrl(tixianPageUrl);
                }
            }

            @Override
            public void nologinCallback() {
                showTbLoginTip();
            }

            @Override
            public void judgeErrorCallback() {

            }
        },VOLLEY_TAG_NAME);
    }

    private void showTbLoginTip(){
        funArea.setVisibility(View.VISIBLE);
    }

    public void clearWebview(){
        mytixianWebview.loadUrl("file:///android_asset/index.html");
    }

    @Override
    public void onDestroy() {
        TaobaoInterPresenter.cancelTagedRuquests(VOLLEY_TAG_NAME);
        if(mytixianWebview!=null){
            ViewGroup viewGroup = (ViewGroup) mytixianWebview.getParent();
            if(viewGroup!=null){
                viewGroup.removeView(mytixianWebview);
            }
            mytixianWebview.removeAllViews();
            mytixianWebview.destroy();
        }
        super.onDestroy();
    }

    @Override
    public void onResume() {
        super.onResume();
        MobclickAgent.onPageStart("uc_tixian");
    }

    @Override
    public void onPause() {
        super.onPause();
        MobclickAgent.onPageEnd("uc_tixian");
    }
}