text:
A chrome new tab extension that displays a random word in another language and its translation

Download from the Chrome web store:
https://chrome.google.com/webstore/detail/word-of-the-tab/dfpekalnblaejelchmifjcphhlgpgmmo


text:
<?xml version="1.0" encoding="utf-8"?>
<org.buildmlearn.indickeyboard.CustomKeyboardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:andriod="http://schemas.android.com/apk/res-auto"
    android:id="@+id/keyboardview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:keyTextColor="@android:color/white"
    android:visibility="visible"
    android:keyTextSize="20.0sp"
    android:labelTextSize="20.0sp"
    android:keyBackground="@drawable/btn_keyboard_key_lxx_dark"

    android:background="@drawable/keyboard_background_lxx_dark"

    android:textStyle="bold"/>

redpajama_set_name: RedPajamaGithub


text:
using System.Collections.Generic;
using Thriot.Framework.Azure.DataAccess;
using Thriot.Framework.Azure.TableOperations;
using Thriot.Framework.Exceptions;
using Thriot.Objects.Model;
using Thriot.Objects.Model.Operations;
using Thriot.Objects.Operations.Azure.DataAccess;

namespace Thriot.Objects.Operations.Azure
{
    public class NetworkOperations : IPersistedNetworkOperations
    {
        private readonly ITableEntityOperation _tableEntityOperation;

        public NetworkOperations(ICloudStorageClientFactory cloudStorageClientFactory)
        {
            _tableEntityOperation = cloudStorageClientFactory.GetTableEntityOperation();
        }

        public Network Get(string id)
        {
            var networkKey = PartionKeyRowKeyPair.CreateFromIdentity(id);

            var networkRepository = new NetworkRepository(_tableEntityOperation);

            var networkTableEntity = networkRepository.Get(networkKey);

            if (networkTableEntity == null)
                throw new NotFoundException();

            return new Network
            {
                Id = id,
                ParentNetworkId = networkTableEntity.ParentNetworkId,
                ServiceId = networkTableEntity.ServiceId,
                CompanyId = networkTableEntity.CompanyId,
                TelemetryDataSinkSettings = networkTableEntity.TelemetryDataSinkSettings,
                NetworkKey = networkTableEntity.NetworkKey
            };
        }

        public IEnumerable<Small> ListDevices(string id)
        {
            var networkKey = PartionKeyRowKeyPair.CreateFromIdentity(id);
            var networkRepository = new GenericRepository<NetworkDevicesTableEntity>(_tableEntityOperation, "Network");

            var network = networkRepository.Get(networkKey);

            return network.Devices;
        }
    }
}


text:
(function(){

    var RentACarService = function($http, $q, $window, $location){

        var service = {};

        var locations = [
            "Zagreb",
            "Rijeka",
            "Split",
            "Dubrovnik"
        ];

        var types = [
            "Limousine",
            "Coupe",
            "Cabriolet"
        ];

        var cars = [
            {
                "id": 0,
                "make": "Audi",
                "model": "A8",
                "pricePerDay": 200,
                "class": "Premium",
                "isAutomatic": true,
                "img": ""
            },
            {
                "id": 1,
                "make": "Mercedes",
                "model": "C200",
                "pricePerDay": 50,
                "class": "Srednja",
                "isAutomatic": false,
                "img": ""
            },
            {
                "id": 2,
                "make": "VW",
                "model": "Passat CC",
                "pricePerDay": 80,
                "class": "Srednja",
                "isAutomatic": true,
                "img": ""
            },
            {
                "id": 3,
                "make": "Mazda",
                "model": "2",
                "pricePerDay": 30,
                "class": "Compact",
                "isAutomatic": false,
                "img": ""
            }
        ];

        var extras = [
            {
                "id": 0,
                "title": "Perk 1",
                "desc": "Perk 1 Desc",
                "price": 100
            },
            {
                "id": 1,
                "title": "Perk 2",
                "desc": "Perk 2 Desc",
                "price": 400
            },
            {
                "id": 2,
                "title": "Perk 3",
                "desc": "Perk 3 Desc",
                "price": 200
            },
            {
                "id": 3,
                "title": "Perk 4",
                "desc": "Perk 4 Desc",
                "price": 300
            }
        ];

        service.getTypes = function(){
            return types;
        };

        service.getClasses = function(){
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/classes'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getBranches = function(){
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/branches'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getCars = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/cars'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getExtras = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/extras'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getLocations = function () {
            return locations;
        };

        service.checkIfUserIsAuthenticated = function () {
            var defer = $q.defer();

            $http({
                method: 'GET',
                url:  '../../../api/authenticated'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getMakes = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/makes'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getFuels = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/fuels'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getCities = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/cities'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getColors = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/colors'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getModels = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/models'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getUserReservations = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../api/users/reservations'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.getReservations = function () {
            var defer = $q.defer();
            $http({
                method: 'GET',
                url:  '../../../admin/api/reservations'
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.confirmReservation = function (id) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../admin/api/reservations/confirm',
                data: {id: id}
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.carDelivered = function (id) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../admin/api/reservations/deliver',
                data: {id: id}
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.carReturned = function (id) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../admin/api/reservations/returned',
                data: {id: id}
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addMake = function (make) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/makes',
                data: {
                    'make': make.make,
                    'id': make.id
                }
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addFuel = function (fuel) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/fuels',
                data: fuel
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addExtra = function (extra) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/extras',
                data: extra
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addCity = function (city) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/cities',
                data: city
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.removeCity = function (id) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../admin/api/cities/remove',
                data: {id: id}
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addClass = function (type) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/classes',
                data: type
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addColor = function (color) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/colors',
                data: color
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addBranch = function (branch) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/branches',
                data: branch
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addModel = function (model) {
            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/models',
                data: model
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.addCar = function (car, file) {
            var fd = new FormData();
            fd.append('file', file);

            var obj = {
                "car": car,
                "fd": fd
            };

            var defer = $q.defer();
            $http({
                method: 'POST',
                url:  '../../../api/cars',
                data: obj
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.saveReservation = function (reservation) {
            var defer = $q.defer();

            $http({
                method: 'POST',
                url: '../api/reservation/save',
                data: reservation
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        service.sendEmail = function (email) {
            var defer = $q.defer();

            $http({
                method: 'POST',
                url: '../api/email/send',
                data: email
            }).then(function successCallback(response) {
                defer.resolve(response);
            }, function errorCallback(response) {

            });

            return defer.promise;
        };

        return service;
    };

    angular.module("rentACarApp")
        .service('RentACarService', ['$http', '$q', '$window', '$location', RentACarService]);

}());


text:
<html>
<head>
<script>
if (window.testRunner)
     testRunner.dumpEditingCallbacks();
</script>

<style>
body { margin: 0; padding: 0 }
</style>
<script type="text/javascript">
function step4()
{
    eventSender.mouseUp();
    testRunner.notifyDone();
}

function step3()
{
    eventSender.mouseDown();
    window.setTimeout(step4, 1);
}

function step2()
{
    eventSender.mouseUp();
    window.setTimeout(step3, 100);
}

function step1()
{
    eventSender.mouseDown();
    window.setTimeout(step2, 1);
}

function step0()
{
    eventSender.mouseMoveTo(50, 10);
    window.setTimeout(step1, 1);
}

onload = step0;
testRunner.waitUntilDone();
</script>
</head>
<body>
<pre>
Test.
Test.
</body>
</html>
<!-- http://bugzilla.opendarwin.org/show_bug.cgi?id=3739 - only testing for crashing, not the actual results. -->


text:
/* (c) 2012-2018, Ansible by Red Hat
 *
 * This file is part of Ansible Galaxy
 *
 * Ansible Galaxy is free software: you can redistribute it and/or modify
 * it under the terms of the Apache License as published by
 * the Apache Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * Ansible Galaxy is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Apache License for more details.
 *
 * You should have received a copy of the Apache License
 * along with Galaxy.  If not, see <http://www.apache.org/licenses/>.
 */

'use strict';

(function(angular) {

    var mod = angular.module('menuController', []);

    mod.controller('MenuCtrl', ['$scope', '$log', '$location', '$window', _controller]);

    function _controller($scope, $log, $location, $window) {
        $scope.redirectToSignin = _redirectToSignin;

        function _redirectToSignin() {
            var new_path = '/accounts/login/?next=' + encodeURIComponent('/list#' + $location.url());
            $log.debug('Set next to: ' + new_path);
            $window.location = new_path;
        }
    }

})(angular);


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

<TITLE>
QuestionCategoryImpl
</TITLE>

<META NAME="date" CONTENT="2011-06-10">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.google.code.linkedinapi.schema.xpp

Class QuestionCategoryImpl

java.lang.Object
  com.google.code.linkedinapi.schema.xpp.BaseSchemaEntity
      com.google.code.linkedinapi.schema.xpp.QuestionCategoryImpl

All Implemented Interfaces:
QuestionCategory, SchemaEntity, java.io.Serializable

public class QuestionCategoryImpl
extends BaseSchemaEntity
implements QuestionCategory

See Also:
Serialized Form

Constructor Summary

QuestionCategoryImpl()

Method Summary

 java.lang.String
getCode()

          Gets the value of the code property.

 java.lang.Long
getKey()

          Gets the value of the key property.

 java.lang.String
getName()

          Gets the value of the name property.

 void
init(org.xmlpull.v1.XmlPullParser parser)

          Inits the.

 void
setCode(java.lang.String value)

          Sets the value of the code property.

 void
setKey(java.lang.Long value)

          Sets the value of the key property.

 void
setName(java.lang.String value)

          Sets the value of the name property.

 void
toXml(org.xmlpull.v1.XmlSerializer serializer)

          To xml.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QuestionCategoryImpl

public QuestionCategoryImpl()

Method Detail

getCode

public java.lang.String getCode()

Description copied from interface: QuestionCategory

Gets the value of the code property.

Specified by:
getCode in interface QuestionCategory

Returns:
possible object is
     String

setCode

public void setCode(java.lang.String value)

Description copied from interface: QuestionCategory

Sets the value of the code property.

Specified by:
setCode in interface QuestionCategory

Parameters:
value - allowed object is
     String

getName

public java.lang.String getName()

Description copied from interface: QuestionCategory

Gets the value of the name property.

Specified by:
getName in interface QuestionCategory

Returns:
possible object is
     String

setName

public void setName(java.lang.String value)

Description copied from interface: QuestionCategory

Sets the value of the name property.

Specified by:
setName in interface QuestionCategory

Parameters:
value - allowed object is
     String

getKey

public java.lang.Long getKey()

Description copied from interface: QuestionCategory

Gets the value of the key property.

Specified by:
getKey in interface QuestionCategory

Returns:
possible object is
     String

setKey

public void setKey(java.lang.Long value)

Description copied from interface: QuestionCategory

Sets the value of the key property.

Specified by:
setKey in interface QuestionCategory

Parameters:
value - allowed object is
     String

init

public void init(org.xmlpull.v1.XmlPullParser parser)
          throws java.io.IOException,
                 org.xmlpull.v1.XmlPullParserException

Description copied from class: BaseSchemaEntity

Inits the.

Specified by:
init in class BaseSchemaEntity

Parameters:
parser - the element

Throws:

java.io.IOException - TODO

org.xmlpull.v1.XmlPullParserException - TODO

toXml

public void toXml(org.xmlpull.v1.XmlSerializer serializer)
           throws java.io.IOException

Description copied from class: BaseSchemaEntity

To xml.

Specified by:
toXml in class BaseSchemaEntity

Parameters:
serializer - the document

Throws:

java.io.IOException - TODO

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
namespace content {

AVDACodecImage::AVDACodecImage(
    const scoped_refptr<AVDASharedState>& shared_state,
    media::VideoCodecBridge* codec,
    const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder,
    const scoped_refptr<gfx::SurfaceTexture>& surface_texture)
    : shared_state_(shared_state),
      codec_buffer_index_(kInvalidCodecBufferIndex),
      media_codec_(codec),
      decoder_(decoder),
      surface_texture_(surface_texture),
      detach_surface_texture_on_destruction_(false),
      texture_(0) {
  // Default to a sane guess of "flip Y", just in case we can't get
  // the matrix on the first call.
  memset(gl_matrix_, 0, sizeof(gl_matrix_));
  gl_matrix_[0] = gl_matrix_[10] = gl_matrix_[15] = 1.0f;
  gl_matrix_[5] = -1.0f;
}

AVDACodecImage::~AVDACodecImage() {}

void AVDACodecImage::Destroy(bool have_context) {}

gfx::Size AVDACodecImage::GetSize() {
  return size_;
}

unsigned AVDACodecImage::GetInternalFormat() {
  return GL_RGBA;
}

bool AVDACodecImage::BindTexImage(unsigned target) {
  return false;
}

void AVDACodecImage::ReleaseTexImage(unsigned target) {}

bool AVDACodecImage::CopyTexImage(unsigned target) {
  if (!surface_texture_)
    return false;

  if (target != GL_TEXTURE_EXTERNAL_OES)
    return false;

  GLint bound_service_id = 0;
  glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &bound_service_id);
  // We insist that the currently bound texture is the right one.  We could
  // make a new glimage from a 2D image.
  if (bound_service_id != shared_state_->surface_texture_service_id())
    return false;

  // If the surface texture isn't attached yet, then attach it.  Note that this
  // will be to the texture in |shared_state_|, because of the checks above.
  if (!shared_state_->surface_texture_is_attached())
    AttachSurfaceTextureToContext();

  // Make sure that we have the right image in the front buffer.  Note that the
  // bound_service_id is guaranteed to be equal to the surface texture's client
  // texture id, so we can skip preserving it if the right context is current.
  UpdateSurfaceTexture(kDontRestoreBindings);

  // By setting image state to UNBOUND instead of COPIED we ensure that
  // CopyTexImage() is called each time the surface texture is used for drawing.
  // It would be nice if we could do this via asking for the currently bound
  // Texture, but the active unit never seems to change.
  texture_->SetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, 0, this,
                                       gpu::gles2::Texture::UNBOUND);

  return true;
}

bool AVDACodecImage::CopyTexSubImage(unsigned target,
                                     const gfx::Point& offset,
                                     const gfx::Rect& rect) {
  return false;
}

bool AVDACodecImage::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
                                          int z_order,
                                          gfx::OverlayTransform transform,
                                          const gfx::Rect& bounds_rect,
                                          const gfx::RectF& crop_rect) {
  // This should only be called when we're rendering to a SurfaceView.
  if (surface_texture_) {
    DVLOG(1) << "Invalid call to ScheduleOverlayPlane; this image is "
                "SurfaceTexture backed.";
    return false;
  }

  if (codec_buffer_index_ != kInvalidCodecBufferIndex) {
    media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true);
    codec_buffer_index_ = kInvalidCodecBufferIndex;
  }
  return true;
}

void AVDACodecImage::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
                                  uint64_t process_tracing_id,
                                  const std::string& dump_name) {}

void AVDACodecImage::UpdateSurfaceTexture(RestoreBindingsMode mode) {
  DCHECK(surface_texture_);

  // Render via the media codec if needed.
  if (!IsCodecBufferOutstanding())
    return;

  // The decoder buffer is still pending.
  // This must be synchronous, so wait for OnFrameAvailable.
  media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true);
  {
    SCOPED_UMA_HISTOGRAM_TIMER("Media.AvdaCodecImage.WaitTimeForFrame");
    shared_state_->WaitForFrameAvailable();
  }

  // Don't bother to check if we're rendered again.
  codec_buffer_index_ = kInvalidCodecBufferIndex;

  // Swap the rendered image to the front.
  scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current = MakeCurrentIfNeeded();

  // If we changed contexts, then we always want to restore it, since the caller
  // doesn't know that we're switching contexts.
  if (scoped_make_current)
    mode = kDoRestoreBindings;

  // Save the current binding if requested.
  GLint bound_service_id = 0;
  if (mode == kDoRestoreBindings)
    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &bound_service_id);

  surface_texture_->UpdateTexImage();
  if (mode == kDoRestoreBindings)
    glBindTexture(GL_TEXTURE_EXTERNAL_OES, bound_service_id);

  // Helpfully, this is already column major.
  surface_texture_->GetTransformMatrix(gl_matrix_);
}

void AVDACodecImage::SetMediaCodecBufferIndex(int buffer_index) {
  codec_buffer_index_ = buffer_index;
}

int AVDACodecImage::GetMediaCodecBufferIndex() const {
  return codec_buffer_index_;
}

void AVDACodecImage::SetSize(const gfx::Size& size) {
  size_ = size;
}

void AVDACodecImage::SetMediaCodec(media::MediaCodecBridge* codec) {
  media_codec_ = codec;
}

void AVDACodecImage::SetTexture(gpu::gles2::Texture* texture) {
  texture_ = texture;
}

void AVDACodecImage::AttachSurfaceTextureToContext() {
  DCHECK(surface_texture_);

  // We assume that the currently bound texture is the intended one.

  // Attach the surface texture to the first context we're bound on, so that
  // no context switch is needed later.
  glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

  // The surface texture is already detached, so just attach it.
  // We could do this earlier, but SurfaceTexture has context affinity, and we
  // don't want to require a context switch.
  surface_texture_->AttachToGLContext();
  shared_state_->DidAttachSurfaceTexture();
}

scoped_ptr<ui::ScopedMakeCurrent> AVDACodecImage::MakeCurrentIfNeeded() {
  DCHECK(shared_state_->context());
  scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
  if (!shared_state_->context()->IsCurrent(NULL)) {
    scoped_make_current.reset(new ui::ScopedMakeCurrent(
        shared_state_->context(), shared_state_->surface()));
  }

  return scoped_make_current;
}

void AVDACodecImage::GetTextureMatrix(float matrix[16]) {
  if (IsCodecBufferOutstanding() && shared_state_ && surface_texture_) {
    // Our current matrix may be stale.  Update it if possible.
    if (!shared_state_->surface_texture_is_attached()) {
      // Don't attach the surface texture permanently.  Perhaps we should
      // just attach the surface texture in avda and be done with it.
      GLuint service_id = 0;
      glGenTextures(1, &service_id);
      GLint bound_service_id = 0;
      glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &bound_service_id);
      glBindTexture(GL_TEXTURE_EXTERNAL_OES, service_id);
      AttachSurfaceTextureToContext();
      UpdateSurfaceTexture(kDontRestoreBindings);
      // Detach the surface texture, which deletes the generated texture.
      surface_texture_->DetachFromGLContext();
      shared_state_->DidDetachSurfaceTexture();
      glBindTexture(GL_TEXTURE_EXTERNAL_OES, bound_service_id);
    } else {
      // Surface texture is already attached, so just update it.
      UpdateSurfaceTexture(kDoRestoreBindings);
    }
  }

  memcpy(matrix, gl_matrix_, sizeof(gl_matrix_));
}

bool AVDACodecImage::IsCodecBufferOutstanding() const {
  return codec_buffer_index_ != kInvalidCodecBufferIndex && media_codec_;
}

}  // namespace content


text:
.class public Lcom/payu/android/sdk/payment/AuthorizationService;
.super Ljava/lang/Object;

# instance fields
.field private a:Lcom/payu/android/sdk/internal/dn;

.field private b:Landroid/content/Context;

# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/payu/android/sdk/payment/configuration/ConfigurationDataProvider;Lcom/payu/android/sdk/internal/p;)V
    .locals 4

    .line 152
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 153
    iput-object p1, p0, Lcom/payu/android/sdk/payment/AuthorizationService;->b:Landroid/content/Context;

    .line 154
    invoke-virtual {p3}, Lcom/payu/android/sdk/internal/p;->a()V

    .line 155
    invoke-interface {p2}, Lcom/payu/android/sdk/payment/configuration/ConfigurationDataProvider;->getLocale()Lcom/payu/android/sdk/payment/configuration/Locale;

    move-result-object v0

    invoke-static {v0}, Lcom/payu/android/sdk/internal/translation/TranslationFactory;->forceTranslation(Lcom/payu/android/sdk/payment/configuration/Locale;)V

    .line 156
    invoke-static {p2}, Lcom/payu/android/sdk/internal/configuration/ConfigurationDataProviderHolder;->setInstance(Lcom/payu/android/sdk/payment/configuration/ConfigurationDataProvider;)V

    .line 157
    new-instance v0, Lcom/payu/android/sdk/internal/dn;

    new-instance v1, Lcom/payu/android/sdk/internal/af;

    new-instance v2, Lcom/payu/android/sdk/internal/kb;

    invoke-direct {v2}, Lcom/payu/android/sdk/internal/kb;-><init>()V

    .line 158
    invoke-static {}, Lcom/payu/android/sdk/internal/kb;->a()Lcom/payu/android/sdk/internal/bf;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/payu/android/sdk/internal/af;-><init>(Lcom/payu/android/sdk/internal/bf;)V

    .line 159
    invoke-static {p1}, Lcom/payu/android/sdk/internal/fh;->a(Landroid/content/Context;)Lcom/payu/android/sdk/internal/fh;

    move-result-object v2

    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    invoke-direct {v0, v1, v2, v3}, Lcom/payu/android/sdk/internal/dn;-><init>(Lcom/payu/android/sdk/internal/af;Lcom/payu/android/sdk/internal/fh;Landroid/content/pm/PackageManager;)V

    iput-object v0, p0, Lcom/payu/android/sdk/payment/AuthorizationService;->a:Lcom/payu/android/sdk/internal/dn;

    .line 161
    return-void
.end method

.method public static createInstance(Landroid/content/Context;)Lcom/payu/android/sdk/payment/AuthorizationService;
    .locals 5

    .line 164
    const-string v0, "Non null context must be provided"

    invoke-static {p0, v0}, Lcom/payu/android/sdk/internal/sx;->a(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 165
    new-instance v4, Lcom/payu/android/sdk/internal/fn;

    invoke-direct {v4, p0}, Lcom/payu/android/sdk/internal/fn;-><init>(Landroid/content/Context;)V

    .line 166
    new-instance v0, Lcom/payu/android/sdk/internal/u;

    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-direct {v0, v1, v4}, Lcom/payu/android/sdk/internal/u;-><init>(Landroid/content/res/Resources;Lcom/payu/android/sdk/internal/fn;)V

    move-object v4, v0

    .line 167
    new-instance v0, Lcom/payu/android/sdk/payment/AuthorizationService;

    new-instance v1, Lcom/payu/android/sdk/internal/p;

    new-instance v2, Lcom/payu/android/sdk/internal/kh;

    invoke-direct {v2, p0}, Lcom/payu/android/sdk/internal/kh;-><init>(Landroid/content/Context;)V

    new-instance v3, Lcom/payu/android/sdk/internal/o;

    invoke-direct {v3}, Lcom/payu/android/sdk/internal/o;-><init>()V

    invoke-direct {v1, v2, v3}, Lcom/payu/android/sdk/internal/p;-><init>(Lcom/payu/android/sdk/internal/kh;Lcom/payu/android/sdk/internal/q;)V

    invoke-direct {v0, p0, v4, v1}, Lcom/payu/android/sdk/payment/AuthorizationService;-><init>(Landroid/content/Context;Lcom/payu/android/sdk/payment/configuration/ConfigurationDataProvider;Lcom/payu/android/sdk/internal/p;)V

    return-object v0
.end method

# virtual methods
.method public continuePayment(Lcom/payu/android/sdk/payment/model/OrderPaymentResult;)V
    .locals 5

    .line 172
    if-eqz p1, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    const-string v1, "Order payment result must be provided."

    invoke-static {v0, v1}, Lcom/payu/android/sdk/internal/sx;->a(ZLjava/lang/Object;)V

    .line 173
    iget-object v3, p0, Lcom/payu/android/sdk/payment/AuthorizationService;->a:Lcom/payu/android/sdk/internal/dn;

    invoke-virtual {p1}, Lcom/payu/android/sdk/payment/model/OrderPaymentResult;->getAuthorization()Lcom/payu/android/sdk/payment/model/OrderPaymentResult$PaymentAuthorization;

    move-result-object v4

    const-string v0, "paymentAuthorization must be set"

    invoke-static {v4, v0}, Lcom/payu/android/sdk/internal/sx;->a(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    sget-object v0, Lcom/payu/android/sdk/payment/model/OrderPaymentResult$PaymentAuthorization;->NOT_REQUIRED:Lcom/payu/android/sdk/payment/model/OrderPaymentResult$PaymentAuthorization;

    invoke-virtual {v0, v4}, Lcom/payu/android/sdk/payment/model/OrderPaymentResult$PaymentAuthorization;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Lcom/payu/android/sdk/internal/do;

    iget-object v1, v3, Lcom/payu/android/sdk/internal/dn;->c:Lcom/payu/android/sdk/internal/af;

    iget-object v2, v3, Lcom/payu/android/sdk/internal/dn;->a:Lcom/payu/android/sdk/internal/fh;

    invoke-direct {v0, v1, v2}, Lcom/payu/android/sdk/internal/do;-><init>(Lcom/payu/android/sdk/internal/af;Lcom/payu/android/sdk/internal/fh;)V

    goto :goto_1

    :cond_1
    new-instance v0, Lcom/payu/android/sdk/internal/dp;

    iget-object v1, v3, Lcom/payu/android/sdk/internal/dn;->b:Landroid/content/pm/PackageManager;

    invoke-direct {v0, v1}, Lcom/payu/android/sdk/internal/dp;-><init>(Landroid/content/pm/PackageManager;)V

    :goto_1
    iget-object v1, p0, Lcom/payu/android/sdk/payment/AuthorizationService;->b:Landroid/content/Context;

    invoke-interface {v0, v1, p1}, Lcom/payu/android/sdk/internal/dm;->a(Landroid/content/Context;Lcom/payu/android/sdk/payment/model/OrderPaymentResult;)V

    .line 174
    return-void
.end method

.method public getApplicationDetector()Lcom/payu/android/sdk/payment/application/PayuApplicationDetector;
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 178
    new-instance v0, Lcom/payu/android/sdk/payment/application/PayuApplicationDetector;

    invoke-direct {v0}, Lcom/payu/android/sdk/payment/application/PayuApplicationDetector;-><init>()V

    return-object v0
.end method


text:
<?php
class Rsvacl_Bootstrap extends Zend_Application_Module_Bootstrap
{

}


text:
import {
  didRender,
  get,
  getCurrentTracker,
  set,
  setCurrentTracker,
  tagFor,
  tagForProperty,
  watchKey,
} from '@ember/-internals/metal';
import { isProxy, symbol } from '@ember/-internals/utils';
import { EMBER_METAL_TRACKED_PROPERTIES } from '@ember/canary-features';
import { DEBUG } from '@glimmer/env';
import { Opaque } from '@glimmer/interfaces';
import {
  combine,
  CONSTANT_TAG,
  ConstReference,
  DirtyableTag,
  isConst,
  Revision,
  RevisionTag,
  Tag,
  TagWrapper,
  UpdatableTag,
  VersionedPathReference,
  VersionedReference,
} from '@glimmer/reference';
import {
  CapturedArguments,
  ConditionalReference as GlimmerConditionalReference,
  PrimitiveReference,
} from '@glimmer/runtime';
import { Option } from '@glimmer/util';
import { HelperFunction, HelperInstance, RECOMPUTE_TAG } from '../helper';
import emberToBool from './to-bool';

export const UPDATE = symbol('UPDATE');
export const INVOKE = symbol('INVOKE');
export const ACTION = symbol('ACTION');

let maybeFreeze: (obj: any) => void;
if (DEBUG) {
  // gaurding this in a DEBUG gaurd (as well as all invocations)
  // so that it is properly stripped during the minification's
  // dead code elimination
  maybeFreeze = (obj: any) => {
    // re-freezing an already frozen object introduces a significant
    // performance penalty on Chrome (tested through 59).
    //
    // See: https://bugs.chromium.org/p/v8/issues/detail?id=6450
    if (!Object.isFrozen(obj)) {
      Object.freeze(obj);
    }
  };
}

abstract class EmberPathReference implements VersionedPathReference<Opaque> {
  abstract tag: Tag;

  get(key: string): any {
    return PropertyReference.create(this, key);
  }

  abstract value(): Opaque;
}

export abstract class CachedReference extends EmberPathReference {
  abstract tag: Tag;
  private _lastRevision: Option<Revision>;
  private _lastValue: Opaque;

  constructor() {
    super();
    this._lastRevision = null;
    this._lastValue = null;
  }

  abstract compute(): Opaque;

  value() {
    let { tag, _lastRevision, _lastValue } = this;

    if (_lastRevision === null || !tag.validate(_lastRevision)) {
      _lastValue = this._lastValue = this.compute();
      this._lastRevision = tag.value();
    }

    return _lastValue;
  }
}

export class RootReference<T> extends ConstReference<T> {
  public children: any;

  constructor(value: T) {
    super(value);
    this.children = Object.create(null);
  }

  get(propertyKey: string) {
    let ref = this.children[propertyKey];

    if (ref === undefined) {
      ref = this.children[propertyKey] = new RootPropertyReference(this.inner, propertyKey);
    }

    return ref;
  }
}

interface TwoWayFlushDetectionTag extends RevisionTag {
  didCompute(parent: Opaque): void;
}

let TwoWayFlushDetectionTag: {
  new (tag: Tag, key: string, ref: VersionedPathReference<Opaque>): TwoWayFlushDetectionTag;
  create(
    tag: Tag,
    key: string,
    ref: VersionedPathReference<Opaque>
  ): TagWrapper<TwoWayFlushDetectionTag>;
};

if (DEBUG) {
  TwoWayFlushDetectionTag = class {
    public tag: Tag;
    public parent: Opaque;
    public key: string;
    public ref: any;

    static create(
      tag: Tag,
      key: string,
      ref: VersionedPathReference<Opaque>
    ): TagWrapper<TwoWayFlushDetectionTag> {
      return new TagWrapper((tag as any).type, new TwoWayFlushDetectionTag(tag, key, ref));
    }

    constructor(tag: Tag, key: string, ref: any) {
      this.tag = tag;
      this.parent = null;
      this.key = key;
      this.ref = ref;
    }

    value() {
      return this.tag.value();
    }

    validate(ticket: any) {
      let { parent, key } = this;

      let isValid = this.tag.validate(ticket);

      if (isValid && parent) {
        didRender(parent, key, this.ref);
      }

      return isValid;
    }

    didCompute(parent: any) {
      this.parent = parent;
      didRender(parent, this.key, this.ref);
    }
  };
}

export abstract class PropertyReference extends CachedReference {
  abstract tag: Tag;

  static create(parentReference: VersionedPathReference<Opaque>, propertyKey: string) {
    if (isConst(parentReference)) {
      return new RootPropertyReference(parentReference.value(), propertyKey);
    } else {
      return new NestedPropertyReference(parentReference, propertyKey);
    }
  }

  get(key: string): VersionedPathReference<Opaque> {
    return new NestedPropertyReference(this, key);
  }
}

export class RootPropertyReference extends PropertyReference
  implements VersionedPathReference<Opaque> {
  public tag: Tag;
  private _parentValue: any;
  private _propertyKey: string;
  private _propertyTag: TagWrapper<UpdatableTag>;

  constructor(parentValue: any, propertyKey: string) {
    super();

    this._parentValue = parentValue;
    this._propertyKey = propertyKey;

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      this._propertyTag = UpdatableTag.create(CONSTANT_TAG);
    } else {
      this._propertyTag = UpdatableTag.create(tagForProperty(parentValue, propertyKey));
    }

    if (DEBUG) {
      this.tag = TwoWayFlushDetectionTag.create(this._propertyTag, propertyKey, this);
    } else {
      this.tag = this._propertyTag;
    }

    if (DEBUG) {
      watchKey(parentValue, propertyKey);
    }
  }

  compute() {
    let { _parentValue, _propertyKey } = this;

    if (DEBUG) {
      (this.tag.inner as TwoWayFlushDetectionTag).didCompute(_parentValue);
    }

    let parent: any;
    let tracker: any;

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      parent = getCurrentTracker();
      tracker = setCurrentTracker();
    }

    let ret = get(_parentValue, _propertyKey);

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      setCurrentTracker(parent!);
      let tag = tracker!.combine();
      if (parent) parent.add(tag);

      this._propertyTag.inner.update(tag);
    }

    return ret;
  }

  [UPDATE](value: any) {
    set(this._parentValue, this._propertyKey, value);
  }
}

export class NestedPropertyReference extends PropertyReference {
  public tag: Tag;
  private _parentReference: any;
  private _propertyTag: TagWrapper<UpdatableTag>;
  private _propertyKey: string;

  constructor(parentReference: VersionedPathReference<Opaque>, propertyKey: string) {
    super();

    let parentReferenceTag = parentReference.tag;
    let propertyTag = UpdatableTag.create(CONSTANT_TAG);

    this._parentReference = parentReference;
    this._propertyTag = propertyTag;
    this._propertyKey = propertyKey;

    if (DEBUG) {
      let tag = combine([parentReferenceTag, propertyTag]);
      this.tag = TwoWayFlushDetectionTag.create(tag, propertyKey, this);
    } else {
      this.tag = combine([parentReferenceTag, propertyTag]);
    }
  }

  compute() {
    let { _parentReference, _propertyTag, _propertyKey } = this;

    let parentValue = _parentReference.value();
    let parentValueType = typeof parentValue;

    if (parentValueType === 'string' && _propertyKey === 'length') {
      return parentValue.length;
    }

    if ((parentValueType === 'object' && parentValue !== null) || parentValueType === 'function') {
      if (DEBUG) {
        watchKey(parentValue, _propertyKey);
      }

      if (DEBUG) {
        (this.tag.inner as TwoWayFlushDetectionTag).didCompute(parentValue);
      }

      let parent: any;
      let tracker: any;

      if (EMBER_METAL_TRACKED_PROPERTIES) {
        parent = getCurrentTracker();
        tracker = setCurrentTracker();
      }

      let ret = get(parentValue, _propertyKey);

      if (EMBER_METAL_TRACKED_PROPERTIES) {
        setCurrentTracker(parent!);
        let tag = tracker!.combine();
        if (parent) parent.add(tag);

        _propertyTag.inner.update(tag);
      } else {
        _propertyTag.inner.update(tagForProperty(parentValue, _propertyKey));
      }

      return ret;
    } else {
      return undefined;
    }
  }

  [UPDATE](value: any) {
    let parent = this._parentReference.value();
    set(parent, this._propertyKey, value);
  }
}

export class UpdatableReference extends EmberPathReference {
  public tag: TagWrapper<DirtyableTag>;
  private _value: any;

  constructor(value: any) {
    super();

    this.tag = DirtyableTag.create();
    this._value = value;
  }

  value() {
    return this._value;
  }

  update(value: any) {
    let { _value } = this;

    if (value !== _value) {
      this.tag.inner.dirty();
      this._value = value;
    }
  }
}

export class ConditionalReference extends GlimmerConditionalReference
  implements VersionedReference<boolean> {
  public objectTag: TagWrapper<UpdatableTag>;
  static create(reference: VersionedReference<Opaque>): VersionedReference<boolean> {
    if (isConst(reference)) {
      let value = reference.value();

      if (isProxy(value)) {
        return new RootPropertyReference(value, 'isTruthy') as VersionedReference<any>;
      } else {
        return PrimitiveReference.create(emberToBool(value));
      }
    }

    return new ConditionalReference(reference);
  }

  constructor(reference: VersionedReference<Opaque>) {
    super(reference);
    this.objectTag = UpdatableTag.create(CONSTANT_TAG);
    this.tag = combine([reference.tag, this.objectTag]);
  }

  toBool(predicate: Opaque) {
    if (isProxy(predicate)) {
      this.objectTag.inner.update(tagForProperty(predicate, 'isTruthy'));
      return get(predicate as object, 'isTruthy');
    } else {
      this.objectTag.inner.update(tagFor(predicate));
      return emberToBool(predicate);
    }
  }
}

export class SimpleHelperReference extends CachedReference {
  public tag: Tag;
  public helper: HelperFunction;
  public args: CapturedArguments;

  static create(helper: HelperFunction, args: CapturedArguments) {
    if (isConst(args)) {
      let { positional, named } = args;

      let positionalValue = positional.value();
      let namedValue = named.value();

      if (DEBUG) {
        maybeFreeze(positionalValue);
        maybeFreeze(namedValue);
      }

      let result = helper(positionalValue, namedValue);
      return valueToRef(result);
    } else {
      return new SimpleHelperReference(helper, args);
    }
  }

  constructor(helper: HelperFunction, args: CapturedArguments) {
    super();

    this.tag = args.tag;
    this.helper = helper;
    this.args = args;
  }

  compute() {
    let {
      helper,
      args: { positional, named },
    } = this;

    let positionalValue = positional.value();
    let namedValue = named.value();

    if (DEBUG) {
      maybeFreeze(positionalValue);
      maybeFreeze(namedValue);
    }

    return helper(positionalValue, namedValue);
  }
}

export class ClassBasedHelperReference extends CachedReference {
  public tag: Tag;
  public instance: HelperInstance;
  public args: CapturedArguments;

  static create(instance: HelperInstance, args: CapturedArguments) {
    return new ClassBasedHelperReference(instance, args);
  }

  constructor(instance: HelperInstance, args: CapturedArguments) {
    super();

    this.tag = combine([instance[RECOMPUTE_TAG], args.tag]);
    this.instance = instance;
    this.args = args;
  }

  compute() {
    let {
      instance,
      args: { positional, named },
    } = this;

    let positionalValue = positional.value();
    let namedValue = named.value();

    if (DEBUG) {
      maybeFreeze(positionalValue);
      maybeFreeze(namedValue);
    }

    return instance.compute(positionalValue, namedValue);
  }
}

export class InternalHelperReference extends CachedReference {
  public tag: Tag;
  public helper: (args: CapturedArguments) => CapturedArguments;
  public args: any;

  constructor(helper: (args: CapturedArguments) => any, args: CapturedArguments) {
    super();

    this.tag = args.tag;
    this.helper = helper;
    this.args = args;
  }

  compute() {
    let { helper, args } = this;
    return helper(args);
  }
}

export class UnboundReference<T> extends ConstReference<T> {
  static create<T>(value: T): VersionedPathReference<T> {
    return valueToRef(value, false);
  }

  get(key: string) {
    return valueToRef(get(this.inner as any, key), false);
  }
}

export class ReadonlyReference extends CachedReference {
  constructor(private inner: VersionedPathReference<Opaque>) {
    super();
  }

  get tag() {
    return this.inner.tag;
  }

  get [INVOKE]() {
    return this.inner[INVOKE];
  }

  compute() {
    return this.inner.value();
  }

  get(key: string) {
    return this.inner.get(key);
  }
}

export function referenceFromParts(
  root: VersionedPathReference<Opaque>,
  parts: string[]
): VersionedPathReference<Opaque> {
  let reference = root;

  for (let i = 0; i < parts.length; i++) {
    reference = reference.get(parts[i]);
  }

  return reference;
}

export function valueToRef<T = Opaque>(value: T, bound = true): VersionedPathReference<T> {
  if (value !== null && typeof value === 'object') {
    // root of interop with ember objects
    return bound ? new RootReference(value) : new UnboundReference(value);
  }
  // ember doesn't do observing with functions
  if (typeof value === 'function') {
    return new UnboundReference(value);
  }
  return PrimitiveReference.create(value);
}


text:
@startDocuBlock put_api_simple_update_by_example
@brief partially updates the body of all documents of a collection that match an example

@RESTHEADER{PUT /_api/simple/update-by-example, Update documents by example}

@HINTS
{% hint 'warning' %}
This route should no longer be used.
All endpoints for Simple Queries are deprecated from version 3.4.0 on.
They are superseded by AQL queries.
{% endhint %}

@RESTBODYPARAM{collection,string,required,string}
The name of the collection to update within.

@RESTBODYPARAM{example,string,required,string}
An example document that all collection documents are compared against.

@RESTBODYPARAM{newValue,object,required,}
A document containing all the attributes to update in the found documents.

@RESTBODYPARAM{options,object,optional,put_api_simple_update_by_example_options}
a json object which can contains following attributes:

@RESTSTRUCT{keepNull,put_api_simple_update_by_example_options,boolean,optional,}
This parameter can be used to modify the behavior when
handling *null* values. Normally, *null* values are stored in the
database. By setting the *keepNull* parameter to *false*, this
behavior can be changed so that all attributes in *data* with *null*
values will be removed from the updated document.

@RESTSTRUCT{waitForSync,put_api_simple_update_by_example_options,boolean,optional,}
if set to true, then all removal operations will
instantly be synchronized to disk. If this is not specified, then the
collection's default sync behavior will be applied.

@RESTSTRUCT{limit,put_api_simple_update_by_example_options,integer,optional,int64}
an optional value that determines how many documents to
update at most. If *limit* is specified but is less than the number
of documents in the collection, it is undefined which of the documents
will be updated.

@RESTSTRUCT{mergeObjects,put_api_simple_update_by_example_options,boolean,optional,}
Controls whether objects (not arrays) will be merged if present in both the
existing and the patch document. If set to false, the value in the
patch document will overwrite the existing document's value. If set to
true, objects will be merged. The default is true.

@RESTDESCRIPTION

This will find all documents in the collection that match the specified
example object, and partially update the document body with the new value
specified. Note that document meta-attributes such as *_id*, *_key*,
*_from*, *_to* etc. cannot be replaced.

Note: the *limit* attribute is not supported on sharded collections.
Using it will result in an error.

Returns the number of documents that were updated.

@RESTRETURNCODES

@RESTRETURNCODE{200}
is returned if the collection was updated successfully and *waitForSync* was
*true*.

@RESTRETURNCODE{400}
is returned if the body does not contain a valid JSON representation of a
query. The response body contains an error document in this case.

@RESTRETURNCODE{404}
is returned if the collection specified by *collection* is unknown.  The
response body contains an error document in this case.

@EXAMPLES

using old syntax for options

@EXAMPLE_ARANGOSH_RUN{RestSimpleUpdateByExample}
    var cn = "products";
    db._drop(cn);
    var products = db._create(cn);
    products.save({ "a": { "k": 1, "j": 1 }, "i": 1});
    products.save({ "a": { "j": 1 }, "i": 1});
    products.save({ "i": 1});
    products.save({ "a": { "k": 2, "j": 2 }, "i": 1});
    var url = "/_api/simple/update-by-example";
    var body = {
      "collection": "products",
      "example" : { "a" : { "j" : 1 } },
      "newValue" : { "a" : { "j" : 22 } },
      "limit" : 3
    };

    var response = logCurlRequest('PUT', url, body);

    assert(response.code === 200);

    logJsonResponse(response);
    db._drop(cn);
@END_EXAMPLE_ARANGOSH_RUN

using new signature for options

@EXAMPLE_ARANGOSH_RUN{RestSimpleUpdateByExample_1}
    var cn = "products";
    db._drop(cn);
    var products = db._create(cn);
    products.save({ "a": { "k": 1, "j": 1 }, "i": 1});
    products.save({ "a": { "j": 1 }, "i": 1});
    products.save({ "i": 1});
    products.save({ "a": { "k": 2, "j": 2 }, "i": 1});
    var url = "/_api/simple/update-by-example";
    var body = {
      "collection": "products",
      "example" : { "a" : { "j" : 1 } },
      "newValue" : { "a" : { "j" : 22 } },
      "options" :  { "limit" : 3, "waitForSync": true }
    };

    var response = logCurlRequest('PUT', url, body);

    assert(response.code === 200);

    logJsonResponse(response);
    db._drop(cn);
@END_EXAMPLE_ARANGOSH_RUN
@endDocuBlock


text:
=pod

=head1 NAME

ASN1_STRING_dup, ASN1_STRING_cmp, ASN1_STRING_set, ASN1_STRING_length,
ASN1_STRING_type, ASN1_STRING_get0_data, ASN1_STRING_data,
ASN1_STRING_to_UTF8 - ASN1_STRING utility functions

=head1 SYNOPSIS

 #include <openssl/asn1.h>

 int ASN1_STRING_length(ASN1_STRING *x);
 const unsigned char * ASN1_STRING_get0_data(const ASN1_STRING *x);
 unsigned char * ASN1_STRING_data(ASN1_STRING *x);

 ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a);

 int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b);

 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);

 int ASN1_STRING_type(const ASN1_STRING *x);

 int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);

=head1 DESCRIPTION

These functions allow an B<ASN1_STRING> structure to be manipulated.

ASN1_STRING_length() returns the length of the content of B<x>.

ASN1_STRING_get0_data() returns an internal pointer to the data of B<x>.
Since this is an internal pointer it should B<not> be freed or
modified in any way.

ASN1_STRING_data() is similar to ASN1_STRING_get0_data() except the
returned value is not constant. This function is deprecated:
applications should use ASN1_STRING_get0_data() instead.

ASN1_STRING_dup() returns a copy of the structure B<a>.

ASN1_STRING_cmp() compares B<a> and B<b> returning 0 if the two
are identical. The string types and content are compared.

ASN1_STRING_set() sets the data of string B<str> to the buffer
B<data> or length B<len>. The supplied data is copied. If B<len>
is -1 then the length is determined by strlen(data).

ASN1_STRING_type() returns the type of B<x>, using standard constants
such as B<V_ASN1_OCTET_STRING>.

ASN1_STRING_to_UTF8() converts the string B<in> to UTF8 format, the
converted data is allocated in a buffer in B<*out>. The length of
B<out> is returned or a negative error code. The buffer B<*out>
should be freed using OPENSSL_free().

=head1 NOTES

Almost all ASN1 types in OpenSSL are represented as an B<ASN1_STRING>
structure. Other types such as B<ASN1_OCTET_STRING> are simply typedef'ed
to B<ASN1_STRING> and the functions call the B<ASN1_STRING> equivalents.
B<ASN1_STRING> is also used for some B<CHOICE> types which consist
entirely of primitive string types such as B<DirectoryString> and
B<Time>.

These functions should B<not> be used to examine or modify B<ASN1_INTEGER>
or B<ASN1_ENUMERATED> types: the relevant B<INTEGER> or B<ENUMERATED>
utility functions should be used instead.

In general it cannot be assumed that the data returned by ASN1_STRING_data()
is null terminated or does not contain embedded nulls. The actual format
of the data will depend on the actual string type itself: for example
for an IA5String the data will be ASCII, for a BMPString two bytes per
character in big endian format, and for an UTF8String it will be in UTF8 format.

Similar care should be take to ensure the data is in the correct format
when calling ASN1_STRING_set().

=head1 RETURN VALUES

ASN1_STRING_length() returns the length of the content of B<x>.

ASN1_STRING_get0_data() and ASN1_STRING_data() return an internal pointer to
the data of B<x>.

ASN1_STRING_dup() returns a valid B<ASN1_STRING> structure or B<NULL> if an
error occurred.

ASN1_STRING_cmp() returns an integer greater than, equal to, or less than 0,
according to whether B<a> is greater than, equal to, or less than B<b>.

ASN1_STRING_set() returns 1 on success or 0 on error.

ASN1_STRING_type() returns the type of B<x>.

ASN1_STRING_to_UTF8() returns the number of bytes in output string B<out> or a
negative value if an error occurred.

=head1 SEE ALSO

L<ERR_get_error(3)>

=head1 COPYRIGHT

Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


text:
package com.mainmethod.premofm.ui.view;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;

import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import com.mainmethod.premofm.ScriptC_dim;

import java.lang.ref.WeakReference;

public class BlurTransformation extends BitmapTransformation {

    private static int MAX_RADIUS = 25;
    private static int DEFAULT_DOWN_SAMPLING = 1;

    private WeakReference<Context> mContext;

    private int mRadius = MAX_RADIUS;
    private int mSampling = DEFAULT_DOWN_SAMPLING;

    public BlurTransformation(Context context) {
        super(context);
        mContext = new WeakReference<>(context);
    }

    @Override
    protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
        int width = toTransform.getWidth();
        int height = toTransform.getHeight();
        int scaledWidth = width / mSampling;
        int scaledHeight = height / mSampling;

        Bitmap bitmap = pool.get(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
        if (bitmap == null) {
            bitmap = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
        }

        Canvas canvas = new Canvas(bitmap);
        canvas.scale(1 / (float) mSampling, 1 / (float) mSampling);
        Paint paint = new Paint();
        paint.setFlags(Paint.FILTER_BITMAP_FLAG);
        canvas.drawBitmap(toTransform, 0, 0, paint);

        RenderScript rs = RenderScript.create(mContext.get());
        Allocation input = Allocation.createFromBitmap(rs, bitmap,
                Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT);
        Allocation output = Allocation.createTyped(rs, input.getType());
        Allocation output2 = Allocation.createTyped(rs, input.getType());

        // darken
        ScriptC_dim dim = new ScriptC_dim(rs);
        dim.set_dimmingValue(0.4f);
        dim.forEach_dim(input, output);

        // blur
        ScriptIntrinsicBlur blur = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
        blur.setInput(output);
        blur.setRadius(mRadius);
        blur.forEach(output2);

        output2.copyTo(bitmap);
        rs.destroy();
        return bitmap;
    }

    @Override
    public String getId() {
        return "BlurTransformation(radius=" + mRadius + ", sampling=" + mSampling + ")";
    }
}


text:
<title>Zend Framework API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/black-tie/jquery-ui-1.8.2.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link>

API Documentation

Measure/Current.php

Global

                      Classes

\Zend_Measure_Current

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.

category

Zend

copyright

Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

license

New BSD License

package

Zend_Measure

version

$Id: Current.php 23775 2011-03-01 17:25:24Z ralph $

\Zend_Measure_Current
jump to top

Class for handling current conversions

Extends from

\Zend_Measure_Abstract

category

Zend

copyright

Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

license

New BSD License

package

Zend_Measure

subpackage

Zend_Measure_Current

Constants

                STANDARD
                = 'AMPERE'

                ABAMPERE
                = 'ABAMPERE'

                AMPERE
                = 'AMPERE'

                BIOT
                = 'BIOT'

                CENTIAMPERE
                = 'CENTIAMPERE'

                COULOMB_PER_SECOND
                = 'COULOMB_PER_SECOND'

                DECIAMPERE
                = 'DECIAMPERE'

                DEKAAMPERE
                = 'DEKAAMPERE'

                ELECTROMAGNETIC_UNIT
                = 'ELECTROMAGNATIC_UNIT'

                ELECTROSTATIC_UNIT
                = 'ELECTROSTATIC_UNIT'

                FRANCLIN_PER_SECOND
                = 'FRANCLIN_PER_SECOND'

                GAUSSIAN
                = 'GAUSSIAN'

                GIGAAMPERE
                = 'GIGAAMPERE'

                GILBERT
                = 'GILBERT'

                HECTOAMPERE
                = 'HECTOAMPERE'

                KILOAMPERE
                = 'KILOAMPERE'

                MEGAAMPERE
                = 'MEGAAMPERE'

                MICROAMPERE
                = 'MICROAMPERE'

                MILLIAMPERE
                = 'MILLIAMPERE'

                NANOAMPERE
                = 'NANOAMPERE'

                PICOAMPERE
                = 'PICOAMPERE'

                SIEMENS_VOLT
                = 'SIEMENS_VOLT'

                STATAMPERE
                = 'STATAMPERE'

                TERAAMPERE
                = 'TERAAMPERE'

                VOLT_PER_OHM
                = 'VOLT_PER_OHM'

                WATT_PER_VOLT
                = 'WATT_PER_VOLT'

                WEBER_PER_HENRY
                = 'WEBER_PER_HENRY'

Properties

array
                 $_units= 'array'

Calculations for all current units

Default valuearrayDetails

Type

array

Methods

__construct(
          mixed $value, int $type
              =
              null, \Zend_Locale $locale
              =
              null
          )

        :
          void

Zend_Measure_Abstract is an abstract class for the different measurement types

Inherited from:
                    \Zend_Measure_Abstract::__construct()

Parameters

Name
Type
Description

$value
mixed
Value as string, integer, real or float

$type
int
OPTIONAL a measure type f.e. Zend_Measure_Length::METER

$locale
\Zend_Locale
OPTIONAL a Zend_Locale Type

Throws

Exception
Description

\Zend_Measure_Exception

__toString(

          )

        :
          string

Returns a string representation

Inherited from:
                    \Zend_Measure_Abstract::__toString()

Returns

Type
Description

string

add(
          \Zend_Measure_Abstract $object
          )

        :
          \Zend_Measure_Abstract

Adds an unit to another one

Inherited from:
                    \Zend_Measure_Abstract::add()

Parameters

Name
Type
Description

$object
\Zend_Measure_Abstract
object of same unit type

Returns

Type
Description

\Zend_Measure_Abstract

compare(
          \Zend_Measure_Abstract $object
          )

        :
          boolean

Compares two units

Inherited from:
                    \Zend_Measure_Abstract::compare()

Parameters

Name
Type
Description

$object
\Zend_Measure_Abstract
object of same unit type

Returns

Type
Description

boolean

convertTo(
          string $type, integer $round
              =
              2, string|\Zend_Locale $locale
              =
              null
          )

        :
          string

Alias function for setType returning the converted unit

Inherited from:
                    \Zend_Measure_Abstract::convertTo()

Parameters

Name
Type
Description

$type
string
Constant Type

$round
integer

(Optional) Rounds the value to a given precision

$locale
string|\Zend_Locale

(Optional) Locale to set for the number

Returns

Type
Description

string

equals(
          \Zend_Measure_Abstract $object
          )

        :
          boolean

Compare if the value and type is equal

Inherited from:
                    \Zend_Measure_Abstract::equals()

Parameters

Name
Type
Description

$object
\Zend_Measure_Abstract
object to compare

Returns

Type
Description

boolean

getConversionList(

          )

        :
          array

Returns the conversion list

Inherited from:
                    \Zend_Measure_Abstract::getConversionList()

Returns

Type
Description

array

getLocale(

          )

        :
          string

Returns the actual set locale

Inherited from:
                    \Zend_Measure_Abstract::getLocale()

Returns

Type
Description

string

getType(

          )

        :
          \type

Returns the original type

Inherited from:
                    \Zend_Measure_Abstract::getType()

Returns

Type
Description

\type

getValue(
          integer $round, string|\Zend_Locale $locale
              =
              null
          )

        :
          integer|string

Returns the internal value

Inherited from:
                    \Zend_Measure_Abstract::getValue()

Parameters

Name
Type
Description

$round
integer

(Optional) Rounds the value to an given precision, Default is -1 which returns without rounding

$locale
string|\Zend_Locale

(Optional) Locale for number representation

Returns

Type
Description

integerstring

setLocale(
          string|\Zend_Locale $locale
              =
              null, boolean $check
              =
              false
          )

        :
          \Zend_Measure_Abstract

Sets a new locale for the value representation

Inherited from:
                    \Zend_Measure_Abstract::setLocale()

Parameters

Name
Type
Description

$locale
string|\Zend_Locale

(Optional) New locale to set

$check
boolean

False, check but don't set; True, set the new locale

Returns

Type
Description

\Zend_Measure_Abstract

setType(
          string $type
          )

        :
          \Zend_Measure_Abstract

Set a new type, and convert the value

Inherited from:
                    \Zend_Measure_Abstract::setType()

Parameters

Name
Type
Description

$type
string
New type to set

Returns

Type
Description

\Zend_Measure_Abstract

Throws

Exception
Description

\Zend_Measure_Exception

setValue(
          integer|string $value, string $type
              =
              null, string|\Zend_Locale $locale
              =
              null
          )

        :
          \Zend_Measure_Abstract

Set a new value

Inherited from:
                    \Zend_Measure_Abstract::setValue()

Parameters

Name
Type
Description

$value
integer|string
Value as string, integer, real or float

$type
string
OPTIONAL A measure type f.e. Zend_Measure_Length::METER

$locale
string|\Zend_Locale

OPTIONAL Locale for parsing numbers

Returns

Type
Description

\Zend_Measure_Abstract

Throws

Exception
Description

\Zend_Measure_Exception

sub(
          \Zend_Measure_Abstract $object
          )

        :
          \Zend_Measure_Abstract

Substracts an unit from another one

Inherited from:
                    \Zend_Measure_Abstract::sub()

Parameters

Name
Type
Description

$object
\Zend_Measure_Abstract
object of same unit type

Returns

Type
Description

\Zend_Measure_Abstract

toString(
          integer $round, string|\Zend_Locale $locale
              =
              null
          )

        :
          string

Returns a string representation

Inherited from:
                    \Zend_Measure_Abstract::toString()

Parameters

Name
Type
Description

$round
integer

(Optional) Runds the value to an given exception

$locale
string|\Zend_Locale

(Optional) Locale to set for the number

Returns

Type
Description

string

Documentation was generated by DocBlox 0.13.3.


text:
package org.apache.cassandra.utils.concurrent;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.function.Consumer;

import com.google.common.util.concurrent.Uninterruptibles;
import org.junit.Assert;

import net.openhft.chronicle.core.util.ThrowingBiConsumer;
import net.openhft.chronicle.core.util.ThrowingConsumer;
import net.openhft.chronicle.core.util.ThrowingFunction;

public abstract class AbstractTestAwaitable<A extends Awaitable>
{
    protected final ExecutorService exec = Executors.newCachedThreadPool();

    protected void testOneSuccess(A awaitable, Consumer<A> signal)
    {
        Async async = new Async();
        //noinspection Convert2MethodRef
        async.success(awaitable, a -> a.await(), awaitable);
        async.success(awaitable, a -> a.awaitUninterruptibly(), awaitable);
        async.success(awaitable, a -> a.awaitThrowUncheckedOnInterrupt(), awaitable);
        async.success(awaitable, a -> a.await(1L, TimeUnit.SECONDS), true);
        async.success(awaitable, a -> a.awaitUninterruptibly(1L, TimeUnit.SECONDS), true);
        async.success(awaitable, a -> a.awaitThrowUncheckedOnInterrupt(1L, TimeUnit.SECONDS), true);
        async.success(awaitable, a -> a.awaitUntil(Long.MAX_VALUE), true);
        async.success(awaitable, a -> a.awaitUntilUninterruptibly(Long.MAX_VALUE), true);
        async.success(awaitable, a -> a.awaitUntilThrowUncheckedOnInterrupt(Long.MAX_VALUE), true);
        signal.accept(awaitable);
        async.verify();
    }

    public void testOneTimeout(A awaitable)
    {
        Async async = new Async();
        async.success(awaitable, a -> a.await(1L, TimeUnit.MILLISECONDS), false);
        async.success(awaitable, a -> a.awaitUninterruptibly(1L, TimeUnit.MILLISECONDS), false);
        async.success(awaitable, a -> a.awaitThrowUncheckedOnInterrupt(1L, TimeUnit.MILLISECONDS), false);
        async.success(awaitable, a -> a.awaitUntil(System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1L)), false);
        async.success(awaitable, a -> a.awaitUntilUninterruptibly(System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1L)), false);
        async.success(awaitable, a -> a.awaitUntilThrowUncheckedOnInterrupt(System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1L)), false);
        Uninterruptibles.sleepUninterruptibly(10L, TimeUnit.MILLISECONDS);
        async.verify();
    }

    public void testOneInterrupt(A awaitable)
    {
        Async async = new Async();
        async.failure(awaitable, a -> { Thread.currentThread().interrupt(); a.await(); }, InterruptedException.class);
        async.failure(awaitable, a -> { Thread.currentThread().interrupt(); a.await(1L, TimeUnit.SECONDS); }, InterruptedException.class);
        async.success(awaitable, a -> { Thread.currentThread().interrupt(); return a.awaitUninterruptibly(1L, TimeUnit.SECONDS); }, false);
        async.failure(awaitable, a -> { Thread.currentThread().interrupt(); a.awaitThrowUncheckedOnInterrupt(1L, TimeUnit.SECONDS); }, UncheckedInterruptedException.class);
        async.failure(awaitable, a -> { Thread.currentThread().interrupt(); a.awaitUntil(System.nanoTime() + TimeUnit.SECONDS.toNanos(1L)); }, InterruptedException.class);
        async.success(awaitable, a -> { Thread.currentThread().interrupt(); return a.awaitUntilUninterruptibly(System.nanoTime() + TimeUnit.SECONDS.toNanos(1L)); }, false);
        async.failure(awaitable, a -> { Thread.currentThread().interrupt(); a.awaitUntilThrowUncheckedOnInterrupt(System.nanoTime() + TimeUnit.SECONDS.toNanos(1L)); }, UncheckedInterruptedException.class);
        Uninterruptibles.sleepUninterruptibly(2L, TimeUnit.SECONDS);
        async.verify();
    }

    class Async
    {
        final List<ThrowingBiConsumer<Long, TimeUnit, ?>> waitingOn = new ArrayList<>();
        void verify()
        {
            for (int i = 0 ; i < waitingOn.size() ; ++i)
            {
                try
                {
                    waitingOn.get(i).accept(100L, TimeUnit.MILLISECONDS);
                }
                catch (Throwable t)
                {
                    throw new AssertionError("" + i, t);
                }
            }
        }
        void failure(A awaitable, ThrowingConsumer<A, ?> action, Throwable failsWith)
        {
            waitingOn.add(exec.submit(() -> AbstractTestAwaitable.failure(awaitable, action, failsWith))::get);
        }
        void failure(A awaitable, ThrowingConsumer<A, ?> action, Class<? extends Throwable> failsWith)
        {
            waitingOn.add(exec.submit(() -> AbstractTestAwaitable.failure(awaitable, action, failsWith))::get);
        }
        void failure(A awaitable, ThrowingConsumer<A, ?> action, Predicate<Throwable> failsWith)
        {
            waitingOn.add(exec.submit(() -> AbstractTestAwaitable.failure(awaitable, action, failsWith))::get);
        }
        <P extends A, R> void success(P awaitable, ThrowingFunction<P, R, ?> action, R result)
        {
            waitingOn.add(exec.submit(() -> AbstractTestAwaitable.success(awaitable, action, result))::get);
        }
        <P extends A, R> void success(P awaitable, ThrowingFunction<P, R, ?> action, Predicate<R> result)
        {
            waitingOn.add(exec.submit(() -> AbstractTestAwaitable.success(awaitable, action, result))::get);
        }
    }

    private static <A extends Awaitable> void failure(A awaitable, ThrowingConsumer<A, ?> action, Throwable failsWith)
    {
        failure(awaitable, action, t -> Objects.equals(failsWith, t));
    }

    static <A extends Awaitable> void failure(A awaitable, ThrowingConsumer<A, ?> action, Class<? extends Throwable> failsWith)
    {
        failure(awaitable, action, failsWith::isInstance);
    }

    private static <A extends Awaitable> void failure(A awaitable, ThrowingConsumer<A, ?> action, Predicate<Throwable> failsWith)
    {
        Throwable fail = null;
        try
        {
            action.accept(awaitable);
        }
        catch (Throwable t)
        {
            fail = t;
        }
        if (!failsWith.test(fail))
            throw new AssertionError(fail);
    }

    static <A extends Awaitable, R> void success(A awaitable, ThrowingFunction<A, R, ?> action, R result)
    {
        try
        {
            Assert.assertEquals(result, action.apply(awaitable));
        }
        catch (Throwable t)
        {
            throw new AssertionError(t);
        }
    }

    static <A extends Awaitable, R> void success(A awaitable, ThrowingFunction<A, R, ?> action, Predicate<R> result)
    {
        try
        {
            Assert.assertTrue(result.test(action.apply(awaitable)));
        }
        catch (Throwable t)
        {
            throw new AssertionError(t);
        }
    }

}


text:
import React, { useRef } from 'react';
import { useDrag, useDrop } from 'react-dnd';
import Icon, { SourceIcon } from './Icon';
import LinksSentence from './LinksSentence';
import { Dater, dater } from './Dater';
import URILink from './URILink';
import ContextMenuTrigger from './ContextMenu/ContextMenuTrigger';
import ErrorBoundary from './ErrorBoundary';
import { isTouchDevice } from '../util/helpers';
import { I18n } from '../locale';
import AddedFrom from './AddedFrom';

const MiddleColumn = ({
  context,
  item: {
    added_from,
    added_by,
    played_at,
  } = {},
}) => {
  let content;
  switch (context ?.type) {
    case 'history': {
      content = (

          {
            played_at ? (
              <I18n path="specs.played_ago" time={dater('ago', played_at)} />
            ) : ('-')
          }

      );
      break;
    }
    case 'queue': {
      content = (
        <AddedFrom
          from={added_from}
          by={added_by}
          className="list__item__column__item list__item__column__item--added"
        />
      );
      break;
    }
    default:
      return null;
  }

  return (

      {content}

  );
}

const Track = ({
  item,
  context,
  stream_title,
  play_state,
  is_selected,
  can_sort,
  show_source_icon,
  getItemIndex,
  getDragItem,
  events,
}) => {
  const index = getItemIndex();
  const [{ isDragging }, drag] = useDrag({
    type: 'TRACK',
    item: getDragItem(item, index),
    collect: (monitor) => ({
      isDragging: monitor.isDragging(),
    }),
  });
  const [{ handlerId, isOver }, drop] = useDrop({
    accept: 'TRACK',
    collect: (monitor) => ({
      handlerId: monitor.getHandlerId(),
      isOver: can_sort && monitor.isOver() && !isDragging,
    }),
    canDrop: () => can_sort,
    drop: () => {
      if (isDragging) return; // Dropping on self should do nothing
      events.onDrop(index);
    },
  });

  if (!item) return null;

  let className = 'list__item list__item--track mouse-draggable mouse-selectable mouse-contextable';
  const track_details = [];

  if (item.artists) {
    track_details.push(

        {item.artists ? <LinksSentence items={item.artists} type="artist" /> : '-'}

,
    );
  } else if (item.playing && stream_title) {
    track_details.push(

        {stream_title}

,
    );
  }

  if (item.album) {
    track_details.push(

        {item.album.uri
          ? <URILink type="album" uri={item.album.uri}>{item.album.name}</URILink>
          : {item.album.name}
        }

,
    );
  }

  // If we're touchable, and can sort this tracklist
  let drag_zone = null;
  let wrapperRef = useRef(null);
  if (isTouchDevice()) {
    if (can_sort) {
      // Drag ref is our handler ONLY
      // Drop ref is our whole row, so the whole row can be dropped on
      wrapperRef = drop(wrapperRef);
      className += ' list__item--has-drag-zone';
      drag_zone = (
         events.onTouchStart(item, index, e)}
          ref={drag}
        >
          <Icon name="drag_indicator" />

      );
    }
  } else {
    // Merge drag and drop refs
    wrapperRef = drag(drop(wrapperRef));
  }

  const track_middle_column = <MiddleColumn context={context} item={item} />;
  if (is_selected(index)) className += ' list__item--selected';
  if (isOver) className += ' list__item--drag-over';
  if (isDragging) className += ' list__item--dragging';
  if (can_sort) className += ' list__item--can-sort';
  if (item.type !== undefined) className += ` list__item--${item.type}`;
  if (item.playing) className += ' list__item--playing';
  if (item.loading) className += ' list__item--loading';
  if (item.is_playable === false) className += ' list__item--disabled';
  if (track_middle_column) className += ' list__item--has-middle-column';
  if (track_details.length > 0) className += ' list__item--has-details';

  // Bind to mouseDown so we can trigger selection updates BEFORE drag starts
  const onMouseDown = (e) => events.onMouseDown(item, index, e);
  const onDoubleClick = (e) => events.onDoubleClick(item, index, e);
  const onContextMenu = (e) => events.onContextMenu(item, index, e);

  return (
    <ErrorBoundary>

            {item.name ? item.name : {item.uri}}
            {item.playing && <Icon className={`js--${play_state}`} name="playing" type="css" />}

          {track_details && (

              {track_details}

          )}

        {track_middle_column}

          {drag_zone}
          {item.is_explicit && (
            <I18n path="track.explicit" />
          )}
          {item.is_playable === false && (
            <I18n path="track.unplayable" />
          )}
          {(context ?.type === 'album' || context ?.type === 'artist') && item.track_number && (

                <I18n path="track.title" />

              {item.track_number}

          )}

            {item.duration ? <Dater type="length" data={item.duration} /> : '-'}

          {show_source_icon && (

              <SourceIcon uri={item.uri} fixedWidth />

          )}
          <ContextMenuTrigger
            className="list__item__column__item--context-menu-trigger subtle"
            onTrigger={onContextMenu}
          />

    </ErrorBoundary>
  );
}

export default Track;


text:
	@class SettingsInputKeyMapServiceClient
]=]

local require = require(script.Parent.loader).load(script)

local Maid = require("Maid")
local InputKeyMapSettingClient = require("InputKeyMapSettingClient")

local SettingsInputKeyMapServiceClient = {}
SettingsInputKeyMapServiceClient.ServiceName = "SettingsInputKeyMapServiceClient"

function SettingsInputKeyMapServiceClient:Init(serviceBag)
	assert(not self._serviceBag, "Already initialized")
	self._serviceBag = assert(serviceBag, "No serviceBag")
	self._maid = Maid.new()

	-- External
	self._serviceBag:GetService(require("SettingsServiceClient"))
	self._serviceBag:GetService(require("InputModeServiceClient"))
	self._serviceBag:GetService(require("InputKeyMapServiceClient"))
	self._inputKeyMapRegistry = self._serviceBag:GetService(require("InputKeyMapRegistryServiceShared"))
end

function SettingsInputKeyMapServiceClient:Start()
	self._maid:GiveTask(self._inputKeyMapRegistry:ObserveInputKeyMapListsBrio():Subscribe(function(brio)
		if brio:IsDead() then
			return
		end

		local maid = brio:ToMaid()
		local inputKeyMapList = brio:GetValue()

		maid:GiveTask(InputKeyMapSettingClient.new(self._serviceBag, inputKeyMapList))
	end))
end

function SettingsInputKeyMapServiceClient:Destroy()
	self._maid:DoCleaning()
end

return SettingsInputKeyMapServiceClient


text:
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="10001" PROTOCOLVERSION="1.0">
<SIMPLERSP>
<IMETHODRESPONSE NAME="EnumerateInstances">
<IRETURNVALUE>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="CWS_Directory">
<KEYBINDING NAME="CreationClassName">
<KEYVALUE VALUETYPE="string">
CWS_Directory
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_UnitaryComputerSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSName">
<KEYVALUE VALUETYPE="string">
localhost
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_FileSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSName">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="Name">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/Providers
</KEYVALUE>
</KEYBINDING>
</INSTANCENAME>
<INSTANCE CLASSNAME="CWS_Directory">
<PROPERTY NAME="Caption" TYPE="string">
</PROPERTY>
<PROPERTY NAME="Description" TYPE="string">
</PROPERTY>
<PROPERTY NAME="ElementName" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InstallDate" TYPE="datetime">
</PROPERTY>
<PROPERTY.ARRAY NAME="OperationalStatus" TYPE="uint16">
</PROPERTY.ARRAY>
<PROPERTY.ARRAY NAME="StatusDescriptions" TYPE="string">
</PROPERTY.ARRAY>
<PROPERTY NAME="Status" TYPE="string">
</PROPERTY>
<PROPERTY NAME="CompressionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="EncryptionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InUseCount" TYPE="uint64">
</PROPERTY>
<PROPERTY NAME="CSCreationClassName" TYPE="string">
<VALUE>
CIM_UnitaryComputerSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="CSName" TYPE="string">
<VALUE>
localhost
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSCreationClassName" TYPE="string">
<VALUE>
CIM_FileSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSName" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationClassName" TYPE="string">
<VALUE>
CWS_Directory
</VALUE>
</PROPERTY>
<PROPERTY NAME="Name" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/Providers
</VALUE>
</PROPERTY>
<PROPERTY NAME="FileSize" TYPE="uint64">
<VALUE>
4096
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationDate" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastModified" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastAccessed" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="Readable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Writeable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Executable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
</INSTANCE>
</VALUE.NAMEDINSTANCE>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="CWS_Directory">
<KEYBINDING NAME="CreationClassName">
<KEYVALUE VALUETYPE="string">
CWS_Directory
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_UnitaryComputerSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSName">
<KEYVALUE VALUETYPE="string">
localhost
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_FileSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSName">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="Name">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/Providers/mof
</KEYVALUE>
</KEYBINDING>
</INSTANCENAME>
<INSTANCE CLASSNAME="CWS_Directory">
<PROPERTY NAME="Caption" TYPE="string">
</PROPERTY>
<PROPERTY NAME="Description" TYPE="string">
</PROPERTY>
<PROPERTY NAME="ElementName" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InstallDate" TYPE="datetime">
</PROPERTY>
<PROPERTY.ARRAY NAME="OperationalStatus" TYPE="uint16">
</PROPERTY.ARRAY>
<PROPERTY.ARRAY NAME="StatusDescriptions" TYPE="string">
</PROPERTY.ARRAY>
<PROPERTY NAME="Status" TYPE="string">
</PROPERTY>
<PROPERTY NAME="CompressionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="EncryptionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InUseCount" TYPE="uint64">
</PROPERTY>
<PROPERTY NAME="CSCreationClassName" TYPE="string">
<VALUE>
CIM_UnitaryComputerSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="CSName" TYPE="string">
<VALUE>
localhost
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSCreationClassName" TYPE="string">
<VALUE>
CIM_FileSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSName" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationClassName" TYPE="string">
<VALUE>
CWS_Directory
</VALUE>
</PROPERTY>
<PROPERTY NAME="Name" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/Providers/mof
</VALUE>
</PROPERTY>
<PROPERTY NAME="FileSize" TYPE="uint64">
<VALUE>
4096
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationDate" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastModified" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastAccessed" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="Readable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Writeable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Executable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
</INSTANCE>
</VALUE.NAMEDINSTANCE>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="CWS_Directory">
<KEYBINDING NAME="CreationClassName">
<KEYVALUE VALUETYPE="string">
CWS_Directory
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_UnitaryComputerSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="CSName">
<KEYVALUE VALUETYPE="string">
localhost
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSCreationClassName">
<KEYVALUE VALUETYPE="string">
CIM_FileSystem
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="FSName">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/
</KEYVALUE>
</KEYBINDING>
<KEYBINDING NAME="Name">
<KEYVALUE VALUETYPE="string">
/Simulated/CMPI/tests/Providers/util
</KEYVALUE>
</KEYBINDING>
</INSTANCENAME>
<INSTANCE CLASSNAME="CWS_Directory">
<PROPERTY NAME="Caption" TYPE="string">
</PROPERTY>
<PROPERTY NAME="Description" TYPE="string">
</PROPERTY>
<PROPERTY NAME="ElementName" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InstallDate" TYPE="datetime">
</PROPERTY>
<PROPERTY.ARRAY NAME="OperationalStatus" TYPE="uint16">
</PROPERTY.ARRAY>
<PROPERTY.ARRAY NAME="StatusDescriptions" TYPE="string">
</PROPERTY.ARRAY>
<PROPERTY NAME="Status" TYPE="string">
</PROPERTY>
<PROPERTY NAME="CompressionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="EncryptionMethod" TYPE="string">
</PROPERTY>
<PROPERTY NAME="InUseCount" TYPE="uint64">
</PROPERTY>
<PROPERTY NAME="CSCreationClassName" TYPE="string">
<VALUE>
CIM_UnitaryComputerSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="CSName" TYPE="string">
<VALUE>
localhost
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSCreationClassName" TYPE="string">
<VALUE>
CIM_FileSystem
</VALUE>
</PROPERTY>
<PROPERTY NAME="FSName" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationClassName" TYPE="string">
<VALUE>
CWS_Directory
</VALUE>
</PROPERTY>
<PROPERTY NAME="Name" TYPE="string">
<VALUE>
/Simulated/CMPI/tests/Providers/util
</VALUE>
</PROPERTY>
<PROPERTY NAME="FileSize" TYPE="uint64">
<VALUE>
4096
</VALUE>
</PROPERTY>
<PROPERTY NAME="CreationDate" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastModified" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="LastAccessed" TYPE="datetime">
</PROPERTY>
<PROPERTY NAME="Readable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Writeable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
<PROPERTY NAME="Executable" TYPE="boolean">
<VALUE>
TRUE
</VALUE>
</PROPERTY>
</INSTANCE>
</VALUE.NAMEDINSTANCE>
</IRETURNVALUE>
</IMETHODRESPONSE>
</SIMPLERSP>
</MESSAGE>
</CIM>


text:
<?php
// required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");

// get database connection
include_once '../config/database.php';

// instantiate product object
include_once '../objects/item.php';

$database = new Database();
$db = $database->getConnection();

$product = new Item($db);

// get posted data
$data = json_decode(file_get_contents("php://input"));

// set product property values
$product->item_name = $data->item_name;
$product->item_price = $data->item_price;
$product->item_description = $data->item_description;
$product->character_name = $data->character_name;
$product->item_type = $data->item_type;
$product->button_id = $data->button_id;
$product->item_image_url = $data->item_image_url;
$product->item_image_url_2 = $data->item_image_url_2;
$product->item_image_url_3 = $data->item_image_url_3;
$product->sub_text = $data->sub_text;
$product->id = $data->id;

// create the product
if($product->update()){
    echo '{';
    echo '"message": "Product was updated."';
    echo '}';
}

// if unable to create the product, tell the user
else{
    echo '{';
    echo '"message": "Unable to update product."';
    echo '}';
}
?>


text:
#include <aws/pinpoint-sms-voice-v2/model/CreateEventDestinationResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::PinpointSMSVoiceV2::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

CreateEventDestinationResult::CreateEventDestinationResult()
{
}

CreateEventDestinationResult::CreateEventDestinationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

CreateEventDestinationResult& CreateEventDestinationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("ConfigurationSetArn"))
  {
    m_configurationSetArn = jsonValue.GetString("ConfigurationSetArn");

  }

  if(jsonValue.ValueExists("ConfigurationSetName"))
  {
    m_configurationSetName = jsonValue.GetString("ConfigurationSetName");

  }

  if(jsonValue.ValueExists("EventDestination"))
  {
    m_eventDestination = jsonValue.GetObject("EventDestination");

  }

  return *this;
}


text:
set -e

SCRIPT_DIR=$(dirname $0)
ADDED_DIR=${SCRIPT_DIR}/added
SOURCES_DIR="/tmp/artifacts"

cp -p ${ADDED_DIR}/standalone-openshift.xml $JBOSS_HOME/standalone/configuration/

cp ${JBOSS_HOME}/dataVirtualization/dataServiceBuilder/vdb-bench-war.war ${JBOSS_HOME}/standalone/deployments/ds-builder.war
cp ${JBOSS_HOME}/dataVirtualization/dataServiceBuilder/vdb-bench-doc.war ${JBOSS_HOME}/standalone/deployments/ds-builder-help.war
cp ${JBOSS_HOME}/dataVirtualization/dataServiceBuilder/komodo-rest.war ${JBOSS_HOME}/standalone/deployments/vdb-builder.war

rm -rf ${JBOSS_HOME}/dataVirtualization

for dir in $JBOSS_HOME/standalone /deployments; do
  chown -R jboss:root $dir
  chmod -R g+rwX $dir
done