text:
#include <linux/btree.h>
#include <linux/cache.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define NODESIZE MAX(L1_CACHE_BYTES, 128)

struct btree_geo {
	int keylen;
	int no_pairs;
	int no_longs;
};

struct btree_geo btree_geo32 = {
	.keylen = 1,
	.no_pairs = NODESIZE / sizeof(long) / 2,
	.no_longs = NODESIZE / sizeof(long) / 2,
};
EXPORT_SYMBOL_GPL(btree_geo32);

#define LONG_PER_U64 (64 / BITS_PER_LONG)
struct btree_geo btree_geo64 = {
	.keylen = LONG_PER_U64,
	.no_pairs = NODESIZE / sizeof(long) / (1 + LONG_PER_U64),
	.no_longs = LONG_PER_U64 * (NODESIZE / sizeof(long) / (1 + LONG_PER_U64)),
};
EXPORT_SYMBOL_GPL(btree_geo64);

struct btree_geo btree_geo128 = {
	.keylen = 2 * LONG_PER_U64,
	.no_pairs = NODESIZE / sizeof(long) / (1 + 2 * LONG_PER_U64),
	.no_longs = 2 * LONG_PER_U64 * (NODESIZE / sizeof(long) / (1 + 2 * LONG_PER_U64)),
};
EXPORT_SYMBOL_GPL(btree_geo128);

static struct kmem_cache *btree_cachep;

void *btree_alloc(gfp_t gfp_mask, void *pool_data)
{
	return kmem_cache_alloc(btree_cachep, gfp_mask);
}
EXPORT_SYMBOL_GPL(btree_alloc);

void btree_free(void *element, void *pool_data)
{
	kmem_cache_free(btree_cachep, element);
}
EXPORT_SYMBOL_GPL(btree_free);

static unsigned long *btree_node_alloc(struct btree_head *head, gfp_t gfp)
{
	unsigned long *node;

	node = mempool_alloc(head->mempool, gfp);
	if (likely(node))
		memset(node, 0, NODESIZE);
	return node;
}

static int longcmp(const unsigned long *l1, const unsigned long *l2, size_t n)
{
	size_t i;

	for (i = 0; i < n; i++) {
		if (l1[i] < l2[i])
			return -1;
		if (l1[i] > l2[i])
			return 1;
	}
	return 0;
}

static unsigned long *longcpy(unsigned long *dest, const unsigned long *src,
		size_t n)
{
	size_t i;

	for (i = 0; i < n; i++)
		dest[i] = src[i];
	return dest;
}

static unsigned long *longset(unsigned long *s, unsigned long c, size_t n)
{
	size_t i;

	for (i = 0; i < n; i++)
		s[i] = c;
	return s;
}

static void dec_key(struct btree_geo *geo, unsigned long *key)
{
	unsigned long val;
	int i;

	for (i = geo->keylen - 1; i >= 0; i--) {
		val = key[i];
		key[i] = val - 1;
		if (val)
			break;
	}
}

static unsigned long *bkey(struct btree_geo *geo, unsigned long *node, int n)
{
	return &node[n * geo->keylen];
}

static void *bval(struct btree_geo *geo, unsigned long *node, int n)
{
	return (void *)node[geo->no_longs + n];
}

static void setkey(struct btree_geo *geo, unsigned long *node, int n,
		   unsigned long *key)
{
	longcpy(bkey(geo, node, n), key, geo->keylen);
}

static void setval(struct btree_geo *geo, unsigned long *node, int n,
		   void *val)
{
	node[geo->no_longs + n] = (unsigned long) val;
}

static void clearpair(struct btree_geo *geo, unsigned long *node, int n)
{
	longset(bkey(geo, node, n), 0, geo->keylen);
	node[geo->no_longs + n] = 0;
}

static inline void __btree_init(struct btree_head *head)
{
	head->node = NULL;
	head->height = 0;
}

void btree_init_mempool(struct btree_head *head, mempool_t *mempool)
{
	__btree_init(head);
	head->mempool = mempool;
}
EXPORT_SYMBOL_GPL(btree_init_mempool);

int btree_init(struct btree_head *head)
{
	__btree_init(head);
	head->mempool = mempool_create(0, btree_alloc, btree_free, NULL);
	if (!head->mempool)
		return -ENOMEM;
	return 0;
}
EXPORT_SYMBOL_GPL(btree_init);

void btree_destroy(struct btree_head *head)
{
	mempool_destroy(head->mempool);
	head->mempool = NULL;
}
EXPORT_SYMBOL_GPL(btree_destroy);

void *btree_last(struct btree_head *head, struct btree_geo *geo,
		 unsigned long *key)
{
	int height = head->height;
	unsigned long *node = head->node;

	if (height == 0)
		return NULL;

	for ( ; height > 1; height--)
		node = bval(geo, node, 0);

	longcpy(key, bkey(geo, node, 0), geo->keylen);
	return bval(geo, node, 0);
}
EXPORT_SYMBOL_GPL(btree_last);

static int keycmp(struct btree_geo *geo, unsigned long *node, int pos,
		  unsigned long *key)
{
	return longcmp(bkey(geo, node, pos), key, geo->keylen);
}

static int keyzero(struct btree_geo *geo, unsigned long *key)
{
	int i;

	for (i = 0; i < geo->keylen; i++)
		if (key[i])
			return 0;

	return 1;
}

void *btree_lookup(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key)
{
	int i, height = head->height;
	unsigned long *node = head->node;

	if (height == 0)
		return NULL;

	for ( ; height > 1; height--) {
		for (i = 0; i < geo->no_pairs; i++)
			if (keycmp(geo, node, i, key) <= 0)
				break;
		if (i == geo->no_pairs)
			return NULL;
		node = bval(geo, node, i);
		if (!node)
			return NULL;
	}

	if (!node)
		return NULL;

	for (i = 0; i < geo->no_pairs; i++)
		if (keycmp(geo, node, i, key) == 0)
			return bval(geo, node, i);
	return NULL;
}
EXPORT_SYMBOL_GPL(btree_lookup);

int btree_update(struct btree_head *head, struct btree_geo *geo,
		 unsigned long *key, void *val)
{
	int i, height = head->height;
	unsigned long *node = head->node;

	if (height == 0)
		return -ENOENT;

	for ( ; height > 1; height--) {
		for (i = 0; i < geo->no_pairs; i++)
			if (keycmp(geo, node, i, key) <= 0)
				break;
		if (i == geo->no_pairs)
			return -ENOENT;
		node = bval(geo, node, i);
		if (!node)
			return -ENOENT;
	}

	if (!node)
		return -ENOENT;

	for (i = 0; i < geo->no_pairs; i++)
		if (keycmp(geo, node, i, key) == 0) {
			setval(geo, node, i, val);
			return 0;
		}
	return -ENOENT;
}
EXPORT_SYMBOL_GPL(btree_update);

/*
 * Usually this function is quite similar to normal lookup.  But the key of
 * a parent node may be smaller than the smallest key of all its siblings.
 * In such a case we cannot just return NULL, as we have only proven that no
 * key smaller than __key, but larger than this parent key exists.
 * So we set __key to the parent key and retry.  We have to use the smallest
 * such parent key, which is the last parent key we encountered.
 */
void *btree_get_prev(struct btree_head *head, struct btree_geo *geo,
		     unsigned long *__key)
{
	int i, height;
	unsigned long *node, *oldnode;
	unsigned long *retry_key = NULL, key[geo->keylen];

	if (keyzero(geo, __key))
		return NULL;

	if (head->height == 0)
		return NULL;
	longcpy(key, __key, geo->keylen);
retry:
	dec_key(geo, key);

	node = head->node;
	for (height = head->height ; height > 1; height--) {
		for (i = 0; i < geo->no_pairs; i++)
			if (keycmp(geo, node, i, key) <= 0)
				break;
		if (i == geo->no_pairs)
			goto miss;
		oldnode = node;
		node = bval(geo, node, i);
		if (!node)
			goto miss;
		retry_key = bkey(geo, oldnode, i);
	}

	if (!node)
		goto miss;

	for (i = 0; i < geo->no_pairs; i++) {
		if (keycmp(geo, node, i, key) <= 0) {
			if (bval(geo, node, i)) {
				longcpy(__key, bkey(geo, node, i), geo->keylen);
				return bval(geo, node, i);
			} else
				goto miss;
		}
	}
miss:
	if (retry_key) {
		longcpy(key, retry_key, geo->keylen);
		retry_key = NULL;
		goto retry;
	}
	return NULL;
}

static int getpos(struct btree_geo *geo, unsigned long *node,
		unsigned long *key)
{
	int i;

	for (i = 0; i < geo->no_pairs; i++) {
		if (keycmp(geo, node, i, key) <= 0)
			break;
	}
	return i;
}

static int getfill(struct btree_geo *geo, unsigned long *node, int start)
{
	int i;

	for (i = start; i < geo->no_pairs; i++)
		if (!bval(geo, node, i))
			break;
	return i;
}

/*
 * locate the correct leaf node in the btree
 */
static unsigned long *find_level(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key, int level)
{
	unsigned long *node = head->node;
	int i, height;

	for (height = head->height; height > level; height--) {
		for (i = 0; i < geo->no_pairs; i++)
			if (keycmp(geo, node, i, key) <= 0)
				break;

		if ((i == geo->no_pairs) || !bval(geo, node, i)) {
			/* right-most key is too large, update it */
			/* FIXME: If the right-most key on higher levels is
			 * always zero, this wouldn't be necessary. */
			i--;
			setkey(geo, node, i, key);
		}
		BUG_ON(i < 0);
		node = bval(geo, node, i);
	}
	BUG_ON(!node);
	return node;
}

static int btree_grow(struct btree_head *head, struct btree_geo *geo,
		      gfp_t gfp)
{
	unsigned long *node;
	int fill;

	node = btree_node_alloc(head, gfp);
	if (!node)
		return -ENOMEM;
	if (head->node) {
		fill = getfill(geo, head->node, 0);
		setkey(geo, node, 0, bkey(geo, head->node, fill - 1));
		setval(geo, node, 0, head->node);
	}
	head->node = node;
	head->height++;
	return 0;
}

static void btree_shrink(struct btree_head *head, struct btree_geo *geo)
{
	unsigned long *node;
	int fill;

	if (head->height <= 1)
		return;

	node = head->node;
	fill = getfill(geo, node, 0);
	BUG_ON(fill > 1);
	head->node = bval(geo, node, 0);
	head->height--;
	mempool_free(node, head->mempool);
}

static int btree_insert_level(struct btree_head *head, struct btree_geo *geo,
			      unsigned long *key, void *val, int level,
			      gfp_t gfp)
{
	unsigned long *node;
	int i, pos, fill, err;

	BUG_ON(!val);
	if (head->height < level) {
		err = btree_grow(head, geo, gfp);
		if (err)
			return err;
	}

retry:
	node = find_level(head, geo, key, level);
	pos = getpos(geo, node, key);
	fill = getfill(geo, node, pos);
	/* two identical keys are not allowed */
	BUG_ON(pos < fill && keycmp(geo, node, pos, key) == 0);

	if (fill == geo->no_pairs) {
		/* need to split node */
		unsigned long *new;

		new = btree_node_alloc(head, gfp);
		if (!new)
			return -ENOMEM;
		err = btree_insert_level(head, geo,
				bkey(geo, node, fill / 2 - 1),
				new, level + 1, gfp);
		if (err) {
			mempool_free(new, head->mempool);
			return err;
		}
		for (i = 0; i < fill / 2; i++) {
			setkey(geo, new, i, bkey(geo, node, i));
			setval(geo, new, i, bval(geo, node, i));
			setkey(geo, node, i, bkey(geo, node, i + fill / 2));
			setval(geo, node, i, bval(geo, node, i + fill / 2));
			clearpair(geo, node, i + fill / 2);
		}
		if (fill & 1) {
			setkey(geo, node, i, bkey(geo, node, fill - 1));
			setval(geo, node, i, bval(geo, node, fill - 1));
			clearpair(geo, node, fill - 1);
		}
		goto retry;
	}
	BUG_ON(fill >= geo->no_pairs);

	/* shift and insert */
	for (i = fill; i > pos; i--) {
		setkey(geo, node, i, bkey(geo, node, i - 1));
		setval(geo, node, i, bval(geo, node, i - 1));
	}
	setkey(geo, node, pos, key);
	setval(geo, node, pos, val);

	return 0;
}

int btree_insert(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key, void *val, gfp_t gfp)
{
	return btree_insert_level(head, geo, key, val, 1, gfp);
}
EXPORT_SYMBOL_GPL(btree_insert);

static void *btree_remove_level(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key, int level);
static void merge(struct btree_head *head, struct btree_geo *geo, int level,
		unsigned long *left, int lfill,
		unsigned long *right, int rfill,
		unsigned long *parent, int lpos)
{
	int i;

	for (i = 0; i < rfill; i++) {
		/* Move all keys to the left */
		setkey(geo, left, lfill + i, bkey(geo, right, i));
		setval(geo, left, lfill + i, bval(geo, right, i));
	}
	/* Exchange left and right child in parent */
	setval(geo, parent, lpos, right);
	setval(geo, parent, lpos + 1, left);
	/* Remove left (formerly right) child from parent */
	btree_remove_level(head, geo, bkey(geo, parent, lpos), level + 1);
	mempool_free(right, head->mempool);
}

static void rebalance(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key, int level, unsigned long *child, int fill)
{
	unsigned long *parent, *left = NULL, *right = NULL;
	int i, no_left, no_right;

	if (fill == 0) {
		/* Because we don't steal entries from a neighbour, this case
		 * can happen.  Parent node contains a single child, this
		 * node, so merging with a sibling never happens.
		 */
		btree_remove_level(head, geo, key, level + 1);
		mempool_free(child, head->mempool);
		return;
	}

	parent = find_level(head, geo, key, level + 1);
	i = getpos(geo, parent, key);
	BUG_ON(bval(geo, parent, i) != child);

	if (i > 0) {
		left = bval(geo, parent, i - 1);
		no_left = getfill(geo, left, 0);
		if (fill + no_left <= geo->no_pairs) {
			merge(head, geo, level,
					left, no_left,
					child, fill,
					parent, i - 1);
			return;
		}
	}
	if (i + 1 < getfill(geo, parent, i)) {
		right = bval(geo, parent, i + 1);
		no_right = getfill(geo, right, 0);
		if (fill + no_right <= geo->no_pairs) {
			merge(head, geo, level,
					child, fill,
					right, no_right,
					parent, i);
			return;
		}
	}
	/*
	 * We could also try to steal one entry from the left or right
	 * neighbor.  By not doing so we changed the invariant from
	 * "all nodes are at least half full" to "no two neighboring
	 * nodes can be merged".  Which means that the average fill of
	 * all nodes is still half or better.
	 */
}

static void *btree_remove_level(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key, int level)
{
	unsigned long *node;
	int i, pos, fill;
	void *ret;

	if (level > head->height) {
		/* we recursed all the way up */
		head->height = 0;
		head->node = NULL;
		return NULL;
	}

	node = find_level(head, geo, key, level);
	pos = getpos(geo, node, key);
	fill = getfill(geo, node, pos);
	if ((level == 1) && (keycmp(geo, node, pos, key) != 0))
		return NULL;
	ret = bval(geo, node, pos);

	/* remove and shift */
	for (i = pos; i < fill - 1; i++) {
		setkey(geo, node, i, bkey(geo, node, i + 1));
		setval(geo, node, i, bval(geo, node, i + 1));
	}
	clearpair(geo, node, fill - 1);

	if (fill - 1 < geo->no_pairs / 2) {
		if (level < head->height)
			rebalance(head, geo, key, level, node, fill - 1);
		else if (fill - 1 == 1)
			btree_shrink(head, geo);
	}

	return ret;
}

void *btree_remove(struct btree_head *head, struct btree_geo *geo,
		unsigned long *key)
{
	if (head->height == 0)
		return NULL;

	return btree_remove_level(head, geo, key, 1);
}
EXPORT_SYMBOL_GPL(btree_remove);

int btree_merge(struct btree_head *target, struct btree_head *victim,
		struct btree_geo *geo, gfp_t gfp)
{
	unsigned long key[geo->keylen];
	unsigned long dup[geo->keylen];
	void *val;
	int err;

	BUG_ON(target == victim);

	if (!(target->node)) {
		/* target is empty, just copy fields over */
		target->node = victim->node;
		target->height = victim->height;
		__btree_init(victim);
		return 0;
	}

	/* TODO: This needs some optimizations.  Currently we do three tree
	 * walks to remove a single object from the victim.
	 */
	for (;;) {
		if (!btree_last(victim, geo, key))
			break;
		val = btree_lookup(victim, geo, key);
		err = btree_insert(target, geo, key, val, gfp);
		if (err)
			return err;
		/* We must make a copy of the key, as the original will get
		 * mangled inside btree_remove. */
		longcpy(dup, key, geo->keylen);
		btree_remove(victim, geo, dup);
	}
	return 0;
}
EXPORT_SYMBOL_GPL(btree_merge);

static size_t __btree_for_each(struct btree_head *head, struct btree_geo *geo,
			       unsigned long *node, unsigned long opaque,
			       void (*func)(void *elem, unsigned long opaque,
					    unsigned long *key, size_t index,
					    void *func2),
			       void *func2, int reap, int height, size_t count)
{
	int i;
	unsigned long *child;

	for (i = 0; i < geo->no_pairs; i++) {
		child = bval(geo, node, i);
		if (!child)
			break;
		if (height > 1)
			count = __btree_for_each(head, geo, child, opaque,
					func, func2, reap, height - 1, count);
		else
			func(child, opaque, bkey(geo, node, i), count++,
					func2);
	}
	if (reap)
		mempool_free(node, head->mempool);
	return count;
}

static void empty(void *elem, unsigned long opaque, unsigned long *key,
		  size_t index, void *func2)
{
}

void visitorl(void *elem, unsigned long opaque, unsigned long *key,
	      size_t index, void *__func)
{
	visitorl_t func = __func;

	func(elem, opaque, *key, index);
}
EXPORT_SYMBOL_GPL(visitorl);

void visitor32(void *elem, unsigned long opaque, unsigned long *__key,
	       size_t index, void *__func)
{
	visitor32_t func = __func;
	u32 *key = (void *)__key;

	func(elem, opaque, *key, index);
}
EXPORT_SYMBOL_GPL(visitor32);

void visitor64(void *elem, unsigned long opaque, unsigned long *__key,
	       size_t index, void *__func)
{
	visitor64_t func = __func;
	u64 *key = (void *)__key;

	func(elem, opaque, *key, index);
}
EXPORT_SYMBOL_GPL(visitor64);

void visitor128(void *elem, unsigned long opaque, unsigned long *__key,
		size_t index, void *__func)
{
	visitor128_t func = __func;
	u64 *key = (void *)__key;

	func(elem, opaque, key[0], key[1], index);
}
EXPORT_SYMBOL_GPL(visitor128);

size_t btree_visitor(struct btree_head *head, struct btree_geo *geo,
		     unsigned long opaque,
		     void (*func)(void *elem, unsigned long opaque,
		     		  unsigned long *key,
		     		  size_t index, void *func2),
		     void *func2)
{
	size_t count = 0;

	if (!func2)
		func = empty;
	if (head->node)
		count = __btree_for_each(head, geo, head->node, opaque, func,
				func2, 0, head->height, 0);
	return count;
}
EXPORT_SYMBOL_GPL(btree_visitor);

size_t btree_grim_visitor(struct btree_head *head, struct btree_geo *geo,
			  unsigned long opaque,
			  void (*func)(void *elem, unsigned long opaque,
				       unsigned long *key,
				       size_t index, void *func2),
			  void *func2)
{
	size_t count = 0;

	if (!func2)
		func = empty;
	if (head->node)
		count = __btree_for_each(head, geo, head->node, opaque, func,
				func2, 1, head->height, 0);
	__btree_init(head);
	return count;
}
EXPORT_SYMBOL_GPL(btree_grim_visitor);

static int __init btree_module_init(void)
{
	btree_cachep = kmem_cache_create("btree_node", NODESIZE, 0,
			SLAB_HWCACHE_ALIGN, NULL);
	return 0;
}

static void __exit btree_module_exit(void)
{
	kmem_cache_destroy(btree_cachep);
}

/* If core code starts using btree, initialization should happen even earlier */
module_init(btree_module_init);
module_exit(btree_module_exit);

MODULE_AUTHOR("Joern Engel <joern@logfs.org>");
MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>");
MODULE_LICENSE("GPL");


text:
import web
from web.contrib.template import render_jinja

from app.weblib.logging import create_logger

def load_logger():
    '''Add a logger to the shared context.'''
    web.ctx.logger = create_logger()

def load_path_url():
    '''Add 'path_url' property to the shared context containing the
    concatenation of ``web.ctx.home`` and ``web.ctx.path``.'''
    web.ctx.path_url = web.ctx.home + web.ctx.path

def load_render(views, **globals):
    '''Add the renderer to the shared context.'''
    render = render_jinja(views, encoding='utf-8',
                          extensions=['jinja2.ext.do'])
    render._lookup.globals.update(globals)
    def inner():
        web.ctx.render = render;
    return inner

def load_render_with_assets(views, env, **globals):
    '''Add the renderer to the shared context.'''
    from webassets.ext.jinja2 import AssetsExtension
    render = render_jinja(views, encoding='utf-8',
                          extensions=['jinja2.ext.do', AssetsExtension])
    render._lookup.assets_environment = env
    render._lookup.globals.update(globals)
    def inner():
        web.ctx.render = render;
    return inner

def load_session(session):
    '''Load the session into the shared context.'''
    def inner():
        web.ctx.session = session
    return inner

def load_and_manage_orm(ormfactory):
    '''Load ORM database connection and manage exceptions properly.'''
    def inner(handler):
        web.ctx.orm = ormfactory()

        try:
            return handler()
        finally:
            ormfactory.remove()
    return inner

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2017 Snow Volf (Artem Zhiganov).
  ~ 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.
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:background="@color/update_background"
        android:id="@+id/update_layout">

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:padding="12dp"
            android:text="@string/update_lib_file_download_text"
            style="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Title"/>

        <ProgressBar
            android:id="@+id/progressBar"
            style="@style/Widget.AppCompat.ProgressBar.Horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/title"
            android:layout_alignParentStart="true" />
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/update_btn_background"
        android:layout_below="@+id/update_layout">
            <Button
                android:id="@+id/btnCancel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="8dp"
                android:text="@string/update_lib_stop_download"
                style="@style/UpdateButton"
                android:layout_alignParentTop="true"
                android:layout_alignParentEnd="true" />

            <Button
                android:id="@+id/btnBackground"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/update_lib_background_download"
                style="@style/UpdateButton"
                android:layout_alignParentTop="true"
                android:layout_toStartOf="@+id/btnCancel" />

    </RelativeLayout>

    </RelativeLayout>

</FrameLayout>


text:
package io.grpc.stub;

import io.grpc.ExperimentalApi;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.ServerCall;
import io.grpc.ServerCallHandler;
import io.grpc.Status;

/**
 * Utility functions for adapting {@link ServerCallHandler}s to application service implementation,
 * meant to be used by the generated code.
 */
@ExperimentalApi
public class ServerCalls {

  private ServerCalls() {
  }

  /**
   * Creates a {@code ServerCallHandler} for a unary call method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncUnaryCall(
      final UnaryMethod<ReqT, RespT> method) {
    return asyncUnaryRequestCall(method);
  }

  /**
   * Creates a {@code ServerCallHandler} for a server streaming method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncServerStreamingCall(
      final ServerStreamingMethod<ReqT, RespT> method) {
    return asyncUnaryRequestCall(method);
  }

  /**
   * Creates a {@code ServerCallHandler} for a client streaming method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncClientStreamingCall(
      final ClientStreamingMethod<ReqT, RespT> method) {
    return asyncStreamingRequestCall(method);
  }

  /**
   * Creates a {@code ServerCallHandler} for a bidi streaming method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall(
      final BidiStreamingMethod<ReqT, RespT> method) {
    return asyncStreamingRequestCall(method);
  }

  /**
   * Adaptor to a unary call method.
   */
  public static interface UnaryMethod<ReqT, RespT> extends UnaryRequestMethod<ReqT, RespT> {
  }

  /**
   * Adaptor to a server streaming method.
   */
  public static interface ServerStreamingMethod<ReqT, RespT>
      extends UnaryRequestMethod<ReqT, RespT> {
  }

  /**
   * Adaptor to a client streaming method.
   */
  public static interface ClientStreamingMethod<ReqT, RespT>
      extends StreamingRequestMethod<ReqT, RespT> {
  }

  /**
   * Adaptor to a bi-directional streaming method.
   */
  public static interface BidiStreamingMethod<ReqT, RespT>
      extends StreamingRequestMethod<ReqT, RespT> {
  }

  /**
   * Creates a {@code ServerCallHandler} for a unary request call method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  private static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncUnaryRequestCall(
      final UnaryRequestMethod<ReqT, RespT> method) {
    return new ServerCallHandler<ReqT, RespT>() {
      @Override
      public ServerCall.Listener<ReqT> startCall(
          MethodDescriptor<ReqT, RespT> methodDescriptor,
          final ServerCall<RespT> call,
          Metadata headers) {
        final ResponseObserver<RespT> responseObserver = new ResponseObserver<RespT>(call);
        // We expect only 1 request, but we ask for 2 requests here so that if a misbehaving client
        // sends more than 1 requests, ServerCall will catch it.
        call.request(2);
        return new EmptyServerCallListener<ReqT>() {
          ReqT request;
          @Override
          public void onMessage(ReqT request) {
            // We delay calling method.invoke() until onHalfClose() to make sure the client
            // half-closes.
            this.request = request;
          }

          @Override
          public void onHalfClose() {
            if (request != null) {
              method.invoke(request, responseObserver);
            } else {
              call.close(Status.INVALID_ARGUMENT.withDescription("Half-closed without a request"),
                  new Metadata());
            }
          }

          @Override
          public void onCancel() {
            responseObserver.cancelled = true;
          }
        };
      }
    };
  }

  /**
   * Creates a {@code ServerCallHandler} for a streaming request call method of the service.
   *
   * @param method an adaptor to the actual method on the service implementation.
   */
  private static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncStreamingRequestCall(
      final StreamingRequestMethod<ReqT, RespT> method) {
    return new ServerCallHandler<ReqT, RespT>() {
      @Override
      public ServerCall.Listener<ReqT> startCall(
          MethodDescriptor<ReqT, RespT> methodDescriptor,
          final ServerCall<RespT> call,
          Metadata headers) {
        call.request(1);
        final ResponseObserver<RespT> responseObserver = new ResponseObserver<RespT>(call);
        final StreamObserver<ReqT> requestObserver = method.invoke(responseObserver);
        return new EmptyServerCallListener<ReqT>() {
          boolean halfClosed = false;

          @Override
          public void onMessage(ReqT request) {
            requestObserver.onNext(request);

            // Request delivery of the next inbound message.
            call.request(1);
          }

          @Override
          public void onHalfClose() {
            halfClosed = true;
            requestObserver.onCompleted();
          }

          @Override
          public void onCancel() {
            responseObserver.cancelled = true;
            if (!halfClosed) {
              requestObserver.onError(Status.CANCELLED.asException());
            }
          }
        };
      }
    };
  }

  private static interface UnaryRequestMethod<ReqT, RespT> {
    void invoke(ReqT request, StreamObserver<RespT> responseObserver);
  }

  private static interface StreamingRequestMethod<ReqT, RespT> {
    StreamObserver<ReqT> invoke(StreamObserver<RespT> responseObserver);
  }

  private static class ResponseObserver<RespT> implements StreamObserver<RespT> {
    final ServerCall<RespT> call;
    volatile boolean cancelled;
    private boolean sentHeaders;

    ResponseObserver(ServerCall<RespT> call) {
      this.call = call;
    }

    @Override
    public void onNext(RespT response) {
      if (cancelled) {
        throw Status.CANCELLED.asRuntimeException();
      }
      if (!sentHeaders) {
        call.sendHeaders(new Metadata());
        sentHeaders = true;
      }
      call.sendMessage(response);
    }

    @Override
    public void onError(Throwable t) {
      call.close(Status.fromThrowable(t), new Metadata());
    }

    @Override
    public void onCompleted() {
      if (cancelled) {
        throw Status.CANCELLED.asRuntimeException();
      } else {
        call.close(Status.OK, new Metadata());
      }
    }
  }

  private static class EmptyServerCallListener<ReqT> extends ServerCall.Listener<ReqT> {
    @Override
    public void onMessage(ReqT request) {
    }

    @Override
    public void onHalfClose() {
    }

    @Override
    public void onCancel() {
    }

    @Override
    public void onComplete() {
    }
  }
}


text:
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_QUERY_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_QUERY_H_

#include <memory>

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/css_selector_list.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

namespace blink {

class CSSSelector;
class ContainerNode;
class Document;
class Element;
class ExceptionState;
template <typename NodeType>
class StaticNodeTypeList;
using StaticElementList = StaticNodeTypeList<Element>;

class CORE_EXPORT SelectorQuery {
  USING_FAST_MALLOC(SelectorQuery);

 public:
  SelectorQuery(const SelectorQuery&) = delete;
  SelectorQuery& operator=(const SelectorQuery&) = delete;

  static std::unique_ptr<SelectorQuery> Adopt(CSSSelectorList);

  // https://dom.spec.whatwg.org/#dom-element-matches
  bool Matches(Element&) const;

  // https://dom.spec.whatwg.org/#dom-element-closest
  Element* Closest(Element&) const;

  // https://dom.spec.whatwg.org/#dom-parentnode-queryselectorall
  StaticElementList* QueryAll(ContainerNode& root_node) const;

  // https://dom.spec.whatwg.org/#dom-parentnode-queryselector
  Element* QueryFirst(ContainerNode& root_node) const;

  struct QueryStats {
    unsigned total_count;
    unsigned fast_id;
    unsigned fast_class;
    unsigned fast_tag_name;
    unsigned fast_scan;
    unsigned slow_scan;
    unsigned slow_traversing_shadow_tree_scan;
  };
  // Used by unit tests to get information about what paths were taken during
  // the last query. Always reset between queries. This system is disabled in
  // non DCHECK builds to avoid the overhead on the query process.
  static QueryStats LastQueryStats();

 private:
  explicit SelectorQuery(CSSSelectorList);

  template <typename SelectorQueryTrait>
  void ExecuteWithId(ContainerNode& root_node,
                     typename SelectorQueryTrait::OutputType&) const;
  template <typename SelectorQueryTrait>
  void FindTraverseRootsAndExecute(
      ContainerNode& root_node,
      typename SelectorQueryTrait::OutputType&) const;
  template <typename SelectorQueryTrait>
  void ExecuteForTraverseRoot(ContainerNode& traverse_root,
                              ContainerNode& root_node,
                              typename SelectorQueryTrait::OutputType&) const;
  template <typename SelectorQueryTrait>
  void ExecuteSlow(ContainerNode& root_node,
                   typename SelectorQueryTrait::OutputType&) const;
  template <typename SelectorQueryTrait>
  void Execute(ContainerNode& root_node,
               typename SelectorQueryTrait::OutputType&) const;

  bool SelectorListMatches(ContainerNode& root_node, Element&) const;

  CSSSelectorList selector_list_;
  // Contains the list of CSSSelector's to match, but without ones that could
  // never match like pseudo elements, div::before. This can be empty, while
  // |selector_list_| will never be empty as SelectorQueryCache::add would have
  // thrown an exception.
  Vector<const CSSSelector*> selectors_;
  AtomicString selector_id_;
  bool selector_id_is_rightmost_ : 1;
  bool selector_id_affected_by_sibling_combinator_ : 1;
  bool use_slow_scan_ : 1;
};

class SelectorQueryCache {
  USING_FAST_MALLOC(SelectorQueryCache);

 public:
  SelectorQuery* Add(const AtomicString&, const Document&, ExceptionState&);
  void Invalidate();

 private:
  HashMap<AtomicString, std::unique_ptr<SelectorQuery>> entries_;
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_QUERY_H_


text:
package org.apache.ambari.scom;

import org.apache.ambari.server.controller.jmx.JMXPropertyProvider;
import org.apache.ambari.server.controller.spi.PropertyProvider;
import org.apache.ambari.server.controller.spi.Resource;
import org.junit.Assert;
import org.junit.Test;

import java.util.List;

/**
 * SQLProviderModule Tests
 */
public class SQLProviderModuleTest {
  @Test
  public void testCreatePropertyProviders() {
    SQLProviderModule providerModule = new SQLProviderModule();

    providerModule.createPropertyProviders(Resource.Type.Component);

    List<PropertyProvider> providers = providerModule.getPropertyProviders(Resource.Type.Component);

    Assert.assertTrue(providers.get(0) instanceof JMXPropertyProvider);
    Assert.assertTrue(providers.get(1) instanceof SQLPropertyProvider);

    providerModule.createPropertyProviders(Resource.Type.HostComponent);

    providers = providerModule.getPropertyProviders(Resource.Type.HostComponent);

    Assert.assertTrue(providers.get(0) instanceof JMXPropertyProvider);
    Assert.assertTrue(providers.get(1) instanceof SQLPropertyProvider);
  }
}


text:
package de.undercouch.citeproc.csl.internal;

import org.w3c.dom.Node;

/**
 * A container for style elements that is itself also a renderable element.
 * Renders all elements at once.
 * @author Michel Kraemer
 */
public class SRenderingElementContainerElement extends SRenderingElementContainer implements SElement {
    /**
     * Construct the container from an XML node
     * @param node the XML node
     */
    public SRenderingElementContainerElement(Node node) {
        super(node);
    }

    @Override
    public void render(RenderContext ctx) {
        getElements(ctx).forEach(e -> e.render(ctx));
    }
}


text:
package com.ucar.weex.update;

import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.ucar.weex.UWXApplication;
import com.ucar.weex.init.utils.UWLog;
import com.ucar.weex.okhttp.CommonOkHttpClient;
import com.ucar.weex.okhttp.listerner.DisposeDataHandle;
import com.ucar.weex.okhttp.listerner.DisposeDataListener;
import com.ucar.weex.okhttp.request.CommonRequest;
import com.ucar.weex.okhttp.request.RequestParams;
import com.ucar.weex.utils.AppUtil;
import com.ucar.weex.utils.ArrayUtils;
import com.ucar.weex.utils.Storage;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by zhoucheng on 2017/6/14.
 */

public class UWXResManager {
    public static final String TAG = UWXResManager.class.getSimpleName();
    private String WX_DATA_PATH = "";
    private static UWXResManager instance;
    private WXPackageInfo lastPackageInfo;
    private SharedPreferences preferences;
    private WXPackageInfo newPackageinfo;
    private String server_url = "http://fcardownloadtest.10101111.com/fcarapp/upgrade/getUpgradeInfo";
    private List<WXPackageInfo> packageInfos;

    public void setServerUrl(String server_url) {
        this.server_url = server_url;
    }

    public String getServerUrl() {
        return server_url;
    }

    public static UWXResManager getInstance() {
        if (instance == null) {
            instance = new UWXResManager();
        }
        return instance;
    }

    private void initManager() {
        if (TextUtils.isEmpty(this.WX_DATA_PATH)) {
            this.WX_DATA_PATH = Storage.getAppFileDir(UWXApplication.getsApplication()) + "/weexfile/";
            File f = new File(this.WX_DATA_PATH);
            if (!f.exists()) {
                f.mkdirs();
            }
        }
        this.preferences = UWXApplication.getsApplication().getSharedPreferences("ucar_wx_res", 0);
        this.iniWXInfo();
    }

    private void iniWXInfo() {
        String packageJson = preferences.getString("wx_res_info", "");
        try {
            packageInfos = JSON.parseArray(packageJson, WXPackageInfo.class);
            this.lastPackageInfo = !ArrayUtils.isEmpty(packageInfos) ? packageInfos.get(0) : null;
        } catch (JSONException e) {
            packageInfos = null;
            UWLog.e(TAG, e.getMessage());
        }
    }

    public List<WXPackageInfo> getPackageInfos() {
        return packageInfos;
    }

    private void saveWXInfo(WXPackageInfo info) {
        if (packageInfos == null) {
            packageInfos = new ArrayList<>();
        }
        packageInfos.add(0, info);
        SharedPreferences.Editor e1 = this.preferences.edit();
        e1.putString("wx_res_info", JSON.toJSONString(packageInfos));
        e1.apply();
    }

    public String getWXResPath() {
        if (lastPackageInfo != null) {
            return WX_DATA_PATH + lastPackageInfo.path + "/";
        }
        return WX_DATA_PATH;
    }

    private UWXResManager() {
        this.initManager();
    }

    public interface addWXResFromAssertListener {
        void resFromAssertListener(boolean success, String des, WXPackageInfo wxPackageInfo);
    }

    /**
     * @param context
     * @param assetFileName
     */
    public boolean addWXResFromAssert(final Context context, final String assetFileName) {
        return checkAndCopy(context, assetFileName, null);
    }

    public void asyAddWXResFromAssert(final Context context, final String assetFileName, final addWXResFromAssertListener listener) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                checkAndCopy(context, assetFileName, listener);
            }
        }).start();
    }

    private boolean checkAndCopy(Context context, String assetFileName, addWXResFromAssertListener listener) {
        boolean success;
        String des;
        if (!TextUtils.isEmpty(assetFileName)) {
            UWLog.d(TAG, "assetFileName" + assetFileName);
            if (check(context, assetFileName)) {
                if (newPackageinfo == null) {
                    String assetFileToStr = FileUtils.getAssetFileToStr(context.getAssets(), assetFileName + ".json");
                    if (TextUtils.isEmpty(assetFileToStr)) {
                        UWLog.e(TAG, "up包解析有问题");
                    }
                    newPackageinfo = JSON.parseObject(assetFileToStr, WXPackageInfo.class);
                }
                if (this.unzipAssetsZip(context, assetFileName)) {
                    UWLog.d(TAG, "解压Assets文件成功");
                    success = true;
                    des = "成功";
                    this.lastPackageInfo = newPackageinfo;
                    saveWXInfo(newPackageinfo);
                } else {
                    success = false;
                    des = "解压Assets失败";
                    UWLog.e(TAG, "解压Assets失败");
                }
            } else {
                success = true;
                des = "资源已经最新";
                UWLog.d(TAG, "资源已经最新");
            }
        } else {
            success = false;
            des = "assets文件找不到";
        }
        clearFile(newPackageinfo.path);
        if (listener != null) {
            listener.resFromAssertListener(success, des, newPackageinfo);
        }
        return success;
    }

    private void clearFile(String extName) {
        File file = new File(WX_DATA_PATH);
        if (file.exists()) {
            if (file.isDirectory()) {
                File[] files = file.listFiles();
                if (!ArrayUtils.isEmpty(files)) {
                    for (File file1 : files) {
                        if (file1.exists() && file1.isDirectory() && extName != null && extName.equals(file1.getName())) {
                            continue;
                        } else {
                            deleteFile(file1);
                        }
                    }
                }
            }
        }
    }

    /**
     * 保留最近两个
     */
    private void delOldPackage() {
        if (!ArrayUtils.isEmpty(packageInfos) && packageInfos.size() > 2) {
            int size = packageInfos.size();
            for (int i = 2; i < size; i++) {
                WXPackageInfo info = packageInfos.get(i);
                delPackageByName(info.path);
            }
        }
    }

    private void delPackageByName(String path) {
        File dir = new File(WX_DATA_PATH + path);
        if (dir.exists()) {
            deleteFile(dir);
            UWLog.d(TAG, "del old assets");
        }
    }

    private void deleteFile(File file) {
        if (file.isDirectory()) {
            File[] files = file.listFiles();
            for (int i = 0; i < files.length; i++) {
                deleteFile(files[i]);
            }
        }
        file.delete();
    }

    /**
     * name  id_version_time.zip
     * ucar_11_20170401161448.zip
     *
     * @param weexFileName
     * @return
     */
    private boolean check(Context context, String weexFileName) {

        //首次拷贝
        if (this.lastPackageInfo == null || this.lastPackageInfo.path == null) {
            UWLog.e(TAG, "第一次copy asset2sdcard");
            return true;
        }
        String assetFileToStr = FileUtils.getAssetFileToStr(context.getAssets(), weexFileName + ".json");
        if (TextUtils.isEmpty(assetFileToStr)) {
            UWLog.e(TAG, "up包解析有问题");
            return false;
        }
        newPackageinfo = JSON.parseObject(assetFileToStr, WXPackageInfo.class);

        if (newPackageinfo == null) {
            UWLog.e(TAG, "up包解析有问题");
            return false;
        }

        if (newPackageinfo.versionCodeAndroid > this.lastPackageInfo.versionCodeAndroid) {
            UWLog.e(TAG, "asset ver >sdcard ver");
            return true;
        }
//        if (Long.parseLong(newPackageinfo.time) > Long.parseLong(this.lastPackageInfo.time) &&
//                !TextUtils.equals(newPackageinfo.md5, this.lastPackageInfo.md5)
//                ) {
//            UWLog.e(TAG, "asset文件有变化且时间最新");
//            return true;
//        }
        File file = new File(WX_DATA_PATH, newPackageinfo.path);
        if (!file.exists()) {
            UWLog.e(TAG, "sdcard文件已经损坏");
            return true;
        }
        return false;
    }

    /**
     * @param context
     * @param assertName
     * @return
     */
    private boolean unzipAssetsZip(Context context, String assertName) {
        File file = new File(WX_DATA_PATH, newPackageinfo.path);
        if (!file.exists()) {
            try {
                file.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        try {
            InputStream in = context.getAssets().open(assertName + ".zip");
            boolean success = FileUtils.unpackZip(in, file);
            return success;
        } catch (Exception e) {
            UWLog.e(TAG, e.getMessage());
        }
        return false;
    }

    /**
     * @param inFile
     * @return
     */
    private boolean unzipSdcardZip(String inFile, String path) {
        File outfile = new File(WX_DATA_PATH, path);
        if (!outfile.exists()) {
            try {
                outfile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        File infile = new File(inFile);
        if (!infile.exists()) {
            return false;
        }
        try {
            InputStream in = new FileInputStream(infile);
            boolean success = FileUtils.unpackZip(in, outfile);
            return success;
        } catch (Exception e) {
            UWLog.e(TAG, e.getMessage());
        }
        return false;
    }

    public void checkUpdate(final CheckUpdateCallback callBack) {
        if (this.lastPackageInfo != null) {
            RequestParams params = new RequestParams();
            params.put("appId", lastPackageInfo.appIdAndroid);
            params.put("appType", "1");
            params.put("versionName", lastPackageInfo.versionNameAndroid);
            params.put("versionCode", lastPackageInfo.versionCodeAndroid + "");
            CommonOkHttpClient.get(CommonRequest.createGetRequest(server_url, params),
                    new DisposeDataHandle(new DisposeDataListener() {
                        @Override
                        public void onSuccess(Object responseObj) {
                            //检查
                            UpdateResult result = null;
                            try {
                                result = JSON.parseObject((String) responseObj, UpdateResult.class);
                            } catch (JSONException e) {
                                callBack.callback(1, e.getMessage(), null);
                                return;
                            }
                            if (result == null || result.code != 1) {
                                callBack.callback(1, "网络请求失败", null);
                                return;
                            }
                            if (result.code == 1 && result.content.upgrade && !result.content.totalUpgrade) {
                                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
                                Date curDate = new Date(System.currentTimeMillis());//获取当前时间
                                String time = formatter.format(curDate);
                                final WXPackageInfo _updateInfo = new WXPackageInfo();
                                _updateInfo.versionDes = result.content.upgradeMsg;
                                _updateInfo.versionNameAndroid = result.content.versionName;
                                _updateInfo.versionCodeAndroid = result.content.versionCode;
                                _updateInfo.time = time;
                                _updateInfo.path = lastPackageInfo.appName + _updateInfo.versionNameAndroid + _updateInfo.time;
                                _updateInfo.path = _updateInfo.path.replace(".", "");
                                //更新
                                final String updateFile = WX_DATA_PATH + _updateInfo.path + ".zip";
//                            UWLog.d(TAG, "updateInfo=" + JSON.toJSONString(result.content.packageInfo));
                                UWLog.d(TAG, "updateFile=" + updateFile);
                                UWLog.d(TAG, "updateUrl =" + result.content.downloadUrl);

                                CommonOkHttpClient.downloadFile(CommonRequest.createGetRequest(result.content.downloadUrl, null), new DisposeDataHandle(new DisposeDataListener() {
                                    @Override
                                    public void onSuccess(Object responseObj) {
                                        //解压
                                        boolean b = unzipSdcardZip(updateFile, _updateInfo.path);
                                        if (b) {
                                            saveWXInfo(_updateInfo);
                                            if (callBack != null) {
                                                callBack.callback(0, "更新成功", _updateInfo);
                                            }
//                                            clearFile(_updateInfo.path);
                                        }else {
                                            if (callBack != null) {
                                                callBack.callback(0, "更新失败", _updateInfo);
                                            }
                                        }
                                    }

                                    @Override
                                    public void onFailure(Object reasonObj) {
                                        callBack.callback(1, "网络请求失败", null);
                                        UWLog.d(TAG, "onFailure: 下载文件,网络请求失败");
                                    }
                                }, updateFile));
                            } else {
                                callBack.callback(1, "不需要升级", null);
                            }
                        }

                        @Override
                        public void onFailure(Object reasonObj) {
                            callBack.callback(1, "网络请求失败", null);
                            UWLog.d(TAG, "onFailure: post请求,网络请求失败");
                        }
                    }, UpdateResult.class));
        }
    }

    public interface CheckUpdateCallback {
        void callback(int code, String msg, WXPackageInfo info);
    }
}


text:
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	errorHandler = require('./errors.server.controller'),
	Skill = mongoose.model('Skill'),
	_ = require('lodash');

/**
 * Create a Skill
 */
exports.create = function(req, res) {
	var skill = new Skill(req.body);
	skill.user = req.user;

	skill.save(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(skill);
		}
	});
};

/**
 * Show the current Skill
 */
exports.read = function(req, res) {
	res.jsonp([req.skill]);
};

/**
 * Update a Skill
 */
exports.update = function(req, res) {
	var skill = req.skill ;

	skill = _.extend(skill , req.body);

	skill.save(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(skill);
		}
	});
};

/**
 * Delete an Skill
 */
exports.delete = function(req, res) {
	var skill = req.skill ;

	skill.remove(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(skill);
		}
	});
};

/**
 * List of Skills
 */
exports.list = function(req, res) {
	var query = Skill.find();

	if (req.query.jobIds) {
		query = query.in('job', _.filter(req.query.jobIds.split(';')));
	}

	query.sort('-_id')
		.populate('job', 'name')
		.populate('required_skills.skill', 'name')
		.exec(function(err, skills) {
			if (err) {
				return res.status(400).send({
					message: errorHandler.getErrorMessage(err)
				});
			} else {
				res.jsonp(skills);
			}
		});
};

/**
 * Skill middleware
 */
exports.skillByID = function(req, res, next, id) {
	Skill.findById(id)
		.populate('job', 'name')
		.populate('required_skills.skill', 'name').exec(function(err, skill) {
			if (err) return next(err);
			if (! skill) return next(new Error('Failed to load Skill ' + id));
			req.skill = skill ;
			next();
		});
};

/**
 * Skill authorization middleware
 */
exports.hasAuthorization = function(req, res, next) {
	if (_.indexOf(req.user.roles, 'admin') === -1) {
		return res.status(403).send('User is not authorized');
	}
	next();
};


text:
const axon = require('axon');

const handler = require('./lib/handler');

const port = Number(process.env.NEDB_MULTI_PORT) || Number(process.argv[2]);
const dbsMap = new Map();
const repSocket = axon.socket('rep');
const messagesHandler = handler.create(dbsMap);

repSocket.bind(port);
repSocket.on('message', messagesHandler);


text:
/*Import Test File*/
.linkmediatty { color: red; background: yellow none; }
.folderlinkmediatty { color: red; background: yellow none; }


text:
using NUnit.Framework;

namespace OSTData.tst {

    [TestFixture]
    public class StationStandingTest {

        [SetUp]
        public void Init() {
        }

        [Test, Description("Basic standing test")]
        public void StandingTest1() {
            Universe universe = new Universe(0);
            Station s = universe.GetStation(1);
            Corporation corp = universe.CreateCorp(1);
            Ship ship = s.CreateShip(corp);
            ShipDestination dest = ship.AddDestination(s);
            dest.AddLoad(ResourceElement.ResourceType.Wastes, 1000);
            ship.Start();

            Hangar corpHangar = s.CreateHangar(corp);

            ResourceElement elem = new ResourceElement(ResourceElement.ResourceType.Wastes, s, 2000, 1);
            ResourceStack stack = new ResourceStack(elem);
            corpHangar.Add(stack);

            Assert.IsTrue(s.Type == Station.StationType.City);
            Assert.IsTrue(System.Math.Abs(s.GetStanding(ResourceElement.ResourceType.Water, 1) - Station.defaultStanding) < 0.0001);
            Assert.IsTrue(System.Math.Abs(s.GetStanding(ResourceElement.ResourceType.Wastes, 1) - Station.defaultStanding) < 0.0001);

            //simuler une augmentation de standing
            for (int i = 0; i < 10; i++) {
                universe.Update();
            }

            //apres 2 jours de chargement...
            // day1 : 0.0 + (1 * 0.05) = 0.05
            // day2 : 0.05 + ((1-0.05) * 0.05) = 0.0975
            Assert.IsTrue(System.Math.Abs(s.GetStanding(ResourceElement.ResourceType.Wastes, 1) - 0.0975) < 0.0001);
        }
    }
}


text:
using namespace std;
using namespace Eigen;

Layer::Layer(int nNeurons, int nInput)
{
    //Store nNeurons and nInput
    _nNeurons = nNeurons;
    _nInput = nInput;
    //Allocate attributes
    _biases = VectorXd(_nNeurons);
    _weights = MatrixXd(_nNeurons, _nInput);
    _weightedInput = VectorXd(_nNeurons);
    _activation = VectorXd(_nNeurons);
    _delta = VectorXd(_nNeurons);
    _nabla_b = VectorXd(_nNeurons);
    _nabla_w = MatrixXd(_nNeurons, _nInput);
    //Activation function allocation
    _activationFunction = new Sigmoid;

    //Initialize weights and biases using random normal distribution
    InitWeightsBiases();

}

Layer::~Layer()
{
    delete _activationFunction;
}

void Layer::InitWeightsBiases()
{
    //Initialize random number generator
    default_random_engine generator;
    normal_distribution<double> distribution(0.0,1.0);
    //Fill in  biases and set _nabla_b to 0
    for (int i = 0; i < _nNeurons; ++i) {
        _biases(i) = distribution(generator);
        _nabla_b(i) = 0;
    }
    //Fill in weights and set _nabla_w to 0
    for (int i = 0; i < _nNeurons; ++i) {
        for (int j = 0; j < _nInput; ++j) {
            _weights(i, j) = distribution(generator);
            _nabla_w(i, j) = 0;
        }
    }
}

void Layer::FeedForward(VectorXd const& input)
{
    //Compute weighted inputs for this layer
    _weightedInput = _weights * input + _biases;
    //Compute activation for this layer
    for (int i = 0; i < _nNeurons; ++i) {
        _activation(i) = _activationFunction->fnt(_weightedInput(i));
    }

}

void Layer::FeedBackward(VectorXd delta)
{
    //Using equation (BP1), compute _delta^L: partial derivatives of cost
    //function with respect to weighted input
    //(only used for output layer)
    for (int i = 0; i < _weightedInput.size(); ++i) {
        _delta(i) = _activationFunction->prime(_weightedInput(i)) * delta(i);
    }
}

void Layer::FeedBackward(MatrixXd w, VectorXd delta)
{
    //Using equation (BP2), compute _delta^l: partial derivatives of cost
    //function with respect to weighted input
    //(used for all layers except output layer)
    VectorXd temp = w.transpose() * delta;
    for (int i = 0; i < _weightedInput.size(); ++i) {
        _delta(i) = _activationFunction->prime(_weightedInput(i)) * temp(i);
    }
}

void Layer::ComputeNabla(VectorXd activations)
{
    //Add _delta to _nabla_b
    _nabla_b += _delta;

    //Add nabla_w to _nabla_w
    _nabla_w += _delta * activations.transpose();
}

void Layer::CleanNabla()
{
    //Set _nabla_b to 0
    _nabla_b -= _nabla_b;

    //Set _nabla_w to 0
    _nabla_w -= _nabla_w;
}

void Layer::UpdateWeightsBiases(double eta, int miniBatchSize)
{
    //Update weights and biases in current layer using mean of _nablas
    //as an approximation of real _nabla value
    _weights -= (eta/miniBatchSize) * _nabla_w;
    _biases -= (eta/miniBatchSize) * _nabla_b;
}

//Accessors
VectorXd Layer::GetActivation()
{
    return _activation;
}

MatrixXd Layer::GetWeights()
{
    return _weights;
}

VectorXd Layer::GetDelta()
{
    return _delta;
}


text:
'use strict';

define(['projectWeb'], function () {

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

	dwrServiceModule.factory('dwrService', ['$rootScope',
	                                      	        function($rootScope) {
		return {
			fire: function() {
				console.log('dwr')
			}//fire end
		};//return end
	}]);//.define function end
});


text:
#include <string>

template <typename EventType>
class IEventListener
{
public:
	IEventListener() {};
	virtual ~IEventListener() {};

	virtual void EventHandler( EventType * event ) = 0;
};


text:
module IyziPay
  module Model
    class InstallmentDetails
      def self.to_pki_string(request)
        unless request.nil?
          installment_details = Array.new
          request.each do |item|
            item_pki = PkiBuilder.new.
                append(:bankId, item[:bankId]).
                append_array(:installmentPrices, InstallmentPrices.to_pki_string(item[:installmentPrices])).
                get_request_string
            installment_details << item_pki
          end
          installment_details
        end
      end
    end
  end
end


text:
@interface BBConfig : NSObject

#define BB_API_VERSION                  @"v2"

#define BB_STORE_KEY_API_KEY            @"BB_STORE_KEY_API_KEY"
#define BB_STORE_KEY_API_BASE_URL       @"BB_STORE_KEY_API_BASE_URL"
#define BB_STORE_KEY_CUSTOM_COLOR       @"BB_STORE_KEY_CUSTOM_COLOR"
#define BB_STORE_KEY_REGULAR_FONT       @"BB_STORE_KEY_REGULAR_FONT"
#define BB_STORE_KEY_LIGHT_FONT         @"BB_STORE_KEY_LIGHT_FONT"

#define BB_POPUP_DONT_SHOW              @"BB_POPUP_DONT_SHOW_2"

typedef NS_ENUM(NSUInteger, BBSSLPinningMode) {
    BBSSLPinningModeNone,
    BBSSLPinningModePublicKey
};

// IMPORTANT: ´apiKey´, ´apiBaseURL´& ´currentPlaceId´ has to be configured
@property (nonatomic, copy) NSString *apiKey;
@property (nonatomic, copy) NSString *apiBaseURL;
@property (nonatomic, copy) NSString *currentPlaceId;

// Default color is [UIColor darkGrayColor];
@property (nonatomic, strong) UIColor  *customColor;

// Default fonts are both [UIFont systemFontOfSize:16.f];
@property (nonatomic, strong) UIFont  *regularFont;
@property (nonatomic, strong) UIFont  *lightFont;

// Default SSL Pinning Mode is BBSSLPinningModeNone
@property (nonatomic, assign) BBSSLPinningMode SSLPinningMode;

+ (instancetype)sharedConfig;
+ (NSBundle *)libBundle;

-(UIFont *)regularFontWithSize:(CGFloat)size;
-(UIFont *)lightFontWithSize:(CGFloat)size;

- (void) setupWithPlaceIdentifier:(NSString *)identifier withCompletion:(void (^)(NSString *placeIdentifier, NSError *error))completionBlock;

- (NSString *) APIURL;

@end


text:
package de.mhus.lib.core.directory.fs;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;

import de.mhus.lib.core.IProperties;
import de.mhus.lib.core.directory.ResourceNode;
import de.mhus.lib.core.util.EmptyList;
import de.mhus.lib.errors.MException;

public class FileResource extends ResourceNode<FileResource> {

    private static final long serialVersionUID = 1L;

    public enum KEYS {
        NAME,
        LENGTH,
        MODIFIED,
        TYPE,
        HIDDEN
    };

    public enum TYPE {
        FILE,
        DIRECTORY,
        UNKNOWN
    }

    public static final long UNKNOWN_LENGTH = -1;

    private FileResourceRoot root;
    private File file;
    private FileResource parent;
    private HashMap<String, FileResource> cache = new HashMap<>();

    public FileResource(FileResourceRoot root, FileResource parent, File file) {
        if (root == null) root = (FileResourceRoot) this;
        this.root = root;
        this.file = file;
        this.parent = parent;
    }

    @Override
    public Collection<String> getPropertyKeys() {

        KEYS[] v = KEYS.values();
        LinkedList<String> out = new LinkedList<>();
        for (int i = 0; i < v.length; i++) out.add(v[i].name().toLowerCase());

        return out;
    }

    @Override
    public FileResource getNode(String key) {
        if (key == null) return null;
        if (key.equals("..") || key.equals(".")) return null;
        if (key.indexOf('/') > -1 || key.indexOf('\\') > -1) return null; // only direct children
        // TODO special chars ?!!

        FileResource cached = cache.get(key);
        if (cached != null) {
            if (cached.isValid()) return cached;
            cache.remove(key);
        }
        File f = new File(file, key);
        if (!f.exists()) return null;
        cached = new FileResource(root, this, f);
        cache.put(key, cached);

        return cached;
    }

    @Override
    public Collection<FileResource> getNodes() {
        LinkedList<FileResource> out = new LinkedList<>();
        for (String sub : file.list()) {
            FileResource n = getNode(sub);
            if (n != null) out.add(n);
        }
        return out;
    }

    @Override
    public Collection<FileResource> getNodes(String key) {
        FileResource n = getNode(key);
        if (n == null) return new EmptyList<>();
        LinkedList<FileResource> out = new LinkedList<>();
        out.add(n);
        return out;
    }

    @Override
    public Collection<String> getNodeKeys() {
        LinkedList<String> out = new LinkedList<>();
        for (String sub : file.list()) {
            FileResource n = getNode(sub);
            if (n != null) out.add(sub);
        }
        return out;
    }

    @Override
    public String getName() throws MException {
        return file.getName();
    }

    @Override
    public InputStream getInputStream(String key) {
        if (file.isDirectory()) return null;
        try {
            return new FileInputStream(file);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public FileResource getParent() {
        return parent;
    }

    @SuppressWarnings("deprecation")
    @Override
    public URL getUrl() {
        try {
            return file.toURL();
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public Object getProperty(String name) {

        if (name.equals("file")) return file;
        if (name.equals("filepath")) return file.getAbsolutePath();

        try {
            KEYS key = KEYS.valueOf(name.toUpperCase());
            switch (key) {
                case NAME:
                    return file.getName();
                case LENGTH:
                    return file.length();
                case MODIFIED:
                    if (file.isFile()) return file.lastModified();
                    else return UNKNOWN_LENGTH;
                case TYPE:
                    if (file.isFile()) return TYPE.FILE;
                    if (file.isDirectory()) return TYPE.DIRECTORY;
                    return TYPE.UNKNOWN;
                case HIDDEN:
                    return file.isHidden();
            }
        } catch (IllegalArgumentException e) {
        }
        return null;
    }

    @Override
    public boolean isProperty(String name) {
        try {
            KEYS key = KEYS.valueOf(name.toUpperCase());
            return key != null;
        } catch (Throwable t) {
        }
        return false;
    }

    @Override
    public void removeProperty(String key) {}

    @Override
    public void setProperty(String key, Object value) {}

    @Override
    public boolean isEditable() {
        return false;
    }

    @Override
    public boolean isValid() {
        return file != null && file.exists();
    }

    @Override
    public boolean hasContent() {
        return file.isFile();
    }

    @Override
    public Collection<String> getRenditions() {
        if (hasContent()) {
            return new EmptyList<>();
        }
        return null;
    }

    @Override
    public void clear() {}

    @Override
    public IProperties getRenditionProperties(String rendition) {
        return null;
    }
}


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

<TITLE>
Uses of Class org.apache.poi.ss.util.CellRangeAddress (POI API Documentation)
</TITLE>

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

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.apache.poi.ss.util.CellRangeAddress

Packages that use CellRangeAddress

org.apache.poi.hssf.converter

org.apache.poi.hssf.model
Provides low level API structures for reading, writing, modifying XLS files.

org.apache.poi.hssf.record
Record package contains class representations for XLS binary strutures.

org.apache.poi.hssf.record.aggregates
record aggregates are not real "records" but collections of records that act as a single record.

org.apache.poi.hssf.record.cf

org.apache.poi.hssf.record.common

org.apache.poi.hssf.usermodel
usermodel package maps HSSF low level strutures to familiar workbook/sheet model

org.apache.poi.hssf.util
util package contains tools needed for writing HSSF files that are not necesarily "real"
HSSF concepts.

org.apache.poi.ss.usermodel

org.apache.poi.ss.usermodel.charts

org.apache.poi.ss.util

org.apache.poi.ss.util.cellwalk

org.apache.poi.xssf.streaming

org.apache.poi.xssf.usermodel

org.apache.poi.xssf.usermodel.helpers

Uses of CellRangeAddress in org.apache.poi.hssf.converter

Methods in org.apache.poi.hssf.converter that return CellRangeAddress

static CellRangeAddress[][]
ExcelToHtmlUtils.buildMergedRangesMap(HSSFSheet sheet)

          Creates a map (i.e.

static CellRangeAddress
AbstractExcelUtils.getMergedRange(CellRangeAddress[][] mergedRanges,
               int rowNumber,
               int columnNumber)

Methods in org.apache.poi.hssf.converter with parameters of type CellRangeAddress

static CellRangeAddress
AbstractExcelUtils.getMergedRange(CellRangeAddress[][] mergedRanges,
               int rowNumber,
               int columnNumber)

protected  int
ExcelToHtmlConverter.processRow(CellRangeAddress[][] mergedRanges,
           HSSFRow row,
           org.w3c.dom.Element tableRowElement)

protected  int
ExcelToFoConverter.processRow(HSSFWorkbook workbook,
           CellRangeAddress[][] mergedRanges,
           HSSFRow row,
           org.w3c.dom.Element tableRowElement)

Uses of CellRangeAddress in org.apache.poi.hssf.model

Methods in org.apache.poi.hssf.model that return CellRangeAddress

 CellRangeAddress
InternalSheet.getMergedRegionAt(int index)

Uses of CellRangeAddress in org.apache.poi.hssf.record

Methods in org.apache.poi.hssf.record that return CellRangeAddress

 CellRangeAddress
MergeCellsRecord.getAreaAt(int index)

 CellRangeAddress
CFRule12Record.getAssociatedRange()

 CellRangeAddress
CFHeader12Record.getAssociatedRange()

 CellRangeAddress[]
CFHeaderBase.getCellRanges()

 CellRangeAddress[]
FeatRecord.getCellRefs()

 CellRangeAddress
CFHeaderBase.getEnclosingCellRange()

Methods in org.apache.poi.hssf.record with parameters of type CellRangeAddress

 void
CFHeaderBase.setCellRanges(CellRangeAddress[] cellRanges)

          Set cell ranges list to a single cell range and
 modify the enclosing cell range accordingly.

 void
FeatRecord.setCellRefs(CellRangeAddress[] cellRefs)

 void
CFHeaderBase.setEnclosingCellRange(CellRangeAddress cr)

Constructors in org.apache.poi.hssf.record with parameters of type CellRangeAddress

CFHeader12Record(CellRangeAddress[] regions,
                 int nRules)

CFHeaderBase(CellRangeAddress[] regions,
             int nRules)

CFHeaderRecord(CellRangeAddress[] regions,
               int nRules)

MergeCellsRecord(CellRangeAddress[] regions,
                 int startIndex,
                 int numberOfRegions)

Uses of CellRangeAddress in org.apache.poi.hssf.record.aggregates

Methods in org.apache.poi.hssf.record.aggregates that return CellRangeAddress

 CellRangeAddress
MergedCellsTable.get(int index)

 CellRangeAddress
FormulaRecordAggregate.getArrayFormulaRange()

 CellRangeAddress
FormulaRecordAggregate.removeArrayFormula(int rowIndex,
                   int columnIndex)

          Removes an array formula

Methods in org.apache.poi.hssf.record.aggregates with parameters of type CellRangeAddress

 void
FormulaRecordAggregate.setArrayFormula(CellRangeAddress r,
                Ptg[] ptgs)

Constructors in org.apache.poi.hssf.record.aggregates with parameters of type CellRangeAddress

CFRecordsAggregate(CellRangeAddress[] regions,
                   CFRuleBase[] rules)

Uses of CellRangeAddress in org.apache.poi.hssf.record.cf

Methods in org.apache.poi.hssf.record.cf that return CellRangeAddress

static CellRangeAddress
CellRangeUtil.createEnclosingCellRange(CellRangeAddress crA,
                         CellRangeAddress crB)

          Create an enclosing CellRange for the two cell ranges.

static CellRangeAddress[]
CellRangeUtil.mergeCellRanges(CellRangeAddress[] cellRanges)

          Do all possible cell merges between cells of the list so that:

        if a cell range is completely inside of another cell range, it gets removed from the list
        if two cells have a shared border, merge them into one bigger cell range

Methods in org.apache.poi.hssf.record.cf with parameters of type CellRangeAddress

static boolean
CellRangeUtil.contains(CellRangeAddress crA,
         CellRangeAddress crB)

          Check if the specified range is located inside of this cell range.

static CellRangeAddress
CellRangeUtil.createEnclosingCellRange(CellRangeAddress crA,
                         CellRangeAddress crB)

          Create an enclosing CellRange for the two cell ranges.

static boolean
CellRangeUtil.hasExactSharedBorder(CellRangeAddress crA,
                     CellRangeAddress crB)

          Check if the two cell ranges have a shared border.

static int
CellRangeUtil.intersect(CellRangeAddress crA,
          CellRangeAddress crB)

          Intersect this range with the specified range.

static CellRangeAddress[]
CellRangeUtil.mergeCellRanges(CellRangeAddress[] cellRanges)

          Do all possible cell merges between cells of the list so that:

        if a cell range is completely inside of another cell range, it gets removed from the list
        if two cells have a shared border, merge them into one bigger cell range

Uses of CellRangeAddress in org.apache.poi.hssf.record.common

Methods in org.apache.poi.hssf.record.common that return CellRangeAddress

 CellRangeAddress
FutureRecord.getAssociatedRange()

 CellRangeAddress
FtrHeader.getAssociatedRange()

Methods in org.apache.poi.hssf.record.common with parameters of type CellRangeAddress

 void
FtrHeader.setAssociatedRange(CellRangeAddress associatedRange)

Uses of CellRangeAddress in org.apache.poi.hssf.usermodel

Methods in org.apache.poi.hssf.usermodel that return CellRangeAddress

 CellRangeAddress
HSSFCell.getArrayFormulaRange()

 CellRangeAddress[]
HSSFConditionalFormatting.getFormattingRanges()

 CellRangeAddress
HSSFSheet.getMergedRegion(int index)

 CellRangeAddress
HSSFSheet.getRepeatingColumns()

 CellRangeAddress
HSSFSheet.getRepeatingRows()

Methods in org.apache.poi.hssf.usermodel that return types with arguments of type CellRangeAddress

 java.util.List<CellRangeAddress>
HSSFSheet.getMergedRegions()

Methods in org.apache.poi.hssf.usermodel with parameters of type CellRangeAddress

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule1)

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule[] cfRules)

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule1,
                         ConditionalFormattingRule rule2)

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         HSSFConditionalFormattingRule rule1)

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         HSSFConditionalFormattingRule[] cfRules)

          Allows to add a new Conditional Formatting set to the sheet.

 int
HSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         HSSFConditionalFormattingRule rule1,
                         HSSFConditionalFormattingRule rule2)

 int
HSSFSheet.addMergedRegion(CellRangeAddress region)

          adds a merged region of cells (hence those cells form one)

 CellRange<HSSFCell>
HSSFSheet.setArrayFormula(java.lang.String formula,
                CellRangeAddress range)

 HSSFAutoFilter
HSSFSheet.setAutoFilter(CellRangeAddress range)

 void
HSSFSheet.setRepeatingColumns(CellRangeAddress columnRangeRef)

 void
HSSFSheet.setRepeatingRows(CellRangeAddress rowRangeRef)

Uses of CellRangeAddress in org.apache.poi.hssf.util

Subclasses of CellRangeAddress in org.apache.poi.hssf.util

 class
CellRangeAddress

          Deprecated. use CellRangeAddress

Methods in org.apache.poi.hssf.util with parameters of type CellRangeAddress

static void
HSSFRegionUtil.setBorderBottom(int border,
                CellRangeAddress region,
                HSSFSheet sheet,
                HSSFWorkbook workbook)

          Sets the borderBottom attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setBorderLeft(int border,
              CellRangeAddress region,
              HSSFSheet sheet,
              HSSFWorkbook workbook)

          Sets the left border for a region of cells by manipulating the cell style
 of the individual cells on the left

static void
HSSFRegionUtil.setBorderRight(int border,
               CellRangeAddress region,
               HSSFSheet sheet,
               HSSFWorkbook workbook)

          Sets the borderRight attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setBorderTop(int border,
             CellRangeAddress region,
             HSSFSheet sheet,
             HSSFWorkbook workbook)

          Sets the borderBottom attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setBottomBorderColor(int color,
                     CellRangeAddress region,
                     HSSFSheet sheet,
                     HSSFWorkbook workbook)

          Sets the bottomBorderColor attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setLeftBorderColor(int color,
                   CellRangeAddress region,
                   HSSFSheet sheet,
                   HSSFWorkbook workbook)

          Sets the leftBorderColor attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setRightBorderColor(int color,
                    CellRangeAddress region,
                    HSSFSheet sheet,
                    HSSFWorkbook workbook)

          Sets the rightBorderColor attribute of the HSSFRegionUtil object

static void
HSSFRegionUtil.setTopBorderColor(int color,
                  CellRangeAddress region,
                  HSSFSheet sheet,
                  HSSFWorkbook workbook)

          Sets the topBorderColor attribute of the HSSFRegionUtil object

Uses of CellRangeAddress in org.apache.poi.ss.usermodel

Methods in org.apache.poi.ss.usermodel that return CellRangeAddress

 CellRangeAddress
Cell.getArrayFormulaRange()

          Only valid for array formula cells

 CellRangeAddress[]
ConditionalFormatting.getFormattingRanges()

 CellRangeAddress
Sheet.getMergedRegion(int index)

          Returns the merged region at the specified index

 CellRangeAddress
Sheet.getRepeatingColumns()

          Gets the repeating columns used when printing the sheet, as found in
 File->PageSetup->Sheet.

 CellRangeAddress
Sheet.getRepeatingRows()

          Gets the repeating rows used when printing the sheet, as found in
 File->PageSetup->Sheet.

Methods in org.apache.poi.ss.usermodel that return types with arguments of type CellRangeAddress

 java.util.List<CellRangeAddress>
Sheet.getMergedRegions()

          Returns the list of merged regions.

Methods in org.apache.poi.ss.usermodel with parameters of type CellRangeAddress

 int
SheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule)

          Add a new Conditional Formatting to the sheet.

 int
SheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule[] cfRules)

          Add a new Conditional Formatting set to the sheet.

 int
SheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule1,
                         ConditionalFormattingRule rule2)

          Add a new Conditional Formatting consisting of two rules.

 int
Sheet.addMergedRegion(CellRangeAddress region)

          Adds a merged region of cells (hence those cells form one)

 CellRange<? extends Cell>
Sheet.setArrayFormula(java.lang.String formula,
                CellRangeAddress range)

          Sets array formula to specified region for result.

 AutoFilter
Sheet.setAutoFilter(CellRangeAddress range)

          Enable filtering for a range of cells

 void
Sheet.setRepeatingColumns(CellRangeAddress columnRangeRef)

          Sets the repeating columns used when printing the sheet, as found in
 File->PageSetup->Sheet.

 void
Sheet.setRepeatingRows(CellRangeAddress rowRangeRef)

          Sets the repeating rows used when printing the sheet, as found in
 File->PageSetup->Sheet.

Uses of CellRangeAddress in org.apache.poi.ss.usermodel.charts

Methods in org.apache.poi.ss.usermodel.charts with parameters of type CellRangeAddress

static ChartDataSource<java.lang.Number>
DataSources.fromNumericCellRange(Sheet sheet,
                     CellRangeAddress cellRangeAddress)

static ChartDataSource<java.lang.String>
DataSources.fromStringCellRange(Sheet sheet,
                    CellRangeAddress cellRangeAddress)

Uses of CellRangeAddress in org.apache.poi.ss.util

Fields in org.apache.poi.ss.util with type parameters of type CellRangeAddress

protected  java.util.List<CellRangeAddress>
CellRangeAddressList._list

          List of <tt>CellRangeAddress</tt>es.

Methods in org.apache.poi.ss.util that return CellRangeAddress

static CellRangeAddress[]
Region.convertRegionsToCellRanges(Region[] regions)

          Deprecated.

static CellRangeAddress
Region.convertToCellRangeAddress(Region r)

          Deprecated.

 CellRangeAddress
CellRangeAddress.copy()

 CellRangeAddress
CellRangeAddressList.getCellRangeAddress(int index)

 CellRangeAddress[]
CellRangeAddressList.getCellRangeAddresses()

 CellRangeAddress
CellRangeAddressList.remove(int rangeIndex)

static CellRangeAddress
CellRangeAddress.valueOf(java.lang.String ref)

          Creates a CellRangeAddress from a cell range reference string.

Methods in org.apache.poi.ss.util with parameters of type CellRangeAddress

 void
CellRangeAddressList.addCellRangeAddress(CellRangeAddress cra)

static boolean
SheetUtil.containsCell(CellRangeAddress cr,
             int rowIx,
             int colIx)

          Check if the cell is in the specified cell range

static Region[]
Region.convertCellRangesToRegions(CellRangeAddress[] cellRanges)

          Deprecated. Convert a List of CellRange objects to an array of regions

static void
RegionUtil.setBorderBottom(int border,
                CellRangeAddress region,
                Sheet sheet,
                Workbook workbook)

          Sets the borderBottom attribute of the RegionUtil object

static void
RegionUtil.setBorderLeft(int border,
              CellRangeAddress region,
              Sheet sheet,
              Workbook workbook)

          Sets the left border for a region of cells by manipulating the cell style of the individual
 cells on the left

static void
RegionUtil.setBorderRight(int border,
               CellRangeAddress region,
               Sheet sheet,
               Workbook workbook)

          Sets the borderRight attribute of the RegionUtil object

static void
RegionUtil.setBorderTop(int border,
             CellRangeAddress region,
             Sheet sheet,
             Workbook workbook)

          Sets the borderBottom attribute of the RegionUtil object

static void
RegionUtil.setBottomBorderColor(int color,
                     CellRangeAddress region,
                     Sheet sheet,
                     Workbook workbook)

          Sets the bottomBorderColor attribute of the RegionUtil object

static void
RegionUtil.setLeftBorderColor(int color,
                   CellRangeAddress region,
                   Sheet sheet,
                   Workbook workbook)

          Sets the leftBorderColor attribute of the RegionUtil object

static void
RegionUtil.setRightBorderColor(int color,
                    CellRangeAddress region,
                    Sheet sheet,
                    Workbook workbook)

          Sets the rightBorderColor attribute of the RegionUtil object

static void
RegionUtil.setTopBorderColor(int color,
                  CellRangeAddress region,
                  Sheet sheet,
                  Workbook workbook)

          Sets the topBorderColor attribute of the RegionUtil object

Uses of CellRangeAddress in org.apache.poi.ss.util.cellwalk

Constructors in org.apache.poi.ss.util.cellwalk with parameters of type CellRangeAddress

CellWalk(Sheet sheet,
         CellRangeAddress range)

Uses of CellRangeAddress in org.apache.poi.xssf.streaming

Methods in org.apache.poi.xssf.streaming that return CellRangeAddress

 CellRangeAddress
SXSSFCell.getArrayFormulaRange()

          Only valid for array formula cells

 CellRangeAddress
SXSSFSheet.getMergedRegion(int index)

          Returns the merged region at the specified index.

 CellRangeAddress
SXSSFSheet.getRepeatingColumns()

 CellRangeAddress
SXSSFSheet.getRepeatingRows()

Methods in org.apache.poi.xssf.streaming that return types with arguments of type CellRangeAddress

 java.util.List<CellRangeAddress>
SXSSFSheet.getMergedRegions()

          Returns the list of merged regions.

Methods in org.apache.poi.xssf.streaming with parameters of type CellRangeAddress

 int
SXSSFSheet.addMergedRegion(CellRangeAddress region)

          Adds a merged region of cells (hence those cells form one)

 CellRange<? extends Cell>
SXSSFSheet.setArrayFormula(java.lang.String formula,
                CellRangeAddress range)

          Sets array formula to specified region for result.

 AutoFilter
SXSSFSheet.setAutoFilter(CellRangeAddress range)

          Enable filtering for a range of cells

 void
SXSSFSheet.setRepeatingColumns(CellRangeAddress columnRangeRef)

 void
SXSSFSheet.setRepeatingRows(CellRangeAddress rowRangeRef)

Uses of CellRangeAddress in org.apache.poi.xssf.usermodel

Methods in org.apache.poi.xssf.usermodel that return CellRangeAddress

 CellRangeAddress
XSSFCell.getArrayFormulaRange()

 CellRangeAddress[]
XSSFConditionalFormatting.getFormattingRanges()

 CellRangeAddress
XSSFSheet.getMergedRegion(int index)

          Returns the merged region at the specified index.

 CellRangeAddress
XSSFSheet.getRepeatingColumns()

 CellRangeAddress
XSSFSheet.getRepeatingRows()

Methods in org.apache.poi.xssf.usermodel that return types with arguments of type CellRangeAddress

 java.util.Map<IgnoredErrorType,java.util.Set<CellRangeAddress>>
XSSFSheet.getIgnoredErrors()

          Returns the errors currently being ignored and the ranges
 where they are ignored.

 java.util.List<CellRangeAddress>
XSSFSheet.getMergedRegions()

          Returns the list of merged regions.

Methods in org.apache.poi.xssf.usermodel with parameters of type CellRangeAddress

 int
XSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule1)

 int
XSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule[] cfRules)

 int
XSSFSheetConditionalFormatting.addConditionalFormatting(CellRangeAddress[] regions,
                         ConditionalFormattingRule rule1,
                         ConditionalFormattingRule rule2)

 void
XSSFSheet.addIgnoredErrors(CellRangeAddress region,
                 IgnoredErrorType... ignoredErrorTypes)

          Ignore errors across a range of cells.

 int
XSSFSheet.addMergedRegion(CellRangeAddress region)

          Adds a merged region of cells on a sheet.

 int
XSSFSheet.addMergedRegionUnsafe(CellRangeAddress region)

          Adds a merged region of cells (hence those cells form one).

 CellRange<XSSFCell>
XSSFSheet.setArrayFormula(java.lang.String formula,
                CellRangeAddress range)

 XSSFAutoFilter
XSSFSheet.setAutoFilter(CellRangeAddress range)

 void
XSSFSheet.setRepeatingColumns(CellRangeAddress columnRangeRef)

 void
XSSFSheet.setRepeatingRows(CellRangeAddress rowRangeRef)

Uses of CellRangeAddress in org.apache.poi.xssf.usermodel.helpers

Methods in org.apache.poi.xssf.usermodel.helpers that return types with arguments of type CellRangeAddress

 java.util.List<CellRangeAddress>
XSSFRowShifter.shiftMerged(int startRow,
            int endRow,
            int n)

          Shift merged regions

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

                Copyright 2016 The Apache Software Foundation or
        its licensors, as applicable.


text:
package logger

import (
	"fmt"
	"os"
)

type Level int8

const (
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel Level = iota - 2
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// InfoLevel is the default logging priority.
	// General operational entries about what's going on inside the application.
	InfoLevel
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	ErrorLevel
	// FatalLevel level. Logs and then calls `logger.Exit(1)`. highest level of severity.
	FatalLevel
)

func (l Level) String() string {
	switch l {
	case TraceLevel:
		return "trace"
	case DebugLevel:
		return "debug"
	case InfoLevel:
		return "info"
	case WarnLevel:
		return "warn"
	case ErrorLevel:
		return "error"
	case FatalLevel:
		return "fatal"
	}
	return ""
}

// Enabled returns true if the given level is at or above this level.
func (l Level) Enabled(lvl Level) bool {
	return lvl >= l
}

// GetLevel converts a level string into a logger Level value.
// returns an error if the input string does not match known values.
func GetLevel(levelStr string) (Level, error) {
	switch levelStr {
	case TraceLevel.String():
		return TraceLevel, nil
	case DebugLevel.String():
		return DebugLevel, nil
	case InfoLevel.String():
		return InfoLevel, nil
	case WarnLevel.String():
		return WarnLevel, nil
	case ErrorLevel.String():
		return ErrorLevel, nil
	case FatalLevel.String():
		return FatalLevel, nil
	}
	return InfoLevel, fmt.Errorf("Unknown Level String: '%s', defaulting to InfoLevel", levelStr)
}

func Info(args ...interface{}) {
	DefaultLogger.Log(InfoLevel, args...)
}

func Infof(template string, args ...interface{}) {
	DefaultLogger.Logf(InfoLevel, template, args...)
}

func Trace(args ...interface{}) {
	DefaultLogger.Log(TraceLevel, args...)
}

func Tracef(template string, args ...interface{}) {
	DefaultLogger.Logf(TraceLevel, template, args...)
}

func Debug(args ...interface{}) {
	DefaultLogger.Log(DebugLevel, args...)
}

func Debugf(template string, args ...interface{}) {
	DefaultLogger.Logf(DebugLevel, template, args...)
}

func Warn(args ...interface{}) {
	DefaultLogger.Log(WarnLevel, args...)
}

func Warnf(template string, args ...interface{}) {
	DefaultLogger.Logf(WarnLevel, template, args...)
}

func Error(args ...interface{}) {
	DefaultLogger.Log(ErrorLevel, args...)
}

func Errorf(template string, args ...interface{}) {
	DefaultLogger.Logf(ErrorLevel, template, args...)
}

func Fatal(args ...interface{}) {
	DefaultLogger.Log(FatalLevel, args...)
	os.Exit(1)
}

func Fatalf(template string, args ...interface{}) {
	DefaultLogger.Logf(FatalLevel, template, args...)
	os.Exit(1)
}

// Returns true if the given level is at or lower the current logger level
func V(lvl Level, log Logger) bool {
	l := DefaultLogger
	if log != nil {
		l = log
	}
	return l.Options().Level <= lvl
}


text:
<?php

use Symfony\Component\Debug\Debug;

// composer autoloading
require_once __DIR__ . '/../vendor/autoload.php';

$app = require_once __DIR__ . '/../src/app.php';

$app['debug'] = true;

Debug::enable();

$app->run();


text:
<PMML version="4.1" xsi:schemaLocation="http://www.dmg.org/PMML-4_1 http://www.dmg.org/v4-1/pmml-4-1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.dmg.org/PMML-4_1">
  <Header copyright="JBoss" description="Clustering Test"/>
  <DataDictionary numberOfFields="3">
    <DataField dataType="string" name="fld0" optype="categorical">
      <Value value="x"/>
      <Value value="y"/>
      <Value value="z"/>
    </DataField>
    <DataField dataType="double" name="fld1" optype="continuous"/>
    <DataField dataType="double" name="fld2" optype="continuous">
      <Value property="missing" value="-1"/>
      <Value property="valid" value="0.3"/>
      <Value property="valid" value="0.4"/>
      <Value property="valid" value="0.5"/>
      <Value property="valid" value="0.6"/>
      <Value property="valid" value="0.7"/>
    </DataField>
  </DataDictionary>
  <ClusteringModel functionName="clustering" modelClass="centerBased" modelName="CenterClustering" numberOfClusters="2">
    <MiningSchema>
      <MiningField name="fld0"/>
      <MiningField name="fld1"/>
      <MiningField name="fld2"/>
    </MiningSchema>
    <LocalTransformations>
      <DerivedField dataType="double" name="fld3" optype="continuous">
        <NormDiscrete field="fld0" value="x"/>
      </DerivedField>
      <DerivedField dataType="double" name="fld4" optype="continuous">
        <NormDiscrete field="fld0" value="y"/>
      </DerivedField>
      <DerivedField dataType="double" name="fld5" optype="continuous">
        <NormDiscrete field="fld0" value="z"/>
      </DerivedField>
    </LocalTransformations>
    <ComparisonMeasure compareFunction="absDiff" kind="distance">
      <squaredEuclidean/>
    </ComparisonMeasure>
    <ClusteringField field="fld1" fieldWeight="0.8" isCenterField="true"/>
    <ClusteringField compareFunction="gaussSim" field="fld2" isCenterField="true" similarityScale="0.99"/>
    <ClusteringField compareFunction="equal" field="fld3" isCenterField="true"/>
    <ClusteringField compareFunction="delta" field="fld4" fieldWeight="0.6"/>
    <ClusteringField compareFunction="table" field="fld5">
      <Comparisons>
        <Matrix diagDefault="-1" kind="symmetric" nbCols="3" nbRows="3" offDiagDefault="99">
          <MatCell col="1" row="1">4.0</MatCell>
          <MatCell col="2" row="1">5.0</MatCell>
          <MatCell col="2" row="2">6.0</MatCell>
        </Matrix>
      </Comparisons>
    </ClusteringField>
    <MissingValueWeights>
      <Array n="5" type="real">1 0.5 1 1 1</Array>
    </MissingValueWeights>
    <Cluster name="Klust1">
      <KohonenMap coord1="3" coord3="7"/>
      <Array n="5" type="real">0.5 0.4 0.1 0.3 1</Array>
    </Cluster>
    <Cluster name="Klust2">
      <Array n="5" type="real">0.7 0.4 0.5 0.1 2</Array>
    </Cluster>
  </ClusteringModel>
</PMML>


text:
namespace Lauener.Core.Universal.Timer
{
    using Lauener.Core.Bus;

    public class TenSecondTick : IBusData
    {
    }
}


text:
'use strict';

/**
 * Module dependencies.
 */
var users = require('../../app/controllers/users.server.controller'),
    emails = require('../../app/controllers/emails.server.controller');

module.exports = function(app) {
    // Email Routes
    app.route('/emails')
        .get(users.hasAuthorization('admin'), emails.index)
        .post(users.hasAuthorization('admin'), emails.create);

    app.route('/emails/:emailId')
        .get(users.hasAuthorization('admin'), emails.read)
        .put(users.hasAuthorization('admin'), emails.update)
        .delete(users.hasAuthorization('admin'), emails.delete);

    // Finish by binding the article middleware
    app.param('emailId', emails.emailByID);
};


text:
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LINE_LINE_BOX_LIST_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LINE_LINE_BOX_LIST_H_

#include "base/dcheck_is_on.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/api/hit_test_action.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

namespace blink {

class CullRect;
class HitTestLocation;
class HitTestResult;
class InlineFlowBox;
class InlineTextBox;
class LayoutUnit;
class LineLayoutBoxModel;
class LineLayoutItem;
struct PhysicalOffset;

template <typename InlineBoxType>
class InlineBoxList {
  DISALLOW_NEW();

 public:
  InlineBoxList() : first_(nullptr), last_(nullptr) {}
  void Trace(Visitor*) const;

#if DCHECK_IS_ON()
  // Owners should check this on destructor. This class does not implement
  // destructor to be part of a union.
  void AssertIsEmpty();
#endif

  InlineBoxType* First() const { return first_; }
  InlineBoxType* Last() const { return last_; }

  void AppendLineBox(InlineBoxType*);

  void DeleteLineBoxes();

  void ExtractLineBox(InlineBoxType*);
  void AttachLineBox(InlineBoxType*);
  void RemoveLineBox(InlineBoxType*);

  class BaseIterator {
    STACK_ALLOCATED();

   public:
    explicit BaseIterator(InlineBoxType* first) : current_(first) {}

    InlineBoxType* operator*() const {
      DCHECK(current_);
      return current_;
    }
    InlineBoxType* operator->() const { return operator*(); }

    bool operator==(const BaseIterator& other) const {
      return current_ == other.current_;
    }
    bool operator!=(const BaseIterator& other) const {
      return !operator==(other);
    }

   protected:
    InlineBoxType* current_;
  };

  class Iterator final : public BaseIterator {
   public:
    using BaseIterator::BaseIterator;
    using BaseIterator::current_;
    void operator++() {
      DCHECK(current_);
      current_ = current_->NextForSameLayoutObject();
    }
  };

  class ReverseIterator final : public BaseIterator {
   public:
    using BaseIterator::BaseIterator;
    using BaseIterator::current_;
    void operator++() {
      DCHECK(current_);
      current_ = current_->PrevForSameLayoutObject();
    }
  };

  Iterator begin() const { return Iterator(first_); }
  Iterator end() const { return Iterator(nullptr); }

  class ReverseRange final {
    STACK_ALLOCATED();

   public:
    explicit ReverseRange(InlineBoxType* last) : last_(last) {}
    ReverseIterator begin() const { return ReverseIterator(last_); }
    ReverseIterator end() const { return ReverseIterator(nullptr); }

   private:
    InlineBoxType* last_;
  };

  ReverseRange InReverseOrder() const { return ReverseRange(last_); }

 protected:
  // For block flows, each box represents the root inline box for a line in the
  // paragraph.
  // For inline flows, each box represents a portion of that inline.
  Member<InlineBoxType> first_;
  Member<InlineBoxType> last_;
};

extern template class CORE_EXTERN_TEMPLATE_EXPORT InlineBoxList<InlineFlowBox>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT InlineBoxList<InlineTextBox>;

class CORE_EXPORT LineBoxList : public InlineBoxList<InlineFlowBox> {
 public:
  static const LineBoxList& Empty();

  void DeleteLineBoxTree();

  void DirtyLineBoxes();
  void DirtyLinesFromChangedChild(LineLayoutItem parent,
                                  LineLayoutItem child,
                                  bool can_dirty_ancestors);

  bool HitTest(LineLayoutBoxModel,
               HitTestResult&,
               const HitTestLocation&,
               const PhysicalOffset& accumulated_offset,
               HitTestAction) const;
  bool AnyLineIntersectsRect(LineLayoutBoxModel,
                             const CullRect&,
                             const PhysicalOffset&) const;
  bool LineIntersectsDirtyRect(LineLayoutBoxModel,
                               InlineFlowBox*,
                               const CullRect&,
                               const PhysicalOffset&) const;

 private:
  bool RangeIntersectsRect(LineLayoutBoxModel,
                           LayoutUnit logical_top,
                           LayoutUnit logical_bottom,
                           const CullRect&,
                           const PhysicalOffset&) const;
};

class CORE_EXPORT InlineTextBoxList : public InlineBoxList<InlineTextBox> {
 public:
  static const InlineTextBoxList& Empty();
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LINE_LINE_BOX_LIST_H_


text:
const express = require('express');

const router = express.Router();

router.get('/', (req, res, next) => {
  res.send('
Hello from Express!
');
});

module.exports = router;


text:
package org.spongepowered.api.data.type;

import org.spongepowered.api.CatalogType;
import org.spongepowered.api.util.Cycleable;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(LogAxes.class)
public interface LogAxis extends CatalogType, Cycleable<LogAxis> {

}