text:
#ifndef TENSORFLOW_STREAM_EXECUTOR_STREAM_EXECUTOR_PIMPL_H_
#define TENSORFLOW_STREAM_EXECUTOR_STREAM_EXECUTOR_PIMPL_H_

#include <atomic>
#include <memory>
#include <set>
#include <tuple>
#include <vector>

#include "absl/base/macros.h"
#include "absl/memory/memory.h"
#include "absl/synchronization/mutex.h"
#include "absl/types/optional.h"
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/stream_executor/device_memory_allocator.h"
#include "tensorflow/stream_executor/lib/status.h"
#include "tensorflow/stream_executor/lib/statusor.h"
#include "tensorflow/stream_executor/lib/threadpool.h"
#include "tensorflow/stream_executor/platform.h"
#include "tensorflow/stream_executor/platform/logging.h"
#include "tensorflow/stream_executor/platform/port.h"
#include "tensorflow/stream_executor/rng.h"
#include "tensorflow/stream_executor/stream_executor_internal.h"
#include "tensorflow/stream_executor/trace_listener.h"
#if GOOGLE_CUDA
#include "tensorflow/stream_executor/cuda/cuda_dnn.h"
#endif  // GOOGLE_CUDA

namespace stream_executor {

class Stream;

// Structure used for device memory leak checking.
struct AllocRecord {
  // The requested allocation size of the buffer.
  uint64_t bytes;

  // Holds a representation of the stack at the time the associated buffer was
  // allocated. Produced in a form described in
  // //util/symbolize/symbolized_stacktrace.h.
  std::string stack_trace;
};

// Forward declaration of private friend class.
template <typename BeginCallT, typename CompleteCallT, typename ReturnT,
          typename... BeginArgsT>
class ScopedTracer;

// A StreamExecutor manages a single device, in terms of executing work (kernel
// launches) and memory management (allocation/deallocation, memory copies to
// and from the device). It is conceptually the "handle" for a device -- Stream
// objects, which are used to enqueue work to run on the
// coprocessor have a StreamExecutor instance as their "parent" object.
//
// StreamExecutor objects have an underlying platform that is specified up
// front;
// e.g. either it is a CUDA or OpenCL executor.
//
// Thread-safe after initialization.
// StreamExecutor interface should not be invoked from a signal handler.
class StreamExecutor {
 public:
  StreamExecutor(
      const Platform* platform,
      std::unique_ptr<internal::StreamExecutorInterface> implementation,
      int device_ordinal);

  ~StreamExecutor();

  port::Status Init();
  port::Status Init(DeviceOptions device_options);

  // Returns the platform that this StreamExecutor is acting upon.
  ABSL_DEPRECATED("Use platform() instead.")
  PlatformKind platform_kind() const { return platform_kind_; }

  // Returns a reference to the platform that created this executor.
  const Platform* platform() const { return platform_; }

  // Retrieves (loads) a kernel for the platform this StreamExecutor is acting
  // upon, if one exists.
  //
  // Parameters:
  //   spec: The MultiKernelLoaderSpec is usually generated as a compile-time
  //    constant into an appropriate namespace. For example, see
  //    stream_executor::executor_sample::kKernelLoaderSpecs, from which a
  //    MultiKernelLoaderSpec is selected.
  //   kernel: Outparam that the kernel is loaded into. A given Kernel
  //    instantiation should not be loaded into more than once.
  //
  // If an error occurs, or there is no kernel available for the StreamExecutor
  // platform, error status is returned.
  port::Status GetKernel(const MultiKernelLoaderSpec& spec, KernelBase* kernel);

  // Releases any state associated with the previously loaded kernel.
  void UnloadKernel(const KernelBase* kernel);

  // Loads a module for the platform this StreamExecutor is acting upon.
  //
  // `spec` describes the module to be loaded.  On success writes the handle for
  // the loaded module to `module_handle` and returns Status::OK.
  // Otherwise, returns the error which has occurred.
  port::Status LoadModule(const MultiModuleLoaderSpec& spec,
                          ModuleHandle* module_handle);

  // Unloads the module with handle `module_handle`.
  bool UnloadModule(ModuleHandle module_handle);

  // Synchronously allocates an array on the device of type T with element_count
  // elements.
  template <typename T>
  DeviceMemory<T> AllocateArray(uint64_t element_count,
                                int64_t memory_space = 0);

  // As AllocateArray(), but returns a ScopedDeviceMemory<T>.
  template <typename T>
  ScopedDeviceMemory<T> AllocateOwnedArray(uint64_t element_count) {
    return ScopedDeviceMemory<T>(this, AllocateArray<T>(element_count));
  }

  // Convenience wrapper that allocates space for a single element of type T in
  // device memory.
  template <typename T>
  DeviceMemory<T> AllocateScalar() {
    return AllocateArray<T>(1);
  }

  // As AllocateScalar(), but returns a ScopedDeviceMemory<T>.
  template <typename T>
  ScopedDeviceMemory<T> AllocateOwnedScalar() {
    return AllocateOwnedArray<T>(1);
  }

  // Synchronously allocates a scalar of type T on the device that is (POD)
  // zero-byte initialized.
  template <typename T>
  DeviceMemory<T> AllocateZeroed();

  // As AllocateZeroed(), but returns a ScopedDeviceMemory<T>.
  template <typename T>
  ScopedDeviceMemory<T> AllocateOwnedZeroed() {
    return ScopedDeviceMemory<T>(this, AllocateZeroed<T>());
  }

  // Allocate a memory region inside another allocated memory region.
  // Offset and size are specified in terms of T elements.
  // Warning: Do not free a parent buffer before its sub-buffers; this may cause
  // use-after-free issues (the specific behavior is not consistent across
  // platforms).
  //  - Note: OpenCL uses refcounting to manage buffer lifetimes, so use of a
  //    sub-buffer after parent deallocation is expected to be safe. This will
  //    render your code non-platform-portable, however.
  template <typename T>
  DeviceMemory<T> GetSubBuffer(DeviceMemory<T>* parent, uint64_t element_offset,
                               uint64_t element_count);

  // Finds a symbol within the module corresponding to `module_handle` and
  // returns device memory allocated to the symbol. The user has to make sure
  // that the type of symbol and T match.
  // - Note: symbol_name should include its namespace as well. For example,
  //         pass "nms0::symbol" if referring to nms0::symbol.
  template <typename T>
  port::StatusOr<DeviceMemory<T>> GetSymbol(const std::string& symbol_name,
                                            ModuleHandle module_handle);

  // An untyped version of GetSymbol.
  port::StatusOr<DeviceMemoryBase> GetUntypedSymbol(
      const std::string& symbol_name, ModuleHandle module_handle);

  // Deallocate the DeviceMemory previously allocated via this interface.
  // Deallocation of a nullptr-representative value is permitted.
  //
  // Resets the internal contents of mem to be null-representative, but this
  // null-out effect should not be relied upon in client code.
  void Deallocate(DeviceMemoryBase* mem);

  // Retrieves a mapping of active opaque device memory pointer to a string
  // representation of the [allocating thread's] stack at the time the pointer
  // was allocated. Useful for tracking device memory leaks.
  //
  // Note: this will only be populated if --check_device_leaks flag is
  // activated.
  void GetMemAllocs(std::map<void*, AllocRecord>* records_out);

  // Allocates unified memory space of the given size, if supported.
  // See
  // https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-unified-memory-programming-hd
  // for more details on unified memory.
  void* UnifiedMemoryAllocate(uint64_t bytes);

  // Deallocates unified memory space previously allocated with
  // UnifiedMemoryAllocate.
  void UnifiedMemoryDeallocate(void* location);

  // Allocates a region of host memory and registers it with the platform API.
  // Memory allocated in this manner (or allocated and registered with
  // HostMemoryRegister() is required for use in asynchronous memcpy operations,
  // such as Stream::ThenMemcpy.
  void* HostMemoryAllocate(uint64_t size);

  // Deallocates a region of host memory allocated by HostMemoryAllocate().
  void HostMemoryDeallocate(void* location);

  // Registers a region of host memory with the platform API. Registered memory
  // (or memory allocated with HostMemoryAllocate) is required for use with
  // asynchronous memcpy operations, such as Stream::ThenMemcpy. This method
  // is used to register memory allocated outside the StreamExecutor;
  // HostMemoryAllocate implicitly registers its allocations and
  // HostMemoryDeallocate implicitly deregisters on deallocation.
  bool HostMemoryRegister(void* location, uint64_t size) SE_MUST_USE_RESULT;

  // Unregisters a region of host memory registered with HostMemoryRegister.
  // This should be done before deallocating the region with delete[]/free/etc.
  bool HostMemoryUnregister(void* location) SE_MUST_USE_RESULT;

  // Synchronizes all activity occurring in the StreamExecutor's context (most
  // likely a whole device).
  bool SynchronizeAllActivity() SE_MUST_USE_RESULT;

  // Blocks the caller while "size" bytes are zeroed out (in POD fashion) at the
  // given location in device memory.
  port::Status SynchronousMemZero(DeviceMemoryBase* location,
                                  uint64_t size) SE_MUST_USE_RESULT;

  // Blocks the caller while "size" bytes are initialized to "value" (in POD
  // fashion) at the given location in device memory.
  port::Status SynchronousMemSet(DeviceMemoryBase* location, int value,
                                 uint64_t size) SE_MUST_USE_RESULT;

  // [deprecated] Blocks the caller while a data segment of the given size is
  // copied from the host source to the device destination.
  ABSL_DEPRECATED(
      "Prefer SynchronousMemcpyH2D, to avoid error-prone API usage.")
  bool SynchronousMemcpy(DeviceMemoryBase* device_dst, const void* host_src,
                         uint64_t size) SE_MUST_USE_RESULT;

  // [deprecated] Blocks the caller while a data segment of the given size is
  // copied from the device source to the host destination.
  ABSL_DEPRECATED(
      "Prefer SynchronousMemcpyD2H, to avoid error-prone API usage.")
  bool SynchronousMemcpy(void* host_dst, const DeviceMemoryBase& device_src,
                         uint64_t size) SE_MUST_USE_RESULT;

  // Same as SynchronousMemcpy(DeviceMemoryBase*, ...) above.
  port::Status SynchronousMemcpyH2D(const void* host_src, int64_t size,
                                    DeviceMemoryBase* device_dst);

  // Alternative interface for memcpying from host to device that takes an
  // array slice. Checks that the destination size can accommodate the host
  // slice size.
  template <class T>
  port::Status SynchronousMemcpyH2D(port::ArraySlice<T> host_src,
                                    DeviceMemoryBase* device_dst) {
    auto host_size = host_src.size() * sizeof(T);
    CHECK(device_dst->size() == 0 || device_dst->size() >= host_size);
    return SynchronousMemcpyH2D(host_src.begin(), host_size, device_dst);
  }

  // Same as SynchronousMemcpy(void*, ...) above.
  port::Status SynchronousMemcpyD2H(const DeviceMemoryBase& device_src,
                                    int64_t size, void* host_dst);

  // Alternative interface for memcpying from device to host that takes an
  // array slice. Checks that the destination size can accommodate the host
  // slice size.
  template <typename T>
  port::Status SynchronousMemcpyD2H(const DeviceMemory<T>& device_src,
                                    port::MutableArraySlice<T> host_dst) {
    auto host_size = host_dst.size() * sizeof(T);
    CHECK(device_src.size() == 0 || host_size >= device_src.size());
    return SynchronousMemcpyD2H(device_src, host_size, host_dst.begin());
  }

  // Blocks the caller while a data segment of the given size is copied from the
  // device source to the device destination.
  bool SynchronousMemcpy(DeviceMemoryBase* device_dst,
                         const DeviceMemoryBase& device_src,
                         uint64_t size) SE_MUST_USE_RESULT;

  // Enqueues an operation onto stream to zero out size bytes at the given
  // device memory location. Neither stream nor location may be null. Returns
  // whether the operation was successfully enqueued onto the stream.
  port::Status MemZero(Stream* stream, DeviceMemoryBase* location,
                       uint64_t size) SE_MUST_USE_RESULT;

  // Enqueues an operation onto stream to set 32-bit patterns starting at
  // location, for byte count given by size. size must be 32-bit quantified
  // (i.e. evently divisible by 4). Returns whether the operation was
  // successfully enqueued onto the stream.
  port::Status Memset32(Stream* stream, DeviceMemoryBase* location,
                        uint32 pattern, uint64_t size);

  // Enables peer access from this StreamExecutor to memory
  // allocated by other, such that launched device code, memcpies, etc may
  // access it directly.
  //
  // Both this StreamExecutor and other must be backed by the same platform (as
  // in
  // CUDA vs OpenCL) implementation.
  port::Status EnablePeerAccessTo(StreamExecutor* other);

  // Returns whether it's possible to enable peer access from this
  // StreamExecutor
  // to memory allocated by another.
  //
  // Even when this returns true, EnablePeerAccessTo may fail for other reasons;
  // this is more an up-front test as to whether it's expressly forbidden.
  bool CanEnablePeerAccessTo(StreamExecutor* other);

  // Obtains metadata about the underlying device.
  // The value is cached on first use.
  const DeviceDescription& GetDeviceDescription() const;

  // If implemented, returns device specific measurement of load
  // (e.g. pending requests).
  int64_t GetDeviceLoad() const;

  // Returns the underlying device memory usage information, if it is available.
  // If it is not available (false is returned), free/total may not be
  // initialized.
  //
  // Note: "Free" reflects the amount of free memory on the underlying device,
  // so allocations via other StreamExecutors that have the same underlying
  // device
  // will be reflected in "free".
  bool DeviceMemoryUsage(int64_t* free, int64_t* total) const;

  // The device count reported by this StreamExecutor's platform.
  // Note: on OpenCL we implicitly select platform zero at the moment.
  int PlatformDeviceCount() const;

  // Returns whether the StreamExecutor supports BLAS routines for the platform
  // that underlies this interface.
  bool SupportsBlas() const;

  // Returns whether the StreamExecutor supports FFT routines for the platform
  // that underlies this interface.
  bool SupportsFft() const;

  // Returns whether the StreamExecutor supports RNG routines for the platform
  // that underlies this interface.
  bool SupportsRng() const;

  // Returns whether the StreamExecutor support neural net routines for the
  // platform that underlies this interface.
  bool SupportsDnn() const;

  // Returns the list of supported algorithms for the specified convolution
  // operation.
  bool GetConvolveAlgorithms(dnn::ConvolutionKind kind,
                             std::vector<dnn::AlgorithmDesc>* out_algorithms);

  // Returns the supported algorithms / execution plans for a convolution.
  port::Status GetConvolveRunners(
      bool use_cudnn_frontend, dnn::ConvolutionKind kind,
      dnn::DataType input_type, dnn::DataType output_type, Stream* stream,
      const dnn::BatchDescriptor& input_descriptor, DeviceMemoryBase input_data,
      const dnn::FilterDescriptor& filter_descriptor,
      DeviceMemoryBase filter_data,
      const dnn::BatchDescriptor& output_descriptor,
      DeviceMemoryBase output_data,
      const dnn::ConvolutionDescriptor& convolution_descriptor,
      bool use_fallback, ScratchAllocator* scratch_allocator,
      std::vector<std::unique_ptr<const dnn::ConvRunner>>* out_exec_plans);

  port::Status GetFusedConvolveRunners(
      bool use_cudnn_frontend, dnn::ConvolutionKind kind,
      dnn::DataType input_type, dnn::DataType bias_type,
      dnn::DataType output_type, double conv_input_scale,
      double side_input_scale, Stream* stream,
      const dnn::BatchDescriptor& input_descriptor,
      const dnn::FilterDescriptor& filter_descriptor,
      const dnn::BatchDescriptor& bias_descriptor,
      const dnn::BatchDescriptor& output_descriptor,
      const dnn::ConvolutionDescriptor& convolution_descriptor,
      bool use_fallback, dnn::ActivationMode activation_mode,
      std::vector<std::unique_ptr<const dnn::FusedConvRunner>>* out_exec_plans);

  // Returns the list of supported algorithms for the forward convolution
  // operation.
  bool GetMIOpenConvolveAlgorithms(
      dnn::ConvolutionKind kind, dnn::DataType element_type, Stream* stream,
      const dnn::BatchDescriptor& input_descriptor, DeviceMemoryBase input_data,
      const dnn::FilterDescriptor& filter_descriptor,
      DeviceMemoryBase filter_data,
      const dnn::BatchDescriptor& output_descriptor,
      DeviceMemoryBase output_data,
      const dnn::ConvolutionDescriptor& convolution_descriptor,
      ScratchAllocator* scratch_allocator,
      std::vector<dnn::ProfileResult>* out_algorithms);

  // Returns the list of supported algorithms for rnn operation.
  bool GetRnnAlgorithms(std::vector<dnn::AlgorithmDesc>* out_algorithms);

  // Get the list of supported algorithms for BLAS gemm.
  bool GetBlasGemmAlgorithms(std::vector<blas::AlgorithmType>* out_algorithms);

  // Creates a backend-specific plan object for a blaslt matmul operation, which
  // can then be passed to DoBlasLtMatmul(). When possible, plans should be
  // created once and reused for multiple calls to DoBlasLtMatmul().
  // Returns a null pointer on failure.
  port::StatusOr<std::unique_ptr<blas::IBlasLtMatmulPlan>>
  CreateBlasLtMatmulPlan(const blas::BlasLtMatmulPlanParams& params);

  // Gets a list of supported algorithms for DoBlasLtMatmul. The algorithms are
  // returned in the order of increasing estimated compute time according to an
  // internal heuristic. The first returned algorithm can be used as the default
  // algorithm if no autotuning is to be performed.
  port::StatusOr<std::vector<std::unique_ptr<blas::IBlasLtMatmulAlgorithm>>>
  GetBlasLtMatmulAlgorithms(const blas::IBlasLtMatmulPlan* plan,
                            size_t max_workspace_size, int max_algorithm_count);

  // Create an RNN descriptor based on model shapes and configurations.
  // The caller retains the ownership of the descriptor.
  port::StatusOr<std::unique_ptr<dnn::RnnDescriptor>> createRnnDescriptor(
      int num_layers, int hidden_size, int input_size, int cell_size,
      int batch_size, dnn::RnnInputMode input_mode,
      dnn::RnnDirectionMode direction_mode, dnn::RnnMode rnn_mode,
      dnn::DataType data_type, const dnn::AlgorithmConfig& algorithm_config,
      float dropout, uint64_t seed, ScratchAllocator* state_allocator,
      bool use_padded_io);

  // Create a RNN sequence descriptor that specifies either the input or output
  // sequence. The caller retains the ownership of the returned descriptor.
  port::StatusOr<std::unique_ptr<dnn::RnnSequenceTensorDescriptor>>
  createRnnSequenceTensorDescriptor(int max_seq_length, int batch_size,
                                    int data_size, dnn::DataType data_type);

  port::StatusOr<std::unique_ptr<dnn::RnnSequenceTensorDescriptor>>
  createRnnSequenceTensorDescriptor(int max_seq_length, int batch_size,
                                    int data_size,
                                    const absl::Span<const int>& seq_lengths,
                                    bool time_major, dnn::DataType data_type);

  // Create an RNN state descriptor that specifies the input or hidden state.
  // The caller retains the ownership of the returned descriptor.
  port::StatusOr<std::unique_ptr<dnn::RnnStateTensorDescriptor>>
  createRnnStateTensorDescriptor(int num_layer, int batch_size, int data_size,
                                 dnn::DataType data_type);

  // Returns the device ordinal that this StreamExecutor was initialized with.
  // Meaningless before initialization.
  int device_ordinal() const { return device_ordinal_; }

  // Returns a borrowed pointer to the underlying StreamExecutor implementation.
  internal::StreamExecutorInterface* implementation();

  // Creates a kernel which can be launched with stream.ThenLaunch, such that
  // the types of the arguments provided for launch would have to match
  // types of the arguments provided at creation time.
  //
  // The kernel has a name kernel_name, and is based from provided PTX in ptx,
  // and (optional) compiled PTX in cubin_data.
  // The canonical storage for both ptx and cubin_data should outlive the
  // lifetime of the kernel.
  template <typename... Args>
  port::StatusOr<std::unique_ptr<TypedKernel<Args...>>> CreateTypedKernel(
      absl::string_view kernel_name, absl::string_view ptx,
      absl::Span<const uint8> cubin_data);

  // Warning: use Stream::ThenLaunch instead, this method is not for general
  // consumption. However, this is the only way to launch a kernel for which
  // the type signature is only known at runtime; say, if an application
  // supports loading/launching kernels with arbitrary type signatures.
  // In this case, the application is expected to know how to do parameter
  // packing that obeys the contract of the underlying platform implementation.
  //
  // Launches a data parallel kernel with the given thread/block
  // dimensionality and already-packed args/sizes to pass to the underlying
  // platform driver.
  //
  // This is called by Stream::Launch() to delegate to the platform's launch
  // implementation in StreamExecutorInterface::Launch().
  port::Status Launch(Stream* stream, const ThreadDim& thread_dims,
                      const BlockDim& block_dims, const KernelBase& kernel,
                      const KernelArgsArrayBase& args);

  // Gets-or-creates (creates with memoization) a FftSupport datatype that can
  // be used to execute FFT routines on the current platform.
  //
  // Ownership and user-facing is the same as AsBlas() below.
  //
  // Returns null if there was an error initializing the FFT support for the
  // underlying platform.
  fft::FftSupport* AsFft();

  // Gets-or-creates (creates with memoization) a DnnSupport datatype that can
  // be used for neural network routines on the current platform.
  //
  // Ownership and user-facing is the same as AsBlas() below.
  //
  // Returns null if there was an error initializing the DNN support for the
  // underlying platform.
  dnn::DnnSupport* AsDnn();

  // Gets-or-creates (creates with memoization) a BlasSupport datatype that can
  // be used to execute BLAS routines on the current platform. This is typically
  // not user-facing, as users will use the Stream::ThenBlas* family of routines
  // to entrain BLAS operations. See blas.h for additional details.
  //
  // Ownership is not transferred to the caller -- ownership is retained by this
  // object for memoization. This BLAS interface is also only expected to be
  // used by a Stream for entraining calls to BLAS functionality.
  //
  // Returns null if there was an error initializing the BLAS support for the
  // underlying platform.
  blas::BlasSupport* AsBlas();

  // Turns StreamExecutor operation tracing on or off.
  void EnableTracing(bool enable);

  // Registers a trace listener to receive callbacks for only a single
  // StreamExecutor instance.
  // To register a listener for all executors for a given platform, see
  // Platform::RegisterTraceListener().
  // Does not take ownership of listener.
  void RegisterTraceListener(TraceListener* listener);

  // Removes a TraceListener from this StreamExecutor instance.
  // Returns false (and logs) in cases where the argument listener was not
  // previously registered.
  bool UnregisterTraceListener(TraceListener* listener);

  // Return allocator statistics.
  absl::optional<AllocatorStats> GetAllocatorStats();

  // Clears the internal stats except for the `in_use` fields
  // and sets the `peak_bytes_in_use` to be equal to the `bytes_in_use`.
  bool ClearAllocatorStats();

  // Return an allocator which delegates to this stream executor for memory
  // allocation.
  StreamExecutorMemoryAllocator* GetAllocator() { return &allocator_; }

 private:
  template <typename BeginCallT, typename CompleteCallT, typename ReturnT,
            typename... BeginArgsT>
  friend class ScopedTracer;
  friend class Event;
  friend class Stream;
  friend class Timer;
  template <typename... Params>
  friend class TypedKernel;
  template <typename... Args>
  friend struct ThenBlasImpl;

  // Synchronously allocates size bytes on the underlying platform and returns
  // a DeviceMemoryBase representing that allocation. In the case of failure,
  // nullptr is returned.
  DeviceMemoryBase Allocate(uint64_t size, int64_t memory_space);

  // Gets-or-creates (creates with memoization) an RngSupport datatype that can
  // be used for random-number-generation routines on the current platform.
  //
  // Ownership and user-facing is the same as AsBlas() above.
  //
  // Returns null if there was an error initializing the RNG support for the
  // underlying platform.
  rng::RngSupport* AsRng();

  // Causes the host code to synchronously wait for operations entrained onto
  // stream to complete. Effectively a join on the asynchronous device
  // operations enqueued on the stream before this program point.
  port::Status BlockHostUntilDone(Stream* stream);

  // Without blocking the device, retrieve the current stream status.
  port::Status GetStatus(Stream* stream);

  // Finds and retrieves device memory for the symbol on the underlying
  // platform.
  bool GetSymbol(const std::string& symbol_name, ModuleHandle module_handle,
                 void** mem, size_t* bytes);

  // Entrains a memcpy operation onto stream, with a host destination location
  // host_dst and a device memory source, with target size size.
  bool Memcpy(Stream* stream, void* host_dst,
              const DeviceMemoryBase& device_src, uint64_t size);

  // Entrains a memcpy operation onto stream, with a device destination location
  // and a host memory source, with target size size.
  bool Memcpy(Stream* stream, DeviceMemoryBase* device_dst,
              const void* host_src, uint64_t size);

  // Entrains a memcpy operation onto stream, with a device destination location
  // and a device source location, with target size size. Peer access should
  // have been enabled between the StreamExecutors owning the device memory
  // regions.
  bool MemcpyDeviceToDevice(Stream* stream, DeviceMemoryBase* device_dst,
                            const DeviceMemoryBase& device_src, uint64_t size);

  // Entrains on a stream a user-specified function to be run on the host.
  // See Stream::ThenDoHostCallback for full details.
  bool HostCallback(Stream* stream, std::function<void()> callback);

  // Entrains on a stream a user-specified function to be run on the host.
  // See Stream::ThenDoHostCallback for full details.
  // This is the preferred form for a callback that may return an error.
  bool HostCallback(Stream* stream, std::function<port::Status()> callback);

  // Performs platform-specific allocation and initialization of an event.
  port::Status AllocateEvent(Event* event);

  // Performs platform-specific deallocation and cleanup of an event.
  port::Status DeallocateEvent(Event* event);

  // Inserts the specified event at the end of the specified stream.
  port::Status RecordEvent(Stream* stream, Event* event);

  // Wait for the specified event at the end of the specified stream.
  port::Status WaitForEvent(Stream* stream, Event* event);

  // Requests the current status of the event from the underlying platform.
  Event::Status PollForEventStatus(Event* event);

  // Allocates stream resources on the underlying platform and initializes its
  // internals.
  bool AllocateStream(Stream* stream);

  // Deallocates stream resources on the underlying platform.
  void DeallocateStream(Stream* stream);

  // Causes dependent to not begin execution until other has finished its
  // last-enqueued work.
  bool CreateStreamDependency(Stream* dependent, Stream* other);

  // Allocates timer resources on the underlying platform and initializes its
  // internals.
  bool AllocateTimer(Timer* timer);

  // Deallocates timer resources on the underlying platform.
  void DeallocateTimer(Timer* timer);

  // Records a start event for an interval timer.
  bool StartTimer(Stream* stream, Timer* timer);

  // Records a stop event for an interval timer.
  bool StopTimer(Stream* stream, Timer* timer);

  // Allocates a new metadata object, appropriately populated, on the heap, with
  // ownership transfer to caller.
  std::unique_ptr<DeviceDescription> CreateDeviceDescription() const;

  // Adds a task to the port::ThreadPool work queue. These tasks must be
  // fire-and-forget and have no external data or timing dependencies; their
  // execution order and completion time have no guarantees.
  // For an example of an appropriate task, see HostBlas::DoBlasGemmInternal;
  // there, temporary internal buffers are freed using this method.
  void EnqueueOnBackgroundThread(std::function<void()> task);

  // Adds an AllocRecord for 'opaque' of size 'bytes' to the record map, for
  // leak checking. NULL buffer pointers and buffer sizes of 0 will not be
  // tracked.
  void CreateAllocRecord(void* opaque, uint64_t bytes);

  // Removes the AllocRecord keyed by 'opaque' from the record map. NULL
  // pointers will not be erased (as they're not tracked, per above).
  void EraseAllocRecord(void* opaque);

  // Calls the relevant TraceListener routine to begin tracing for the specified
  // asynchronous method.
  template <typename TraceCallT, typename... ArgsT>
  void SubmitTrace(TraceCallT trace_call, ArgsT&&... args);

  // Reader/writer lock for class-static StreamExecutor members.
  static absl::Mutex static_mu_;

  // Reader/writer lock for mutable data structures on this StreamExecutor.
  //
  // Mutable so that caching functions (like DeviceDescription, AsBlas, etc.)
  // can acquire the lock on their first (mutating) call as well.
  mutable absl::Mutex mu_;

  // Reference to the platform that created this executor.
  const Platform* platform_;

  // Pointer to the platform-specific-interface implementation. This is
  // delegated to by the interface routines in pointer-to-implementation
  // fashion.
  std::unique_ptr<internal::StreamExecutorInterface> implementation_;

  // A mapping of pointer (to device memory) to string representation of the
  // stack (of the allocating thread) at the time at which the pointer was
  // allocated.
  std::map<void*, AllocRecord> mem_allocs_ TF_GUARDED_BY(mu_);

  // Memoized BLAS support object -- we only want to create this once when asked
  // for a BLAS interface.
  std::unique_ptr<blas::BlasSupport> blas_ TF_GUARDED_BY(mu_);

  // Memoized DNN support object -- we only want to create this once when asked
  // for an DNN interface.
  std::unique_ptr<dnn::DnnSupport> dnn_ TF_GUARDED_BY(mu_);

  // Memoized FFT support object -- we only want to create this once when asked
  // for a FFT interface.
  std::unique_ptr<fft::FftSupport> fft_;

  // Memoized RNG support object -- we only want to create this once when asked
  // for an RNG interface.
  std::unique_ptr<rng::RngSupport> rng_ TF_GUARDED_BY(mu_);

  // Slot to cache the owned DeviceDescription for the underlying device
  // once it has been queried from DeviceDescription().
  mutable std::unique_ptr<DeviceDescription> device_description_
      TF_GUARDED_BY(mu_);

  // The kind of the underlying platform that is being targeted, as passed
  // during construction.
  //
  // Immutable post-initialization.
  PlatformKind platform_kind_;

  // The device ordinal that this object was initialized with.
  //
  // Immutable post-initialization.
  int device_ordinal_;

  // Executor for handling host callback work that cannot be performed
  // by a host callback thread - for example, cleanup after a host BLAS routine
  // (which may make device API calls). This work cannot block the host
  // callback thread, will be completed asynchronously, and should be treated
  // as fire-and-forget. Assume no ordering guarantees WRT the tasks enqueued
  // here.
  //
  // Immutable post-initialization. Object is thread-safe.
  std::unique_ptr<port::ThreadPool> background_threads_;

  // Counter for the current number of live streams. This is used to check
  // for accidentally-outstanding streams at StreamExecutor teardown time, as
  // well
  // as to indicate leaks (via a large outstanding count being logged) in the
  // case we can't allocate more streams.
  std::atomic_int_fast32_t live_stream_count_;

  // Only one worker thread is needed; little work will be done by the
  // executor.
  static constexpr int kNumBackgroundThreads = 1;

  // Indicates if StreamExecutor operation tracing should be performed.
  bool tracing_enabled_;

  // The set of TraceListeners registered for this StreamExecutor.
  std::set<TraceListener*> listeners_ TF_GUARDED_BY(mu_);

  // Allocated memory in bytes.
  int64_t mem_alloc_bytes_;

  // Memory limit in bytes. Value less or equal to 0 indicates there is no
  // limit.
  int64_t memory_limit_bytes_;

  StreamExecutorMemoryAllocator allocator_;

  SE_DISALLOW_COPY_AND_ASSIGN(StreamExecutor);
};

// A wrapper around ModuleHandle that uses RAII to manage its lifetime.
class ScopedModuleHandle {
 public:
  explicit ScopedModuleHandle(StreamExecutor* executor,
                              ModuleHandle module_handle)
      : executor_(executor), module_handle_(module_handle) {}

  ScopedModuleHandle(ScopedModuleHandle&& other) {
    executor_ = other.executor_;
    module_handle_ = other.module_handle_;
    other.executor_ = nullptr;
    other.module_handle_ = ModuleHandle();
  }

  ScopedModuleHandle& operator=(ScopedModuleHandle&& other) {
    executor_ = other.executor_;
    module_handle_ = other.module_handle_;
    other.executor_ = nullptr;
    other.module_handle_ = ModuleHandle();
    return *this;
  }

  ~ScopedModuleHandle() {
    if (static_cast<bool>(module_handle_)) {
      CHECK(executor_->UnloadModule(module_handle_));
    }
  }

 private:
  StreamExecutor* executor_;
  ModuleHandle module_handle_;

  TF_DISALLOW_COPY_AND_ASSIGN(ScopedModuleHandle);
};

////////////
// Inlines

template <typename... Args>
inline port::StatusOr<std::unique_ptr<TypedKernel<Args...>>>
StreamExecutor::CreateTypedKernel(absl::string_view kernel_name,
                                  absl::string_view ptx,
                                  absl::Span<const uint8> cubin_data) {
  auto kernel_base = absl::make_unique<TypedKernel<Args...>>(this);
  MultiKernelLoaderSpec loader_spec(kernel_base->kNumberOfParameters);
  loader_spec.AddCudaPtxInMemory(ptx, kernel_name);

  if (!cubin_data.empty()) {
    loader_spec.AddCudaCubinInMemory(
        reinterpret_cast<const char*>(cubin_data.data()), kernel_name);
  }

  TF_RETURN_IF_ERROR(GetKernel(loader_spec, kernel_base.get()));
  return std::move(kernel_base);
}

template <typename T>
inline DeviceMemory<T> StreamExecutor::AllocateArray(uint64_t element_count,
                                                     int64_t memory_space) {
  uint64_t bytes = sizeof(T) * element_count;
  return DeviceMemory<T>(Allocate(bytes, memory_space));
}

template <typename T>
inline port::StatusOr<DeviceMemory<T>> StreamExecutor::GetSymbol(
    const std::string& symbol_name, ModuleHandle module_handle) {
  port::StatusOr<DeviceMemoryBase> untyped_symbol =
      GetUntypedSymbol(symbol_name, module_handle);
  if (!untyped_symbol.ok()) {
    return untyped_symbol.status();
  }
  return DeviceMemory<T>(untyped_symbol.ValueOrDie());
}

template <typename ElemT>
ScopedDeviceMemory<ElemT>::ScopedDeviceMemory(StreamExecutor* parent,
                                              DeviceMemoryBase value)
    : wrapped_(value),
      device_ordinal_(parent->device_ordinal()),
      allocator_(parent->GetAllocator()) {}

template <typename ElemT>
ScopedDeviceMemory<ElemT>::ScopedDeviceMemory(
    StreamExecutor* parent, std::initializer_list<ElemT> values)
    : ScopedDeviceMemory(parent, parent->AllocateArray<ElemT>(values.size())) {
  if (ptr() != nullptr) {
    std::vector<ElemT> local(values);
    if (!parent->SynchronousMemcpy(ptr(), const_cast<const ElemT*>(&local[0]),
                                   ptr()->size())) {
      TF_CHECK_OK(Free());
    }
  }
}

template <typename T>
DeviceMemory<T> StreamExecutor::AllocateZeroed() {
  DeviceMemoryBase buf = Allocate(sizeof(T), /*memory_space=*/0);
  if (buf.is_null()) {
    return DeviceMemory<T>{};
  }

  DeviceMemory<T> result(buf);
  bool ok = SynchronousMemZero(&result, sizeof(T)).ok();
  if (!ok) {
    Deallocate(&result);
    return DeviceMemory<T>{};
  }

  return result;
}

template <typename T>
DeviceMemory<T> StreamExecutor::GetSubBuffer(DeviceMemory<T>* parent,
                                             uint64_t element_offset,
                                             uint64_t element_count) {
  if (element_offset + element_count > parent->ElementCount()) {
    LOG(ERROR) << "requested sub-buffer allocation (offset + size) is greater "
               << "than parent allocation size: (" << element_offset << " + "
               << element_count << ") vs. (" << parent->ElementCount() << ")";
    return DeviceMemory<T>{};
  }

  void* opaque = implementation_->GetSubBuffer(
      parent, sizeof(T) * element_offset, sizeof(T) * element_count);
  if (opaque == nullptr) {
    return DeviceMemory<T>{};
  }
  return DeviceMemory<T>(DeviceMemoryBase(opaque, sizeof(T) * element_count));
}

}  // namespace stream_executor

#endif  // TENSORFLOW_STREAM_EXECUTOR_STREAM_EXECUTOR_PIMPL_H_

redpajama_set_name: RedPajamaGithub


text:
Find Your Allegiance: Which MLS team is like each K-League team?
Live sports returned very, very early on Friday morning, with the start of the Korean first division, the K League 1's season. Let's translate this.
By Benedict Rhodes May 12, 2020, 1:27pm EDT
Share All sharing options for: Find Your Allegiance: Which MLS team is like each K-League team?
Canadian international Doneil Henry of the Suwon Samsung Bluewings defends against Kunimoto Takahiro of Jeonbuk Hyundai Motors in the league's season opener on May 8th, 2020
Photo by Han Myung-Gu/Getty Images
Live sports returned very, very early on Friday morning, with the start of the Korean first division, the K League 1's season. People from all over the world were tuning in, including several Waking The Red staffers, who got up for the 6 a.m. EST kickoff.
Part of the attraction for the match in this country was not only the return of live sports, but a debut for Canadian international Doneil Henry in his new colours. Henry, formerly of Toronto FC and more recently the Vancouver Whitecaps, put in a strong performance for his new side, Suwon Samsung Bluewings, but was on the losing end of a 1-0 match against Jeonbuk Hyundai Motors.
The league's season-opening match was streamed on YouTube, and the Copa90 YouTube channel will continue to show a select K League game live every week.
I have a newfound love of Korean football, and while doing research on the top flight, found some similarities between clubs over there and certain MLS sides, both on and off the pitch.
Busan IPark — New England Revolution
Busan IPark are one of the original five K League 1 teams from 1983, one of three that still operate, and one of the two that are in the top flight along with Pohang Steelers.
The New England Revolution are similar in the sense that they're one of the original MLS teams from the inaugural 1996 season. Busan IPark haven't won the league title since 1997, so their title drought is also similar to that of the Revolution, who have competed since 1996 but never won an MLS Cup.
Both sides seem to be on an upwards trajectory, as the Revolution made the playoffs in 2019 for the first time since 2015, while Busan IPark were relegated for the first time in 2015 before being promoted back up in 2019.
Daegu FC — DC United
Both Daegu FC and DC United used to play in former World Cup stadiums. Daegu played at Daegu Stadium, used for the 2002 World Cup, while DC United used to call RFK Stadium home, used at the 1994 World Cup.
Both have moved out in recent years into new, soccer-specific stadiums. DGB Daegu Bank Park was opened in 2019, and Audi Field (pictured below), was opened in 2018—a match also remembered for being Wayne Rooney's DC United debut. Canadian Alphonso Davies also scored in that match.
The inaugural match at Audi Field in Washington, DC
Mark J. Rebilas-USA TODAY Sports
Gangwon FC — Philadelphia Union
Both Gangwon FC and the Philadelphia Union were founded in 2008, and have also not really had a major impact in their respective leagues.
Gangwon spent a few years in K League 2 after being relegated in 2013, but since coming back up to the top flight in 2017, they've been a consistent mid-table team. Philadelphia started playing games in 2010, and since then have made the playoffs a few times, but never gone past the conference semifinals.
Another little thing to link them is that both of their crests have the word "Union" on it.
Gwangju FC — Inter Miami
Both of these teams are the new(ish) kids on the block. While Inter Miami were just starting their inaugural MLS season before the COVID-19 put the season on hold, Gwangju are the newest club currently in K League 1, founded in 2011, and are also back in the top flight for the first time since 2017 after winning K League 2 in 2019.
Both are yet to win a major competition but that's understandable as they aim to get their first on the board. They both also have some important international players on their squad. Former San Jose Earthquake and LAFC forward Marco Urena is among the international players on Gwangju's books, while Miami boast the likes of Mexican international Rodolfo Pizarro and Panama international Roman Torres, among others.
While there hasn't been an abundance of South Korean players in MLS, there have been two notable that have stood out over the past few seasons.
As it stands, there is only one South Korean in the league: Vancouver Whitecaps Designated Player Hwang In-beom.
The other player that comes to mind was a 2019 MLS Cup winner with Seattle, Kim Kee-hee, who left after last season to join K-League side Ulsan Hyundai. He previously played for Daegu FC and won two titles with Jeonbuk Hyundai Motors before leaving the K League.
Incheon United — Montreal Impact
Both Incheon and Montreal are among the biggest cities in their respective countries. Incheon is South Korea's third-largest city with a population just under three million, and Montreal is the second-biggest in Canada with around 1.8 million people.
Both Incheon United and the Montreal Impact play in soccer-specific stadiums with a capacity around 20,000—Incheon Football Stadium has a capacity of 20,891, while Stade Saputo holds just 90 less fans at 20,801.
Other similarities are that both sides wear blue and black vertical stripes at home and white/ grey vertical stripes for their away kit. Both also lost in the final of their respective domestic cup competitions in 2015, Incheon in the Korean FA Cup to FC Seoul and Montreal in the Canadian Championship to the Vancouver Whitecaps.
Jeonbuk Hyundai Motors — Seattle Sounders
Jeonbuk Hyundai Motors and Seattle Sounders fans have had a lot to cheer about over the last few years, as both are the modern dynasty in their respective leagues and reigning champions.
Jeonbuk have won the league seven times, tied for the most in K League 1 history, and all of them since 2009. They won in 2009, 2011, 2014, 2015, 2017, 2018 and 2019 and were runners up in '12 and '16. Far and away the most dominant team in recent memory.
Seattle won MLS Cup in 2016 and 2019, both against Toronto FC, and were runners up in 2017 to... Toronto FC. They are the closest we've seen to that level of dominance in MLS over the last few years.
Both also wear very bright green uniforms.
Pohang Steelers — Toronto FC
Pohang Steelers are the only K League 1 team that has been in the top flight every year since the league's formation back in 1983. They're also one of the most successful South Korean clubs overall, having won 5 league titles, 4 FA Cups and a joint-record 3 AFC Champions League titles—tied with Sebastian Giovinco's Al-Hilal, who are the current holders of the trophy.
Similarly, Toronto FC have been winning trophies somewhat regularly since their first season in 2007, racking up one MLS Cup, one Supporters Shield and a record seven Canadian Championships.
TFC won the treble in 2017, the first MLS team to achieve such a feat, and reached the final of the 2018 CONCACAF Champions League, only the third MLS club to do so. They also came the closest to winning it, losing on penalties to Chivas.
Toronto FC also were one of the first MLS teams to play in a soccer-specific stadium with the opening of BMO Field. Pohang were the first to do that in South Korea with the opening of Pohang Steel Yard in 1990.
Sangju Sangmu FC — LAFC
Sangju Sangmu have a fascinating history, and are a team operated by the South Korean military. When K League players are serving their mandatory military service, they are loaned to the club for two years to complete their service before returning to their former teams.
Because of this, I've gone for a team with a manager like a general: LAFC and manager Bob Bradley. Bradley has a no-nonsense approach and isn't afraid to say it as it is, which has been pretty successful throughout his lengthy coaching career.
As mentioned, players are loaned to Sangju when they do military service, similar to how LAFC keep taking established MLS players from other teams, albeit without the military service. LAFC have poached the likes of Latif Blessing, Steven Beitashour and Lee Nguyen from other MLS clubs, among others.
FC Seoul — LA Galaxy
Both FC Seoul and the LA Galaxy area based in one of the biggest cities in their country. Seoul is the capital of South Korea and LA has the second-highest population in the United States.
Both clubs are one of the perennial good teams, and have each won three league titles in the last decade, including both winning in 2012. Seoul won their most recent three titles in 2010, 2012 and 2016, while the Galaxy got theirs in 2011, 2012 and 2014.
Because of the city they play in, they are both able to attract good players.
Seoul have brought notable South Koreans back to the league, including former Arsenal, Monaco and Celta Vigo forward Park Chu-young. He started his career with FC Seoul, moved to Europe in 2008, and returned to the club in 2015.
The LA Galaxy recruit all of the MLS' biggest stars, such as David Beckham, Steven Gerrard and Zlatan Ibrahimovic, among others, and are probably the most recognized team outside of the USA.
Seongnam FC — Houston Dynamo
Seongnam FC, like the Houston Dynamo, are historically one of the better teams, but have struggled in recent years.
Seongnam are tied all-time with 7 K-League 1 titles, but were relegated after the 2016 season and spent two years in K-League 2 before returning to the top flight for 2019.
The Dynamo won the MLS Cup in both of their first two seasons, and although they did win the US Open Cup in 2018, have struggled in the regular season in recent times, missing the playoffs in five of the last six seasons.
Both will be hoping for bigger and better things in the coming years as they look to get back to their former glory.
Suwon Samsung Bluewings — Atlanta United
Both Suwon Samsung Bluewings and Atlanta United are the current holders of their domestic cup competitions. Suwon won their record-breaking 5th Korean FA Cup in 2019 over Daejeon Korail.
Atlanta are the reigning champion of the domestic cup in the States, the US Open Cup. They beat Minnesota United in the 2019 final.
We're starting to stretch it out a bit here...
Ulsan Hyundai — New York Red Bulls
It isn't uncommon for teams in South Korea, both in soccer and otherwise, to use the name of their owners as part of the club's name. We see this with multiple clubs in K League 1, but it is rare or nonexistent in a lot of leagues. The New York Red Bulls are an exception to that, as they're owned by energy drink company Red Bull.
Just like how Hyundai have their name on several teams, Red Bull do too, with teams in Leipzig, Germany and Salzburg, Austria, all of whom play out of "Red Bull Arena"s.
If you have a company name that can pull it off, it's a brilliant marketing ploy. Start thinking people.

redpajama_set_name: RedPajamaCommonCrawl


Personnel: Nathan Nockels (vocals, guitar, keyboards); Bryan Brown (vocals, acoustic guitar); Melodie Malone, Beth Redman, Ji Lee, David Williams , Jonas Myrin, J.D. Myers, Daniel Carson, Christoffer Wadensten, Morgan Blake, Kayla Johnson, Katie Corven, Katie Ashworth, Jules Adekambi, Jennifer Richards, Stan Johnson , John Pritchard , Travis Nunn (vocals); Tyler Burkham, Matt Podesla (guitar); Claire Indie (cello); Jacob Arnold (drums).
Audio Mixers: Berwick Lane; Ainslie Grosser .
Recording information: LIFT, Passion City Curch, Atlanta, GA.
You can earn a 5% commission by selling 10,000 Reasons on your website. It's easy to get started - we will give you example code. After you're set-up, your website can earn you money while you work, play or even sleep! You should start right now!


text:
A Wadati–Benioff zone (also Benioff–Wadati zone or Benioff zone or Benioff seismic zone) is a planar zone of seismicity corresponding with the down-going slab in a subduction zone. Differential motion along the zone produces numerous earthquakes, the foci of which may be as deep as about . The term was named for the two seismologists, Hugo Benioff of the California Institute of Technology and Kiyoo Wadati of the Japan Meteorological Agency, who independently discovered the zones.

Wadati–Benioff zone earthquakes develop beneath volcanic island arcs and continental margins above active subduction zones. They can be produced by slip along the subduction thrust fault or slip on faults within the downgoing plate, as a result of bending and extension as the plate is pulled into the mantle. The deep-focus earthquakes along the zone allow seismologists to map the three-dimensional surface of a subducting slab of oceanic crust and mantle.

Discovery
In 1949, Hugo Benioff introduced a method for determining elastic-rebound strain increments of earthquakes on a particular fault. He determined that the square root of an earthquake's energy is proportional to both the elastic rebound strain increment and the rebound displacement, and developed a way to determine whether a series of earthquakes was generated along a single fault structure. His research focused on the Kermadec-Tonga subduction zone and the South American subduction zone, and determined that in both locations, earthquake foci fall along planes dipping ~45° from the trenches.  These planes of seismicity were later termed Benioff zones, or Wadati–Benioff zones for Kiyoo Wadati, who had made similar observations twenty years earlier.

Structure
The angle of dip of the subducting slab, and therefore the Benioff seismic zone, is dominantly controlled by the negative buoyancy of the slab and forces from the flowing of the asthenosphere. Younger lithosphere is hotter and more buoyant, resulting in shallow-dipping Benioff zones, whereas older lithosphere is denser and colder, causing steeper dips. The Benioff zone spans from near-surface to depths of up to 670 km. The upper bound is just beneath the weak sediments in the toe of the wedge of the subduction zone, and the lower bound is where the brittle-ductile transition occurs. Most earthquakes occur within the 1000 °C isotherm, in the interior of the slab that has not yet heated up to match the temperature of the surrounding mantle into which it is being subducted. At depths below the thickness of the lithosphere, earthquakes are no longer generated by thrusting at the interface of the two plates, because the asthenosphere is weak and cannot support the stresses necessary for faulting. In this region, internal deformation of the still-cool down-going slab is the source of the earthquakes. Up to depths of 300 km, dehydration reactions and the formation of eclogite are the main causes of seismicity. Below 300 km, beginning at approximately the 700 °C isotherm, a mineralogical phase change from olivine to spinel occurs, and is thought to be the dominant earthquake mechanism of these very deep-seated earthquakes.

Double Benioff zones
In some cases, subduction zones show two parallel surfaces of seismicity separated by tens of kilometres at intermediate depths (50–200 km). A primary example of this is located along Japan's largest island of Honshu, where the Wadati–Benioff zone is characterized by two well-defined lines of earthquake foci, with a distance between each line of 30–40 kilometers. A study of the global prevalence of double Benioff zones has found that they are common in subduction zones worldwide.

The uppermost seismicity surface is in the crust of the down-going slab and attributed to the dehydration reactions within this oceanic crust resulting in the formation of eclogite. The mechanism behind the lower zone of seismicity, located in the upper mantle portion of the down-going lithosphere, is still debated; the global ubiquity of double Benioff zones indicates that it must be a process that commonly occurs in subduction zones. Some of the suggested instability mechanisms include dehydration embrittlement caused by the breakdown of antigorite or chlorite in a hydrated peridotite upper mantle, and un-bending of the slab.  Observations from seismic studies indicate that the lithospheric mantle at the intermediate depths where double Benioff zones occur is dry, which favours the proposed slab-unbending mechanism.

References

Volcanology
Plate tectonics
Seismic zones

redpajama_set_name: RedPajamaWikipedia


Apparently, I'm in a DC kind of mood this month. This is the view of the Washington Monument and reflecting pool from the steps of the Lincoln Memorial. Unfortunately, the scaffolding was still up when I snapped the photo in 2013.


text:
'WILDLY CREATIVE'
Who is Cyndi Lauper's husband David Thornton?
David Boroff
Dec 7 2020, 16:45 ET
Updated: Dec 7 2020, 16:45 ET
ACTOR David Thornton has been working steadily in Hollywood for decades.
He is married to pop icon Cyndi Lauper.
Actor David Thornton attends the premiere of Here & There at Quad Cinema on May 14, 2010 in New York CityCredit: Getty Images
Who is Cyndi Lauper's husband David Thornton?
The 67-year-old Thornton has starred in dozens of movies and television series, including The Last Days of Disco, A Civil Action, and Homeland.
Thornton was born on June 12, 1953, in Cheraw, South Carolina.
He has been married to Cyndi Lauper for nearly three decades.
"All I can say is that he is my best friend, he's wildly creative and I just wanted to share my whole life with him," Lauper told Closer Weekly in 2018.
"And that's what's happened."
Cyndi Lauper in 2018Credit: Getty Images - Getty
Who is Cyndi Lauper?
Cyndi, 67, was born June 22, 1953, and is an American singer and songwriter.
Her career has spanned four decades, with her debut solo album She's So Unusual (1983) launching her to fame.
So far she has released 11 studio albums.
Cyndi is known for her distinctive style - from her variety of hair colors to her eccentric clothing.
Thornton and Lauper have been married for nearly 30 yearsCredit: Getty Images
She is also known for her powerful and distinctive four-octave range and raspy voice.
Her hit songs include Girls Just Wanna Have Fun, Time After Time, True Colors, and I Drove All Night.
The couple in downtown New York CityCredit: Getty Images - Getty
When did they get married?
They were wed on November 24, 1991.
"I heard George Harrison's wife say once that the secret [to marriage] is to stay married and work it out," Lauper told Closer Weekly in 2018.
'SO RUDE'
Kelly Clarkson reveals A-listers were 'really mean' ahead of American Idol win
KAN'T GO BACK
Kim and Kanye's marriage turned 'toxic' as couple had 'blowups' before split
Do they have any children?
Thornton and Lauper have a 23-year-old son, Declyn Wallace Thornton Lauper.
Their son is also a singer and goes by the name Dex Lauper.
The music video for Cindi Lauper's 80s song Girls Just Want To Have Fun


Audio Fauna - New Music "Introducing"
Audio Fauna are the Swedish duo of Johanna Kalén (formerly of Husky Rescue) and Mari Kronlund and to be honest their titles do a better job to describe their debut two tracks "In To The Light" and "Silent Peace" than I will... Both are gorgeous.
"In To The Light" starts with the words "tired bones" and I already know it's what I need right now, combining the gentle pitter-patter of tom beats with light, airy guitar textures and soft, enchanting vocals. Johanna's utterly beautiful, fragile lead blends around subtle backing harmonies and the resulting dreamlike, calming atmosphere is the ideal supplement for my current state of body and mind. "Silent Peace" is similarly serene and intriguing, built around a soothing bed of acoustic plucks and luscious instrumentation that create a soundscape that perfectly captures the fresh optimism that a relaxing walk around a forest can bring.
Fall under Audio Fauna's intoxicating spell with a press on play below, you won't regret it.


text:
/**
 * (c) 2014 Vincenzo Cappello
 * This projected is licensed under the terms of the MIT license,
 * refer to the file LICENSE.txt.
 */

#ifndef WIN_WIN32_SUB_MENU_ITEM_CONTROLLER_H
#define WIN_WIN32_SUB_MENU_ITEM_CONTROLLER_H

#include "menu_item_controller_base.h"
#include "i_menu_item_controller_container.h"
#include <win/sub_menu_item.h>
#include "control_factory.h"

#include <memory>
#include <windows.h>

namespace win {

class SubMenuItemController : public MenuItemControllerBase,
                              public IMenuItemControllerContainer,
                              public std::enable_shared_from_this<SubMenuItemController> {
public:
	SubMenuItemController(HMENU hMenuParent, int commandId, std::shared_ptr<SubMenuItem> subMenuItem);
	virtual ~SubMenuItemController();

	/** @name MenuItemControllerBase implementations
	 */
	///@{
	std::shared_ptr<MenuItem> getMenuItem() { return mSubMenuItem; }
	///@}

	/** @name IMenuItemControllerContainer implementations
	 */
	///@{
	HMENU getHMenu() { return mHMenu; }

	void addMenuItem(std::shared_ptr<MenuItemControllerBase> menuItemController);
	///@}

public:
	std::shared_ptr<SubMenuItem> mSubMenuItem;
	HMENU mHMenu;
};

}

#endif // WIN_WIN32_SUB_MENU_ITEM_CONTROLLER_H


Our values – our promise: Learn all about the values that drive our actions.
The in-house laboratory is the heart of our quality management system and represents compliance with our high quality standards.
As an employee of our modern and growing company, you contribute to our success story from day one.
what interests you, the better we can deal with.
You can not order directly via us. We would be glad to inform you about the Josera dealer near you.


text:
DVDs are No 1 gift this Christmas
The DVD has emerged as the Christmas present of choice across Europe this year, according to 78pc of consumers. This is up from 68pc of consumers a year ago.
According to a survey by Digital Entertainment Group Europe, 63pc of consumers said they know that a DVD is a present friends and family would like and 59pc will be buying them because they featured on their own wish list.
Of the DVDs purchased by consumers this Christmas, the majority of those (82pc) will be purchased in standard definition (SD); however, some (9pc) will be embracing next-generation DVDs such as Blu-ray and HD DVD formats.
The survey has revealed that in 2008 high-definition (HD) will be embraced more aggressively than ever with 54pc of those questioned planning to move to HD, 39pc of which within the next six months.
"It is extremely encouraging to see that the DVD format continues to hold its own this Christmas as a gift of choice," said Yves Caillaud, senior vice-president of Warner Home Video EMEA.
"Furthermore, it is exciting to see consumers gaining confidence and understanding of the possibilities in the next generation of home entertainment.
"The survey suggests that 2008 is set to be an interesting year for HD," Caillaud added.


Payroll - Prepare and print all Payroll Checks. Prepare all Federal and State Tax Deposits including EFT, if required. Prepare all Federal and State Quarterly Tax Returns. Print W-2 and all payroll year-end reports. Provide management reporting. Payroll Account Bank Reconciliation.
General Ledger - Create and/or Maintain Chart of Accounts. Reconcile all G/L accounts. Prepare and enter all necessary Journal Entries. Prepare Monthly Financial Statements. Prepare Management reports. Prepare all schedules for preparation of Financial Statements and/or Tax Returns by outside CPA firm.
Interim CFO or Controller - Seasoned Accounting Executive available for Part-Time or Interim period.
Software Installation/Conversion - Install Peachtree or QuickBooks Accounting Software. Train personnel on use of all accounting software modules. Convert from manual system or other software packages.
Financing - Prepare all schedules, including Cash Flow Projections, that may be required by your lending institution. Locate and secure Asset Based Financing sources. Review financial statements for compliance of any loan convenants imposed by lender.
Accounts Receivable - Create all invoices and Customer Statements. Provide A/R Aging Reports. Enter data from bank deposits.
Accounts Payable - Enter all A/P by Vendor. Print A/P Checks. Provide A/P Aging Reports. Provide Bank Reconcilliation. Prepare 1099 forms.
Job Cost - Track all costs per job or project. Prepare management reports.
Fixed Assets - Maintain asset listing and/or prepare all depreciation schedules.


With the January transfer window for the UEFA Champions League open, here are some transfer rumors to stay away from.
Lionel Messi to Man City: The most bizarre link being speculated right now is the link for Manchester City to bring in Barcelona's Lionel Messi. Man City probably has the money to buy him, but it would cost them a ton of money. If Bale was sold for 85 million pounds, Messi would have to be worth close to double that(250 million pounds). He is the best player in the world, so why would Barcelona give him away. Messi recently said he wants to end his career with Barcelona. Expect this to happen.
Pedro To Liverpool: There have been links of Barcelona's Pedro going to other clubs such as Liverpool this January. Obviously, a player of Pedro's quality wants regular playing time at Barcelona, and there have been links that he may want a loan, but he is world class and would not want to leave one of this best clubs in the world. I reckon he will stay put at Barcelona this January.
Daniel Agger To Napoli: There have been links about Daniel Agger going to Napoli on loan for the rest of the season. This is just speculation. Liverpool would never give away Agger on loan because he is quality and a crucial part of Liverpool's squad. Even if he's not getting regular playing time at the moment Rodgers would never let him go out on loan. Also, his most recent injury will not attract as many suitors for him. Stranger things have happened, but expect Agger to be in a Reds shirt for the rest of the season.
Diego Costa To Arsenal: It was rumored in the summer that Liverpool had launched a bid for Diego Costa and triggered his release clause. Costa opted to stay with Atletico Madrid because he was happy at the club. Costa is in great form this campaign with Atletico and is a major reason to why Atletico are doing so well. Arsenal happens to be rumored with the striker this January. Being serious title contenders, Costa would never want to leave Atletico Madrid nor would they sell him. Expect Costa to stay put at Atletico Madrid for a while.


Providence Medical Group is currently recruiting GP's for our recently opened Gregory Hills practice.
Located in Australia's fastest growing Local Government Area, it is presently classified as DWS.
We are looking for GPs who have a desire to deliver high quality healthcare within a modern and innovative medical practice.
If you would like a confidential discussion, or to visit one of our practices, please contact Phil Dimond on 0439 817 417.
You can also get in contact with us using the online form below.
A fresh approach to healthcare. We inspire a healthier lifestyle within communities through integrated clinical solutions built on quality advice, education, service and care.
If you require medical attention outside of practice hours, please call Sydney Medical Service on 1300 466 347.


Ola Lola's Garden Bar is a really chill and relaxing place to stop off at. There are usually a few people there just grabbing a drink and a bit of shade. I personally have a killer sweet tooth so I went straight for the dessert. They offer a unique twist on the banana split. Instead of using ice cream they take a banana and grill it with all the normal banana split toppings, but with marshmallows replacing the ice cream. Ola Lola's is really close to Shacks and Tropical Trail Rides. After a day at either of those locations we surely enjoy a minute to relax in the shade.
*Unfortunate Notice – Papa Ui's has closed and the business location is for sale.
Papa Ui's is a superb bakery in the town of Isabela, Puerto Rico. We have ate there on quite a few occasions and it has been great every time. They have a good selection of sweets and sandwiches! Like most bakeries they do offer breakfast sandwiches as well. One thing that makes Papa Ui's stand out is a hot bar of lunch and dinner style foods. If you are in Isabela we highly recommend you stop by this bakery.
This particular Pastelillos Empanadillas Stand is the most popular one we have seen. They sell hundreds or maybe thousands a day, which is great for you, because your odds of getting a fresh one are much better than at other stands.
If you select the middle image, you will be able to see the menu, which shows you their large selection of pastelillos. They also have Surullitos which are my favorite. Surullitos are a fried corn meal stick (also pictured), that is filled with cheese.
Now the bad news, if you are trying to eat healthy then don't bother stopping. Also, be careful parking there and crossing the street. It is a busy place, a busy road, and there is a blind turn right next to it.
Pacos Tacos / Paco's Churrasqueria Mejicana Mexican Restaurant is GREAT! Finding Mexican food in Puerto Rico can be hard, so when we found Paco's Tacos it was a ground breaking find.
The food was great, and the staff was friendly. Every single item we had, and saw on other tables, looked tremendous. As for me, one burrito was enough to leave me feeling extremely full, but I wanted another simply because it had taken months to find a Mexican Restaurant of this quality.
On a final note that some people may care less about, there are very few places that televise NFL and NBA games, but Paco's had the NBA playoffs on a nice big screen. That was a plus in my book. A+.


text:
import React, { useRef, useEffect } from 'react';

import { drawLineChart } from '../../../../../app/livechat/client/lib/chartHandler';
import { useTranslation } from '../../../../contexts/TranslationContext';
import { AsyncStatePhase } from '../../../../hooks/useAsyncState';
import { useEndpointData } from '../../../../hooks/useEndpointData';
import Chart from './Chart';
import { useUpdateChartData } from './useUpdateChartData';

const initialData = {
	departments: {},
};

const init = (canvas, context, t) =>
	drawLineChart(canvas, context, [t('Open'), t('Closed')], [], [[], []], {
		legends: true,
		anim: true,
		smallTicks: true,
	});

const ChatsPerDepartmentChart = ({ params, reloadRef, ...props }) => {
	const t = useTranslation();

	const canvas = useRef();
	const context = useRef();

	const updateChartData = useUpdateChartData({
		context,
		canvas,
		t,
		init,
	});

	const { value: data, phase: state, reload } = useEndpointData(
		'livechat/analytics/dashboards/charts/chats-per-department',
		params,
	);

	reloadRef.current.chatsPerDepartmentChart = reload;

	const { departments = {} } = data ?? initialData;

	useEffect(() => {
		const initChart = async () => {
			context.current = await init(canvas.current, context.current, t);
		};
		initChart();
	}, [t]);

	useEffect(() => {
		if (state === AsyncStatePhase.RESOLVED) {
			Object.entries(departments).forEach(([name, value]) => {
				updateChartData(name, [value.open, value.closed]);
			});
		}
	}, [departments, state, t, updateChartData]);

	return <Chart ref={canvas} {...props} />;
};

export default ChatsPerDepartmentChart;


Our clients deserve the best. We are constantly improving their experience by requesting feedbacks and implementing their suggestions! This set includes the simple values every user tries to find in a reliable assistant. We share your values. Having deliberately discussed the code of our company we have formed the list of values described below representing those we choose to stick to.
Each member has passed thorough verification of professional skills and knowledge. They are the connoisseurs of all styles and formats characterizing varied types assignments. Our specialists are devoted to the spheres they represent and do not afford to produce anything else but unique content basing on their experience, knowledge and profound research. They have an answer to any question of yours.
If you have any urgent details to be represented in your paper you can contact your writer without any delay. You can also track your order. There is no need in addressing to the writer if all you need is to make certain as for the stage of the work. Let me share with you more information on College Applications to support your search.
Whether you need help with essay writing or term paper help, book review or college application writing help, we will be glad to provide you a reliable assistance despite the complexity of the assignment and timeframe. Our writers will give you any consultation and disclose the tips as for any aspect of essay composition. Writing the college application essay can be one of the most daunting parts of applying to college. To help you get started, we've published these college essay guides from ebookconcept5h6.tk, with thoughts on brainstorming ideas, choosing a topic, and how to write an effective and powerful essay. .
Get insightful tips on how to write an effective college application essay and set yourself apart from other applicants. We are ready to offer you college essay writing help and take up your tasks. Simply ask "help me write an essay" and we will do a variety of written tasks for you: application essays, reports, speeches, literary analyses, dissertations, theses and etc.


text:
Rave It Up Podcast
www.raveituptv.com
Serena Williams To Miss 2022 Australian Open
Unvaccinated Could Play In Australian Open
Cruz Hewitt Wins Australian Junior Tennis Title
Lleyton Hewitt's son has won an Australian under-12's clay court tournament. According to the Australian Associated Press, 12-year-old Cruz played...
Do Australian Open Players Have The Ability To Train?
Association of Tennis Professionals (ATP) champion, Daniil Medvedev has stated that all Australian Open players will have health risks if quarantine doesn't...
Kobe Bryant Dies At Aged 41
Kobe Bryant. Iconic basketball player, father to an amazing daughter, and an all-around inspiration to many, has died in a tragic helicopter...
Blues Win Women's State of Origin
The New South Wales Blues have won the Women's Holden State of Origin against Queensland Maroons, 14-4. The Maroons...
Sexual Assault Allegations Against Conor McGregor
MMA megastar Conor McGregor is under investigation associated with a reported sexual assault allegation by a woman in Dublin during December last...
Murray Swinton's Spirit Lives On With Generous Collingwood Donation
Even people who aren't AFL fans would have been moved by the story of Murray Swinton - one of the most touching stories of...
AFLW Practice Matches Locked In
All 10 AFL Women's teams have been locked in for practice matches on Saturday. The start of the AFLW season is fast approaching, with the...
Serena Williams Fined After US Open Outburst
Serena Williams has been fined up to $24,000 after her outburst yesterday at the US Open. Williams had lost the finals to Naomi Osaka as...
A Shire Fairy Tale
Turn the porch light off, the Cronulla Sharks are coming home with their first ever premiership win in 49 years! In what was a high...
UFC 205: Press Conference
Official Fight Card: Weight Class Lightweight Eddie Alvarez (Champion) vs Conor Mcgregor (Featherweight* Champion) Welterweight Tyron Woodley (Champion) vs Stephen Thompson Women's Strawweight Joanna Jedrzejczyk (Champion) vs Karolina Kowalkiewicz Middleweight Chris Weidman vs Yoel Romero Welterweight Donald Cerrone vs Kevin Gastelum Lightweight Khabib Nurmagomedov vs Michael Johnson Featherweight Frankie Edgar vs Jeremy Stephens Middleweight Tim...
Christian Lealiifano Diagnosed with Leukaemia
The Brumbies confirmed through their website that Christian Lealiifano, who has also represented Australia playing for the Wallabies, was diagnosed with leukaemia on Saturday...
EUROS Finale: France VS Portugal
After almost four weeks of spectacular football action, it came down to the best teams in the competition. One team, who have showed an...
UEFA Euro 2016: Portugal Vs Poland
MATCH REPORT AND PLAYER RATINGS: QUARTER-FINAL 1 POLAND PORTUGAL 1 1 R. Lewandowski 2' Renato Sanches 33' Portugal won 5-3 on penalties Poland faced Portugal in the first quarter-final of Euro 2016...
State of Origin – 10th Series Lost. Is It Time For Change?
On Wednesday June 22, the NSW Blues were playing to keep the Origin series alive. It was always going to be a tough game...
EUROS 2016 Predictions
EUROS 2016 It only feels like yesterday since Spain had won the 2012 European Championships and that was four years ago!!! Again, one of the...
Latest Featured Video
Archives Select Month January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011
Weekly Wraps
Rave It Up brings you the latest entertainment news; reviews of movies & games; and interviews with celebrities and new comers to find out how they got to where they are and what advice they would give to others who want to follow in their shoes.
© 2017 Rave It Up


A decade after broadband killed dial-up Internet, AOL is reinventing itself as a media company, according to The Economist. AOL's fourth-quarter earnings for 2012 showed growth for the first time in eight years, primarily because the company has invested in building new revenue streams with The Huffington Post and other media.
AOL's dial-up business still provides solid margins (Really? People still use dial-up?), but it is declining.
CEO Tim Armstrong has centered the company's turnaround strategy on its media business and innovative display advertising, introducing a supply-side platform earlier this month. Armstrong invested heavily in online video with AOL On and HuffPost Live, and AOL reportedly has the second-most video views in the United States, after YouTube.
But only 7 percent of AOL's $123 million in adjusted operating income came from its content business, The Economist noted. Content creation and ad sales are expensive, so while The Huffington Post took in $55 million, it is not thought to be profitable, while hyperlocal news site Patch hemorrhaged about $100 million.


They say that variety adds to the spice of life. One can live life completely routinely and habitually day by day, but that leads to a dull and predictable life. These type of people live by the motto, "If it ain't broke, don't fix it." In other words, why change something if it already works just fine? I would argue about how boring that sounds, but another would argue "Better safe than sorry." While you may not successfully convince the stubborn people, many others accept variety in their lives. Trying something different makes life much more interesting, especially when it already changes on a set schedule. In this case, I refer to things that change monthly, such as a monthly pint nite, bottle share, or food specials menu. Speaking of the latter, you can find a terrific monthly specials menu at Jimmy's Famous American Tavern.
Enjoy something unique at any Jimmy's Famous American Tavern location while the season lingers! Check out JFAT's Facebook and Twitter pages to see what else they have that you may like your taste buds to tango with.
Summer has undoubtedly arrived, what with the heat wave and all. The weather does not appear to get any cooler in the next month or two, so cool off with a nice cool treat. The summer season has a great effect on the types of food and drinks that people consume, as more people start to prefer light and refreshing things to consume. Your body just craves it – when you feel hot, your body tells you to go find something cold to eat or drink. If you plan on powering through this heat wave, then Jimmy's Famous American Tavern has got you covered.
Treat yourself to a cool treat at any Jimmy's Famous American Tavern location while the season lingers! Check out JFAT's Facebook and Twitter pages to see what else they have that you may like your taste buds to tango with.


Who doesn't plans for road trips? It is a usual tradition for many people even after high fuel rates. The road trip gets less pricey for large families. Besides the cost thing, road trips are the best way to see the country. However, you simply can't enjoy the sceneries, so you'll need other supplements along with it such as your iPod, some amazing collection of your CD etc. Apart from these basic accessories, there are certain items which you wish to bring along with you to make your road trip all the more adventurous and more enjoyable.
You cannot take up the risk of carrying your mobile phone without its charger. It is your mobile phone which keeps you connected to the whole world. Other than that, it also helps you to remain connected with your online world as well as assisting you to find GPS location, restaurants, directions, hotels and much more.
For any kind of a road emergency, make sure you carry an emergency kit with you which should contain a first aid kit, inflating spray, torch, cables and road stop sign. It is very important to carry a GPS system along with you to be on the right track.
Make sure you carry some non-perishable food with you which are preferred by everyone in the car so that you don't have to make frequent stops. Some of the best options would be dried fruits, nuts, cereals and other healthy food items.
It is very important to wear comfortable shoes while you plan to drive for long hours. Go for a close toe shoes made of breathable material. This will help your feet be dry, fresh and breathe.
One of the major issues while going on vacation is hand sanitization, as lot of germs can enter your body while using public toilets. Keeping moist wipes can help you keep the bacteria at bay.
Get a camera with you to capture all those memorable moments which you desire to capture on your road trip. These moments will never come back, thus, it is better if you capture them as memories for all your life.
Carry your own water bottles so that you don't have to pay extra money on bottles all along your journey.
Carrying a gaming device for your kids is always a great option so that they don't get bored all through the journey. Be it a PSP, iPad or DS, all forms to be a great option for the kids to pass their time on the road.
If your vehicle doesn't support AC power outlet, make sure you carry a DC to AC car inverter. It allows you to play media player, tablets and any other device.
If your car is not equipped with a TV / DVD player, carry one along with you. This can easily be removed when you complete your journey.


text:
Sales & Wanted
Madame Bovary - Breakfast With Emma
Oxford Playhouse, 26.09-04.10.03
Shared Experience is well known for taking classic texts and making them into highly physical and innovative theatre. Flaubert's "Madame Bovary" scandalised French bourgeois society of the time with its shocking depiction of an adulteress, Emma Bovary, and her lascivious liaisons. The 19th-century press denounced both the book and its author as corrupting influences. History has exonerated Flaubert and exposed the hypocrisy of a society that would deny the existence of such women.
Why should we be interested in this piece of theatre? Husbands and wives are often depicted in theatre as having extra-marital affairs; it's one of the great themes of literature. Charles (a wonderfully controlled performance from Adrian Schiller) describes his wife as having "a little passion". An argument over breakfast about milk becomes a remarkable deconstruction of their marriage. Emma (the glorious Amanda Drew) has not only ruined her own reputation but destroyed that of her husband in her ruthless bid for wealth and recognition. On the surface, Flaubert provides a melodramatic morality tale. Slyly, underneath it all, he is laughing. Through his voyeuristic tale, with each salacious detail recounted, he is wilfully subversive as he points the finger not only at the guilty but also at those who would dare to judge.
Shared Experience gracefully balances artistic daring alongside faithfulness to the text. The play contains one of the hottest sex scenes I've seen where no clothes are removed and the female is narrating every detail in a detached fashion. This production matches simplicity with incredible theatrical daring to create an interesting and engaging piece of theatre.
Ben Whitehouse, 26.09.03


Bubblemaker is as fun as it sounds – a chance for kids to blow bubbles by scuba diving. Children who are at least 8 years old can use scuba gear to breathe underwater and swim around in shallow water. Have a party or celebrate a birthday by throwing a memorable, exciting Bubblemaker event with friends and family at your local PADI Dive Center or Resort.


text:
Q: Why does "dscl . -change /Users/wick RealName" do the job in Terminal but not in ScriptEditor? root# dscl . -change /Users/default RealName "Brian" "David"

When running this command in Terminal the Full Name of the user that is associated with home folder "default" is changed from Brian to David.
However when I try to run this command in ScriptEditor I get a syntax error.
do shell script "dscl . -change /Users/default RealName "Brian" "David""

 Any ideas as to how I could correct this ?

A: The second double quote breaks the syntax because it indicates the end of the literal shell script argument. You can even see it in the source text (syntax highlighting).
I guess the double quotes around the names are not needed so it's simply
do shell script "dscl . -change /Users/default RealName Brian David"

However if the double quotes are required you have to escape them
do shell script "dscl . -change /Users/default RealName \"Brian\" \"David\""

redpajama_set_name: RedPajamaStackExchange


text:
Translations and other linguistic services in Swedish
Our office offers professional translations and other language services into and from Swedish.
Technical translations, certified translations, interpreting, voice-overs, proofreading: Our office is a full-service agency for language services, providing the native language skills of professional translators and other linguistic experts all over the world. Our network ensures top-quality service from more than 80 branches throughout Europe. For professional translations into Swedish, we have experts and partners available who are often based locally in Sweden.
English ⇔ Swedish
German ⇔ Swedish
Spanish ⇔ Swedish
French ⇔ Swedish
Italian ⇔ Swedish
Portuguese ⇔ Swedish
Dutch ⇔ Swedish
Our office's services for Swedish:
Useful information about the Swedish language
Swedish is closely related to Danish and, like other Nordic languages, is descended from Old Norse. Swedes can communicate with Norwegians easily thanks to the hybrid language Svorsk and approximately 10 million people speak Swedish as their native language. The official status of the Swedish language has been established by law since 1st July 2009. All official bodies have thereafter been obliged to use Swedish. The aim is for the language used by authorities to be maintained and kept simple and understandable. Swedish is not only the official language of Sweden, but also of Finland, where a law establishes that Finnish and Swedish must be seen as equal official languages.
The Swedish alphabet has 29 letters. The W is really only used in loanwords and was not considered a separate letter until 2006, but merely a variant of V. The Å, Ä, and Ö are treated as separate letters listed directly after Z. The vowel system in Swedish is very distinctive and using long or short-spoken vowels changes the meaning of a word. There are nine vowel phonemes and, apart from the ü phoneme, the vowel system in Swedish is similar to High German. Structurally, however, Swedish is more similar to English, since both are characterised by short sentences and words and simple grammar. You can find more interesting information about the Swedish language on Wikipedia.
Opportunities for growth: the e-commerce market in Sweden


Bernie Sanders....actually Bernie is my number one choice.
The attitude of Brand and Carlin is pretty cynical.
Brand is also being sneaky - he says he believes democracy is pointless but fails to say what system he wants to replace it.
Any socialist liberal Democrat will raise corporate taxes and over regulate which will stymie and reduce employment. Remember the more people they can get to rely on govt. Entitlements the more votes they will get.
And to add to it: someone educated about history!
Nine democrats have already announced they are running. None of them are what I would call a "moderate".
Twenty more democrats admit they are considering running.
As long as the GOP keeps the Senate and the Dems keep the House, it won't matter. We will have gridlock and that might be better than the alternative.
Just to watch the Lefties head explode.
you know we never had a woman president and we've got to have one.
Then after that a Latino, then after that an Asian and so on and so on.
AOC for president yaaaaay !!!!!!!!!!


text:
Sudburg steht für:
 Sudburg (Goslar), eine abgegangene Burganlage bei Goslar

Südburg steht für:
 Südburg (Ḫattuša), ein Baukomplex in der hethitischen Hauptstadt Ḫattuša in der Türkei

Siehe auch:
 Sudenburg
 Suderburg


text:
module Jung::Drivers::Mailchimp

  require 'jung/drivers/mailchimp/api.rb'
  require 'jung/drivers/mailchimp/list.rb'
  require 'jung/drivers/mailchimp/campaign.rb'

  attr_reader :gb, :list_id, :api, :id
  attr_writer :gb, :list_id, :api

  def self.extended(base)
    base.extend Jung::Drivers::Mailchimp::List
    base.extend Jung::Drivers::Mailchimp::Campaign if base.class == Jung::Campaign

    base.list_id = base.config.options[:list_id]
    base.api = Api.new base.config
  end

  def errors
    api.errors
  end

end


text:
var _ = require('underscore');
var moment = require('moment');
var ChatContext = require('./lib/chat-context.js');

module.exports = function(RED) {

  function ChatBotImage(config) {
    RED.nodes.createNode(this, config);
    var node = this;
    this.message = config.message;

    // relay message
    var handler = function(msg) {
      node.send([null, msg]);
    };
    RED.events.on('node:' + config.id, handler);

    this.on('input', function(msg) {

      var context = node.context();
      var originalMessage = msg.originalMessage;
      var chatId = msg.payload.chatId || (originalMessage && originalMessage.chat.id);
      var messageId = msg.payload.messageId || (originalMessage && originalMessage.message_id);
      var chatContext = context.flow.get('chat:' + chatId) || ChatContext(chatId);

      // check if this node has some wirings in the follow up pin, in that case
      // the next message should be redirected here
      if (!_.isEmpty(node.wires[1])) {
        chatContext.set('currentConversationNode', node.id);
        chatContext.set('currentConversationNode_at', moment());
      }

      // send out the message
      msg.payload = {
        type: 'photo',
        content: msg.payload,
        chatId: chatId,
        messageId: messageId,
        inbound: false
      };

      node.send([msg, null]);
    });

    // cleanup on close
    this.on('close',function() {
      RED.events.removeListener('node:' + config.id, handler);
    });
  }

  RED.nodes.registerType('chatbot-image', ChatBotImage);
};


text:
Caryophyllia atlantica är en korallart som först beskrevs av Duncan 1873.  Caryophyllia atlantica ingår i släktet Caryophyllia och familjen Caryophylliidae. Inga underarter finns listade i Catalogue of Life.

Källor

Stenkoraller
atlantica


text:
Home Featured Posts All Them Witches Interview: "We Aren't Very Savvy Businessmen"
All Them Witches Interview: "We Aren't Very Savvy Businessmen"
New Album Dying Surfer Meets His Maker Is Out Now Via New West.
You know, All Them Witches is the perfect name for this Nashville based quartet. There is something undeniable supernatural and otherwordly in their gloriously exploritory amalgamation of pysch, stoner, blues, and folk. Their latest album, Dying Surfer Meets His Maker, sees the band creating their most coherent and ambitious collection yet. To celebrate they are heading on on their first tour of the UK and Europe. And it is sold out. But you know head down to gigs anyway. Sneak in the back door. Pretend to be with the band. Do whatever you can. See them live.
UK Tour Dates
28 London, The Lexington SOLD OUT
29 Manchester, Gullivers SOLD OUT
1 Glasgow, King Tuts
2 London, The Lexington SOLD OUT
Overblown: Thanks for taking the time to talk to us. The album was inspired by vocalist/bassist Charles Parks' experiences while spending the winter in Elmgrove, Louisiana. What brought Charles to Elmgrove? What was inspiring about the locale?
All Them Witches: You can call him Parks. He's from Louisiana so he went to his grandmother's old house to watch over it for the winter. He brought his guitars and some tape recorders to pass the time, and Elmgrove is pretty small and isolated so naturally he spent a lot of time writing songs. We actually all visited that house later, and the vibe there was pretty unique to Louisiana. Pine trees and swamps and old chicken coops.
O: You have stated that you never play a song the same way twice. Has this approach ever fallen flat on its face?
ATW: Yes, plenty of times. Let's not talk about it.
O: I imagine it can also lead to transcendent moments while playing live. Can you recall any?
ATW: We have transcendent moments during every show. But we just had an awesome show in Tel Aviv, and we played some old songs for the first time in 2 years. The crowd helped make it happen, and the two local bands (The Great Machine, Tiny Fingers) were some of the best bands we've ever played with, so the energy level was high.
O: The album artwork is pretty psychedelic. Who created the artwork? What is the inspiration behind it?
ATW: God created the artwork. God inspired it. Robby (Staebler, drums) was the vessel.
O: Robby Staebler's brother Jason created the music video for 'Open Passageways'. Was it rewarding to keep the project 'in the family'?
ATW: Of course it was. That's our favourite video now. Chad Van Gaalen's is great but we've never met him, and we have been deeply connected with Jason for years. He even played guitar with us for a while, so he is practically part of the band. Everything Jason touches turns to gold.
O: 'El Centro', from the new album, is named for a "rowdy show performed in El Centro, California". Can you tell us more about this show?
ATW: We played a show on Halloween in El Centro, which is in the California desert, near Mexico. There were a few dozen people crammed into a tiny bar, and we were the only band so we just played all night. From the very beginning, we started doing weird stuff, and making up entire songs on the fly. That was magic. Thankfully we recorded the set, maybe we'll share it someday.
O: You self-release a lot of your music (Live at the Garage, A Sweet Release, Effervescent). Is it important for you to remain somewhat independent? Why?
ATW: Because we are impulsive and unprofessional. And we aren't very savvy businessmen. Our music is about creating and sharing. It's important to make the stuff available. Our label (New West) understands that not everything needs to be part of an album these days. They're great.
O: From reading about you guys, I can see that you often get labelled as a 'stoner' band. However, I think the band is far more expansive than that. Do you find that you are sometimes pigeonholed? Is that frustrating?
ATW: We get that a lot but it's OK. We haven't really felt pigeonholed, because we still just make whatever we make, and play whatever we play. Some people think it's stoner, some people think it's psych, some people call it the blues. We aren't really sure what it is, but it's some sort of music. At some point you have to start using descriptors, and that's part of the ride. And stoner rock fans appreciate whatever we're doing, so it's far from frustrating, it's liberating.
O: You have a European tour on the horizon with UK dates at The Lexington, Gullivers, and King Tuts. Have you played those venues before? Should we expect any surprises in terms of material you plan to play?
ATW: We have never even left North America before, so this is a new and exciting time. We are pretty pumped, so yes there will be surprises all around. See you out there.
Follow All Them Witches on Facebook.
Follow Overblown on Facebook, and Twitter.
Previous articleGarden Centre Share Debut Track 'Scrap Yard'
Next articleThe Tuts Interview: "It is literally DIY or die and we don't wanna die!"
All Them Witches – 'Nothing as the Ideal' | Album Review
Silverbacks Interview: "The estate we grew up in was an ammo depot in WWII"
Easy Prey Interview: "I get to be angry and pissed off"
Warhaus Interview: "Surround yourself with people you trust"
Marcus Lemoine - November 2, 2016


text:
package betterframework;

import java.util.LinkedList;
import java.util.List;

import battlecode.common.Direction;
import battlecode.common.GameActionException;
import battlecode.common.MapLocation;
import battlecode.common.RobotController;

public class DroneHandler extends BaseRobotHandler {

	protected DroneHandler(RobotController rc) {
		super(rc);
	}

	@Override
	public List<Action> chooseActions() throws GameActionException {
		LinkedList<Action> result = new LinkedList<Action>();
		if (BroadcastInterface.readAttackMode(rc)) {
			// if there are enough drones, charge the opponent!
			// TODO: attack towers first
			if (rc.isWeaponReady()) {
				result.add(attack);
				result.add(charge);
			} else {
				result.add(retreat);
			}
		} else {
			// else skirt the towers and hq so that we can kill other units
			result.add(attack);
			result.add(retreat);
		}
		return result;
	}

	private final Action attack = new Attack();

	private final Action charge = new MoveTo(rc.senseEnemyHQLocation());
	private final Action retreat = new MoveTo(rc.senseHQLocation());

	// drones can fly over obstacles, so they don't need to rely on the BFS results
	// therefore, we'll just use a simple movement implementation
	private class MoveTo implements Action {
		private MapLocation target;

		public MoveTo(MapLocation target) {
			this.target = target;
		}

		@Override
		public boolean run() throws GameActionException {
			if (rc.isCoreReady()) {
				for (Direction d : Util.getDirectionsToward(rc.getLocation(), target)) {
					if (rc.canMove(d)) {
						rc.move(d);
						return true;
					}
				}
			}
			return false;
		}

	}
}