text:
#ifndef GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_H
#define GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_H

#include <grpc/support/port_platform.h>

#include "src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h"

/**
 * An implementation of nanopb thin wrapper used to set/get and
 * serialize/de-serialize of ALTS handshake requests and responses.
 *
 * All APIs in the header are thread-compatible. A typical usage of this API at
 * the client side is as follows:
 *
 * -----------------------------------------------------------------------------
 * // Create, populate, and serialize an ALTS client_start handshake request to
 * // send to the server.
 * grpc_gcp_handshaker_req* req =
 *     grpc_gcp_handshaker_req_create(CLIENT_START_REQ);
 * grpc_gcp_handshaker_req_set_handshake_protocol(
       req, grpc_gcp_HandshakeProtocol_ALTS);
 * grpc_gcp_handshaker_req_add_application_protocol(req, "grpc");
 * grpc_gcp_handshaker_req_add_record_protocol(req, "ALTSRP_GCM_AES128");
 * grpc_slice client_slice;
 * if (!grpc_gcp_handshaker_req_encode(req, &client_slice)) {
 *   fprintf(stderr, "ALTS handshake request encoding failed.";
 * }
 *
 * // De-serialize a data stream received from the server, and store the result
 * // at ALTS handshake response.
 * grpc_gcp_handshaker_resp* resp = grpc_gcp_handshaker_resp_create();
 * if (!grpc_gcp_handshaker_resp_decode(server_slice, resp)) {
 *    fprintf(stderr, "ALTS handshake response decoding failed.");
 * }
 * // To access a variable-length datatype field (i.e., pb_callback_t),
 * // access its "arg" subfield (if it has been set).
 * if (resp->out_frames.arg != nullptr) {
 *   grpc_slice* slice = resp->out_frames.arg;
 * }
 * // To access a fixed-length datatype field (i.e., not pb_calback_t),
 * // access the field directly (if it has been set).
 * if (resp->has_status && resp->status->has_code) {
 *   uint32_t code = resp->status->code;
 * }
 *------------------------------------------------------------------------------
 */

/**
 * This method creates an ALTS handshake request.
 *
 * - type: an enum type value that can be either CLIENT_START_REQ,
 *   SERVER_START_REQ, or NEXT_REQ to indicate the created instance will be
 *   client_start, server_start, and next handshake request message
 * respectively.
 *
 * The method returns a pointer to the created instance.
 */
grpc_gcp_handshaker_req* grpc_gcp_handshaker_req_create(
    grpc_gcp_handshaker_req_type type);

/**
 * This method sets the value for handshake_security_protocol field of ALTS
 * client_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - handshake_protocol: a enum type value representing the handshake security
 *   protocol.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_handshake_protocol(
    grpc_gcp_handshaker_req* req,
    grpc_gcp_handshake_protocol handshake_protocol);

/**
 * This method sets the value for target_name field of ALTS client_start
 * handshake request.
 *
 * - req: an ALTS handshake request.
 * - target_name: a target name to be set.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_target_name(grpc_gcp_handshaker_req* req,
                                             const char* target_name);

/**
 * This method adds an application protocol supported by the server (or
 * client) to ALTS server_start (or client_start) handshake request.
 *
 * - req: an ALTS handshake request.
 * - application_protocol: an application protocol (e.g., grpc) to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_add_application_protocol(
    grpc_gcp_handshaker_req* req, const char* application_protocol);

/**
 * This method adds a record protocol supported by the client to ALTS
 * client_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - record_protocol: a record protocol (e.g., ALTSRP_GCM_AES128) to be
 *   added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_add_record_protocol(grpc_gcp_handshaker_req* req,
                                                 const char* record_protocol);

/**
 * This method adds a target server identity represented as hostname and
 * acceptable by a client to ALTS client_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - hostname: a string representation of hostname at the connection
 *   endpoint to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_add_target_identity_hostname(
    grpc_gcp_handshaker_req* req, const char* hostname);

/**
 * This method adds a target server identity represented as service account and
 * acceptable by a client to ALTS client_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - service_account: a string representation of service account at the
 *   connection endpoint to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_add_target_identity_service_account(
    grpc_gcp_handshaker_req* req, const char* service_account);

/**
 * This method sets the hostname for local_identity field of ALTS client_start
 * handshake request.
 *
 * - req: an ALTS handshake request.
 * - hostname: a string representation of hostname.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_local_identity_hostname(
    grpc_gcp_handshaker_req* req, const char* hostname);

/**
 * This method sets the service account for local_identity field of ALTS
 * client_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - service_account: a string representation of service account.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_local_identity_service_account(
    grpc_gcp_handshaker_req* req, const char* service_account);

/**
 * This method sets the value for local_endpoint field of either ALTS
 * client_start or server_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - ip_address: a string representation of ip address associated with the
 *   local endpoint, that could be either IPv4 or IPv6.
 * - port: a port number associated with the local endpoint.
 * - protocol: a network protocol (e.g., TCP or UDP) associated with the
 *   local endpoint.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_local_endpoint(
    grpc_gcp_handshaker_req* req, const char* ip_address, size_t port,
    grpc_gcp_network_protocol protocol);

/**
 * This method sets the value for remote_endpoint field of either ALTS
 * client_start or server_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - ip_address: a string representation of ip address associated with the
 *   remote endpoint, that could be either IPv4 or IPv6.
 * - port: a port number associated with the remote endpoint.
 * - protocol: a network protocol (e.g., TCP or UDP) associated with the
 *   remote endpoint.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_remote_endpoint(
    grpc_gcp_handshaker_req* req, const char* ip_address, size_t port,
    grpc_gcp_network_protocol protocol);

/**
 * This method sets the value for in_bytes field of either ALTS server_start or
 * next handshake request.
 *
 * - req: an ALTS handshake request.
 * - in_bytes: a buffer containing bytes taken from out_frames of the peer's
 *   ALTS handshake response. It is possible that the peer's out_frames are
 * split into multiple handshake request messages.
 * - size: size of in_bytes buffer.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_in_bytes(grpc_gcp_handshaker_req* req,
                                          const char* in_bytes, size_t size);

/**
 * This method adds a record protocol to handshake parameters mapped by the
 * handshake protocol for ALTS server_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - key: an enum type value representing a handshake security protocol.
 * - record_protocol: a record protocol to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_param_add_record_protocol(
    grpc_gcp_handshaker_req* req, grpc_gcp_handshake_protocol key,
    const char* record_protocol);

/**
 * This method adds a local identity represented as hostname to handshake
 * parameters mapped by the handshake protocol for ALTS server_start handshake
 * request.
 *
 * - req: an ALTS handshake request.
 * - key: an enum type value representing a handshake security protocol.
 * - hostname: a string representation of hostname to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_param_add_local_identity_hostname(
    grpc_gcp_handshaker_req* req, grpc_gcp_handshake_protocol key,
    const char* hostname);

/**
 * This method adds a local identity represented as service account to handshake
 * parameters mapped by the handshake protocol for ALTS server_start handshake
 * request.
 *
 * - req: an ALTS handshake request.
 * - key: an enum type value representing a handshake security protocol.
 * - service_account: a string representation of service account to be added.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_param_add_local_identity_service_account(
    grpc_gcp_handshaker_req* req, grpc_gcp_handshake_protocol key,
    const char* service_account);

/**
 * This method sets the value for rpc_versions field of either ALTS
 * client_start or server_start handshake request.
 *
 * - req: an ALTS handshake request.
 * - max_major: a major version of maximum supported RPC version.
 * - max_minor: a minor version of maximum supported RPC version.
 * - min_major: a major version of minimum supported RPC version.
 * - min_minor: a minor version of minimum supported RPC version.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_set_rpc_versions(grpc_gcp_handshaker_req* req,
                                              uint32_t max_major,
                                              uint32_t max_minor,
                                              uint32_t min_major,
                                              uint32_t min_minor);

/**
 * This method serializes an ALTS handshake request and returns a data stream.
 *
 * - req: an ALTS handshake request.
 * - slice: a data stream where the serialized result will be written.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_req_encode(grpc_gcp_handshaker_req* req,
                                    grpc_slice* slice);

/* This method destroys an ALTS handshake request. */
void grpc_gcp_handshaker_req_destroy(grpc_gcp_handshaker_req* req);

/* This method creates an ALTS handshake response. */
grpc_gcp_handshaker_resp* grpc_gcp_handshaker_resp_create(void);

/**
 * This method de-serializes a data stream and stores the result
 * in an ALTS handshake response.
 *
 * - slice: a data stream containing a serialized ALTS handshake response.
 * - resp: an ALTS handshake response used to hold de-serialized result.
 *
 * The method returns true on success and false otherwise.
 */
bool grpc_gcp_handshaker_resp_decode(grpc_slice slice,
                                     grpc_gcp_handshaker_resp* resp);

/* This method destroys an ALTS handshake response. */
void grpc_gcp_handshaker_resp_destroy(grpc_gcp_handshaker_resp* resp);

#endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_H */


text:
#include <thrift/thrift-config.h>

#include <thrift/concurrency/Mutex.h>
#include <thrift/concurrency/Util.h>

#include <cassert>
#include <chrono>
#include <mutex>

namespace apache { namespace thrift { namespace concurrency {

/**
 * Implementation of Mutex class using C++11 std::timed_mutex
 *
 * @version $Id:$
 */
class Mutex::impl : public std::timed_mutex {
};

Mutex::Mutex(Initializer init) : impl_(new Mutex::impl()) {}

void* Mutex::getUnderlyingImpl() const { return impl_.get(); }

void Mutex::lock() const { impl_->lock(); }

bool Mutex::trylock() const { return impl_->try_lock(); }

bool Mutex::timedlock(int64_t ms) const { return impl_->try_lock_for(std::chrono::milliseconds(ms)); }

void Mutex::unlock() const { impl_->unlock(); }

void Mutex::DEFAULT_INITIALIZER(void* arg) {
}

}}} // apache::thrift::concurrency

redpajama_set_name: RedPajamaGithub


text:
class CustomerAddressPolicy < ApplicationPolicy
  class Scope < Scope
    def resolve
      scope.where(
        customer_profile_id: user.customer_profile.id
      )
    end
  end

  def permitted_attributes
    [
      :lat,
      :lon,
      :nombre,
      :ciudad,
      :parroquia,
      :barrio,
      :direccion_uno,
      :direccion_dos,
      :codigo_postal,
      :referencia,
      :numero_convencional
    ]
  end

  def index?
    true
  end

  def create?
    is_customer?
  end

  def update?
    is_customer?
  end

  private

  def is_customer?
    user.customer_profile.present?
  end
end


text:
package com.intellij.application.options.colors;

import com.intellij.openapi.vcs.FileStatus;
import com.intellij.openapi.vcs.FileStatusFactory;
import org.jetbrains.annotations.NotNull;

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

class FileStatusColorsPageFactory implements ColorAndFontPanelFactory {
  @Override
  @NotNull
  public NewColorAndFontPanel createPanel(@NotNull ColorAndFontOptions options) {
    NewColorAndFontPanel panel =
      NewColorAndFontPanel.create(new PreviewPanel.Empty(), ColorAndFontOptions.FILE_STATUS_GROUP, options, collectFileTypes(), null);
    panel.setEmptyText("Not available", "File status options are not available for the scheme.\nChoose 'Default' or 'Darcula'.");
    return panel;
  }

  @Override
  @NotNull
  public String getPanelDisplayName() {
    return ColorAndFontOptions.FILE_STATUS_GROUP;
  }

  private static Collection<String> collectFileTypes() {
    ArrayList<String> result = new ArrayList<>();
    FileStatus[] statuses = FileStatusFactory.getInstance().getAllFileStatuses();

    for (FileStatus status : statuses) {
      result.add(status.getText());
    }
    return result;
  }
}


text:
var pwd = process.cwd();
var helper = require('../integration_test_helper.js');

module.exports = {
  'Mouse hover opens context menu': function (test) {
    test
      .open('file://' + pwd + '/test/integration/html/trigger-custom.html')
      .click('#activate-menu')
      .waitForElement('#context-menu-layer')
      .assert.visible('.context-menu-root', 'Menu is present')
      .assert.exists('.context-menu-root', 'It opens context menu')
      .assert.numberOfElements('.context-menu-root li')
        .is(7, '7 context menu items are shown')
      .click('#context-menu-layer')
      .wait(100)
      .assert.doesntExist('#context-menu-layer', 'Click outside closes context menu')
      .done();
  }
};


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Le Lis Blanc</title>
    <meta name="description" content="WebApp de exemplo">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/main.css">

    <link rel="manifest" href="manifest.json">

    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="img/icon.png">
    <meta name="theme-color" content="#F77F00">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="Shopping">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="apple-touch-icon-precomposed" href="img/icon.png">

    <meta name="msapplication-TileImage" content="img/icon.png">
    <meta name="msapplication-TileColor" content="#F77F00">

			arrow_back

Le Lis Blanc

Le Lis Blanc Deux é uma das principais empresas varejistas do setor de vestuário e acessórios de moda feminina de alto padrão no Brasil. A marca Le Lis Blanc está associada a produtos de alta qualidade e a um estilo de vida sofisticado e desejado. Os clientes são principalmente mulheres com alto poder aquisitivo, de diferentes faixas etárias, que procuram produtos elegantes e femininos, inspirados nas últimas tendências internacionais

Piso: 2

Número: 233

Funcionamento: 10h - 22h

Telefone: 011-1406

Email: contato@le-lis-blanc.com.br

            call


text:
import { StreamCreateDialogComponent } from './create-dialog.component';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MockStreamsService } from '../../../tests/mocks/streams';
import { RouterTestingModule } from '@angular/router/testing';
import { StreamsService } from '../../streams.service';
import { FloModule } from 'spring-flo';
import { BsModalRef, ModalModule } from 'ngx-bootstrap';
import { ParserService } from '../../../shared/services/parser.service';
import { LoggerService } from '../../../shared/services/logger.service';
import { MockNotificationService } from '../../../tests/mocks/notification';
import { NotificationService } from '../../../shared/services/notification.service';
import { SharedAboutService } from '../../../shared/services/shared-about.service';
import { MocksSharedAboutService } from '../../../tests/mocks/shared-about';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from '../../../shared/shared.module';
import { of } from 'rxjs';
import { Platform } from '../../../shared/model/platform';
import { BlockerService } from '../../../shared/components/blocker/blocker.service';

/**
 * Test {@link StreamCreateDialogComponent}.
 *
 * @author Alex Boyko
 */
describe('StreamCreateDialogComponent', () => {
  let component: StreamCreateDialogComponent;
  let fixture: ComponentFixture<StreamCreateDialogComponent>;
  const streamsService = new MockStreamsService();
  const loggerService = new LoggerService();
  const parserService = new ParserService();
  const notificationService = new MockNotificationService();
  const aboutService = new MocksSharedAboutService();

  beforeEach(async () => {
    TestBed.configureTestingModule({
      declarations: [
        StreamCreateDialogComponent
      ],
      imports: [
        RouterTestingModule.withRoutes([]),
        SharedModule,
        FormsModule,
        ReactiveFormsModule,
        ModalModule,
        FloModule,
        NoopAnimationsModule
      ],
      providers: [
        { provide: StreamsService, useValue: streamsService },
        { provide: ParserService, useValue: parserService },
        { provide: LoggerService, useValue: loggerService },
        { provide: NotificationService, useValue: notificationService },
        { provide: SharedAboutService, useValue: aboutService },
        { provide: BsModalRef, useValue: null },
        BlockerService
      ]
    })
      .compileComponents();
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(StreamCreateDialogComponent);
    component = fixture.componentInstance;
  });

  it('should be created', () => {
    spyOn(streamsService, 'getPlatforms').and.returnValue(of([
      new Platform('default', 'local')
    ]));
    fixture.detectChanges();
    expect(component).toBeTruthy();
  });

  it('should be populate', () => {
    spyOn(streamsService, 'getPlatforms').and.returnValue(of([
      new Platform('default', 'local')
    ]));
    fixture.detectChanges();
    expect(component).toBeTruthy();
    component.open({ dsl: 'file | log' });
    expect(component).toBeTruthy();
  });

});


text:
use entitas cli to generate components, extensions & typescript declarations for entitas-ts

    Usage:
    entitas init namespace [-t name]
    entitas create -c name field:type...
    entitas generate [-p <html5|scala>]

    Options:
    -d  [--debug>     # debug html5
    -t  [--template]  # template name
    -c  [--component] # create a component
    -p  [--platform]  # target platform for generated code:
                            html5   - typescript & javascript combination (default)
                            scala   - scala & scalaJs

Components classes are generated from json configuration, enforcing data oriented design.

### Install

    git clone git@github.com:darkoverlordofdata/entitas-ts.git
    cd entitas-ts
    npm install . -g

### Entitas RunTime
For CSharp, use the original: https://github.com/sschmid/Entitas-CSharp
This repository includes a Typescript implementation. Also:

    https://github.com/darkoverlordofdata/entitas-ts
    https://github.com/darkoverlordofdata/entitas-fsharp
    https://github.com/darkoverlordofdata/entitas-kotlin
    https://github.com/darkoverlordofdata/entitas-scala

### Live Demos
* https://darkoverlordofdata.com/entitas-ts-example/
    port of https://github.com/sschmid/Entitas-CSharp-Example
* https://darkoverlordofdata.com/entitas-ts-match-one/
    port of https://github.com/sschmid/Match-One
* [Spaceship Warriors](https://darkoverlordofdata.com/entitas-ts/example.html)
    port of artemis https://github.com/Flet/spaceship-warrior-redux
* [Scala.js Example](https://darkoverlordofdata.com/invaders-scala-js/)
    new experiment...

### Visual Debugging
See https://darkoverlordofdata.com/entitas-ts-example/

Include dat.gui, and entitas-ts will display live stats for entities, pools, and systems.
 * http://code.google.com/p/dat-gui

# MIT License

Copyright (c) 2015-2016 Bruce Davidson <darkoverlordofdata@gmail.com>

Copyright (c) 2014 Simon Schmid

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
Grokking Alistair Cockburn's [Hexagonal Architecture][1]

grok-arch-hexagonal includes the Alistair Cockburn's FIT example and
Pat Maddox's [hexarch2][2] [example][3].

grok-arch-hexagonal is not available for download via
quicklisp. Instead, clone the repository, tell ASDF where to find the
system definition, and load the system with quicklisp:

```lisp
(ql:quicklisp "grok-arch-hexagonal")
```

Following that, the FIT example can be driven either by the test

```lisp
CL-USER> (grok-arch-hexagonal-fit-example:run-test)
```

or by the UI

```lisp
CL-USER> (grok-arch-hexagonal-fit-example:run-ui)
```

The hexarch2 example can be driven by the test

```lisp
CL-USER> (grok-arch-hexagonal-hexarch2:run-test)
```

### License

grok-arch-hexagonal is distributed under the MIT license. See LICENSE.

[1]: http://alistair.cockburn.us/Hexagonal+architecture
[2]: https://github.com/patmaddox/hexarch2
[3]: http://www.patmaddox.com/2014/05/15/poof-and-then-rails-was-gone/


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EDDA: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

EDDA

edda

VecDistrModeler

edda::VecDistrModeler< T > Member List

This is the complete list of members for edda::VecDistrModeler< T >, including all inherited members.

assignGrid(int X, int Y, int Z)	edda::VecDistrModeler< T >	inline

binCount	edda::VecDistrModeler< T >	protected

computeGMM(float *data, size_t size, size_t index)	edda::VecDistrModeler< T >	inline

computeHistogram(float *data, size_t size, size_t index)	edda::VecDistrModeler< T >	inline

dataset	edda::VecDistrModeler< T >	protected

distArray	edda::VecDistrModeler< T >	protected

getDataset()	edda::VecDistrModeler< T >	inline

initHistogram(size_t bin)	edda::VecDistrModeler< T >	inline

initVectorComponent(size_t n)	edda::VecDistrModeler< T >	inline

model()	edda::VecDistrModeler< T >	inline

numComp	edda::VecDistrModeler< T >	protected

VecDistrModeler()	edda::VecDistrModeler< T >	inline

xSize	edda::VecDistrModeler< T >	protected

ySize	edda::VecDistrModeler< T >	protected

zSize	edda::VecDistrModeler< T >	protected

<address class="footer">
Generated on Tue Nov 15 2016 16:22:28 for EDDA by

 1.8.12
</address>


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

<title>TiledMap (libgdx API)</title>
<meta name="date" content="2016-02-02">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

				libgdx API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.badlogic.gdx.maps.tiled

Class TiledMap

java.lang.Object

com.badlogic.gdx.maps.Map

com.badlogic.gdx.maps.tiled.TiledMap

All Implemented Interfaces:

Disposable

public class TiledMap
extends Map

See Also:

Map

Constructor Summary

Constructors

Constructor and Description

TiledMap()

Creates an empty TiledMap.

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

void
dispose()

Disposes all resources like Texture instances that the map may own.

TiledMapTileSets
getTileSets()

void
setOwnedResources(Array<? extends Disposable> resources)

Used by loaders to set resources when loading the map directly, without AssetManager.

Methods inherited from class com.badlogic.gdx.maps.Map

getLayers, getProperties

Methods inherited from class java.lang.Object

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

Constructor Detail

TiledMap

public TiledMap()

Creates an empty TiledMap.

Method Detail

getTileSets

public TiledMapTileSets getTileSets()

Returns:

collection of tilesets for this map.

setOwnedResources

public void setOwnedResources(Array<? extends Disposable> resources)

Used by loaders to set resources when loading the map directly, without AssetManager. To be disposed in
 dispose().

Parameters:

resources -

dispose

public void dispose()

Description copied from class: Map

Disposes all resources like Texture instances that the map may own.

Specified by:

dispose in interface Disposable

Overrides:

dispose in class Map

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

libgdx API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

				Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <string name="about_html" tools:ignore="TypographyDashes,TypographyOther">
        <![CDATA[

License

Copyright 2015 Ha Duy Trung

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

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

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

Libraries & resources

Square Moshi
Apache License v2.0

Square Okio
Apache License v2.0

Android support library
Apache License v2.0

tldr-pages/tldr
MIT License

René Jeschke\'s Txtmark
Apache License v2.0

Material design icons
Creative Common Attribution 4.0 International License

Google Fonts

    Roboto Mono
    Apache License v2.0

Third party licenses

View full text

        ]]>
    </string>
</resources>


text:
package com.slack.api.model.event;

import lombok.Data;

/**
 * The file_created event is sent to all connected clients for a user when that user uploads a file to Slack.
 * The file property includes the file ID, as well as a top-level file_id.
 * To obtain additional information about the file, use the files.info API method.
 *

 * When a file is shared with other members of the workspace (which can happen at upload time)
 * a file_shared event will also be sent.
 *

 * https://api.slack.com/events/file_created
 */
@Data
public class FileCreatedEvent implements Event {

    public static final String TYPE_NAME = "file_created";

    private final String type = TYPE_NAME;
    private String fileId;
    private File file;
    private String userId;
    private String eventTs;

    @Data
    public static class File {
        private String id;
    }
}


text:
#pragma once
#include <aws/rds/RDS_EXPORTS.h>
#include <aws/rds/model/DBClusterParameterGroup.h>
#include <aws/rds/model/ResponseMetadata.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Xml
{
  class XmlDocument;
} // namespace Xml
} // namespace Utils
namespace RDS
{
namespace Model
{
  class AWS_RDS_API CreateDBClusterParameterGroupResult
  {
  public:
    CreateDBClusterParameterGroupResult();
    CreateDBClusterParameterGroupResult(const AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
    CreateDBClusterParameterGroupResult& operator=(const AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);

    inline const DBClusterParameterGroup& GetDBClusterParameterGroup() const{ return m_dBClusterParameterGroup; }

    inline void SetDBClusterParameterGroup(const DBClusterParameterGroup& value) { m_dBClusterParameterGroup = value; }

    inline void SetDBClusterParameterGroup(DBClusterParameterGroup&& value) { m_dBClusterParameterGroup = std::move(value); }

    inline CreateDBClusterParameterGroupResult& WithDBClusterParameterGroup(const DBClusterParameterGroup& value) { SetDBClusterParameterGroup(value); return *this;}

    inline CreateDBClusterParameterGroupResult& WithDBClusterParameterGroup(DBClusterParameterGroup&& value) { SetDBClusterParameterGroup(std::move(value)); return *this;}

    inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }

    inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }

    inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }

    inline CreateDBClusterParameterGroupResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}

    inline CreateDBClusterParameterGroupResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}

  private:
    DBClusterParameterGroup m_dBClusterParameterGroup;
    ResponseMetadata m_responseMetadata;
  };

} // namespace Model
} // namespace RDS
} // namespace Aws


text:
body {
	background-image: url("http://8kwallpapers.in/Wallpapers/Blue-ncs-solid-color-background-8k-wallpaper.jpg");
}
a{
	margin: 4em 4em;
}


text:
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { fetchPublicMetrics } from 'actions/metrics'
import Metrics from './Metrics'

const mapStateToProps = (state) => {
  return {
    metrics: state.metrics.metrics
  }
}

function mapDispatchToProps (dispatch) {
  return bindActionCreators({fetchPublicMetrics}, dispatch)
}

export default connect(mapStateToProps, mapDispatchToProps)(Metrics)


text:
package net.safedata.spring.intro.dao;

import net.safedata.spring.intro.entities.User;

import java.util.Collection;

public interface UserDAO {
    public User get(Integer id);

    public User get(String name);

    public User addUser(User user);

    public Collection<User> getAll();
}


text:
package com.example.weathertestdemo.util;

import android.content.Context;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class ViewHolder {

	private SparseArray<View> mViews;
	private int mPosition;
	private View mConvertView;

	public ViewHolder(Context context, ViewGroup parent,int position, int layoutId) {
		this.mPosition = position;
		this.mViews = new SparseArray<View>();
		mConvertView = LayoutInflater.from(context).inflate(layoutId, parent, false);
		mConvertView.setTag(this);
	}

	public static ViewHolder get(Context context, View convertView,
			ViewGroup parent,int position, int layoutId) {

		if (convertView == null) {
			return new ViewHolder(context, parent, position, layoutId);
		} else {
			ViewHolder holder = (ViewHolder) convertView.getTag();
			return holder;
		}
	}

	/**
	 * ͨ¹ýviewId»ñÈ¡¿Ø¼þ
	 */
	public <T extends View> T getView(int viewId) {

		View view = mViews.get(viewId);

		if (view == null) {
			view = mConvertView.findViewById(viewId);
			mViews.put(viewId, view);
		}

		return (T) view;

	}

	public View getConvertView() {
		return mConvertView;
	}

	/**
	 * ·â×°setText·½·¨£¬ÉèÖÃTextViewµÄÖµ
	 */
	public ViewHolder setText(int viewId, String text) {
		TextView tv = getView(viewId);
		tv.setText(text);
		return this;
	}

	/**
	 * ºóÐø¿ÉÒÔ×Ô¶¨Òå·â×°¸ü¶àµÄÉèÖÃͼƬ£¬ÍøÖ·µÈµÄ¸÷ÖÖ·½·¨À´ÍêÉÆ´ËViewHolder
	 */

}


text:
using System;
using System.Collections.Generic;

namespace Microsoft.Research.Uncertain
{
    public class Exponential : RandomPrimitive<double>
    {
        private readonly double lambda;
        public Exponential(double lambda)
        {
            this.lambda = lambda;
        }

        public override double Score(double t)
        {
            if (t < 0)
                return 0;
            return this.lambda * Math.Exp(-this.lambda * t);
        }

        protected override IEnumerable<Weighted<double>> GetSupport()
        {
            throw new Exception("Infnite support");
        }
        protected override double GetSample()
        {
            var sample = -this.lambda * Math.Log(Extensions.rand.NextDouble());
            return sample;
        }

        protected override bool StructuralEquals(RandomPrimitive other)
        {
            if (other is Exponential)
                return ((Exponential)other).lambda == this.lambda;
            return false;
        }

        protected override int GetStructuralHash()
        {
            return this.lambda.GetHashCode();
        }
    }
}


text:
All notable changes to this project will be documented in this file.
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

# 1.0.0-alpha.3 (2017-06-10)

### Bug Fixes

* **@phenomic/plugin-bundler-webpack:** avoid DeprecationWarning: loaderUtils.parseQuery() ([18a1252](https://github.com/phenomic/phenomic/commit/18a1252)), closes [#1043](https://github.com/phenomic/phenomic/issues/1043)
* **@phenomic/plugin-bundler-webpack:** set webpack & webpack-dev-middleware as deps ([e549ae8](https://github.com/phenomic/phenomic/commit/e549ae8)), closes [#1049](https://github.com/phenomic/phenomic/issues/1049)
* **@phenomic/plugin-public-assets:** make "public" folder optional ([4322731](https://github.com/phenomic/phenomic/commit/4322731)), closes [#1056](https://github.com/phenomic/phenomic/issues/1056) [#1059](https://github.com/phenomic/phenomic/issues/1059) [#1068](https://github.com/phenomic/phenomic/issues/1068)

### Features

* **@phenomic/plugin-bundler-webpack:** show in debug mode what's failing for custom webpack config ([640b033](https://github.com/phenomic/phenomic/commit/640b033))

# 1.0.0-alpha.2 (2017-06-02)

# 1.0.0-alpha.1 (2017-06-01)

### Features

* **@phenomic/plugin-bunder-webpack:** support .web.js extension ([c72bbc2](https://github.com/phenomic/phenomic/commit/c72bbc2))


text:
<?php

$lang['modus_theme'] = 'modus_theme';
$lang['Explore'] = 'Explorar';
$lang['%d album'] = '%d álbum';
$lang['%d albums'] = '%d álbumes';

$lang['%d pixels'] = '%d pixeles';
$lang['Album thumbnails'] = 'Miniaturas de álbumes';
$lang['Default size for thumbnails'] = 'Tamaño por defecto de las miniaturas';
$lang['Default size for thumbnails on high density display (retina)'] = 'Tamaño por defecto de las miniaturas en pantallas de alta densidad (retina)';
$lang['Default sizes'] = 'Tamaño por defecto';
$lang['Modus theme config'] = 'Configuración del tema Modus';
$lang['Skin'] = 'Estilo';
$lang['Use square thumbs'] = 'Utilizar miniaturas cuadradas';


text:
var EntityViewController = ['$scope', 'track', '$window', function ($scope, track, $window) {
    $scope.viewState = {
        mode: 'list',
        filtering: {}
    };

    track('allcount-entity-load', {
        location: $window.location.href
    });

    $scope.returnToGrid = function () {
        track('allcount-entity-return-to-grid', {
            location: $window.location.href
        });
        $scope.viewState.mode = 'list';
        $scope.viewState.isFormEditing = false;
        $scope.pagingMethods.refresh();
        $scope.gridMethods.updateGrid();
    };

    $scope.navigateTo = function (entityId) {
        track('allcount-entity-navigate-to', {
            location: $window.location.href,
            entityId: entityId
        });
        $scope.viewState.formEntityId = entityId;
        $scope.viewState.mode = 'form';
    };

    $scope.startEditing = function () {
        track('allcount-entity-start-editing', {
            location: $window.location.href
        });
        $scope.editForm.reloadEntity(function () {
            $scope.viewState.isFormEditing = true;
        });
    };

    $scope.doneEditing = function () {
        track('allcount-entity-done-editing', {
            location: $window.location.href
        });
        $scope.editForm.updateEntity(function () {
            $scope.viewState.isFormEditing = false;
            $scope.editForm.reloadEntity();
            $scope.actionMethods.refresh();
        });
    };

    $scope.startGridEditing = function() {
        track('allcount-entity-start-grid-editing', {
            location: $window.location.href
        });
        $scope.viewState.editState = true;
    };

    $scope.doneGridEditing = function() {
        track('allcount-entity-done-grid-editing', {
            location: $window.location.href
        });
        $scope.viewState.editState = false;
        setTimeout(function () {
            $scope.$evalAsync(function () {
                $scope.pagingMethods.refresh();
                $scope.gridMethods.updateGrid();
                $scope.actionMethods.refresh();
            });
        }, 400); //TODO delay for animation hack
    };

    $scope.toCreate = function () {
        track('allcount-entity-create', {
            location: $window.location.href
        });
        $scope.viewState.mode = 'create';
        $scope.createForm.reloadEntity();
    };

    $scope.refreshOnAction = function () {
        $scope.pagingMethods.refresh();
        $scope.gridMethods.updateGrid();
        $scope.editForm.reloadEntity();
    };

    $scope.showList = function () {
        return $scope.viewState.mode === "list" && $scope.viewState.paging && $scope.viewState.paging.count > 0 || $scope.viewState.editState;
    }
}];

allcountModule.controller('EntityViewController', EntityViewController);


text:
#region copyright

#endregion

namespace YAF.Types.Objects
{
    public class TreeNodeKey
    {
        public int? BoardId { get; set; }
        public int? CategoryId { get; set; }
        public int? ForumId { get; set; }

    }
}


text:
package com.hourglassapps.cpi_ii.report.blacklist;

import java.net.MalformedURLException;
import java.net.URL;

import com.hourglassapps.util.ConcreteThrower;
import com.hourglassapps.util.Converter;
import com.hourglassapps.util.Thrower;

class URLCanonicaliser implements Converter<URL,URL>, Thrower {
	private ConcreteThrower<MalformedURLException> mThrower=new ConcreteThrower<>();

	@Override
	public URL convert(URL url) {
		try {
			return new URL("http", url.getAuthority().toLowerCase(), url.getPort(), url.getFile());
		} catch(MalformedURLException e) {
			mThrower.ctch(e);
			return null;
		}
	}

	@Override
	public void close() throws Exception {
		mThrower.close();
	}

	@Override
	public <E extends Exception> void throwCaught(Class<E> pCatchable)
			throws Throwable {
		mThrower.throwCaught(pCatchable);
	}

}


text:
describe('work with DOM', function(){
	var renderer, el;

	beforeEach(function(){
		el = $("
sample text
");
		$('body').append(el);
		renderer = new Renderer(el);
	});

	afterEach(function(){
		el.remove();
	});

	it('should render expected text', function(){
		renderer.renderName('Alex');
		expect(el.text()).toBe('Hi, Alex!');
	})

	describe('async specs', function(){
		beforeEach(function (done) {
		    renderer.hideName(done);
		});

		it('should fade out after 1 sec', function(done){
			expect(el.css('display')).toBe('none');
			done();
		});

	});
});


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="nearmepay_dialog_width">297dip</dimen>
    <dimen name="nearmepay_dialog_loading_width">237dp</dimen>
    <!--  -->
    <dimen name="nearmepay_dialog_reconfirm_height">256dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_text_normal_size">17dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_margin_top_1">20dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_margin_top_2">13dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_margin_top_3">28dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_margin_top_4">20dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_text_small_size">13dp</dimen>
    <dimen name="nearmepay_dialog_reconfirm_margin_top_5">13dp</dimen>
</resources>


text:
import React, { PropTypes } from 'react';
import ReactMarkdown from 'react-markdown';

// import css from './styles.css';

const PostDisplayer = ({ postContent, className }) => (
  <div className={className}>
    <ReactMarkdown source={postContent} escapeHtml />
  </div>
);

PostDisplayer.propTypes = {
  postContent: PropTypes.string.isRequired,
  className: PropTypes.string.isRequired,
};

PostDisplayer.defaultProps = {
  className: '',
};

export default PostDisplayer;


text:
package com.esotericsoftware.yamlbeans;

import com.esotericsoftware.yamlbeans.Beans.Property;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;

/** Stores a constructor, parameters names, and property values so construction can be deferred until all property values are
 * known.
 * @author Nathan Sweet */
class DeferredConstruction {
	private final Constructor constructor;
	private final String[] parameterNames;
	private final ParameterValue[] parameterValues;
	private final List<PropertyValue> propertyValues = new ArrayList(16);

	public DeferredConstruction (Constructor constructor, String[] parameterNames) {
		this.constructor = constructor;
		this.parameterNames = parameterNames;
		parameterValues = new ParameterValue[parameterNames.length];
	}

	public Object construct () throws InvocationTargetException {
		try {
			Object[] parameters = new Object[parameterValues.length];
			int i = 0;
			for (ParameterValue parameter : parameterValues) {
				if (parameter == null)
					throw new InvocationTargetException(new YamlException("Missing constructor property: " + parameterNames[i]));
				parameters[i++] = parameter.value;
			}
			Object object = constructor.newInstance(parameters);
			for (PropertyValue propertyValue : propertyValues)
				propertyValue.property.set(object, propertyValue.value);
			return object;
		} catch (Exception ex) {
			throw new InvocationTargetException(ex, "Error constructing instance of class: "
				+ constructor.getDeclaringClass().getName());
		}
	}

	public void storeProperty (Property property, Object value) {
		int index = 0;
		for (String name : parameterNames) {
			if (property.getName().equals(name)) {
				ParameterValue parameterValue = new ParameterValue();
				parameterValue.value = value;
				parameterValues[index] = parameterValue;
				return;
			}
			index++;
		}

		PropertyValue propertyValue = new PropertyValue();
		propertyValue.property = property;
		propertyValue.value = value;
		propertyValues.add(propertyValue);
	}

	public boolean hasParameter (String name) {
		for (String s : parameterNames)
			if (s.equals(name)) return true;
		return false;
	}

	static class PropertyValue {
		Property property;
		Object value;
	}

	static class ParameterValue {
		Object value;
	}
}


text:
/**
 * @file FlightTaskAuto.cpp
 */
#include "FlightTaskOffboard.hpp"
#include <mathlib/mathlib.h>
#include <float.h>

using namespace matrix;

bool FlightTaskOffboard::initializeSubscriptions(SubscriptionArray &subscription_array)
{
	if (!FlightTask::initializeSubscriptions(subscription_array)) {
		return false;
	}

	if (!subscription_array.get(ORB_ID(position_setpoint_triplet), _sub_triplet_setpoint)) {
		return false;
	}

	return true;
}

bool FlightTaskOffboard::updateInitialize()
{
	bool ret = FlightTask::updateInitialize();
	// require a valid triplet
	ret = ret && _sub_triplet_setpoint->get().current.valid;
	// require valid position / velocity in xy
	return ret && PX4_ISFINITE(_position(0))
	       && PX4_ISFINITE(_position(1))
	       && PX4_ISFINITE(_velocity(0))
	       && PX4_ISFINITE(_velocity(1));
}

bool FlightTaskOffboard::activate()
{
	bool ret = FlightTask::activate();
	_position_setpoint = _position;
	_velocity_setpoint.setZero();
	_position_lock.setAll(NAN);
	return ret;
}

bool FlightTaskOffboard::update()
{
	// reset setpoint for every loop
	_resetSetpoints();

	if (!_sub_triplet_setpoint->get().current.valid) {
		_setDefaultConstraints();
		_position_setpoint = _position;
		return false;
	}

	// Yaw / Yaw-speed
	if (_sub_triplet_setpoint->get().current.yaw_valid) {
		// yaw control required
		_yaw_setpoint = _sub_triplet_setpoint->get().current.yaw;

		if (_sub_triplet_setpoint->get().current.yawspeed_valid) {
			// yawspeed is used as feedforward
			_yawspeed_setpoint = _sub_triplet_setpoint->get().current.yawspeed;
		}

	} else if (_sub_triplet_setpoint->get().current.yawspeed_valid) {
		// only yawspeed required
		_yawspeed_setpoint = _sub_triplet_setpoint->get().current.yawspeed;
		// set yaw setpoint to NAN since not used
		_yaw_setpoint = NAN;

	}

	// Loiter
	if (_sub_triplet_setpoint->get().current.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
		// loiter just means that the vehicle should keep position
		if (!PX4_ISFINITE(_position_lock(0))) {
			_position_setpoint = _position_lock = _position;

		} else {
			_position_setpoint = _position_lock;
		}

		// don't have to continue
		return true;

	} else {
		_position_lock.setAll(NAN);
	}

	// Takeoff
	if (_sub_triplet_setpoint->get().current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF) {
		// just do takeoff to default altitude
		if (!PX4_ISFINITE(_position_lock(0))) {
			_position_setpoint = _position_lock = _position;
			_position_setpoint(2) = _position_lock(2) = _position(2) - _param_mis_takeoff_alt.get();

		} else {
			_position_setpoint = _position_lock;
		}

		// don't have to continue
		return true;

	} else {
		_position_lock.setAll(NAN);
	}

	// Land
	if (_sub_triplet_setpoint->get().current.type == position_setpoint_s::SETPOINT_TYPE_LAND) {
		// land with landing speed, but keep position in xy
		if (!PX4_ISFINITE(_position_lock(0))) {
			_position_setpoint = _position_lock = _position;
			_position_setpoint(2) = _position_lock(2) = NAN;
			_velocity_setpoint(2) = _param_mpc_land_speed.get();

		} else {
			_position_setpoint = _position_lock;
			_velocity_setpoint(2) = _param_mpc_land_speed.get();
		}

		// don't have to continue
		return true;

	} else {
		_position_lock.setAll(NAN);
	}

	// IDLE
	if (_sub_triplet_setpoint->get().current.type == position_setpoint_s::SETPOINT_TYPE_IDLE) {
		_thrust_setpoint.zero();
		return true;
	}

	// Possible inputs:
	// 1. position setpoint
	// 2. position setpoint + velocity setpoint (velocity used as feedforward)
	// 3. velocity setpoint
	// 4. acceleration setpoint -> this will be mapped to normalized thrust setpoint because acceleration is not supported
	const bool position_ctrl_xy = _sub_triplet_setpoint->get().current.position_valid
				      && _sub_vehicle_local_position->get().xy_valid;
	const bool position_ctrl_z = _sub_triplet_setpoint->get().current.alt_valid
				     && _sub_vehicle_local_position->get().z_valid;
	const bool velocity_ctrl_xy = _sub_triplet_setpoint->get().current.velocity_valid
				      && _sub_vehicle_local_position->get().v_xy_valid;
	const bool velocity_ctrl_z = _sub_triplet_setpoint->get().current.velocity_valid
				     && _sub_vehicle_local_position->get().v_z_valid;
	const bool feedforward_ctrl_xy = position_ctrl_xy && velocity_ctrl_xy;
	const bool feedforward_ctrl_z = position_ctrl_z && velocity_ctrl_z;
	const bool acceleration_ctrl = _sub_triplet_setpoint->get().current.acceleration_valid;

	// if nothing is valid in xy, then exit offboard
	if (!(position_ctrl_xy || velocity_ctrl_xy || acceleration_ctrl)) {
		return false;
	}

	// if nothing is valid in z, then exit offboard
	if (!(position_ctrl_z || velocity_ctrl_z || acceleration_ctrl)) {
		return false;
	}

	// XY-direction
	if (feedforward_ctrl_xy) {
		_position_setpoint(0) = _sub_triplet_setpoint->get().current.x;
		_position_setpoint(1) = _sub_triplet_setpoint->get().current.y;
		_velocity_setpoint(0) = _sub_triplet_setpoint->get().current.vx;
		_velocity_setpoint(1) = _sub_triplet_setpoint->get().current.vy;

	} else if (position_ctrl_xy) {
		_position_setpoint(0) = _sub_triplet_setpoint->get().current.x;
		_position_setpoint(1) = _sub_triplet_setpoint->get().current.y;

	} else if (velocity_ctrl_xy) {

		if (_sub_triplet_setpoint->get().current.velocity_frame == position_setpoint_s::VELOCITY_FRAME_LOCAL_NED) {
			// in local frame: don't require any transformation
			_velocity_setpoint(0) = _sub_triplet_setpoint->get().current.vx;
			_velocity_setpoint(1) = _sub_triplet_setpoint->get().current.vy;

		} else if (_sub_triplet_setpoint->get().current.velocity_frame == position_setpoint_s::VELOCITY_FRAME_BODY_NED) {
			// in body frame: need to transorm first
			// Note, this transformation is wrong because body-xy is not neccessarily on the same plane as locale-xy
			_velocity_setpoint(0) = cosf(_yaw) * _sub_triplet_setpoint->get().current.vx - sinf(
							_yaw) * _sub_triplet_setpoint->get().current.vy;
			_velocity_setpoint(1) = sinf(_yaw) * _sub_triplet_setpoint->get().current.vx + cosf(
							_yaw) * _sub_triplet_setpoint->get().current.vy;

		} else {
			// no valid frame
			return false;
		}
	}

	// Z-direction
	if (feedforward_ctrl_z) {
		_position_setpoint(2) = _sub_triplet_setpoint->get().current.z;
		_velocity_setpoint(2) = _sub_triplet_setpoint->get().current.vz;

	} else if (position_ctrl_z) {
		_position_setpoint(2) = _sub_triplet_setpoint->get().current.z;

	} else if (velocity_ctrl_z) {
		_velocity_setpoint(2) = _sub_triplet_setpoint->get().current.vz;
	}

	// Acceleration
	// Note: this is not supported yet and will be mapped to normalized thrust directly.
	if (_sub_triplet_setpoint->get().current.acceleration_valid) {
		_thrust_setpoint(0) = _sub_triplet_setpoint->get().current.a_x;
		_thrust_setpoint(1) = _sub_triplet_setpoint->get().current.a_y;
		_thrust_setpoint(2) = _sub_triplet_setpoint->get().current.a_z;
	}

	// use default conditions of upwards position or velocity to take off
	_constraints.want_takeoff = _checkTakeoff();

	return true;
}


text:
package org.jetbrains.plugins.gradle.execution.build;

import com.intellij.openapi.externalSystem.model.ProjectKeys;
import com.intellij.openapi.externalSystem.model.execution.ExternalSystemTaskExecutionSettings;
import com.intellij.openapi.externalSystem.model.task.TaskData;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.OrderEnumerator;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.openapi.util.text.Strings;
import com.intellij.task.*;
import com.intellij.task.impl.JpsProjectTaskRunner;
import com.intellij.util.CommonProcessors;
import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.FactoryMap;
import com.intellij.util.containers.MultiMap;
import org.gradle.api.internal.jvm.ClassDirectoryBinaryNamingScheme;
import org.intellij.lang.annotations.Language;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.gradle.service.project.GradleProjectResolverUtil;
import org.jetbrains.plugins.gradle.service.task.VersionSpecificInitScript;
import org.jetbrains.plugins.gradle.settings.GradleSettings;
import org.jetbrains.plugins.gradle.util.GradleBundle;
import org.jetbrains.plugins.gradle.util.GradleConstants;
import org.jetbrains.plugins.gradle.util.GradleModuleData;

import java.io.File;
import java.util.*;

import static com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.*;
import static com.intellij.openapi.util.text.StringUtil.*;
import static org.jetbrains.plugins.gradle.execution.GradleRunnerUtil.resolveProjectPath;

@ApiStatus.Internal
public class TasksExecutionSettingsBuilder {
  @SuppressWarnings({"GrUnresolvedAccess", "GroovyAssignabilityCheck"})
  @Language("Groovy")
  private static final String FORCE_COMPILE_TASKS_INIT_SCRIPT_TEMPLATE = """
    projectsEvaluated {\s
      rootProject.findProject('%s')?.tasks?.withType(AbstractCompile) { \s
        outputs.upToDateWhen { false }\s
      }\s
    }
    """;

  private final MultiMap<String, String> buildTasksMap = MultiMap.createLinkedSet();
  private final MultiMap<String, String> initScripts = MultiMap.createLinkedSet();
  private final MultiMap<String, VersionSpecificInitScript> versionedInitScripts = MultiMap.createLinkedSet();

  private final List<Module> modulesToBuild;
  private final List<Module> modulesOfResourcesToBuild;
  private final List<Module> modulesOfFiles;

  private final String gradleVmOptions;

  public TasksExecutionSettingsBuilder(@NotNull Project project, ProjectTask @NotNull ... tasks) {
    gradleVmOptions = GradleSettings.getInstance(project).getGradleVmOptions();
    Map<Class<? extends ProjectTask>, List<ProjectTask>> taskMap = JpsProjectTaskRunner.groupBy(Arrays.asList(tasks));
    modulesToBuild = addModulesBuildTasks(taskMap.get(ModuleBuildTask.class), buildTasksMap, initScripts, versionedInitScripts);
    modulesOfResourcesToBuild =
      addModulesBuildTasks(taskMap.get(ModuleResourcesBuildTask.class), buildTasksMap, initScripts, versionedInitScripts);
    modulesOfFiles = addModulesBuildTasks(taskMap.get(ModuleFilesBuildTask.class), buildTasksMap, initScripts, versionedInitScripts);
    addArtifactsBuildTasks(taskMap.get(ProjectModelBuildTask.class), buildTasksMap, versionedInitScripts);
  }

  public Set<String> getRootPaths() {
    return buildTasksMap.keySet();
  }

  public List<Module> getAffectedModules() {
    return ContainerUtil.concat(modulesToBuild, modulesOfResourcesToBuild, modulesOfFiles);
  }

  public void addInitScripts(String rootProjectPath, VersionSpecificInitScript... initScript) {
    Collection<VersionSpecificInitScript> versionSpecificInitScripts = versionedInitScripts.getModifiable(rootProjectPath);
    Collections.addAll(versionSpecificInitScripts, initScript);
  }

  public Collection<VersionSpecificInitScript> getVersionedInitScripts(String rootProjectPath) {
    return versionedInitScripts.get(rootProjectPath);
  }

  public Collection<String> getInitScripts(String rootProjectPath) {
    return initScripts.get(rootProjectPath);
  }

  public boolean containsTasksToExecuteFor(String rootProjectPath) {
    return getTasksToExecute(rootProjectPath).iterator().hasNext();
  }

  public ExternalSystemTaskExecutionSettings build(String rootProjectPath) {
    ExternalSystemTaskExecutionSettings settings = new ExternalSystemTaskExecutionSettings();
    File projectFile = new File(rootProjectPath);
    final String projectName;
    if (projectFile.isFile()) {
      projectName = projectFile.getParentFile().getName();
    }
    else {
      projectName = projectFile.getName();
    }
    String executionName = GradleBundle.message("gradle.execution.name.build.project.", projectName);
    settings.setExecutionName(executionName);
    settings.setExternalProjectPath(rootProjectPath);
    List<@NlsSafe String> taskNames = ContainerUtil.collect(getTasksToExecute(rootProjectPath).iterator());
    settings.setTaskNames(taskNames);
    settings.setVmOptions(gradleVmOptions);
    settings.setExternalSystemIdString(GradleConstants.SYSTEM_ID.getId());
    return settings;
  }

  private Iterable<String> getTasksToExecute(String rootProjectPath) {
    return buildTasksMap.get(rootProjectPath);
  }

  private static List<Module> addModulesBuildTasks(@Nullable Collection<? extends ProjectTask> projectTasks,
                                                   @NotNull MultiMap<String, String> buildTasksMap,
                                                   @NotNull MultiMap<String, String> initScripts,
                                                   @NotNull MultiMap<String, VersionSpecificInitScript> versionedInitScripts) {
    if (ContainerUtil.isEmpty(projectTasks)) return Collections.emptyList();

    List<Module> affectedModules = new SmartList<>();
    Map<Module, String> rootPathsMap = FactoryMap.create(module -> notNullize(resolveProjectPath(module)));
    for (ProjectTask projectTask : projectTasks) {
      if (!(projectTask instanceof ModuleBuildTask)) continue;

      ModuleBuildTask moduleBuildTask = (ModuleBuildTask)projectTask;
      collectAffectedModules(affectedModules, moduleBuildTask);

      Module module = moduleBuildTask.getModule();
      String rootProjectPath = rootPathsMap.get(module);
      if (isEmpty(rootProjectPath)) continue;

      final String projectId = getExternalProjectId(module);
      if (projectId == null) continue;
      String externalProjectPath = getExternalProjectPath(module);
      if (externalProjectPath == null) continue;

      GradleModuleData gradleModuleData = CachedModuleDataFinder.getGradleModuleData(module);
      if (gradleModuleData == null) continue;

      boolean isGradleProjectDirUsedToRunTasks = gradleModuleData.getDirectoryToRunTask().equals(gradleModuleData.getGradleProjectDir());
      if (!isGradleProjectDirUsedToRunTasks) {
        rootProjectPath = gradleModuleData.getDirectoryToRunTask();
      }

      // all buildSrc runtime projects will be built by gradle implicitly
      if (gradleModuleData.isBuildSrcModule()) {
        continue;
      }

      String gradlePath = gradleModuleData.getGradlePath();
      List<TaskData> taskDataList =
        ContainerUtil.mapNotNull(gradleModuleData.findAll(ProjectKeys.TASK), taskData -> taskData.isInherited() ? null : taskData);
      if (taskDataList.isEmpty()) continue;

      String taskPathPrefix = trimEnd(gradleModuleData.getFullGradlePath(), ":") + ":";
      List<String> gradleModuleTasks = ContainerUtil.map(taskDataList, data -> trimStart(data.getName(), taskPathPrefix));

      Collection<String> projectInitScripts = initScripts.getModifiable(rootProjectPath);
      Collection<String> buildRootTasks = buildTasksMap.getModifiable(rootProjectPath);
      final String moduleType = getExternalModuleType(module);

      if (!moduleBuildTask.isIncrementalBuild() && !(moduleBuildTask instanceof ModuleFilesBuildTask)) {
        projectInitScripts.add(String.format(FORCE_COMPILE_TASKS_INIT_SCRIPT_TEMPLATE, gradlePath));
      }
      if (moduleBuildTask.isIncludeRuntimeDependencies()) {
        // if runtime deps are required, force Gradle to process all resources
        projectInitScripts.add("System.setProperty('org.gradle.java.compile-classpath-packaging', 'true')\n");
      }

      String assembleTask = "assemble";
      boolean buildOnlyResources = projectTask instanceof ModuleResourcesBuildTask;
      String buildTaskPrefix = buildOnlyResources ? "process" : "";
      String buildTaskSuffix = buildOnlyResources ? "resources" : "classes";
      if (GradleConstants.GRADLE_SOURCE_SET_MODULE_TYPE_KEY.equals(moduleType)) {
        String sourceSetName = GradleProjectResolverUtil.getSourceSetName(module);
        String gradleTask = getTaskName(buildTaskPrefix, buildTaskSuffix, sourceSetName);
        if (!addIfContains(taskPathPrefix, gradleTask, gradleModuleTasks, buildRootTasks) &&
            ("main".equals(sourceSetName) || "test".equals(sourceSetName))) {
            buildRootTasks.add(taskPathPrefix + assembleTask);
        }
        for (GradleBuildTasksProvider buildTasksProvider : GradleBuildTasksProvider.EP_NAME.getExtensions()) {
          if (buildTasksProvider.isApplicable(moduleBuildTask)) {
            buildTasksProvider.addBuildTasks(
              moduleBuildTask,
              task -> buildTasksMap.putValue(task.getLinkedExternalProjectPath(), task.getName()),
              (String path, VersionSpecificInitScript script) -> versionedInitScripts.putValue(path, script)
            );
          }
        }
      }
      else {
        String gradleTask = getTaskName(buildTaskPrefix, buildTaskSuffix, null);
        if (addIfContains(taskPathPrefix, gradleTask, gradleModuleTasks, buildRootTasks)) {
          String gradleTestTask = getTaskName(buildTaskPrefix, buildTaskSuffix, "test");
          addIfContains(taskPathPrefix, gradleTestTask, gradleModuleTasks, buildRootTasks);
        }
        else if (gradleModuleTasks.contains(assembleTask)) {
          buildRootTasks.add(taskPathPrefix + assembleTask);
        }
      }
    }
    return affectedModules;
  }

  @NotNull
  private static String getTaskName(@NotNull String taskPrefix, @NotNull String taskSuffix, @Nullable String sourceSetName) {
    if (Strings.isEmpty(sourceSetName)) sourceSetName = "main";
    return new ClassDirectoryBinaryNamingScheme(sourceSetName).getTaskName(taskPrefix, taskSuffix);
  }

  private static void addArtifactsBuildTasks(@Nullable Collection<? extends ProjectTask> tasks,
                                             @NotNull MultiMap<String, String> buildTasksMap,
                                             @NotNull MultiMap<String, VersionSpecificInitScript> versionedInitScripts) {
    if (ContainerUtil.isEmpty(tasks)) return;

    for (ProjectTask projectTask : tasks) {
      if (!(projectTask instanceof ProjectModelBuildTask)) continue;

      ProjectModelBuildTask<?> projectModelBuildTask = (ProjectModelBuildTask<?>)projectTask;
      for (GradleBuildTasksProvider buildTasksProvider : GradleBuildTasksProvider.EP_NAME.getExtensions()) {
        if (buildTasksProvider.isApplicable(projectModelBuildTask)) {
          buildTasksProvider.addBuildTasks(
            projectModelBuildTask,
            task -> buildTasksMap.putValue(task.getLinkedExternalProjectPath(), task.getName()),
            (String path, VersionSpecificInitScript script) -> versionedInitScripts.putValue(path, script)
          );
        }
      }
    }
  }

  private static boolean addIfContains(@NotNull String taskPathPrefix,
                                       @NotNull String gradleTask,
                                       @NotNull List<String> moduleTasks,
                                       @NotNull Collection<String> buildRootTasks) {
    if (moduleTasks.contains(gradleTask)) {
      buildRootTasks.add(taskPathPrefix + gradleTask);
      return true;
    }
    return false;
  }

  private static void collectAffectedModules(@NotNull List<Module> affectedModules, @NotNull ModuleBuildTask moduleBuildTask) {
    Module module = moduleBuildTask.getModule();
    if (moduleBuildTask.isIncludeDependentModules()) {
      OrderEnumerator enumerator = ModuleRootManager.getInstance(module).orderEntries().recursively();
      if (!moduleBuildTask.isIncludeRuntimeDependencies()) {
        enumerator = enumerator.compileOnly();
      }
      enumerator.forEachModule(new CommonProcessors.CollectProcessor<>(affectedModules));
    }
    else {
      affectedModules.add(module);
    }
  }
}


text:
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Package Helpers
    |--------------------------------------------------------------------------
    |
    | This package comes with many pre-built helpers. Activate the ones
    | you wish to use by selecting them here. Valid options include:
    |
    | buttons, confirm, datetime, feedback, formatter, hint, image, money, validation
    |
    */

    'package_helpers' => [],

    /*
    |--------------------------------------------------------------------------
    | Custom Helpers
    |--------------------------------------------------------------------------
    |
    | You are also encouraged to write your own helpers. If you prefer a
    | mapper based inclusion, you can selectively activate your custom
    | helpers by adding them here. Otherwise all PHP files in the
    | Helpers directory will be automatically loaded.
    |
    */

    'custom_helpers' => [],

    /*
    |--------------------------------------------------------------------------
    | Directory
    |--------------------------------------------------------------------------
    |
    | By default this package will look in the application's 'Helpers'
    | directory. However, you may choose to override the directory.
    |
    */

    'directory' => 'Helpers',

    /*
    |--------------------------------------------------------------------------
    | Default Timezone
    |--------------------------------------------------------------------------
    |
    | The 'datetime' helper provides an easy way to format all of your Datetime
    | instances according to a runtime timezone. As a fallback, you may
    | enter your applications's default timezone here.
    |
    */

    'default_timezone' => 'america/chicago',

    /*
    |--------------------------------------------------------------------------
    | Default Image
    |--------------------------------------------------------------------------
    |
    | The 'image' helper provides a simple default image when no image is
    | passed to it. Here you can define which image you would like to
    | use as the fallback image. The path is relative to the
    | resource root, or 'public' directory.
    |
    */

    'default_image' => 'images/noImage.svg',

];


text:
from __future__ import absolute_import

from kafka.common import TopicPartition
from kafka.protocol.struct import Struct
from kafka.protocol.types import Array, Bytes, Int16, Int32, Schema, String

class ConsumerProtocolMemberMetadata(Struct):
    SCHEMA = Schema(
        ('version', Int16),
        ('subscription', Array(String('utf-8'))),
        ('user_data', Bytes))

class ConsumerProtocolMemberAssignment(Struct):
    SCHEMA = Schema(
        ('version', Int16),
        ('assignment', Array(
            ('topic', String('utf-8')),
            ('partitions', Array(Int32)))),
        ('user_data', Bytes))

    def partitions(self):
        return [TopicPartition(topic, partition)
                for topic, partitions in self.assignment # pylint: disable-msg=no-member
                for partition in partitions]

class ConsumerProtocol(object):
    PROTOCOL_TYPE = 'consumer'
    ASSIGNMENT_STRATEGIES = ('roundrobin',)
    METADATA = ConsumerProtocolMemberMetadata
    ASSIGNMENT = ConsumerProtocolMemberAssignment


text:
package marathon

// HealthCheck is the definition for an application health check
type HealthCheck struct {
	Command                *Command `json:"command,omitempty"`
	PortIndex              *int     `json:"portIndex,omitempty"`
	Port                   *int     `json:"port,omitempty"`
	Path                   *string  `json:"path,omitempty"`
	MaxConsecutiveFailures *int     `json:"maxConsecutiveFailures,omitempty"`
	Protocol               string   `json:"protocol,omitempty"`
	GracePeriodSeconds     int      `json:"gracePeriodSeconds,omitempty"`
	IntervalSeconds        int      `json:"intervalSeconds,omitempty"`
	TimeoutSeconds         int      `json:"timeoutSeconds,omitempty"`
	IgnoreHTTP1xx          *bool    `json:"ignoreHttp1xx,omitempty"`
}

// HTTPHealthCheck describes an HTTP based health check
type HTTPHealthCheck struct {
	Endpoint string `json:"endpoint,omitempty"`
	Path     string `json:"path,omitempty"`
	Scheme   string `json:"scheme,omitempty"`
}

// TCPHealthCheck describes a TCP based health check
type TCPHealthCheck struct {
	Endpoint string `json:"endpoint,omitempty"`
}

// CommandHealthCheck describes a shell-based health check
type CommandHealthCheck struct {
	Command PodCommand `json:"command,omitempty"`
}

// PodHealthCheck describes how to determine a pod's health
type PodHealthCheck struct {
	HTTP                   *HTTPHealthCheck    `json:"http,omitempty"`
	TCP                    *TCPHealthCheck     `json:"tcp,omitempty"`
	Exec                   *CommandHealthCheck `json:"exec,omitempty"`
	GracePeriodSeconds     *int                `json:"gracePeriodSeconds,omitempty"`
	IntervalSeconds        *int                `json:"intervalSeconds,omitempty"`
	MaxConsecutiveFailures *int                `json:"maxConsecutiveFailures,omitempty"`
	TimeoutSeconds         *int                `json:"timeoutSeconds,omitempty"`
	DelaySeconds           *int                `json:"delaySeconds,omitempty"`
}

// NewPodHealthCheck creates an empty PodHealthCheck
func NewPodHealthCheck() *PodHealthCheck {
	return &PodHealthCheck{}
}

// NewHTTPHealthCheck creates an empty HTTPHealthCheck
func NewHTTPHealthCheck() *HTTPHealthCheck {
	return &HTTPHealthCheck{}
}

// NewTCPHealthCheck creates an empty TCPHealthCheck
func NewTCPHealthCheck() *TCPHealthCheck {
	return &TCPHealthCheck{}
}

// NewCommandHealthCheck creates an empty CommandHealthCheck
func NewCommandHealthCheck() *CommandHealthCheck {
	return &CommandHealthCheck{}
}

// SetCommand sets the given command on the health check.
func (h *HealthCheck) SetCommand(c Command) *HealthCheck {
	h.Command = &c
	return h
}

// SetPortIndex sets the given port index on the health check.
func (h *HealthCheck) SetPortIndex(i int) *HealthCheck {
	h.PortIndex = &i
	return h
}

// SetPort sets the given port on the health check.
func (h *HealthCheck) SetPort(i int) *HealthCheck {
	h.Port = &i
	return h
}

// SetPath sets the given path on the health check.
func (h *HealthCheck) SetPath(p string) *HealthCheck {
	h.Path = &p
	return h
}

// SetMaxConsecutiveFailures sets the maximum consecutive failures on the health check.
func (h *HealthCheck) SetMaxConsecutiveFailures(i int) *HealthCheck {
	h.MaxConsecutiveFailures = &i
	return h
}

// SetIgnoreHTTP1xx sets ignore http 1xx on the health check.
func (h *HealthCheck) SetIgnoreHTTP1xx(ignore bool) *HealthCheck {
	h.IgnoreHTTP1xx = &ignore
	return h
}

// NewDefaultHealthCheck creates a default application health check
func NewDefaultHealthCheck() *HealthCheck {
	portIndex := 0
	path := ""
	maxConsecutiveFailures := 3

	return &HealthCheck{
		Protocol:               "HTTP",
		Path:                   &path,
		PortIndex:              &portIndex,
		MaxConsecutiveFailures: &maxConsecutiveFailures,
		GracePeriodSeconds:     30,
		IntervalSeconds:        10,
		TimeoutSeconds:         5,
	}
}

// HealthCheckResult is the health check result
type HealthCheckResult struct {
	Alive               bool   `json:"alive"`
	ConsecutiveFailures int    `json:"consecutiveFailures"`
	FirstSuccess        string `json:"firstSuccess"`
	LastFailure         string `json:"lastFailure"`
	LastFailureCause    string `json:"lastFailureCause"`
	LastSuccess         string `json:"lastSuccess"`
	TaskID              string `json:"taskId"`
}

// Command is the command health check type
type Command struct {
	Value string `json:"value"`
}

// SetHTTPHealthCheck configures the pod's health check for an HTTP endpoint.
// Note this will erase any configured TCP/Exec health checks.
func (p *PodHealthCheck) SetHTTPHealthCheck(h *HTTPHealthCheck) *PodHealthCheck {
	p.HTTP = h
	p.TCP = nil
	p.Exec = nil
	return p
}

// SetTCPHealthCheck configures the pod's health check for a TCP endpoint.
// Note this will erase any configured HTTP/Exec health checks.
func (p *PodHealthCheck) SetTCPHealthCheck(t *TCPHealthCheck) *PodHealthCheck {
	p.TCP = t
	p.HTTP = nil
	p.Exec = nil
	return p
}

// SetExecHealthCheck configures the pod's health check for a command.
// Note this will erase any configured HTTP/TCP health checks.
func (p *PodHealthCheck) SetExecHealthCheck(e *CommandHealthCheck) *PodHealthCheck {
	p.Exec = e
	p.HTTP = nil
	p.TCP = nil
	return p
}

// SetGracePeriod sets the health check initial grace period, in seconds
func (p *PodHealthCheck) SetGracePeriod(gracePeriodSeconds int) *PodHealthCheck {
	p.GracePeriodSeconds = &gracePeriodSeconds
	return p
}

// SetInterval sets the health check polling interval, in seconds
func (p *PodHealthCheck) SetInterval(intervalSeconds int) *PodHealthCheck {
	p.IntervalSeconds = &intervalSeconds
	return p
}

// SetMaxConsecutiveFailures sets the maximum consecutive failures on the health check
func (p *PodHealthCheck) SetMaxConsecutiveFailures(maxFailures int) *PodHealthCheck {
	p.MaxConsecutiveFailures = &maxFailures
	return p
}

// SetTimeout sets the length of time the health check will await a result, in seconds
func (p *PodHealthCheck) SetTimeout(timeoutSeconds int) *PodHealthCheck {
	p.TimeoutSeconds = &timeoutSeconds
	return p
}

// SetDelay sets the length of time a pod will delay running health checks on initial launch, in seconds
func (p *PodHealthCheck) SetDelay(delaySeconds int) *PodHealthCheck {
	p.DelaySeconds = &delaySeconds
	return p
}

// SetEndpoint sets the name of the pod health check endpoint
func (h *HTTPHealthCheck) SetEndpoint(endpoint string) *HTTPHealthCheck {
	h.Endpoint = endpoint
	return h
}

// SetPath sets the HTTP path of the pod health check endpoint
func (h *HTTPHealthCheck) SetPath(path string) *HTTPHealthCheck {
	h.Path = path
	return h
}

// SetScheme sets the HTTP scheme of the pod health check endpoint
func (h *HTTPHealthCheck) SetScheme(scheme string) *HTTPHealthCheck {
	h.Scheme = scheme
	return h
}

// SetEndpoint sets the name of the pod health check endpoint
func (t *TCPHealthCheck) SetEndpoint(endpoint string) *TCPHealthCheck {
	t.Endpoint = endpoint
	return t
}

// SetCommand sets a CommandHealthCheck's underlying PodCommand
func (c *CommandHealthCheck) SetCommand(p PodCommand) *CommandHealthCheck {
	c.Command = p
	return c
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="BB_BottomBarItem">
        <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
        <item name="android:layout_width">wrap_content</item>
        <!-- layout_height is ignored since the height is set programmatically in BottomBar
        .updateItems() -->
        <item name="android:layout_height">@dimen/bb_height</item>
    </style>

    <style name="BB_BottomBarItem_TitleStyle">
        <!-- Material spec: "Avoid long text labels as these labels do not truncate or wrap." -->
        <item name="android:singleLine">true</item>
        <item name="android:maxLines">1</item>
        <item name="android:gravity">center_horizontal</item>
    </style>

    <style name="BB_BottomBarItem_Fixed.TitleAppearance" parent="TextAppearance.AppCompat.Body1">
        <item name="android:textSize">14sp</item>
    </style>

    <style name="BB_BottomBarItem_Shifting.TitleAppearance" parent="BB_BottomBarItem_Fixed.TitleAppearance">
        <item name="android:textColor">#FFFFFF</item>
    </style>

    <style name="BB_BottomBarItem_Tablet">
        <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>

    <style name="BB_BottomBarBadge_Text" parent="TextAppearance.AppCompat.Body2">
        <item name="android:textColor">#FFFFFF</item>
        <item name="android:textSize">10sp</item>
        <item name="android:padding">0dp</item>
    </style>
</resources>


text:
using Bikes.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Security;

namespace Bikes.Api
{
    public class RiderController : BikesApiControllerBase
    {
        [HttpGet]
        [Route("api/rider")]
        public IEnumerable<Rider> Get()
        {
            return Rider.getRiders();
        }

        [HttpGet]
        [Route("api/rider/{id:int}")]
        public Rider Get(int id)
        {
            if (id == 0)
            {
                return Rider.findRiderByName(User.Identity.Name);
            }
            else
            {
                return Rider.getRider(id);
            }
        }

        [HttpPost]
        [Route("api/rider")]
        public Rider Post(Rider rider)
        {
            rider.save();
            rider.setPwd(Membership.GeneratePassword(12, 5));

            return rider;
        }

        [HttpPost]
        [Route("api/rider/{id:int}")]
        public Rider Post(int id, Rider rider)
        {
            rider.save();
            return rider;
        }

        [HttpPost]
        [Route("api/rider/{id:int}/pwd")]
        public void Post(int id, PwdVM model)
        {
            Rider rider = Rider.getRider(id);

            rider.setPwd(model.pwd);
        }

        //Fudge.  I cannot get http delete method to work on the live server.  Server always
        //returns 404 not found errors.  Have tried all sorts of fixes but none effective
        //so far.
        [HttpPost]
        [Route("api/rider/{id:int}/delete")]
        public int Post(int id)
        {
            Rider.deleteRider(id);
            return id;
        }

        [HttpDelete]
        [Route("api/rider/{id:int}")]
        public int Delete(int id)
        {
            Rider.deleteRider(id);
            return id;
        }

    }
}


text:
import * as React from 'react';
import { StyleProp, ViewStyle } from 'react-native';

export interface CanvasProps {
    baseUrl?: string;
    originWhitelist?: string[];
    ref: ((canvas: Canvas) => any) | React.RefObject<Canvas>;
    style?: StyleProp<ViewStyle>;
}

export interface DOMMatrix2DInit {
    a?: number;
    b?: number;
    c?: number;
    d?: number;
    e?: number;
    f?: number;
    m11?: number;
    m12?: number;
    m21?: number;
    m22?: number;
    m41?: number;
    m42?: number;
}

export interface CanvasGradient {
    addColorStop(offset: number, color: string): void;
}

export interface CanvasPattern {
    setTransform(transform?: DOMMatrix2DInit): void;
}

export interface CanvasRenderingContext2D {
    fillStyle: string | CanvasGradient | CanvasPattern;
    font: string;
    globalAlpha: number;
    globalCompositionOperation: string;
    lineCap: string;
    lineDashOffset: number;
    lineJoin: string;
    lineWidth: number;
    miterLimit: number;
    shadowBlur: number;
    shadowColor: string;
    shadowOffsetX: number;
    shadowOffsetY: number;
    strokeStyle: string;
    textAlign: string;
    arc: (x: number, y: number, r: number, sAngle: number, eAngle: number, counterClockwise?: boolean) => void;
    arcTo: (x1: number, y1: number, x2: number, y2: number, r: number) => void;
    beginPath: () => void;
    bezierCurveTo: (cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number) => void;
    clearRect: (x: number, y: number, width: number, height: number) => void;
    clip: () => void;
    closePath: () => void;
    createImageData: (
        //
        width: number,
        height: number,
        imageData: ImageData,
    ) => void;
    createLinearGradient: (x0: number, yo: number, x1: number, y1: number) => CanvasGradient;
    createPattern: () => void;
    createRadialGradient: (x0: number, y0: number, r0: number, x1: number, y1: number, r1: number) => void;
    drawFocusIfNeeded: (html: HTMLElement) => void;
    drawImage: (
        image: Image,
        dx: number,
        dy: number,
        sx?: number,
        sy?: number,
        sWidth?: number,
        sHeight?: number,
        dWidth?: number,
        dHeight?: number,
    ) => void;
    drawWidgetAsOnScreen: (window: any) => void;
    drawWindow: (window: any, x: number, y: number, w: number, h: number, bgColor: string, flags?: any) => void; //
    fill: (Path2D?: Path2D, fillRule?: any) => void;
    fillRect: (x: number, y: number, width: number, height: number) => void;
    fillText: (text: string, x: number, y: number, maxWidth?: number) => void;
    ellipse: (
        x: number,
        y: number,
        radiusX: number,
        radiusY: number,
        rotation: number,
        startAngle: number,
        endAngle: number,
        anticlockwise?: boolean,
    ) => void;
    getImageData: (sx: number, sy: number, sw: number, sh: number) => Promise<ImageData>;
    getLineDash: () => number[];
    isPointInPath: (x: number, y: number, fillRule: any, path: Path2D) => boolean;
    isPointInStroke: (x: number, y: number, path: Path2D) => boolean;
    lineTo: (x: number, y: number) => void;
    measureText: (text: string) => any;
    moveTo: (x: number, y: number) => void;
    putImageData: (
        imageData: ImageData,
        dx: number,
        dy: number,
        dirtyX?: number,
        dirtyY?: number,
        dirtyWidth?: number,
        dirtyHeight?: number,
    ) => void;
    quadraticCurveTo: (cpx: number, cpy: number, x: number, y: number) => void;
    rect: (x: number, y: number, width: number, height: number) => void;
    restore: () => void;
    rotate: (angle: number) => void;
    save: () => void;
    scale: (x: number, y: number) => void;
    setLineDash: (segments: number[]) => void;
    setTransform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
    stroke: (path?: Path2D) => void;
    strokeRect: (x: number, y: number, width: number, height: number) => void;
    strokeText: (text: string, x: number, y: number, maxWidth?: number) => void;
    transform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
    translate: (x: number, y: number) => void;
}

export default class Canvas extends React.Component<CanvasProps> {
    width: number;
    height: number;
    toDataURL: () => Promise<string>;
    getContext: (context: string) => CanvasRenderingContext2D;
}

export class Image {
    constructor(canvas: Canvas, height?: number, width?: number);
    crossOrigin: string | undefined;
    height: number;
    width: number;
    src: string;
    addEventListener: (event: string, func: (...args: any) => any) => void;
}

export class ImageData {
    constructor(canvas: Canvas, data: number[], height: number, width: number);
    readonly data: Uint8ClampedArray;
    readonly height: number;
    readonly width: number;
}

export class Path2D {
    constructor(canvas: Canvas, ...args: any);
    addPath: (
        path: Path2D,
        transform?: {
            a: number;
            b: number;
            c: number;
            d: number;
            e: number;
            f: number;
        },
    ) => void;

    closePath: CanvasRenderingContext2D['closePath'];
    moveTo: CanvasRenderingContext2D['moveTo'];
    lineTo: CanvasRenderingContext2D['lineTo'];
    bezierCurveTo: CanvasRenderingContext2D['bezierCurveTo'];
    quadraticCurveTo: CanvasRenderingContext2D['quadraticCurveTo'];
    arc: CanvasRenderingContext2D['arc'];
    arcTo: CanvasRenderingContext2D['arcTo'];
    ellipse: CanvasRenderingContext2D['ellipse'];
    rect: CanvasRenderingContext2D['rect'];
}


text:
package net.jmreyes.tutela.ui.patient.medicationdetails;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import net.jmreyes.tutela.R;
import net.jmreyes.tutela.model.extra.MyMedication;
import net.jmreyes.tutela.ui.common.BaseActivity;

import javax.inject.Inject;
import java.util.Arrays;
import java.util.List;

/**
 * Created by juanma on 3/11/14.
 */
public class MyMedicationDetailsActivity extends BaseActivity implements MyMedicationDetailsView {
    public static final String ARG_TREATMENT_ID = "treatmentId";
    public static final String ARG_MEDICATION_ID = "medicationId";

    @Inject
    MyMedicationDetailsPresenter presenter;

    @InjectView(R.id.notes_from_doctor_content) TextView notesFromDoctor;
    @InjectView(R.id.doctor_content) TextView doctorName;

    private String treatmentId;
    private String medicationId;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_medication_details);
        ButterKnife.inject(this);

        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            treatmentId = bundle.getString(ARG_TREATMENT_ID);
            medicationId = bundle.getString(ARG_MEDICATION_ID);
        }

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        if (toolbar != null) {
            setSupportActionBar(toolbar);
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        showLoadingBar();
        presenter.makeRequest(treatmentId, medicationId);
    }

    @Override
    protected List<Object> getModules() {
        return Arrays.<Object>asList(new MyMedicationDetailsModule(this));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    public void displayResults(MyMedication myMedication) {
        hideLoadingBar();

        notesFromDoctor.setText(myMedication.getNotes());
        doctorName.setText(myMedication.getFullName());
        getSupportActionBar().setTitle(myMedication.getName());
    }

    @Override
    public void displayError() {
        showErrorInLoadingBar(null);
    }

    @OnClick(R.id.loadingLayoutRetryButton)
    public void onRetryClick() {
        hideErrorInLoadingBar();
        presenter.makeRequest(treatmentId, medicationId);
    }
}


text:
import padLeft from 'ringcentral-integration/lib/padLeft';

export default function formatDuration(duration) {
  if (Number.isNaN(duration)) {
    return '--:--';
  }
  const intDuration = typeof duration === 'number' ?
    Math.round(duration) :
    parseInt(duration, 10);

  const seconds = padLeft(intDuration % 60, '0', 2);
  const minutes = padLeft(Math.floor(intDuration / 60) % 60, '0', 2);
  const hours = Math.floor(intDuration / 3600) % 24;

  return `${hours > 0 ? (`${padLeft(hours, '0', 2)}:`) : ''}${minutes}:${seconds}`;
}


text:
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Luis;
using Microsoft.Bot.Builder.Luis.Models;
using Microsoft.Bot.Connector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AdaSDK;
using System.Net.Http;
using System.Configuration;
using System.Threading;
using AdaBot.Answers;
using AdaBot.Bot.Utils;
using AdaBot.Models.EventsLoaderServices;
using System.Text.RegularExpressions;
using HtmlAgilityPack;
using Microsoft.Bot.Builder.FormFlow;
using System.Diagnostics;
using AdaBot.Models.FormFlows;

namespace AdaBot.Dialogs
{
    [Serializable]
    public class NotAllowedAdaDialog : LuisDialog<object>
    {
        public NotAllowedAdaDialog(params ILuisService[] services) : base(services)
        {

        }

        protected override async Task MessageReceived(IDialogContext context, IAwaitable<IMessageActivity> item)
        {
            AdaClient client = new AdaClient() { WebAppUrl = $"{ ConfigurationManager.AppSettings["WebAppUrl"] }" };
            var idUser = context.Activity.From.Id;

            var accessAllow = await client.GetAuthorizationFacebook(idUser);
            if (accessAllow == "true")
            {
                await context.Forward(new AdaDialog(
                new LuisService(new LuisModelAttribute(
                ConfigurationManager.AppSettings["ModelId"],
                ConfigurationManager.AppSettings["SubscriptionKey"]))),
                BasicCallback, context.Activity as Activity, CancellationToken.None);
            }
            else
            {
                var message = (Activity)await item;
                await base.MessageReceived(context, item);
            }
        }

        [LuisIntent("")]
        public async Task None(IDialogContext context, LuisResult result)
        {
            await context.Forward(new TrivialLuisDialog(new LuisService(new LuisModelAttribute(
                           ConfigurationManager.AppSettings["ModelIdTrivial"],
                           ConfigurationManager.AppSettings["SubscriptionKeyTrivial"]))),
                   BasicCallback, context.Activity as Activity, CancellationToken.None);
        }

        [LuisIntent("Possibilities")]
        public async Task Possibilities(IDialogContext context, LuisResult result)
        {
            CreateDialog createCarousel = new CreateDialog();

            Activity replyToConversation = createCarousel.CarouselPossibilitiesNotAllowed(context);

            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("What'sUp")]
        public async Task Event(IDialogContext context, LuisResult result)
        {
            CreateDialog createCarousel = new CreateDialog();

            Activity replyToConversation = await createCarousel.GetEvent(context);

            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        private async Task BasicCallback(IDialogContext context, IAwaitable<object> result)
        {
            context.Wait(this.MessageReceived);
        }

        [LuisIntent("SeeNow")]
        public async Task SeeNow(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("SendMessage")]
        public async Task SendMessage(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("BestFriend")]
        public async Task BestFriend(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("GetVisitsToday")]
        public async Task GetVisitsToday(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("GetLastVisitPerson")]
        public async Task GetLastVisitPerson(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("GetStatsVisits")]
        public async Task GetLastVisGetStatsVisitsitPerson(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("GetVisitsPersonByFirstname")]
        public async Task GetVisitsPersonByFirstname(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("GetAverageVisits")]
        public async Task GetAverageVisits(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }

        [LuisIntent("PassagePerson")]
        public async Task PassagePerson(IDialogContext context, LuisResult result)
        {
            Activity replyToConversation;
            replyToConversation = ((Activity)context.Activity).CreateReply($"{Dialog.NotAllowed.Spintax()}");
            replyToConversation.Recipient = context.Activity.From;
            replyToConversation.Type = "message";
            await context.PostAsync(replyToConversation);
            context.Wait(MessageReceived);
        }
    }
}


text:
def decorator_method(f):
    def inner(c):
        print "inner: ", c
        return f(c)

    return inner

class ClassUnderTest:
    C_New = "CCCCC"

    def __init__(self, a , b):
        self.a = a
        self.b = b

    @decorator_method
    def test_func(self):
        print 'in test_func'
        print self.a
        print self.b
        if hasattr(self, 'New'):
            print self.New

c = ClassUnderTest(1, 2)
c.test_func()