text:
namespace webkit_database {

namespace {

void RemoveConnectionTask(
    const string16& origin_id, const string16& database_name,
    scoped_refptr<DatabaseConnectionsWrapper> obj,
    bool* did_task_execute) {
  *did_task_execute = true;
  obj->RemoveOpenConnection(origin_id, database_name);
}

void ScheduleRemoveConnectionTask(
    base::Thread* thread,  const string16& origin_id,
    const string16& database_name,
    scoped_refptr<DatabaseConnectionsWrapper> obj,
    bool* did_task_execute) {
  thread->message_loop()->PostTask(FROM_HERE,
      NewRunnableFunction(RemoveConnectionTask,
                          origin_id, database_name, obj, did_task_execute));
}

}  // anonymous namespace

TEST(DatabaseConnectionsTest, DatabaseConnectionsWrapperTest) {
  string16 kOriginId(ASCIIToUTF16("origin_id"));
  string16 kName(ASCIIToUTF16("database_name"));

  scoped_refptr<DatabaseConnectionsWrapper> obj(
      new DatabaseConnectionsWrapper);
  EXPECT_FALSE(obj->HasOpenConnections());
  obj->AddOpenConnection(kOriginId, kName);
  EXPECT_TRUE(obj->HasOpenConnections());
  obj->AddOpenConnection(kOriginId, kName);
  EXPECT_TRUE(obj->HasOpenConnections());
  obj->RemoveOpenConnection(kOriginId, kName);
  EXPECT_TRUE(obj->HasOpenConnections());
  obj->RemoveOpenConnection(kOriginId, kName);
  EXPECT_FALSE(obj->HasOpenConnections());
  obj->WaitForAllDatabasesToClose();  // should return immediately

  // Test WaitForAllDatabasesToClose with the last connection
  // being removed on the current thread.
  obj->AddOpenConnection(kOriginId, kName);
  bool did_task_execute = false;
  MessageLoop::current()->PostTask(FROM_HERE,
      NewRunnableFunction(&RemoveConnectionTask,
                          kOriginId, kName, obj, &did_task_execute));
  obj->WaitForAllDatabasesToClose();  // should return after the task executes
  EXPECT_TRUE(did_task_execute);
  EXPECT_FALSE(obj->HasOpenConnections());

  // Test WaitForAllDatabasesToClose with the last connection
  // being removed on another thread.
  obj->AddOpenConnection(kOriginId, kName);
  base::Thread thread("WrapperTestThread");
  thread.Start();
  did_task_execute = false;
  MessageLoop::current()->PostTask(FROM_HERE,
      NewRunnableFunction(ScheduleRemoveConnectionTask,
                          &thread, kOriginId, kName,
                          obj, &did_task_execute));
  obj->WaitForAllDatabasesToClose();  // should return after the task executes
  EXPECT_TRUE(did_task_execute);
  EXPECT_FALSE(obj->HasOpenConnections());
}

}  // namespace webkit_database


text:
    <title>AVANTSSAR ASLan++ and ASLan Language Tools</title>

Welcome

This page is the home of some language tools for
      the AVANTSSAR project. The tools that you can
      find here are the ASLan++ connector and
      the converter between ASLan and XML. If
      you are already familiar with them, you may wish to jump to
      the downloads and links section.

Downloads and Links

	  ASLan++ Connector $connector-version$ Web
	  Service
	  visit
	  homepage
	  or download
	  client ($connector-client-size$)

	  ASLan++ Connector $connector-version$
	  Offline Version
	  download
	  ($connector-size$)

	  ASLan to XML Converter $converter-version$
	  Web Service
	  visit homepage
	  or download client
	  ($converter-client-size$)

	  ASLan to XML Converter $converter-version$
	  Offline Version
	  download
	  ($converter-size$)

	  ASLan Java Library
	  download
	    library ($aslan-library-size$)
	    or download Javadoc
	    ($aslan-library-javadoc-size$)

	  XML Schema for ASLan specifications
	  download
	  ($aslan-schema-size$)

ASLan++ Connector

      The latest version of the ASLan++ Connector is $connector-version$.

You can use the connector online, through a web
	service. Visit this page for
	more information on how to use the web service. We also
	provide a command
	line client for the web service. The download size is
	$connector-client-size$ and you need the Java runtime in order
	to run it.

You can also use the connector offline, by
	downloading this jar
	file. You will need the Java runtime in order to use
	it. Just type

java -jar aslanpp-connector.jar -h
 to get some help
	on available options.

Converter between ASLan and XML

      The latest version of the converter is $converter-version$.

As its name already says, it converts ASLan specifications
	into XML (and the other way around). The XML schema for ASLan
	specifications is available here
	(download size $aslan-schema-size$).

The converter is accessible in several ways: online, by using
      a web service (we provide a simple command line client for
      this), offline, by downloading a self contained command line
      application, or programatically, by using our Java library.

Web Service

You can use the converter online, through a web
	service. Visit this page for more
	information on how to use the web service, or download
	a command line client for
	the web service. The download size is $converter-client-size$
	and you will need the Java runtime for running the
	client. Just type:

$aslan-xml-ws-sh-help$

to get some help on how to use the client.
 Also look at
        the next section that shows some examples for the offline
        version of the converter. The same style of usage applies to
        the web service client too, just
        replace aslan-xml.jar
        with aslan-xml-wsclient.jar.

Offline Version

You can use the converter offline, by
      downloading this jar file. The
      download size is $converter-size$ and you will need the Java
      runtime in order to use it. Just type:

$aslan-xml-sh-help$

to get some help on available options.

In order to convert an ASLan specification stored in a file simple.aslan to XML and write it to a file called simple.xml, you have to type:

$aslan-xml-sh-usage-1$

In order to convert the XML representation from simple.xml back to plain text and store it into a file called simple2.aslan, you have to type:

$aslan-xml-sh-usage-2$

The coverter can read input also from stdin and can write output also to stdout. This means that it can be piped. For example in order to check the correctness of the ASLan specification from the file simple.aslan and to have it pretty-printed to the file simple2.aslan, you can type:

$aslan-xml-sh-piped$

Programmatic usage

In order to use our Java library, you have to
      download this JAR file (download
      size $aslan-library-size$). We provide
      also this JAR file
      (download size $aslan-library-javadoc-size$) which contains
      Javadoc documentation for the library, but be warned that there
      is not much documentation, so the only practical use is that you
      can see the available classes and methods.

To get a feel of what can be done with the library, we present some simple examples.

First of all the library lets you programatically build ASLan
      specifications, and then serialize them to plain text or to
      XML. For example the following code builds a very simple
      specification and writes it to a plain text file.

$aslan-xml-example-1$

If you run the code, a file called simple.aslan
      will be produced with the following content:

$aslan-xml-simple-aslan$

You can also load back specifications, either from plain
      text, either from XML. For example the following code loads the
      plain text representation from the
      file simple.aslan and writes it as an XML
      representation into the file simple.xml.

$aslan-xml-example-2$

The content of the simple.xml file is:

$aslan-xml-simple-xml$

The following code does the reversed operation: reads the XML
      representation from simple.xml and writes it as
      plain text representation into the
      file simple2.aslan. If everything goes on as it
      should, then the file simple2.aslan should be
      identical with simple.aslan.

$aslan-xml-example-3$

redpajama_set_name: RedPajamaGithub


text:
using ::testing::_;
using InstallationResult = borealis::BorealisInstallResult;

namespace borealis {
namespace {

class BorealisInstallerMock : public borealis::BorealisInstaller {
 public:
  MOCK_METHOD0(IsProcessing, bool());
  MOCK_METHOD0(Start, void());
  MOCK_METHOD0(Cancel, void());
  MOCK_METHOD(void,
              Uninstall,
              (base::OnceCallback<void(BorealisUninstallResult)>),
              ());
  MOCK_METHOD1(AddObserver, void(Observer*));
  MOCK_METHOD1(RemoveObserver, void(Observer*));
};

class BorealisInstallerViewBrowserTest : public DialogBrowserTest {
 public:
  BorealisInstallerViewBrowserTest() {
    feature_list_.InitWithFeatures(
        {features::kBorealis, chromeos::features::kBorealisPermitted}, {});
  }

  // Disallow copy and assign.
  BorealisInstallerViewBrowserTest(const BorealisInstallerViewBrowserTest&) =
      delete;
  BorealisInstallerViewBrowserTest& operator=(
      const BorealisInstallerViewBrowserTest&) = delete;

  // DialogBrowserTest:
  void SetUpOnMainThread() override {
    app_launcher_ =
        std::make_unique<BorealisAppLauncherImpl>(browser()->profile());
    features_ = std::make_unique<BorealisFeatures>(browser()->profile());

    BorealisServiceFake* fake_service =
        BorealisServiceFake::UseFakeForTesting(browser()->profile());
    fake_service->SetContextManagerForTesting(&mock_context_manager_);
    fake_service->SetInstallerForTesting(&mock_installer_);
    fake_service->SetAppLauncherForTesting(app_launcher_.get());
    fake_service->SetFeaturesForTesting(features_.get());
  }

  void ShowUi(const std::string& name) override {
    borealis::ShowBorealisInstallerView(browser()->profile());
    view_ = BorealisInstallerView::GetActiveViewForTesting();
    EXPECT_FALSE(view_->GetWidget()->IsClosed());
    ExpectConfirmationDisplayed();
  }

 protected:
  bool HasAcceptButton() { return view_->GetOkButton() != nullptr; }

  bool HasCancelButton() { return view_->GetCancelButton() != nullptr; }

  void ExpectConfirmationDisplayed() {
    EXPECT_TRUE(HasAcceptButton());
    EXPECT_TRUE(HasCancelButton());
    EXPECT_EQ(
        view_->GetPrimaryMessage(),
        l10n_util::GetStringUTF16(IDS_BOREALIS_INSTALLER_CONFIRMATION_TITLE));
    EXPECT_EQ(view_->GetProgressMessage(), u"");
  }

  void ExpectInstallationInProgress() {
    EXPECT_FALSE(HasAcceptButton());
    EXPECT_TRUE(HasCancelButton());
    EXPECT_EQ(view_->GetPrimaryMessage(),
              l10n_util::GetStringUTF16(IDS_BOREALIS_INSTALLER_ONGOING_TITLE));
    EXPECT_EQ(
        view_->GetSecondaryMessage(),
        l10n_util::GetStringUTF16(IDS_BOREALIS_INSTALLER_ONGOING_MESSAGE));
    EXPECT_NE(view_->GetProgressMessage(), u"");
  }

  void ExpectInstallationFailed() {
    EXPECT_FALSE(HasAcceptButton());
    EXPECT_TRUE(HasCancelButton());
  }

  void ExpectInstallationCompletedSucessfully() {
    EXPECT_TRUE(HasAcceptButton());
    EXPECT_EQ(view_->GetDialogButtonLabel(ui::DIALOG_BUTTON_OK),
              l10n_util::GetStringUTF16(IDS_BOREALIS_INSTALLER_LAUNCH_BUTTON));
    EXPECT_TRUE(HasCancelButton());
    EXPECT_EQ(view_->GetDialogButtonLabel(ui::DIALOG_BUTTON_CANCEL),
              l10n_util::GetStringUTF16(IDS_APP_CLOSE));
    EXPECT_EQ(view_->GetPrimaryMessage(),
              l10n_util::GetStringUTF16(IDS_BOREALIS_INSTALLER_FINISHED_TITLE));
    EXPECT_EQ(view_->GetProgressMessage(), u"");
  }

  void AcceptInstallation() {
    EXPECT_CALL(mock_installer_, AddObserver(_));
    EXPECT_CALL(mock_installer_, Start());
    view_->AcceptDialog();
    view_->SetInstallingStateForTesting(
        borealis::BorealisInstaller::InstallingState::kInstallingDlc);
    ExpectInstallationInProgress();
  }

  void ClickCancel() {
    view_->CancelDialog();
    EXPECT_TRUE(view_->GetWidget()->IsClosed());
  }

  base::test::ScopedFeatureList feature_list_;
  ::testing::NiceMock<BorealisInstallerMock> mock_installer_;
  ::testing::NiceMock<BorealisContextManagerMock> mock_context_manager_;
  std::unique_ptr<BorealisAppLauncher> app_launcher_;
  std::unique_ptr<BorealisFeatures> features_;
  BorealisInstallerView* view_;
};

// Test that the dialog can be launched.
IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, InvokeUi_default) {
  EXPECT_CALL(mock_installer_, Cancel());
  ShowAndVerifyUi();
}

IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, SucessfulInstall) {
  ShowUi("default");
  AcceptInstallation();

  browser()->profile()->GetPrefs()->SetBoolean(
      prefs::kBorealisInstalledOnDevice, true);
  view_->OnInstallationEnded(InstallationResult::kSuccess, "");
  ExpectInstallationCompletedSucessfully();

  EXPECT_CALL(mock_context_manager_, IsRunning())
      .WillOnce(testing::Return(true));
  EXPECT_CALL(mock_context_manager_, StartBorealis(_));
  EXPECT_CALL(mock_installer_, RemoveObserver(_));
  view_->AcceptDialog();

  EXPECT_TRUE(view_->GetWidget()->IsClosed());
}

IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest,
                       ConfirmationCancelled) {
  ShowUi("default");

  EXPECT_CALL(mock_installer_, Cancel());
  ClickCancel();
}

IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest,
                       InstallationCancelled) {
  ShowUi("default");
  AcceptInstallation();

  EXPECT_CALL(mock_installer_, Cancel());
  ClickCancel();
}

IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest,
                       InstallationSucessAfterRetry) {
  InstallationResult error_type =
      InstallationResult::kBorealisInstallInProgress;
  ShowUi("default");
  AcceptInstallation();

  view_->OnInstallationEnded(error_type, "in progress");
  ExpectInstallationFailed();

  AcceptInstallation();

  browser()->profile()->GetPrefs()->SetBoolean(
      prefs::kBorealisInstalledOnDevice, true);
  view_->OnInstallationEnded(InstallationResult::kSuccess, "");
  ExpectInstallationCompletedSucessfully();

  EXPECT_CALL(mock_context_manager_, IsRunning())
      .WillOnce(testing::Return(true));
  EXPECT_CALL(mock_context_manager_, StartBorealis(_));
  EXPECT_CALL(mock_installer_, RemoveObserver(_));
  view_->AcceptDialog();

  EXPECT_TRUE(view_->GetWidget()->IsClosed());
}

IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest,
                       ErrorDuringInstallation) {
  InstallationResult error_type =
      InstallationResult::kBorealisInstallInProgress;
  ShowUi("default");
  AcceptInstallation();

  view_->OnInstallationEnded(error_type, "in progress");
  ExpectInstallationFailed();

  ClickCancel();
}
}  // namespace
}  // namespace borealis


text:
[class^="icon-"],
[class*=" icon-"] {
  font-family: FontAwesome;
  font-style: normal;
  font-weight: normal;
}
.btn.dropdown-toggle [class^="icon-"],
.btn.dropdown-toggle [class*=" icon-"] {
  /* keeps button heights with and without icons the same */

  line-height: 1.4em;
}
.icon-large {
  font-size: 1.3333em;
}
.icon-glass {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-music {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-search {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-envelope {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-heart {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-star {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-star-empty {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-user {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-film {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-th-large {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-th {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-th-list {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-ok {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-remove {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-zoom-in {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-zoom-out {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-off {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-signal {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-cog {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-trash {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-home {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-file {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-time {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-road {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-download-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-download {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-upload {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-inbox {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-play-circle {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-repeat {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-refresh {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-list-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-lock {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-flag {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-headphones {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-volume-off {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-volume-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-volume-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-qrcode {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-barcode {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-tag {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-tags {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-book {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bookmark {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-print {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-camera {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-font {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bold {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-italic {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-text-height {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-text-width {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-align-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-align-center {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-align-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-align-justify {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-list {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-indent-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-indent-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-facetime-video {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-picture {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-pencil {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-map-marker {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-adjust {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-tint {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-edit {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-share {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-check {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-move {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-step-backward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-fast-backward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-backward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-play {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-pause {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-stop {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-forward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-fast-forward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-step-forward {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-eject {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-chevron-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-chevron-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-plus-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-minus-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-remove-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-ok-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-question-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-info-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-screenshot {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-remove-circle {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-ok-circle {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-ban-circle {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-arrow-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-arrow-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-arrow-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-arrow-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-share-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-resize-full {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-resize-small {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-plus {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-minus {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-asterisk {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-exclamation-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-gift {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-leaf {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-fire {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-eye-open {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-eye-close {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-warning-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-plane {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-calendar {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-random {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-comment {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-magnet {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-chevron-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-chevron-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-retweet {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-shopping-cart {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-folder-close {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-folder-open {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-resize-vertical {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-resize-horizontal {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bar-chart {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-twitter-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-facebook-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-camera-retro {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-key {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-cogs {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-comments {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-thumbs-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-thumbs-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-star-half {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-heart-empty {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-signout {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-linkedin-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-pushpin {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-external-link {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-signin {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-trophy {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-github-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-upload-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-lemon {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-phone {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-check-empty {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bookmark-empty {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-phone-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-twitter {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-facebook {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-github {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-unlock {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-credit-card {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-rss {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-hdd {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bullhorn {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bell {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-certificate {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-hand-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-hand-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-hand-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-hand-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-circle-arrow-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-circle-arrow-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-circle-arrow-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-circle-arrow-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-globe {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-wrench {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-tasks {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-filter {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-briefcase {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-fullscreen {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-group {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-link {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-cloud {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-beaker {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-cut {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-copy {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-paper-clip {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-save {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-sign-blank {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-reorder {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-list-ul {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-list-ol {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-strikethrough {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-underline {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-table {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-magic {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-truck {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-pinterest {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-pinterest-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-google-plus-sign {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-google-plus {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-money {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-caret-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-caret-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-caret-left {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-caret-right {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-columns {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-sort {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-sort-down {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-sort-up {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-envelope-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-linkedin {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-undo {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-legal {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-dashboard {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-comment-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-comments-alt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-bolt {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-sitemap {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-umbrella {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-paste {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}
.icon-user-md {
  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' ');
}


text:
package eu.freme.broker.tools.ratelimiter;
import java.io.IOException;
import java.util.Collection;
import java.util.Date;
import java.util.Enumeration;
import java.util.concurrent.ConcurrentHashMap;

import javax.annotation.PostConstruct;
import javax.annotation.Priority;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import eu.freme.broker.exception.TooManyRequestsException;
import eu.freme.broker.tools.ExceptionHandlerService;
import eu.freme.common.persistence.model.User;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.GenericFilterBean;

/**
 * Filter that limits number of requets made by each user
 *
 * @author Jonathan Sauder - jonathan.sauder@student.hpi.de
 */

@Component
public class RateLimitingFilter extends GenericFilterBean {

	@Autowired
	ExceptionHandlerService exceptionHandlerService;

	@Autowired
	RateLimiterInMemory rateLimiterInMemory;

	@Value("${ratelimiter.enabled:false}")
	boolean rateLimiterEnabled;

	@Value("${ratelimiter.yaml:ratelimiter.yaml}")
	String rateLimiterYaml;

	@PostConstruct
	public void setup () {
		try {
			rateLimiterInMemory.refresh(rateLimiterYaml);
		} catch (IOException e) {
			logger.error("Caugh IOException: "+rateLimiterYaml+" for YAML Configuration of Ratelimiter was not found." +
					"The Ratelimiting Filter was turned off.");
			setRateLimiterEnabled(false);
		}
	}

	Logger logger = Logger.getLogger(RateLimitingFilter.class);

	public RateLimitingFilter(){
	}

	private String username;
	private String userRole;

	@Override
	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {

		if (rateLimiterEnabled) {

			HttpServletRequest request = (HttpServletRequest) req;
			Authentication auth = SecurityContextHolder.getContext().getAuthentication();

			username=auth.getName();
			if (username.equals("anonymousUser")) {
				username=req.getRemoteAddr();
			} else {
				User user  = ((User)auth.getPrincipal());
				username=user.getName();
			}

			userRole= ((SimpleGrantedAuthority)auth.getAuthorities().toArray()[0]).getAuthority();

			long size = req.getContentLength();
			if (size==0) {
				try {
					size = request.getHeader("input").length();
				} catch (NullPointerException e){
					//Then the size is truly 0
				}
			}
			try {
				rateLimiterInMemory.addToStoredRequests(username, new Date().getTime(), size , request.getRequestURI(),userRole);
			} catch (TooManyRequestsException e) {
				HttpServletResponse response = (HttpServletResponse) res;
				exceptionHandlerService.writeExceptionToResponse(request, response, e);
				return;
			}
		}

		chain.doFilter(req, res);

	}

	/**
	 * Clears all in-Memory Timestamps & Sizes of user-made requests.
	 * Can be configured via the application.properties file
	 * Defaults to 1 hour (3 600 000 miliseconds)
	 */
	@Scheduled(fixedRateString = "${ratelimiter.clear.timer:3600000}")
	public void clearRateLimiterInMemory(){
		rateLimiterInMemory.clear();
	}

	public boolean isRateLimiterEnabled() {
		return rateLimiterEnabled;
	}
	public void setRateLimiterEnabled(boolean b){
		rateLimiterEnabled=b;
	}

	public void refresh() throws IOException {
		rateLimiterInMemory.refresh(rateLimiterYaml);
	}
	public void destroy() {}

}


text:
@interface UBSDKDeeplinkExampleViewController ()

@property (nonatomic, readonly, nullable) UBSDKRideRequestButton *blackRideRequestButton;
@property (nonatomic, readonly, nullable) UBSDKRideRequestButton *whiteRideRequestButton;

@end

@implementation UBSDKDeeplinkExampleViewController

#pragma mark - UIViewController

- (instancetype)init {
    self = [super init];
    if (self) {
        [self _initialSetup];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self _initialSetup];
    }
    return self;
}

#pragma mark - View Lifecycle

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.title = UBSDKLOC(@"Deeplink Buttons");

    [self.topView addSubview:self.blackRideRequestButton];
    [self.bottomView addSubview:self.whiteRideRequestButton];

    [self _addBlackButtonConstraints];
    [self _addWhiteButtonConstraints];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.blackRideRequestButton loadRideInformation];
    [self.whiteRideRequestButton loadRideInformation];
}

#pragma mark - Private

- (void)_initialSetup {
    _blackRideRequestButton = [[UBSDKRideRequestButton alloc] init];

    _whiteRideRequestButton = ({
        UBSDKRideParameters *rideParameters = [self _buildRideParameters];
        id<UBSDKRideRequesting> deeplinkBehavior = [[UBSDKDeeplinkRequestingBehavior alloc] init];
        UBSDKRideRequestButton *rideRequestButton = [[UBSDKRideRequestButton alloc] initWithRideParameters:rideParameters requestingBehavior:deeplinkBehavior];
        rideRequestButton.colorStyle = RequestButtonColorStyleWhite;
        rideRequestButton;
    });
}

- (UBSDKRideParameters *)_buildRideParameters {
    UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
    [builder setProductID:@"a1111c8c-c720-46c3-8534-2fcdd730040d"];

    CLLocation *pickupLocation = [[CLLocation alloc] initWithLatitude:37.770 longitude:-122.466];
    [builder setPickupLocation:pickupLocation];
    [builder setPickupNickname:@"California Academy of Sciences"];

    CLLocation *dropoffLocation = [[CLLocation alloc] initWithLatitude:37.791 longitude:-122.405];
    [builder setDropoffLocation:dropoffLocation];
    [builder setDropoffNickname:@"Pier 39"];

    return [builder build];
}

- (void)_addBlackButtonConstraints {
    self.blackRideRequestButton.translatesAutoresizingMaskIntoConstraints = NO;

    NSLayoutConstraint *centerXConstraint = [NSLayoutConstraint constraintWithItem:self.blackRideRequestButton
                                                                         attribute:NSLayoutAttributeCenterX
                                                                         relatedBy:NSLayoutRelationEqual
                                                                            toItem:self.topView
                                                                         attribute:NSLayoutAttributeCenterX
                                                                        multiplier:1.0
                                                                          constant:0.0];
    NSLayoutConstraint *centerYConstraint = [NSLayoutConstraint constraintWithItem:self.blackRideRequestButton
                                                                         attribute:NSLayoutAttributeCenterY
                                                                         relatedBy:NSLayoutRelationEqual
                                                                            toItem:self.topView
                                                                         attribute:NSLayoutAttributeCenterY
                                                                        multiplier:1.0
                                                                          constant:0.0];

    [self.topView addConstraints:@[centerXConstraint, centerYConstraint]];
}

- (void)_addWhiteButtonConstraints {
    self.whiteRideRequestButton.translatesAutoresizingMaskIntoConstraints = NO;

    NSLayoutConstraint *centerXConstraint = [NSLayoutConstraint constraintWithItem:self.whiteRideRequestButton
                                                                         attribute:NSLayoutAttributeCenterX
                                                                         relatedBy:NSLayoutRelationEqual
                                                                            toItem:self.bottomView
                                                                         attribute:NSLayoutAttributeCenterX
                                                                        multiplier:1.0
                                                                          constant:0.0];
    NSLayoutConstraint *centerYConstraint = [NSLayoutConstraint constraintWithItem:self.whiteRideRequestButton
                                                                         attribute:NSLayoutAttributeCenterY
                                                                         relatedBy:NSLayoutRelationEqual
                                                                            toItem:self.bottomView
                                                                         attribute:NSLayoutAttributeCenterY
                                                                        multiplier:1.0
                                                                          constant:0.0];

    [self.bottomView addConstraints:@[centerXConstraint, centerYConstraint]];
}

@end


text:
package reactor.core.publisher;

import org.junit.Test;
import reactor.core.Scannable;
import reactor.core.scheduler.Schedulers;
import reactor.test.StepVerifier;
import reactor.util.concurrent.Queues;

import static org.assertj.core.api.Assertions.assertThat;

public class ParallelRunOnTest {

	@Test
	public void scanOperator() throws Exception {
		ParallelFlux<String> source = Flux.<String>empty().parallel(2);
		ParallelRunOn<String> test = new ParallelRunOn<>(source, Schedulers.single(), 123, Queues.small());

		assertThat(test.scan(Scannable.Attr.PARENT)).isSameAs(source);
		assertThat(test.scan(Scannable.Attr.PREFETCH)).isEqualTo(123);
	}

	@Test
	public void parallelism() {
		ParallelFlux<String> source = Flux.<String>empty().parallel(2);
		ParallelRunOn<String> test = new ParallelRunOn<>(source, Schedulers.single(), 123, Queues.small());

		assertThat(test.parallelism()).isEqualTo(2);
	}

	@Test
	public void conditional() {
		Flux<Integer> source = Flux.range(1, 1_000);
		for (int i = 1; i < 33; i++) {
			Flux<Integer> result = ParallelFlux.from(source, i)
			                                   .runOn(Schedulers.parallel())
			                                   .filter(t -> true)
			                                   .sequential();

			StepVerifier.create(result)
			            .expectNextCount(1_000)
			            .verifyComplete();
		}
	}
}


text:
FROM python:2-alpine3.6

LABEL maintainer="ChenPeng<chen56@msn.com>"

USER root

RUN set -xe \
    && echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/main" > /etc/apk/repositories \
    && echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/community" >> /etc/apk/repositories \
    && apk update \
    && apk add bash curl \
    && pip install sshuttle

VOLUME /app

ENTRYPOINT ["sshuttle"]

CMD ["--help"]


text:
<!DOCTYPE html>

		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>

		<title>Mi Portal</title>

		<base href="/" />

		<link rel="shortcut icon" href="public/img/favicon.ico" type="image/x-icon">
		<link rel="icon" href="public/img/favicon.ico" type="image/x-icon">

		<link rel="stylesheet" type="text/css" media="all" href="public/bower_components/bootstrap/dist/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" media="all" href="public/bower_components/fontawesome/css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" media="all" href="public/bower_components/jstree/dist/themes/default/style.min.css" />
		<link rel="stylesheet" type="text/css" media="all" href="public/bower_components/fotorama/fotorama.css" />
		<link rel="stylesheet" type="text/css" media="all" href="public/css/sb-admin-2.css" />
		<link rel="stylesheet" type="text/css" media="all" href="css/shared.css" />

						Inicio
						Blog
						Links
						Mapa de Direcciones
						Multimedia
						Música
						Archivos

					<chat-dir></chat-dir>

						<wall-dir></wall-dir>

						<blog-dir></blog-dir>

						<link-dir></link-dir>

						<map-dir></map-dir>

						<media-dir></media-dir>

						<music-dir></music-dir>

						<file-dir></file-dir>

		<log-dir></log-dir>

		<profile-dir></profile-dir>

		<contact-dir></contact-dir>


text:
package com.leapset.forecastio.service;

import com.leapset.forecastio.dto.ForecastIO;
import com.leapset.forecastio.exception.ForecastIOException;

/**
 * Interface for forecast-io client
 *
 * @author Chaminda Bandara
 * @version 1.0
 * @since Forecast-IO Client v1.0
 */
public interface ForecastWeatherService {

    /**
     * Return weather data for given date
     *
     * @param latitude
     * @param longitude
     * @param dateStart
     * @return
     */
    ForecastIO getWeather(Float latitude, Float longitude, Long dateStart)
            throws ForecastIOException;

    /**
     * Return weather data for given date and token
     *
     * @param latitude
     * @param longitude
     * @param dateStart
     * @return
     */
    ForecastIO getWeather(Float latitude, Float longitude, Long dateStart, String token)
            throws ForecastIOException ;
}


text:
@implementation UIColor (ColorUtils)

+ (dispatch_queue_t)sharedDispatchQueue
{
    static dispatch_queue_t queue;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{

        queue = dispatch_queue_create("com.charcoaldesign.ColorUtils", DISPATCH_QUEUE_SERIAL);
    });

    return queue;
}

+ (NSMutableDictionary *)standardColors
{
    static NSMutableDictionary *colors = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{

        colors = [@{@"black": [self blackColor], // 0.0 white
                  @"darkgray": [self darkGrayColor], // 0.333 white
                  @"lightgray": [self lightGrayColor], // 0.667 white
                  @"white": [self whiteColor], // 1.0 white
                  @"gray": [self grayColor], // 0.5 white
                  @"red": [self redColor], // 1.0, 0.0, 0.0 RGB
                  @"green": [self greenColor], // 0.0, 1.0, 0.0 RGB
                  @"blue": [self blueColor], // 0.0, 0.0, 1.0 RGB
                  @"cyan": [self cyanColor], // 0.0, 1.0, 1.0 RGB
                  @"yellow": [self yellowColor], // 1.0, 1.0, 0.0 RGB
                  @"magenta": [self magentaColor], // 1.0, 0.0, 1.0 RGB
                  @"orange": [self orangeColor], // 1.0, 0.5, 0.0 RGB
                  @"purple": [self purpleColor], // 0.5, 0.0, 0.5 RGB
                  @"brown": [self brownColor], // 0.6, 0.4, 0.2 RGB
                  @"clear": [self clearColor]} mutableCopy];
    });

    return colors;
}

- (void)getRGBAComponents:(CGFloat[4])rgba
{
    CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(self.CGColor));
    const CGFloat *components = CGColorGetComponents(self.CGColor);
    switch (model)
    {
        case kCGColorSpaceModelMonochrome:
        {
            rgba[0] = components[0];
            rgba[1] = components[0];
            rgba[2] = components[0];
            rgba[3] = components[1];
            break;
        }
        case kCGColorSpaceModelRGB:
        {
            rgba[0] = components[0];
            rgba[1] = components[1];
            rgba[2] = components[2];
            rgba[3] = components[3];
            break;
        }
        case kCGColorSpaceModelCMYK:
        case kCGColorSpaceModelDeviceN:
        case kCGColorSpaceModelIndexed:
        case kCGColorSpaceModelLab:
        case kCGColorSpaceModelPattern:
        case kCGColorSpaceModelUnknown:
        {

#ifdef DEBUG

            //unsupported format
            NSLog(@"Unsupported color model: %i", model);
#endif
            rgba[0] = 0.0f;
            rgba[1] = 0.0f;
            rgba[2] = 0.0f;
            rgba[3] = 1.0f;
            break;
        }
    }
}

+ (void)registerColor:(UIColor *)color forName:(NSString *)name
{
    name = [name lowercaseString];

    dispatch_sync([self sharedDispatchQueue], ^{

#ifdef DEBUG

        //don't allow re-registration
        NSAssert([self standardColors][name] == nil || [[self standardColors][name] isEquivalentToColor:color],
                 @"Cannot re-register the color '%@' as this is already assigned", name);

#endif

        [self standardColors][[name lowercaseString]] = color;
    });
}

+ (instancetype)colorWithString:(NSString *)string
{
    //convert to lowercase
    string = [string lowercaseString];

    //try standard colors first
    __block UIColor *color = nil;
    dispatch_sync([self sharedDispatchQueue], ^{

        color = [self standardColors][string];
    });

    if (color)
    {
        return color;
    }

    //create new instance
    return [[self alloc] initWithString:string useLookup:NO];
}

+ (instancetype)colorWithRGBValue:(uint32_t)rgb
{
    return [[self alloc] initWithRGBValue:rgb];
}

+ (instancetype)colorWithRGBAValue:(uint32_t)rgba
{
    return [[self alloc] initWithRGBAValue:rgba];
}

- (instancetype)initWithString:(NSString *)string
{
    return [self initWithString:string useLookup:YES];
}

- (instancetype)initWithString:(NSString *)string useLookup:(BOOL)lookup
{
    //convert to lowercase
    string = [string lowercaseString];

    if (lookup)
    {
        //try standard colors
        __block UIColor *color = nil;
        dispatch_sync([[self class] sharedDispatchQueue], ^{

            color = [[self class] standardColors][string];
        });

        if (color)
        {
            return ((self = color));
        }
    }

    //try hex
    string = [string stringByReplacingOccurrencesOfString:@"#" withString:@""];
    string = [string stringByReplacingOccurrencesOfString:@"0x" withString:@""];
    switch ([string length])
    {
        case 0:
        {
            string = @"00000000";
            break;
        }
        case 3:
        {
            NSString *red = [string substringWithRange:NSMakeRange(0, 1)];
            NSString *green = [string substringWithRange:NSMakeRange(1, 1)];
            NSString *blue = [string substringWithRange:NSMakeRange(2, 1)];
            string = [NSString stringWithFormat:@"%1$@%1$@%2$@%2$@%3$@%3$@ff", red, green, blue];
            break;
        }
        case 6:
        {
            string = [string stringByAppendingString:@"ff"];
            break;
        }
        case 8:
        {
            //do nothing
            break;
        }
        default:
        {

#ifdef DEBUG

            //unsupported format
            NSLog(@"Unsupported color string format: %@", string);
#endif
            return nil;
        }
    }
    uint32_t rgba;
    NSScanner *scanner = [NSScanner scannerWithString:string];
    [scanner scanHexInt:&rgba];
    return [self initWithRGBAValue:rgba];
}

- (instancetype)initWithRGBValue:(uint32_t)rgb
{
    CGFloat red = ((rgb & 0xFF0000) >> 16) / 255.0f;
	CGFloat green = ((rgb & 0x00FF00) >> 8) / 255.0f;
	CGFloat blue = (rgb & 0x0000FF) / 255.0f;
	return [self initWithRed:red green:green blue:blue alpha:1.0f];
}

- (instancetype)initWithRGBAValue:(uint32_t)rgba
{
    CGFloat red = ((rgba & 0xFF000000) >> 24) / 255.0f;
    CGFloat green = ((rgba & 0x00FF0000) >> 16) / 255.0f;
	CGFloat blue = ((rgba & 0x0000FF00) >> 8) / 255.0f;
	CGFloat alpha = (rgba & 0x000000FF) / 255.0f;
	return [self initWithRed:red green:green blue:blue alpha:alpha];
}

- (uint32_t)RGBValue
{
    CGFloat rgba[4];
    [self getRGBAComponents:rgba];
    uint32_t red = rgba[0]*255;
    uint32_t green = rgba[1]*255;
    uint32_t blue = rgba[2]*255;
    return (red << 16) + (green << 8) + blue;
}

- (uint32_t)RGBAValue
{
    CGFloat rgba[4];
    [self getRGBAComponents:rgba];
    uint8_t red = rgba[0]*255;
    uint8_t green = rgba[1]*255;
    uint8_t blue = rgba[2]*255;
    uint8_t alpha = rgba[3]*255;
    return (red << 24) + (green << 16) + (blue << 8) + alpha;
}

- (NSString *)stringValue
{
    //try standard colors
    NSUInteger index = [[[[self class] standardColors] allValues] indexOfObject:self];
    if (index != NSNotFound)
    {
        return [[[self class] standardColors] allKeys][index];
    }

    //convert to hex
    if (self.alpha < 1.0f)
    {
        //include alpha component
        return [NSString stringWithFormat:@"#%.8x", self.RGBAValue];
    }
    else
    {
        //don't include alpha component
        return [NSString stringWithFormat:@"#%.6x", self.RGBValue];
    }
}

- (CGFloat)red
{
    CGFloat rgba[4];
    [self getRGBAComponents:rgba];
	return rgba[0];
}

- (CGFloat)green
{
    CGFloat rgba[4];
    [self getRGBAComponents:rgba];
	return rgba[1];
}

- (CGFloat)blue
{
    CGFloat rgba[4];
    [self getRGBAComponents:rgba];
	return rgba[2];
}

- (CGFloat)alpha
{
    return CGColorGetAlpha(self.CGColor);
}

- (BOOL)isMonochromeOrRGB
{
    CGColorSpaceModel model = CGColorSpaceGetModel(CGColorGetColorSpace(self.CGColor));
    return model == kCGColorSpaceModelMonochrome || model == kCGColorSpaceModelRGB;
}

- (BOOL)isEquivalent:(id)object
{
    if ([object isKindOfClass:[self class]])
    {
        return [self isEquivalentToColor:object];
    }
    return NO;
}

- (BOOL)isEquivalentToColor:(UIColor *)color
{
    if ([self isMonochromeOrRGB] && [color isMonochromeOrRGB])
    {
        return self.RGBAValue == color.RGBAValue;
    }
    return [self isEqual:color];
}

- (instancetype)colorWithBrightness:(CGFloat)brightness
{
    brightness = MAX(brightness, 0.0f);

    CGFloat rgba[4];
    [self getRGBAComponents:rgba];

    return [[self class] colorWithRed:rgba[0] * brightness
                                green:rgba[1] * brightness
                                 blue:rgba[2] * brightness
                                alpha:rgba[3]];
}

- (instancetype)colorBlendedWithColor:(UIColor *)color factor:(CGFloat)factor
{
    factor = MIN(MAX(factor, 0.0f), 1.0f);

    CGFloat fromRGBA[4], toRGBA[4];
    [self getRGBAComponents:fromRGBA];
    [color getRGBAComponents:toRGBA];

    return [[self class] colorWithRed:fromRGBA[0] + (toRGBA[0] - fromRGBA[0]) * factor
                                green:fromRGBA[1] + (toRGBA[1] - fromRGBA[1]) * factor
                                 blue:fromRGBA[2] + (toRGBA[2] - fromRGBA[2]) * factor
                                alpha:fromRGBA[3] + (toRGBA[3] - fromRGBA[3]) * factor];
}

@end


text:
package io.crnk.monitor.brave;

import brave.Tracing;
import brave.http.HttpTracing;
import io.crnk.client.http.HttpAdapter;
import io.crnk.client.http.apache.HttpClientAdapter;
import io.crnk.client.http.apache.HttpClientAdapterListener;
import io.crnk.client.http.okhttp.OkHttpAdapter;
import io.crnk.client.http.okhttp.OkHttpAdapterListener;
import io.crnk.client.module.HttpAdapterAware;
import io.crnk.core.module.Module;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * Traces all crnk-client requests with brave-instrumentation-okhttp3 or brave-instrumentation-httpclient implementation
 */
public class BraveClientModule implements Module, HttpAdapterAware {

	private HttpTracing tracing;

	// protected for CDI
	protected BraveClientModule() {
	}

	private BraveClientModule(HttpTracing tracing) {
		this.tracing = tracing;
	}

	public static BraveClientModule create(Tracing tracing) {
		return create(HttpTracing.create(tracing));
	}

	public static BraveClientModule create(HttpTracing tracing) {
		return new BraveClientModule(tracing);
	}

	@Override
	public String getModuleName() {
		return "brave-client";
	}

	@Override
	public void setupModule(ModuleContext context) {
		// nothing to do
	}

	@Override
	public void setHttpAdapter(HttpAdapter adapter) {
		try {
			// load classes lazily since necessary classes may not be on classpath
			if (adapter instanceof OkHttpAdapter) {
				OkHttpAdapter okHttpAdapter = (OkHttpAdapter) adapter;
				Class integrationClass = getClass().getClassLoader().loadClass(
						"io.crnk.monitor.brave.internal.OkHttpBraveIntegration"
				);
				Constructor constructor = integrationClass.getConstructor(HttpTracing.class);
				OkHttpAdapterListener listener = (OkHttpAdapterListener) constructor.newInstance(tracing);
				okHttpAdapter.addListener(listener);
			} else if (adapter instanceof HttpClientAdapter) {
				HttpClientAdapter httpClientAdapter = (HttpClientAdapter) adapter;

				Class integrationClass = getClass().getClassLoader().loadClass(
						"io.crnk.monitor.brave.internal.HttpClientBraveIntegration"
				);
				Constructor constructor = integrationClass.getConstructor(HttpTracing.class);
				HttpClientAdapterListener listener = (HttpClientAdapterListener) constructor.newInstance(tracing);
				httpClientAdapter.addListener(listener);
			} else {
				throw new IllegalArgumentException(adapter.getClass() + " not supported yet");
			}
		} catch (InvocationTargetException | IllegalAccessException | InstantiationException | NoSuchMethodException |
				ClassNotFoundException e) {
			throw new IllegalStateException("failed to setup brave integration", e);
		}
	}

	public HttpTracing getHttpTracing() {
		return tracing;
	}
}


text:
__version__ = "0.5"
function searchable_setup($identifier) {
  // create and add the filter form to the identifier (before computing the cache for searching)
  // > TODO > styles should be moved to common.css after beta tests
  var $form = $("<form>").attr({"id":"searchable_form", "action":"#", "style":"padding: 3px;background: #ff9;"}),
      $label = $("Search this page: "),
      $input = $("<input>").attr({"id":"searchable_input", "type":"text"}),
      $span = $(" (this is a beta feature) Loading..."),
      $comment = $("")
  $identifier.after($comment).after($form.append($label).append($input).append($span))
  // read variables from divs (since data-* does not work on wikia)
  var outline_separator = $("#searchable_outline_separator").text(),
      outline_separator_parent = $("#searchable_outline_separator_parent").text(),
      search_in = $("#searchable_search_in").text(),
      $WikiArticle = $("#WikiaArticle"),
      $toc = $("#toc *"), // table of contents elements to be excluded from search
      $separator,
      $search_in,
      $blocks,
      $parents,
      $ignored,
      show_all = true,
      data = [],
      $temp

  // create outline elements to be searched on $input.keyup() - inspired by http://www.w3.org/TR/html5/sections.html#outlines
  if (outline_separator_parent) {
      $separator = $WikiArticle.find( outline_separator_parent ).not($toc)
      $separator.first().before("")
      $separator.slice(1).before("")
      $separator.before("")
      $WikiArticle.append("")
      $WikiArticle.html($WikiArticle.html()
          .replace(//g, "
")
          .replace(//g, "
")
      )
      $parents = $WikiArticle.find( "div.searchable_parent" )
  }
  if (outline_separator) {
      $separator = $WikiArticle.find( outline_separator ).not($toc)
      if (outline_separator_parent) {
          $parents.each( function () {
              $(this).find( outline_separator ).slice(1).before("")
          })
      } else {
          $separator.before("")
      }
      $separator.before("")
      $WikiArticle.append("")
      $WikiArticle.html($WikiArticle.html()
          .replace(//g, "
") // this was inserted by $identifier.after(...)
          .replace(//g, "
")
          .replace(//g, "
")
      )
      $blocks = $WikiArticle.find( "div.searchable_block" )
      $search_in = (search_in) ? $WikiArticle.find(search_in) : $blocks
  } else {
      if (!search_in) {
          search_in = "p, dl, pre"
      }
      if (!outline_separator_parent) {
          $temp = $WikiArticle.find(search_in).first().parentsUntil($WikiArticle)
          if ($temp.length) {
              $temp.before("")
          } else {
              $WikiArticle.find(search_in).first().before("")
          }

      }
      $WikiArticle.html($WikiArticle.html()
          .replace(//g, "
") // this was inserted by $identifier.after(...)
          .replace(//g, "
")
      )
      $search_in = $WikiArticle.find(search_in)
      $blocks = $search_in
  }

  // cache of lowercase text inside $search_in elements
  $search_in.each( function () {
      // TODO - add alt values from the big images on [[Production_Chains]] to the data
      data.push($(this).text().toLowerCase())
  })
  data_length = data.length

  // replace jQuery objects lost after manipulating DOM
  $form = $("#searchable_form")
  $input = $("#searchable_input")
  $parents = $WikiArticle.find( "div.searchable_parent" )
  $ignored = $WikiArticle.find( "div.searchable_ignore" )

  // add event handlers to filter list elements
  $input.keyup( function () {
      var search_for = this.value.toLowerCase(),
          filter = new RegExp( search_for ),
          $found,
          $found_blocks,
          $found_parents
      if (search_for) {
          if(show_all) {
              $ignored.hide()
              show_all = false
          }
          $found = $search_in.map( function (i) {
              if (data[i].search(filter) != -1) {
                  return this
              }
          })
          if (outline_separator && search_in) {
              $found_blocks = $found.parents($blocks)
          } else {
              $found_blocks = $found
          }
          $found_blocks.show()
          $blocks.not($found_blocks).hide()
          if (outline_separator_parent) {
              $found_parents = $found.parents($parents)
              $found_parents.show()
              $parents.not($found_parents).hide()
          }
      } else {
          $ignored.show()
          $parents.show()
          $blocks.show()
          show_all = true
      }
      return false
  }).focus( function () {
      $input.select()
  }).click( function () {
      // prevent bubling up to $form.click() = $input.select() while placing cursor by clicking
      return false
  })
  $form.submit( function () {
      // update hash string in url (to copy & paste links to this search)
      var search_for = $input.val().toLowerCase()
      if (search_for.search(/^[a-z]/) != -1) {
          location.hash = search_for
      } else {
          location.hash = null
      }
      return false
  }).click( function () {
      $input.select()
  })

  // search for /something_that_is_not_an_ID/ for urls like example.com/mypage#something_that_is_not_an_ID
  hashchange_handler()
  window.onhashchange = hashchange_handler
  $input.select()

  // remove "Loading..." text
  $("#searchable_loading").remove()
}
function hashchange_handler () {
  var hash = location.hash,
      $input = $("#searchable_input")
  if (hash) {
      if (!$(hash).length) {
          hash = hash.slice(1).replace(/\//g, "\\")
              .replace(".2A","*") // wikia has a custom escapeURI ...
              .replace(".2B","+")
              .replace(".2F","/")
              .replace(".3F","?")
              .replace(".5C","\\")
          $input.val(hash).keyup()
          $(window).scrollTop(150)
      }
  }
 }

// run the code when document is ready and there is a
 on the page
$( function () {
  var $identifier = $("#searchable_page_identifier")
  if ($identifier.length) {
    searchable_setup($identifier)
  }
})


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Jogo da Forca</title>

        <link href="css/bootstrap.min.css" rel="stylesheet">

        <link href="css/freelancer.css" rel="stylesheet">

        <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        Toggle navigation

                    </button>
                    Jogo da Forca

                            Jogar

                            Contato

                            Jogo da Forca

                            Experimente esse jogo sensacional!

Jogar

                            <button class="btn btn-success" onclick="sortear()">Sortear</button>

Dica: Cores

                        <form class="form-inline">

                                Letra:
                                <input type="text" class="form-control" id="txtLetra"  maxlength="1" style="text-transform: uppercase;">
                                <button class="btn btn-primary" onclick="chutar()">Chutar</button>

                        </form>

                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Alerta

                                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

Contato

                        <form name="sentMessage" id="contactForm" novalidate>

                                    Nome
                                    <input type="text" class="form-control" placeholder="Nome" id="nome" required data-validation-required-message="Digite o nome">

                                    E-Mail
                                    <input type="email" class="form-control" placeholder="Email" id="email" required data-validation-required-message="Digite o e-mail">

                                    Telefone
                                    <input type="tel" class="form-control" placeholder="Telefone" id="phone" required data-validation-required-message="Digite o telefone">

                                    Mensagem
                                    <textarea rows="5" class="form-control" placeholder="Mensagem" id="message" required data-validation-required-message="Digite a mensagem"></textarea>

                                    <button type="submit" class="btn btn-success btn-lg">Enviar</button>

                        </form>

SENAI

Rodovia BR 101 nº km 21, s/n
 Área Industrial - São José/SC

Redes Sociais

Sobre nós

Site criado utilizando o tema aberto do Start Bootstrap.

                            Copyright © Your Website 2014

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                        Start Bootstrap

Date:
                                        April 2014

Service:
                                        Web Development

                                <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>


text:
package org.springframework.jmx.access;

import java.io.IOException;
import java.util.Map;

import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.jmx.MBeanServerNotFoundException;
import org.springframework.jmx.support.JmxUtils;

/**
 * Internal helper class for managing a JMX connector.
 *
 * @author Juergen Hoeller
 * @since 2.5.2
 */
class ConnectorDelegate {

	private final static Log logger = LogFactory.getLog(ConnectorDelegate.class);

	private JMXConnector connector;

	/**
	 * Connects to the remote MBeanServer using the configured JMXServiceURL:
	 * to the specified JMX service, or to a local MBeanServer if no service URL specified.
	 * @param serviceUrl the JMX service URL to connect to (may be null)
	 * @param environment the JMX environment for the connector (may be null)
	 * @param agentId the local JMX MBeanServer's agent id (may be null)
	 */
	public MBeanServerConnection connect(JMXServiceURL serviceUrl, Map environment, String agentId)
			throws MBeanServerNotFoundException {

		if (serviceUrl != null) {
			if (logger.isDebugEnabled()) {
				logger.debug("Connecting to remote MBeanServer at URL [" + serviceUrl + "]");
			}
			try {
				this.connector = JMXConnectorFactory.connect(serviceUrl, environment);
				return this.connector.getMBeanServerConnection();
			}
			catch (IOException ex) {
				throw new MBeanServerNotFoundException("Could not connect to remote MBeanServer [" + serviceUrl + "]", ex);
			}
		}
		else {
			logger.debug("Attempting to locate local MBeanServer");
			return JmxUtils.locateMBeanServer(agentId);
		}
	}

	/**
	 * Closes any JMXConnector that may be managed by this interceptor.
	 */
	public void close() {
		if (this.connector != null) {
			try {
				this.connector.close();
			}
			catch (IOException ex) {
				logger.debug("Could not close JMX connector", ex);
			}
		}
	}

}


text:
var parent = require('../../stable/instance/starts-with');

module.exports = parent;


text:
#include <config.h>

#include "compat.h"
#include "timer.h"

double
timer_get_time( void )
{
  return compat_timer_get_time();
}

void
timer_sleep( int ms )
{
  compat_timer_sleep( ms );
}


text:
title: "Roles API"
description: "The Sensu roles API provides HTTP access to user role data. This reference includes examples for returning lists of roles, creating Sensu roles, and more. Read on for the full reference."
api_title: "Roles API"
type: "api"
version: "6.2"
product: "Sensu Go"
menu:
  sensu-go-6.2:
    parent: api
---

{{% notice note %}}
**NOTE**: Requests to the roles API require you to authenticate with a Sensu [API key](../#configure-an-environment-variable-for-api-key-authentication) or [access token](../#authenticate-with-the-authentication-api).
The code examples in this document use the [environment variable](../#configure-an-environment-variable-for-api-key-authentication) `$SENSU_API_KEY` to represent a valid API key in API requests.
{{% /notice %}}

## Get all roles

The `/roles` API endpoint provides HTTP GET access to [role][1] data.

### Example {#roles-get-example}

The following example demonstrates a request to the `/roles` API endpoint, resulting in a JSON array that contains [role definitions][1].

{{}}
curl -X GET \
http://127.0.0.1:8080/api/core/v2/namespaces/default/roles \
-H "Authorization: Key $SENSU_API_KEY"

HTTP/1.1 200 OK
[
  {
    "rules": [
      {
        "verbs": [
          "get",
          "list"
        ],
        "resources": [
          "events"
        ],
        "resource_names": null
      }
    ],
    "metadata": {
      "name": "event-reader",
      "namespace": "default",
      :created_by": "admin"
    }
  },
  {
    "rules": [
      {
        "verbs": [
          "get"
        ],
        "resources": [
          "*"
        ],
        "resource_names": null
      }
    ],
    "metadata": {
      "name": "read-only",
      "namespace": "default",
      "created_by": "admin"
    }
  }
]
{{}}

### API Specification {#roles-get-specification}

/roles (GET)  |
---------------|------
description    | Returns the list of roles.
example url    | http://hostname:8080/api/core/v2/namespaces/default/roles
pagination     | This endpoint supports [pagination][2] using the `limit` and `continue` query parameters.
response filtering | This endpoint supports [API response filtering][3].
response type  | Array
response codes |

**Success**: 200 (OK)

**Error**: 500 (Internal Server Error)

output         | {{}}
[
  {
    "rules": [
      {
        "verbs": [
          "get",
          "list"
        ],
        "resources": [
          "events"
        ],
        "resource_names": null
      }
    ],
    "metadata": {
      "name": "event-reader",
      "namespace": "default",
      "created_by": "admin"
    }
  },
  {
    "rules": [
      {
        "verbs": [
          "get"
        ],
        "resources": [
          "*"
        ],
        "resource_names": null
      }
    ],
    "metadata": {
      "name": "read-only",
      "namespace": "default",
      "created_by": "admin"
    }
  }
]
{{}}

## Create a new role

The `/roles` API endpoint provides HTTP POST access to create Sensu roles.

### Example {#roles-post-example}

In the following example, an HTTP POST request is submitted to the `/roles` API endpoint to create a role named `event-reader`.
The request returns a successful HTTP `201 Created` response.

{{}}
curl -X POST \
-H "Authorization: Key $SENSU_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
  "rules": [
    {
      "verbs": [
        "get",
        "list"
      ],
      "resources": [
        "events"
      ],
      "resource_names": []
    }
  ],
  "metadata": {
    "name": "event-reader",
    "namespace": "default"
  }
}' \
http://127.0.0.1:8080/api/core/v2/namespaces/default/roles

HTTP/1.1 201 Created
{{}}

### API Specification {#roles-post-specification}

/roles (POST) |
----------------|------
description     | Creates a Sensu role.
example URL     | http://hostname:8080/api/core/v2/namespaces/default/roles
payload         | {{}}
{
  "rules": [
    {
      "verbs": [
        "get",
        "list"
      ],
      "resources": [
        "events"
      ],
      "resource_names": []
    }
  ],
  "metadata": {
    "name": "event-reader",
    "namespace": "default"
  }
}
{{}}
response codes  |

**Success**: 201 (Created)

**Malformed**: 400 (Bad Request)

**Error**: 500 (Internal Server Error)

## Get a specific role {#rolesrole-get}

The `/roles/:role` API endpoint provides HTTP GET access to [role data][1] for specific `:role` definitions, by role name.

### Example {#rolesrole-get-example}

In the following example, querying the `/roles/:role` API endpoint returns a JSON map that contains the requested [`:role` definition][1] (in this example, for the `:role` named `read-only`).

{{}}
curl -X GET \
http://127.0.0.1:8080/api/core/v2/namespaces/default/roles/read-only \
-H "Authorization: Key $SENSU_API_KEY"

HTTP/1.1 200 OK
{
  "rules": [
    {
      "verbs": [
        "read"
      ],
      "resources": [
        "*"
      ],
      "resource_names": null
    }
  ],
  "metadata": {
    "name": "read-only",
    "namespace": "default",
    "created_by": "admin"
  }
}
{{}}

### API Specification {#rolesrole-get-specification}

/roles/:role (GET) |
---------------------|------
description          | Returns the specified Sensu role.
example url          | http://hostname:8080/api/core/v2/namespaces/default/roles/read-only
response type        | Map
response codes       |

**Success**: 200 (OK)

 **Missing**: 404 (Not Found)

**Error**: 500 (Internal Server Error)

output               | {{}}
{
  "rules": [
    {
      "verbs": [
        "read"
      ],
      "resources": [
        "*"
      ],
      "resource_names": null
    }
  ],
  "metadata": {
    "name": "read-only",
    "namespace": "default",
    "created_by": "admin"
  }
}
{{}}

## Create or update a role {#rolesrole-put}

The `/roles/:role` API endpoint provides HTTP PUT access to create or update specific `:role` definitions, by role name.

### Example {#rolesrole-put-example}

In the following example, an HTTP PUT request is submitted to the `/roles/:role` API endpoint to create the role `read-only`.
The request returns a successful HTTP `201 Created` response.

{{}}
curl -X PUT \
-H "Authorization: Key $SENSU_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
  "rules": [
    {
      "verbs": [
        "read"
      ],
      "resources": [
        "*"
      ],
      "resource_names": null
    }
  ],
  "metadata": {
    "name": "read-only",
    "namespace": "default"
  }
}' \
http://127.0.0.1:8080/api/core/v2/namespaces/default/roles/read-only

HTTP/1.1 201 Created
{{}}

### API Specification {#rolesrole-put-specification}

/roles/:role (PUT) |
----------------|------
description     | Creates or updates the specified Sensu role.
example URL     | http://hostname:8080/api/core/v2/namespaces/default/roles/event-reader
payload         | {{}}
{
  "rules": [
    {
      "verbs": [
        "read"
      ],
      "resources": [
        "*"
      ],
      "resource_names": null
    }
  ],
  "metadata": {
    "name": "read-only",
    "namespace": "default"
  }
}
{{}}
response codes  |

**Success**: 201 (Created)

**Malformed**: 400 (Bad Request)

**Error**: 500 (Internal Server Error)

## Update a role with PATCH

The `/roles/:role` API endpoint provides HTTP PATCH access to update `:role` definitions, specified by role name.

{{% notice note %}}
**NOTE**: You cannot change a resource's `name` or `namespace` with a PATCH request.
Use a [PUT request](#rolesrole-put) instead.

Also, you cannot add elements to an array with a PATCH request — you must replace the entire array.
{{% /notice %}}

### Example

In the following example, an HTTP PATCH request is submitted to the `/roles/:role` API endpoint to update the verbs array within the rules array for the `global-event-admin` role, resulting in an HTTP `200 OK` response and the updated role definition.

We support [JSON merge patches][4], so you must set the `Content-Type` header to `application/merge-patch+json` for PATCH requests.

{{}}
curl -X PATCH \
-H "Authorization: Key $SENSU_API_KEY" \
-H 'Content-Type: application/merge-patch+json' \
-d '{
  "rules": [
    {
      "verbs": [
        "get",
        "list"
      ],
      "resources": [
        "events"
      ],
      "resource_names": null
    }
  ]
}' \
http://127.0.0.1:8080/api/core/v2/roles/event-reader

HTTP/1.1 200 OK
{{}}

### API Specification

/roles/:role (PATCH) |
----------------|------
description     | Updates the specified Sensu role.
example URL     | http://hostname:8080/api/core/v2/roles/event-reader
payload         | {{}}
{
  "rules": [
    {
      "verbs": [
        "get",
        "list"
      ],
      "resources": [
        "events"
      ],
      "resource_names": null
    }
  ]
}
{{}}
response codes  |

**Success**: 200 (OK)

**Malformed**: 400 (Bad Request)

**Error**: 500 (Internal Server Error)

## Delete a role {#rolesrole-delete}

The `/roles/:role` API endpoint provides HTTP DELETE access to delete a role from Sensu (specified by the role name).

### Example {#rolesrole-delete-example}

The following example shows a request to the `/roles/:role` API endpoint to delete the role `read-only`, resulting in a successful HTTP `204 No Content` response.

{{}}
curl -X DELETE \
http://127.0.0.1:8080/api/core/v2/namespaces/default/roles/read-only \
-H "Authorization: Key $SENSU_API_KEY"

HTTP/1.1 204 No Content
{{}}

### API Specification {#rolesrole-delete-specification}

/roles/:role (DELETE) |
--------------------------|------
description               | Removes the specified role from Sensu.
example url               | http://hostname:8080/api/core/v2/namespaces/default/roles/read-only
response codes            |

**Success**: 204 (No Content)

**Missing**: 404 (Not Found)

**Error**: 500 (Internal Server Error)

[1]: ../../operations/control-access/rbac/
[2]: ../#pagination
[3]: ../#response-filtering
[4]: https://tools.ietf.org/html/rfc7396


text:
<?php

namespace Oauth\Controller;

use Hybridauth\Endpoint;
use Hybridauth\Hybridauth;
use Zend\Debug\Debug;

class IndexController extends \Phalcon\Mvc\Controller
{
    public function indexAction($provider, $add = null)
    {
        if ($provider == 'back') {
            $endpoint = new Endpoint();
            $endpoint->process();
        }

        $hybridAuth = new Hybridauth($this->getDI()->get('registry')->hybridauth);

        try {
            switch ($provider) {
                case 'vkontakte':
                case 'facebook':
                case 'google':
                case 'twitter':
                case 'github':
                    $adapter = $hybridAuth->authenticate(ucfirst($provider));
                    break;
            }

            if (!empty($adapter)) {
                /**
                 * @var \Hybridauth\Entity\Profile
                 */
                $userProfile = $adapter->getUserProfile();

                /**
                 * @var \Lynx\ORM\EntityManager
                 */
                $em = $this->getDI()->get('em');

                /**
                 * @var \Lynx\ORM\EntityRepository
                 */
                $socialRelationsRepository = $em->getRepository('Oauth\Model\SocialRelation');
                $result = $socialRelationsRepository->createQueryBuilder('find')
                    ->where('find.providerId = :provider')
                    ->andWhere('find.identifierId = :identifier')
                    ->getQuery()
                    ->bindValue('provider', $provider)
                    ->bindValue('identifier', $userProfile->identifier)
                    ->fetchOne();

                if ($result) {
                    $usersRepository = $em->getRepository('User\Model\User');
                    $user = $usersRepository->find($result->userId);
                } else {
                    $user = new \User\Model\User();
                    $user->firstname = $userProfile->firstName;
                    $user->lastname = $userProfile->lastName;
                    $user->email = $userProfile->email;

                    $em->getUnitOfWork()->insert($user);
                    $em->getUnitOfWork()->commit();

                    $relation = new \Oauth\Model\SocialRelation();
                    $relation->userId = $user->id;
                    $relation->identifierId = $userProfile->identifier;
                    $relation->providerId = $provider;

                    $em->getUnitOfWork()->insert($relation);
                    $em->getUnitOfWork()->commit();
                }

                $session = $this->getDI()->get('session');
                $session->set("userId", $user->id);

                $this->response->redirect();
            }
        } catch (\Exception $e) {
            Debug::dump($e->getMessage());
        }
    }
}


text:
@implementation UIImage (TLDarkMode)

+ (UIImage *)imageWithLight:(UIImage *)lightImage dark:(UIImage *)darkImage
{
    if (!lightImage) {
        return nil;
    }
#if __IPHONE_13_0
    if (@available(iOS 13.0, *)) {
        UITraitCollection *lightCollection = [UITraitCollection traitCollectionWithUserInterfaceStyle:UIUserInterfaceStyleLight];
        UITraitCollection *darkCollection = [UITraitCollection traitCollectionWithUserInterfaceStyle:UIUserInterfaceStyleDark];
        UITraitCollection *unspecifiedCollection = [UITraitCollection traitCollectionWithUserInterfaceStyle:UIUserInterfaceStyleLight];
        UIImage *darkPure = [darkImage.imageAsset imageWithTraitCollection:unspecifiedCollection];
        UIImage *lightPure = [lightImage.imageAsset imageWithTraitCollection:unspecifiedCollection];
        UIImage *image = lightPure.copy;
        [image.imageAsset registerImage:lightPure withTraitCollection:lightCollection];
        [image.imageAsset registerImage:darkPure withTraitCollection:darkCollection];
        [image.imageAsset registerImage:lightPure withTraitCollection:unspecifiedCollection];
        return image;
    }
    else {
#endif
        TLThemeStyle style = [TLTheme sharedInstance].themeStyle;
        if (style == TLThemeStyleDark) {
            return darkImage;
        }
        return lightImage;
#if __IPHONE_13_0
    }
#endif
}

+ (UIImage *)imageWithLightName:(NSString *)lightName darkName:(NSString *)darkName
{
    UIImage *image = [self imageWithLight:[UIImage imageNamed:lightName] dark:[UIImage imageNamed:darkName]];
    return image;
}

@end


text:
It's your desktop concurrency buddy!

## Why?

Because I saw a need for a decent, technically-vetted reference sheet that would also look good laminated and hung on the wall.  And because, let's face it, those pictures of you at the beach just aren't cutting it any more.  You didn't even like that trip.

## What's it look like?

Here are some thumbnails (more to follow, as the document fleshes out):

![preview1](github/preview1.png)

## Where do I get it?

[Here!](https://raw.githubusercontent.com/alaska/golang-ref-sheet/master/golang-ref-sheet.pdf)

## Building your own

Requirements:
* LuaLaTex
* pygments
* pygments-style-solarized

### Getting LuaLaTex:

* OSX
  * Do not use brew. Well, you can try, but you can't (see below)
  * [MacTeX](https://tug.org/mactex/mactex-download.html) (large version)
* Ubuntu
  * `sudo apt-get install texlive-full` (should get everything you need, please file an issue if more is required or a smaller subset will still work)
* Windows
  * Still working on this one. Will almost certainly require a new build script, at the very least, unless you do it with cygwin. PRs VERY welcome, as this is currently low priority.

TeX and its variants are notoriously difficult to install from source. For example:

```
$ brew install tex
Error: No available formula with the name "tex"
Installing TeX from source is weird and gross, requires a lot of patches,
and only builds 32-bit (and thus can't use Homebrew deps on Snow Leopard.)

We recommend using a MacTeX distribution: https://www.tug.org/mactex/
```

So, that's where I recommend you get it, too.  And, in all honesty, MacTeX is a pretty solid bundle and likely to be adequate for all your tex-based needs. Seriously, you could publish academic papers from now to kingdom come with everything there, and the `Tex Live Utility` update manager and `TeXShop` editor aren't too shabby, either.

### Getting Pygments

`pip install pygments pygments-style-solarized` Easy-peasy.

Why am I using pygments instead of an all-tex solution like listings?  I originally did, actually. Give it a look see in the older versions.  It works okay, but it's honestly kind of a pain to get right and configure. In particular, I had difficulty with getting `othersymbols` to render consistently and, in the end, the `minted` package (which runs Pygments) was just easier to use, suported more options, and looked better.

### Running build.sh

* `$ ./build.sh`
  * Build the .pdf in `$TMPDIR` and copy it here when done
* `$ BUILD_DIR=~/somewhere/else ./build.sh`
  * Build the .pdf somewhere else, for some reason
* `$ ./build.sh -p /path/to/pdf/viewer`
  * Build the .pdf and preview it with your viewer of choice when it's done
* `$ ./build-sh -g`
  * Build the .pdf and re-generate the preview graphics for the github page (also requires ImageMagick, but we don't expect a lot of people to do this)

## Contributing

I think for now I'll only be accepting PRs to the .tex file itself so that I can vet that they render correctly. As new developers come on, some of them might be able to just push the .pdf and previews themselves.


text:
package net.sf.mmm.transaction.api;

import java.sql.Connection;

/**
 * This enum contains the available isolation-levels for a transaction as
 * defined by{@link Connection#getTransactionIsolation()}.
 *
 * @author Joerg Hohwiller (hohwille at users.sourceforge.net)
 */
public enum TransactionIsolationLevel {

  /**
   * @see Connection#TRANSACTION_NONE
   */
  NONE(Connection.TRANSACTION_NONE),

  /**
   * @see Connection#TRANSACTION_READ_UNCOMMITTED
   */
  READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),

  /**
   * @see Connection#TRANSACTION_READ_COMMITTED
   */
  READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED),

  /**
   * @see Connection#TRANSACTION_REPEATABLE_READ
   */
  REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ),

  /**
   * @see Connection#TRANSACTION_SERIALIZABLE
   */
  SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE);

  /** @see #getJdbcCode() */
  private final int jdbcCode;

  /**
   * The constructor.
   *
   * @param jdbcCode is the {@link #getJdbcCode() JDBC-Code}.
   */
  private TransactionIsolationLevel(int jdbcCode) {

    this.jdbcCode = jdbcCode;
  }

  /**
   * This method gets the JDBC-code according to this isolation-level as defined
   * by {@link Connection#getTransactionIsolation()}.
   *
   * @return the according JDBC-code.
   */
  public int getJdbcCode() {

    return this.jdbcCode;
  }

}


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

<title>SmsApiGateway</title>
<meta name="date" content="2021-03-02">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.ae.apps.lib.api.sms

Interface SmsApiGateway

All Known Implementing Classes:

AbstractSmsApiGateway, SmsApiGatewayImpl

public interface SmsApiGateway

A gateway which provides an abstraction over Android's SMS API
 Requires the permission android.permission.READ_SMS in the manifest

 Replacement for the SMSManager implementation from libAeApps up to version 3

Since:

4.0

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

long
getMessageCountForContact(java.lang.String uri,
                         java.lang.String contactId)

Returns the number of messages for the specified contact and URI

long
getMessageCountForUri(java.lang.String uri)

Returns the number of messages based on the URI requested

java.util.List<MessageInfo>
getMessagesForContact(java.lang.String uri,
                     java.lang.String contactId)

Returns the list of messages for the specified contact and URI

java.util.List<MessageInfo>
getMessagesForUri(java.lang.String uri)

Returns a list of SMS Messages based on the URI requested

Method Detail

getMessagesForUri

java.util.List<MessageInfo> getMessagesForUri(java.lang.String uri)

Returns a list of SMS Messages based on the URI requested

Parameters:

uri - The URI

Returns:

list of messages

getMessageCountForUri

long getMessageCountForUri(java.lang.String uri)

Returns the number of messages based on the URI requested

Parameters:

uri - the URI

Returns:

number of messages

getMessagesForContact

java.util.List<MessageInfo> getMessagesForContact(java.lang.String uri,
                                                  java.lang.String contactId)

Returns the list of messages for the specified contact and URI

Parameters:

uri - the uri

contactId - the contact id

Returns:

list of messages

getMessageCountForContact

long getMessageCountForContact(java.lang.String uri,
                               java.lang.String contactId)

Returns the number of messages for the specified contact and URI

Parameters:

uri - the uri

contactId - the contact id

Returns:

number of messages

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method