/* GStreamer
 * Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
 * Copyright (C) 2008 Mark Nauwelaerts <mnauw@users.sourceforge.net>
 *
 * gstcollectpads.h:
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __GST_COLLECT_PADS_H__
#define __GST_COLLECT_PADS_H__

#include <gst/gst.h>
#include <gst/base/base-prelude.h>

G_BEGIN_DECLS

#define GST_TYPE_COLLECT_PADS            (gst_collect_pads_get_type())
#define GST_COLLECT_PADS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COLLECT_PADS,GstCollectPads))
#define GST_COLLECT_PADS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COLLECT_PADS,GstCollectPadsClass))
#define GST_COLLECT_PADS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_COLLECT_PADS,GstCollectPadsClass))
#define GST_IS_COLLECT_PADS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COLLECT_PADS))
#define GST_IS_COLLECT_PADS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COLLECT_PADS))

typedef struct _GstCollectData GstCollectData;
typedef struct _GstCollectDataPrivate GstCollectDataPrivate;
typedef struct _GstCollectPads GstCollectPads;
typedef struct _GstCollectPadsPrivate GstCollectPadsPrivate;
typedef struct _GstCollectPadsClass GstCollectPadsClass;

/**
 * GstCollectDataDestroyNotify:
 * @data: the #GstCollectData that will be freed
 *
 * A function that will be called when the #GstCollectData will be freed.
 * It is passed the pointer to the structure and should free any custom
 * memory and resources allocated for it.
 */
typedef void (*GstCollectDataDestroyNotify) (GstCollectData *data);

/**
 * GstCollectPadsStateFlags:
 * @GST_COLLECT_PADS_STATE_EOS:         Set if collectdata's pad is EOS.
 * @GST_COLLECT_PADS_STATE_FLUSHING:    Set if collectdata's pad is flushing.
 * @GST_COLLECT_PADS_STATE_NEW_SEGMENT: Set if collectdata's pad received a
 *                                      new_segment event.
 * @GST_COLLECT_PADS_STATE_WAITING:     Set if collectdata's pad must be waited
 *                                      for when collecting.
 * @GST_COLLECT_PADS_STATE_LOCKED:      Set collectdata's pad WAITING state must
 *                                      not be changed.
 * #GstCollectPadsStateFlags indicate private state of a collectdata('s pad).
 */
typedef enum {
  GST_COLLECT_PADS_STATE_EOS = 1 << 0,
  GST_COLLECT_PADS_STATE_FLUSHING = 1 << 1,
  GST_COLLECT_PADS_STATE_NEW_SEGMENT = 1 << 2,
  GST_COLLECT_PADS_STATE_WAITING = 1 << 3,
  GST_COLLECT_PADS_STATE_LOCKED = 1 << 4
} GstCollectPadsStateFlags;

/**
 * GST_COLLECT_PADS_STATE:
 * @data: a #GstCollectData.
 *
 * A flags word containing #GstCollectPadsStateFlags flags set
 * on this collected pad.
 */
#define GST_COLLECT_PADS_STATE(data)                 (((GstCollectData *) data)->state)
/**
 * GST_COLLECT_PADS_STATE_IS_SET:
 * @data: a #GstCollectData.
 * @flag: the #GstCollectPadsStateFlags to check.
 *
 * Gives the status of a specific flag on a collected pad.
 */
#define GST_COLLECT_PADS_STATE_IS_SET(data,flag)     !!(GST_COLLECT_PADS_STATE (data) & flag)
/**
 * GST_COLLECT_PADS_STATE_SET:
 * @data: a #GstCollectData.
 * @flag: the #GstCollectPadsStateFlags to set.
 *
 * Sets a state flag on a collected pad.
 */
#define GST_COLLECT_PADS_STATE_SET(data,flag)        (GST_COLLECT_PADS_STATE (data) |= flag)
/**
 * GST_COLLECT_PADS_STATE_UNSET:
 * @data: a #GstCollectData.
 * @flag: the #GstCollectPadsStateFlags to clear.
 *
 * Clears a state flag on a collected pad.
 */
#define GST_COLLECT_PADS_STATE_UNSET(data,flag)      (GST_COLLECT_PADS_STATE (data) &= ~(flag))

/**
 * GST_COLLECT_PADS_DTS:
 * @data: A #GstCollectData.
 *
 * Returns the DTS that has been converted to running time when using
 * gst_collect_pads_clip_running_time(). Unlike the value saved into
 * the buffer, this value is of type gint64 and may be negative. This allow
 * properly handling streams with frame reordering where the first DTS may
 * be negative. If the initial DTS was not set, this value will be
 * set to %G_MININT64.
 *
 * Since: 1.6
 */
#define GST_COLLECT_PADS_DTS(data)                   (((GstCollectData *) data)->ABI.abi.dts)

/**
 * GST_COLLECT_PADS_DTS_IS_VALID:
 * @data: A #GstCollectData.
 *
 * Check if running DTS value store is valid.
 *
 * Since: 1.6
 */
#define GST_COLLECT_PADS_DTS_IS_VALID(data)          (GST_CLOCK_STIME_IS_VALID (GST_COLLECT_PADS_DTS (data)))

/**
 * GstCollectData:
 * @collect: owner #GstCollectPads
 * @pad: #GstPad managed by this data
 * @buffer: currently queued buffer.
 * @pos: position in the buffer
 * @segment: last segment received.
 * @dts: the signed version of the DTS converted to running time. To access
 *       this memeber, use %GST_COLLECT_PADS_DTS macro. (Since 1.6)
 *
 * Structure used by the collect_pads.
 */
struct _GstCollectData
{
  /* with STREAM_LOCK of @collect */
  GstCollectPads        *collect;
  GstPad                *pad;
  GstBuffer             *buffer;
  guint                  pos;
  GstSegment             segment;

  /*< private >*/
  /* state: bitfield for easier extension;
   * eos, flushing, new_segment, waiting */
  GstCollectPadsStateFlags    state;

  GstCollectDataPrivate *priv;

  union {
    struct {
      /*< public >*/
      gint64 dts;
      /*< private >*/
    } abi;
    gpointer _gst_reserved[GST_PADDING];
  } ABI;
};

/**
 * GstCollectPadsFunction:
 * @pads: the #GstCollectPads that triggered the callback
 * @user_data: user data passed to gst_collect_pads_set_function()
 *
 * A function that will be called when all pads have received data.
 *
 * Returns: %GST_FLOW_OK for success
 */
typedef GstFlowReturn (*GstCollectPadsFunction) (GstCollectPads *pads, gpointer user_data);

/**
 * GstCollectPadsBufferFunction:
 * @pads: the #GstCollectPads that triggered the callback
 * @data: the #GstCollectData of pad that has received the buffer
 * @buffer: (transfer full): the #GstBuffer
 * @user_data: user data passed to gst_collect_pads_set_buffer_function()
 *
 * A function that will be called when a (considered oldest) buffer can be muxed.
 * If all pads have reached EOS, this function is called with %NULL @buffer
 * and %NULL @data.
 *
 * Returns: %GST_FLOW_OK for success
 */
typedef GstFlowReturn (*GstCollectPadsBufferFunction) (GstCollectPads *pads, GstCollectData *data,
                                                       GstBuffer *buffer, gpointer user_data);

/**
 * GstCollectPadsCompareFunction:
 * @pads: the #GstCollectPads that is comparing the timestamps
 * @data1: the first #GstCollectData
 * @timestamp1: the first timestamp
 * @data2: the second #GstCollectData
 * @timestamp2: the second timestamp
 * @user_data: user data passed to gst_collect_pads_set_compare_function()
 *
 * A function for comparing two timestamps of buffers or newsegments collected on one pad.
 *
 * Returns: Integer less than zero when first timestamp is deemed older than the second one.
 *          Zero if the timestamps are deemed equally old.
 *          Integer greater than zero when second timestamp is deemed older than the first one.
 */
typedef gint (*GstCollectPadsCompareFunction) (GstCollectPads *pads,
                                               GstCollectData * data1, GstClockTime timestamp1,
                                               GstCollectData * data2, GstClockTime timestamp2,
                                               gpointer user_data);

/**
 * GstCollectPadsEventFunction:
 * @pads: the #GstCollectPads that triggered the callback
 * @pad: the #GstPad that received an event
 * @event: the #GstEvent received
 * @user_data: user data passed to gst_collect_pads_set_event_function()
 *
 * A function that will be called while processing an event. It takes
 * ownership of the event and is responsible for chaining up (to
 * gst_collect_pads_event_default()) or dropping events (such typical cases
 * being handled by the default handler).
 *
 * Returns: %TRUE if the pad could handle the event
 */
typedef gboolean (*GstCollectPadsEventFunction)        (GstCollectPads *pads, GstCollectData * pad,
                                                        GstEvent * event, gpointer user_data);

/**
 * GstCollectPadsQueryFunction:
 * @pads: the #GstCollectPads that triggered the callback
 * @pad: the #GstPad that received an event
 * @query: the #GstEvent received
 * @user_data: user data passed to gst_collect_pads_set_query_function()
 *
 * A function that will be called while processing a query. It takes
 * ownership of the query and is responsible for chaining up (to
 * events downstream (with gst_pad_event_default()).
 *
 * Returns: %TRUE if the pad could handle the event
 */
typedef gboolean (*GstCollectPadsQueryFunction)        (GstCollectPads *pads, GstCollectData * pad,
                                                        GstQuery * query, gpointer user_data);

/**
 * GstCollectPadsClipFunction:
 * @pads: a #GstCollectPads
 * @data: a #GstCollectData
 * @inbuffer: (transfer full): the input #GstBuffer
 * @outbuffer: (out): the output #GstBuffer
 * @user_data: user data
 *
 * A function that will be called when @inbuffer is received on the pad managed
 * by @data in the collectpad object @pads.
 *
 * The function should use the segment of @data and the negotiated media type on
 * the pad to perform clipping of @inbuffer.
 *
 * This function takes ownership of @inbuffer and should output a buffer in
 * @outbuffer or return %NULL in @outbuffer if the buffer should be dropped.
 *
 * Returns: a #GstFlowReturn that corresponds to the result of clipping.
 */
typedef GstFlowReturn (*GstCollectPadsClipFunction) (GstCollectPads *pads, GstCollectData *data,
                                                     GstBuffer *inbuffer, GstBuffer **outbuffer,
                                                     gpointer user_data);

/**
 * GstCollectPadsFlushFunction:
 * @pads: a #GstCollectPads
 * @user_data: user data
 *
 * A function that will be called while processing a flushing seek event.
 *
 * The function should flush any internal state of the element and the state of
 * all the pads. It should clear only the state not directly managed by the
 * @pads object. It is therefore not necessary to call
 * gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function.
 *
 * Since: 1.4
 */
typedef void (*GstCollectPadsFlushFunction) (GstCollectPads *pads, gpointer user_data);

/**
 * GST_COLLECT_PADS_GET_STREAM_LOCK:
 * @pads: a #GstCollectPads
 *
 * Get the stream lock of @pads. The stream lock is used to coordinate and
 * serialize execution among the various streams being collected, and in
 * protecting the resources used to accomplish this.
 */
#define GST_COLLECT_PADS_GET_STREAM_LOCK(pads) (&((GstCollectPads *)pads)->stream_lock)
/**
 * GST_COLLECT_PADS_STREAM_LOCK:
 * @pads: a #GstCollectPads
 *
 * Lock the stream lock of @pads.
 */
#define GST_COLLECT_PADS_STREAM_LOCK(pads)     g_rec_mutex_lock(GST_COLLECT_PADS_GET_STREAM_LOCK (pads))
/**
 * GST_COLLECT_PADS_STREAM_UNLOCK:
 * @pads: a #GstCollectPads
 *
 * Unlock the stream lock of @pads.
 */
#define GST_COLLECT_PADS_STREAM_UNLOCK(pads)   g_rec_mutex_unlock(GST_COLLECT_PADS_GET_STREAM_LOCK (pads))

/**
 * GstCollectPads:
 * @data: (element-type GstBase.CollectData): #GList of #GstCollectData managed
 *   by this #GstCollectPads.
 *
 * Collectpads object.
 */
struct _GstCollectPads {
  GstObject      object;

  /*< public >*/ /* with LOCK and/or STREAM_LOCK */
  GSList        *data;                  /* list of CollectData items */

  /*< private >*/
  GRecMutex      stream_lock;          /* used to serialize collection among several streams */

  GstCollectPadsPrivate *priv;

  gpointer _gst_reserved[GST_PADDING];
};

struct _GstCollectPadsClass {
  GstObjectClass parent_class;

  /*< private >*/
  gpointer _gst_reserved[GST_PADDING];
};

GST_BASE_API
GType           gst_collect_pads_get_type (void);

/* creating the object */

GST_BASE_API
GstCollectPads* gst_collect_pads_new      (void);

/* set the callbacks */

GST_BASE_API
void            gst_collect_pads_set_function         (GstCollectPads *pads,
                                                       GstCollectPadsFunction func,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_buffer_function  (GstCollectPads *pads,
                                                       GstCollectPadsBufferFunction func,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_event_function   (GstCollectPads *pads,
                                                       GstCollectPadsEventFunction func,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_query_function   (GstCollectPads *pads,
                                                       GstCollectPadsQueryFunction func,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_compare_function (GstCollectPads *pads,
                                                       GstCollectPadsCompareFunction func,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_clip_function    (GstCollectPads *pads,
                                                       GstCollectPadsClipFunction clipfunc,
                                                       gpointer user_data);
GST_BASE_API
void            gst_collect_pads_set_flush_function    (GstCollectPads *pads,
                                                       GstCollectPadsFlushFunction func,
                                                       gpointer user_data);

/* pad management */

GST_BASE_API
GstCollectData* gst_collect_pads_add_pad       (GstCollectPads *pads, GstPad *pad, guint size,
                                                GstCollectDataDestroyNotify destroy_notify,
                                                gboolean lock);
GST_BASE_API
gboolean        gst_collect_pads_remove_pad    (GstCollectPads *pads, GstPad *pad);

/* start/stop collection */

GST_BASE_API
void            gst_collect_pads_start         (GstCollectPads *pads);

GST_BASE_API
void            gst_collect_pads_stop          (GstCollectPads *pads);

GST_BASE_API
void            gst_collect_pads_set_flushing  (GstCollectPads *pads, gboolean flushing);

/* get collected buffers */

GST_BASE_API
GstBuffer*      gst_collect_pads_peek          (GstCollectPads *pads, GstCollectData *data);

GST_BASE_API
GstBuffer*      gst_collect_pads_pop           (GstCollectPads *pads, GstCollectData *data);

/* get collected bytes */

GST_BASE_API
guint           gst_collect_pads_available     (GstCollectPads *pads);

GST_BASE_API
guint           gst_collect_pads_flush         (GstCollectPads *pads, GstCollectData *data,
                                                guint size);
GST_BASE_API
GstBuffer*      gst_collect_pads_read_buffer   (GstCollectPads * pads, GstCollectData * data,
                                                guint size);
GST_BASE_API
GstBuffer*      gst_collect_pads_take_buffer   (GstCollectPads * pads, GstCollectData * data,
                                                guint size);

/* setting and unsetting waiting mode */

GST_BASE_API
void            gst_collect_pads_set_waiting   (GstCollectPads *pads, GstCollectData *data,
                                                gboolean waiting);

/* convenience helper */

GST_BASE_API
GstFlowReturn   gst_collect_pads_clip_running_time (GstCollectPads * pads,
                                                    GstCollectData * cdata,
                                                    GstBuffer * buf, GstBuffer ** outbuf,
                                                    gpointer user_data);

/* default handlers */

GST_BASE_API
gboolean        gst_collect_pads_event_default (GstCollectPads * pads, GstCollectData * data,
                                                GstEvent * event, gboolean discard);
GST_BASE_API
gboolean        gst_collect_pads_src_event_default (GstCollectPads * pads, GstPad * pad,
                                                    GstEvent * event);
GST_BASE_API
gboolean        gst_collect_pads_query_default (GstCollectPads * pads, GstCollectData * data,
                                                GstQuery * query, gboolean discard);

#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstCollectPads, gst_object_unref)
#endif

G_END_DECLS

#endif /* __GST_COLLECT_PADS_H__ */

{'repo_name': 'javafxports/openjdk-jfx', 'stars': '1025', 'repo_language': 'C++', 'file_name': 'Makefile-Debug.mk', 'mime_type': 'text/x-makefile', 'hash': -8016179864700967209, 'source_dataset': 'data'}


script-src 'self' 'unsafe-inline'; img-src 'none'

camera 'none'; geolocation 'self' https://example.com/

{'repo_name': 'web-platform-tests/wpt', 'stars': '2923', 'repo_language': 'HTML', 'file_name': 'newtarget.html', 'mime_type': 'text/html', 'hash': -722189978338411671, 'source_dataset': 'data'}


global:
  scope: component
  type: color
  category: background-color
  cssProperties:
  - 'background*'
  - 'border*'
  - box-shadow
imports:
- "../../../../design-tokens/aliases/color-palettes.yml"
props:
  VERTICAL_NAVIGATION_COLOR_BACKGROUND_SHADE_ROW_HOVER:
    value: '{!PALETTE_GRAY_3}'
    comment: Vertical navigation shaded background color on row hover.
  VERTICAL_NAVIGATION_COLOR_BACKGROUND_SHADE_ROW_ACTIVE:
    value: '{!PALETTE_GRAY_4}'
    comment: Vertical navigation shaded background color on row active.

{'repo_name': 'salesforce-ux/design-system', 'stars': '2934', 'repo_language': 'JavaScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': 52124688916533642, 'source_dataset': 'data'}


{% set version = "3.12.0" %}
{% set name = "pd.rcngene.1.0.st" %}
{% set bioc = "3.11" %}

package:
  name: 'bioconductor-{{ name|lower }}'
  version: '{{ version }}'
source:
  url:
    - 'https://bioconductor.org/packages/{{ bioc }}/data/annotation/src/contrib/{{ name }}_{{ version }}.tar.gz'
    - 'https://bioarchive.galaxyproject.org/{{ name }}_{{ version }}.tar.gz'
    - 'https://depot.galaxyproject.org/software/bioconductor-{{ name }}/bioconductor-{{ name }}_{{ version }}_src_all.tar.gz'
  md5: 9c7c5ef4d4f5ed92d9130d77a99a0685
build:
  number: 4
  rpaths:
    - lib/R/lib/
    - lib/
  noarch: generic
requirements:
  host:
    - 'bioconductor-biostrings >=2.56.0,<2.57.0'
    - 'bioconductor-iranges >=2.22.0,<2.23.0'
    - 'bioconductor-oligo >=1.52.0,<1.53.0'
    - 'bioconductor-oligoclasses >=1.50.0,<1.51.0'
    - 'bioconductor-s4vectors >=0.26.0,<0.27.0'
    - r-base
    - 'r-dbi >=0.3.1'
    - 'r-rsqlite >=1.0.0'
  run:
    - 'bioconductor-biostrings >=2.56.0,<2.57.0'
    - 'bioconductor-iranges >=2.22.0,<2.23.0'
    - 'bioconductor-oligo >=1.52.0,<1.53.0'
    - 'bioconductor-oligoclasses >=1.50.0,<1.51.0'
    - 'bioconductor-s4vectors >=0.26.0,<0.27.0'
    - r-base
    - 'r-dbi >=0.3.1'
    - 'r-rsqlite >=1.0.0'
    - curl
test:
  commands:
    - '$R -e "library(''{{ name }}'')"'
about:
  home: 'https://bioconductor.org/packages/{{ bioc }}/data/annotation/html/{{ name }}.html'
  license: Artistic-2.0
  summary: 'Platform Design Info for Affymetrix RCnGene-1_0-st'
  description: 'Platform Design Info for Affymetrix RCnGene-1_0-st'

{'repo_name': 'bioconda/bioconda-recipes', 'stars': '1179', 'repo_language': 'Shell', 'file_name': 'setup.sh', 'mime_type': 'text/x-shellscript', 'hash': -1657537901183571676, 'source_dataset': 'data'}


---
name: Xamarin.Forms - Deep Linking
description: Application indexing allows applications that would otherwise be forgotten after a few uses to stay relevant by appearing in search results.
page_type: sample
languages:
- csharp
products:
- xamarin
urlFragment: deeplinking
---
# Deep Linking

Application indexing allows applications that would otherwise be forgotten after a few uses to stay relevant by appearing in search results. Deep linking allows applications to respond to a search result that contains application data, typically by navigating to a page referenced from a deep link. This sample demonstrates how to use application indexing and deep linking to make Xamarin.Forms application content searchable on iOS and Android devices.

Note: to use this sample on Android, you must add your **google-services.json** (downloaded from the Firebase console) file to the Android project, and set the build action to **GoogleServicesJson**.

For more information about this sample, see [Application Indexing and Deep Linking](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/deep-linking).

![Deep Linking application screenshot](Screenshots/01All.png "Deep Linking application screenshot")

{'repo_name': 'xamarin/xamarin-forms-samples', 'stars': '3387', 'repo_language': 'C#', 'file_name': 'App.cs', 'mime_type': 'text/x-c++', 'hash': 9183529931264725404, 'source_dataset': 'data'}


/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <sal/log.hxx>
#include <vcl/window.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <toolkit/awt/vclxwindow.hxx>

#include <vcl/sysdata.hxx>
#include <vcl/svapp.hxx>

#include <AccTopWindowListener.hxx>
#include <unomsaaevent.hxx>

#include <com/sun/star/accessibility/AccessibleRole.hpp>

using namespace com::sun::star::uno;

/**
 *  For the new opened window, generate all the UNO accessible's object, COM object and add
 *  accessible listener to monitor all these objects.
 *  @param pAccessible      the accessible of the new opened window
 */
void AccTopWindowListener::HandleWindowOpened( css::accessibility::XAccessible* pAccessible )
{
    //get SystemData from window
    VclPtr<vcl::Window> window;
    if (auto pvclwindow = dynamic_cast<VCLXWindow*>(pAccessible))
        window = pvclwindow->GetWindow();
    else if (auto pvclxcomponent = dynamic_cast<VCLXAccessibleComponent*>(pAccessible))
        window = pvclxcomponent->GetWindow();
    assert(window);
    // The SalFrame of window may be destructed at this time
    const SystemEnvData* systemdata = nullptr;
    try
    {
        systemdata = window->GetSystemData();
    }
    catch(...)
    {
        systemdata = nullptr;
    }
    Reference<css::accessibility::XAccessibleContext> xContext = pAccessible->getAccessibleContext();
    if(!xContext.is())
        return;

    css::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
    //Only AccessibleContext exist, add all listeners
    if(pAccessibleContext != nullptr && systemdata != nullptr)
    {
        accManagerAgent.SaveTopWindowHandle(
                reinterpret_cast<sal_Int64>(systemdata->hWnd), pAccessible);

        AddAllListeners(pAccessible,nullptr,systemdata->hWnd);

        if( window->GetStyle() & WB_MOVEABLE )
            accManagerAgent.IncreaseState( pAccessible, static_cast<unsigned short>(-1) /* U_MOVEBLE */ );

        short role = pAccessibleContext->getAccessibleRole();

        if (role == css::accessibility::AccessibleRole::POPUP_MENU ||
                role == css::accessibility::AccessibleRole::MENU )
        {
            accManagerAgent.NotifyAccEvent(UM_EVENT_MENUPOPUPSTART, pAccessible);
        }

        if (role == css::accessibility::AccessibleRole::FRAME ||
                role == css::accessibility::AccessibleRole::DIALOG ||
                role == css::accessibility::AccessibleRole::WINDOW ||
                role == css::accessibility::AccessibleRole::ALERT)
        {
            accManagerAgent.NotifyAccEvent(UM_EVENT_SHOW, pAccessible);
        }
    }
}

AccTopWindowListener::AccTopWindowListener()
    : accManagerAgent()
{
}

AccTopWindowListener::~AccTopWindowListener()
{
}

/**
 *  It is invoked when a new window is opened, the source of this EventObject is the window
 */
void AccTopWindowListener::windowOpened( const css::lang::EventObject& e )
{
    SAL_INFO( "iacc2", "windowOpened triggered" );

    if ( !e.Source.is())
        return;

    Reference< css::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
    css::accessibility::XAccessible* pAccessible = xAccessible.get();
    if ( !pAccessible )
        return;

    SolarMutexGuard g;

    HandleWindowOpened( pAccessible );
}

/**
 *  Add the accessible event listener to object and all its children objects.
 *  @param  pAccessible     the accessible object
 *  @param  pParentXAcc     the parent of current accessible object
 *  @param  pWND            the handle of top window which current object resides
 */
void AccTopWindowListener::AddAllListeners(css::accessibility::XAccessible* pAccessible, css::accessibility::XAccessible* pParentXAcc, HWND pWND)
{
    Reference<css::accessibility::XAccessibleContext> xContext = pAccessible->getAccessibleContext();
    if(!xContext.is())
    {
        return;
    }
    css::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
    if(pAccessibleContext == nullptr)
    {
        return;
    }

    accManagerAgent.InsertAccObj(pAccessible, pParentXAcc,
            reinterpret_cast<sal_Int64>(pWND));

    if (!accManagerAgent.IsContainer(pAccessible))
    {
        return;
    }

    short role = pAccessibleContext->getAccessibleRole();
    if(css::accessibility::AccessibleRole::DOCUMENT == role ||
            css::accessibility::AccessibleRole::DOCUMENT_PRESENTATION == role ||
            css::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET == role ||
            css::accessibility::AccessibleRole::DOCUMENT_TEXT == role)
    {
        if(accManagerAgent.IsStateManageDescendant(pAccessible))
        {
            return ;
        }
    }

    int count = pAccessibleContext->getAccessibleChildCount();
    for (int i=0;i<count;i++)
    {
        Reference<css::accessibility::XAccessible> mxAccessible
        = pAccessibleContext->getAccessibleChild(i);

        css::accessibility::XAccessible* mpAccessible = mxAccessible.get();
        if(mpAccessible != nullptr)
        {
            Reference<css::accessibility::XAccessibleContext> mxAccessibleContext
            = mpAccessible->getAccessibleContext();
            css::accessibility::XAccessibleContext* mpContext = mxAccessibleContext.get();
            if(mpContext != nullptr)
                AddAllListeners( mpAccessible, pAccessible, pWND);
        }
    }
}

void AccTopWindowListener::windowClosing( const css::lang::EventObject& )
{
    SAL_INFO( "iacc2", "windowClosing triggered" );
}

/**
 *  Invoke this method when the top window is closed, remove all the objects and its children
 *  from current manager's cache, and remove the COM object and the accessible event listener
 *  assigned to the accessible objects.
 */
void AccTopWindowListener::windowClosed( const css::lang::EventObject& e )
{
    SAL_INFO( "iacc2", "windowClosed triggered" );

    if ( !e.Source.is())
        return;

    Reference< css::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
    css::accessibility::XAccessible* pAccessible = xAccessible.get();
    if ( pAccessible == nullptr)
        return;

    Reference<css::accessibility::XAccessibleContext> xContext = pAccessible->getAccessibleContext();
    if(!xContext.is())
    {
        return;
    }
    css::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();

    short role = -1;
    if(pAccessibleContext != nullptr)
    {
        role = pAccessibleContext->getAccessibleRole();

        if (role == css::accessibility::AccessibleRole::POPUP_MENU ||
                role == css::accessibility::AccessibleRole::MENU)
        {
            accManagerAgent.NotifyAccEvent(UM_EVENT_MENUPOPUPEND, pAccessible);
        }
    }

    accManagerAgent.DeleteChildrenAccObj( pAccessible );
    if( role != css::accessibility::AccessibleRole::POPUP_MENU )
        accManagerAgent.DeleteAccObj( pAccessible );

}

void AccTopWindowListener::windowMinimized( const css::lang::EventObject& )
{
}

void AccTopWindowListener::windowNormalized( const css::lang::EventObject& )
{
}

void AccTopWindowListener::windowActivated( const css::lang::EventObject& )
{
}

void AccTopWindowListener::windowDeactivated( const css::lang::EventObject& )
{
}

void AccTopWindowListener::disposing( const css::lang::EventObject&  )
{
}

sal_Int64 AccTopWindowListener::GetMSComPtr(
        sal_Int64 hWnd, sal_Int64 lParam, sal_Int64 wParam)
{
    return accManagerAgent.Get_ToATInterface(hWnd, lParam, wParam);
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

{'repo_name': 'LibreOffice/core', 'stars': '907', 'repo_language': 'None', 'file_name': 'README', 'mime_type': 'text/plain', 'hash': 5101042284823335068, 'source_dataset': 'data'}


---
title: 'El método Fetch'
description: El método `fetch` se usa para llenar la `store` antes de renderizar la página, es como el método` asyncData` excepto que no establece los datos del componente.
menu: Método Fetch
category: components-glossary
---

## Nuxt >= 2.12

Nuxt.js `v2.12` introduce un nuevo _hook_ llamado `fetch`(traer) **en cualquiera de tus componentes de Vue**.

<base-alert>

`fetch(context)` ha quedado obsoleto, en su lugar puede utilizar un [middleware anónimo](/guides/components-glossary/pages-middleware#anonymous-middleware) en vuestra pagina: `middleware(context)`

</base-alert>

### ¿Cuándo usar fetch?

Cada vez que necesite obtener datos **asincrónicos**. `fetch` se llama en el lado del servidor cuando se renderiza la ruta y en el lado del cliente cuando se navega.

Expone `$fetchState` a nivel de componente:

- `$fetchState.pending`: `Boolean`, permite mostrar un _placeholder_ cuando se llama a `fetch` _en el lado del cliente_.
- `$fetchState.error`: `null` o `Error`, permite mostrar un mensaje de error
- `$fetchState.timestamp`: `Integer`, es una marca de tiempo de la última recuperación, útil para almacenar en caché con `keep-alive`

Si desea llamar al hook `fetch` de su plantilla, use:

```html
<button @click="$fetch">Actualizar</button>
```

O en el método de componente:

```javascript
// de los métodos de componentes en la sección de script
export default {
  methods: {
    refresh() {
      this.$fetch()
    }
  }
}
```

Puede acceder el [contexto](/guides/internals-glossary/context) de Nuxt dentro del hook de recuperación usando `this.$nuxt.context`.

### Options

- `fetchOnServer`: `Boolean` or `Function` (default: `true`), llama `fetch()` al renderizar la página en el servidor
- `fetchDelay`: `Integer` (default: `200`), establecer el tiempo mínimo de ejecución en milisegundos (para evitar destellos rápidos)

<div class="Alert Alert--green">

Cuando `fetchOnServer` es falso (`false` o retorna `false`), `fetch` se llamará solo en el lado del cliente y `$fetchState.pending` devolverá `true` cuando el servidor renderice el componente.

</div>

```html
<script>
  export default {
    data() {
      return {
        posts: []
      }
    },
    async fetch() {
      this.posts = await this.$http.$get(
        'https://jsonplaceholder.typicode.com/posts'
      )
    },
    fetchOnServer: false
  }
</script>
```

{'repo_name': 'nuxt/nuxtjs.org', 'stars': '1379', 'repo_language': 'Vue', 'file_name': 'click-outside.js', 'mime_type': 'text/plain', 'hash': 2610208052239027984, 'source_dataset': 'data'}


### 第三方系统接入DSS指南
#### 1.指南介绍
        本指南用于介绍第三方系统接入DSS系统的设计方案、具体实现以及举例进行说明。本指南适合于希望将自己的第三方系统接入DSS的用户阅读。
#### 2.第三方系统接入DSS的设计方案
        DSS(DataSphere Studio)从一开始就被设计成为一个开放的、具有强扩展能力的系统。DSS系统希望第三方系统是能以插拔式的方式接入，为了实现上述的理念，DSS提出了AppJoint(应用关节)的概念。AppJoint从作用上来说是连接两个系统，并为两个系统的协调运行提供服务。
任务提交到DSS系统，并由DSS系统转发给第三方外部系统进行执行，必须要考虑并实现下面的几点功能。
- 1).解决双方系统用户的鉴权问题。
- 2).双方系统都需要对用户提交任务的元数据进行正确处理
- 3).DSS系统要能以同步或者异步的方式正确地提交任务给第三方系统进行执行
- 4).任务提交到第三方系统之后，外部系统需要能将日志、状态等信息返回给DSS系统
- 5).第三方系统在任务执行完毕之后，将可能产生的任务结果等信息持久化到执行的路径

为了方便外部系统的接入，DSS提供了SDK的方式,maven依赖引入如下
```
<dependency>
    <groupId>com.webank.wedatasphere.dss</groupId>
    <artifactId>dss-appjoint-core</artifactId>
    <version>${dss.version}</version>
</dependency>
```

        dss-appjoint-core提供了的AppJoint的顶级接口，想要接入DSS系统的第三方系统都需要实现该顶层接口，此接口有以下方法需要用户进行实现
- 1.getSecurityService

        SecurityService是用来进行解决DSS系统与第三方系统的鉴权问题。用户在DSS系统进行登录之后，并希望提交任务到第三方系统，首先第三方系统需要能够将这个用户进行鉴权。
- 2.getProjectSerivice

        ProjectService是用来进行解决DSS系统与第三方系统的工程管理问题。用户在DSS系统进行新增、删除、修改工程的时候，第三方系统也需要进行同步进行相同的动作，这样的目的是为了双方系统能够在工程层面实现统一。
- 3.getNodeService

        NodeService是用来解决用户在DSS提交的任务在第三方系统生成相应的任务的问题。用户如果在DSS系统的工作流中新建了一个工作流节点并进行任务的编辑，第三方系统需要同步感知到
- 4.getNodeExecution

        NodeExecution接口是用来将任务提交到第三方系统进行执行的接口,NodeExecution
接口有支持短时间任务的NodeExecution和支持长时间任务的LongTermNodeExecution。一般短时间任务，如邮件发送等，可以直接实现NodeExecution接口，并重写execute方法，DSS系统同步等待任务结束。另外的长时间任务，如数据质量检测等，可以实现LongTermNodeExecution接口，并重写submit方法，返回一个NodeExecutionAction，DSS系统通过这个NodeExecutionAction可以向第三方系统获取任务的日志、状态等。

#### 3.第三方系统接入DSS的实现(以Visualis为例)

        Visualis是微众银行WeDataSphere开源的一款商业BI工具，DSS集成Visualis系统之后可以获得数据可视化的能力。
Visualis接入DSS系统的代码在DSS项目中已经同步开源，下面将以开源代码为例，对步骤进行罗列分析。
Visualis接入的DSS系统的步骤如下:

**3.1.Visualis实现AppJoint接口**

        Visualis实现的 AppJoint接口的实现类是VisualisAppjoint。查看VisualisAppjoint的代码可知，它在init方法时候，
初始化了自己实现的SecurityService、 NodeService以及NodeExecution。
```java
 public void init(String baseUrl, Map<String, Object> params) {
        securityService = new VisualisSecurityService();
        securityService.setBaseUrl(baseUrl);
        nodeExecution = new VisualisNodeExecution();
        nodeExecution.setBaseUrl(baseUrl);
        nodeService = new VisualisNodeService();
        nodeService.setBaseUrl(baseUrl);
    }
```

**3.2.Visualis实现SecurtyService接口**

        Visualis实现的SecurityService接口的类名是VisualisSecurityService，
并重写了login方法，为了能够进行授权登陆，Visualis采用了提供token的方式，DSS的网关对该token进行授权，这样就能够做到用户鉴权。

```java
public class VisualisSecurityService extends AppJointUrlImpl implements SecurityService {
    @Override
    public Session login(String user) throws AppJointErrorException {
        VisualisSession visualisSession = new VisualisSession();
        visualisSession.setUser(user);
        visualisSession.getParameters().put("Token-User",user);
        visualisSession.getParameters().put("Token-Code","WS-AUTH");
        return visualisSession;
    }

    @Override
    public void logout(String user) {

    }
}
```

**3.3.Visualis实现的NodeService接口**

        Visualis实现的NodeService接口的类是VisualisNodeService，并重写了createNode，
deleteNode和updateNode三个方法，这三个方法是进行在第三方系统同步生成任务元数据。例如createNode方法是通过调用visualis的HTTP接口在Visualis系统生成同一工程下面的Visualis任务。

```java
    @Override
    public Map<String, Object> createNode(Session session, AppJointNode node,
                                          Map<String, Object> requestBody) throws AppJointErrorException {
        if (DisplayNodeService.getNodeType().equals(node.getNodeType())) {
            return DisplayNodeService.createNode(session, getBaseUrl(), String.valueOf(node.getProjectId()), node.getNodeType(), requestBody);
        } else if (DashboardNodeService.getNodeType().equals(node.getNodeType())) {
            return DashboardNodeService.createNode(session, getBaseUrl(), String.valueOf(node.getProjectId()), node.getNodeType(), requestBody);
        } else {
            throw new AppJointErrorException(42002, "cannot recognize the nodeType " + node.getNodeType());
        }
    }

    @Override
    public void deleteNode(Session session, AppJointNode node) throws AppJointErrorException {
        if (DisplayNodeService.getNodeType().equals(node.getNodeType())) {
            DisplayNodeService.deleteNode(session, getBaseUrl(), String.valueOf(node.getProjectId()), node.getNodeType(), node.getJobContent());
        } else if (DashboardNodeService.getNodeType().equals(node.getNodeType())) {
            DashboardNodeService.deleteNode(session, getBaseUrl(), String.valueOf(node.getProjectId()), node.getNodeType(), node.getJobContent());
        } else {
            throw new AppJointErrorException(42002, "cannot recognize the nodeType " + node.getNodeType());
        }
    }

    @Override
    public Map<String, Object> updateNode(Session session, AppJointNode node,
                                          Map<String, Object> requestBody) throws AppJointErrorException {
        if (DisplayNodeService.getNodeType().equals(node.getNodeType())) {
            return DisplayNodeService.updateNode(session, getBaseUrl(), node.getProjectId(), node.getNodeType(), requestBody);
        } else if (DashboardNodeService.getNodeType().equals(node.getNodeType())) {
            return DashboardNodeService.updateNode(session, getBaseUrl(), node.getProjectId(), node.getNodeType(), requestBody);
        } else {
            throw new AppJointErrorException(42002, "cannot recognize the nodeType " + node.getNodeType());
        }
    }
```

**3.4.Visualis实现NodeExecution接口**

        Visualis实现的NodeExecution接口的类是VisualisNodeExecution，并重写了execute方法，
该方法传入的两个参数为Node和NodeContext，从NodeContext中我们可以拿到用户、DSS的网关地址，还有网关验证的Token。
通过这些，我们可以封装成一个HTTP的请求发送到第三方系统Visualis并从Visualis获取响应结果，NodeContext提供写入结果集的方法，
如Visualis的结果集一般是以图片的形式展示，在execute方法的最后，Visualis通过nodeContext获取到一个支持图片写入的PictureResultSetWriter方法，并将结果集进行写入。
```scala
 override def execute(node: AppJointNode, nodeContext: NodeContext, session: Session): NodeExecutionResponse = node match {
    case commonAppJointNode: CommonAppJointNode =>
      val appJointResponse = new CompletedNodeExecutionResponse()
      val idMap = commonAppJointNode.getJobContent
      val id = idMap.values().iterator().next().toString
      val url = if(commonAppJointNode.getNodeType.toLowerCase.contains(DISPLAY)) getDisplayPreviewUrl(nodeContext.getGatewayUrl, id)
      else if(commonAppJointNode.getNodeType.toLowerCase.contains(DASHBOARD)) getDashboardPreviewUrl(nodeContext.getGatewayUrl, id)
      else {
        appJointResponse.setIsSucceed(false)
        appJointResponse.setErrorMsg("不支持的appJoint类型：" + node.getNodeType)
        return appJointResponse
      }
      var response = ""
      val headers = nodeContext.getTokenHeader(nodeContext.getUser)
      nodeContext.appendLog(LogUtils.generateInfo(s"Ready to download preview picture from $url."))
      Utils.tryCatch(download(url, null, headers.toMap,
        input => Utils.tryFinally{
          val os = new ByteArrayOutputStream()
          IOUtils.copy(input, os)
          response = new String(Base64.getEncoder.encode(os.toByteArray))
          //response = IOUtils.toString(input, ServerConfiguration.BDP_SERVER_ENCODING.getValue)
        }(IOUtils.closeQuietly(input)))){ t =>
        val errException = new ErrorException(70063, "failed to do visualis request")
        errException.initCause(t)
        appJointResponse.setException(errException)
        appJointResponse.setIsSucceed(false)
        appJointResponse.setErrorMsg(s"用户${nodeContext.getUser}请求Visualis失败！URL为: " + url)
        return appJointResponse
      }
      nodeContext.appendLog(LogUtils.generateInfo("Preview picture downloaded, now ready to write results."))
      val imagesBytes = response
      val resultSetWriter = nodeContext.createPictureResultSetWriter()
      Utils.tryFinally{
        resultSetWriter.addMetaData(new LineMetaData())
        resultSetWriter.addRecord(new LineRecord(imagesBytes))
      }(IOUtils.closeQuietly(resultSetWriter))
      appJointResponse.setIsSucceed(true)
      appJointResponse
  }
```

**3.5.数据库内容的更新(dss-application模块)**

        DSS系统中有一个dss-application模块，该模块是为了能够将第三方系统的一些基本参数进行存储，例如持久化到数据库中，以方便DSS系统的中的微服务获取第三方系统的信息。
例如DSS要向Visualis进行提交请求的时候需要知道Visualis的请求的url,所以需要在dss-applition模块中的两张表dss_application和dss_workflow_node中插入相应的数据，dss_application的表字段为

|  字段名 | 字段意义 |  备注 |
| ------------ | ------------ | ------------ |
| id  | 主键|  自增主键 |
| name  | 20 |  如Visualis |
| url  | 10  |  如 http://127.0.0.1:8080 |
| is_user_need_init  | 是否需要用户初始化  |  默认否 |
| user_init_url  | 用户初始化url  |  默认空 |
| exists_project_service  | 是否存在自己的projectService服务, 存在的话要自己写appjoint实现projectService  |   |
| enhance_json  | 加强json，在appjoint初始化的时候会作为map进行传入  |   |
| homepage_url  | 接入的系统主页url  |   |
| direct_url  | 接入的系统重定向url  |   |
表3-1 dss_application表

|  字段名 | 字段意义 |  备注 |
| ------------ | ------------ | ------------ |
| id  | 主键|  自增主键 |
| node_type  | 接入的系统可以运行的任务类型 |  如visualis可以支持执行linkis.appjoint.visualis.display和linkis.appjoint.visualis.dashboard |
| url  | 10  |  如 http://127.0.0.1:8080 |
| application_id  | dss_application表id字段的外键  |  默认否 |
| support_jump  | 是否支持跳转页面  |  1表示支持，0表示不支持 |
| enable_copy  | 是否支持复制该节点  |  1表示支持，0表示不支持 |
| jump_url  | 双击工作流节点跳转的url  | 如 http://127.0.0.1:8080  |

表3-2 dss_workflow_node表

![dss_application表示例](/images/zh_CN/chapter4/dss_application.png)

图3-1 dss_application表示例图

![dss_application表示例](/images/zh_CN/chapter4/dss_workflow_node.png)

图3-2 dss_workflow_node表示例图

图3-1以及图3-2是visualis中插入dss_application表和dss_workflow_node 两个表中的测试数据。您可以将您系统需要指定的参数插入到对应的表中

**3.6.前端的修改**

- 3.6.1 增加节点类型
修改src/js/service/nodeType.js文件，增加Visualis节点类型
- 3.6.2 增加节点图标
将节点图标复制到src/js/module/process/images/路径下，目前只支持SVG格式。
- 3.6.3 新增节点配置
修改src/js/module/process/shape.js文件，增加Visualis的节点配置信息。
- 3.6.4 修改首页单击节点事件
修改src/js/module/process/index.vue文件，增加节点单击事件以及单击事件的处理逻辑。
- 3.6.5 修改工作流节点双击事件
修改src/js/view/process/index.vue以及src/js/module/process/index.vue，增加节点双击事件以及双击事件的处理逻辑。

**3.7.编译打包成jar包放置到指定位置**

        实现了上述的接口之后，一个AppJoint就已经实现了。打包之后，需要放置到指定的位置。
jar包需要放置到dss-server和linkis-appjoint-entrance两个微服务中，以linkis-appjoint-entrance 为例(dss-server与linkis-appjoint-entrance一致)，
在linkis-appjont-entrance下面的lib的同级目录有一个appjoints目录，目录下面层次如图3-3所示。
![appjoints目录示例](/images/zh_CN/chapter4/appjoints.png)

图3-3 appjoints目录示例
        在appjoints目录下面新建一个visualis目录。
visualis目录下面要求有lib目录，lib目录存放的是visualis在实现VisualisAppJoint的编译的jar包，
当然如果有引入dss系统没有带入的jar包，也需要放置到lib目录中，如sendemail Appjoint需要发送邮件功能的依赖包，
所以需要将这些依赖包和已经实现的jar包统一放置到lib目录中。
另外可以将本AppJoint所需要的一些配置参数放置到appjoints.properties,DSS系统提供的AppJointLoader会将这些配置的参数读取，放置到一个Map中，在AppJoint调用init方法的时候传入。

{'repo_name': 'WeBankFinTech/DataSphereStudio', 'stars': '772', 'repo_language': 'Java', 'file_name': 'VisualisNodeExecutionConfiguration.scala', 'mime_type': 'text/plain', 'hash': 44440506916514207, 'source_dataset': 'data'}


//
// ArgumentExceptionTests.cs
//
// Author: Jeffrey Stedfast <jestedfa@microsoft.com>
//
// Copyright (c) 2013-2020 .NET Foundation and Contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

using System;

using NUnit.Framework;

using MailKit;
using MailKit.Search;

namespace UnitTests
{
	[TestFixture]
	public class ArgumentExceptionTests
	{
		[Test]
		public void TestArgumentExceptions ()
		{
			Assert.Throws<ArgumentOutOfRangeException> (() => new OrderBy (OrderByType.To, SortOrder.None));

			Assert.Throws<ArgumentNullException> (() => new OrderByAnnotation (null, AnnotationAttribute.PrivateValue, SortOrder.Ascending));
			Assert.Throws<ArgumentNullException> (() => new OrderByAnnotation (AnnotationEntry.AltSubject, null, SortOrder.Ascending));
			Assert.Throws<ArgumentException> (() => new OrderByAnnotation (AnnotationEntry.AltSubject, AnnotationAttribute.Size, SortOrder.Ascending));
			Assert.Throws<ArgumentException> (() => new OrderByAnnotation (AnnotationEntry.AltSubject, AnnotationAttribute.PrivateSize, SortOrder.Ascending));
			Assert.Throws<ArgumentException> (() => new OrderByAnnotation (AnnotationEntry.AltSubject, AnnotationAttribute.SharedSize, SortOrder.Ascending));
		}
	}
}

{'repo_name': 'jstedfast/MailKit', 'stars': '3423', 'repo_language': 'C#', 'file_name': 'MailKit.nuspec', 'mime_type': 'text/xml', 'hash': -5266399035358863691, 'source_dataset': 'data'}


The MIT License (MIT)

Copyright (c) Kevin Martensson <kevinmartensson@gmail.com> (github.com/kevva)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

{'repo_name': 'graalvm/graaljs', 'stars': '789', 'repo_language': 'C++', 'file_name': 'osr-typing-debug-change.js', 'mime_type': 'text/plain', 'hash': 1483929439309768647, 'source_dataset': 'data'}


# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

toolboxDockButtons.bottom.tooltip=Vastzetten aan onderkant van browservenster
toolboxDockButtons.side.tooltip=Vastzetten aan zijkant van browservenster
toolboxDockButtons.window.tooltip=Tonen in apart venster

# LOCALIZATION NOTE (toolboxDockButtons.bottom.minimize): This string is shown
# as a tooltip that appears in the toolbox when it is in "bottom host" mode and
# when hovering over the minimize button in the toolbar. When clicked, the
# button minimizes the toolbox so that just the toolbar is visible at the
# bottom.
toolboxDockButtons.bottom.minimize=De werkset minimaliseren

# LOCALIZATION NOTE (toolboxDockButtons.bottom.maximize): This string is shown
# as a tooltip that appears in the toolbox when it is in "bottom host" mode and
# when hovering over the maximize button in the toolbar. When clicked, the
# button maximizes the toolbox again (if it had been minimized before) so that
# the whole toolbox is visible again.
toolboxDockButtons.bottom.maximize=De werkset maximaliseren

# LOCALIZATION NOTE (toolboxToggleButton.errors): Semi-colon list of plural
# forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of errors in the current web page
toolboxToggleButton.errors=#1 fout;#1 fouten

# LOCALIZATION NOTE (toolboxToggleButton.warnings): Semi-colon list of plural
# forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of warnings in the current web page
toolboxToggleButton.warnings=#1 waarschuwing;#1 waarschuwingen

# LOCALIZATION NOTE (toolboxToggleButton.tooltip): This string is shown
# as tooltip in the developer toolbar to open/close the developer tools.
# It's using toolboxToggleButton.errors as first and
# toolboxToggleButton.warnings as second argument to show the number of errors
# and warnings.
toolboxToggleButton.tooltip=%1$S, %2$S\nKlik om ontwikkelaarshulpmiddelen in/uit te schakelen.

# LOCALIZATION NOTE (toolbar.closeButton.tooltip)
# Used as a message in tooltip when overing the close button of the Developer
# Toolbar.
toolbar.closeButton.tooltip=Ontwikkelaarswerkbalk sluiten

# LOCALIZATION NOTE (toolbar.toolsButton.tooltip)
# Used as a message in tooltip when overing the wrench icon of the Developer
# Toolbar, which toggle the developer toolbox.
toolbar.toolsButton.tooltip=Ontwikkelaarshulpmiddelen in-/uitschakelen

# LOCALIZATION NOTE (toolbox.titleTemplate1): This is the template
# used to format the title of the toolbox.
# The URL of the page being targeted: %1$S.
toolbox.titleTemplate1=Ontwikkelaarshulpmiddelen - %1$S

# LOCALIZATION NOTE (toolbox.titleTemplate2): This is the template
# used to format the title of the toolbox.
# The page title or other name for the thing being targeted: %1$S
# The URL of the page being targeted: %2$S.
toolbox.titleTemplate2=Ontwikkelaarshulpmiddelen - %1$S - %2$S

# LOCALIZATION NOTE (toolbox.defaultTitle): This is used as the tool
# name when no tool is selected.
toolbox.defaultTitle=Ontwikkelaarshulpmiddelen

# LOCALIZATION NOTE (toolbox.label): This is used as the label for the
# toolbox as a whole
toolbox.label=Ontwikkelaarshulpmiddelen

# LOCALIZATION NOTE (options.toolNotSupported): This is the template
# used to add a * marker to the label for the Options Panel tool checkbox for the
# tool which is not supported for the current toolbox target.
# The name of the tool: %1$S.
options.toolNotSupportedMarker=%1$S *

# LOCALIZATION NOTE (scratchpad.keycode)
# Used for opening scratchpad from the detached toolbox window
# Needs to match scratchpad.keycode from browser.dtd
scratchpad.keycode=VK_F4

# LOCALIZATION NOTE (browserConsoleCmd.commandkey)
# Used for toggling the browser console from the detached toolbox window
# Needs to match browserConsoleCmd.commandkey from browser.dtd
browserConsoleCmd.commandkey=j

# LOCALIZATION NOTE (pickButton.tooltip)
# This is the tooltip of the pick button in the toolbox toolbar
pickButton.tooltip=Een element van de pagina kiezen

# LOCALIZATION NOTE (sidebar.showAllTabs.tooltip)
# This is the tooltip shown when hover over the '…' button in the tabbed side
# bar, when there's no enough space to show all tabs at once
sidebar.showAllTabs.tooltip=Alle tabbladen

# LOCALIZATION NOTE (toolbox.noContentProcessForTab.message)
# Used as a message in the alert displayed when trying to open a browser
# content toolbox and there is no content process running for the current tab
toolbox.noContentProcessForTab.message=Geen inhoudsproces voor dit tabblad.

# LOCALIZATION NOTE (toolbox.viewCssSourceInStyleEditor.label)
# Used as a message in either tooltips or contextual menu items to open the
# corresponding URL as a css file in the Style-Editor tool.
# DEV NOTE: Mostly used wherever toolbox.viewSourceInStyleEditor is used.
toolbox.viewCssSourceInStyleEditor.label=Bestand openen in Stijleditor

# LOCALIZATION NOTE (toolbox.viewJsSourceInDebugger.label)
# Used as a message in either tooltips or contextual menu items to open the
# corresponding URL as a js file in the Debugger tool.
# DEV NOTE: Mostly used wherever toolbox.viewSourceInDebugger is used.
toolbox.viewJsSourceInDebugger.label=Bestand openen in Debugger

toolbox.resumeOrderWarning=Pagina is niet hervat nadat de debugger werd gekoppeld. Sluit en heropen de werkset om dit te verhelpen.

# LOCALIZATION NOTE (toolbox.options.key)
# Key shortcut used to open the options panel
toolbox.options.key=CmdOrCtrl+Shift+O

# LOCALIZATION NOTE (toolbox.help.key)
# Key shortcut used to open the options panel
toolbox.help.key=F1

# LOCALIZATION NOTE (toolbox.nextTool.key)
# Key shortcut used to select the next tool
toolbox.nextTool.key=CmdOrCtrl+]

# LOCALIZATION NOTE (toolbox.previousTool.key)
# Key shortcut used to select the previous tool
toolbox.previousTool.key=CmdOrCtrl+[

# LOCALIZATION NOTE (toolbox.zoom*.key)
# Key shortcuts used to zomm in/out or reset the toolbox
# Should match fullZoom*Cmd.commandkey values from browser.dtd
toolbox.zoomIn.key=CmdOrCtrl+Plus
toolbox.zoomIn2.key=CmdOrCtrl+=
toolbox.zoomIn3.key=

toolbox.zoomOut.key=CmdOrCtrl+-
toolbox.zoomOut2.key=

toolbox.zoomReset.key=CmdOrCtrl+0
toolbox.zoomReset2.key=

# LOCALIZATION NOTE (toolbox.reload*.key)
# Key shortcuts used to reload the page
toolbox.reload.key=CmdOrCtrl+R
toolbox.reload2.key=F5

# LOCALIZATION NOTE (toolbox.forceReload*.key)
# Key shortcuts used to force reload of the page by bypassing caches
toolbox.forceReload.key=CmdOrCtrl+Shift+R
toolbox.forceReload2.key=CmdOrCtrl+F5

# LOCALIZATION NOTE (toolbox.minimize.key)
# Key shortcut used to minimize the toolbox
toolbox.minimize.key=CmdOrCtrl+Shift+U

# LOCALIZATION NOTE (toolbox.toggleHost.key)
# Key shortcut used to move the toolbox in bottom or side of the browser window
toolbox.toggleHost.key=CmdOrCtrl+Shift+D

# LOCALIZATION NOTE (toolbox.frames.tooltip): This is the label for
# the iframes menu list that appears only when the document has some.
# It allows you to switch the context of the whole toolbox.
toolbox.frames.tooltip=Een iframe als het huidige doeldocument selecteren

# LOCALIZATION NOTE (toolbox.noautohide.tooltip): This is the label for
# the button to force the popups/panels to stay visible on blur.
# This is only visible in the browser toolbox as it is meant for
# addon developers and Firefox contributors.
toolbox.noautohide.tooltip=Automatisch pop-ups verbergen uitschakelen

# LOCALIZATION NOTE (toolbox.closebutton.tooltip): This is the tooltip for
# the close button the developer tools toolbox.
toolbox.closebutton.tooltip=Ontwikkelaarshulpmiddelen sluiten

# LOCALIZATION NOTE (toolbox.allToolsButton.tooltip): This is the tooltip for the
# "all tools" button displayed when some tools are hidden by overflow of the toolbar.
toolbox.allToolsButton.tooltip=Een ander hulpmiddel selecteren

{'repo_name': 'therealglazou/bluegriffon', 'stars': '167', 'repo_language': 'JavaScript', 'file_name': 'template.desktop', 'mime_type': 'text/plain', 'hash': -7821938371214912935, 'source_dataset': 'data'}


//
//  JVYoutubePlayerView+Queuing.h
//  YoutubePlayerDemo
//
//  Created by Jorge Valbuena on 2016-01-24.
//  Copyright © 2016 com.jorgedeveloper. All rights reserved.
//

#import "JVYoutubePlayerView.h"

@interface JVYoutubePlayerView (Queuing)

#pragma mark - Queuing videos

// Queueing functions for videos. These methods correspond to their JavaScript
// equivalents as documented here:
//   https://developers.google.com/youtube/js_api_reference#Queueing_Functions

/**
 Cues a given video by its video ID for playback starting at the given time and with the suggested quality. Cueing loads a video, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cueVideoById

 @param videoId
    A video ID to cue.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cueVideoById:(NSString *)videoId startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Cues a given video by its video ID for playback starting and ending at the given times with the suggested quality. Cueing loads a video, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cueVideoById

 @param videoId
    A video ID to cue.
 @param startSeconds
    Time in seconds to start the video when playVideo() is called.
 @param endSeconds
    Time in seconds to end the video after it begins playing.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cueVideoById:(NSString *)videoId startSeconds:(float)startSeconds endSeconds:(float)endSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a given video by its video ID for playback starting at the given time and with the suggested quality. Loading a video both loads it and begins playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadVideoById

 @param videoId
    A video ID to load and begin playing.
 @param startSeconds
    Time in seconds to start the video when it has loaded.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadVideoById:(NSString *)videoId startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a given video by its video ID for playback starting and ending at the given times with the suggested quality. Loading a video both loads it and begins playback. This method  corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadVideoById

 @param videoId
    A video ID to load and begin playing.
 @param startSeconds
    Time in seconds to start the video when it has loaded.
 @param endSeconds
    Time in seconds to end the video after it begins playing.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadVideoById:(NSString *)videoId startSeconds:(CGFloat)startSeconds endSeconds:(CGFloat)endSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Cues a given video by its URL on YouTube.com for playback starting at the given time and with the suggested quality. Cueing loads a video, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cueVideoByUrl

 @param videoURL
    URL of a YouTube video to cue for playback.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cueVideoByURL:(NSString *)videoURL startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Cues a given video by its URL on YouTube.com for playback starting at the given time and with the suggested quality. Cueing loads a video, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cueVideoByUrl

 @param videoURL
    URL of a YouTube video to cue for playback.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param endSeconds
    Time in seconds to end the video after it begins playing.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cueVideoByURL:(NSString *)videoURL startSeconds:(float)startSeconds endSeconds:(float)endSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a given video by its video ID for playback starting at the given time with the suggested quality. Loading a video both loads it and begins playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadVideoByUrl

 @param videoURL
    URL of a YouTube video to load and play.
 @param startSeconds
    Time in seconds to start the video when it has loaded.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadVideoByURL:(NSString *)videoURL startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a given video by its video ID for playback starting and ending at the given times with the suggested quality. Loading a video both loads it and begins playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadVideoByUrl

 @param videoURL
    URL of a YouTube video to load and play.
 @param startSeconds
    Time in seconds to start the video when it has loaded.
 @param endSeconds
    Time in seconds to end the video after it begins playing.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadVideoByURL:(NSString *)videoURL startSeconds:(float)startSeconds endSeconds:(float)endSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

#pragma mark - Queuing functions for playlists

// Queueing functions for playlists. These methods correspond to
// the JavaScript methods defined here:
//    https://developers.google.com/youtube/js_api_reference#Playlist_Queueing_Functions

/**
 Cues a given playlist with the given ID. The |index| parameter specifies the 0-indexed position of the first video to play, starting at the given time and with the suggested quality. Cueing loads a playlist, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cuePlaylist

 @param playlistId
    Playlist ID of a YouTube playlist to cue.
 @param index
    A 0-indexed position specifying the first video to play.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cuePlaylistByPlaylistId:(NSString *)playlistId index:(int)index startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Cues a playlist of videos with the given video IDs. The |index| parameter specifies the 0-indexed position of the first video to play, starting at the given time and with the suggested quality. Cueing loads a playlist, but does not start video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#cuePlaylist

 @param videoIds
    An NSArray of video IDs to compose the playlist of.
 @param index
    A 0-indexed position specifying the first video to play.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)cuePlaylistByVideos:(NSArray *)videoIds
                      index:(int)index
               startSeconds:(float)startSeconds
           suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a given playlist with the given ID. The |index| parameter specifies the 0-indexed position of the first video to play, starting at the given time and with the suggested quality. Loading a playlist starts video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadPlaylist

 @param playlistId
    Playlist ID of a YouTube playlist to cue.
 @param index
    A 0-indexed position specifying the first video to play.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadPlaylistByPlaylistId:(NSString *)playlistId index:(int)index startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Loads a playlist of videos with the given video IDs. The |index| parameter specifies the 0-indexed position of the first video to play, starting at the given time and with the suggested quality. Loading a playlist starts video playback. This method corresponds with its JavaScript API equivalent as documented here: https://developers.google.com/youtube/iframe_api_reference#loadPlaylist

 @param videoIds
    An NSArray of video IDs to compose the playlist of.
 @param index
    A 0-indexed position specifying the first video to play.
 @param startSeconds
    Time in seconds to start the video when JVYoutubePlayerView::playVideo is called.
 @param suggestedQuality
    JVPlaybackQuality value suggesting a playback quality.
 */
- (void)loadPlaylistByVideos:(NSArray *)videoIds index:(int)index startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

/**
 Private method for loading both cases of playlist ID and array of video IDs. Loading a playlist automatically starts playback.

 @param cueingString
    A JavaScript string representing an array, playlist ID or list of video IDs to play with the playlist player.
 @param index
    0-index position of video to start playback on.
 @param startSeconds
    Seconds after start of video to begin playback.
 @param suggestedQuality
    Suggested JVPlaybackQuality to play the videos.

 @return
    The result of cueing the playlist.
 */
- (void)loadPlaylist:(NSString *)cueingString index:(int)index startSeconds:(float)startSeconds suggestedQuality:(JVPlaybackQuality)suggestedQuality;

@end

{'repo_name': 'JV17/YoutubePlayer', 'stars': '119', 'repo_language': 'Objective-C', 'file_name': 'Contents.json', 'mime_type': 'text/plain', 'hash': 8448086291511830131, 'source_dataset': 'data'}


AutoFormat.PurifierLinkify.DocURL
TYPE: string
VERSION: 2.0.1
DEFAULT: '#%s'
ALIASES: AutoFormatParam.PurifierLinkifyDocURL
--DESCRIPTION--
<p>
  Location of configuration documentation to link to, let %s substitute
  into the configuration's namespace and directive names sans the percent
  sign.
</p>
--# vim: et sw=4 sts=4

{'repo_name': 'aarondunn/bugkick', 'stars': '122', 'repo_language': 'PHP', 'file_name': 'index.jade', 'mime_type': 'text/plain', 'hash': -8452355651044600294, 'source_dataset': 'data'}


///////////////////////////////////////////////////////////////////////////////
// FILE:          XLedCtrl.h
// PROJECT:       Micro-Manager
// SUBSYSTEM:     DeviceAdapters
//-----------------------------------------------------------------------------
// DESCRIPTION:   Definition of X-Cite Led Controller Class
//
// COPYRIGHT:     Lumen Dynamics
//                Mission Bay Imaging, San Francisco, 2011
//
// LICENSE:       This file is distributed under the BSD license.
//                License text is included with the source distribution.
//
//                This file is distributed in the hope that it will be useful,
//                but WITHOUT ANY WARRANTY; without even the implied warranty
//                of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
//                IN NO EVENT SHALL THE COPYRIGHT OWNER(S) OR
//                CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//                INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
//
// AUTHOR:        Lon Chu (lonchu@yahoo.com) created on July 2011
//

#pragma once

#include "../../MMDevice/MMDevice.h"
#include "../../MMDevice/DeviceBase.h"
//#include "../../MMDevice/ModuleInterface.h"

//
// XLED1 is a controller from Lumen Dynamics.
// It accept remote serial input to conrol micromanipulator.
//

class XLedCtrl : public CGenericBase<XLedCtrl>
{
   public:

	  // contructor & destructor
	  // .......................
      XLedCtrl();
      ~XLedCtrl();

      // Device API
      // ---------
      int Initialize();
      int Shutdown();  // shutdown the controller

      void GetName(char* pszName) const;
      bool Busy() { return false; }

	  //int DeInitialize() { m_yInitialized = false; return DEVICE_OK; };
      //bool Initialized() { return m_yInitialized; };
      int ReadAllProperty();
      char* GetXLedStatus(unsigned char* sResp, char* sXLedStatus);
      int GetStatusDescription(long lStatus, char* sStatus);
      // int GetSerialNumber(unsigned char* sResp);

      // action interface
      // ---------------
      int OnPort(MM::PropertyBase* pProp, MM::ActionType eAct);
      int OnDebugLogFlag(MM::PropertyBase* pProp, MM::ActionType eAct);
      int OnState(MM::PropertyBase* pProp, MM::ActionType eAct);
      int OnAllOnOff(MM::PropertyBase* pProp, MM::ActionType eAct);
      int OnPWMStatus(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnPWMMode(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnFrontPanelLock(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnLCDScrnNumber(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnLCDScrnBrite(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnLCDScrnSaver(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnClearAlarm(MM::PropertyBase* pProp, MM::ActionType pAct);
      int OnSpeakerVolume(MM::PropertyBase* pProp, MM::ActionType pAct);
      int ConnectXLed(unsigned char* sResp);

   private:
      int XLedSerialIO(unsigned char* sCmd, unsigned char* sResp);  // write comand to serial port and read message from serial port
      int WriteCommand(const unsigned char* sCommand);              // write command to serial port
      int ReadMessage(unsigned char* sMessage);                     // read message from serial port

      double        m_dAnswerTimeoutMs;     // maximum waiting time for receiving reolied message
      bool          m_yInitialized;         // controller initialized flag
      long          m_lAllOnOff;            // all on/off flag
      long          m_lPWMState;            // PWM status
      long          m_lPWMMode;             // PWM mode
      long          m_lScrnLock;            // front panel lock
      long          m_lScrnNumber;          // screen number
      long          m_lScrnBrite;           // screen brightness
      long          m_lScrnTimeout;         // screen saver time out
      long          m_lSpeakerVol;          // speaker volume
};

{'repo_name': 'micro-manager/micro-manager', 'stars': '104', 'repo_language': 'C++', 'file_name': 'upload_file.php', 'mime_type': 'text/x-php', 'hash': 4036354958296312677, 'source_dataset': 'data'}


{'repo_name': 'jefflomacy/villagerdb', 'stars': '170', 'repo_language': 'JavaScript', 'file_name': 'tammi.json', 'mime_type': 'text/plain', 'hash': -2404930105586106518, 'source_dataset': 'data'}


<?php
/*
 * Copyright 2014 Google Inc.
 *
 * 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.
 */

class Google_Service_AndroidManagement_SetupAction extends Google_Model
{
  protected $descriptionType = 'Google_Service_AndroidManagement_UserFacingMessage';
  protected $descriptionDataType = '';
  protected $launchAppType = 'Google_Service_AndroidManagement_LaunchAppAction';
  protected $launchAppDataType = '';
  protected $titleType = 'Google_Service_AndroidManagement_UserFacingMessage';
  protected $titleDataType = '';

  /**
   * @param Google_Service_AndroidManagement_UserFacingMessage
   */
  public function setDescription(Google_Service_AndroidManagement_UserFacingMessage $description)
  {
    $this->description = $description;
  }
  /**
   * @return Google_Service_AndroidManagement_UserFacingMessage
   */
  public function getDescription()
  {
    return $this->description;
  }
  /**
   * @param Google_Service_AndroidManagement_LaunchAppAction
   */
  public function setLaunchApp(Google_Service_AndroidManagement_LaunchAppAction $launchApp)
  {
    $this->launchApp = $launchApp;
  }
  /**
   * @return Google_Service_AndroidManagement_LaunchAppAction
   */
  public function getLaunchApp()
  {
    return $this->launchApp;
  }
  /**
   * @param Google_Service_AndroidManagement_UserFacingMessage
   */
  public function setTitle(Google_Service_AndroidManagement_UserFacingMessage $title)
  {
    $this->title = $title;
  }
  /**
   * @return Google_Service_AndroidManagement_UserFacingMessage
   */
  public function getTitle()
  {
    return $this->title;
  }
}

{'repo_name': 'googleapis/google-api-php-client-services', 'stars': '842', 'repo_language': 'PHP', 'file_name': 'ServiceTest.php', 'mime_type': 'text/x-php', 'hash': -4169905530930333051, 'source_dataset': 'data'}


/*
 * Copyright 2008 Advanced Micro Devices, Inc.
 * Copyright 2008 Red Hat Inc.
 * Copyright 2009 Jerome Glisse.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Dave Airlie
 *          Alex Deucher
 *          Jerome Glisse
 */

/* this file defines the CHIP_  and family flags used in the pciids,
 * its is common between kms and non-kms because duplicating it and
 * changing one place is fail.
 */
#ifndef RADEON_FAMILY_H
#define RADEON_FAMILY_H
/*
 * Radeon chip families
 */
enum radeon_family {
	CHIP_R100 = 0,
	CHIP_RV100,
	CHIP_RS100,
	CHIP_RV200,
	CHIP_RS200,
	CHIP_R200,
	CHIP_RV250,
	CHIP_RS300,
	CHIP_RV280,
	CHIP_R300,
	CHIP_R350,
	CHIP_RV350,
	CHIP_RV380,
	CHIP_R420,
	CHIP_R423,
	CHIP_RV410,
	CHIP_RS400,
	CHIP_RS480,
	CHIP_RS600,
	CHIP_RS690,
	CHIP_RS740,
	CHIP_RV515,
	CHIP_R520,
	CHIP_RV530,
	CHIP_RV560,
	CHIP_RV570,
	CHIP_R580,
	CHIP_R600,
	CHIP_RV610,
	CHIP_RV630,
	CHIP_RV670,
	CHIP_RV620,
	CHIP_RV635,
	CHIP_RS780,
	CHIP_RS880,
	CHIP_RV770,
	CHIP_RV730,
	CHIP_RV710,
	CHIP_RV740,
	CHIP_CEDAR,
	CHIP_REDWOOD,
	CHIP_JUNIPER,
	CHIP_CYPRESS,
	CHIP_HEMLOCK,
	CHIP_PALM,
	CHIP_SUMO,
	CHIP_SUMO2,
	CHIP_BARTS,
	CHIP_TURKS,
	CHIP_CAICOS,
	CHIP_CAYMAN,
	CHIP_ARUBA,
	CHIP_TAHITI,
	CHIP_PITCAIRN,
	CHIP_VERDE,
	CHIP_OLAND,
	CHIP_HAINAN,
	CHIP_LAST,
};

/*
 * Chip flags
 */
enum radeon_chip_flags {
	RADEON_FAMILY_MASK = 0x0000ffffUL,
	RADEON_FLAGS_MASK = 0xffff0000UL,
	RADEON_IS_MOBILITY = 0x00010000UL,
	RADEON_IS_IGP = 0x00020000UL,
	RADEON_SINGLE_CRTC = 0x00040000UL,
	RADEON_IS_AGP = 0x00080000UL,
	RADEON_HAS_HIERZ = 0x00100000UL,
	RADEON_IS_PCIE = 0x00200000UL,
	RADEON_NEW_MEMMAP = 0x00400000UL,
	RADEON_IS_PCI = 0x00800000UL,
	RADEON_IS_IGPGART = 0x01000000UL,
};

#endif

{'repo_name': 'longsleep/linux-pine64', 'stars': '103', 'repo_language': 'C', 'file_name': 'HalBtc8192d2Ant.c', 'mime_type': 'text/x-c', 'hash': 6613627408146878377, 'source_dataset': 'data'}


// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kubernetes.Types.Outputs.Networking.V1Beta1
{

    [OutputType]
    public sealed class IngressTLS
    {
        /// <summary>
        /// Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
        /// </summary>
        public readonly ImmutableArray<string> Hosts;
        /// <summary>
        /// SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
        /// </summary>
        public readonly string SecretName;

        [OutputConstructor]
        private IngressTLS(
            ImmutableArray<string> hosts,

            string secretName)
        {
            Hosts = hosts;
            SecretName = secretName;
        }
    }
}

{'repo_name': 'pulumi/pulumi-kubernetes', 'stars': '149', 'repo_language': 'Go', 'file_name': 'localSubjectAccessReview.go', 'mime_type': 'text/plain', 'hash': 1802076183741281667, 'source_dataset': 'data'}


# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.

# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
  wrap_parameters format: [:json]
end

# Disable root element in JSON by default.
ActiveSupport.on_load(:active_record) do
  self.include_root_in_json = false
end

{'repo_name': 'lassebunk/dynamic_sitemaps', 'stars': '207', 'repo_language': 'Ruby', 'file_name': '404.html', 'mime_type': 'text/html', 'hash': 4869957488718040640, 'source_dataset': 'data'}


//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under
// the terms of the Eclipse Public License 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0
//
// This Source Code may also be made available under the following
// Secondary Licenses when the conditions for such availability set
// forth in the Eclipse Public License, v. 2.0 are satisfied:
// the Apache License v2.0 which is available at
// https://www.apache.org/licenses/LICENSE-2.0
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//

package org.eclipse.jetty.rewrite.handler;

import java.util.stream.Collectors;

import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

public class MsieRuleTest extends AbstractRuleTestCase
{
    private MsieRule _rule;

    @BeforeEach
    public void init() throws Exception
    {
        // enable SSL
        start(true);
        _rule = new MsieRule();
    }

    @Test
    public void testWin2kSP1WithIE5() throws Exception
    {
        HttpFields.Mutable fields = HttpFields.build(_request.getHttpFields());
        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.01)");
        _request.setHttpFields(fields);

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.01)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.01)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWin2kSP1WithIE6() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.01)"));

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWin2kSP1WithIE7() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.01)"));

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertNull(result);
        assertNull(_response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWin2kWithIE5() throws Exception
    {
        HttpFields.Mutable fields = HttpFields.build(_request.getHttpFields());
        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)");
        _request.setHttpFields(fields);

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWin2kWithIE6() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)")
            .asImmutable());

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWin2kWithIE7() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.0)"));

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertNull(result);
        assertNull(_response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWinVistaWithIE5() throws Exception
    {
        HttpFields.Mutable fields = HttpFields.build(_request.getHttpFields());
        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 6.0)");
        _request.setHttpFields(fields);

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 6.0)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 6.0)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWinVistaWithIE6() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0)"));

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertThat(_request.getHttpFields().stream().map(HttpField::toString).collect(Collectors.toList()),
            contains("Cookie: set=already", "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0)"));
    }

    @Test
    public void testWinVistaWithIE7() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"));

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertNull(result);
        assertNull(_response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWinXpWithIE5() throws Exception
    {
        HttpFields.Mutable fields = HttpFields.build(_request.getHttpFields());
        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.1)");
        _request.setHttpFields(fields);

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.1)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));

        fields.add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.1)");
        _request.setHttpFields(fields);
        result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);
        assertEquals(_request.getRequestURI(), result);
        assertEquals(HttpHeaderValue.CLOSE.asString(), _response.getHeader(HttpHeader.CONNECTION.asString()));
    }

    @Test
    public void testWinXpWithIE6() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)")
            .add(HttpHeader.ACCEPT_ENCODING, "gzip"));

        _response.addHeader("Vary", "Something");

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertThat(_request.getHttpFields().stream().map(HttpField::toString).collect(Collectors.toList()),
            contains("Cookie: set=already", "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"));
        assertThat(_response.getHeader("Vary"), is("Something, User-Agent"));
    }

    @Test
    public void testWinXpWithIE7() throws Exception
    {
        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)")
            .add(HttpHeader.ACCEPT_ENCODING, "gzip"));
        _response.addHeader("Vary", "Something");

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertNull(result);
        assertThat(_request.getHttpFields().stream().map(HttpField::toString).collect(Collectors.toList()),
            contains(
                "Cookie: set=already",
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)",
                "Accept-Encoding: gzip"));

        assertThat(_response.getHeader("Vary"), is("Something, User-Agent"));
    }

    @Test
    public void testWithoutSsl() throws Exception
    {
        // disable SSL
        super.stop();
        super.start(false);

        _request.setHttpFields(HttpFields.build(_request.getHttpFields())
            .add("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)")
            .add(HttpHeader.ACCEPT_ENCODING, "deflate")
        );

        String result = _rule.matchAndApply(_request.getRequestURI(), _request, _response);

        assertEquals(_request.getRequestURI(), result);
        assertThat(_request.getHttpFields().stream().map(HttpField::toString).collect(Collectors.toList()),
            contains("Cookie: set=already", "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)"));
    }
}

{'repo_name': 'eclipse/jetty.project', 'stars': '2901', 'repo_language': 'Java', 'file_name': 'JnrTest.java', 'mime_type': 'text/x-c', 'hash': 6374942666420842709, 'source_dataset': 'data'}


import { AppMeshClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppMeshClient";
import { ListVirtualGatewaysInput, ListVirtualGatewaysOutput } from "../models/models_0";
import {
  deserializeAws_restJson1ListVirtualGatewaysCommand,
  serializeAws_restJson1ListVirtualGatewaysCommand,
} from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
  FinalizeHandlerArguments,
  Handler,
  HandlerExecutionContext,
  MiddlewareStack,
  HttpHandlerOptions as __HttpHandlerOptions,
  MetadataBearer as __MetadataBearer,
  SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

export type ListVirtualGatewaysCommandInput = ListVirtualGatewaysInput;
export type ListVirtualGatewaysCommandOutput = ListVirtualGatewaysOutput & __MetadataBearer;

export class ListVirtualGatewaysCommand extends $Command<
  ListVirtualGatewaysCommandInput,
  ListVirtualGatewaysCommandOutput,
  AppMeshClientResolvedConfig
> {
  // Start section: command_properties
  // End section: command_properties

  constructor(readonly input: ListVirtualGatewaysCommandInput) {
    // Start section: command_constructor
    super();
    // End section: command_constructor
  }

  resolveMiddleware(
    clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
    configuration: AppMeshClientResolvedConfig,
    options?: __HttpHandlerOptions
  ): Handler<ListVirtualGatewaysCommandInput, ListVirtualGatewaysCommandOutput> {
    this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

    const stack = clientStack.concat(this.middlewareStack);

    const { logger } = configuration;
    const handlerExecutionContext: HandlerExecutionContext = {
      logger,
      inputFilterSensitiveLog: ListVirtualGatewaysInput.filterSensitiveLog,
      outputFilterSensitiveLog: ListVirtualGatewaysOutput.filterSensitiveLog,
    };
    const { requestHandler } = configuration;
    return stack.resolve(
      (request: FinalizeHandlerArguments<any>) =>
        requestHandler.handle(request.request as __HttpRequest, options || {}),
      handlerExecutionContext
    );
  }

  private serialize(input: ListVirtualGatewaysCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
    return serializeAws_restJson1ListVirtualGatewaysCommand(input, context);
  }

  private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListVirtualGatewaysCommandOutput> {
    return deserializeAws_restJson1ListVirtualGatewaysCommand(output, context);
  }

  // Start section: command_body_extra
  // End section: command_body_extra
}

{'repo_name': 'aws/aws-sdk-js-v3', 'stars': '355', 'repo_language': 'TypeScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -5295316146644691626, 'source_dataset': 'data'}


require_relative '../../../spec_helper'

describe "Process::Status#signaled?" do

  describe "for a cleanly exited child" do

    before :each do
      ruby_exe("exit(0)")
    end

    it "returns false" do
      $?.signaled?.should be_false
    end
  end

  describe "for a terminated child" do

    before :each do
      ruby_exe("Process.kill(:KILL, $$); exit(42)")
    end

    platform_is_not :windows do
      it "returns true" do
        $?.signaled?.should be_true
      end
    end

    platform_is :windows do
      it "always returns false" do
        $?.signaled?.should be_false
      end
    end

  end
end

{'repo_name': 'ruby/spec', 'stars': '412', 'repo_language': 'Ruby', 'file_name': 'start_with.rb', 'mime_type': 'text/plain', 'hash': 4343181216194893345, 'source_dataset': 'data'}


# Test to check for the different version of truncating a table.
# The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check
# the behaviour of each possible value for BINLOG_FORMAT.

--source include/master-slave.inc

let $trunc_stmt = TRUNCATE TABLE;
--source suite/rpl/include/rpl_truncate_helper.test

let $trunc_stmt   = DELETE FROM;
--source suite/rpl/include/rpl_truncate_helper.test

--source include/rpl_end.inc

{'repo_name': 'MariaDB/server', 'stars': '3422', 'repo_language': 'C++', 'file_name': 'auth_ed25519.test', 'mime_type': 'text/plain', 'hash': 233055520524901282, 'source_dataset': 'data'}


// /** @file
// Implements ACPI metholds for the TCG feature
//
// This driver implements TPM definition block in ACPI table and registers SMI
// callback functions for physical presence and MemoryClear to handle the requests
// from ACPI method.
//
// Caution: This module requires additional review when modified.
// This driver will have external input - variable and ACPINvs data in SMM mode.
// This external input must be validated carefully to avoid security issue.
//
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// **/

#string STR_MODULE_ABSTRACT             #language en-US "Implements ACPI methods for the TCG feature"

#string STR_MODULE_DESCRIPTION          #language en-US "This driver implements TPM definition block in ACPI table and registers SMI callback functions for physical presence and MemoryClear to handle the requests from ACPI method. Caution: This module requires additional review when modified. This driver will have external input - variable and ACPINvs data in SMM mode. This external input must be validated carefully to avoid security issues."

{'repo_name': 'thalium/icebox', 'stars': '373', 'repo_language': 'C++', 'file_name': 'randr.h', 'mime_type': 'text/x-c', 'hash': -4591301674393371199, 'source_dataset': 'data'}


// author: Jannik Strötgen
// email: stroetgen@uni-hd.de
// resources automatically created; see our EMNLP 2015 paper for details:
// https://aclweb.org/anthology/D/D15/D15-1063.pdf
//
// no translations found
THISISADUMMYPATTERN
// english: "month","month" - no translation found

{'repo_name': 'HeidelTime/heideltime', 'stars': '266', 'repo_language': 'Java', 'file_name': 'readme.txt', 'mime_type': 'text/plain', 'hash': -2482707805777049529, 'source_dataset': 'data'}


#ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED

// MS compatible compilers support #pragma once

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif

//
//  boost/detail/lwm_nop.hpp
//
//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

namespace boost
{

namespace detail
{

class lightweight_mutex
{
public:

    typedef lightweight_mutex scoped_lock;
};

} // namespace detail

} // namespace boost

#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED

{'repo_name': 'ctripcorp/CRN', 'stars': '1241', 'repo_language': 'JavaScript', 'file_name': 'ReactAndroid-0.59.0-01-20190327.110133-2.pom', 'mime_type': 'text/xml', 'hash': 2860266385974895931, 'source_dataset': 'data'}


class SomeComponent extends React.Component<
    {
        foo: number,
    },
    {
        bar: string,
    },
> {
    static defaultProps = { foo: 'bar' };
}

{'repo_name': 'lyft/react-javascript-to-typescript-transform', 'stars': '1542', 'repo_language': 'TypeScript', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': 6272253137565597946, 'source_dataset': 'data'}