text:
namespace Nethereum.Generators.Core
{
    public class ABITypeToVBType : ABITypeToDotNetTypeBase
    {
        protected override string GetLongType()
        {
            return "Long";
        }

        protected override string GetULongType()
        {
            return "ULong";
        }

        protected override string GetIntType()
        {
            return "Integer";
        }

        protected override string GetUIntType()
        {
            return "UInteger";
        }

        protected override string GetShortType()
        {
            return "Short";
        }

        protected override string GetUShortType()
        {
            return "UShort";
        }

        protected override string GetByteType()
        {
            return "Byte";
        }

        protected override string GetSByteType()
        {
            return "SByte";
        }

        protected override string GetByteArrayType()
        {
            return "Byte()";
        }

        protected override string GetStringType()
        {
            return "String";
        }

        protected override string GetBooleanType()
        {
            return "Boolean";
        }

        protected override string GetBigIntegerType()
        {
            return "BigInteger";
        }

        protected override string GetArrayType(string type)
        {
            return type + "()";
        }

        protected override string GetListType(string type, int numberOfArrays = 1)
        {
            var output = type;
            for (var i = 0; i < numberOfArrays; i++)
            {
                output = $@"List(Of {output})";
            }
            return output;
        }
    }
}


text:
* enhancement: documented programmatic usage

## 0.1.0 (2012-10-23)

* new feature: files that do not appear in the origin bucket are now automatically deleted from the destination bucket
* enhancement: to save bandwidth and reduce the number of PUT requests, only stale files are copied from origin to destination bucket

redpajama_set_name: RedPajamaGithub


text:
.. _installing-flocker-cli:

=============================
Installing the Flocker Client
=============================

The following sections describe how to install the Flocker client on your platform:

.. contents::
   :local:
   :backlinks: none
   :depth: 2

.. _installing-flocker-cli-ubuntu-15.04:

Ubuntu 15.04
============

.. note:: These instructions require that you have ``sudo`` access.

On Ubuntu 15.04, the Flocker CLI can be installed from the ClusterHQ repository:

.. task:: cli_pkg_install ubuntu-15.04
   :prompt: alice@mercury:~$

.. _installing-flocker-cli-ubuntu-14.04:

Ubuntu 14.04
============

.. note:: These instructions require that you have ``sudo`` access.

On Ubuntu 14.04, the Flocker CLI can be installed from the ClusterHQ repository:

.. task:: cli_pkg_install ubuntu-14.04
   :prompt: alice@mercury:~$

Other Linux Distributions
=========================

.. warning::

   These are guidelines for installing Flocker on a Linux distribution for which we do not provide native packages.
   These guidelines may require some tweaks, depending on the details of the Linux distribution in use.

.. note:: These instructions require that you have ``sudo`` access.

Before you install ``flocker-cli`` you will need a compiler, Python 2.7, and the ``virtualenv`` Python utility installed.

To install these pre-requisites with the ``yum`` package manager, run:

.. task:: cli_pip_prereqs yum
   :prompt: alice@mercury:~$

To install these pre-requisites with the ``apt`` package manager, run:

.. task:: cli_pip_prereqs apt
   :prompt: alice@mercury:~$

To install ``flocker-cli`` in a Python virtualenv, run:

.. task:: cli_pip_install flocker-client
   :prompt: alice@mercury:~$

Whenever you need to run Flocker CLI commands, ensure you are in the virtualenv:

.. task:: cli_pip_test flocker-client
   :prompt: alice@mercury:~$

OS X
====

Install the `Homebrew`_ package manager.

Make sure Homebrew has no issues:

.. prompt:: bash alice@mercury:~$

   brew doctor

Fix anything which ``brew doctor`` recommends that you fix by following the instructions it outputs.

Add the ``ClusterHQ/tap`` tap to Homebrew and install ``flocker``:

.. task:: test_homebrew flocker-|latest-installable|
   :prompt: alice@mercury:~$

You can see the Homebrew recipe in the `homebrew-tap`_ repository.

The ``flocker-deploy`` command line program will now be available:

.. version-code-block:: console

   alice@mercury:~$ flocker-deploy --version
   |latest-installable|
   alice@mercury:~$

Next Step
=========

The next section describes your next step - :ref:`Installing the Flocker Node Services<installing-flocker-node>`.

.. _Homebrew: http://brew.sh
.. _homebrew-tap: https://github.com/ClusterHQ/homebrew-tap


text:
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "output.h"
#include "tree.h"
#include "flags.h"
#include "tm_p.h"
#include "toplev.h"
#include "hashtab.h"

bool
i386_pe_type_dllimport_p (tree decl ATTRIBUTE_UNUSED)
{
  return false;
}

bool
i386_pe_type_dllexport_p (tree decl ATTRIBUTE_UNUSED)
{
  return false;
}

void
i386_pe_adjust_class_at_definition (tree t ATTRIBUTE_UNUSED)
{ }


text:
class MEDIA_EXPORT SourceBufferStream;

namespace media {

class AudioDecoderConfig;
class VideoDecoderConfig;

class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
 public:
  using BufferQueue = base::circular_deque<scoped_refptr<StreamParserBuffer>>;

#if defined(STARBOARD)
  ChunkDemuxerStream(const std::string& mime_type, Type type, MediaTrack::Id media_track_id);
#else  // defined (STARBOARD)
  ChunkDemuxerStream(Type type, MediaTrack::Id media_track_id);
#endif  // defined (STARBOARD)
  ~ChunkDemuxerStream() override;

  // ChunkDemuxerStream control methods.
  void StartReturningData();
  void AbortReads();
  void CompletePendingReadIfPossible();
  void Shutdown();

  // SourceBufferStream manipulation methods.
  void Seek(base::TimeDelta time);
  bool IsSeekWaitingForData() const;

  // Add buffers to this stream.  Buffers are stored in SourceBufferStreams,
  // which handle ordering and overlap resolution.
  // Returns true if buffers were successfully added.
  bool Append(const StreamParser::BufferQueue& buffers);

  // Removes buffers between |start| and |end| according to the steps
  // in the "Coded Frame Removal Algorithm" in the Media Source
  // Extensions Spec.
  // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-coded-frame-removal
  //
  // |duration| is the current duration of the presentation. It is
  // required by the computation outlined in the spec.
  void Remove(base::TimeDelta start, base::TimeDelta end,
              base::TimeDelta duration);

  // If the buffer is full, attempts to try to free up space, as specified in
  // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec.
  // Returns false iff buffer is still full after running eviction.
  // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
  bool EvictCodedFrames(base::TimeDelta media_time, size_t newDataSize);

  void OnMemoryPressure(
      base::TimeDelta media_time,
      base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level,
      bool force_instant_gc);

  // Signal to the stream that duration has changed to |duration|.
  void OnSetDuration(base::TimeDelta duration);

  // Returns the range of buffered data in this stream, capped at |duration|.
  Ranges<base::TimeDelta> GetBufferedRanges(base::TimeDelta duration) const;

  // Returns the highest PTS of the buffered data.
  // Returns base::TimeDelta() if the stream has no buffered data.
  base::TimeDelta GetHighestPresentationTimestamp() const;

  // Returns the duration of the buffered data.
  // Returns base::TimeDelta() if the stream has no buffered data.
  base::TimeDelta GetBufferedDuration() const;

  // Returns the size of the buffered data in bytes.
  size_t GetBufferedSize() const;

  // Signal to the stream that buffers handed in through subsequent calls to
  // Append() belong to a coded frame group that starts at |start_pts|.
  // |start_dts| is used only to help tests verify correctness of calls to this
  // method. If |group_start_observer_cb_| is set, first invokes this test-only
  // callback with |start_dts| and |start_pts| to assist test verification.
  void OnStartOfCodedFrameGroup(DecodeTimestamp start_dts,
                                base::TimeDelta start_pts);

  // Called when midstream config updates occur.
  // For audio and video, if the codec is allowed to change, the caller should
  // set |allow_codec_change| to true.
  // Returns true if the new config is accepted.
  // Returns false if the new config should trigger an error.
  bool UpdateAudioConfig(const AudioDecoderConfig& config,
                         bool allow_codec_change,
                         MediaLog* media_log);
  bool UpdateVideoConfig(const VideoDecoderConfig& config,
                         bool allow_codec_change,
                         MediaLog* media_log);
  void UpdateTextConfig(const TextTrackConfig& config, MediaLog* media_log);

  void MarkEndOfStream();
  void UnmarkEndOfStream();

  // DemuxerStream methods.
#if defined(STARBOARD)
  std::string mime_type() const override { return mime_type_; }
#endif  // defined (STARBOARD)

  void Read(ReadCB read_cb) override;
  Type type() const override;
  Liveness liveness() const override;
  AudioDecoderConfig audio_decoder_config() override;
  VideoDecoderConfig video_decoder_config() override;
  bool SupportsConfigChanges() override;

  bool IsEnabled() const;
  void SetEnabled(bool enabled, base::TimeDelta timestamp);

  // Returns the text track configuration.  It is an error to call this method
  // if type() != TEXT.
  TextTrackConfig text_track_config();

  // Sets the memory limit, in bytes, on the SourceBufferStream.
  void SetStreamMemoryLimit(size_t memory_limit);

  void SetLiveness(Liveness liveness);

  MediaTrack::Id media_track_id() const { return media_track_id_; }

  // Allows tests to verify invocations of Append().
  using AppendObserverCB = base::RepeatingCallback<void(const BufferQueue*)>;
  void set_append_observer_for_testing(AppendObserverCB append_observer_cb) {
    append_observer_cb_ = std::move(append_observer_cb);
  }

  // Allows tests to verify invocations of OnStartOfCodedFrameGroup().
  using GroupStartObserverCB =
      base::RepeatingCallback<void(DecodeTimestamp, base::TimeDelta)>;
  void set_group_start_observer_for_testing(
      GroupStartObserverCB group_start_observer_cb) {
    group_start_observer_cb_ = std::move(group_start_observer_cb);
  }

 private:
  enum State {
    UNINITIALIZED,
    RETURNING_DATA_FOR_READS,
    RETURNING_ABORT_FOR_READS,
    SHUTDOWN,
  };

  // Assigns |state_| to |state|
  void ChangeState_Locked(State state) EXCLUSIVE_LOCKS_REQUIRED(lock_);

  void CompletePendingReadIfPossible_Locked() EXCLUSIVE_LOCKS_REQUIRED(lock_);

#if defined(STARBOARD)
  const std::string mime_type_;
#endif  // defined (STARBOARD)

  // Specifies the type of the stream.
  const Type type_;

  Liveness liveness_ GUARDED_BY(lock_);

  std::unique_ptr<SourceBufferStream> stream_ GUARDED_BY(lock_);

  const MediaTrack::Id media_track_id_;

  // Test-only callbacks to assist verification of Append() and
  // OnStartOfCodedFrameGroup() calls, respectively.
  AppendObserverCB append_observer_cb_;
  GroupStartObserverCB group_start_observer_cb_;

  mutable base::Lock lock_;
  State state_ GUARDED_BY(lock_);
  ReadCB read_cb_ GUARDED_BY(lock_);
  bool is_enabled_ GUARDED_BY(lock_);

  DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream);
};

// Demuxer implementation that allows chunks of media data to be passed
// from JavaScript to the media stack.
class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
 public:
  enum Status {
    kOk,              // ID added w/o error.
    kNotSupported,    // Type specified is not supported.
    kReachedIdLimit,  // Reached ID limit. We can't handle any more IDs.
  };

  // |open_cb| Run when Initialize() is called to signal that the demuxer
  //   is ready to receive media data via AppendData/Chunks().
  // |progress_cb| Run each time data is appended.
  // |encrypted_media_init_data_cb| Run when the demuxer determines that an
  //   encryption key is needed to decrypt the content.
  // |media_log| Used to report content and engine debug messages.
  ChunkDemuxer(base::OnceClosure open_cb,
               base::RepeatingClosure progress_cb,
               EncryptedMediaInitDataCB encrypted_media_init_data_cb,
               MediaLog* media_log);

  ChunkDemuxer(const ChunkDemuxer&) = delete;
  ChunkDemuxer& operator=(const ChunkDemuxer&) = delete;

  ~ChunkDemuxer() override;

  // Demuxer implementation.
  std::string GetDisplayName() const override;

  // |enable_text| Process inband text tracks in the normal way when true,
  //   otherwise ignore them.
  void Initialize(DemuxerHost* host, PipelineStatusCallback init_cb) override;
  void Stop() override;
  void Seek(base::TimeDelta time, PipelineStatusCallback cb) override;
  base::Time GetTimelineOffset() const override;
  std::vector<DemuxerStream*> GetAllStreams() override;
  base::TimeDelta GetStartTime() const override;
  int64_t GetMemoryUsage() const override;
  absl::optional<container_names::MediaContainerName> GetContainerForMetrics()
      const override;
  void AbortPendingReads() override;

  // ChunkDemuxer reads are abortable. StartWaitingForSeek() and
  // CancelPendingSeek() always abort pending and future reads until the
  // expected seek occurs, so that ChunkDemuxer can stay synchronized with the
  // associated JS method calls.
  void StartWaitingForSeek(base::TimeDelta seek_time) override;
  void CancelPendingSeek(base::TimeDelta seek_time) override;

  // Registers a new |id| to use for AppendData/Chunks() calls. |content_type|
  // indicates the MIME type's ContentType and |codecs| indicates the MIME
  // type's "codecs" parameter string (if any) for the data that we intend to
  // append for this ID.  kOk is returned if the demuxer has enough resources to
  // support another ID and supports the format indicated by |content_type| and
  // |codecs|. kReachedIdLimit is returned if the demuxer cannot handle another
  // ID right now. kNotSupported is returned if |content_type| and |codecs| is
  // not a supported format.
  // The |audio_config| and |video_config| overloads behave similarly, except
  // the caller must provide valid, supported decoder configs; those overloads'
  // usage indicates that we intend to append WebCodecs encoded audio or video
  // chunks for this ID.
  Status AddId(const std::string& id,
               const std::string& content_type,
               const std::string& codecs) WARN_UNUSED_RESULT;
  Status AddId(const std::string& id,
               std::unique_ptr<AudioDecoderConfig> audio_config)
      WARN_UNUSED_RESULT;
  Status AddId(const std::string& id,
               std::unique_ptr<VideoDecoderConfig> video_config)
      WARN_UNUSED_RESULT;

#if defined(STARBOARD)
  // Special version of AddId() that retains the |mime_type| from the web app.
  Status AddId(const std::string& id, const std::string& mime_type)
      WARN_UNUSED_RESULT;
#endif  // defined (STARBOARD)

  // Notifies a caller via |tracks_updated_cb| that the set of media tracks
  // for a given |id| has changed. This callback must be set before any calls to
  // AppendData() for this |id|.
  void SetTracksWatcher(const std::string& id,
                        MediaTracksUpdatedCB tracks_updated_cb);

  // Notifies a caller via |parse_warning_cb| of a parse warning. This callback
  // must be set before any calls to AppendData() for this |id|.
  void SetParseWarningCallback(const std::string& id,
                               SourceBufferParseWarningCB parse_warning_cb);

  // Removed an ID & associated resources that were previously added with
  // AddId().
  void RemoveId(const std::string& id);

  // Gets the currently buffered ranges for the specified ID.
  Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const;

  // Gets the highest buffered PTS for the specified |id|. If there is nothing
  // buffered, returns base::TimeDelta().
  base::TimeDelta GetHighestPresentationTimestamp(const std::string& id) const;

  void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids,
                                   base::TimeDelta curr_time,
                                   TrackChangeCB change_completed_cb) override;

  void OnSelectedVideoTrackChanged(const std::vector<MediaTrack::Id>& track_ids,
                                   base::TimeDelta curr_time,
                                   TrackChangeCB change_completed_cb) override;

  // Appends media data to the source buffer associated with |id|, applying
  // and possibly updating |*timestamp_offset| during coded frame processing.
  // |append_window_start| and |append_window_end| correspond to the MSE spec's
  // similarly named source buffer attributes that are used in coded frame
  // processing. Returns true on success, false if the caller needs to run the
  // append error algorithm with decode error parameter set to true.
  bool AppendData(const std::string& id,
                  const uint8_t* data,
                  size_t length,
                  base::TimeDelta append_window_start,
                  base::TimeDelta append_window_end,
                  base::TimeDelta* timestamp_offset) WARN_UNUSED_RESULT;

  // Appends webcodecs encoded chunks (already converted by caller into a
  // BufferQueue of StreamParserBuffers) to the source buffer associated with
  // |id|, with same semantic for other parameters and return value as
  // AppendData().
  bool AppendChunks(const std::string& id,
                    std::unique_ptr<StreamParser::BufferQueue> buffer_queue,
                    base::TimeDelta append_window_start,
                    base::TimeDelta append_window_end,
                    base::TimeDelta* timestamp_offset) WARN_UNUSED_RESULT;

  // Aborts parsing the current segment and reset the parser to a state where
  // it can accept a new segment.
  // Some pending frames can be emitted during that process. These frames are
  // applied |timestamp_offset|.
  void ResetParserState(const std::string& id,
                        base::TimeDelta append_window_start,
                        base::TimeDelta append_window_end,
                        base::TimeDelta* timestamp_offset);

  // Remove buffers between |start| and |end| for the source buffer
  // associated with |id|.
  void Remove(const std::string& id, base::TimeDelta start,
              base::TimeDelta end);

  // Returns whether or not the source buffer associated with |id| can change
  // its parser type to one which parses |content_type| and |codecs|.
  // |content_type| indicates the ContentType of the MIME type for the data that
  // we intend to append for this |id|; |codecs| similarly indicates the MIME
  // type's "codecs" parameter, if any.
  bool CanChangeType(const std::string& id,
                     const std::string& content_type,
                     const std::string& codecs);

  // For the source buffer associated with |id|, changes its parser type to one
  // which parses |content_type| and |codecs|.  |content_type| indicates the
  // ContentType of the MIME type for the data that we intend to append for this
  // |id|; |codecs| similarly indicates the MIME type's "codecs" parameter, if
  // any.  Caller must first ensure CanChangeType() returns true for the same
  // parameters.  Caller must also ensure that ResetParserState() is done before
  // calling this, to flush any pending frames.
  void ChangeType(const std::string& id,
                  const std::string& content_type,
                  const std::string& codecs);

  // If the buffer is full, attempts to try to free up space, as specified in
  // the "Coded Frame Eviction Algorithm" in the Media Source Extensions Spec.
  // Returns false iff buffer is still full after running eviction.
  // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
  bool EvictCodedFrames(const std::string& id,
                        base::TimeDelta currentMediaTime,
                        size_t newDataSize) WARN_UNUSED_RESULT;

  void OnMemoryPressure(
      base::TimeDelta currentMediaTime,
      base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level,
      bool force_instant_gc);

  // Returns the current presentation duration.
  double GetDuration();
  double GetDuration_Locked();

  // Notifies the demuxer that the duration of the media has changed to
  // |duration|.
  void SetDuration(double duration);

  // Returns true if the source buffer associated with |id| is currently parsing
  // a media segment, or false otherwise.
  bool IsParsingMediaSegment(const std::string& id);

  // Returns the 'Generate Timestamps Flag', as described in the MSE Byte Stream
  // Format Registry, for the source buffer associated with |id|.
  bool GetGenerateTimestampsFlag(const std::string& id);

  // Set the append mode to be applied to subsequent buffers appended to the
  // source buffer associated with |id|. If |sequence_mode| is true, caller
  // is requesting "sequence" mode. Otherwise, caller is requesting "segments"
  // mode.
  void SetSequenceMode(const std::string& id, bool sequence_mode);

  // Signals the coded frame processor for the source buffer associated with
  // |id| to update its group start timestamp to be |timestamp_offset| if it is
  // in sequence append mode.
  void SetGroupStartTimestampIfInSequenceMode(const std::string& id,
                                              base::TimeDelta timestamp_offset);

  // Called to signal changes in the "end of stream"
  // state. UnmarkEndOfStream() must not be called if a matching
  // MarkEndOfStream() has not come before it.
  void MarkEndOfStream(PipelineStatus status);
  void UnmarkEndOfStream();

  void Shutdown();

  // Sets the memory limit on each stream of a specific type.
  // |memory_limit| is the maximum number of bytes each stream of type |type|
  // is allowed to hold in its buffer.
  void SetMemoryLimitsForTest(DemuxerStream::Type type, size_t memory_limit);

  // Returns the ranges representing the buffered data in the demuxer.
  // TODO(wolenetz): Remove this method once MediaSourceDelegate no longer
  // requires it for doing hack browser seeks to I-frame on Android. See
  // http://crbug.com/304234.
  Ranges<base::TimeDelta> GetBufferedRanges() const;

 private:
  enum State {
    WAITING_FOR_INIT = 0,
    INITIALIZING,
    INITIALIZED,
    ENDED,

    // Any State at or beyond PARSE_ERROR cannot be changed to a state before
    // this. See ChangeState_Locked.
    PARSE_ERROR,
    SHUTDOWN,
  };

  // Helper for AddId's creation of FrameProcessor, and
  // SourceBufferState creation, initialization and tracking in
  // source_state_map_.
  ChunkDemuxer::Status AddIdInternal(
      const std::string& id,
      std::unique_ptr<media::StreamParser> stream_parser,
      std::string expected_codecs);

  // Helper for vide and audio track changing.
  void FindAndEnableProperTracks(const std::vector<MediaTrack::Id>& track_ids,
                                 base::TimeDelta curr_time,
                                 DemuxerStream::Type track_type,
                                 TrackChangeCB change_completed_cb);

  void ChangeState_Locked(State new_state);

  // Reports an error and puts the demuxer in a state where it won't accept more
  // data.
  void ReportError_Locked(PipelineStatus error);

  // Returns true if any stream has seeked to a time without buffered data.
  bool IsSeekWaitingForData_Locked() const;

  // Returns true if all streams can successfully call EndOfStream,
  // false if any can not.
  bool CanEndOfStream_Locked() const;

  // SourceBufferState callbacks.
  void OnSourceInitDone(const std::string& source_id,
                        const StreamParser::InitParameters& params);

  // Creates a DemuxerStream of the specified |type| for the SourceBufferState
  // with the given |source_id|.
  // Returns a pointer to a new ChunkDemuxerStream instance, which is owned by
  // ChunkDemuxer.
  ChunkDemuxerStream* CreateDemuxerStream(const std::string& source_id,
                                          DemuxerStream::Type type);

  void OnNewTextTrack(ChunkDemuxerStream* text_stream,
                      const TextTrackConfig& config);

  // Returns true if |source_id| is valid, false otherwise.
  bool IsValidId(const std::string& source_id) const;

  // Increases |duration_| to |new_duration|, if |new_duration| is higher.
  void IncreaseDurationIfNecessary(base::TimeDelta new_duration);

  // Decreases |duration_| if the buffered region is less than |duration_| when
  // EndOfStream() is called.
  void DecreaseDurationIfNecessary();

  // Sets |duration_| to |new_duration|, sets |user_specified_duration_| to -1
  // and notifies |host_|.
  void UpdateDuration(base::TimeDelta new_duration);

  // Returns the ranges representing the buffered data in the demuxer.
  Ranges<base::TimeDelta> GetBufferedRanges_Locked() const;

  // Start returning data on all DemuxerStreams.
  void StartReturningData();

  void AbortPendingReads_Locked();

  // Completes any pending reads if it is possible to do so.
  void CompletePendingReadsIfPossible();

  // Seeks all SourceBufferStreams to |seek_time|.
  void SeekAllSources(base::TimeDelta seek_time);

  // Generates and returns a unique media track id.
  static MediaTrack::Id GenerateMediaTrackId();

  // Shuts down all DemuxerStreams by calling Shutdown() on
  // all objects in |source_state_map_|.
  void ShutdownAllStreams();

  // Executes |init_cb_| with |status| and closes out the async trace.
  void RunInitCB_Locked(PipelineStatus status);

  // Executes |seek_cb_| with |status| and closes out the async trace.
  void RunSeekCB_Locked(PipelineStatus status);

  mutable base::Lock lock_;
  State state_;
  bool cancel_next_seek_;

  DemuxerHost* host_;
  base::OnceClosure open_cb_;
  const base::RepeatingClosure progress_cb_;
  EncryptedMediaInitDataCB encrypted_media_init_data_cb_;

  // MediaLog for reporting messages and properties to debug content and engine.
  MediaLog* media_log_;

  PipelineStatusCallback init_cb_;
  // Callback to execute upon seek completion.
  // TODO(wolenetz/acolwell): Protect against possible double-locking by first
  // releasing |lock_| before executing this callback. See
  // http://crbug.com/308226
  PipelineStatusCallback seek_cb_;

  using OwnedChunkDemuxerStreamVector =
      std::vector<std::unique_ptr<ChunkDemuxerStream>>;
  OwnedChunkDemuxerStreamVector audio_streams_;
  OwnedChunkDemuxerStreamVector video_streams_;
  OwnedChunkDemuxerStreamVector text_streams_;

  // Keep track of which ids still remain uninitialized so that we transition
  // into the INITIALIZED only after all ids/SourceBuffers got init segment.
  std::set<std::string> pending_source_init_ids_;

  base::TimeDelta duration_;

  // The duration passed to the last SetDuration(). If
  // SetDuration() is never called or an AppendData/Chunks() call or
  // a EndOfStream() call changes |duration_|, then this
  // variable is set to < 0 to indicate that the |duration_| represents
  // the actual duration instead of a user specified value.
  double user_specified_duration_;

  base::Time timeline_offset_;
  DemuxerStream::Liveness liveness_;

  std::map<std::string, std::unique_ptr<SourceBufferState>> source_state_map_;

  std::map<std::string, std::vector<ChunkDemuxerStream*>> id_to_streams_map_;
  // Used to hold alive the demuxer streams that were created for removed /
  // released SourceBufferState objects. Demuxer clients might still have
  // references to these streams, so we need to keep them alive. But they'll be
  // in a shut down state, so reading from them will return EOS.
  std::vector<std::unique_ptr<ChunkDemuxerStream>> removed_streams_;

  std::map<MediaTrack::Id, ChunkDemuxerStream*> track_id_to_demux_stream_map_;

#if defined(STARBOARD)
  std::map<std::string, std::string> id_to_mime_map_;
#endif  // defined (STARBOARD)
};

}  // namespace media

#endif  // MEDIA_FILTERS_CHUNK_DEMUXER_H_


text:
require "spec_helper"
require "support/shared_examples_for_attributes"

require "cura/attributes/has_initialize"
require "cura/attributes/has_side_attributes"

describe Cura::Attributes::HasSideAttributes do

  let(:instance) do
    instance_class = Class.new
    instance_class.include(Cura::Attributes::HasInitialize)
    instance_class.include(Cura::Attributes::HasSideAttributes)

    instance_class.new
  end

  it_should_behave_like "an object with size accessors", :top, :right, :bottom, :left

end


text:
'''
*********************************************
 File Name: 3d_printer_camera.py
 Python Version: 2.7.11
 Author: Joe Kaufeld
 Email: joe.kaufeld@gmail.com
 Purpose:
   Runs a constant camera stream to attempt to auto-detect 3D prints,
   photograph them, and use the photographs to create a timelapse of the final
   build.
 Notes:
   This program was written for Wil Marquez of the Design Bank in
   Indianapolis, Indiana, USA. It is with his permission that this code is up
   and available. If you'd like more information about the Design Bank and
   their work with fostering creativity in inner city youth, feel free to
   contact him here: design@wpurpose.com
*********************************************
'''

from __future__ import division
from __future__ import print_function

import ftplib
import logging
import os
import shutil
import subprocess
import sys
import time

from time import sleep
from ssim import compute_ssim

if sys.version_info.major < 3:
    import ConfigParser as configparser
else:
    import configparser

try:
    import picamera
except ImportError:
    print("This is a camera application, and you're missing the library!"
          "\nPlease run sudo apt-get install python-picamera and run this "
          "application again!")
    sys.exit(1)

global settings

class settings:
    stills_folder = 'stills'
    completed_timelapse_folder = '/completed_timelapses'
    threshold_percentage = float(0.965)
    timelapse_delay = 1  # delay in seconds
    begin_timelapse_delay = 420  # 5 minute delay to allow for heating and such
    camera = picamera.PiCamera()
    upload_skip = False

    # ignore the ones below; they get changed in runtime

    baseline_picture = None
    currently_recording = False
    picture_count = 0
    recording_start_picture_count = 0
    pic_name = ""
    ftp_host = ""
    ftp_username = ""
    ftp_password = ""

def generate_config(exit=True):

    config = configparser.ConfigParser(allow_no_value=True)
    config.read('config.ini')

    config.add_section('Info')
    config.set('Info', '; The below information is used for uploading '
               'completed videos to an ftp server.')
    config.set('Info', 'ftp_host', settings.ftp_host)
    config.set('Info', 'ftp_username', settings.ftp_username)
    config.set('Info', 'ftp_password', settings.ftp_password)
    config.set('Info', 'stills_folder_location', settings.stills_folder)

    with open('config.ini', 'w') as f:
        config.write(f)

    config_nonexist_error = 'Configuration not found, a default config.ini '\
                            'was created.\n'\
                            'You must edit it before using this script.\n\n'\
                            'Application exiting.'

    if exit:
        print(config_nonexist_error)
        sys.exit()

def start_logging():
    logging.basicConfig(level=logging.DEBUG,
                        datefmt='%m/%d/%Y %I:%M:%S %p',
                        filename='3d_printer_camera.log')
    console = logging.StreamHandler()
    formatter = logging.Formatter('[%(asctime)s] - [%(levelname)s] - '
                                  '%(message)s')
    # tell the handler to use this format
    console.setFormatter(formatter)
    # add the handler to the root logger
    logging.getLogger('').addHandler(console)

def log_error(message, e):
    '''Sends the error and all of its details to logging.error with the custom
    message passed to the function.'''
    logging.error("{}\n\n{}: {}".format(message, type(e).__name__, ', '.join(
                                         map(str, e.args))))

def capture_baseline(settings=settings):
    '''Used to create the first image, the one that determines when to begin
    actually creating the timelapse.'''

    baseline_images = ['baseline1.jpg', 'baseline2.jpg', 'baseline3.jpg']
    # we set this here so we can remove the baseline on keyboard interrupt
    # in main()
    settings.baseline_images = baseline_images

    for picture in baseline_images:
        sleep(1)
        logging.debug("Capturing baseline image {}".format(picture))
        take_picture(picture)

    x = settings.stills_folder + baseline_images[0]
    y = settings.stills_folder + baseline_images[1]
    z = settings.stills_folder + baseline_images[2]

    if(compute_ssim(x, y) > settings.threshold_percentage):
        logging.debug("First baseline check succeeded!")
        if compute_ssim(y, z) > settings.threshold_percentage:
            logging.debug("Second baseline check succeeded!")
            if compute_ssim(z, x) > settings.threshold_percentage:
                logging.info("Successfully created baseline!")
                settings.baseline_image = settings.stills_folder +\
                    baseline_images[0]
                return True
            else:
                logging.debug("Third baseline check failed!")
                return None
        else:
            logging.debug("Second baseline check failed!")
            return None
    else:
        logging.debug("First baseline check failed!")
        return None

def take_picture(picname, camera=settings.camera):
    camera.capture(settings.stills_folder + picname)

def threshold_check(new_pic, old_pic=None, settings=settings):
    if old_pic:
        logging.debug("Checking threshold of {} vs {}".format(
                      new_pic, old_pic))
    else:
        logging.debug("Checking threshold of {}".format(new_pic))

    if old_pic is None:
        old_pic = settings.baseline_image
        if(compute_ssim(settings.stills_folder + new_pic,
                        old_pic) > settings.threshold_percentage):
            return True
        else:
            return False

    if(compute_ssim(settings.stills_folder + new_pic,
                    settings.stills_folder + old_pic) >
       settings.threshold_percentage):
        return True

    # if we get here, nothing has gotten past the threshold percentage.
    return False

def rename_timelapse(movie, folder_contents):
    '''Take the completed video and rename it based on whether or not there are
    others already in the folder we're looking at. Pass in a list of the names
    of items in the target folder for folder_contents.'''

    last_dot = movie.rfind(".")

    for ftu in xrange(99):
        before_last_dot = movie[:last_dot]
        after_last_dot = movie[last_dot:]

        if(before_last_dot + str(ftu) + after_last_dot not in
                folder_contents):
            new_movie_name = before_last_dot + str(ftu) +\
                after_last_dot

            # gotta rename it so now we can upload it or do whatever to it
            shutil.move(movie, new_movie_name)
            movie = new_movie_name
            return movie

def upload_movie(file_to_upload, settings=settings):

    if not settings.upload_skip:
        try:
            logging.info("Attempting to upload finished file via FTP!")

            session = ftplib.FTP(settings.ftp_host)
            session.login(settings.ftp_username, settings.ftp_password)

            # check to see if there's already a timelapse.avi there
            # if so, create a timelapse1.avi and so on and so forth
            session_contents = []
            session.retrlines("NLST", session_contents.append)
            if file_to_upload in session_contents:
                file_to_upload = rename_timelapse(file_to_upload,
                                                  session_contents)

            # file to send
            new_file = open(str(os.getcwd() + "/" + file_to_upload), 'rb')
            # send the file

            session.storbinary('STOR {}'.format(file_to_upload), new_file)
            new_file.close()  # close file and FTP
            session.quit()

            logging.info("Successfully uploaded finished timelapse!!!")
            os.remove(file_to_upload)

            return

        except Exception as e:
            log_error("Something has gone wrong with the FTP process!",
                      e)

    # we want this to run either if skip is set or the upload fails, so we put
    # it down here.

    logging.info("Moving timelapse to completed folder.")

    completed_files = []
    for (dirpath, dirnames, filenames) in os.walk(
            settings.completed_timelapse_folder):
        completed_files.extend(filenames)
        break
    if file_to_upload in completed_files:
        file_to_upload = rename_timelapse(file_to_upload, completed_files)

    shutil.move(file_to_upload,
                settings.completed_timelapse_folder + file_to_upload)

def create_movie():
    logging.info("Creating timelapse; here we go!")
    try:
        print(settings.recording_start_picture_count)

        process_call = 'gst-launch-1.0 multifilesrc location=stills/pic%05d.'\
                       'jpg start-index={} caps="image/jpeg,framerate=24/1" '\
                       '! jpegdec ! omxh264enc ! avimux ! filesink location='\
                       'timelapse.avi'.format(int(settings.
                            recording_start_picture_count+1))
        # we define the call above in order to get around a limitation of
        # subprocess Popen which requires the command to be completely typed
        # as if you were putting it into the console.
        subprocess.call(process_call, shell=True)
        subprocess.call('sync', shell=True)
    except Exception as e:
        log_error("Something went wrong during the creation of the timelapse."
                  "Error log here:", e)
        return

# **************************************************
# Program Logic
# **************************************************

def set_up(settings=settings):
    '''for items that only need to get run once'''

    logging.info("Starting program!")

    config = configparser.ConfigParser(allow_no_value=True)

    if os.path.isfile("./config.ini"):
        config.read('config.ini')
    else:
        generate_config()

    logging.debug("Loading in config file...")
    settings.ftp_host = config.get('Info', 'ftp_host')
    settings.ftp_username = config.get('Info', 'ftp_username')
    settings.ftp_password = config.get('Info', 'ftp_password')

    loaded_settings = [settings.ftp_host, settings.ftp_username,
                       settings.ftp_password]

    for setting in loaded_settings:
        if setting == "":
            setting = None
            logging.debug("Loaded setting for FTP came up empty. Setting to "
                          "None!")
            logging.info("Settings for FTP are not set. Skipping FTP upload.")
            settings.upload_skip = True

    settings.stills_folder = config.get('Info', 'stills_folder_location')

    if not (settings.stills_folder.endswith("/") or
            settings.stills_folder.endswith("\\")):
        # /folder becomes /folder/
        settings.stills_folder = settings.stills_folder + "/"

    if not (settings.stills_folder.startswith("/") or
            settings.stills_folder.startswith("\\")):
        settings.stills_folder = "/" + settings.stills_folder

    settings.stills_folder = os.getcwd() + settings.stills_folder
    settings.completed_timelapse_folder = os.getcwd() +\
        settings.completed_timelapse_folder

def main(settings=settings):

    # this is for resetting the values after the program has started
    # started another timelapse
    settings.currently_recording = False
    settings.picture_count = 0
    beginning_recording_check = [True for _ in range(6)]
    picture_list_check = []
    settings.pic_name = "pic00000.jpg"

    if not os.path.exists(settings.stills_folder):
        logging.debug(
            "Stills folder {} doesn't exist! Creating!".format(
                settings.stills_folder
            )
        )
        os.mkdir(settings.stills_folder)

    if not os.path.exists(settings.completed_timelapse_folder):
        logging.debug("Completed timelapse folder does not exist. Creating!")
        os.mkdir(settings.completed_timelapse_folder)

    # Here we get our first image; we assume at this point that the camera is
    # oriented where it needs to go and that everything is prepared for the
    # upcoming print.
    while True:
        settings.baseline_size = capture_baseline()
        if settings.baseline_size is not None:
            break
    # now that we have our baseline size, we can start doing timelapse images
    # and keeping track of what we have.

    try:

        while True:
            sleep(settings.timelapse_delay)

            settings.picture_count += 1
            settings.pic_name = "pic{}.jpg".format(str(settings.
                                                   picture_count).zfill(5))
            take_picture(settings.pic_name)

            if not settings.currently_recording:

                beginning_recording_check.append(
                    threshold_check(settings.pic_name))
                beginning_recording_check.pop(0)
                logging.debug("beginning_recording_check = {}".format(
                    beginning_recording_check))

                if True not in beginning_recording_check:
                    settings.currently_recording = True
                    settings.recording_start_time = int(time.time())

                    if settings.picture_count - 7 < 0:
                        settings.recording_start_picture_count = 0
                    else:
                        settings.recording_start_picture_count = \
                            settings.picture_count - 7

                oldest_pic = (settings.stills_folder + "pic{}.jpg".
                              format(str(settings.picture_count - 10).
                                     zfill(5)))
                logging.debug("Oldest pic: {}".format(oldest_pic))

                if os.path.exists(oldest_pic):
                    os.remove(oldest_pic)

            else:
                if int(time.time()) < (settings.recording_start_time +
                                       settings.begin_timelapse_delay):
                    logging.debug("Recording time has been triggered. {}"
                                  " seconds left before beginning "
                                  "threshold checks again.".format(
                                    abs((settings.begin_timelapse_delay +
                                         settings.recording_start_time) -
                                        int(time.time()))))
                    # we ignore basically everything for the beginning delay
                    # and assume that everything that happens is part of the
                    # video
                else:
                    pic_minus_seven = "pic{}.jpg".format(str(
                                        settings.picture_count - 7).zfill(5))

                    picture_list_check.append(
                            threshold_check(settings.pic_name,
                                            pic_minus_seven))

                    if len(picture_list_check) > 10:
                        # remove the first item in the list. That way the list
                        # constantly cycles through results.
                        picture_list_check.pop(0)
                        logging.debug(picture_list_check)
                        if False not in picture_list_check:
                            logging.debug("picture_list_check returned all "
                                          "True. Starting movie creation.")

                            settings.currently_recording = False
                            create_movie()
                            upload_movie('timelapse.avi')
                            # we made it this far, so restart the whole
                            # process!
                            shutil.rmtree(settings.stills_folder)
                            break
                    else:
                        logging.debug("picture_list_check is not long enough"
                                      " to begin checking.")

    except KeyboardInterrupt:
        # we don't need the baseline images anymore
        for picture in settings.baseline_images:
            os.remove(settings.stills_folder + picture)
        logging.error("Keyboard interrupt has been triggered. "
                      "Stopping program.")
        sys.exit(1)

if __name__ == '__main__':

    start_logging()
    settings = settings()
    set_up()
    while True:
        main()


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../cl_sys/type.cl_device_local_mem_type.html">

Redirecting to ../../cl_sys/type.cl_device_local_mem_type.html...


text:
from __future__ import unicode_literals
from gevent import monkey, spawn; monkey.patch_all()  # this *must* run first
from django.contrib.staticfiles.management.commands import runserver
from django.utils.autoreload import code_changed, restart_with_reloader
from optparse import make_option
from signal import SIGINT
from socketio.server import SocketIOServer
import django
import os
import subprocess
import sys
import time

# Make reload tracking that Django's original runserver has
# work; the SocketIO server piece breaks it otherwise.
_server_should_reload = False
def reload_watcher():
    global _server_should_reload
    while True:
        _server_should_reload = code_changed()
        if _server_should_reload:
            os.kill(os.getpid(), SIGINT)
        time.sleep(1)

class Command(runserver.Command):
    help = ' '.join((
        'Starts a lightweight socket.io server using gevent,',
        'which will also serve static files and non-socketIO things',
        'through the regular `runserver`, which is a superclass.',
    ))

    option_list = runserver.Command.option_list + (
        make_option('--host',
            default='127.0.0.1',
            dest='host',
            help='Designates the interface to listen on (default: 127.0.0.1).',
        ),
        make_option('--port',
            default=8000,
            dest='port',
            help=' '.join((
                'Designates the port to run the server (default: 8000).',
                'Note: The Flash policy server always runs on port 843.',
            )),
            type='int',
        ),
    )

    def handle(self, *args, **kwargs):
        """Run the websocket server."""

        # Set the settings module for the websocket server.
        if 'DJANGO_SETTINGS_MODULE' not in os.environ:
            os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

        # Import the WSGI handler.
        application = self.get_handler(*args, **kwargs)

        # Print nice things to the console; make it look mostly like
        # the traditional Django dev server.
        print "Django version {version}, using settings '{settings}'.".format(
            settings=os.environ['DJANGO_SETTINGS_MODULE'],
            version=django.get_version(),
        )
        print ' '.join((
            'SocketIO server is listening on port %d' % kwargs['port'],
            'and on port 843 (Flash policy server).',
        ))
        print 'Quit the server with CONTROL-C.'

        # Create the SocketIO server.
        # Pay special attention here to the `resource` keyword argument.
        #   The SocketIO server will only do SocketIO connections on URIs
        #   starting with this resource. So, using "socket.io" as your
        #   resource means that the SocketIO server expects its special
        #   connections to come in at `http://domain.com/socket.io/foo/`.
        # The default on both the Python side and the JavaScript side
        #   is "socket.io", and this is probably the best choice. It's possible
        #   to use something else, but it has to match everywhere and most
        #   likely won't be very DRY unless you jump a lot of hoops.
        socket_io_server = SocketIOServer(
            (kwargs['host'], kwargs['port']),
            application,
            resource='socket.io',
            policy_server=True,
        )

        # Set up the socket io server to actually serve; use the
        # auto-reloader if desired.
        use_reloader = kwargs['use_reloader']
        if use_reloader:
            spawn(reload_watcher)

        # Run the socket.io server within a try/except block
        # (so that if it is shut down, it can be restarted).
        try:
            socket_io_server.serve_forever()
        except KeyboardInterrupt:
            global _server_should_reload
            if _server_should_reload:
                # Set my "should reload" variable back to False.
                _server_should_reload = False

                # Kill the server.
                socket_io_server.kill()
                socket_io_server = None

                # Now, reload a new server.
                print '\nReloading server...'
                restart_with_reloader()
            else:
                print '\r\n\n'
                sys.exit(0)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void ObjectDataSource1_Updated(object sender, ObjectDataSourceStatusEventArgs e)
    {
        e.AffectedRows = Convert.ToInt32(e.ReturnValue);
    }

    //handle exceptions for the row update event
    protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
    {
        if (e.Exception != null)
        {
            lblError.Text = "A database error has occurred.

" + e.Exception.Message;
            if (e.Exception.InnerException != null)
                lblError.Text += "
 Message: " + e.Exception.InnerException.Message;
            e.ExceptionHandled = true;
            e.KeepInEditMode = true;
        }
        else if (e.AffectedRows == 0)
        {
            lblError.Text = "Another user may have updated that repair, please try again.";
        }
    }
    protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        lblError.Text = "";
    }
}


text:
<?php

namespace Tradesy\Innobackupex\S3\Remote;

use \Tradesy\Innobackupex\LoadInterface;
use \Tradesy\Innobackupex\ConnectionInterface;
use \Tradesy\Innobackupex\Exceptions\CLINotFoundException;
use \Tradesy\Innobackupex\Exceptions\BucketNotFoundException;
use \Tradesy\Innobackupex\LoggingTraits;

class Download implements LoadInterface {

    use LoggingTraits;

    protected $connection;
    protected $bucket;
    protected $region;
    protected $source;
    protected $key;
    protected $remove_file_after_upload;
    protected $concurrency;
    protected $binary = "aws";

    /**
     * Upload constructor.
     * @param $connection
     * @param $bucket
     * @param $key
     * @param $region
     * @param int $concurrency
     * @param bool $remove_file_after_upload
     */
    public function __construct(
        ConnectionInterface $connection,
        $bucket,
        $region,
        $concurrency = 10,
        $remove_file_after_upload = false
    ){
        $this->connection               = $connection;
        $this->bucket                   = $bucket;
        $this->region                   = $region;
        $this->concurrency              = $concurrency;
        $this->remove_file_after_upload = $remove_file_after_upload;
        $this->testSave();
    }
    public function testSave()
    {
        $command = "which " . $this->binary;
        $response = $this->connection->executeCommand($command);
        if(strlen($response->stdout()) == 0
            || preg_match("/not found/i", $response->stdout())){
            throw new CLINotFoundException(
                $this->binary ." CLI not installed.",
                0
            );
        }
        $command = $this->binary .
            " --region " . $this->region .
            " s3 ls " . $this->bucket ." 2>&1 | grep -c 'AllAccessDisabled\|NoSuchBucket'" ;
        $response = $this->connection->executeCommand($command);
        if(intval($response->stdout())==1){
            throw new BucketNotFoundException(
                "S3 bucket (" . $this->bucket . ")  not found in region (" .
                $this->region .")",
                0
            );
        }

    }

    public function load( \Tradesy\Innobackupex\Backup\Info $info, $filename)
    {
        $local_filename = $info->getBaseBackupDirectory() . DIRECTORY_SEPARATOR . $filename;

        $this->key = DIRECTORY_SEPARATOR . $info->getRepositoryBaseName() . DIRECTORY_SEPARATOR . $filename;
        $command = $this->binary
            ." s3 sync s3://" . $this->bucket . $this->key . " $local_filename";
        $this->logDebug($command);

        $response = $this->connection->executeCommand(
            $command
        );
        $this->logDebug($response->stdout());
        $this->logError($response->stderr());

    }
    public function cleanup()
    {
        /* $command = "sudo rm -f " . $this->getFullPathToBackup();
        return $this->connection->executeCommand(
            $command
        );
        */
    }

    public function getBackupInfo($backup_info_filename){

        $response = $this->connection->executeCommand($command);
        echo $response->stdout();
        echo $response->stderr();

    }

    public function verify()
    {

    }
    /**
     * @param mixed $key
     */
    public function setKey($key)
    {
        $this->key = $key;
    }
}