text:
module Toggl
  module Worktime
    # Worktime Calendar
    class Calendar
      WEEK = %i[Sun Mon Tue Wed Thu Fri Sat].freeze

      class UnknownWeekdayError < StandardError; end

      def initialize(driver, zone_offset, week_begin, year, month)
        @driver = driver
        @zone_offset = zone_offset
        @year = year
        @month = month
        today = ::Time.new
        @days_in_month = Date.new(year, month, -1).day
        @last_fetch_day = @days_in_month
        @last_fetch_day = today.day if today.year == year && today.month == month && today.day < @days_in_month
        @data = nil
        @week_begin_day = week_begin.to_sym
        raise UnknownWeekdayError if WEEK.index(@week_begin_day).nil?
      end

      def week
        begin_index = WEEK.index(@week_begin_day)
        WEEK.rotate(begin_index)
      end

      def write
        fetch if @data.nil?
        rotation = week.index(:Sun)
        table = TTY::Table.new header: week
        week_data = []
        @day_data.each do |datum|
          wday = datum.day.wday
          # wday may be rotated
          wday_index = (wday + rotation) % 7
          week_data[wday_index] = datum.format
          if wday_index == 6
            table << week_data
            week_data = []
          end
        end
        # last week data may exist
        unless week_data.length.zero?
          # Padding
          (7 - week_data.length).times do
            week_data << nil
          end
          table << week_data
        end
        multi_renderer = TTY::Table::Renderer::Unicode.new(table, multiline: true)
        multi_renderer.border.separator = :each_row
        puts multi_renderer.render
      end

      def fetch
        @day_data = []
        (1..@days_in_month).each do |day|
          dateobj = Date.new(@year, @month, day)
          day_datum = nil
          if day <= @last_fetch_day
            @driver.merge!(@year, @month, day)
            time = @driver.total_time
            begin_at = @driver.work_time.first[0]&.getlocal(@zone_offset)&.strftime('%T')
            end_at = @driver.work_time.last[1]&.getlocal(@zone_offset)&.strftime('%T')
            day_datum = Toggl::Worktime::Day.new(dateobj, time, begin_at, end_at)
          else
            day_datum = Toggl::Worktime::Day.new(dateobj, 0, '', '')
          end
          @day_data << day_datum
        end
      end
    end

    # One-day datum
    class Day
      attr_reader :day

      def initialize(day, time, begin_at, end_at)
        @day = day
        @time = time
        @begin = begin_at
        @end = end_at
      end

      def format
        "Day: #{day.day}\n#{@begin}-#{@end}\n#{@time}"
      end
    end
  end
end


text:
If you already have your own MySQL database set up, you can skip this step and proceed with the next step to load TPC-H data.

In this tutorial, we will set up the MySQL database using Docker.

### Docker Installation

In this tutorial, we will launch MariaDB (i.e., open-source fork of MySQL), which is essentially equivalent to MySQL (at least for our tutorial), using Docker.

Docker is an open-source project for developers to create, deploy and run any application using containers.

You can download Docker [here](https://www.docker.com/community-edition#/download), and simply follow their instructions to install it.

### Start Your Database

After you install Docker, you can launch a MySQL/MariaDB instance in a Docker container by running the following command:

```bash
docker run --rm -d --name verdictdb-mysql -p 127.0.0.1:3306:3306 \
-e MYSQL_DATABASE=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mariadb:10
```

This command launches a MySQL/MariaDB instance locally using the default port of 3306.
You can access this database as a user 'root' without passwords.

!!! warning "Port is already allocated?"
    You may receive the error like blow when starting the docker container.

    > userland proxy: Bind for 0.0.0.0:3306 failed: port is already allocated

    This error simply means that there is already a process listening on the port 3306, e.g., already existing MySQL instance on your machine. You can either stop/terminate the MySQL instance and run the above docker command again. Or, you can simply use another port, e.g., 3305, to avoid the port conflict as follows:
    ```bash
    docker run --rm -d --name verdictdb-mysql -p 127.0.0.1:3305:3306 \
    -e MYSQL_DATABASE=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mariadb:10
    ```

## Setup Apache Spark

### Download / Install
Download a pre-compiled jar from [the official page](https://spark.apache.org/downloads.html). At the time of writing, the file for the latest version is `spark-2.3.1-bin-hadoop2.7.tgz`, which we will use in this article. For other versions, it should suffice to change the version number.

After the file is downloaded, move the file to your convenient location, then compress the file with the following command:

```bash
tar xzf spark-2.3.1-bin-hadoop2.7.tgz
```

### Start a Cluster

*(This section follows the steps in this [official guide](https://spark.apache.org/docs/latest/quick-start.html).)*

Move into the unarchived directory in the above step, then type the following command:

```bash
sbin/start-all.sh
```

The Spark cluster should be up and running. Its default status page is http://localhost:8080/

!!! warning "Connection refused error?"
    If you encounter the error when starting the Spark cluster, please refer to [this page](https://databricks.gitbooks.io/databricks-spark-knowledge-base/content/troubleshooting/port_22_connection_refused.html).

redpajama_set_name: RedPajamaGithub


text:
FROM microsoft/aspnetcore
WORKDIR /app
COPY bin/Debug/netcoreapp1.1/publish /app

ENTRYPOINT ["dotnet", "aspnet.dll"]


text:
package puppetlabs.trapperkeeper.rpc;

public class RPCConnectionException extends Exception {

    public RPCConnectionException(String msg) {
        super(msg);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2009 The Android Open Source Project

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

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

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>

    <!-- height of a normal list item in edit playlist mode -->
    <dimen name="normal_height">66dip</dimen>
    <!-- height of an expanded list item in edit playlist mode -->
    <dimen name="expanded_height">132dip</dimen>

    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>

    <!-- Preference fragment padding, bottom -->
    <dimen name="preference_fragment_padding_bottom">0dp</dimen>
    <!-- Preference fragment padding, sides -->
    <dimen name="preference_fragment_padding_side">16dp</dimen>

    <integer name="preference_fragment_scrollbarStyle">0x02000000</integer> <!-- outsideOverlay -->

    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="mini_controller_font_size_line1">15sp</dimen>
    <dimen name="mini_controller_font_size_line2">13sp</dimen>
    <dimen name="mini_controller_icon_width">89dp</dimen>
    <dimen name="mini_controller_icon_height">50dp</dimen>

    <dimen name="text_size_small">14sp</dimen>
    <dimen name="text_size_navdrawer">16sp</dimen>
    <dimen name="thumbnail_length_navlist">42dp</dimen>

    <dimen name="image_thumbnail_size">64dp</dimen>
    <dimen name="image_notification_size">128dip</dimen>

</resources>


text:
package com.amazonaws.services.appstream.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Describes a connector that enables persistent storage for users.
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StorageConnector implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The type of storage connector.
     *

     */
    private String connectorType;
    /**
     *

     * The ARN of the storage connector.
     *

     */
    private String resourceIdentifier;
    /**
     *

     * The names of the domains for the account.
     *

     */
    private java.util.List<String> domains;

    /**
     *

     * The type of storage connector.
     *

     *
     * @param connectorType
     *        The type of storage connector.
     * @see StorageConnectorType
     */

    public void setConnectorType(String connectorType) {
        this.connectorType = connectorType;
    }

    /**
     *

     * The type of storage connector.
     *

     *
     * @return The type of storage connector.
     * @see StorageConnectorType
     */

    public String getConnectorType() {
        return this.connectorType;
    }

    /**
     *

     * The type of storage connector.
     *

     *
     * @param connectorType
     *        The type of storage connector.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see StorageConnectorType
     */

    public StorageConnector withConnectorType(String connectorType) {
        setConnectorType(connectorType);
        return this;
    }

    /**
     *

     * The type of storage connector.
     *

     *
     * @param connectorType
     *        The type of storage connector.
     * @see StorageConnectorType
     */

    public void setConnectorType(StorageConnectorType connectorType) {
        withConnectorType(connectorType);
    }

    /**
     *

     * The type of storage connector.
     *

     *
     * @param connectorType
     *        The type of storage connector.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see StorageConnectorType
     */

    public StorageConnector withConnectorType(StorageConnectorType connectorType) {
        this.connectorType = connectorType.toString();
        return this;
    }

    /**
     *

     * The ARN of the storage connector.
     *

     *
     * @param resourceIdentifier
     *        The ARN of the storage connector.
     */

    public void setResourceIdentifier(String resourceIdentifier) {
        this.resourceIdentifier = resourceIdentifier;
    }

    /**
     *

     * The ARN of the storage connector.
     *

     *
     * @return The ARN of the storage connector.
     */

    public String getResourceIdentifier() {
        return this.resourceIdentifier;
    }

    /**
     *

     * The ARN of the storage connector.
     *

     *
     * @param resourceIdentifier
     *        The ARN of the storage connector.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public StorageConnector withResourceIdentifier(String resourceIdentifier) {
        setResourceIdentifier(resourceIdentifier);
        return this;
    }

    /**
     *

     * The names of the domains for the account.
     *

     *
     * @return The names of the domains for the account.
     */

    public java.util.List<String> getDomains() {
        return domains;
    }

    /**
     *

     * The names of the domains for the account.
     *

     *
     * @param domains
     *        The names of the domains for the account.
     */

    public void setDomains(java.util.Collection<String> domains) {
        if (domains == null) {
            this.domains = null;
            return;
        }

        this.domains = new java.util.ArrayList<String>(domains);
    }

    /**
     *

     * The names of the domains for the account.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setDomains(java.util.Collection)} or {@link #withDomains(java.util.Collection)} if you want to override
     * the existing values.
     *

     *
     * @param domains
     *        The names of the domains for the account.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public StorageConnector withDomains(String... domains) {
        if (this.domains == null) {
            setDomains(new java.util.ArrayList<String>(domains.length));
        }
        for (String ele : domains) {
            this.domains.add(ele);
        }
        return this;
    }

    /**
     *

     * The names of the domains for the account.
     *

     *
     * @param domains
     *        The names of the domains for the account.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public StorageConnector withDomains(java.util.Collection<String> domains) {
        setDomains(domains);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getConnectorType() != null)
            sb.append("ConnectorType: ").append(getConnectorType()).append(",");
        if (getResourceIdentifier() != null)
            sb.append("ResourceIdentifier: ").append(getResourceIdentifier()).append(",");
        if (getDomains() != null)
            sb.append("Domains: ").append(getDomains());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof StorageConnector == false)
            return false;
        StorageConnector other = (StorageConnector) obj;
        if (other.getConnectorType() == null ^ this.getConnectorType() == null)
            return false;
        if (other.getConnectorType() != null && other.getConnectorType().equals(this.getConnectorType()) == false)
            return false;
        if (other.getResourceIdentifier() == null ^ this.getResourceIdentifier() == null)
            return false;
        if (other.getResourceIdentifier() != null && other.getResourceIdentifier().equals(this.getResourceIdentifier()) == false)
            return false;
        if (other.getDomains() == null ^ this.getDomains() == null)
            return false;
        if (other.getDomains() != null && other.getDomains().equals(this.getDomains()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getConnectorType() == null) ? 0 : getConnectorType().hashCode());
        hashCode = prime * hashCode + ((getResourceIdentifier() == null) ? 0 : getResourceIdentifier().hashCode());
        hashCode = prime * hashCode + ((getDomains() == null) ? 0 : getDomains().hashCode());
        return hashCode;
    }

    @Override
    public StorageConnector clone() {
        try {
            return (StorageConnector) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.appstream.model.transform.StorageConnectorMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
@interface ReceiveMessageViewController : UIViewController

@end


text:
'use strict';

var concatDist, concatDistMapped = null;

concatDist = {
    options: {
        banner: require('./utils/banner') + "(function(angular){\n" + "'use strict';\n",
        footer: '\n}(angular));'
    },
    src: [
        'src/directives/leaflet.js',
        'src/services/*.js',
        'src/**/*.js'

    ],
    dest: 'dist/angular-leaflet-directive.pre.js'
};

concatDistMapped = _.clone(concatDist, true);
concatDistMapped.options.sourceMap = true;
concatDistMapped.options.sourceMapName = "dist/<%= pkg.name %>_dev_mapped.js.map";
concatDistMapped.dest = "dist/<%= pkg.name %>_dev_mapped.js";

module.exports = function(grunt, options) {
    return {
        dist: concatDist,
        distMapped: concatDistMapped,
        license: {
            src: [
                'src/header-MIT-license.txt',
                'dist/angular-leaflet-directive.min.no-header.js'
            ],
            dest: 'dist/angular-leaflet-directive.min.js'
        },
        examples: {
            options: {
                banner: '(function(angular){ \nvar app = angular.module(\'webapp\');\n',
                footer: '}(angular));'
            },
            src: ['examples/js/controllers/*.js'],
            dest: 'examples/js/controllers.js'
        }
    };
};


text:
namespace autofill_assistant {
class UserModel;

// Shows a UI to collect user data required for subsequent actions.
class CollectUserDataAction : public Action,
                              public autofill::PersonalDataManagerObserver {
 public:
  explicit CollectUserDataAction(ActionDelegate* delegate,
                                 const ActionProto& proto);

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

  ~CollectUserDataAction() override;

  // From autofill::PersonalDataManagerObserver.
  void OnPersonalDataChanged() override;

  static bool IsUserDataComplete(
      const UserData& user_data,
      const UserModel& user_model,
      const CollectUserDataOptions& collect_user_data_options);

 private:
  struct LoginDetails {
    LoginDetails(bool choose_automatically_if_no_stored_login,
                 const std::string& payload,
                 const std::string& tag);
    LoginDetails(bool choose_automatically_if_no_stored_login,
                 const std::string& payload,
                 const std::string& tag,
                 const WebsiteLoginManager::Login& login);
    ~LoginDetails();
    bool choose_automatically_if_no_stored_login;
    std::string payload;
    std::string tag;
    // Only for Chrome PWM login details.
    absl::optional<WebsiteLoginManager::Login> login;
  };

  void InternalProcessAction(ProcessActionCallback callback) override;
  void EndAction(const ClientStatus& status,
                 const Metrics::CollectUserDataResult result);
  bool HasActionEnded() const;

  void OnGetUserData(const CollectUserDataProto& collect_user_data,
                     UserData* user_data,
                     const UserModel* user_model);
  void OnAdditionalActionTriggered(int index,
                                   UserData* user_data,
                                   const UserModel* user_model);
  void OnTermsAndConditionsLinkClicked(int link,
                                       UserData* user_data,
                                       const UserModel* user_model);
  void ReloadUserData(UserData* user_data);

  // Only used for logging purposes.
  void OnSelectionStateChanged(UserDataEventField field,
                               UserDataEventType event_type);

  void OnGetLogins(const LoginDetailsProto::LoginOptionProto& login_option,
                   std::vector<WebsiteLoginManager::Login> logins);
  void ShowToUser();
  void OnShowToUser(UserData* user_data, UserData::FieldChange* field_change);
  void UpdateUserData(UserData* user_data);
  void OnRequestUserData(UserData* user_data,
                         bool success,
                         const GetUserDataResponseProto& response);
  void UpdateMetrics(UserData* user_data);
  void UpdateUi();

  // Creates a new instance of |CollectUserDataOptions| from |proto_|.
  bool CreateOptionsFromProto();

  void FillInitialDataStateForMetrics(
      const std::vector<std::unique_ptr<Contact>>& contacts,
      const std::vector<std::unique_ptr<Address>>& addresses,
      const std::vector<std::unique_ptr<PaymentInstrument>>&
          payment_instruments);

  void FillInitiallySelectedDataStateForMetrics(UserData* user_data);

  void WriteProcessedAction(UserData* user_data, const UserModel* user_model);
  void UpdateProfileAndCardUse(
      UserData* user_data,
      autofill::PersonalDataManager* personal_data_manager);

  void UpdateUserDataFromProto(const GetUserDataResponseProto& proto_data,
                               UserData* user_data);
  // Update user data with the new state from personal data manager.
  void UpdatePersonalDataManagerProfiles(
      UserData* user_data,
      UserData::FieldChange* field_change = nullptr);
  void UpdatePersonalDataManagerCards(
      UserData* user_data,
      UserData::FieldChange* field_change = nullptr);
  void UpdateSelectedContact(UserData* user_data);
  void UpdateSelectedPhoneNumber(UserData* user_data);
  void UpdateSelectedShippingAddress(UserData* user_data);
  void UpdateSelectedCreditCard(UserData* user_data);
  void MaybeLogMetrics();
  void MaybeRemoveAsPersonalDataManagerObserver();

  UserDataMetrics metrics_data_;
  bool shown_to_user_ = false;
  std::unique_ptr<CollectUserDataOptions> collect_user_data_options_;
  ProcessActionCallback callback_;

  // The response of the last user data request.
  GetUserDataResponseProto last_user_data_;

  // Maps login choice identifiers to the corresponding login details.
  base::flat_map<std::string, std::unique_ptr<LoginDetails>> login_details_map_;

  base::WeakPtrFactory<CollectUserDataAction> weak_ptr_factory_{this};
};

}  // namespace autofill_assistant
#endif  // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_ACTIONS_COLLECT_USER_DATA_ACTION_H_


text:
using WebKit::WebGamepads;
using WebTestRunner::WebTestProxy;
using WebTestRunner::WebTestProxyBase;

namespace content {

namespace {

base::LazyInstance<base::Callback<void(RenderView*, WebTestProxyBase*)> >::Leaky
    g_callback = LAZY_INSTANCE_INITIALIZER;

RenderViewImpl* CreateWebTestProxy(RenderViewImplParams* params) {
  typedef WebTestProxy<RenderViewImpl, RenderViewImplParams*> ProxyType;
  ProxyType* render_view_proxy = new ProxyType(
      reinterpret_cast<RenderViewImplParams*>(params));
  if (g_callback == 0)
    return render_view_proxy;
  g_callback.Get().Run(
      static_cast<RenderView*>(render_view_proxy), render_view_proxy);
  return render_view_proxy;
}

}  // namespace

void EnableWebTestProxyCreation(
    const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback) {
  g_callback.Get() = callback;
  RenderViewImpl::InstallCreateHook(CreateWebTestProxy);
}

void SetMockGamepads(const WebGamepads& pads) {
  RendererWebKitPlatformSupportImpl::SetMockGamepadsForTesting(pads);
}

void DisableAppCacheLogging() {
  RendererWebApplicationCacheHostImpl::DisableLoggingForTesting();
}

void EnableDevToolsFrontendTesting() {
  DevToolsClient::EnableDevToolsFrontendTesting();
}

int GetLocalSessionHistoryLength(RenderView* render_view) {
  return static_cast<RenderViewImpl*>(render_view)
      ->GetLocalSessionHistoryLengthForTesting();
}

void SetAllowOSMesaImageTransportForTesting() {
#if defined(OS_MACOSX)
  ImageTransportSurface::SetAllowOSMesaForTesting(true);
#endif
}

void DoNotSendFocusEvents() {
  RenderThreadImpl::current()->set_should_send_focus_ipcs(false);
}

void SyncNavigationState(RenderView* render_view) {
  static_cast<RenderViewImpl*>(render_view)->SyncNavigationState();
}

void SetFocusAndActivate(RenderView* render_view, bool enable) {
  static_cast<RenderViewImpl*>(render_view)
      ->SetFocusAndActivateForTesting(enable);
}

void EnableShortCircuitSizeUpdates() {
  RenderThreadImpl::current()->set_short_circuit_size_updates(true);
}

void ForceResizeRenderView(RenderView* render_view,
                           const WebKit::WebSize& new_size) {
  static_cast<RenderViewImpl*>(render_view)->didAutoResize(new_size);
}

void DisableNavigationErrorPages() {
  RenderThreadImpl::current()->set_skip_error_pages(true);
}

void SetDeviceScaleFactor(RenderView* render_view, float factor) {
  static_cast<RenderViewImpl*>(render_view)
      ->SetDeviceScaleFactorForTesting(factor);
}

void DisableSystemDragDrop() {
#if defined(OS_WIN) && !defined(USE_AURA)
  WebContentsDragWin::DisableDragDropForTesting();
#endif
}

}  // namespace content


text:
package com.seleniumtests.browserfactory.customprofile;

public interface OperaProfileMarker { }


text:
SPHINXOPTS    ?= -E -W -j 8
SPHINXBUILD   = python -msphinx
SPHINXPROJ    = PyroTutorials
SOURCEDIR     = source
BUILDDIR      = build

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M -a -E help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


text:
title: OnClientResize
page_title: OnClientResize | RadWindow for ASP.NET AJAX Documentation
description: OnClientResize
slug: window/client-side-programming/events/onclientresize
tags: onclientresize
published: True
position: 11
---

# OnClientResize

The **OnClientResize** event of the **RadWindow** fires while the user is resizing the popup.

The event handler receives the following arguments:

1. The [RadWindow]({%slug window/client-side-programming/radwindow-object%}) object that fired the event.

1. An event arguments object that does not expose any methods and properties.

You can use this event to get the current dimensions of the dialog by calling the `getWindowBounds()` method from the [RadWindow client-side API]({%slug window/client-side-programming/radwindow-object%}).

## See Also

 * [Overview]({%slug window/client-side-programming/events/overview%})

 * [RadWindow Object]({%slug window/client-side-programming/radwindow-object%})


text:
/*!
 * \file
 * \brief Class tools::Post_processing_SISO.
 */
#ifndef POST_PROCESSING_SISO_HPP
#define POST_PROCESSING_SISO_HPP

#include <mipp.h>

#include "Tools/Interface/Interface_clone.hpp"
#include "Tools/Interface/Interface_get_set_n_frames.hpp"

namespace aff3ct
{
namespace tools
{
template <typename B = int, typename R = float>
class Post_processing_SISO : public Interface_clone, public Interface_get_set_n_frames
{
protected:
	size_t n_frames;

public:
	virtual ~Post_processing_SISO() = default;

	virtual Post_processing_SISO<B,R>* clone() const;

	virtual bool siso_n(const int ite,
	                    const mipp::vector<R>& sys,
	                          mipp::vector<R>& ext,
	                          mipp::vector<B>& s);

	virtual bool siso_i(const int ite,
	                    const mipp::vector<R>& sys,
	                          mipp::vector<R>& ext);

	virtual void end(const int n_ite);

	inline size_t get_n_frames() const;

	virtual void set_n_frames(const size_t n_frames);

protected:
	Post_processing_SISO();

	void deep_copy(const Post_processing_SISO<B,R>& t);
};
}
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
#include "Tools/Code/Turbo/Post_processing_SISO/Post_processing_SISO.hxx"
#endif

#endif /* POST_PROCESSING_SISO_HPP */


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

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

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

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<com.android.camera.ui.RotateImageView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/thumbnail"
        style="@style/ReviewThumbnail"
        android:onClick="onThumbnailClicked"
        android:clickable="true"
        android:focusable="false"
        android:visibility="gone"
        android:contentDescription="@string/accessibility_review_thumbnail"
        android:background="@drawable/border_last_picture">
</com.android.camera.ui.RotateImageView>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Dialog Decoded Paste</TITLE>
<link rel="stylesheet" type="text/css" href="CrypTool_Help.css">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" VIEWASTEXT ID="Object1">
    <PARAM NAME="Keyword" VALUE="Dialog (overview of all dialogs)">
    <PARAM NAME="Keyword" VALUE="Hexadecimal input / output">
    <PARAM NAME="Keyword" VALUE="Window">
</OBJECT>

Dialog Decoded Paste

This dialog appears when you try to paste data from the clipboard into a
window for hexadecimal input and output.


text:
<?php

/*
 * This file is part of the Sami utility.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Sami\Parser\ClassVisitor;

use Sami\Parser\ClassVisitorInterface;
use Sami\Reflection\ClassReflection;
use Sami\Reflection\PropertyReflection;

/**
 * Looks for @property tags on classes in the format of:.
 *
 * @property [<type>] [name] [<description>]
 */
class PropertyClassVisitor implements ClassVisitorInterface
{
    public function visit(ClassReflection $class)
    {
        $modified = false;
        $properties = $class->getTags('property');
        if (!empty($properties)) {
            foreach ($properties as $propertyTag) {
                if ($this->injectProperty($class, implode(' ', $propertyTag))) {
                    $modified = true;
                }
            }
        }

        return $modified;
    }

    /**
     * Adds a new property to the class using an array of tokens.
     *
     * @param ClassReflection $class       Class reflection
     * @param string          $propertyTag Property tag contents
     *
     * @return bool
     */
    protected function injectProperty(ClassReflection $class, $propertyTag)
    {
        if (!$data = $this->parseProperty($propertyTag)) {
            return false;
        }

        $property = new PropertyReflection($data['name'], $class->getLine());
        $property->setDocComment($data['description']);
        $property->setShortDesc($data['description']);

        if (isset($data['hint'])) {
            $property->setHint(array(array($data['hint'], null)));
        }

        $class->addProperty($property);

        return true;
    }

    /**
     * Parses the parts of an @property tag into an associative array.
     *
     * @param string $tag Property tag contents
     *
     * @return array
     */
    protected function parseProperty($tag)
    {
        // Account for default array syntax
        $tag = str_replace('array()', 'array', $tag);

        $parts = preg_split('/(?:\s+)/Su', $tag, 3, PREG_SPLIT_DELIM_CAPTURE);
        if (isset($parts[1])) {
            if ('$' !== $parts[0][0]) {
                $type = $parts[0];
                $propertyName = substr($parts[1], 1);
            } elseif ('$' !== $parts[1][0]) {
                $type = $parts[1];
                $propertyName = substr($parts[0], 1);
            }
        } elseif (isset($parts[0])) {
            $propertyName = substr($parts[0], 1);
        } else {
            return array();
        }

        $description = implode('', $parts);
        $property = array('name' => $propertyName);
        if (isset($type)) {
            $property['hint'] = $type;
        }
        if (isset($description)) {
            $property['description'] = $description;
        }

        return $property;
    }
}


text:
<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCjVdwEuLGdondBNEid65dsZPjdfJ9G8hU"></script>
    <meta charset="utf-8">
    <title>Zoomin - welcome!</title>
    <link rel="stylesheet" href="vendor.6d2c1e00.css">
    <link rel="stylesheet" href="app.52de60c3.css">
  </head>
  <body ng-app="zoominApp">
    <zoomin-layout></zoomin-layout>

    <script src="vendor.a32deadc.js"></script>
    <script src="app.654a3d64.js"></script>
    <script>
      // Initialize Firebase
      var config = {
        apiKey: "AIzaSyCjVdwEuLGdondBNEid65dsZPjdfJ9G8hU",
        authDomain: "zoomin-4c0b1.firebaseapp.com",
        databaseURL: "https://zoomin-4c0b1.firebaseio.com",
        storageBucket: "zoomin-4c0b1.appspot.com",
      };
      firebase.initializeApp(config);
    </script>
  </body>
</html>


text:
import webbrowser
webbrowser.open_new("http://google.com")


text:
class Systeminfo < ActiveRecord::Base
  validates :name, presence: true
  validates :value, presence: true
end


text:
using UnityEngine;
using System.Collections;

public class PiggyScript : MonoBehaviour {

	public AudioSource pigBounce;

	// Use this for initialization
	void Start () {

	}

	void OnCollisionEnter2D(Collision2D other)
	{
		if(other.transform.position.y > this.transform.position.y +1f)
		{
			Debug.Log ("entered collider");
			//play sound

			pigBounce.Play ();
			other.rigidbody.AddForce (new Vector2(0f,300f));
		}
	}

	// Update is called once per frame
	void Update () {

	}
}


text:
Tiny.Editor = function(config) {
    config = config || {};
    config.tinyConfig = config.tinyConfig || Tiny.config;
    config.tinyConfig = config.tinyConfig || {};
    Ext.applyIf(config.tinyConfig,{
        setup: (function(ed) {
            ed.onInit.add(this.onLoad);
            ed.onKeyUp.add(this.onChange);
        }).createDelegate(this)
        ,apply_source_formatting: true
        ,browserUrl: MODx.config.manager_url+'?a='+MODx.action['browser']
        ,button_tile_map: false
        ,cleanup: true
        ,compressor: ''
        ,convert_fonts_to_spans: true
        ,convert_newlines_to_brs: false
        ,element_format: 'xhtml'
        ,element_list: ''
        ,entities: ''
        ,entity_encoding: 'named'
        ,file_browser_callback: 'Tiny.loadBrowser'
        ,formats: 'p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address'
        ,frontend: false
        ,height: '400px'
        ,invalid_elements: ''
        ,language: MODx.config['manager_language']
        ,mode: 'none'
        ,nowrap: false
        ,path: Tiny.config.assets_path
        ,path_options: ''
        ,plugin_insertdate_dateFormat: '%Y-%m-%d'
        ,plugin_insertdate_timeFormat: '%H:%M:%S'
        ,relative_urls: true
        ,remove_line_breaks: false
        ,resource_browser_path: Tiny.config.manager_url+'controllers/browser/index.php?'
        ,width: '90%'

        ,buttons1: MODx.config['tiny.custom_buttons1']
        ,buttons2: MODx.config['tiny.custom_buttons2']
        ,buttons3: MODx.config['tiny.custom_buttons3']
        ,buttons4: MODx.config['tiny.custom_buttons4']
        ,css_path: MODx.config['editor_css_path'] || ''
        ,css_selectors: MODx.config['tinymce.css_selectors']
        ,plugins: MODx.config['tiny.custom_plugins']

        ,theme: MODx.config['tiny.editor_theme'] || 'advanced'
        ,theme_advanced_buttons1: MODx.config['tiny.custom_buttons1']
        ,theme_advanced_buttons2: MODx.config['tiny.custom_buttons2']
        ,theme_advanced_buttons3: MODx.config['tiny.custom_buttons3']
        ,theme_advanced_buttons4: MODx.config['tiny.custom_buttons4']
        ,theme_advanced_blockformats: MODx.config['tiny.blockformats']
        ,theme_advanced_resizing: false
        ,theme_advanced_resize_horizontal: false
        ,theme_advanced_statusbar_location: 'bottom'
        ,theme_advanced_toolbar_align: 'left'
        ,theme_advanced_disable: ''
        ,theme_advanced_toolbar_location: 'top'

        ,toolbar_align: MODx.config['manager_direction'] || 'rtl'
        ,use_browser: MODx.config['use_browser'] || true

        ,skin: MODx.config['tiny.skin']
        ,skin_variant: MODx.config['tiny.skin_variant']
        ,object_resizing: MODx.config['tiny.object_resizing'] || true
        ,table_inline_editing: MODx.config['tiny.table_inline_editing'] || true
        ,template_selected_content_classes: MODx.config['tiny.template_selected_content_classes']
    });
    Ext.applyIf(config,{
        width: '90%'
    });
    Tiny.Editor.superclass.constructor.call(this,config);
    this.config = config;
    this.addEvents({
        'load': true
        ,'ajaxload': true
    });
    this.on('render',this.onTinyRender,this);
    this.on('ajaxload',this.onAjaxLoad,this);
};
Ext.extend(Tiny.Editor,Ext.form.TextArea,{
    editor: null

    ,getTinyId: function() {
        return this.getEl().dom.id;
    }

    ,setValue: function(v) {
        var c = tinyMCE.get(this.getTinyId());
        if (c) c.setContent(v);
    }

    ,onTinyRender: function() {
        var oid = Ext.get(this.getTinyId());
        if (!oid) return;

        var s = this.config.tinyConfig;
        s.mode = 'exact';
        tinyMCE.init(s);
        tinyMCE.execCommand('mceAddControl', false,this.getTinyId());
        this.fireEvent('load');
    }

    ,onChange: function() {}
    ,onLoad: function(ed) {
        return false;
        var el = Ext.get(ed.id+'_ifr');
        new MODx.load({
            xtype: 'modx-treedrop'
            ,target: el
            ,targetEl: el.dom
            ,iframe: true
            ,iframeEl: 'tinymce'
            ,onInsert: function(v) {
                tinyMCE.execCommand('mceInsertContent',false,v);
            }
        });
    }
    ,onAjaxLoad: function() {
        var els = Ext.query('.modx-richtext');
        Ext.each(els,function(el,i) {
            el = Ext.get(el);
            tinyMCE.execCommand('mceAddControl', false, el.dom.id);
        },this);

        this.fireEvent('ajaxload');
    }
    ,toggle: function(e,t) {
        t = t.id.replace(/-toggle/,'');
        ed = tinyMCE.get(t);
        if (ed) {
            ed.isHidden() ? ed.show() : ed.hide();
        }
    }

    ,loadBrowser: function(fld, url, type, win) {
        tinyMCE.activeEditor.windowManager.open({
            file: this.config.browserUrl || Tiny.config.browserUrl
            ,width: screen.width * 0.7
            ,height: screen.height * 0.7
            ,resizable: 'yes'
            ,inline: 'yes'
            ,close_previous: 'no'
        },{
            window: win
            ,input: fld
        });
        return false;
    }
});
Ext.reg('tinymce',Tiny.Editor);


text:
package org.apache.jena.arq.querybuilder.handlers;

import java.util.Iterator ;
import java.util.List ;
import java.util.Map ;

import org.apache.jena.arq.querybuilder.SelectBuilder;
import org.apache.jena.arq.querybuilder.clauses.ConstructClause;
import org.apache.jena.arq.querybuilder.rewriters.ElementRewriter;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
import org.apache.jena.query.Query ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.expr.Expr ;
import org.apache.jena.sparql.lang.sparql_11.ParseException ;
import org.apache.jena.sparql.syntax.* ;
import org.apache.jena.sparql.util.ExprUtils ;

/**
 * The where handler
 *
 */
public class WhereHandler implements Handler {

	// the query to modify
	private final Query query;

	/**
	 * Constructor.
	 * @param query The query to manipulate.
	 */
	public WhereHandler(Query query) {
		this.query = query;
	}

	/**
	 * Add all where attributes from the Where Handler argument.
	 * @param whereHandler The Where Handler to copy from.
	 */
	public void addAll(WhereHandler whereHandler) {
		Element e = whereHandler.query.getQueryPattern();
		Element locE = query.getQueryPattern();
		if (e != null) {
			if (locE == null) {
				query.setQueryPattern(e);
			} else {
				ElementTriplesBlock locEtb = (ElementTriplesBlock) locE;
				ElementTriplesBlock etp = (ElementTriplesBlock) e;
				Iterator<Triple> iter = etp.patternElts();
				while (iter.hasNext()) {
					locEtb.addTriple(iter.next());
				}
			}
		}
	}

	/**
	 * Get the base element from the where clause.
	 * If the clause does not contain an element return the element group, otherwise return the
	 * enclosed elelment.
	 * @return the base element.
	 */
	private Element getElement() {
		ElementGroup eg = getClause();
		if (eg.getElements().size() == 1) {
			return eg.getElements().get(0);
		}
		return eg;
	}

	/**
	 * Get the element group for the clause.
	 * if HTe element group is not set, create and set it.
	 * @return The element group.
	 */
	private ElementGroup getClause() {
		ElementGroup e = (ElementGroup) query.getQueryPattern();
		if (e == null) {
			e = new ElementGroup();
			query.setQueryPattern(e);
		}
		return e;
	}

	/**
	 * Test that a triple is valid.
	 * Throws an IllegalArgumentException if the triple is not valid.
	 * @param t The trip to test.
	 */
	private void testTriple(Triple t) {
		// verify Triple is valid
		boolean validSubject = t.getSubject().isURI()
				|| t.getSubject().isBlank() || t.getSubject().isVariable()
				|| t.getSubject().equals(Node.ANY);
		boolean validPredicate = t.getPredicate().isURI()
				|| t.getPredicate().isVariable()
				|| t.getPredicate().equals(Node.ANY);
		boolean validObject = t.getObject().isURI()
				|| t.getObject().isLiteral() || t.getObject().isBlank()
				|| t.getObject().isVariable() || t.getObject().equals(Node.ANY);

		if (!validSubject || !validPredicate || !validObject) {
			StringBuilder sb = new StringBuilder();
			if (!validSubject) {
				sb.append(String
						.format("Subject (%s) must be a URI, blank, variable, or a wildcard. %n",
								t.getSubject()));
			}
			if (!validPredicate) {
				sb.append(String
						.format("Predicate (%s) must be a URI , variable, or a wildcard. %n",
								t.getPredicate()));
			}
			if (!validObject) {
				sb.append(String
						.format("Object (%s) must be a URI, literal, blank, , variable, or a wildcard. %n",
								t.getObject()));
			}
			if (!validSubject || !validPredicate) {
				sb.append(String
						.format("Is a prefix missing?  Prefix must be defined before use. %n"));
			}
			throw new IllegalArgumentException(sb.toString());
		}
	}

	/**
	 * Add the triple to the where clause
	 * @param t The triple to add.
	 * @throws IllegalArgumentException If the triple is not a valid triple for a where clause.
	 */
	public void addWhere(Triple t) throws IllegalArgumentException {
		testTriple(t);
		ElementGroup eg = getClause();
		List<Element> lst = eg.getElements();
		if (lst.isEmpty()) {
			ElementTriplesBlock etb = new ElementTriplesBlock();
			etb.addTriple(t);
			eg.addElement(etb);
		} else {
			Element e = lst.get(lst.size() - 1);
			if (e instanceof ElementTriplesBlock) {
				ElementTriplesBlock etb = (ElementTriplesBlock) e;
				etb.addTriple(t);
			} else {
				ElementTriplesBlock etb = new ElementTriplesBlock();
				etb.addTriple(t);
				eg.addElement(etb);
			}

		}
	}

	/**
	 * Add an optional triple to the where clause
	 * @param t The triple to add.
	 * @throws IllegalArgumentException If the triple is not a valid triple for a where clause.
	 */
	public void addOptional(Triple t) throws IllegalArgumentException {
		testTriple(t);
		ElementTriplesBlock etb = new ElementTriplesBlock();
		etb.addTriple(t);
		ElementOptional opt = new ElementOptional(etb);
		getClause().addElement(opt);
	}

	/**
	 * Add an expression string as a filter.
	 * @param expression The expression string to add.
	 * @throws ParseException If the expression can not be parsed.
	 */
	public void addFilter(String expression) throws ParseException {
		getClause().addElement( new ElementFilter( ExprUtils.parse( query, expression, true ) ) );
	}

	/**
	 * add an expression as a filter.
	 * @param expr The expression to add.
	 */
	public void addFilter(Expr expr) {
		getClause().addElement(new ElementFilter(expr));
	}

	/**
	 * Add a subquery to the where clause.
	 * @param subQuery The sub query to add.
	 */
	public void addSubQuery(SelectBuilder subQuery) {
		getClause().addElement(makeSubQuery(subQuery));
	}

	/**
	 * Convert a subquery into a subquery element.
	 * @param subQuery The sub query to convert
	 * @return THe converted element.
	 */
	private ElementSubQuery makeSubQuery(SelectBuilder subQuery) {
		Query q = new Query();
		PrologHandler ph = new PrologHandler(query);
		ph.addAll(subQuery.getPrologHandler());

		for (Var v : subQuery.getVars()) {
			q.addResultVar(v);
			q.setQuerySelectType();
		}

		if (subQuery instanceof ConstructClause) {
			ConstructHandler ch = new ConstructHandler(q);
			ch.addAll(((ConstructClause<?>) subQuery).getConstructHandler());

		}
		DatasetHandler dh = new DatasetHandler(q);
		dh.addAll( subQuery.getDatasetHandler() );
		SolutionModifierHandler smh = new SolutionModifierHandler(q);
		smh.addAll( subQuery.getSolutionModifierHandler() );
		WhereHandler wh = new WhereHandler(q);
		wh.addAll( subQuery.getWhereHandler() );
		return new ElementSubQuery(q);

	}

	/**
	 * Add a union to the where clause.
	 * @param subQuery The subquery to add as the union.
	 */
	public void addUnion(SelectBuilder subQuery) {
		ElementUnion union=null;
		ElementGroup clause = getClause();
		// if the last element is a union make sure we add to it.
		if ( ! clause.isEmpty() ) {
			Element lastElement =  clause.getElements().get(clause.getElements().size()-1);
			if (lastElement instanceof ElementUnion)
			{
				union = (ElementUnion) lastElement;
			}
		}
		if (union == null)
		{
			union = new ElementUnion();
			clause.addElement( union );
		}
		if (subQuery.getVars().size() > 0) {
			union.addElement(makeSubQuery(subQuery));
		} else {
			PrologHandler ph = new PrologHandler(query);
			ph.addAll(subQuery.getPrologHandler());
			union.addElement( subQuery.getWhereHandler().getClause() );
		}

	}

	/**
	 * Add a graph to the where clause.
	 * @param graph The name of the graph.
	 * @param subQuery The where handler that defines the graph.
	 */
	public void addGraph(Node graph, WhereHandler subQuery) {
		getClause().addElement(
				new ElementNamedGraph(graph, subQuery.getElement()));
	}

	/**
	 * Add a binding to the where clause.
	 * @param expr The expression to bind.
	 * @param var The variable to bind it to.
	 */
	public void addBind( Expr expr, Var var )
	{
		getClause().addElement(
				new ElementBind(var,expr)
				);
	}

	/**
	 * Add a binding to the where clause.
	 * @param expression The expression to bind.
	 * @param var The variable to bind it to.
	 * @throws ParseException
	 */
	public void addBind( String expression, Var var ) throws ParseException
	{
		getClause().addElement(
				new ElementBind(var, ExprUtils.parse( query, expression, true ))
				);
	}

	@Override
	public void setVars(Map<Var, Node> values) {
		if (values.isEmpty()) {
			return;
		}

		Element e = query.getQueryPattern();
		if (e != null) {
			ElementRewriter r = new ElementRewriter(values);
			e.visit(r);
			query.setQueryPattern(r.getResult());
		}
	}

	@Override
	public void build() {
		// no special operations required.
	}

}


text:
package org.springframework.cloud.gcp.stream.binder.pubsub.provisioning;

import org.springframework.cloud.stream.provisioning.ConsumerDestination;

/**
 * Consumer destination for Pub/Sub.
 *
 * @author João André Martins
 */
public class PubSubConsumerDestination implements ConsumerDestination {

	private String name;

	public PubSubConsumerDestination(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		return this.name;
	}
}


text:
require 'spec_helper'

describe 'Registering Custom Mappers' do
  include_context 'container'
  include_context 'users and tasks'

  it 'allows registering arbitrary objects as mappers' do
    model = Struct.new(:name, :email)

    mapper = -> users {
      users.map { |tuple| model.new(*tuple.values_at(:name, :email)) }
    }

    configuration.relation(:users) do
      def by_name(name)
        restrict(name: name)
      end
    end

    configuration.mappers do
      register(:users, entity: mapper)
    end

    users = container.relation(:users).by_name('Jane').as(:entity)

    expect(users).to match_array([model.new('Jane', 'jane@doe.org')])
  end
end


text:
namespace search {
namespace fef {

void
FeatureOverrider::handle_bind_inputs(vespalib::ConstArrayRef<LazyValue> inputs)
{
    _executor.bind_inputs(inputs);
}

void
FeatureOverrider::handle_bind_outputs(vespalib::ArrayRef<NumberOrObject> outputs)
{
    _executor.bind_outputs(outputs);
}

FeatureOverrider::FeatureOverrider(FeatureExecutor &executor, uint32_t outputIdx, feature_t number, Value::UP object)
    : _executor(executor),
      _outputIdx(outputIdx),
      _number(number),
      _object(std::move(object))
{
}

bool
FeatureOverrider::isPure()
{
    return _executor.isPure();
}

void
FeatureOverrider::execute(uint32_t docId)
{
    _executor.lazy_execute(docId);
    if (_outputIdx < outputs().size()) {
        if (_object) {
            outputs().set_object(_outputIdx, *_object);
        } else {
            outputs().set_number(_outputIdx, _number);
        }
    }
}

void
FeatureOverrider::handle_bind_match_data(const MatchData &md)
{
    _executor.bind_match_data(md);
}

} // namespace fef
} // namespace search


text:
package net.meisen.dissertation.impl.indexes;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import net.meisen.dissertation.model.indexes.IPrefixKeySeparatable;
import net.meisen.dissertation.model.indexes.IndexKey;
import net.meisen.dissertation.model.indexes.IndexKeyDefinition;
import net.meisen.dissertation.model.indexes.BaseIndexedCollection;
import net.meisen.dissertation.model.indexes.IndexedCollectionDefinition;
import net.meisen.general.genmisc.types.Objects;

/**
 * A {@code NestedIndexedCollection} is a {@code BaseIndexedCollection} which uses
 * several other {@code BaseIndexedCollection} to index an object (i.e each value of
 * a multiple key is resolved to an own {@code BaseIndexedCollection}.
 *
 * @author pmeisen
 *
 */
public class NestedIndexedCollection extends BaseIndexedCollection implements
		IPrefixKeySeparatable {

	private final IndexedCollectionDefinition[] definitions;
	private final BaseIndexedCollection root;

	/**
	 * Helper to put an object and it's identifier in one instance.
	 *
	 * @author pmeisen
	 *
	 * @param <T>
	 *            the type of the wrapped object
	 */
	public static class Wrapper<T> {
		private final Object id;
		private final T wrapped;

		/**
		 * Constructor to create a {@code Wrapper} with it's {@code id} and the
		 * item to be wrapped.
		 *
		 * @param id
		 *            the identifier for the wrapped object
		 * @param wrapped
		 *            the item to be wrapped
		 */
		public Wrapper(final Object id, final T wrapped) {
			this.id = id;
			this.wrapped = wrapped;
		}

		/**
		 * Gets the identifier of the wrapped object.
		 *
		 * @return identifier of the wrapped object
		 */
		public Object getId() {
			return id;
		}

		/**
		 * Gets the object associated to the identifier.
		 *
		 * @return the object associated to the identifier
		 */
		public T get() {
			return wrapped;
		}

		@Override
		public int hashCode() {
			return wrapped == null ? 0 : wrapped.hashCode();
		}

		@Override
		public boolean equals(final Object o) {
			return Objects.equals(wrapped, o);
		}
	}

	/**
	 * Constructor to pass the {@code IndexKeyDefinition} and the definitions of
	 * the {@code BaseIndexedCollection} nested.
	 *
	 * @param keyDefinition
	 *            the {@code IndexKeyDefinition} to define the key of this
	 *            collection
	 * @param definitions
	 *            the {@code NestedCollectionDefinition} instances of the
	 *            {@code IndexKeyDefinition} instances nested
	 */
	public NestedIndexedCollection(final IndexKeyDefinition keyDefinition,
			final IndexedCollectionDefinition... definitions) {
		super(keyDefinition);

		if (definitions == null) {
			throw new NullPointerException("The definitions cannot be null.");
		} else if (keyDefinition.getSize() != definitions.length) {
			throw new IllegalArgumentException(
					"The size of the keyDefinition '"
							+ keyDefinition.getSize()
							+ "' (i.e. the different parts of the key) must be equal to the amount of NestedCollectionDefinitions '"
							+ definitions.length + "' ('" + keyDefinition
							+ "').");
		} else if (definitions.length == 0) {
			throw new IllegalArgumentException(
					"There must be at least one definition defined.");
		}

		this.definitions = definitions;
		this.root = create(null, 0).get();
	}

	@Override
	public boolean containsObject(final Object object) {
		final IndexKey<?> key = getKeyDefinition().getKey(object);
		return getObject(key.getValues()) != null;
	}

	@Override
	public boolean addObject(final Object object) {
		final IndexKey<?> key = getKeyDefinition().getKey(object);
		final Object[] values = key.getValues();

		final BaseIndexedCollection collection = getCollection(values, true);
		final Object lastValue = values[values.length - 1];

		return collection.addObject(new Wrapper<Object>(lastValue, object));
	}

	@Override
	public void removeObject(final Object object) {
		final IndexKey<?> key = getKeyDefinition().getKey(object);
		final Object[] values = key.getValues();

		final BaseIndexedCollection collection = getCollection(values, false);
		final Object lastValue = values[values.length - 1];

		collection.removeObject(new Wrapper<Object>(lastValue, object));
	}

	/**
	 * Helper method to get the collection addressed by the specified (prefix)
	 * values.
	 *
	 * @param values
	 *            the values to find the {@code BaseIndexedCollection} defined by,
	 *            can be just some prefix values (e.g. the first four on a six
	 *            sized index)
	 * @param create
	 *            {@code true} if the path to the {@code BaseIndexedCollection}
	 *            should be created, otherwise {@code false}
	 *
	 * @return the found or created {@code BaseIndexedCollection} or {@code null} if
	 *         it couldn't be found
	 */
	protected BaseIndexedCollection getCollection(final Object[] values,
			final boolean create) {

		BaseIndexedCollection collection = this.root;

		// if we have a full definition we cannot use the last key
		final int lastValue = values.length
				- (values.length == definitions.length ? 1 : 0);
		for (int i = 0; i < lastValue; i++) {
			final Object key = values[i];

			// get the collection behind this value
			@SuppressWarnings("unchecked")
			Wrapper<BaseIndexedCollection> c = (Wrapper<BaseIndexedCollection>) collection
					.getObject(key);

			// create a new collection if there isn't one yet
			if (c == null) {
				if (create) {
					c = create(key, i + 1);
					collection.addObject(c);
				} else {
					collection = null;
					break;
				}
			}

			// c contains the collection we should go on with it
			collection = c.get();
		}

		return collection;
	}

	@Override
	public void removeAll() {
		this.root.removeAll();
	}

	@Override
	public Object getObject(final Object... values) {

		if (values == null) {
			throw new NullPointerException("The values cannot be null.");
		} else if (values.length > definitions.length) {
			throw new IllegalArgumentException(
					"The size of the specified values cannot be more detailed than the definitions size.");
		}

		final BaseIndexedCollection collection = getCollection(values, false);
		if (collection == null) {
			return null;
		} else {
			final Object lastValue = values[values.length - 1];

			@SuppressWarnings("unchecked")
			final Wrapper<Object> wrappedObject = (Wrapper<Object>) collection
					.getObject(lastValue);
			return wrappedObject == null ? null : wrappedObject.get();
		}
	}

	@Override
	public List<Object> getObjects(final Object... values) {

		if (values == null) {
			throw new NullPointerException("The values cannot be null.");
		} else if (values.length > definitions.length) {
			throw new IllegalArgumentException(
					"The size of the specified values cannot be more detailed than the definitions size.");
		}

		final List<Object> l = new ArrayList<Object>();
		if (values.length == definitions.length) {
			final Object o = getObject(values);
			if (o != null) {
				l.add(o);
			}
		} else {
			final BaseIndexedCollection collection = getCollection(values, false);

			// get all the values from all the collections
			if (collection != null) {
				getAll(collection, l);
			}
		}

		return l;
	}

	/**
	 * Helper method which calls itself recursively to get all the elements of
	 * the {@code BaseIndexedCollection} passed. That means that the tree of
	 * {@code BaseIndexedCollection} is resolved down to the leaves and the list
	 * {@code l} is filled with those.
	 *
	 * @param collection
	 *            the {@code BaseIndexedCollection} to start from
	 * @param l
	 *            the {@code List} to be filled
	 */
	protected void getAll(final BaseIndexedCollection collection,
			final List<Object> l) {
		for (final Object o : collection.getAll()) {
			final Object w = ((Wrapper<?>) o).get();
			if (w instanceof BaseIndexedCollection) {
				getAll((BaseIndexedCollection) w, l);
			} else {
				l.add(w);
			}
		}
	}

	@Override
	public Collection<Object> getAll() {
		final List<Object> l = new ArrayList<Object>();
		getAll(this.root, l);

		return l;
	}

	/**
	 * Creates an instance of the defined {@code BaseIndexedCollection} using the
	 * {@code NestedCollectionDefinition} at position {@code nr}.
	 *
	 * @param id
	 *            the identifier used to identify the {@code BaseIndexedCollection}
	 * @param nr
	 *            the number of the {@code NestedCollectionDefinition} to be
	 *            used
	 *
	 * @return an instance of a {@code Wrapper} which is used to pass the
	 *         {@code id} and the created instance
	 */
	protected Wrapper<BaseIndexedCollection> create(final Object id, final int nr) {
		final IndexedCollectionDefinition def = this.definitions[nr];
		final IndexKeyDefinition keyDef = new IndexKeyDefinition(Wrapper.class,
				"getId");
		final BaseIndexedCollection idx = def.create(keyDef);

		return new Wrapper<BaseIndexedCollection>(id, idx);
	}

	@Override
	public int size() {
		return getAll().size();
	}
}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>Final Assignment</title>

    <link media="only screen" href="css/styles.css" type="text/css" rel="stylesheet">

MACHO MAN'S

MODEL MANIA

      <form>

        <input id="connect" type="button" value="Connect"></input>
        <input id="disconnect" type="button" value="Disconnect"></input>

          <input type="file" onchange="scope.setFile(this)"></input>

          <input
            id="upload"
            type="button"
            value="Upload"
            ng-click="uploadModel()"></input>

              {{threedmodel.name}}

      </form>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string name="actionbar_share">"Κοινή χρήση"</string>
<string name="actionbar_web_search">"Αναζήτηση στον Ιστό"</string>
<string name="actionbar_textselection_title">"Επιλογή κειμένου"</string>
<string name="media_player_error_title">"Αδύνατη αναπαραγωγή βίντεο"</string>
<string name="media_player_error_text_invalid_progressive_playback">"Δυστυχώς, αυτό το βίντεο δεν είναι έγκυρο για ροή σε αυτήν τη συσκευή."</string>
<string name="media_player_error_text_unknown">"Δυστυχώς, δεν είναι δυνατή η αναπαραγωγή αυτού του βίντεο."</string>
<string name="media_player_error_button">"OK"</string>
<string name="media_player_loading_video">"Φόρτωση βίντεο"</string>
<string name="profiler_started_toast">"Η λειτουργία του προγράμματος προφίλ έχει ξεκινήσει"</string>
<string name="profiler_stopped_toast">"Η λειτουργία του προγράμματος προφίλ ολοκληρώθηκε. Τα αποτελέσματα βρίσκονται στο αρχείο %1$s."</string>
<string name="profiler_no_storage_toast">"Δεν είναι δυνατή η έναρξη του προγράμματος προφίλ επειδή ο εξωτερικός χώρος αποθήκευσης δεν είναι έτοιμος"</string>
<string name="profiler_error_toast">"Αποτυχία έναρξης προγράμματος προφίλ"</string>
</resources>


text:
#ifndef GRPC_RB_H_
#define GRPC_RB_H_

#include <sys/time.h>
#include <ruby.h>
#include <grpc/support/time.h>

/* rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */
extern VALUE rb_mGrpcCore;

/* Class used to wrap timeval structs. */
extern VALUE rb_cTimeVal;

/* rb_sNewServerRpc is the struct that holds new server rpc details. */
extern VALUE rb_sNewServerRpc;

/* rb_sStruct is the struct that holds status details. */
extern VALUE rb_sStatus;

/* GC_NOT_MARKED is used in calls to Data_Wrap_Struct to indicate that the
   wrapped struct does not need to participate in ruby gc. */
extern const RUBY_DATA_FUNC GC_NOT_MARKED;

/* GC_DONT_FREED is used in calls to Data_Wrap_Struct to indicate that the
   wrapped struct should not be freed the wrapped ruby object is released by
   the garbage collector. */
extern const RUBY_DATA_FUNC GC_DONT_FREE;

/* A ruby object alloc func that fails by raising an exception. */
VALUE grpc_rb_cannot_alloc(VALUE cls);

/* A ruby object init func that fails by raising an exception. */
VALUE grpc_rb_cannot_init(VALUE self);

/* A ruby object clone init func that fails by raising an exception. */
VALUE grpc_rb_cannot_init_copy(VALUE copy, VALUE self);

/* grpc_rb_time_timeval creates a gpr_timespec from a ruby time object. */
gpr_timespec grpc_rb_time_timeval(VALUE time, int interval);

#endif /* GRPC_RB_H_ */


text:
require File.dirname(__FILE__) + '/../../spec_helper.rb'
unless [/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM}
  require 'spec/runner/heckle_runner'

  module Foo
    class Bar
      def one; end
      def two; end
    end

    class Zap
      def three; end
      def four; end
    end
  end

  describe "HeckleRunner" do
    before(:each) do
      @heckle = mock("heckle", :null_object => true)
      @heckle_class = mock("heckle_class")
    end

    it "should heckle all methods in all classes in a module" do
      @heckle_class.should_receive(:new).with("Foo::Bar", "one", rspec_options).and_return(@heckle)
      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)
      @heckle_class.should_receive(:new).with("Foo::Zap", "three", rspec_options).and_return(@heckle)
      @heckle_class.should_receive(:new).with("Foo::Zap", "four", rspec_options).and_return(@heckle)

      heckle_runner = Spec::Runner::HeckleRunner.new("Foo", @heckle_class)
      heckle_runner.heckle_with
    end

    it "should heckle all methods in a class" do
      @heckle_class.should_receive(:new).with("Foo::Bar", "one", rspec_options).and_return(@heckle)
      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)

      heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar", @heckle_class)
      heckle_runner.heckle_with
    end

    it "should fail heckling when the class is not found" do
      lambda do
        heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bob", @heckle_class)
        heckle_runner.heckle_with
      end.should raise_error(StandardError, "Heckling failed - \"Foo::Bob\" is not a known class or module")
    end

    it "should heckle specific method in a class (with #)" do
      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)

      heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar#two", @heckle_class)
      heckle_runner.heckle_with
    end

    it "should heckle specific method in a class (with .)" do
      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)

      heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar.two", @heckle_class)
      heckle_runner.heckle_with
    end
  end

  describe "Heckler" do
    it "should say yes to tests_pass? if specs pass" do
      options = mock("options", :null_object => true)
      options.should_receive(:run_examples).and_return(true)
      heckler = Spec::Runner::Heckler.new("Foo", nil, options)
      heckler.tests_pass?.should be_true
    end

    it "should say no to tests_pass? if specs fail" do
      options = mock("options", :null_object => true)
      options.should_receive(:run_examples).and_return(false)
      heckler = Spec::Runner::Heckler.new("Foo", nil, options)
      heckler.tests_pass?.should be_false
    end
  end
end


text:
package com.elderbyte.grammar.core.eval;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;

/**
 * A data context while executing an expression
 */
public class EvalContext<T> {

    /***************************************************************************
     *                                                                         *
     * Fields                                                                  *
     *                                                                         *
     **************************************************************************/

    private Map<String, T> variables = new HashMap<>();

    /***************************************************************************
     *                                                                         *
     * Constructors                                                            *
     *                                                                         *
     **************************************************************************/

    /***************************************************************************
     *                                                                         *
     * Public API                                                              *
     *                                                                         *
     **************************************************************************/

    public Optional<T> resolveVariable(String variableName){
        if(variables.containsKey(variableName)){
            return Optional.of(variables.get(variableName));
        }
        return Optional.empty();
    }

    public void setVariable(String variableName, T value){
        variables.put(variableName, value);
    }

    public T invoke(String func, List<T> argumentValues) {
        throw new EvalException("Could not find and invoke function " + func + "(" +
                String.join(",", argumentValues.stream().map(Object::toString).collect(Collectors.toList())) +")" );
    }

    /**************************************************************************
     *                                                                         *
     * Private Methods                                                         *
     *                                                                         *
     **************************************************************************/

}


text:
$PYTHON "$RECIPE_DIR/fetch_inchi.py"
$PYTHON "$RECIPE_DIR/fetch_avalontools.py"
PY_INC=`$PYTHON -c "from distutils import sysconfig; print (sysconfig.get_python_inc(0, '$PREFIX'))"`

if [[ "$OSTYPE" == "linux-gnu" ]]; then
    extra_flags="-DCMAKE_EXE_LINKER_FLAGS_RELEASE='-lrt'"
else
    extra_flags="-DBoost_USE_STATIC_LIBS=ON"
fi

export BOOST_LIBRARYDIR=$PREFIX/lib/

cmake \
    -DRDK_INSTALL_INTREE=OFF \
    -DRDK_INSTALL_STATIC_LIBS=OFF \
    -DRDK_BUILD_INCHI_SUPPORT=ON \
    -DRDK_BUILD_AVALON_SUPPORT=ON \
    -DRDK_USE_FLEXBISON=OFF \
    -DRDK_BUILD_THREADSAFE_SSS=ON \
    -DRDK_TEST_MULTITHREADED=ON \
    -DAVALONTOOLS_DIR=$SRC_DIR/External/AvalonTools/src/SourceDistribution \
    -DCMAKE_SYSTEM_PREFIX_PATH=$PREFIX \
    -DCMAKE_INSTALL_PREFIX=$PREFIX \
    -DPython_ADDITIONAL_VERSIONS=${PY_VER} \
    -DPYTHON_EXECUTABLE=$PYTHON \
    -DPYTHON_INCLUDE_DIR=${PY_INC} \
    -DPYTHON_NUMPY_INCLUDE_PATH=$SP_DIR/numpy/core/include \
    -DBOOST_ROOT=$PREFIX -D Boost_NO_SYSTEM_PATHS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    $extra_flags \
    .

make -j4 install


text:
//  @warning
// --------------------------------------------------------------------------
//  This file is partially generated.
//  Generated blocks are enclosed between tags [@<tag>, @end].
//  User's code can be added between tags [@end, @<tag>].
// --------------------------------------------------------------------------

//  @description
// --------------------------------------------------------------------------
//  Simple PEM wrapper.
// --------------------------------------------------------------------------

#ifndef VSCF_PEM_H_INCLUDED
#define VSCF_PEM_H_INCLUDED

#include "vscf_library.h"
#include "vscf_status.h"

#if !VSCF_IMPORT_PROJECT_COMMON_FROM_FRAMEWORK
#   include <virgil/crypto/common/vsc_data.h>
#   include <virgil/crypto/common/vsc_buffer.h>
#endif

#if VSCF_IMPORT_PROJECT_COMMON_FROM_FRAMEWORK
#   include <VSCCommon/vsc_data.h>
#   include <VSCCommon/vsc_buffer.h>
#endif

// clang-format on
//  @end

#ifdef __cplusplus
extern "C" {
#endif

//  @generated
// --------------------------------------------------------------------------
// clang-format off
//  Generated section start.
// --------------------------------------------------------------------------

//
//  Return length in bytes required to hold wrapped PEM format.
//
VSCF_PUBLIC size_t
vscf_pem_wrapped_len(const char *title, size_t data_len);

//
//  Takes binary data and wraps it to the simple PEM format - no
//  additional information just header-base64-footer.
//  Note, written buffer is NOT null-terminated.
//
VSCF_PUBLIC void
vscf_pem_wrap(const char *title, vsc_data_t data, vsc_buffer_t *pem);

//
//  Return length in bytes required to hold unwrapped binary.
//
VSCF_PUBLIC size_t
vscf_pem_unwrapped_len(size_t pem_len);

//
//  Takes PEM data and extract binary data from it.
//
VSCF_PUBLIC vscf_status_t
vscf_pem_unwrap(vsc_data_t pem, vsc_buffer_t *data) VSCF_NODISCARD;

//
//  Returns PEM title if PEM data is valid, otherwise - empty data.
//
VSCF_PUBLIC vsc_data_t
vscf_pem_title(vsc_data_t pem);

// --------------------------------------------------------------------------
//  Generated section end.
// clang-format on
// --------------------------------------------------------------------------
//  @end

#ifdef __cplusplus
}
#endif

//  @footer
#endif // VSCF_PEM_H_INCLUDED
//  @end


text:
from cryptotools.cipher.block import blockify

def ECB_decrypt(ciphertext,
                key,
                block_length,
                inverse_pseudo_random_permutation):
    message = b''.join([inverse_pseudo_random_permutation(key, block)
                        for block in blockify(ciphertext, block_length)])
    padding = message[-1]
    return message[:-padding]


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="circle_width">12dp</dimen>
    <dimen name="circle_radius">80dp</dimen>
    <dimen name="radius_gap">1dp</dimen>
    <dimen name="stroke_gap">0.15dp</dimen>
</resources>


text:
@protocol ToolSettingsViewControllerDelegate <NSObject>

- (void)feedRateDidChange:(NSNumber *)feedRate;
- (void)baudRateDidChange:(NSNumber *)baudRate;

@end

@interface ToolSettingsViewController : NSViewController

@property (atomic, strong) ToolSettingsView *view;
@property (nonatomic, weak) id <ToolSettingsViewControllerDelegate> delegate;

@end


text:
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.feed.library.api.client.scope;

import android.content.Context;

import org.chromium.chrome.browser.feed.library.api.client.knowncontent.KnownContent;
import org.chromium.chrome.browser.feed.library.api.client.lifecycle.AppLifecycleListener;
import org.chromium.chrome.browser.feed.library.api.client.requestmanager.RequestManager;
import org.chromium.chrome.browser.feed.library.api.host.action.ActionApi;
import org.chromium.chrome.browser.feed.library.api.host.imageloader.ImageLoaderApi;
import org.chromium.chrome.browser.feed.library.api.host.offlineindicator.OfflineIndicatorApi;
import org.chromium.chrome.browser.feed.library.api.host.stream.CardConfiguration;
import org.chromium.chrome.browser.feed.library.api.host.stream.SnackbarApi;
import org.chromium.chrome.browser.feed.library.api.host.stream.StreamConfiguration;
import org.chromium.chrome.browser.feed.library.api.host.stream.TooltipApi;
import org.chromium.chrome.browser.feed.library.common.concurrent.TaskQueue;
import org.chromium.chrome.browser.feed.library.common.logging.Dumpable;

/** Allows interaction with the Feed library at the process leve. */
public interface ProcessScope extends Dumpable {
    /** Returns the Feed library request manager. */
    RequestManager getRequestManager();

    /** Returns the Feed library task queue. */
    TaskQueue getTaskQueue();

    /** Returns the Feed library lifecycle listener. */
    AppLifecycleListener getAppLifecycleListener();

    /** Returns the Feed library known content. */
    KnownContent getKnownContent();

    /** Returns a {@link StreamScopeBuilder.Builder}. */
    StreamScopeBuilder createStreamScopeBuilder(Context context, ImageLoaderApi imageLoaderApi,
            ActionApi actionApi, StreamConfiguration streamConfiguration,
            CardConfiguration cardConfiguration, SnackbarApi snackbarApi,
            OfflineIndicatorApi offlineIndicatorApi, TooltipApi tooltipApi);

    /** Called to destroy the scope object. */
    void onDestroy();
}


text:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import MdTranslate from 'react-icons/lib/md/translate';
import MdClose from 'react-icons/lib/md/close';
import styles from '../../chat.scss';
import SpeechSynthesis from './Speech/SpeechSynthesis';
import convertMedia from '../../utils/convertMedia';

export default class MessageOptions extends Component {
  constructor(props) {
    super(props);
    this.nativeLng = this.props.nativeLng;
  }
  componentWillReceiveProps(nextProps) {
    if (nextProps.trLangs.length === 0) {
      this.lastTranslate = undefined;
    }
  }
  selectLang = (val, msg) => {
    this.nativeLng = val;
    this.props.insertTranslation(this.nativeLng, msg);
  };
  isVideo = (msg) => {
    const media = convertMedia(msg, 150, true);
    return (media.indexOf(' -1 || media.indexOf(' -1);
  };
  translate = () => {
    const message = this.props.message;
    if (this.lastTranslate === message._id || !this.nativeLng) {
      const modalContent = {
        type: 'translate',
        title: 'Translate it to',
        list: this.props.translateLanguages,
        selectedItem: this.props.trLangs[this.props.trLangs.length - 1].lang,
        func: this.selectLang,
        msg: message.text
      };
      this.props.handleModal(modalContent, true);
    } else {
      this.lastTranslate = message._id;
      this.props.insertTranslation(this.nativeLng, message.text);
    }
  };
  render() {
    const { message, removeMsg, onTranslate, translateLanguages,
      voices, handleModal, ban, manageMessage } = this.props;
    return (

        {
          (onTranslate && translateLanguages &&
          !this.isVideo(message.msg)) ?

                <MdTranslate />

 : null
        }
        { !this.isVideo(message.text) && window.SpeechSynthesisUtterance &&
          voices && voices.length > 0 &&
            <SpeechSynthesis
              {...{ voices, message, handleModal }}
            />
        }
        { ban && manageMessage &&

              <MdClose />

        }

    );
  }
}
MessageOptions.propTypes = {
  message: PropTypes.object,
  insertTranslation: PropTypes.func,
  removeMsg: PropTypes.func,
  onTranslate: PropTypes.func,
  translateLanguages: PropTypes.array,
  voices: PropTypes.array,
  nativeLng: PropTypes.string,
  trLangs: PropTypes.array,
  handleModal: PropTypes.func,
  ban: PropTypes.func,
  manageMessage: PropTypes.func
};


text:
  Vincelles est
       un village
       géographiquement positionné dans le département de Yonne en Bourgogne. Elle comptait 941 habitants en 2008.

À proximité de Vincelles sont positionnées géographiquement les villes de
Saint-Bris-le-Vineux localisée à 4 km, 1 095 habitants,
Val-de-Mercy à 4 km, 366 habitants,
Coulanges-la-Vineuse située à 3 km, 930 habitants,
Jussy située à 4 km, 444 habitants,
Escolives-Sainte-Camille située à 2 km, 714 habitants,
Cravant située à 4 km, 812 habitants,
 entre autres. De plus, Vincelles est située à seulement onze km de Auxerre.

Le nombre de logements, à Vincelles, se décomposait en 2011 en 54 appartements et 466 maisons soit
 un marché plutôt équilibré.

La ville propose quelques  aménagements, elle dispose, entre autres, de un terrain de tennis et un terrain de sport.

À Vincelles, la valorisation moyenne à la vente d'un appartement s'évalue à 2 168 € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 990 € du m². À la location la valeur moyenne se situe à 7,97 € du m² par mois.

Si vous envisagez de emmenager à Vincelles, vous pourrez aisément trouver une maison à acheter.


text:
package net.jini.id;

import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.security.SecureRandom;
import org.apache.river.api.io.AtomicSerial;
import org.apache.river.api.io.AtomicSerial.GetArg;
import org.apache.river.api.io.AtomicSerial.Stateless;
import org.apache.river.api.net.Uri;

/**
 * Provides static methods for creating {@link Uuid} instances.
 *
 *
Included are methods to create a Uuid with a given
 * 128-bit value or a string representation of such a value, to
 * generate new Uuid values, and to read a binary
 * representation of a Uuid from a stream.
 *
 * @author Sun Microsystems, Inc.
 * @since 2.0
 **/
public final class UuidFactory {

    /** guards secureRandom */
    private static final Object lock = new Object();

    /** source of cryptographically strong random bits, lazily created */
    private static SecureRandom secureRandom;

    /**
     * Creates a new Uuid with the specified 128-bit
     * value.
     *
     *
This method can be used to create a Uuid with a
     * value that has been previously generated, perhaps by an
     * external mechanism.
     *
     * @param bits0 the most significant 64 bits of the 128-bit value
     *
     * @param bits1 the least significant 64 bits of the 128-bit value
     *
     * @return a Uuid with the given value
     **/
    public static Uuid create(long bits0, long bits1) {
	return new Impl(bits0, bits1);
    }

    /**
     * Generate a Uuid from a RFC 4122 Compliant URN.
     *
     * @param urn RFC 4122 Complaint URN.
     * @return Uuid
     * @throws IllegalArgumentException if the supplied URN scheme isn't uri.
     */
    public static Uuid create(Uri urn){
        String scheme = urn.getScheme();
        if (!"urn".equalsIgnoreCase(scheme)) throw new IllegalArgumentException("Scheme must be URN");
        if (!urn.isAbsolute()) throw new IllegalArgumentException("URN not absolute");
        if (!urn.isOpaque()) throw new IllegalArgumentException("URN not opaque");
        String schemeSpecificPart = urn.getRawSchemeSpecificPart();
        int index = schemeSpecificPart.indexOf(":");
        String uuid = schemeSpecificPart.substring(0, index);
        if (!uuid.equalsIgnoreCase("uuid")) throw new IllegalArgumentException("Scheme other than Uuid");
        return create(schemeSpecificPart.substring(index + 1));
    }

    /**
     * Creates a new Uuid with the 128-bit value
     * represented by the specified string.
     *
     *
The supplied string representation must be in the format
     * defined by {@link Uuid#toString Uuid.toString} except that
     * uppercase hexadecimal digits are allowed.
     *
     * @param s the string representation to create the
     * Uuid with
     *
     * @return a Uuid with the value represented by the
     * given string
     *
     * @throws IllegalArgumentException if the supplied string
     * representation does not conform to the specified format
     *
     * @throws NullPointerException if s is
     * null
     **/
    public static Uuid create(String s) {
	if (s.length() != 36 ||
	    s.charAt(8) != '-' ||
	    s.charAt(13) != '-' ||
	    s.charAt(18) != '-' ||
	    s.charAt(23) != '-')
	{
	    throw new IllegalArgumentException(
		"invalid string representation: \"" + s + "\"");
	}
	long time_low;
	long time_mid;
	long time_hi_and_version;
	long clock_seq_and_variant;
	long node;
	try {
	    time_low = Long.parseLong(s.substring(0, 8), 16);
	    time_mid = Long.parseLong(s.substring(9, 13), 16);
	    time_hi_and_version = Long.parseLong(s.substring(14, 18), 16);
	    clock_seq_and_variant = Long.parseLong(s.substring(19, 23), 16);
	    node = Long.parseLong(s.substring(24, 36), 16);
	} catch (NumberFormatException e) {
	    IllegalArgumentException iae = new IllegalArgumentException(
		"invalid string representation: \"" + s + "\"");
	    iae.initCause(e);
	    throw iae;
	}
	if (time_low < 0 ||
	    time_mid < 0 ||
	    time_hi_and_version < 0 ||
	    clock_seq_and_variant < 0 ||
	    node < 0)
	{
	    throw new IllegalArgumentException(
		"invalid string representation: \"" + s + "\"");
	}
	long bits0 = time_low << 32 | time_mid << 16 | time_hi_and_version;
	long bits1 = clock_seq_and_variant << 48 | node;
	return create(bits0, bits1);
    }

    /**
     * Generates a new Uuid with 122 bits of its value
     * produced from a cryptographically strong random sequence.
     *
     *
The value of a Uuid returned by this method is
     * computationally difficult to guess and is highly likely to be
     * unique with respect to all other Uuid values
     * returned by this method over space and time.
     *
     *
Specifically, this method creates a new Uuid
     * with the a variant field of 0x2, a
     * version field of 0x4, and the
     * remaining 122 bits of its value produced from a
     * cryptographically strong random sequence.
     *
     * @return a newly generated Uuid
     *
     * @see SecureRandom
     **/
    public static Uuid generate() {
	synchronized (lock) {
	    if (secureRandom == null) {
		secureRandom = new SecureRandom();
	    }
	}
	long bits0 = secureRandom.nextLong();
	long bits1 = secureRandom.nextLong();

	// set "version" field to 0x4
	bits0 &= 0xFFFFFFFFFFFF0FFFL;
	bits0 |= 0x0000000000004000L;

	// set "variant" field to 0x2
	bits1 &= 0x3FFFFFFFFFFFFFFFL;
	bits1 |= 0x8000000000000000L;

	return create(bits0, bits1);
    }

    /**
     * Creates a new Uuid with the 128-bit value obtained
     * by unmarshalling a binary representation from the supplied
     * InputStream.
     *
     *
Specifically, this method reads 16 bytes from the stream,
     * and then it creates a new Uuid with the 128-bit
     * value represented by those bytes interpreted in network
     * (big-endian) byte order.
     *
     * @param in the InputStream to read the
     * Uuid from
     *
     * @return a Uuid with the value unmarshalled from
     * the stream
     *
     * @throws IOException if an I/O exception occurs while performing
     * this operation
     *
     * @throws NullPointerException if in is
     * null
     **/
    public static Uuid read(InputStream in) throws IOException {
	long bits0 = readLong(in);
	long bits1 = readLong(in);
	return create(bits0, bits1);
    }

    /**
     * Read a long value from an InputStream in big-endian byte order.
     **/
    private static long readLong(InputStream in) throws IOException {
	int b0 = in.read();
	int b1 = in.read();
	int b2 = in.read();
	int b3 = in.read();
	if ((b0 | b1 | b2 | b3) == -1) {
	    throw new EOFException();
	}
	int upper = (b0 << 24) | (b1 << 16) | (b2 << 8) | b3;
	b0 = in.read();
	b1 = in.read();
	b2 = in.read();
	b3 = in.read();
	if ((b0 | b1 | b2 | b3) == -1) {
	    throw new EOFException();
	}
	int lower = (b0 << 24) | (b1 << 16) | (b2 << 8) | b3;
	return ((long) upper << 32) | (lower & 0xFFFFFFFFL);
    }

    /** Prevents instantiation. */
    private UuidFactory() { throw new AssertionError(); }

    /**
     * Extends Uuid trivially, in order to be a preferred
     * class and retain the original codebase annotation.
     **/
    @Stateless
    @AtomicSerial
    private static class Impl extends Uuid {

	private static final long serialVersionUID = 1089722863511468966L;

	Impl(long bits0, long bits1) {
	    super(bits0, bits1);
	}

	Impl(GetArg arg) throws IOException{
	    super(arg);
    }
}
}


text:
#include <modules/opencl/image/layerclbase.h>

namespace inviwo {

} // namespace

namespace cl {

template <>
cl_int Kernel::setArg(cl_uint index, const inviwo::LayerCLBase& value) {
    return setArg(index, value.get());
}

} // namespace cl