text:
var App = Ember.Application.create({
    LOG_TRANSITIONS: true
});

App.Router.map(function() {
    this.route('posts', function() {
        this.route('new');
    });
    this.route('post', {
        path: '/posts/:post_id'
    }, function() {
        this.route('comments', function() {
            this.route('new');
            this.route('create');
        });
        this.route('comment', {
            path: 'comments/:comment_id'
        });
    });
});

App.PostsIndexRoute = Ember.Route.extend({
    model: function() {
        return this.get('store').find('post');
    }
});

App.PostIndexRoute = Ember.Route.extend({
    model: function() {
        return this.modelFor('post');
    }
});

App.PostsNewRoute = Ember.Route.extend({
    setupController: function(controller, model) {
        controller.set('title', null);
        controller.set('text', null);
    }
});

App.PostCommentsNewRoute = Ember.Route.extend({
    setupController: function(controller, model) {
        controller.set('text', null);
    }
});

App.PostCommentsNewController = Ember.Controller.extend({
    needs: 'post',

    text: null,

    actions: {
        save: function() {
            var post = this.get('controllers.post.content');
            var comment = this.get('store').createRecord('comment', {
                post: post,
                text: this.get('text')
            });
            comment.save().then(function(comment) {
                post.get('comments').pushObject(comment);
            });
            this.get('target').transitionTo('post.index');
        }
    }
});

App.PostsNewController = Ember.Controller.extend({

    title: null,
    text: null,

    actions: {
        save: function(post) {
            var me = this;
            var post = this.get('store').createRecord('post', {
                title: this.get('title'),
                text: this.get('text')
            });
            post.save().then(function(post) {
                me.get('target').transitionTo('posts.index');
            });
        }
    }
});

App.ApplicationAdapter = DS.FixtureAdapter;

App.Post = DS.Model.extend({
    comments: DS.hasMany('comment', {
        async: true
    }),
    title: DS.attr('string')
});

App.Comment = DS.Model.extend({
    post: DS.belongsTo('post'),
    text: DS.attr('string')
});

App.Post.FIXTURES = [{
    id: "1",
    title: "First Post",
    comments: [1, 2, 3]
}, {
    id: "2",
    title: "Second Post",
    comments: [4, 5, 6]
}, {
    id: "3",
    title: "Third Post",
    comments: [7, 8, 9]
}];

App.Comment.FIXTURES = [{
    id: "1",
    text: "First Comment"
}, {
    id: "2",
    text: "Second Comment"
}, {
    id: "3",
    text: "Third Comment"
}, {
    id: "4",
    text: "Fourth Comment"
}, {
    id: "5",
    text: "Fifth Comment"
}, {
    id: "6",
    text: "Sixth Comment"
}, {
    id: "7",
    text: "Seventh Comment"
}, {
    id: "8",
    text: "Eighth Comment"
}, {
    id: "9",
    text: "Ninth Comment"
}];


text:
<?php

use Admin\Models\AdminModel;

class Module extends AdminModel
{

    protected $table = 'modules';

    public function name($name)
    {
        $record = $this->db
            ->from($this->table)
            ->where('name', $name)
            ->get()
            ->row();

        if ($record) {
            $record->arguments = $this->arguments($record);
        }
        return $record;
    }

    public function find($id)
    {
        $record = $this->db
            ->from($this->table)
            ->where('id', $id)
            ->get()
            ->row();

        if ($record) {
            $record->arguments = $this->arguments($record);
        }
        return $record;
    }

    public function all($paginate = [])
    {
        $this->setFilter();
        $this->setPaginate($paginate);

        $records = $this->db
            ->select("{$this->table}.*, (SELECT COUNT(id) FROM module_arguments WHERE module_arguments.module = {$this->table}.name AND module_arguments.language = '{$this->language}') arguments", false)
            ->from($this->table)
            ->order_by('order', 'asc')
            ->order_by('id', 'asc')
            ->get()
            ->result();

        foreach ($records as $record) {
            if (! file_exists(APPPATH .'controllers/'. $record->controller .'.php') || empty($record->controller)) {
                $record->controller = false;
            }
        }

        return $records;
    }

    public function count()
    {
        $this->setFilter();

        return $this->db
            ->from($this->table)
            ->count_all_results();
    }

    public function update($record, $data = array())
    {
        $affected = 0;

        foreach ($record->arguments as $argument) {
            if ($this->input->post($argument->name) !== false) {
                $this->db
                    ->where('id', $argument->id)
                    ->update('module_arguments', array(
                        'value' => $this->input->post($argument->name)
                    ));
                if ($this->db->affected_rows() > 0) {
                    $affected++;
                }
            }
        }

        return $affected;
    }

    public function arguments($record)
    {
        $results = $this->db
            ->from('module_arguments')
            ->where('module', $record->name)
            ->where('language', $this->language)
            ->get()
            ->result();

        foreach ($results as $result) {
            $result->arguments = json_decode($result->arguments, true);
            $result->arguments['value'] = $result->value;
        }

        return $results;
    }

    public function delete($data)
    {
        return parent::delete($this->table, $data);
    }

    public function order($ids)
    {
        return parent::order($this->table, $ids);
    }

}

redpajama_set_name: RedPajamaGithub


text:
title: "Securing RabbitMQ"
description: "This guide describes important strategies and best practices for securing RabbitMQ, the supported transport mechanism for any Sensu deployment."
product: "Sensu Core"
version: "1.9"
weight: 9
previous: ../securing-sensu
next: ../securing-redis
menu:
  sensu-core-1.9:
    parent: guides
---

As the supported transport mechanism for any Sensu deployment, RabbitMQ has its own set of security concerns, from ensuring that VHOST permissions are set correctly, to adding SSL/TLS encryption between clients, consumers, and queues. This guide will discuss how to properly secure RabbitMQ as one of the core elements of a Sensu deployment.

Before we dive too deep in the article, you may want to familiarize yourself with [RabbitMQ permissions][1]. It's important to note that RabbitMQ makes a distinction between _configure_, _write_, and _read_ permissions. With that in mind, let's move on to what we'll cover in this guide.

## Objectives

This guide will discuss the following:

* [VHost Permissions for Sensu Clients](#vhost-permissions-clients)
* [VHost Permissions for Sensu Servers](#vhost-permissions-servers)
* [SSL/TLS Configuration](#ssl-tls-configuration)

## Vhost Permissions for Sensu Clients{#vhost-permissions-clients}

In this discussion, let's start with an example from one of our RabbitMQ [installation guides][2]:

{{< code json >}}
{
  "rabbitmq": {
    "host": "127.0.0.1",
    "port": 5671,
    "vhost": "/sensu",
    "user": "sensu",
    "password": "secret",
    "heartbeat": 30,
    "prefetch": 50,
    "ssl": {
      "cert_chain_file": "/etc/sensu/ssl/cert.pem",
      "private_key_file": "/etc/sensu/ssl/key.pem"
    }
  }
}{{< /code >}}

From what we have above, there are several things that make this configuration far from being production-ready/production-safe in terms of permissions:

* The user that's present has full access to the vhost `/sensu`
* If you've gone through the introductory guides, then it's likely that you're re-using the configuration across your Sensu server and client configurations

What this means is that it's possible for Sensu clients to snoop on other clients' keepalives, or for a malicious actor to disguise themselves as a trusted Sensu client and perform unwanted actions on hosts, among other things. It's critical that you lock down permissions in your environment to prevent any undesirable actions from taking place.

Depending on your infrastructure and the naming conventions that your organization has adopted, it's possible to approach locking down queues in one of two ways:

* [Strict permissions for hosts with predictable hostnames](#client-perms-strict)
* [Less strict permissions for hosts with unpredictable hostnames](#client-perms-loose)

### Strict Permissions for Predictable Clients{#client-perms-strict}

In our [RabbitMQ installation documentation][3], we go over setting the permissions for a client, and it looks like this:

{{< code shell >}}
sudo rabbitmqctl add_user sensu secret
sudo rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
{{< /code >}}

While fine for an example, we recommend that you have the permissions locked down to the queues that clients will need to write to, which are:

* The `keepalives` queue
* The `results` queue
* The `client` queue (e.g., for a client named `sensu-client-01`, there would be a queue of the same name)

For a visual representation of the queues that clients have access to, let's take a quick look at a graphical representation of AMQP entities in Sensu:

{{< figure src="/images/core/securing_rabbitmq/amqp_entities_sensu.png" alt="Diagram or AMQP entities in Sensu" link="/images/core/securing_rabbitmq/amqp_entities_sensu.png" target="_blank" >}}

So how do we lock down permissions for our clients?

We'll first start by creating a separate user. In the case of our 3rd point above, and cases where our client hostnames follow a predictable pattern, you can create a user with that node's hostname:

{{< code shell >}}
sudo rabbitmqctl add_user sensu-client-01 <PASSWORD>{{< /code >}}

From there we'll need to lock the client down to just the queues that it needs access to:

{{< code shell >}}
$ rabbitmqctl set_permissions -p /sensu sensu-client-01 '((?!keepalives|results).)*' '^(keepalives|results|sensu-client-01.*)$' '((?!keepalives|results).)*'{{< /code >}}

So we know that works for clients with predictable hostnames. What about clients that don't have a hostname we can predict?

### Less Strict Permissions for Clients{#client-perms-loose}

For hosts that have less-than-predictable hostnames, you can tighten down the permissions a bit, though the queue you'll be missing is the `client`-specific queue. So, our permissions would look more like the following:

{{< code shell >}}
sudo rabbitmqctl add_user <CLIENT-USER> <CLIENT-PASS>{{< /code >}}

{{< code shell >}}
rabbitmqctl set_permissions -p /sensu <CLIENT-USER> '((?!keepalives|results).)*' '.*' '((?!keepalives|results).)*'{{< /code >}}

This means that the client user we create for our randomly-named clients will have full `write` permissions.

## Vhost Permissions for Sensu Servers{#vhost-permissions-servers}

Vhost permissions for our servers will function more like what you can find in our RabbitMQ installation documentation. In this case, our permissions will be open for our server user. So we'll start off by creating our server user:

{{< code shell >}}
sudo rabbitmqctl add_user <SERVER-USER> <PASSWORD>{{< /code >}}

And we'll set the permissions so that the user has full control:

{{< code shell >}}
sudo rabbitmqctl set_permissions -p /sensu <SERVER-USER> ".*" ".*" ".*"{{< /code >}}

## SSL/TLS Configuration{#ssl-tls-configuration}

In our previous guide on securing Sensu, we noted that it's possible to encrypt communication between clients, servers, and the transport. We'll build on what we discussed in the previous article, and add an example SSL/TLS configuration here so that all of the data flowing between our Sensu components is encrypted. For RabbitMQ, your configuration to set up SSL/TLS should look like the following:

{{< code shell >}}[
 {rabbit, [
    {ssl_listeners, [5671]},
    {ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},
                   {certfile,"/etc/rabbitmq/ssl/cert.pem"},
                   {keyfile,"/etc/rabbitmq/ssl/key.pem"},
                   {versions, ['tlsv1.2']},
                   {ciphers,  [{rsa,aes_256_cbc,sha256}]},
                   {verify,verify_peer},
                   {fail_if_no_peer_cert,true}]}
  ]}
].{{< /code >}}

What this now means is that our clients will be pointing at our RabbitMQ instances with a configuration that looks something similar to:

{{< code json >}}
{
 "host": "127.0.0.1",
 "port": 5671,
 "vhost": "/sensu",
 "user": "<CLIENT-USER",
 "password": "<CLIENT-PASS",
 "heartbeat": 30,
 "prefetch": 50,
 "ssl": {
   "cert_chain_file": "/etc/sensu/ssl/cert.pem",
   "private_key_file": "/etc/sensu/ssl/key.pem"
 }
}{{< /code >}}

## Wrapping it Up

In this guide, we've built on the things we've learned in the previous guide on [securing Sensu][4] and added the following to our Sensu deployment:

* A separate client user
* Separate permissions to our RabbitMQ vhost for our client and server users
* A separate server user
* SSL/TLS configuration for encrypting traffic between our clients, servers, and transport

We'll continue building on our securing Sensu guide series and will cover strategies and best practices for securing our Redis component of our Sensu deployment. Click the link at the bottom to continue on.

[1]: https://www.rabbitmq.com/access-control.html#permissions
[2]: ../../reference/rabbitmq/#sensu-rabbitmq-configuration-examples
[3]: ../../installation/install-rabbitmq/
[4]: ../securing-sensu


text:
package cane.brothers.spring.web;

public class CronDto {

	private String expression;

	/**
	 * Default constructor
	 */
	public CronDto() {
		super();
	}

	public CronDto(String expression) {
		super();
		this.expression = expression;
	}

	public String getExpression() {
		return expression;
	}

	public void setExpression(String expression) {
		this.expression = expression;
	}

	@Override
	public String toString() {
		return "CronDto [expression=" + expression + "]";
	}
}


text:
{% extends 'reports/report.html' %}
{% load bootstrap3 %}

{% block report-form %}

    <form class="form form-horizontal" method="GET" action="">

      {% if filter.form.partner %}
        {% bootstrap_field filter.form.partner layout='horizontal' %}
      {% endif %}
      {% bootstrap_field filter.form.shipment layout='horizontal' %}
      {% bootstrap_field filter.form.status layout='horizontal' %}

          <button type="submit" class="btn btn-primary" id="btn-update-filters">Update Filters</button>
          Clear Filters

    </form>

{% endblock report-form %}

{% block extra-js %}
  {{ block.super }}

{% endblock %}


text:
Types for Google Cloud Beyondcorp Appconnectors v1 API
======================================================

.. automodule:: google.cloud.beyondcorp_appconnectors_v1.types
    :members:
    :show-inheritance:


text:
// -------------------------------------------------------------------------------------
//         Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
//                       For email, run on linux (perl v5.8.5):
//   perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0a"'
// -------------------------------------------------------------------------------------
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
    TreeNode *newroot = nullptr;

    void upsideDownBT(TreeNode *nroot, TreeNode *prevParent, TreeNode *prevRight) {
        if (nroot->left == NULL) {
            newroot = nroot;
        } else {
            upsideDownBT(nroot->left, nroot, nroot->right);
        }
        nroot->left  = prevRight;
        nroot->right = prevParent;
    }
public:
    TreeNode* upsideDownBinaryTree(TreeNode* root) {
        if (root == NULL) return NULL;
        if (root->left == NULL) return root;
        upsideDownBT(root->left, root, root->right);
        root->left = root->right = NULL;
        return newroot;
    }
};


text:
package com.conciseweather.app.model;

/**
 * Created by Ken on 2015/7/30.
 */
public class WeatherNow {

    private String cityName;
    private String weatherText;
    private String temp;
    private String flTemp;

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getWeatherText() {
        return weatherText;
    }

    public void setWeatherText(String weatherText) {
        this.weatherText = weatherText;
    }

    public String getTemp() {
        return temp;
    }

    public void setTemp(String temp) {
        this.temp = temp;
    }

    public String getFlTemp() {
        return flTemp;
    }

    public void setFlTemp(String flTemp) {
        this.flTemp = flTemp;
    }
}


text:
<?php

return array(

	/*
	|--------------------------------------------------------------------------
	| Email Language Lines
	|--------------------------------------------------------------------------
	|
	| The following are localized texts that are used for outbound emails
	|
	*/

	"forgot_subject"     => "Notification de réinitialisation de mot de passe",
	"hello_user"         => "Bonjour %s,",
	"password_reset"     => "Votre mot de passe pour %s a été réinitialisé.",
	"new_password"       => "Votre nouveau mot de passe: <b>%s</b>",
	"click_login"        => "Cliquez ici pour vous connecter: %s",
	"autogen_mail"       => "Ceci est un message généré automatiquement. Ne pas répondre à cette adresse.",
	"share_subject"      => "%s: %s",

);


text:
<?php

namespace PhpOffice\PhpWord\Writer\HTML\Style;

/**
 * Paragraph style HTML writer
 *
 * @since 0.10.0
 */
class Paragraph extends AbstractStyle
{
    /**
     * Write style
     *
     * @return string
     */
    public function write()
    {
        $style = $this->getStyle();
        if (!$style instanceof \PhpOffice\PhpWord\Style\Paragraph) {
            return '';
        }
        $css = array();

        // Alignment
        $alignment = $style->getAlignment();
        if (!is_null($alignment)) {
            $alignmentValue = $alignment->getValue();
            $css['text-align'] = $this->getValueIf(!is_null($alignmentValue), $alignmentValue);
        }

        // Spacing
        $spacing = $style->getSpace();
        if (!is_null($spacing)) {
            $before = $spacing->getBefore();
            $after = $spacing->getAfter();
            $css['margin-top'] = $this->getValueIf(!is_null($before), ($before / 20) . 'pt');
            $css['margin-bottom'] = $this->getValueIf(!is_null($after), ($after / 20) . 'pt');
        }

        return $this->assembleCss($css);
    }
}


text:
print_buffer::print_buffer(int buffer_size)
{
	this->m_buffer_size = buffer_size;
	this->m_buffer = new char[buffer_size];
	this->m_space_used = 0;
}

void print_buffer::add_string(const char* string, size_t length)
{
	// Digest the buffer if it is full
	if( m_space_used + length + 1 >= m_buffer_size )
		digest();

	// Copy the string if there is room
	if( m_space_used + length + 1 >= m_buffer_size )
	{
		// Digest this string without buffering it
		fwrite(string, length, 1, stdout);
	}else{
		// Add it to the buffer
		memcpy( m_buffer + m_space_used, string, length );
		m_space_used += length;
		m_buffer[m_space_used] = 0;
	}
}

void print_buffer::add_string(const char* string)
{
	int length = strlen(string);
	add_string(string, length);
}

void print_buffer::add_string(string string)
{
	add_string(string.c_str(), string.length());
}

void print_buffer::add_json_string(string json)
{
	// Json string building is formed as an array of json objects.
	// We prepend "[" at the first log, comma delmit, then post-fix a "]" upon completion.
	if (m_is_start)
	{
		add_string("[" + json);
		m_is_start = false;
		m_add_json_close = true;
	}
	else
	{
		add_string("," + json);
	}
}

void print_buffer::digest()
{
	if( m_space_used > 0 )
	{
		// Print the current buffer
		fwrite( m_buffer, 1, m_space_used, stdout);
		fflush( stdout );
		m_buffer[0] = 0;
		m_space_used = 0;
	}
}

print_buffer::~print_buffer(void)
{
	if (m_add_json_close)
		add_string("]");
	digest();
	delete[] m_buffer;

}


text:
<?php

/**
 * An object of this class represents the Webdav property <name>.
 *
 * @property string $name
 *           The display name.
 *
 * @version //autogentag//
 * @package Webdav
 */
class ezcWebdavDisplayNameProperty extends ezcWebdavLiveProperty
{
    /**
     * Creates a new ezcWebdavDisplayNameProperty.
     *
     * The $name paramater is the display name.
     *
     * @param string $name The display name.
     * @return void
     */
    public function __construct( $name = null )
    {
        parent::__construct( 'displayname' );

        $this->displayName = $name;
    }

    /**
     * Sets a property.
     *
     * This method is called when an property is to be set.
     *
     * @param string $propertyName The name of the property to set.
     * @param mixed $propertyValue The property value.
     * @return void
     * @ignore
     *
     * @throws ezcBasePropertyNotFoundException
     *         if the given property does not exist.
     * @throws ezcBaseValueException
     *         if the value to be assigned to a property is invalid.
     * @throws ezcBasePropertyPermissionException
     *         if the property to be set is a read-only property.
     */
    public function __set( $propertyName, $propertyValue )
    {
        switch ( $propertyName )
        {
            case 'displayName':
                if ( !is_string( $propertyValue ) && $propertyValue !== null )
                {
                    return $this->hasError( $propertyName, $propertyValue, 'string' );
                }

                $this->properties[$propertyName] = $propertyValue;
                break;

            default:
                parent::__set( $propertyName, $propertyValue );
        }
    }

    /**
     * Returns if property has no content.
     *
     * Returns true, if the property has no content stored.
     *
     * @return bool
     */
    public function hasNoContent()
    {
        return $this->properties['displayName'] === null;
    }
}

?>


text:
package org.shiver.command;

import org.junit.Assert;
import org.junit.Test;
import org.springframework.shell.core.CommandResult;

public class ProxyListCommandTest extends AbstractCommandTest
{
	private final String COMMAND = "proxy list";

	/**
	 *
	 */
	@Test
	public void proxyListTest()
	{
		String cmd = String.format("%s", COMMAND);
		CommandResult cr = getShellComponent().
				executeCommand(cmd);

		Assert.assertEquals(true, cr.isSuccess());
	}

	/**
	 *
	 */
	@Test
	public void proxyListInvalidCommandTest()
	{
		String cmd = String.format("%s", "proxy");
		CommandResult cr = getShellComponent().
				executeCommand(cmd);

		Assert.assertEquals(false, cr.isSuccess());
	}

	/**
	 *
	 */
	@Test
	public void proxyListInvalidCommandTest2()
	{
		String cmd = String.format("%s", "list");
		CommandResult cr = getShellComponent().
				executeCommand(cmd);

		Assert.assertEquals(false, cr.isSuccess());
	}
}


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"/>
<title>Core Plot (Mac OS): Scatter Plot Bindings</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>

Core Plot (Mac OS)

Cocoa plotting framework for Mac OS X and iOS

Main Page

Animation & Constants

Classes

Files

Scatter Plot Bindings

Plot Binding Identifiers

   Collaboration diagram for Scatter Plot Bindings:

<map name="group____plot__bindings__scatter__plot" id="group____plot__bindings__scatter__plot">
<area shape="rect" id="node1" href="group__plot_bindings.html" title="Plot Binding Identifiers" alt="" coords="5,5,173,35"/></map>

NSString *const 	CPTScatterPlotBindingXValues

 	X values.

NSString *const 	CPTScatterPlotBindingYValues

 	Y values.

NSString *const 	CPTScatterPlotBindingPlotSymbols

 	Plot symbols.

Variable Documentation

          NSString* const CPTScatterPlotBindingPlotSymbols

Plot symbols.

          NSString* const CPTScatterPlotBindingXValues

X values.

          NSString* const CPTScatterPlotBindingYValues

Y values.

Generated by


text:
TEST1() {
     DEBUG=1
     DEBUG_BANNER "Show basic container launching in interactive mode"

     #echo; pause "Starting long-lived Docker container in interactive mode:"
     #CMD="while true;do echo 'hello world'; date; sleep 1;done"
     #CMD="while true;do echo \\\`date\\\` 'hello world'; sleep 1;done"
     CMD="while true;do echo \\\$(date) 'hello world'; sleep 1;done"
     #echo E
     SHOW_DOCKER run -i -t base /bin/sh -c "\"$CMD\""
     #SHOW_DOCKER run -i -t base /bin/sh -c "$CMD"
     #SHOW_DOCKER run -i -t base /bin/sh -c $CMD
     #SHOW_DOCKER run -i -t base /bin/sh -c "\"$CMD\""
}


text:
@interface PodsDummy_Pods_HYUIExtensions : NSObject
@end
@implementation PodsDummy_Pods_HYUIExtensions
@end


text: data/sphere926.pwn data/sphere_1k.xyz


text:
cd /partition/bocian/VFBTools/DrosAdultTAGdomains/
git pull
source ../python-modules-2.6/bin/activate
python ../IndexStackConv/nrrd2wlzDom.py individualDomainFiles/domain template/background.wlz ../Woolz2013Full/bin/ ../Fiji/ImageJ-linux64 0.46 0.4612588
deactivate
mv out.wlz combinedIndexFiles/composite.wlz


text:
layout: page
title: wikinet
description: visualizing concept networks
img: /assets/img/big_graph.png
importance: 3
category: work
---

In my recent paper,
 we use persistent homology to identify knowledge gaps in networks of hyperlinked articles on Wikipedia. You can explore the networks and knowledge gaps that have been filled.

      Subject:
      <select></select>

      Year:
      <input type="range" id="year_slider" min="0" max="10" value="10" step="1">

##### Notes
* I used [`dionysus2`](https://www.mrzv.org/software/dionysus2/) to calculate persistent homology.
* [`dionysus2`](https://www.mrzv.org/software/dionysus2/) does not currently support finding representative cycles of cavities that are still open. So, for cavities that are still open, the visualization highlights only the nodes that are a part of the simplex that starts the cavity, without highlighting the whole cavity.
* I have omitted some of the larger networks because the current D3 app is slow in handling larger (>1000 nodes) networks.


text:
'use strict';

const serviceUtils = require('../serviceUtils');
const _ = require('lodash');

/**
 * @summary This ORWPT PTINQ Returns formatted patient inquiry text for display in GUI environment.
 * @param {string} DFN patientUrn
 * @return {array} report
 * @memberof patientService
 * @instance
 */
function getPatientReport(patientUrn, context, callback) {
    this.find('Patient', {
        query: { id: patientUrn },
        projection: serviceUtils.createProjection(['id', 'name', 'socialSecurityNumber',
            'dateOfBirth', 'temporaryAddress', 'permanentAddress', 'claim', 'patientContact',
            'religiousPreference', 'sex', 'race', 'ethnicityInformation', 'raceInformation', 'postalCode',
            'combat', 'treatmentFactors', 'exposures', 'primaryEligibilityCode', 'patientEligibilities', 'serviceConnected',
            'appointment', 'remarks', 'dateOfDeath', 'sourceOfNotification', 'lastEditedBy',
            'dateOfDeathLastUpdated', 'insuranceType', 'serviceConncted', 'ratedDisabilitiesVa',
            'confidentialAddress', 'militaryService', 'currentMeansTestStatus', 'contacts',
        /* 'wardLocation', 'roombed', currentMovement */]),
        // permanentAddress.county, permanentAddress.badAddressIndicator, religiousPreference.label
        // claim.claimNumber sex race.label, ethnicityInformation.label, combatService.serviceIndicated
        // primaryEligibilityCode.label, serviceConnected.unemployable, patientEligibilities[n].eligibility.label
        // Status      : PATIENT HAS NO INPATIENT OR LODGER ACTIVITY IN THE COMPUTER', ratedDisabilitiesVa[i].label
        // wardLocation, roombed
        // appointment[i].desiredDateOfAppointment
        // appointment[i].appointmentTypeSubcategory
        // insuranceType[i].primaryCareProvider
        // insurenceType[i].
    }).then((pat) => {
        callback(null, _.first(pat) || {});
    }).catch((err) => {
        callback(err);
    });
}

module.exports = {
    getPatientReport,
};


text:
/* @test
   @bug 4241440 4220470
   @summary Test the various two-byte Unicode encodings

   @run main Unicode UnicodeLittle little true
   @run main Unicode UnicodeBig big true
   @run main Unicode UnicodeLittleUnmarked little false
   @run main Unicode UnicodeBigUnmarked big false
   @run main Unicode iso-10646-ucs-2 big false
   @run main Unicode x-utf-16be big false
   @run main Unicode x-utf-16le little false
 */

import java.io.ByteArrayOutputStream;

public class Unicode {

    static final int BOM_HIGH = 0xfe;
    static final int BOM_LOW  = 0xff;

    static final int BIG = 0;
    static final int LITTLE = 1;

    static void fail(String enc, String msg, int e0, int e1, int b0, int b1)
        throws Exception
    {
        throw new Exception(enc + ": " + msg
                            + ": Expected "
                            + Integer.toHexString(e0)
                            + " " + Integer.toHexString(e1)
                            + ", got "
                            + Integer.toHexString(b0)
                            + " " + Integer.toHexString(b1));
    }

    /* Chars to bytes */
    static void encode(String enc, int byteOrder, boolean markExpected)
        throws Exception
    {
        String s = "abc";
        byte[] b = s.getBytes(enc);
        int i = 0;
        if (markExpected) {
            int b0 = b[i++] & 0xff;
            int b1 = b[i++] & 0xff;
            int e0 = 0, e1 = 0;
            if (byteOrder == BIG) {
                e0 = BOM_HIGH;
                e1 = BOM_LOW;
            } else if (byteOrder == LITTLE) {
                e0 = BOM_LOW;
                e1 = BOM_HIGH;
            }
            if ((b0 != e0) || (b1 != e1))
                fail(enc, "Incorrect or missing byte-order mark",
                     e0, e1, b0, b1);
        }
        for (int j = 0; j < s.length(); j++) {
            char c = s.charAt(j);
            int b0 = b[i++] & 0xff;
            int b1 = b[i++] & 0xff;
            int e0 = 0, e1 = 0;
            if (byteOrder == BIG) {
                e0 = c >> 8;
                e1 = c & 0xff;
            } else if (byteOrder == LITTLE) {
                e0 = c & 0xff;
                e1 = c >> 8;
            }
            if ((b0 != e0) || (b1 != e1))
                fail(enc, "Incorrect content at index " + j,
                     e0, e1, b0, b1);
        }
    }

    /* Bytes to chars */
    static void decode(String enc, int byteOrder, boolean markit)
        throws Exception
    {
        String s = "abc";
        ByteArrayOutputStream bo = new ByteArrayOutputStream();
        if (markit) {
            if (byteOrder == BIG) {
                bo.write(BOM_HIGH);
                bo.write(BOM_LOW);
            } else if (byteOrder == LITTLE) {
                bo.write(BOM_LOW);
                bo.write(BOM_HIGH);
            }
        }
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (byteOrder == BIG) {
                bo.write(c >> 8);
                bo.write(c & 0xff);
            } else if (byteOrder == LITTLE) {
                bo.write(c & 0xff);
                bo.write(c >> 8);
            }
        }
        byte[] b = bo.toByteArray();
        String s2 = new String(b, enc);
        if (!s.equals(s2))
            throw new Exception(enc + ": Decode error");
    }

    public static void main(String[] args) throws Exception {
        String enc = args[0];
        String bos = args[1];
        boolean markExpected = Boolean.valueOf(args[2]).booleanValue();
        int byteOrder = -1;
        if (bos.equals("big")) byteOrder = BIG;
        if (bos.equals("little")) byteOrder = LITTLE;

        /* We run each test twice in order to check the repeatability of
           String.getBytes and String(byte[], String) (4220470) */
        encode(enc, byteOrder, markExpected);
        encode(enc, byteOrder, markExpected);
        decode(enc, byteOrder, markExpected);
        decode(enc, byteOrder, markExpected);
    }

}


text:
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.gerrit.server.auth.oauth;

import com.google.common.base.Strings;
import com.google.gerrit.extensions.auth.oauth.OAuthLoginProvider;
import com.google.gerrit.extensions.auth.oauth.OAuthUserInfo;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Account.FieldName;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.account.AbstractRealm;
import com.google.gerrit.server.account.AccountException;
import com.google.gerrit.server.account.AccountManager;
import com.google.gerrit.server.account.AuthRequest;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.inject.Inject;
import com.google.inject.Singleton;

import org.eclipse.jgit.lib.Config;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

@Singleton
public class OAuthRealm extends AbstractRealm {
  private final DynamicMap<OAuthLoginProvider> loginProviders;
  private final Set<FieldName> editableAccountFields;

  @Inject
  OAuthRealm(DynamicMap<OAuthLoginProvider> loginProviders,
      @GerritServerConfig Config config) {
    this.loginProviders = loginProviders;
    this.editableAccountFields = new HashSet<>();
    if (config.getBoolean("oauth", null, "allowEditFullName", false)) {
      editableAccountFields.add(FieldName.FULL_NAME);
    }
    if (config.getBoolean("oauth", null, "allowRegisterNewEmail", false)) {
      editableAccountFields.add(FieldName.REGISTER_NEW_EMAIL);
    }
  }

  @Override
  public boolean allowsEdit(FieldName field) {
    return editableAccountFields.contains(field);
  }

  /**
   * Authenticates with the {@link OAuthLoginProvider} specified
   * in the authentication request.
   *
   * {@link AccountManager} calls this method without password
   * if authenticity of the user has already been established.
   * In that case the {@link AuthRequest} is supposed to contain
   * a resolved email address and we can skip the authentication
   * request to the {@code OAuthLoginService}.
   *
   * @param who the authentication request.
   *
   * @return the authentication request with resolved email address
   * and display name in case the authenticity of the user could
   * be established; otherwise {@code who} is returned unchanged.
   *
   * @throws AccountException if the authentication request with
   * the OAuth2 server failed or no {@code OAuthLoginProvider} was
   * available to handle the request.
   */
  @Override
  public AuthRequest authenticate(AuthRequest who) throws AccountException {
    if (Strings.isNullOrEmpty(who.getPassword()) &&
        !Strings.isNullOrEmpty(who.getEmailAddress())) {
      return who;
    }

    if (Strings.isNullOrEmpty(who.getAuthPlugin())
        || Strings.isNullOrEmpty(who.getAuthProvider())) {
      throw new AccountException("Cannot authenticate");
    }
    OAuthLoginProvider loginProvider =
        loginProviders.get(who.getAuthPlugin(), who.getAuthProvider());
    if (loginProvider == null) {
      throw new AccountException("Cannot authenticate");
    }

    OAuthUserInfo userInfo;
    try {
      userInfo = loginProvider.login(who.getUserName(), who.getPassword());
    } catch (IOException e) {
      throw new AccountException("Cannot authenticate", e);
    }
    if (userInfo == null) {
      throw new AccountException("Cannot authenticate");
    }
    if (!Strings.isNullOrEmpty(userInfo.getEmailAddress())) {
      who.setEmailAddress(userInfo.getEmailAddress());
    }
    if (!Strings.isNullOrEmpty(userInfo.getDisplayName())) {
      who.setDisplayName(userInfo.getDisplayName());
    }
    return who;
  }

  @Override
  public AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who) {
    return who;
  }

  @Override
  public AuthRequest unlink(ReviewDb db, Account.Id to, AuthRequest who)
      throws AccountException {
    return who;
  }

  @Override
  public void onCreateAccount(AuthRequest who, Account account) {
  }

  @Override
  public Account.Id lookup(String accountName) {
    return null;
  }
}


text:
package de.androidbytes.recipr.presentation.overview.favorites.view.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindInt;
import butterknife.BindView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import de.androidbytes.recipr.presentation.R;
import de.androidbytes.recipr.presentation.ReciprApplication;
import de.androidbytes.recipr.presentation.core.view.fragment.BaseFragment;
import de.androidbytes.recipr.presentation.overview.core.model.RecipeViewModel;
import de.androidbytes.recipr.presentation.overview.core.view.OnRecipeClickListener;
import de.androidbytes.recipr.presentation.overview.favorites.di.DaggerFavoritesOverviewComponent;
import de.androidbytes.recipr.presentation.overview.favorites.di.FavoritesOverviewComponent;
import de.androidbytes.recipr.presentation.overview.favorites.di.FavoritesOverviewModule;
import de.androidbytes.recipr.presentation.overview.favorites.presenter.FavoritesOverviewPresenter;
import de.androidbytes.recipr.presentation.overview.favorites.view.FavoritesOverviewView;
import de.androidbytes.recipr.presentation.overview.favorites.view.adapter.FavoritesOverviewAdapter;

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

public class FavoritesOverviewFragment extends BaseFragment<FavoritesOverviewComponent, FavoritesOverviewPresenter> implements FavoritesOverviewView, OnRecipeClickListener {

    @Inject
    FavoritesOverviewPresenter presenter;

    @Inject
    Tracker tracker;

    @Inject
    FavoritesOverviewAdapter favoritesOverviewAdapter;

    @BindView(R.id.rv_favorites_overview)
    RecyclerView recyclerView;

    @BindInt(R.integer.favoritesOverviewColumnCount)
    int columnCount;

    @BindView(R.id.favorites_overview_empty_view)
    TextView emptyView;

    public FavoritesOverviewFragment() {}

    public FavoritesOverviewFragment newInstance(String title) {
        return new FavoritesOverviewFragment();
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getComponent().inject(this);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_favorites_overview, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        recyclerView.setLayoutManager(new GridLayoutManager(getActivity(), columnCount));
        recyclerView.setAdapter(favoritesOverviewAdapter);
    }

    @Override
    public void onResume() {
        super.onResume();
        initializeData();
        tracker.setScreenName(FavoritesOverviewFragment.class.getSimpleName());
        tracker.send(new HitBuilders.ScreenViewBuilder().build());
    }

    private void initializeData() {
        presenter.loadData();
    }

    @Override
    protected FavoritesOverviewComponent onCreateNonConfigurationComponent() {

        return DaggerFavoritesOverviewComponent.builder()
                .applicationComponent(((ReciprApplication) getContext().getApplicationContext()).getApplicationComponent())
                .favoritesOverviewModule(new FavoritesOverviewModule(getLoggedInUserId()))
                .build();
    }

    @Override
    public void renderFavoritesOverview(List<RecipeViewModel> recipeViewModels) {

        recyclerView.setVisibility(View.VISIBLE);
        emptyView.setVisibility(View.GONE);

        favoritesOverviewAdapter.swapData(recipeViewModels);
        favoritesOverviewAdapter.setOnRecipeClickListener(this);
    }

    @Override
    public void renderEmptyView() {
        emptyView.setText(getString(R.string.favorites_overview_empty_message, getLoggedInUser().getName()));

        recyclerView.setVisibility(View.GONE);
        emptyView.setVisibility(View.VISIBLE);
    }

    @Override
    public void onRecipeClicked(ImageView rootImageView, RecipeViewModel recipeViewModel) {
        presenter.onRecipeClicked(rootImageView, recipeViewModel);
    }
}


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

package androidx.test.espresso.flutter.api;

import android.graphics.Rect;
import androidx.test.espresso.flutter.model.WidgetInfo;
import com.google.common.annotations.Beta;
import java.util.concurrent.Future;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/** Defines the testing protocol/semantics between Espresso and Flutter. */
@Beta
public interface FlutterTestingProtocol {

  /** Returns a future that waits until the Flutter testing protocol is in a usable state. */
  public Future<Void> connect();

  /**
   * Performs a synthetic action on the Flutter widget that matches the given {@code widgetMatcher}.
   *
   *
If failed to perform the given {@code action}, returns a {@code Future} containing an {@code
   * ExecutionException} that wraps the following exception:
   *
   *

   *
{@code AmbiguousWidgetMatcherException} if the given {@code widgetMatcher} matched
   *       multiple widgets in the hierarchy when only one widget was expected.
   *
{@code NoMatchingWidgetException} if the given {@code widgetMatcher} did not match any
   *       widget in the Flutter UI hierarchy.
   *
{@code ConnectException} if connection error occurred.
   *

   *
   * @param widgetMatcher the matcher to match a Flutter widget. If {@code null}, {@code action} is
   *     not performed on a specific widget.
   * @param action the action to be performed on the widget.
   * @return a {@code Future} representing pending completion of performing the action, or yields an
   *     exception if the action was failed to perform.
   */
  Future<Void> perform(@Nullable WidgetMatcher widgetMatcher, @Nonnull SyntheticAction action);

  /**
   * Returns a Java representation of the Flutter widget that matches the given widget matcher.
   *
   *
If failed to find a matching widget, returns a {@code Future} containing an {@code
   * ExecutionException} that wraps the following exception:
   *
   *

   *
{@code AmbiguousWidgetMatcherException} if the given {@code widgetMatcher} matched
   *       multiple widgets in the hierarchy when only one widget was expected.
   *
{@code NoMatchingWidgetException} if the given {@code widgetMatcher} did not match any
   *       widget in the Flutter UI hierarchy.
   *
{@code ConnectException} if connection error occurred.
   *

   *
   * @param widgetMatcher the matcher to match a Flutter widget. Cannot be {@code null}.
   * @return a {@code Future} representing pending completion of the matching operation.
   */
  Future<WidgetInfo> matchWidget(@Nonnull WidgetMatcher widgetMatcher);

  /**
   * Returns the local (as relative to its outer Flutter View) rectangle area of a widget that
   * matches the given widget matcher.
   *
   * @param widgetMatcher the matcher to match a Flutter widget. Cannot be {@code null}.
   * @return a rectangle area where the matched widget lives, in the unit of dp (Density-independent
   *     Pixel).
   */
  Future<Rect> getLocalRect(@Nonnull WidgetMatcher widgetMatcher);

  /** Waits until the Flutter frame is in a stable state. */
  Future<Void> waitUntilIdle();

  /** Releases all the resources associated with this testing protocol connection. */
  void close();
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.bogza.nodemcu.ide.lualexer;

import java.io.IOException;
import org.netbeans.core.spi.multiview.MultiViewElement;
import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.MIMEResolver;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.MultiDataObject;
import org.openide.loaders.MultiFileLoader;
import org.openide.util.Lookup;
import org.openide.util.NbBundle.Messages;
import org.openide.windows.TopComponent;

@Messages({
    "LBL_lua_LOADER=Files of lua"
})
@MIMEResolver.ExtensionRegistration(
        displayName = "#LBL_lua_LOADER",
        mimeType = "text/x-lua",
        extension = {"lua", "LUA"}
)
@DataObject.Registration(
        mimeType = "text/x-lua",
        iconBase = "org/bogza/nodemcuide/icons/lua.png",
        displayName = "#LBL_lua_LOADER",
        position = 300
)
@ActionReferences({
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.OpenAction"),
            position = 100,
            separatorAfter = 200
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "Edit", id = "org.openide.actions.CutAction"),
            position = 300
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "Edit", id = "org.openide.actions.CopyAction"),
            position = 400,
            separatorAfter = 500
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "Edit", id = "org.openide.actions.DeleteAction"),
            position = 600
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.RenameAction"),
            position = 700,
            separatorAfter = 800
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.SaveAsTemplateAction"),
            position = 900,
            separatorAfter = 1000
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.FileSystemAction"),
            position = 1100,
            separatorAfter = 1200
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"),
            position = 1300
    ),
    @ActionReference(
            path = "Loaders/text/x-lua/Actions",
            id = @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"),
            position = 1400
    )
})
public class luaDataObject extends MultiDataObject {

    public luaDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
        super(pf, loader);
        registerEditor("text/x-lua", true);
    }

    @Override
    protected int associateLookup() {
        return 1;
    }

    @MultiViewElement.Registration(
            displayName = "#LBL_lua_EDITOR",
            iconBase = "org/bogza/nodemcuide/icons/lua.png",
            mimeType = "text/x-lua",
            persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
            preferredID = "lua",
            position = 1000
    )
    @Messages("LBL_lua_EDITOR=Source")
    public static MultiViewEditorElement createEditor(Lookup lkp) {
        return new MultiViewEditorElement(lkp);
    }

}


text:
package org.apache.camel.impl.engine;

import java.util.Optional;

import org.apache.camel.spi.FactoryFinder;
import org.apache.camel.spi.PeriodTaskResolver;

public class DefaultPeriodTaskResolver implements PeriodTaskResolver {

    private final FactoryFinder finder;

    public DefaultPeriodTaskResolver(FactoryFinder finder) {
        this.finder = finder;
    }

    @Override
    public Optional<Object> newInstance(String key) {
        return finder.newInstance(key);
    }

    @Override
    public <T> Optional<T> newInstance(String key, Class<T> type) {
        return finder.newInstance(key, type);
    }
}


text:
/* hero container */
.hero.section {
	display: flex;
	position: relative;
	width: 100%;
	height: 100vh;
	margin: 0 auto;
	padding: 0.83333rem;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
}

/* hero title */
.hero.section .title {
	margin: 0;
}

/* hero title sub */
.hero.section .title .sub {
	display: block;
}

/* hero title sub */
.hero.section .title .sub {
	margin-top: 3.83333rem;
	color: #111;
	font-size: 65%;
}

/* index hero title sub */
.index.hero.section .title .sub {
	text-indent: 2rem;
}

/* hero title sub punchliune */
.hero.section .title .sub.punchline {
	margin-top: 0;
}


text:
package jo.vecmath.logic.ext;

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

import jo.vecmath.Point3f;
import jo.vecmath.ext.Plane3f;
import jo.vecmath.logic.Point3fLogic;

public class Points3fLogic {

    public static Point3f getCenter(Point3f p, List<Point3f> points) {
        Point3f total = new Point3f();
        for (Point3f p2 : points) {
            total.add(p2);
        }
        total.scale(1.0f / points.size());
        return total;
    }

    public static Point3f getClosest(Point3f p, List<Point3f> points) {
        Point3f closest = null;
        float closestDist = -1;
        for (Point3f p2 : points) {
            float d = p2.distance(p);
            if ((closest == null) || (d < closestDist)) {
                closest = p2;
                closestDist = d;
            }
        }
        return closest;
    }

    public static List<Point3f> getPointsOnPlane(Plane3f plane, List<Point3f> points) {
        List<Point3f> onPlane = new ArrayList<Point3f>();
        for (Point3f p : points) {
            if (Point3fLogic.isZero(plane.dist(p))) {
                onPlane.add(p);
            }
        }
        return onPlane;
    }

    public static int equals(Point3f p, List<Point3f> points) {
        for (int i = 0; i < points.size(); i++) {
            if (Point3fLogic.equals(p, points.get(i))) {
                return i;
            }
        }
        return -1;
    }

    /*
     public static void sortByAngleAround(final Point3f center, final Point3f closest,
     List<Point3f> points, final Point3f normal, List<Integer> angles) {
     Collections.sort(points, new Comparator<Point3f>() {
     @Override
     public int compare(Point3f o1, Point3f o2) {
     float a1 = angleBetween(o1);
     float a2 = angleBetween(o2);
     int ret = Point3fLogic.sgn(a1 - a2);
     if (ret == 0)
     {
     float d1 = o1.distance(center);
     float d2 = o2.distance(center);
     return Point3fLogic.sgn(d2 - d1);
     }
     return ret;
     }
     private float angleBetween(Point3f p2)
     {
     float a;
     if (normal != null)
     a = Point3fLogic.signedAngleBetween(closest.sub(center), p2.sub(center), normal);
     else
     a = Point3fLogic.angleBetween(center, closest, p2);
     if (a < 0)
     a += Math.PI*2;
     return a;
     }
     });
     System.out.println("Sorted points: (closest="+closest+", center="+center+", normal="+normal+")");
     for (Point3f p : points)
     {
     float a;
     if (normal != null)
     a = Point3fLogic.signedAngleBetween(closest.sub(center), p.sub(center), normal);
     else
     a = Point3fLogic.angleBetween(center, closest, p);
     if (a < 0)
     a += Math.PI*2;
     System.out.println("  "+a+" "+p);
     if (angles != null)
     angles.add((int)(a/Math.PI*180));
     }
     }
     */
}


text:
/**
 * This file is part of the mingw-w64 runtime package.
 * No warranty is given; refer to the file DISCLAIMER within this package.
 */

#ifndef __usp10__
#define __usp10__

#include <winapifamily.h>

#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)

#include <windows.h>

#ifdef __cplusplus
extern "C" {
#endif

#define USPBUILD 0400
#define SCRIPT_UNDEFINED 0

#if !defined (UNISCRIBE_OPENTYPE) && (_WIN32_WINNT >= 0x0600)
#define UNISCRIBE_OPENTYPE 0x0100
#endif

#if UNISCRIBE_OPENTYPE >= 0x0100
#define SCRIPT_TAG_UNKNOWN 0x00000000
#endif

#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT (SEVERITY_ERROR, FACILITY_ITF, 0x200)

#define SGCM_RTL 0x00000001

#define SSA_PASSWORD 0x00000001
#define SSA_TAB 0x00000002
#define SSA_CLIP 0x00000004
#define SSA_FIT 0x00000008
#define SSA_DZWG 0x00000010
#define SSA_FALLBACK 0x00000020
#define SSA_BREAK 0x00000040
#define SSA_GLYPHS 0x00000080
#define SSA_RTL 0x00000100
#define SSA_GCP 0x00000200
#define SSA_HOTKEY 0x00000400
#define SSA_METAFILE 0x00000800
#define SSA_LINK 0x00001000
#define SSA_HIDEHOTKEY 0x00002000
#define SSA_HOTKEYONLY 0x00002400
#define SSA_FULLMEASURE 0x04000000
#define SSA_LPKANSIFALLBACK 0x08000000
#define SSA_PIDX 0x10000000
#define SSA_LAYOUTRTL 0x20000000
#define SSA_DONTGLYPH 0x40000000
#define SSA_NOKASHIDA 0x80000000

#define SIC_COMPLEX 1
#define SIC_ASCIIDIGIT 2
#define SIC_NEUTRAL 4

#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
#define SCRIPT_DIGITSUBSTITUTE_NONE 1
#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3

  typedef void *SCRIPT_CACHE;
  typedef void *SCRIPT_STRING_ANALYSIS;
#if UNISCRIBE_OPENTYPE >= 0x0100
  typedef ULONG OPENTYPE_TAG;
#endif

  typedef struct tag_SCRIPT_CONTROL {
    DWORD uDefaultLanguage :16;
    DWORD fContextDigits :1;
    DWORD fInvertPreBoundDir :1;
    DWORD fInvertPostBoundDir :1;
    DWORD fLinkStringBefore :1;
    DWORD fLinkStringAfter :1;
    DWORD fNeutralOverride :1;
    DWORD fNumericOverride :1;
    DWORD fLegacyBidiClass :1;
    DWORD fMergeNeutralItems :1;
    DWORD fUseStandardBidi :1;
    DWORD fReserved :6;
  } SCRIPT_CONTROL;

  typedef struct tag_SCRIPT_STATE {
    WORD uBidiLevel :5;
    WORD fOverrideDirection :1;
    WORD fInhibitSymSwap :1;
    WORD fCharShape :1;
    WORD fDigitSubstitute :1;
    WORD fInhibitLigate :1;
    WORD fDisplayZWG :1;
    WORD fArabicNumContext :1;
    WORD fGcpClusters :1;
    WORD fReserved :1;
    WORD fEngineReserved :2;
  } SCRIPT_STATE;

  typedef struct tag_SCRIPT_ANALYSIS {
    WORD eScript :10;
    WORD fRTL :1;
    WORD fLayoutRTL :1;
    WORD fLinkBefore :1;
    WORD fLinkAfter :1;
    WORD fLogicalOrder :1;
    WORD fNoGlyphIndex :1;
    SCRIPT_STATE s;
  } SCRIPT_ANALYSIS;

  typedef struct tag_SCRIPT_ITEM {
    int iCharPos;
    SCRIPT_ANALYSIS a;
  } SCRIPT_ITEM;

  typedef enum tag_SCRIPT_JUSTIFY {
    SCRIPT_JUSTIFY_NONE = 0,
    SCRIPT_JUSTIFY_ARABIC_BLANK = 1,
    SCRIPT_JUSTIFY_CHARACTER = 2,
    SCRIPT_JUSTIFY_RESERVED1 = 3,
    SCRIPT_JUSTIFY_BLANK = 4,
    SCRIPT_JUSTIFY_RESERVED2 = 5,
    SCRIPT_JUSTIFY_RESERVED3 = 6,
    SCRIPT_JUSTIFY_ARABIC_NORMAL = 7,
    SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,
    SCRIPT_JUSTIFY_ARABIC_ALEF = 9,
    SCRIPT_JUSTIFY_ARABIC_HA = 10,
    SCRIPT_JUSTIFY_ARABIC_RA = 11,
    SCRIPT_JUSTIFY_ARABIC_BA = 12,
    SCRIPT_JUSTIFY_ARABIC_BARA = 13,
    SCRIPT_JUSTIFY_ARABIC_SEEN = 14,
    SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15,
  } SCRIPT_JUSTIFY;

  typedef struct tag_SCRIPT_VISATTR {
    WORD uJustification :4;
    WORD fClusterStart :1;
    WORD fDiacritic :1;
    WORD fZeroWidth :1;
    WORD fReserved :1;
    WORD fShapeReserved :8;
  } SCRIPT_VISATTR;

#ifndef LSDEFS_DEFINED
  typedef struct tagGOFFSET {
    LONG du;
    LONG dv;
  } GOFFSET;
#endif

  typedef struct tag_SCRIPT_LOGATTR {
    BYTE fSoftBreak :1;
    BYTE fWhiteSpace :1;
    BYTE fCharStop :1;
    BYTE fWordStop :1;
    BYTE fInvalid :1;
    BYTE fReserved :3;
  } SCRIPT_LOGATTR;

  typedef struct {
    DWORD langid :16;
    DWORD fNumeric :1;
    DWORD fComplex :1;
    DWORD fNeedsWordBreaking :1;
    DWORD fNeedsCaretInfo :1;
    DWORD bCharSet :8;
    DWORD fControl :1;
    DWORD fPrivateUseArea :1;
    DWORD fNeedsCharacterJustify :1;
    DWORD fInvalidGlyph :1;
    DWORD fInvalidLogAttr :1;
    DWORD fCDM :1;
    DWORD fAmbiguousCharSet :1;
    DWORD fClusterSizeVaries :1;
    DWORD fRejectInvalid :1;
  } SCRIPT_PROPERTIES;

  typedef struct {
    int cBytes;
    WORD wgBlank;
    WORD wgDefault;
    WORD wgInvalid;
    WORD wgKashida;
    int iKashidaWidth;
  } SCRIPT_FONTPROPERTIES;

  typedef struct tag_SCRIPT_TABDEF {
    int cTabStops;
    int iScale;
    int *pTabStops;
    int iTabOrigin;
  } SCRIPT_TABDEF;

  typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
    DWORD NationalDigitLanguage :16;
    DWORD TraditionalDigitLanguage :16;
    DWORD DigitSubstitute :8;
    DWORD dwReserved;
  } SCRIPT_DIGITSUBSTITUTE;

#if UNISCRIBE_OPENTYPE >= 0x0100
  typedef struct opentype_feature_record {
    OPENTYPE_TAG tagFeature;
    LONG lParameter;
  } OPENTYPE_FEATURE_RECORD;

  typedef struct textrange_properties {
    OPENTYPE_FEATURE_RECORD *potfRecords;
    int cotfRecords;
  } TEXTRANGE_PROPERTIES;

  typedef struct script_charprop {
    WORD fCanGlyphAlone : 1;
    WORD reserved : 15;
  } SCRIPT_CHARPROP;

  typedef struct script_glyphprop {
    SCRIPT_VISATTR sva;
    WORD reserved;
  } SCRIPT_GLYPHPROP;
#endif

  HRESULT WINAPI ScriptFreeCache (SCRIPT_CACHE *psc);
  HRESULT WINAPI ScriptItemize (const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, int *pcItems);
  HRESULT WINAPI ScriptLayout (int cRuns, const BYTE *pbLevel, int *piVisualToLogical, int *piLogicalToVisual);
  HRESULT WINAPI ScriptShape (HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs);
  HRESULT WINAPI ScriptPlace (HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int cGlyphs, const SCRIPT_VISATTR *psva, SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC);
  HRESULT WINAPI ScriptTextOut (const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UINT fuOptions, const RECT *lprc, const SCRIPT_ANALYSIS *psa, const WCHAR *pwcReserved, int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset);
  HRESULT WINAPI ScriptJustify (const SCRIPT_VISATTR *psva, const int *piAdvance, int cGlyphs, int iDx, int iMinKashida, int *piJustify);
  HRESULT WINAPI ScriptBreak (const WCHAR *pwcChars, int cChars, const SCRIPT_ANALYSIS *psa, SCRIPT_LOGATTR *psla);
  HRESULT WINAPI ScriptCPtoX (int iCP, WINBOOL fTrailing, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piX);
  HRESULT WINAPI ScriptXtoCP (int iX, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, const int *piAdvance, const SCRIPT_ANALYSIS *psa, int *piCP, int *piTrailing);
  HRESULT WINAPI ScriptGetLogicalWidths (const SCRIPT_ANALYSIS *psa, int cChars, int cGlyphs, const int *piGlyphWidth, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, int *piDx);
  HRESULT WINAPI ScriptApplyLogicalWidth (const int *piDx, int cChars, int cGlyphs, const WORD *pwLogClust, const SCRIPT_VISATTR *psva, const int *piAdvance, const SCRIPT_ANALYSIS *psa, ABC *pABC, int *piJustify);
  HRESULT WINAPI ScriptGetCMap (HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars, DWORD dwFlags, WORD *pwOutGlyphs);
  HRESULT WINAPI ScriptGetGlyphABCWidth (HDC hdc, SCRIPT_CACHE *psc, WORD wGlyph, ABC *pABC);
  HRESULT WINAPI ScriptGetProperties (const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts);
  HRESULT WINAPI ScriptGetFontProperties (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp);
  HRESULT WINAPI ScriptCacheGetHeight (HDC hdc, SCRIPT_CACHE *psc, long *tmHeight);
  HRESULT WINAPI ScriptStringAnalyse (HDC hdc, const void *pString, int cString, int cGlyphs, int iCharset, DWORD dwFlags, int iReqWidth, SCRIPT_CONTROL *psControl, SCRIPT_STATE *psState, const int *piDx, SCRIPT_TABDEF *pTabdef, const BYTE *pbInClass, SCRIPT_STRING_ANALYSIS *pssa);
  HRESULT WINAPI ScriptStringFree (SCRIPT_STRING_ANALYSIS *pssa);
  const SIZE *WINAPI ScriptString_pSize (SCRIPT_STRING_ANALYSIS ssa);
  const int *WINAPI ScriptString_pcOutChars (SCRIPT_STRING_ANALYSIS ssa);
  const SCRIPT_LOGATTR *WINAPI ScriptString_pLogAttr (SCRIPT_STRING_ANALYSIS ssa);
  HRESULT WINAPI ScriptStringGetOrder (SCRIPT_STRING_ANALYSIS ssa, UINT *puOrder);
  HRESULT WINAPI ScriptStringCPtoX (SCRIPT_STRING_ANALYSIS ssa, int icp, WINBOOL fTrailing, int *pX);
  HRESULT WINAPI ScriptStringXtoCP (SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh, int *piTrailing);
  HRESULT WINAPI ScriptStringGetLogicalWidths (SCRIPT_STRING_ANALYSIS ssa, int *piDx);
  HRESULT WINAPI ScriptStringValidate (SCRIPT_STRING_ANALYSIS ssa);
  HRESULT WINAPI ScriptStringOut (SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc, int iMinSel, int iMaxSel, WINBOOL fDisabled);
  HRESULT WINAPI ScriptIsComplex (const WCHAR *pwcInChars, int cInChars, DWORD dwFlags);
  HRESULT WINAPI ScriptRecordDigitSubstitution (LCID Locale, SCRIPT_DIGITSUBSTITUTE *psds);
  HRESULT WINAPI ScriptApplyDigitSubstitution (const SCRIPT_DIGITSUBSTITUTE *psds, SCRIPT_CONTROL *psc, SCRIPT_STATE *pss);
#if UNISCRIBE_OPENTYPE >= 0x0100
  HRESULT WINAPI ScriptShapeOpenType (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties, int cRanges, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProps, WORD *pwOutGlyphs, SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs);
  HRESULT WINAPI ScriptPlaceOpenType (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties, int cRanges, const WCHAR *pwcChars, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProps, int cChars, const WORD *pwGlyphs, const SCRIPT_GLYPHPROP *pGlyphProps, int cGlyphs, int *piAdvance, GOFFSET *pGoffset, ABC *pABC);
  HRESULT WINAPI ScriptItemizeOpenType (const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, OPENTYPE_TAG *pScriptTags, int *pcItems);
  HRESULT WINAPI ScriptGetFontScriptTags (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags);
  HRESULT WINAPI ScriptGetFontLanguageTags (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, int cMaxTags, OPENTYPE_TAG *pLangsysTags, int *pcTags);
  HRESULT WINAPI ScriptGetFontFeatureTags (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags);
  HRESULT WINAPI ScriptGetFontAlternateGlyphs (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, OPENTYPE_TAG tagFeature, WORD wGlyphId, int cMaxAlternates, WORD *pAlternateGlyphs, int *pcAlternates);
  HRESULT WINAPI ScriptSubstituteSingleGlyph (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, OPENTYPE_TAG tagFeature, LONG lParameter, WORD wGlyphId, WORD *pwOutGlyphId);
  HRESULT WINAPI ScriptPositionSingleGlyph (HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, OPENTYPE_TAG tagFeature, LONG lParameter, WORD wGlyphId, int iAdvance, GOFFSET GOffset, int *piOutAdvance, GOFFSET *pOutGoffset);
#endif

#ifdef __cplusplus
}
#endif

#endif

#endif


text:
package org.sincron.atomic

final class AtomicInt private[atomic]
  (initialValue: Int) extends AtomicNumber[Int] {

  private[this] var ref = initialValue

  def getAndSet(update: Int): Int = {
    val current = ref
    ref = update
    current
  }

  def compareAndSet(expect: Int, update: Int): Boolean = {
    if (ref == expect) {
      ref = update
      true
    }
    else
      false
  }

  def set(update: Int): Unit = {
    ref = update
  }

  def get: Int = ref

  def getAndSubtract(v: Int): Int = {
    val c = ref
    ref = ref - v
    c
  }

  def subtractAndGet(v: Int): Int = {
    ref = ref - v
    ref
  }

  def subtract(v: Int): Unit = {
    ref = ref - v
  }

  def getAndAdd(v: Int): Int = {
    val c = ref
    ref = ref + v
    c
  }

  def getAndIncrement(v: Int = 1): Int = {
    val c = ref
    ref = ref + v
    c
  }

  def addAndGet(v: Int): Int = {
    ref = ref + v
    ref
  }

  def incrementAndGet(v: Int = 1): Int = {
    ref = ref + v
    ref
  }

  def add(v: Int): Unit = {
    ref = ref + v
  }

  def increment(v: Int = 1): Unit = {
    ref = ref + v
  }

  def decrement(v: Int = 1): Unit = increment(-v)
  def decrementAndGet(v: Int = 1): Int = incrementAndGet(-v)
  def getAndDecrement(v: Int = 1): Int = getAndIncrement(-v)
}

object AtomicInt {
  def apply(initialValue: Int): AtomicInt =
    new AtomicInt(initialValue)
}


text:
const CGFloat PDTSimpleCalendarCircleSize = 32.0f;

@interface PDTSimpleCalendarViewCell ()

@property (nonatomic, strong) UILabel *dayLabel;
@property (nonatomic, strong) NSDate *date;

@end

@implementation PDTSimpleCalendarViewCell

#pragma mark - Class Methods

+ (NSString *)formatDate:(NSDate *)date withCalendar:(NSCalendar *)calendar
{
    NSDateFormatter *dateFormatter = [self dateFormatter];
    return [PDTSimpleCalendarViewCell stringFromDate:date withDateFormatter:dateFormatter withCalendar:calendar];
}

+ (NSString *)formatAccessibilityDate:(NSDate *)date withCalendar:(NSCalendar *)calendar
{
    NSDateFormatter *dateFormatter = [self accessibilityDateFormatter];
    return [PDTSimpleCalendarViewCell stringFromDate:date withDateFormatter:dateFormatter withCalendar:calendar];
}

+ (NSDateFormatter *)dateFormatter {
    static NSDateFormatter *dateFormatter;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        dateFormatter = [[NSDateFormatter alloc] init];
        dateFormatter.dateFormat = @"d";
    });
    return dateFormatter;
}

+ (NSDateFormatter *)accessibilityDateFormatter {
    static NSDateFormatter *dateFormatter;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateStyle:NSDateFormatterLongStyle];
        [dateFormatter setTimeStyle:NSDateFormatterNoStyle];

    });
    return dateFormatter;
}

+ (NSString *)stringFromDate:(NSDate *)date withDateFormatter:(NSDateFormatter *)dateFormatter withCalendar:(NSCalendar *)calendar {
    //Test if the calendar is different than the current dateFormatter calendar property
    if (![dateFormatter.calendar isEqual:calendar]) {
        dateFormatter.calendar = calendar;
    }
    return [dateFormatter stringFromDate:date];
}

#pragma mark - Instance Methods

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _date     = nil;
        _isToday  = NO;
        _dayLabel = [[UILabel alloc] init];
        _isShaded = NO;
        [self.dayLabel setFont:[self textDefaultFont]];
        [self.dayLabel setTextAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:self.dayLabel];

        self.shadeView = [[UIView alloc]initWithFrame:CGRectMake(self.contentView.frame.origin.x + 1,self.contentView.frame.origin.y + 1, self.contentView.frame.size.width -2, self.contentView.frame.size.height - 2)];
        CAShapeLayer *circleLayer = [CAShapeLayer layer];
        [circleLayer setPath:[[UIBezierPath bezierPathWithOvalInRect:CGRectMake(self.shadeView.frame.origin.x + 2, self.shadeView.frame.origin.x + 2, self.shadeView.frame.size.width - 6, self.shadeView.frame.size.height - 6)] CGPath]];
        [circleLayer setBackgroundColor:[[UIColor clearColor] CGColor]];
        [circleLayer setStrokeColor:[[UIColor grayColor] CGColor]];
        [circleLayer setFillColor:[[UIColor clearColor] CGColor]];
        [self.shadeView.layer addSublayer:circleLayer];

        [self.contentView addSubview:self.shadeView];

        //Add the Constraints
        [self.dayLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
        [self.dayLabel setBackgroundColor:[UIColor clearColor]];
        self.dayLabel.layer.cornerRadius = PDTSimpleCalendarCircleSize/2;
        self.dayLabel.layer.masksToBounds = YES;

        [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.dayLabel attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0.0]];
        [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.dayLabel attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0]];
        [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.dayLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:PDTSimpleCalendarCircleSize]];
        [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.dayLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:PDTSimpleCalendarCircleSize]];

        [self setCircleColor:NO selected:NO];
    }

    return self;
}

- (void) setIsShaded:(BOOL)isShaded{
    if (isShaded){
        self.shadeView.alpha = 0.3f;
    }else{
        self.shadeView.alpha = 0.0f;
    }
}

- (NSDate *) getDate {
    return self.date.copy;
}

- (void)setDate:(NSDate *)date calendar:(NSCalendar *)calendar
{
    NSString* day = @"";
    NSString* accessibilityDay = @"";
    if (date && calendar) {
        _date = date;
        day = [PDTSimpleCalendarViewCell formatDate:date withCalendar:calendar];
        accessibilityDay = [PDTSimpleCalendarViewCell formatAccessibilityDate:date withCalendar:calendar];
    }
    self.dayLabel.text = day;
    self.dayLabel.accessibilityLabel = accessibilityDay;
    if (self.dayLabel.text.length != 0 && self.isShaded){
        self.shadeView.alpha = 0.3f;
    }else{
        self.shadeView.alpha = 0.0f;
    }
}

- (void)setIsToday:(BOOL)isToday
{
    _isToday = isToday;
    [self setCircleColor:isToday selected:self.selected];
}

- (void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    [self setCircleColor:self.isToday selected:selected];
}

- (void)setCircleColor:(BOOL)today selected:(BOOL)selected
{
    UIColor *circleColor = (today) ? [self circleTodayColor] : [self circleDefaultColor];
    UIColor *labelColor = (today) ? [self textTodayColor] : [self textDefaultColor];

    if (self.date && self.delegate) {
        if ([self.delegate respondsToSelector:@selector(simpleCalendarViewCell:shouldUseCustomColorsForDate:)] && [self.delegate simpleCalendarViewCell:self shouldUseCustomColorsForDate:self.date]) {

            if ([self.delegate respondsToSelector:@selector(simpleCalendarViewCell:textColorForDate:)] && [self.delegate simpleCalendarViewCell:self textColorForDate:self.date]) {
                labelColor = [self.delegate simpleCalendarViewCell:self textColorForDate:self.date];
            }

            if ([self.delegate respondsToSelector:@selector(simpleCalendarViewCell:circleColorForDate:)] && [self.delegate simpleCalendarViewCell:self circleColorForDate:self.date]) {
                circleColor = [self.delegate simpleCalendarViewCell:self circleColorForDate:self.date];
            }
        }
    }

    if (selected) {
        circleColor = [self circleSelectedColor];
        labelColor = [self textSelectedColor];
    }

    [self.dayLabel setBackgroundColor:circleColor];
    [self.dayLabel setTextColor:labelColor];
}

- (void)refreshCellColors
{
    [self setCircleColor:self.isToday selected:self.isSelected];
}

#pragma mark - Prepare for Reuse

- (void)prepareForReuse
{
    [super prepareForReuse];
    _date = nil;
    _isToday = NO;
    [self.dayLabel setText:@""];
    [self.dayLabel setBackgroundColor:[self circleDefaultColor]];
    [self.dayLabel setTextColor:[self textDefaultColor]];
}

#pragma mark - Circle Color Customization Methods

- (UIColor *)circleDefaultColor
{
    if(_circleDefaultColor == nil) {
        _circleDefaultColor = [[[self class] appearance] circleDefaultColor];
    }

    if(_circleDefaultColor != nil) {
        return _circleDefaultColor;
    }

    return [UIColor whiteColor];
}

- (UIColor *)circleTodayColor
{
    if(_circleTodayColor == nil) {
        _circleTodayColor = [[[self class] appearance] circleTodayColor];
    }

    if(_circleTodayColor != nil) {
        return _circleTodayColor;
    }

    return [UIColor grayColor];
}

- (UIColor *)circleSelectedColor
{
    if(_circleSelectedColor == nil) {
        _circleSelectedColor = [[[self class] appearance] circleSelectedColor];
    }

    if(_circleSelectedColor != nil) {
        return _circleSelectedColor;
    }

    return [UIColor redColor];
}

#pragma mark - Text Label Customizations Color

- (UIColor *)textDefaultColor
{
    if(_textDefaultColor == nil) {
        _textDefaultColor = [[[self class] appearance] textDefaultColor];
    }

    if(_textDefaultColor != nil) {
        return _textDefaultColor;
    }

    return [UIColor blackColor];
}

- (UIColor *)textTodayColor
{
    if(_textTodayColor == nil) {
        _textTodayColor = [[[self class] appearance] textTodayColor];
    }

    if(_textTodayColor != nil) {
        return _textTodayColor;
    }

    return [UIColor whiteColor];
}

- (UIColor *)textSelectedColor
{
    if(_textSelectedColor == nil) {
        _textSelectedColor = [[[self class] appearance] textSelectedColor];
    }

    if(_textSelectedColor != nil) {
        return _textSelectedColor;
    }

    return [UIColor whiteColor];
}

- (UIColor *)textDisabledColor
{
    if(_textDisabledColor == nil) {
        _textDisabledColor = [[[self class] appearance] textDisabledColor];
    }

    if(_textDisabledColor != nil) {
        return _textDisabledColor;
    }

    return [UIColor lightGrayColor];
}

#pragma mark - Text Label Customizations Font

- (UIFont *)textDefaultFont
{
    if(_textDefaultFont == nil) {
        _textDefaultFont = [[[self class] appearance] textDefaultFont];
    }

    if (_textDefaultFont != nil) {
        return _textDefaultFont;
    }

    // default system font
    return [UIFont systemFontOfSize:17.0];
}

@end


text:
MAGDHLE ;WOIFO/SRR/PMK - PACS INTERFACE PID TRIGGERS ;26 Oct 2017 1:30 PM
 ;;3.0;IMAGING;**54,49,183**;Mar 19, 2002;Build 11;Apr 07, 2011
 ;; Per VHA Directive 2004-038, this routine should not be modified.
 ;; +---------------------------------------------------------------+
 ;; | Property of the US Government.                                |
 ;; | No permission to copy or redistribute this software is given. |
 ;; | Use of unreleased versions of this software requires the user |
 ;; | to execute a written test agreement with the VistA Imaging    |
 ;; | Development Office of the Department of Veterans Affairs,     |
 ;; | telephone (301) 734-0100.                                     |
 ;; | The Food and Drug Administration classifies this software as  |
 ;; | a medical device.  As such, it may not be changed in any way. |
 ;; | Modifications to this software may result in an adulterated   |
 ;; | medical device under 21CFR820, the use of which is considered |
 ;; | to be a violation of US Federal Statutes.                     |
 ;; +---------------------------------------------------------------+
 ;;
 ; Supported IA #2602 Reading AUDIT file (#1.1) ^DIA(2,...)
 Q
 ;
SENDA08(DFN) ; External API entry point from Radiology Package - P183 PMK 3/16/17
 N MAGSENDA08 S MAGSENDA08=1 ; flag to indicate API call
 ; drop through to ADTA08
 ;
ADTA08 ; Patient Update event from VAFC ADT-A08 SERVER event driver - P183 PMK 3/16/17
 ; Upon entry, DFN will be set to the patient
 ; The DG* variables are not defined by the VAFC package
 N DGPMDA,DGNOW,DGPMA,DGPMT,MAGKTYP,MAGDPTCL
 N HLECH,HLFS,HLINSTN,HLPARAM,HLPID,HLRFREQ,HLSFREQ,HLSAN,HLTYPE,HLQ,HLXM
 N HL771RF,HL771SF,HLCS,HLDOM,HLN,HLPARM,HLREC,SEGIX,SUB4,VA,VADM,VACNTRY
 N SSNCHANGES ;--- array of old & new SSNs, indexed chronologically
 ;
 S (DGPMDA,DGNOW,DGPMA,MAGDPTCL)="" ; unused
 I $$SSNCHECK(.SSNCHANGES) D  ; generate ADT A47
 . S DGPMT=47 ; set DGPMT variable for use in MAGDHLI
 . S MAGKTYP=47 ; set MAGKTYP variable for EVN+1 below
 . Q
 E  D  ; generate ADT A08
 . S DGPMT=8 ; set DGPMT variable for use in MAGDHLI
 . S MAGKTYP=8 ; set MAGKTYP variable for EVN+1 below
 . Q
 G TSK ; generate the HL7 ADT A08 or ADT A47 message
 ;
SSNCHECK(SSNCHANGES) ; Check for SSN change, return values
 ; Return 1 if there was an SSN change and 0 otherwise
 ; If there was an SSN change, do the following:
 ;   save the old value in SSNCHANGES(DATEIME,"OLD")
 ;   save the new value in SSNCHANGES(DATEIME,"NEW")
 ;   set NEWSSN(DATEIME) to the new value
 N DATETIME ; date and time of the SSN change
 N DIAIEN ; ien of the record in the AUDIT file (#1.1)
 N FIELDNUMBER ; SSN is field .09 in the PATIENT file (#2)
 N OLDSSN ; previous value of SSN, can't be null
 N X
 S DIAIEN=""
 F  S DIAIEN=$O(^DIA(2,"B",DFN,DIAIEN)) Q:DIAIEN=""  D
 . S X=$G(^DIA(2,DIAIEN,0))
 . S DATETIME=$P(X,"^",2),FIELDNUMBER=$P(X,"^",3)
 . I FIELDNUMBER'=.09 Q  ; not an SSN change record
 . S OLDSSN=$G(^DIA(2,DIAIEN,2))
 . I OLDSSN="" Q  ; no previous SSN value, don't send A47
 . S SSNCHANGES(DATETIME,"OLD")=OLDSSN
 . S SSNCHANGES(DATETIME,"NEW")=$G(^DIA(2,DIAIEN,3))
 . Q
 I '$G(MAGSENDA08) D  ; invocation by HL7 event driver
  . ; invocation by VAFC ADT-A08 SERVER event driver
  . ; keep the most recent change if it was done today
  . N A
  . S DATETIME=$O(SSNCHANGES(""),-1)
  . I DATETIME M A(DATETIME)=SSNCHANGES(DATETIME) ; save last change
  . K SSNCHANGES ; kill the SSN change history
  . I DT>DATETIME K A ; if last change was before today, kill it too
  . M SSNCHANGES=A ; save last change, if any
  . Q
 Q $D(SSNCHANGES)
 ;
 ;
ADT ;ADT EVENTS ;From EVENT driver
 ;Protocol = MAGD DHCP-PACS ADT EVENTS
 ;IN ;DFN
 ;DGPMDA = IFN Primary Movement
 ;DGPMA = 0th node Primary Movement AFTER movement
 ;DGPMP = 0th node PRIOR to movement
 ;^UTILITY("DGPM",$J,TRANSACTION (1,2,3,6),MOVEMENT (IFN),"P"/"A")
 ;
 N I K MAGKTYP F I=1,2,3 I $D(^UTILITY("DGPM",$J,I,DGPMDA)) S MAGKTYP=I
 Q:'$D(MAGKTYP)  I MAGKTYP=2,$P(^UTILITY("DGPM",$J,2,DGPMDA,"A"),U,6)=$P(^("P"),U,6) G EX
 ;
 ;
TSK ;CREATE TASK to make HL7 messages
 S ZTSAVE("MAGKTYP")="",ZTSAVE("MAGDPTCL")="",ZTSAVE("SSNCHANGES(")="" ; P183 PMK 3/9/17
 S ZTSAVE("DGPMDA")="",ZTSAVE("DGNOW")="",ZTSAVE("DGPMA")=""
 S ZTSAVE("DFN")="",ZTSAVE("DGPMT")="",ZTDTH=$H,ZTIO=""
 S ZTRTN="HL7^MAGDHLE",ZTDESC=$S(MAGKTYP=8:"PID",1:"ADT")_" HL7 PACS MESSAGE"
 I $$PROD^XUPROD D  ; production - P183 PMK 3/30/2017
 . D ^%ZTLOAD
 . Q
 E  D  ; development
 . N HLTC,HLDT,HLDT1,HLMID,HLRESLT1,HLENROU,HLEXROU ; GENERATE^HLMA variables
 . W !?5,"*** HL7 TASK FOR PACS ***"
 . D HL7 ; enable debugging in development
 . Q
 G EX
 ;
HL7 ;Create HL7 message
 I $P($G(^MAG(2006.1,1,"IHE")),"^",1)="Y" D ADT^MAGDHLI
 Q
 ;
EX ;EXIT
 K ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTSAVE
 K MAGKPID,MAGKTYP
 Q
 ;
 ; Vestigal code, kept around since there still cross references somewhere
SET ;Set Logic from MUMPS x-ref on fields .01,.03,.09 of ^DD(2 (^DPT)
 Q
 ;
KIL ;Kill logic "AKn" cross references
 Q


text:
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile("https://github.com/hashedin/awslib/zipball/master","hashedin-awslib.zip")

Set-ExecutionPolicy RemoteSigned


text:
# jqtmpl-compiler

**Compile jQuery templates**

## Installation

npm install -save jqtmpl-compiler

## Usage

```js

    var Compiler = require('jqtmpl-compiler');
    var compiler = new Compiler({ /* options */});
```

### Compile a single template
Given a string that is a valid jQuery template

```js
    var template = compiler.compile(templateString);
```

### Compile templates found in an HTML document
Given a string containing HTML, you can extract and compile templates from all of the <script> tags found in the document.

```js
    var templates = compiler.extractScripts(htmlString);
```

## API

### new Compiler([<object> opts])

Creates a new instance of the compiler with the optional opts object.

### compile(<string> source, [<object> opts])

Compiles the given source into a template and returns the template function.  The optional opts parameter can be used to override the options passed into the constructor.

### extractScripts(<string> html, [<object> opts])

Extracts and compiles templates found in script tags in the given HTML string.  The optional opts parameter can be used to override the options passed into the constructor.  This function returns an array of objects with the following properties:

* name: the name of the template
* template: the compiled template function

## Options

* cleanSource [boolean] - When true, the template source will be cleaned using [htmlclean](https://github.com/anseki/htmlclean). Default is true.

* scriptFilter [function(object): boolean] - Filters out non-template scripts when extracting templates from HTML.  This function takes an object that represents the script element and returns true or false if the script is a template.  By default, the function examines the script's type attribute and returns true if it is present, non-empty and not equal to "text/javascript".  If this is not a function, no filtering will take place.

* nameResolver [function(object): string] - Resolves the name of the template when extracting templates from HTML.  This function takes an object representing the script element and returns a string that will be the template's name.  By default the function returns the script's id attribute.  If this is not a function or it returns a falsey value, a generic name will be provided.

* nestedResolver [function(string): string] - Takes the name of a nested template and resolves it to a new name or reference.  Use this function to replace selectors with a reference to the compiled template.  By default, this function will return "exports['<name>']" as it assumes you will be compiling all your templates into a single module.  Returning falsey values will be the same as returning the original name, all other values will be converted to a string.

* preProcess [function(string): string] - This function provides a chance to process the template source.  It takes a string containing the template source and must return a string containing the the desired template source. By default no pre-processing is performed.  If this is not a function, no pre-processing will be performed.  If this function returns anything other than a string, an error will be thrown.

* postProcess [function(function): function] - This function provides a chance to process the compiled template function.  It takes a the compiled template and must return a function that is the final template.  By default no post-processing is done.  If this if not a function, no post-processing will be performed.  If this function returns anything other and a string, an error will be thrown.

## License

**jqtmpl-compiler** is Copyright (c) 2015 Ryan Turnquist and licensed under the [MIT license](http://opensource.org/licenses/MIT). All rights not explicitly granted in the MIT license are reserved.


text:
import { RedisError } from "redis-errors";

export default class ClusterAllFailedError extends RedisError {
  static defaultMessage = "Failed to refresh slots cache.";

  constructor(message, public lastNodeError: RedisError) {
    super(message);
    Error.captureStackTrace(this, this.constructor);
  }

  get name(): string {
    return this.constructor.name;
  }
}


text:
    <mat-slider #slider class="slider" color="primary" (change)="levelChange.emit($event.value); closeThumb()" [max]="100" [min]="0" [step]="5" [thumb-label]="true" [vertical]="true" [value]="mute ? beforeMuteLevel : level">
    </mat-slider>

        <button mat-raised-button [color]="mute ? 'warn' : 'primary'" (click)="muteClick()" (press)="muteClick()" class="button" [class.muted]="mute">
      <ng-container *ngIf="!mute">Mute</ng-container>
      <ng-container *ngIf="mute">Unmute</ng-container>
    </button>


text:
帝星战魂管理平台

               {{currentLanguage.displayName}}

                   {{language.displayName}}

               {{shownLoginName}}

                 {{l("GotoMain")}}

                 {{l("Logout")}}


text:
<img src="https://github.com/adriank/snooker/blob/master/screenshoot.png" width="400">

## The story behind this app

Recently my family started to play billiard a lot. They bought an 8-ball table to gain some skills with cues and balls, but the problem was that billard is a game for two, while there are 4 of us to play. To avoid fights over who plays first and who needs to wait, we had to figure out a way to play with 4 to 5 players at once!

After some time, we ended up with pretty nice rules that brings some skill to the table and is fun at the same time.

**The average game with 3 players lasts for around 30 minutes.**

## Prerequirements
- A real billard table
- 15 numbered balls
- at least 2 players (most fun with 5!)
- iPhone or Android device (or emulator)

## Rules

1. Put colored balls either in [the proper way](http://billiards.colostate.edu/bd_articles/2017/may17.pdf) to make game less dependant on luck or randomly and white (cue) ball behind the [head string](https://en.wikipedia.org/wiki/Glossary_of_cue_sports_terms#head_string)
2. Randomize the order of players
3. The goal is to put balls into a pocket in correct sequence. Ball number 1 is first to score, ball number 15 is the last. The **current ball** is one of the lowest number written on it.
4. At their turn player must touch the **current ball** with cue ball or any other ball. Using other balls to put the **current ball** into the pocket is what makes this game the best!
5. If current ball has ben put into the pocket, player gets the number of points of the ball number. For scoring the **current ball** player gets additional move. Example: player scores **current ball** of number 8, they get 8 points and gets additional move. If player scores ball number 9, they add 9 to their score and so on.
6. If any ball other than the **current ball** got into the pocket, player gets negative points of the ball they put into the pocket.
7. Fouls - each of the following fouls give -2 points:
- Player didn't touch the **current ball**,
- Double touch,
- Pushing cue ball instead of hitting,
- Touching any ball with players body (common when player can't reach cue ball easily or cue ball touches other ball),
- Making any ball fall outside the table.

## Tips

- This game is best for 3 to 5 players. With 2 players, other rules are probably more fun, with over 5 waiting times for turns are too long.
- If played well scores often are tight and hitting the last ball makes player the winner.
- The real game starts after ball number 11 is scored. You need to have good strategy and perfect aim to score balls of biggest numbers. If you and other players let balls 12 to 15 easily scorable, one player will score them all and win. It's best to make other players foul with these balls in the beginning or to push them to hard to hit positions.
- If there is one player who is much better at aiming than the rest of players, it's better to make their life harder by making them foul. Leaving cue ball so that other balls prevent direct hit is better option than trying own luck with hard to hit ball.


text:
package com.amazonaws.services.iot1clickprojects;

import javax.annotation.Generated;

import com.amazonaws.services.iot1clickprojects.model.*;

/**
 * Abstract implementation of {@code AWSIoT1ClickProjectsAsync}. Convenient method forms pass through to the
 * corresponding overload that takes a request object and an {@code AsyncHandler}, which throws an
 * {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAWSIoT1ClickProjectsAsync extends AbstractAWSIoT1ClickProjects implements AWSIoT1ClickProjectsAsync {

    protected AbstractAWSIoT1ClickProjectsAsync() {
    }

    @Override
    public java.util.concurrent.Future<AssociateDeviceWithPlacementResult> associateDeviceWithPlacementAsync(AssociateDeviceWithPlacementRequest request) {

        return associateDeviceWithPlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<AssociateDeviceWithPlacementResult> associateDeviceWithPlacementAsync(AssociateDeviceWithPlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<AssociateDeviceWithPlacementRequest, AssociateDeviceWithPlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreatePlacementResult> createPlacementAsync(CreatePlacementRequest request) {

        return createPlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreatePlacementResult> createPlacementAsync(CreatePlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<CreatePlacementRequest, CreatePlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateProjectResult> createProjectAsync(CreateProjectRequest request) {

        return createProjectAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateProjectResult> createProjectAsync(CreateProjectRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateProjectRequest, CreateProjectResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeletePlacementResult> deletePlacementAsync(DeletePlacementRequest request) {

        return deletePlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeletePlacementResult> deletePlacementAsync(DeletePlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<DeletePlacementRequest, DeletePlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteProjectResult> deleteProjectAsync(DeleteProjectRequest request) {

        return deleteProjectAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteProjectResult> deleteProjectAsync(DeleteProjectRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteProjectRequest, DeleteProjectResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribePlacementResult> describePlacementAsync(DescribePlacementRequest request) {

        return describePlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribePlacementResult> describePlacementAsync(DescribePlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribePlacementRequest, DescribePlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeProjectResult> describeProjectAsync(DescribeProjectRequest request) {

        return describeProjectAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeProjectResult> describeProjectAsync(DescribeProjectRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeProjectRequest, DescribeProjectResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DisassociateDeviceFromPlacementResult> disassociateDeviceFromPlacementAsync(
            DisassociateDeviceFromPlacementRequest request) {

        return disassociateDeviceFromPlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DisassociateDeviceFromPlacementResult> disassociateDeviceFromPlacementAsync(
            DisassociateDeviceFromPlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<DisassociateDeviceFromPlacementRequest, DisassociateDeviceFromPlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetDevicesInPlacementResult> getDevicesInPlacementAsync(GetDevicesInPlacementRequest request) {

        return getDevicesInPlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetDevicesInPlacementResult> getDevicesInPlacementAsync(GetDevicesInPlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<GetDevicesInPlacementRequest, GetDevicesInPlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListPlacementsResult> listPlacementsAsync(ListPlacementsRequest request) {

        return listPlacementsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListPlacementsResult> listPlacementsAsync(ListPlacementsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListPlacementsRequest, ListPlacementsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListProjectsResult> listProjectsAsync(ListProjectsRequest request) {

        return listProjectsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListProjectsResult> listProjectsAsync(ListProjectsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListProjectsRequest, ListProjectsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request) {

        return listTagsForResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<ListTagsForResourceRequest, ListTagsForResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request) {

        return tagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<TagResourceRequest, TagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request) {

        return untagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<UntagResourceRequest, UntagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdatePlacementResult> updatePlacementAsync(UpdatePlacementRequest request) {

        return updatePlacementAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdatePlacementResult> updatePlacementAsync(UpdatePlacementRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdatePlacementRequest, UpdatePlacementResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateProjectResult> updateProjectAsync(UpdateProjectRequest request) {

        return updateProjectAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateProjectResult> updateProjectAsync(UpdateProjectRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateProjectRequest, UpdateProjectResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

}


text:
require 'bootstrap_builder/alert'
require 'bootstrap_builder/button'
require 'bootstrap_builder/form'
require 'bootstrap_builder/glyphicon'
require 'bootstrap_builder/grid_system'

module BootstrapBuilder
  module Base #:nodoc:

    include BootstrapBuilder::Alert
    include BootstrapBuilder::Button
    include BootstrapBuilder::Form
    include BootstrapBuilder::Glyphicon
    include BootstrapBuilder::GridSystem
  end
end