text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="generator" content="1&1 MyWebsite"/>

    <link rel="dns-prefetch" href="//cdn.us.mywebsite-editor.com/"/>
    <link rel="dns-prefetch" href="//mod07.initial-website.com"/>
    <link rel="dns-prefetch" href="https://cms07.initial-website.com/"/>
    <link rel="shortcut icon" href="//cdn.us.mywebsite-editor.com/favicon.ico"/>
        <title>Bild Properties, Inc. - Home</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimal-ui"/>

<meta name="format-detection" content="telephone=no"/>
        <meta name="keywords" content="Solutions, services, expertise, advice"/>
            <meta name="description" content="Bild Properties, Inc., Miami"/>
            <meta name="robots" content="index,follow"/>
        <link href="//cdn.us.mywebsite-editor.com/templates/2026/style.css?1491992898756" rel="stylesheet" type="text/css"/>
    <link href="http://www.bildproperties.com/s/style/theming.css?1482978078" rel="stylesheet" type="text/css"/>
    <link href="//cdn.us.mywebsite-editor.com/app/cdn/min/group/web.css?1491992898756" rel="stylesheet" type="text/css"/>
<link href="//cdn.us.mywebsite-editor.com/app/cdn/min/moduleserver/css/en_US/common,shoppingbasket?1491992898756" rel="stylesheet" type="text/css"/>
    <link href="//cdn.us.mywebsite-editor.com/app/cdn/min/group/mobilenavigation.css?1491992898756" rel="stylesheet" type="text/css"/>
    <link href="https://cms07.initial-website.com/app/logstate2-css.php?site=475482844&t=1499878496" rel="stylesheet" type="text/css"/>

    <link href="//cdn.us.mywebsite-editor.com/templates/2026/print.css?1491992898756" rel="stylesheet" media="print" type="text/css"/>

    <meta property="og:type" content="business.business"/>
    <meta property="og:url" content="http://www.bildproperties.com/"/>
    <meta property="og:title" content="Bild Properties, Inc. - Home"/>
            <meta property="og:description" content="Bild Properties, Inc., Miami"/>
                <meta property="og:image" content="http://www.bildproperties.com/s/misc/logo.png?t=1492615426"/>
        <meta property="business:contact_data:country_name" content="United States"/>

    <meta property="business:contact_data:locality" content="MIAMI"/>
    <meta property="business:contact_data:region" content="FL"/>
    <meta property="business:contact_data:email" content="bildpro@aol.com"/>
    <meta property="business:contact_data:postal_code" content="33176"/>
    <meta property="business:contact_data:phone_number" content=" 305-270-1616"/>
    <meta property="business:contact_data:fax_number" content=" 305-274-7041"/>

<meta property="business:hours:day" content="MONDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="06:00"/><meta property="business:hours:day" content="TUESDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="06:00"/><meta property="business:hours:day" content="WEDNESDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="06:00"/><meta property="business:hours:day" content="THURSDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="06:00"/><meta property="business:hours:day" content="FRIDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="06:00"/><meta property="business:hours:day" content="SATURDAY"/><meta property="business:hours:start" content="09:00"/><meta property="business:hours:end" content="05:30"/>

    Expand/collapse navigation

Home

Contact Us

Career

Home

Contact Us

Career

              PRIVATE RESIDENTIAL EQUITY FINANCING  *
  RESIDENTIAL PROPERTY MANAGEMENT  *
  RESIDENTIAL SALES  *  RENTALS  *

                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="emotion-header-title-svg" viewBox="0 0 940 316" preserveAspectRatio="xMinYMin meet"><text style="font-family:Impact, Charcoal, sans-serif;font-size:24px;font-style:normal;font-weight:normal;fill:#1b6a22;line-height:1.2em;"><tspan x="100%" style="text-anchor: end" dy="0.95em">  PRIVATE RESIDENTIAL EQUITY FINANCING  *</tspan><tspan x="100%" style="text-anchor: end" dy="1.2em">  RESIDENTIAL PROPERTY MANAGEMENT  *</tspan><tspan x="100%" style="text-anchor: end" dy="1.2em">  RESIDENTIAL SALES  *  RENTALS  *</tspan><tspan x="100%" style="text-anchor: end" dy="1.2em"> </tspan><tspan x="100%" style="text-anchor: end" dy="1.2em"> </tspan></text></svg>

Excellence is our dogma.

Our attention to service and quality has made us an industry leader. At our company, the customer always comes first, and we constantly strive to exceed your
expectations.

Serving all Miami-Dade County including but not limited to City of Miami, Coconut Grove, Key Biscayne, Coral Gables, Miami Beach, Pinecrest, Palmetto Bay, Kendall,
Doral, and Miami Lakes.

Bild Properties, Inc. has been involved in the Miami real estate market since 1980 offering services in Sales and
Rentals of residential properties in the Dade County area. We have also offered Property Management services for the last 37 years, specializing in selling and
renting properties for private owners. Counting with our highly specialized agents, Bild Properties, Inc. has been a true real estate specialist in Miami-Dade County for almost half a century.

High-profiled Engineer, Licensed Real Estate Broker and Licensed Mortgage Broker,

Mr. Bild standards will provide a pristine experience to your business.

Contact Us Today!

Bild Properties, Inc.

11636 N Kendall Dr

MIAMI, FL 33176

Fax: 305-274-7041

Phone:  305-270-1616 305-270-1616

E-mail: bildpro@aol.com

                    Print                 |
                Sitemap

 © Bild Properties, Inc. - 1&1 MyWebsite

                    Login

Web ViewMobile View

            Logout |
            Edit page


text:
package net.sansa_stack.inference.spark.forwardchaining.triples

import net.sansa_stack.inference.spark.data.model.RDFGraph
import net.sansa_stack.inference.spark.data.model.TripleUtils._
import net.sansa_stack.inference.utils.Profiler
import org.apache.jena.graph.{Node, Triple}
import org.apache.spark.rdd.RDD

import scala.collection.mutable

/**
  * A forward chaining based reasoner.
  *
  * @author Lorenz Buehmann
  */
trait ForwardRuleReasoner extends Profiler {

  /**
    * Applies forward chaining to the given RDD of RDF triples and returns a new
    * RDD of RDF triples that contains all additional triples based on the underlying
    * set of rules.
    *
    * @param triples the RDF triples
    * @return the materialized set of RDF triples
    */
  def apply(triples: RDD[Triple]) : RDD[Triple] = apply(RDFGraph(triples)).triples

  /**
    * Applies forward chaining to the given RDF graph and returns a new RDF graph that contains all additional
    * triples based on the underlying set of rules.
    *
    * @param graph the RDF graph
    * @return the materialized RDF graph
    */
  def apply(graph: RDFGraph) : RDFGraph

  /**
    * Extracts all triples for the given predicate.
    *
    * @param triples the triples
    * @param predicate the predicate
    * @return the set of triples that contain the predicate
    */
  def extractTriples(triples: mutable.Set[Triple], predicate: Node): mutable.Set[Triple] = {
    triples.filter(triple => triple.p == predicate)
  }

  /**
    * Extracts all triples for the given predicate.
    *
    * @param triples the RDD of triples
    * @param predicate the predicate
    * @return the RDD of triples that contain the predicate
    */
  def extractTriples(triples: RDD[Triple], predicate: Node): RDD[Triple] = {
    triples.filter(triple => triple.p == predicate)
  }

  /**
    * Extracts all triples that match the given subject, predicate and object if defined.
    *
    * @param triples the RDD of triples
    * @param subject the subject
    * @param predicate the predicate
    * @param obj the object
    * @return the RDD of triples that match
    */
  def extractTriples(triples: RDD[Triple],
                     subject: Option[Node],
                     predicate: Option[Node],
                     obj: Option[Node]): RDD[Triple] = {
    var extractedTriples = triples

    if(subject.isDefined) {
      extractedTriples = extractedTriples.filter(triple => triple.s == subject.get)
    }

    if(predicate.isDefined) {
      extractedTriples = extractedTriples.filter(triple => triple.p == predicate.get)
    }

    if(obj.isDefined) {
      extractedTriples = extractedTriples.filter(triple => triple.o == obj.get)
    }

    extractedTriples
  }
}

redpajama_set_name: RedPajamaGithub


text:
using namespace std;

node<string const>* ost_builder::build(vector<string>& keys, vector<string>& dummyKeys,
    unordered_map<string*, float>& keyProbs, unordered_map<string*, float>& dummyKeyProbs)
{
    // [0, key1 .. keyn, 0][0, key1 .. keyn, 0]
    vector<vector<int>> roots(keys.size() + 1, vector<int>(keys.size() + 1));
    vector<vector<double>> values(keys.size() + 1, vector<double>(keys.size() + 1));
    for (auto i = 1; i <= keys.size(); i++)
        values[i][i - 1] = dummyKeyProbs[&dummyKeys[i - 1]];

    vector<vector<double>> weights(keys.size(), vector<double>(keys.size()));
    for (auto i = 1; i < weights.size(); i++)
        for (auto j = i - 1; j < weights.size(); j++)
        {
            float weight = 0;
            for (auto keyIdx = i; keyIdx <= j; keyIdx++)
                weight += keyProbs[&keys[keyIdx]];
            for (auto keyIdx = i - 1; keyIdx <= j; keyIdx++)
                weight += dummyKeyProbs[&dummyKeys[keyIdx]];
            weights[i][j] = weight;
        }

    for (auto length = 1; length < keys.size(); length++)
    {
        for (auto startInterval = 1; startInterval <= keys.size() - length; startInterval++) {
            auto endInterval = startInterval + length - 1;
            auto value = DBL_MAX;
            auto bestRoot =  -1;
            for (auto candidateRoot = startInterval; candidateRoot <= endInterval; candidateRoot++) {
                auto candidateValue = values[startInterval][candidateRoot - 1]
                    + values[candidateRoot + 1][endInterval]
                    + weights[startInterval][endInterval];
                if ((value - candidateValue) > DBL_EPSILON) {
                    value = candidateValue;
                    bestRoot = candidateRoot;
                }
            }
            if (bestRoot == -1)
                throw exception("something went wrong");
            values[startInterval][endInterval] = value;
            roots[startInterval][endInterval] = bestRoot;
        }
    }

    return build(keys, dummyKeys, roots, 1, keys.size() - 1);
}

node<string const>* ost_builder::build(
    vector<string>& keys, vector<string>& dummyKeys,
    vector<vector<int>>& bestRoots,
    int from, int to)
{
    if (to == from - 1)
    {
        return new node<string const>(&dummyKeys[to], true);
    }
    else
    {
        auto rootIdx = bestRoots[from][to];
        auto root = &keys[rootIdx];
        auto n = new node<string const>(root, false);
        n->left = build(keys, dummyKeys, bestRoots, from, rootIdx - 1);
        n->right = build(keys, dummyKeys, bestRoots, rootIdx + 1, to);
        return n;
    }
}


text:
<?php

namespace Magento\Framework\View\Asset\File;

use Magento\Framework\View\Asset;

/**
 * A basic path context for assets that includes a directory path
 */
class Context implements Asset\ContextInterface
{
    /**
     * @var string
     */
    private $baseUrl;

    /**
     * @var string
     */
    private $baseDir;

    /**
     * @var string
     */
    private $path;

    /**
     * @param string $baseUrl
     * @param string $baseDirType
     * @param string $contextPath
     */
    public function __construct($baseUrl, $baseDirType, $contextPath)
    {
        $this->baseUrl = $baseUrl;
        $this->baseDir = $baseDirType;
        $this->path = $contextPath;
    }

    /**
     * {@inheritdoc}
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * {@inheritdoc}
     */
    public function getBaseUrl()
    {
        return $this->baseUrl;
    }

    /**
     * Get type of base directory
     *
     * @return string
     */
    public function getBaseDirType()
    {
        return $this->baseDir;
    }
}


text:
/*
 * include/linux/backing-dev.h
 *
 * low-level device information and state which is propagated up through
 * to high-level code.
 */

#ifndef _LINUX_BACKING_DEV_H
#define _LINUX_BACKING_DEV_H

#include <linux/percpu_counter.h>
#include <linux/log2.h>
#include <linux/flex_proportions.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/writeback.h>
#include <linux/atomic.h>
#include <linux/sysctl.h>
#include <linux/workqueue.h>

struct page;
struct device;
struct dentry;

/*
 * Bits in backing_dev_info.state
 */
enum bdi_state {
	BDI_wb_alloc,		/* Default embedded wb allocated */
	BDI_async_congested,	/* The async (write) queue is getting full */
	BDI_sync_congested,	/* The sync queue is getting full */
	BDI_registered,		/* bdi_register() was done */
	BDI_writeback_running,	/* Writeback is in progress */
	BDI_unused,		/* Available bits start here */
};

typedef int (congested_fn)(void *, int);

enum bdi_stat_item {
	BDI_RECLAIMABLE,
	BDI_WRITEBACK,
	BDI_DIRTIED,
	BDI_WRITTEN,
	NR_BDI_STAT_ITEMS
};

#define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids)))

struct bdi_writeback {
	struct backing_dev_info *bdi;	/* our parent bdi */
	unsigned int nr;

	unsigned long last_old_flush;	/* last old data flush */

	struct delayed_work dwork;	/* work item used for writeback */
	struct list_head b_dirty;	/* dirty inodes */
	struct list_head b_io;		/* parked for writeback */
	struct list_head b_more_io;	/* parked for more writeback */
	spinlock_t list_lock;		/* protects the b_* lists */
};

struct backing_dev_info {
	struct list_head bdi_list;
	unsigned long ra_pages;	/* max readahead in PAGE_CACHE_SIZE units */
	unsigned long state;	/* Always use atomic bitops on this */
	unsigned int capabilities; /* Device capabilities */
	congested_fn *congested_fn; /* Function pointer if device is md/dm */
	void *congested_data;	/* Pointer to aux data for congested func */

	char *name;

	struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];

	unsigned long bw_time_stamp;	/* last time write bw is updated */
	unsigned long dirtied_stamp;
	unsigned long written_stamp;	/* pages written at bw_time_stamp */
	unsigned long write_bandwidth;	/* the estimated write bandwidth */
	unsigned long avg_write_bandwidth; /* further smoothed write bw */

	/*
	 * The base dirty throttle rate, re-calculated on every 200ms.
	 * All the bdi tasks' dirty rate will be curbed under it.
	 * @dirty_ratelimit tracks the estimated @balanced_dirty_ratelimit
	 * in small steps and is much more smooth/stable than the latter.
	 */
	unsigned long dirty_ratelimit;
	unsigned long balanced_dirty_ratelimit;

	struct fprop_local_percpu completions;
	int dirty_exceeded;

	unsigned int min_ratio;
	unsigned int max_ratio, max_prop_frac;

	struct bdi_writeback wb;  /* default writeback info for this bdi */
	spinlock_t wb_lock;	  /* protects work_list & wb.dwork scheduling */

	struct list_head work_list;

	struct device *dev;

	struct timer_list laptop_mode_wb_timer;

#ifdef CONFIG_DEBUG_FS
	struct dentry *debug_dir;
	struct dentry *debug_stats;
#endif
};

int bdi_init(struct backing_dev_info *bdi);
void bdi_destroy(struct backing_dev_info *bdi);

__printf(3, 4)
int bdi_register(struct backing_dev_info *bdi, struct device *parent,
		const char *fmt, ...);
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
void bdi_unregister(struct backing_dev_info *bdi);
int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int);
void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages,
			enum wb_reason reason);
void bdi_start_background_writeback(struct backing_dev_info *bdi);
void bdi_writeback_workfn(struct work_struct *work);
int bdi_has_dirty_io(struct backing_dev_info *bdi);
void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi);
void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2);

extern spinlock_t bdi_lock;
extern struct list_head bdi_list;

extern struct workqueue_struct *bdi_wq;

static inline int wb_has_dirty_io(struct bdi_writeback *wb)
{
	return !list_empty(&wb->b_dirty) ||
	       !list_empty(&wb->b_io) ||
	       !list_empty(&wb->b_more_io);
}

static inline void __add_bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item, s64 amount)
{
	__percpu_counter_add(&bdi->bdi_stat[item], amount, BDI_STAT_BATCH);
}

static inline void __inc_bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	__add_bdi_stat(bdi, item, 1);
}

static inline void inc_bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	unsigned long flags;

	local_irq_save(flags);
	__inc_bdi_stat(bdi, item);
	local_irq_restore(flags);
}

static inline void __dec_bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	__add_bdi_stat(bdi, item, -1);
}

static inline void dec_bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	unsigned long flags;

	local_irq_save(flags);
	__dec_bdi_stat(bdi, item);
	local_irq_restore(flags);
}

static inline s64 bdi_stat(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	return percpu_counter_read_positive(&bdi->bdi_stat[item]);
}

static inline s64 __bdi_stat_sum(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	return percpu_counter_sum_positive(&bdi->bdi_stat[item]);
}

static inline s64 bdi_stat_sum(struct backing_dev_info *bdi,
		enum bdi_stat_item item)
{
	s64 sum;
	unsigned long flags;

	local_irq_save(flags);
	sum = __bdi_stat_sum(bdi, item);
	local_irq_restore(flags);

	return sum;
}

extern void bdi_writeout_inc(struct backing_dev_info *bdi);

/*
 * maximal error of a stat counter.
 */
static inline unsigned long bdi_stat_error(struct backing_dev_info *bdi)
{
#ifdef CONFIG_SMP
	return nr_cpu_ids * BDI_STAT_BATCH;
#else
	return 1;
#endif
}

int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio);
int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);

/*
 * Flags in backing_dev_info::capability
 *
 * The first three flags control whether dirty pages will contribute to the
 * VM's accounting and whether writepages() should be called for dirty pages
 * (something that would not, for example, be appropriate for ramfs)
 *
 * WARNING: these flags are closely related and should not normally be
 * used separately.  The BDI_CAP_NO_ACCT_AND_WRITEBACK combines these
 * three flags into a single convenience macro.
 *
 * BDI_CAP_NO_ACCT_DIRTY:  Dirty pages shouldn't contribute to accounting
 * BDI_CAP_NO_WRITEBACK:   Don't write pages back
 * BDI_CAP_NO_ACCT_WB:     Don't automatically account writeback pages
 *
 * These flags let !MMU mmap() govern direct device mapping vs immediate
 * copying more easily for MAP_PRIVATE, especially for ROM filesystems.
 *
 * BDI_CAP_MAP_COPY:       Copy can be mapped (MAP_PRIVATE)
 * BDI_CAP_MAP_DIRECT:     Can be mapped directly (MAP_SHARED)
 * BDI_CAP_READ_MAP:       Can be mapped for reading
 * BDI_CAP_WRITE_MAP:      Can be mapped for writing
 * BDI_CAP_EXEC_MAP:       Can be mapped for execution
 *
 * BDI_CAP_SWAP_BACKED:    Count shmem/tmpfs objects as swap-backed.
 */
#define BDI_CAP_NO_ACCT_DIRTY	0x00000001
#define BDI_CAP_NO_WRITEBACK	0x00000002
#define BDI_CAP_MAP_COPY	0x00000004
#define BDI_CAP_MAP_DIRECT	0x00000008
#define BDI_CAP_READ_MAP	0x00000010
#define BDI_CAP_WRITE_MAP	0x00000020
#define BDI_CAP_EXEC_MAP	0x00000040
#define BDI_CAP_NO_ACCT_WB	0x00000080
#define BDI_CAP_SWAP_BACKED	0x00000100
#define BDI_CAP_STABLE_WRITES	0x00000200

#define BDI_CAP_VMFLAGS \
	(BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)

#define BDI_CAP_NO_ACCT_AND_WRITEBACK \
	(BDI_CAP_NO_WRITEBACK | BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_ACCT_WB)

#if defined(VM_MAYREAD) && \
	(BDI_CAP_READ_MAP != VM_MAYREAD || \
	 BDI_CAP_WRITE_MAP != VM_MAYWRITE || \
	 BDI_CAP_EXEC_MAP != VM_MAYEXEC)
#error please change backing_dev_info::capabilities flags
#endif

extern struct backing_dev_info default_backing_dev_info;
extern struct backing_dev_info noop_backing_dev_info;

int writeback_in_progress(struct backing_dev_info *bdi);

static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
{
	if (bdi->congested_fn)
		return bdi->congested_fn(bdi->congested_data, bdi_bits);
	return (bdi->state & bdi_bits);
}

static inline int bdi_read_congested(struct backing_dev_info *bdi)
{
	return bdi_congested(bdi, 1 << BDI_sync_congested);
}

static inline int bdi_write_congested(struct backing_dev_info *bdi)
{
	return bdi_congested(bdi, 1 << BDI_async_congested);
}

static inline int bdi_rw_congested(struct backing_dev_info *bdi)
{
	return bdi_congested(bdi, (1 << BDI_sync_congested) |
				  (1 << BDI_async_congested));
}

enum {
	BLK_RW_ASYNC	= 0,
	BLK_RW_SYNC	= 1,
};

void clear_bdi_congested(struct backing_dev_info *bdi, int sync);
void set_bdi_congested(struct backing_dev_info *bdi, int sync);
long congestion_wait(int sync, long timeout);
long wait_iff_congested(struct zone *zone, int sync, long timeout);
int pdflush_proc_obsolete(struct ctl_table *table, int write,
		void __user *buffer, size_t *lenp, loff_t *ppos);

static inline bool bdi_cap_stable_pages_required(struct backing_dev_info *bdi)
{
	return bdi->capabilities & BDI_CAP_STABLE_WRITES;
}

static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi)
{
	return !(bdi->capabilities & BDI_CAP_NO_WRITEBACK);
}

static inline bool bdi_cap_account_dirty(struct backing_dev_info *bdi)
{
	return !(bdi->capabilities & BDI_CAP_NO_ACCT_DIRTY);
}

static inline bool bdi_cap_account_writeback(struct backing_dev_info *bdi)
{
	/* Paranoia: BDI_CAP_NO_WRITEBACK implies BDI_CAP_NO_ACCT_WB */
	return !(bdi->capabilities & (BDI_CAP_NO_ACCT_WB |
				      BDI_CAP_NO_WRITEBACK));
}

static inline bool bdi_cap_swap_backed(struct backing_dev_info *bdi)
{
	return bdi->capabilities & BDI_CAP_SWAP_BACKED;
}

static inline bool mapping_cap_writeback_dirty(struct address_space *mapping)
{
	return bdi_cap_writeback_dirty(mapping->backing_dev_info);
}

static inline bool mapping_cap_account_dirty(struct address_space *mapping)
{
	return bdi_cap_account_dirty(mapping->backing_dev_info);
}

static inline bool mapping_cap_swap_backed(struct address_space *mapping)
{
	return bdi_cap_swap_backed(mapping->backing_dev_info);
}

static inline int bdi_sched_wait(void *word)
{
	schedule();
	return 0;
}

#endif		/* _LINUX_BACKING_DEV_H */


text:
/** @author Jia Pan */

#ifndef FCL_BVH_UTILITY_H
#define FCL_BVH_UTILITY_H

#include "fcl/math/variance3.h"
#include "fcl/geometry/bvh/BVH_model.h"

namespace fcl
{

/// @brief Expand the BVH bounding boxes according to the variance matrix
/// corresponding to the data stored within each BV node
template <typename S, typename BV>
void BVHExpand(BVHModel<BV>& model, const Variance3<S>* ucs, S r);

/// @brief Expand the BVH bounding boxes according to the corresponding variance
/// information, for OBB
template <typename S>
void BVHExpand(
    BVHModel<OBB<S>>& model, const Variance3<S>* ucs, S r = 1.0);

/// @brief Expand the BVH bounding boxes according to the corresponding variance
/// information, for RSS
template <typename S>
void BVHExpand(
    BVHModel<RSS<S>>& model, const Variance3<S>* ucs, S r = 1.0);

} // namespace fcl

#include "fcl/geometry/bvh/BVH_utility-inl.h"

#endif


text:
var context = require.context('./spec', true, /spec\.js$/);
context.keys().forEach(context);


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package brutelol.characters.instances.abilities;

import brutelol.fights.Combatant;

/**
 *
 * @author Talonos
 */
public class StatusEffect
{
    public static RamDefensiveBallCurlEffect RAM_DBC = new RamDefensiveBallCurlEffect();
    public static RamSpikedShellEffect RAM_SPIKED_SHELL = new RamSpikedShellEffect();

    public static UnimplementedEffect ITEM_QUICKSILVER;
    public static UnimplementedEffect ITEM_BIG_GIANT_SLAYER;
    public static UnimplementedEffect ITEM_SPECTRAL_WALTZ;
    public static UnimplementedEffect ITEM_LAMENT;
    public static UnimplementedEffect ITEM_FIRECANNON;
    public static UnimplementedEffect ITEM_SHIV_LIGHTNING;

    public void doHitRetaliation(Combatant attacker, Combatant Defender, double physicalDam, double magicalDam)
    {

    }

    public double onHitMagicAddition(Combatant attacker, Combatant target)
    {
        return 0;
    }

    public double onHitPhysicalAddition(Combatant attacker, Combatant target)
    {
        return 0;
    }
}


text:
<!DOCTYPE html>

	<title>Week 4: Technical Post</title>
	<link rel="stylesheet" type="text/css" href="stylesheets/blog.css">

Technical Post: Enumerable Map Method

by Maddison Brusman on 5/18/2014

For today's technical blog post I'm going to walk you though the .map method (synonymous wih .collect method) on Enumerables.

Example#1:

(1..4).map { |i| i*i }
 #=> [1,4,9,16]

Explanation: The map method iterate through the block, multiplying
each number by itself and returning the results in an array.

Example#2:

(1..4).collect { "cat"  }
 #=> ["cat", "cat", "cat", "cat"]

Explanation: The collect method (same as map, IDK who decided there'd be two versions) push the value inside the block; in this case "cat" 4 times (1 through 4).


text:
import { isNodePattern } from '@jimp/utils';

/**
 * Get an image's histogram
 * @return {object} An object with an array of color occurrence counts for each channel (r,g,b)
 */
function histogram() {
  const histogram = {
    r: new Array(256).fill(0),
    g: new Array(256).fill(0),
    b: new Array(256).fill(0)
  };

  this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
    x,
    y,
    index
  ) {
    histogram.r[this.bitmap.data[index + 0]]++;
    histogram.g[this.bitmap.data[index + 1]]++;
    histogram.b[this.bitmap.data[index + 2]]++;
  });

  return histogram;
}

/**
 * Normalize values
 * @param  {integer} value Pixel channel value.
 * @param  {integer} min   Minimum value for channel
 * @param  {integer} max   Maximum value for channel
 * @return {integer} normalized values
 */
const normalize = function(value, min, max) {
  return ((value - min) * 255) / (max - min);
};

const getBounds = function(histogramChannel) {
  return [
    histogramChannel.findIndex(value => value > 0),
    255 -
      histogramChannel
        .slice()
        .reverse()
        .findIndex(value => value > 0)
  ];
};

/**
 * Normalizes the image
 * @param {function(Error, Jimp)} cb (optional) a callback for when complete
 * @returns {Jimp} this for chaining of methods
 */
export default () => ({
  normalize(cb) {
    const h = histogram.call(this);

    // store bounds (minimum and maximum values)
    const bounds = {
      r: getBounds(h.r),
      g: getBounds(h.g),
      b: getBounds(h.b)
    };

    // apply value transformations
    this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function(
      x,
      y,
      idx
    ) {
      const r = this.bitmap.data[idx + 0];
      const g = this.bitmap.data[idx + 1];
      const b = this.bitmap.data[idx + 2];

      this.bitmap.data[idx + 0] = normalize(r, bounds.r[0], bounds.r[1]);
      this.bitmap.data[idx + 1] = normalize(g, bounds.g[0], bounds.g[1]);
      this.bitmap.data[idx + 2] = normalize(b, bounds.b[0], bounds.b[1]);
    });

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  }
});


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const eslint_1 = require("eslint");
const RuleTester = eslint_1.RuleTester;
exports.RuleTester = RuleTester;
//# sourceMappingURL=RuleTester.js.map


text:
:orphan:

=================
TempoIQ Pipelines
=================

*Pipelines* is a new service from TempoIQ, and we are inviting you
to be among the first to try it.

Pipelines enable you to analyze and visualize your sensor data in realtime.

.. image:: /images/pipelines.png

The process is simple:

1. Define a pipeline to calculate a streaming metric based on your live sensor data,
   such as average temperature in a building or total energy generated today.
2. Get push updates in a graph or via an API as your devices
   write new data. That's it!

We'll go into a few specific examples shortly, but first we'll cover the three
basic components of the Pipelines system: events, analytics, and publishers.

Events
------

You send data to the Pipelines system as a sequence of events. An event is
a JSON object, which can contain any number of attributes containing measurements,
metadata, or nested objects.

For example:

.. code::

   {
     "deviceType": "thermostat",
     "serialNumber": "X3251821",
     "userInfo": {
       "id": 1423,
       "region": "south"
     },
     "currentTemp": 71.0,
     "currentHumidity": 65.0
   }

There are very few limitations on how you structure events---they're meant
to work seamlessly with data formats that you already use in your application.
There's no need to pre-define devices or channels with this event model. All
data is contained within the event itself.

When you send an event to TempoIQ, we automatically add a timestamp. If you
want to provide your own timestamp, for instance, if you are batching events
over time and writing many at once, you can override it through a special timestamp
field.

Analytics
---------

Analytics calculate specific metrics from the raw stream of input
events. They can filter for a subset of events, group into
sub-streams based on data in the events, and aggregate values
over time or across devices.

Example: For each *userInfo.region*, find the average *currentTemp* of all
events so far this hour.

Analytics are persistent operations. In other words, after you've
defined an analytic, it will continue to process new events and emit
updated results.

.. note:: For the initial trial program, TempoIQ engineers will manually configure
   analytics in your Pipelines environment. Future releases will allow you to
   define your own analytics through a web UI or API.

Publishers
----------

Once you set up your analytics, you can subscribe to updates through a publisher.
We support a graphical publisher--a dashboard website with a streaming graph--
and a websocket publisher for your applications to consume directly. In either case,
you receive updates continously as long as you're subscribed.

If you have analytics that group the input events into sub-streams, you can subscribe to
just a single stream. Using the example above, you could stream a graph showing
only the average temperature for the *south* region.

.. comment
   Pipeline sifts through all data as it comes in
   Collector?
   Broadcast outputs? Publish?
   Word for output? value, result, calculation

Examples
--------

A solar company collects data from its inverters and sends it to TempoIQ in the following format:

.. code::

   {
     "_$_ts": "2015-04-29T13:01:00Z",  // Optional
     "inverter_id": "asdf12345",
     "installation": "3425",
     "measurements": {
       "voltage": 118.2,
       "ac_power": 410.0,
       "dc_power": 429.5,
       "energy": 0.35
     }
   }

They want to have access to several realtime metrics:

Single device dashboard
~~~~~~~~~~~~~~~~~~~~~~~

A dashboard for an inverter which continuously updates with the latest value for
each measurement. Given an inverter ID, they can subscribe to raw events to display
in gauges or graphs.

Instantaneous totals
~~~~~~~~~~~~~~~~~~~~

Track the total power being generated for the entire install base by summing the latest
*ac_power* value across all devices.

Cumulative production
~~~~~~~~~~~~~~~~~~~~~

A feed showing an installation's total energy production for the day. Given an
installation ID, sums all *energy* values from events today from that installation.
This will continuously increase throughout the day and reset at midnight.

Next steps
----------

.. toctree::
   :titlesonly:

   getting-started
   http
   mqqt


text:
package com.facebook.react.uimanager;

import javax.annotation.Nullable;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

import android.view.View;

import com.facebook.csslayout.CSSNode;
import com.facebook.react.touch.CatalystInterceptingViewGroup;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReadableArray;

/**
 * Class responsible for knowing how to create and update catalyst Views of a given type. It is also
 * responsible for creating and updating CSSNode subclasses used for calculating position and size
 * for the corresponding native view.
 */
public abstract class ViewManager<T extends View, C extends ReactShadowNode> {

  private static final Map<Class, Map<String, UIProp.Type>> CLASS_PROP_CACHE = new HashMap<>();

  /**
   * Creates a view and installs event emitters on it.
   */
  public final T createView(
      ThemedReactContext reactContext,
      JSResponderHandler jsResponderHandler) {
    T view = createViewInstance(reactContext);
    addEventEmitters(reactContext, view);
    if (view instanceof CatalystInterceptingViewGroup) {
      ((CatalystInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
    }
    return view;
  }

  /**
   * @return the name of this view manager. This will be the name used to reference this view
   * manager from JavaScript in createReactNativeComponentClass.
   */
  public abstract String getName();

  /**
   * This method should return a subclass of {@link CSSNode} which will be then used for measuring
   * position and size of the view. In mose of the cases this should just return an instance of
   * {@link CSSNode}
   */
  public abstract C createCSSNodeInstance();

  /**
   * Subclasses should return a new View instance of the proper type.
   * @param reactContext
   */
  protected abstract T createViewInstance(ThemedReactContext reactContext);

  /**
   * Called when view is detached from view hierarchy and allows for some additional cleanup by
   * the {@link ViewManager} subclass.
   */
  public void onDropViewInstance(ThemedReactContext reactContext, T view) {
  }

  /**
   * Subclasses can override this method to install custom event emitters on the given View. You
   * might want to override this method if your view needs to emit events besides basic touch events
   * to JS (e.g. scroll events).
   */
  protected void addEventEmitters(ThemedReactContext reactContext, T view) {
  }

  /**
   * Subclass should use this method to populate native view with updated style properties. In case
   * when a certain property is present in {@param props} map but the value is null, this property
   * should be reset to the default value
   */
  public abstract void updateView(T root, CatalystStylesDiffMap props);

  /**
   * Subclasses can implement this method to receive an optional extra data enqueued from the
   * corresponding instance of {@link ReactShadowNode} in
   * {@link ReactShadowNode#onCollectExtraUpdates}.
   *
   * Since css layout step and ui updates can be executed in separate thread apart of setting
   * x/y/width/height this is the recommended and thread-safe way of passing extra data from css
   * node to the native view counterpart.
   *
   * TODO(7247021): Replace updateExtraData with generic update props mechanism after D2086999
   */
  public abstract void updateExtraData(T root, Object extraData);

  /**
   * Subclasses may use this method to receive events/commands directly from JS through the
   * {@link UIManager}. Good example of such a command would be {@code scrollTo} request with
   * coordinates for a {@link ScrollView} or {@code goBack} request for a {@link WebView} instance.
   *
   * @param root View instance that should receive the command
   * @param commandId code of the command
   * @param args optional arguments for the command
   */
  public void receiveCommand(T root, int commandId, @Nullable ReadableArray args) {
  }

  /**
   * Subclasses of {@link ViewManager} that expect to receive commands through
   * {@link UIManagerModule#dispatchViewManagerCommand} should override this method returning the
   * map between names of the commands and IDs that are then used in {@link #receiveCommand} method
   * whenever the command is dispatched for this particular {@link ViewManager}.
   *
   * As an example we may consider {@link ReactWebViewManager} that expose the following commands:
   * goBack, goForward, reload. In this case the map returned from {@link #getCommandsMap} from
   * {@link ReactWebViewManager} will look as follows:
   * {
   *   "goBack": 1,
   *   "goForward": 2,
   *   "reload": 3,
   * }
   *
   * Now assuming that "reload" command is dispatched through {@link UIManagerModule} we trigger
   * {@link ReactWebViewManager#receiveCommand} passing "3" as {@code commandId} argument.
   *
   * @return map of string to int mapping of the expected commands
   */
  public @Nullable Map<String, Integer> getCommandsMap() {
    return null;
  }

  /**
   * Returns a map of config data passed to JS that defines eligible events that can be placed on
   * native views. This should return bubbling directly-dispatched event types and specify what
   * names should be used to subscribe to either form (bubbling/capturing).
   *
   * Returned map should be of the form:
   * {
   *   "onTwirl": {
   *     "phasedRegistrationNames": {
   *       "bubbled": "onTwirl",
   *       "captured": "onTwirlCaptured"
   *     }
   *   }
   * }
   */
  public @Nullable Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
    return null;
  }

  /**
   * Returns a map of config data passed to JS that defines eligible events that can be placed on
   * native views. This should return non-bubbling directly-dispatched event types.
   *
   * Returned map should be of the form:
   * {
   *   "onTwirl": {
   *     "registrationName": "onTwirl"
   *   }
   * }
   */
  public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    return null;
  }

  /**
   * Returns a map of view-specific constants that are injected to JavaScript. These constants are
   * made accessible via UIManager.<ViewName>.Constants.
   */
  public @Nullable Map<String, Object> getExportedViewConstants() {
    return null;
  }

  public Map<String, UIProp.Type> getNativeProps() {
    Map<String, UIProp.Type> nativeProps = new HashMap<>();
    Class cls = getClass();
    while (cls.getSuperclass() != null) {
      Map<String, UIProp.Type> props = getNativePropsForClass(cls);
      for (Map.Entry<String, UIProp.Type> entry : props.entrySet()) {
        nativeProps.put(entry.getKey(), entry.getValue());
      }
      cls = cls.getSuperclass();
    }
    return nativeProps;
  }

  private Map<String, UIProp.Type> getNativePropsForClass(Class cls) {
    Map<String, UIProp.Type> props = CLASS_PROP_CACHE.get(cls);
    if (props != null) {
      return props;
    }
    props = new HashMap<>();
    for (Field f : cls.getDeclaredFields()) {
      UIProp annotation = f.getAnnotation(UIProp.class);
      if (annotation != null) {
        UIProp.Type type = annotation.value();
        try {
          String name = (String) f.get(this);
          props.put(name, type);
        } catch (IllegalAccessException e) {
          throw new RuntimeException(
              "UIProp " + cls.getName() + "." + f.getName() + " must be public.");
        }
      }
    }
    CLASS_PROP_CACHE.put(cls, props);
    return props;
  }
}


text:
package dynks.cache;

import dynks.URIMatcher;
import dynks.cache.CacheRegion.Cacheability;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;
import java.util.Set;

import static java.util.Collections.unmodifiableMap;
import static dynks.cache.NamespacedURIKeyStrategy.keyStrategyWithEmptyNamespace;

/**
 * Created by jszczepankiewicz on 2015-03-26.
 */
public class ResponseCacheByURIPolicy implements ResponseCachePolicy {

    private final Map<URIMatcher, CacheRegion> regions;
    private final Set<URIMatcher> uris;

    public static final CacheRegion PASSTHROUGH;

    static{
        PASSTHROUGH = new CacheRegion(0, null, Cacheability.PASSTHROUGH, keyStrategyWithEmptyNamespace());
    }

    public ResponseCacheByURIPolicy(Map<URIMatcher, CacheRegion> regions) {

        if (regions == null) {
            throw new NullPointerException("List of cache regions should not be null");
        }

        this.regions = unmodifiableMap(regions);
        this.uris = regions.keySet();
    }

    @Override
    public CacheRegion getfor(final HttpServletRequest request) {

        final String requestURI = request.getRequestURI();

        for (URIMatcher matcher : uris) {
            if (matcher.matches(requestURI)) {
                return regions.get(matcher);
            }
        }

        //  matching not found, assuming no caching for given request
        return PASSTHROUGH;
    }

    public Map<URIMatcher, CacheRegion> getRegions() {
        return regions;
    }
}


text:
package org.apache.flink.runtime.operators;

import org.apache.flink.api.common.functions.Function;

/**
 * The interface to be implemented by all drivers that run alone (or as the primary driver) in a task.
 * A driver implements the actual code to perform a batch operation, like map(),
 * reduce(), join(), or coGroup().
 *
 * @see TaskContext
 *
 * @param <S> The type of stub driven by this driver.
 * @param <OT> The data type of the records produced by this driver.
 */
public interface Driver<S extends Function, OT> {

	void setup(TaskContext<S, OT> context);

	/**
	 * Gets the number of inputs that the task has.
	 *
	 * @return The number of inputs.
	 */
	int getNumberOfInputs();

	/**
	 * Gets the number of comparators required for this driver.
	 *
	 * @return The number of comparators required for this driver.
	 */
	int getNumberOfDriverComparators();

	/**
	 * Gets the class of the stub type that is run by this task. For example, a <tt>MapTask</tt> should return
	 * MapFunction.class.
	 *
	 * @return The class of the stub type run by the task.
	 */
	Class<S> getStubType();

	/**
	 * This method is called before the user code is opened. An exception thrown by this method
	 * signals failure of the task.
	 *
	 * @throws Exception Exceptions may be forwarded and signal task failure.
	 */
	void prepare() throws Exception;

	/**
	 * The main operation method of the task. It should call the user code with the data subsets until
	 * the input is depleted.
	 *
	 * @throws Exception Any exception thrown by this method signals task failure. Because exceptions in the user
	 *                   code typically signal situations where this instance in unable to proceed, exceptions
	 *                   from the user code should be forwarded.
	 */
	void run() throws Exception;

	/**
	 * This method is invoked in any case (clean termination and exception) at the end of the tasks operation.
	 *
	 * @throws Exception Exceptions may be forwarded.
	 */
	void cleanup() throws Exception;

	/**
	 * This method is invoked when the driver must aborted in mid processing. It is invoked asynchronously by a different thread.
	 *
	 * @throws Exception Exceptions may be forwarded.
	 */
	void cancel() throws Exception;
}


text:
\lecture{Sept. 26}

\begin{exmp}
\begin{align*}
\exists x \ (F\to G) &\equiv \exists X \ (\neg F \vee G)\\
&\equiv \exists x \ \neg F \vee \exists x \ G\\
&\equiv \neg \forall x \ F \vee \exists x \ G\\
&\equiv \forall x \ F \to \exists x \ G
\end{align*}
\end{exmp}

\begin{defn}
In a formula f, every occurrence of a variable symbol $x$ (Except when the occurrence of $x$ immediately follows a quantifier $\forall , \exists$) is either \textbf{free} or \textbf{bound}.

In the formulas $\forall x \ F$ and $\exists x \ F$, every free occurrence of $x$ in $F$ becomes \textbf{bound} by the initial quantifier, and every bound occurrence of x in F remains bound (by the same quantifier which binds it in F).
\end{defn}

\begin{exmp}
$$\forall y \ (x\times y = y\times x)$$

Both occurrence of x are free, and both occurrence of y are bound by the initial quantifier.

$$\forall x \ (\forall y \ (x\times y = y\times x) \to x\times a = a\times x)$$
\end{exmp}

\begin{defn}
An \textbf{interpretation} in a first-order language consists of the following: a choice of the universal set u, and a choice of meaning for each constant, function and relation symbol.
\end{defn}

A formula is a meaningless string of symbols until we choose an interpretation. Once we choose an interpretation, a formula becomes a meaningful mathematical statement about its free variables.

The truth or falsehood of a formula may still depend on the value in u which are assigned to the free variable symbols in F.

An assignment (of values in u to the variable symbols) is a function $\alpha : \{\text{variable symbols}\}\to u$

\begin{exmp}
Consider the formula $$\forall y \ (x\times y = y\times x)$$

when $u = \mathbb{R}$ (and $\times$ is multiplication) the formula becomes true (for any value assigned to x).

when $u = \mathbb{R}^3$ annd $\times$ is cross-product, the formula is true iff $x=0$

when $u$ is the set of all $n\times n$ matrices with entries in $\mathbb{R}$, and $\times$ denotes matrix multiplication, the formula is can be read as ``the matrix x commutes with every matrix", and it is true iff $x = cI$ for some $c\in \mathbb{R}$
\end{exmp}

\begin{nota}
For a formula F, a variable symbol x and a term t, we write $[F]_{x\mapsto t}$ to denote the formula which is constructed from F by replacing x by t.

In an interpretation, the formula $[F]_{x\mapsto t}$ has the same meaning about t that f has about x.

Roughly speaking, $[F]_{x\mapsto t}$ is obtained from F by replacing each free occurrence of the symbol x by the term t. (but if a variable symbol in t would become bound by this replacement, we rename the variable first.)
\end{nota}

\begin{exmp}

In $u=\mathbb{Z}$, $x\mid y$ means $\exists z \ y = x\times z$

$|\exists z \ y = x\times z|_{y\mapsto u} = \exists z \ u = x\times z$ means $x\mid u$

$|\exists z \ y = x\times z|_{y\mapsto x} = \exists z \ x = x\times z$ means $x\mid x$

$|\exists z \ y = x\times z|_{y\mapsto z} \neq  \exists z \ z = x\times z$

$|\exists z \ y = x\times z|_{y\mapsto z} = |\exists u \ y = x\times u|_{y\mapsto z} = \exists u \ z = x\times u$

\end{exmp}

Here are some more basic equivalences:

E32 $\forall x \ F \equiv F$ if x is not free in F

E34 $\forall x \ F \equiv \forall y \ [F]_{x\mapsto y}$ if y is not free in F


text:
.class Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage$2;
.super Ljava/lang/Object;
.source "ServiceBoxMusicPage.java"

# interfaces
.implements Landroid/view/View$OnClickListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;

# direct methods
.method constructor <init>(Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;)V
    .locals 0

    iput-object p1, p0, Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage$2;->this$0:Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;

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

    return-void
.end method

# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 1

    iget-object v0, p0, Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage$2;->this$0:Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;

    invoke-static {v0, p1}, Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;->-wrap2(Lcom/android/systemui/servicebox/pages/music/ServiceBoxMusicPage;Landroid/view/View;)V

    return-void
.end method


text:
var vehicles = {
    list:{
        "transport":{
            name:"transport",
            pixelWidth:31,
            pixelHeight:30,
            pixelOffsetX:15,
            pixelOffsetY:15,
            radius:15,
            speed:15,
            sight:3,
            cost:400,
            hitPoints:100,
            turnSpeed:2,
            spriteImages:[
                {name:"stand",count:1,directions:8}
            ],
        },
        "harvester":{
            name:"harvester",
            pixelWidth:21,
            pixelHeight:20,
            pixelOffsetX:10,
            pixelOffsetY:10,
            radius:10,
            speed:10,
            sight:3,
            cost:1600,
            hitPoints:50,
            turnSpeed:2,
            spriteImages:[
                {name:"stand",count:1,directions:8}
            ],
        },
        "scout-tank":{
            name:"scout-tank",
            canAttack:true,
            canAttackLand:true,
            canAttackAir:false,
            weaponType:"bullet",
            pixelWidth:21,
            pixelHeight:21,
            pixelOffsetX:10,
            pixelOffsetY:10,
            radius:11,
            speed:20,
            sight:4,
            cost:500,
            hitPoints:50,
            turnSpeed:4,
            spriteImages:[
                {name:"stand",count:1,directions:8}
            ],
        },
        "heavy-tank":{
            name:"heavy-tank",
            canAttack:true,
            canAttackLand:true,
            canAttackAir:false,
            weaponType:"cannon-ball",
            pixelWidth:30,
            pixelHeight:30,
            pixelOffsetX:15,
            pixelOffsetY:15,
            radius:13,
            speed:15,
            sight:5,
            cost:1200,
            hitPoints:50,
            turnSpeed:4,
            spriteImages:[
                {name:"stand",count:1,directions:8}
            ],
        }
    },
    defaults:{
        type:"vehicles",
        animationIndex:0,
        direction:0,
        action:"stand",
        orders:{type:"stand"},
        selected:false,
        selectable:true,
        directions:8,
        animate:function(){
            // Consider an item healthy if it has more than 40% life
            if (this.life>this.hitPoints*0.4){
                this.lifeCode = "healthy";
            } else if (this.life <= 0){
                this.lifeCode = "dead";
                game.remove(this);
                return;
            } else {
                this.lifeCode = "damaged";
            }

            switch (this.action){
                case "stand":
                    var direction = wrapDirection(Math.round(this.direction),this.directions);
                    this.imageList = this.spriteArray["stand-"+direction];
                    this.imageOffset = this.imageList.offset + this.animationIndex;
                    this.animationIndex++;

                    if (this.animationIndex>=this.imageList.count){
                        this.animationIndex = 0;
                    }
                    break;
				case "teleport":
				    var direction = wrapDirection(Math.round(this.direction),this.directions);
				    this.imageList = this.spriteArray["stand-"+direction];
				    this.imageOffset = this.imageList.offset + this.animationIndex;
				    this.animationIndex++;

				    if (this.animationIndex>=this.imageList.count){
				        this.animationIndex = 0;
				    }
				    if (!this.brightness){
				        this.brightness = 1;
				    }
				    this.brightness -= 0.05;
				    if(this.brightness <= 0){
				        this.brightness = undefined;
				        this.action = "stand";
				    }
				    break;

            }
        },
		isValidTarget:isValidTarget,
		findTargetsInSight:findTargetsInSight,
		processOrders:function(){
		    this.lastMovementX = 0;
		    this.lastMovementY = 0;
		    if(this.reloadTimeLeft){
		        this.reloadTimeLeft--;
		    }
		    var target;
		    switch (this.orders.type){
		        case "move":
					// Move towards destination until distance from destination is less than vehicle radius
					var distanceFromDestinationSquared = (Math.pow(this.orders.to.x-this.x,2) + Math.pow(this.orders.to.y-this.y,2));
			        if (distanceFromDestinationSquared < Math.pow(this.radius/game.gridSize,2)) {
		                //Stop when within one radius of the destination
		                this.orders = {type:"stand"};
		                return;
		            } else if (distanceFromDestinationSquared <Math.pow(this.radius*3/game.gridSize,2)) {
						//Stop when within 3 radius of the destination if colliding with something
						this.orders = {type:"stand"};
						return;
			        } else {
						if (this.colliding && (Math.pow(this.orders.to.x-this.x,2) + Math.pow(this.orders.to.y-this.y,2))<Math.pow(this.radius*5/game.gridSize,2)) {
							// Count collsions within 5 radius distance of goal
							if (!this.orders.collisionCount){
								this.orders.collisionCount = 1
							} else {
								this.orders.collisionCount ++;
							}
							// Stop if more than 30 collisions occur
							if (this.orders.collisionCount > 30) {
								this.orders = {type:"stand"};
								return;
							}
					    }
		                var moving = this.moveTo(this.orders.to);
						// Pathfinding couldn't find a path so stop
						if(!moving){
							this.orders = {type:"stand"};
							return;
						}
		            }
		        	break;
				case "deploy":
					// If oilfield has been used already, then cancel order
					if(this.orders.to.lifeCode == "dead"){
						this.orders = {type:"stand"};
						return;
					}
					// Move to middle of oil field
					var target = {x:this.orders.to.x+1,y:this.orders.to.y+0.5,type:"terrain"};
					var distanceFromTargetSquared = (Math.pow(target.x-this.x,2) + Math.pow(target.y-this.y,2));
					if (distanceFromTargetSquared<Math.pow(this.radius*2/game.gridSize,2)) {
						// After reaching oil field, turn harvester to point towards left (direction 6)
						var difference = angleDiff(this.direction,6,this.directions);
						var turnAmount = this.turnSpeed*game.turnSpeedAdjustmentFactor;
						if (Math.abs(difference)>turnAmount){
							this.direction = wrapDirection(this.direction+turnAmount*Math.abs(difference)/difference,this.directions);
						} else {
							// Once it is pointing to the left, remove the harvester and oil field and deploy a harvester building
							game.remove(this.orders.to);
							this.orders.to.lifeCode="dead";
							game.remove(this);
							this.lifeCode="dead";
							game.add({type:"buildings", name:"harvester", x:this.orders.to.x, y:this.orders.to.y, action:"deploy", team:this.team});
						}
				    } else {
				        var moving = this.moveTo(target);
						// Pathfinding couldn't find a path so stop
						if(!moving){
							this.orders = {type:"stand"};
						}
				    }
					break;
			    case "stand":
		            var targets = this.findTargetsInSight();
		            if(targets.length>0){
		                this.orders = {type:"attack",to:targets[0]};
		            }
		            break;
		        case "sentry":
		            var targets = this.findTargetsInSight(2);
		            if(targets.length>0){
		                this.orders = {type:"attack",to:targets[0],nextOrder:this.orders};
		            }
		            break;
		        case "hunt":
		            var targets = this.findTargetsInSight(100);
		            if(targets.length>0){
		                this.orders = {type:"attack",to:targets[0],nextOrder:this.orders};
		            }
		            break;
		        case "attack":
		            if(this.orders.to.lifeCode == "dead" || !this.isValidTarget(this.orders.to)){
		                if (this.orders.nextOrder){
		                    this.orders = this.orders.nextOrder;
		                } else {
		                    this.orders = {type:"stand"};
		                }
		                return;
		            }
		            if ((Math.pow(this.orders.to.x-this.x,2) + Math.pow(this.orders.to.y-this.y,2))<Math.pow(this.sight,2)) {
		                //Turn towards target and then start attacking when within range of the target
		                var newDirection = findFiringAngle(this.orders.to,this,this.directions);
		                var difference = angleDiff(this.direction,newDirection,this.directions);
		                var turnAmount = this.turnSpeed*game.turnSpeedAdjustmentFactor;
		                if (Math.abs(difference)>turnAmount){
		                    this.direction = wrapDirection(this.direction + turnAmount*Math.abs(difference)/difference, this.directions);
		                    return;
		                } else {
		                    this.direction = newDirection;
		                    if(!this.reloadTimeLeft){
		                        this.reloadTimeLeft = bullets.list[this.weaponType].reloadTime;
		                        var angleRadians = -(Math.round(this.direction)/this.directions)*2*Math.PI ;
		                        var bulletX = this.x- (this.radius*Math.sin(angleRadians)/game.gridSize);
		                        var bulletY = this.y- (this.radius*Math.cos(angleRadians)/game.gridSize);
		                        var bullet = game.add({name:this.weaponType,type:"bullets",x:bulletX,y:bulletY, direction:newDirection, target:this.orders.to});
		                    }
		                }
		            } else {
		                var moving = this.moveTo(this.orders.to);
		                // Pathfinding couldn't find a path so stop
		                if(!moving){
		                    this.orders = {type:"stand"};
		                    return;
		                }
		            }
		            break;
		        case "patrol":
		            var targets = this.findTargetsInSight(1);
		            if(targets.length>0){
		                this.orders = {type:"attack",to:targets[0],nextOrder:this.orders};
		                return;
		            }
		            if ((Math.pow(this.orders.to.x-this.x,2) + Math.pow(this.orders.to.y-this.y,2))<Math.pow(this.radius*4/game.gridSize,2)) {
		                var to = this.orders.to;
		                this.orders.to = this.orders.from;
		                this.orders.from = to;
		            } else {
		                this.moveTo(this.orders.to);
		            }
		            break;
		        case "guard":
		            if(this.orders.to.lifeCode == "dead"){
		                if (this.orders.nextOrder){
		                    this.orders = this.orders.nextOrder;
		                } else {
		                    this.orders = {type:"stand"};
		                }
		                return;
		            }
		            if ((Math.pow(this.orders.to.x-this.x,2) + Math.pow(this.orders.to.y-this.y,2))<Math.pow(this.sight-2,2)) {
		                var targets = this.findTargetsInSight(1);
		                if(targets.length>0){
		                    this.orders = {type:"attack",to:targets[0],nextOrder:this.orders};
		                    return;
		                }
		            } else {
		                this.moveTo(this.orders.to);
		            }
		            break;

		    }
		},
		checkCollisionObjects:function(grid){
			// Calculate new position on present path
			var movement = this.speed*game.speedAdjustmentFactor;
			var angleRadians = -(Math.round(this.direction)/this.directions)*2*Math.PI;
			var newX = this.x - (movement*Math.sin(angleRadians));
			var newY = this.y - (movement*Math.cos(angleRadians));

			// List of objects that will collide after next movement step
			var collisionObjects = [];

			var x1 = Math.max(0,Math.floor(newX)-3);
			var x2 = Math.min(game.currentLevel.mapGridWidth-1,Math.floor(newX)+3);
			var y1 = Math.max(0,Math.floor(newY)-3);
			var y2 = Math.min(game.currentLevel.mapGridHeight-1,Math.floor(newY)+3);
			// Test grid upto 3 squares away
			for (var j=x1; j <= x2;j++){
				for(var i=y1; i<= y2 ;i++){
					if(grid[i][j]==1){ // grid square is obstructed
						if (Math.pow(j+0.5-newX,2)+Math.pow(i+0.5-newY,2) < Math.pow(this.radius/game.gridSize+0.1,2)){
							// Distance of obstructed grid from vehicle is less than hard collision threshold
			                collisionObjects.push({collisionType:"hard",with:{type:"wall",x:j+0.5,y:i+0.5}});
			            } else if (Math.pow(j+0.5-newX,2)+Math.pow(i+0.5-newY,2) < Math.pow(this.radius/game.gridSize+0.7,2)){
							// Distance of obstructed grid from vehicle is less than soft collision threshold
			                 collisionObjects.push({collisionType:"soft",with:{type:"wall",x:j+0.5,y:i+0.5}});
			            }
					}
				};
			};

			for (var i = game.vehicles.length - 1; i >= 0; i--){
				var vehicle = game.vehicles[i];
				// Test vehicles that are less than 3 squares away for collisions
				if (vehicle != this && Math.abs(vehicle.x-this.x)<3 && Math.abs(vehicle.y-this.y)<3){
					if (Math.pow(vehicle.x-newX,2) + Math.pow(vehicle.y-newY,2) < Math.pow((this.radius+vehicle.radius)/game.gridSize,2)){
						// Distance between vehicles is less than hard collision threshold (sum of vehicle radii)
			           	collisionObjects.push({collisionType:"hard",with:vehicle});
			        } else if (Math.pow(vehicle.x-newX,2) + Math.pow(vehicle.y-newY,2) < Math.pow((this.radius*1.5+vehicle.radius)/game.gridSize,2)){
						// Distance between vehicles is less than soft collision threshold (1.5 times vehicle radius + colliding vehicle radius)
						collisionObjects.push({collisionType:"soft",with:vehicle});
			        }
				}
			};

			return collisionObjects;
		},
		moveTo:function(destination){
		    if(!game.currentMapPassableGrid){
		        game.rebuildPassableGrid();
		    }

		    // First find path to destination
		    var start = [Math.floor(this.x),Math.floor(this.y)];
		    var end = [Math.floor(destination.x),Math.floor(destination.y)];

		    var grid = $.extend(true,[],game.currentMapPassableGrid);
		    // Allow destination to be "movable" so that algorithm can find a path
		    if(destination.type == "buildings"||destination.type == "terrain"){
		        grid[Math.floor(destination.y)][Math.floor(destination.x)] = 0;
		    }

		    var newDirection;
		    // if vehicle is outside map bounds, just go straight towards goal
		    if (start[1]<0 || start[1]>=game.currentLevel.mapGridHeight || start[0]<0 || start[0]>= game.currentLevel.mapGridWidth){
		        this.orders.path = [this,destination];
		        newDirection = findAngle(destination,this,this.directions);
		    } else {
		        //Use A* algorithm to try and find a path to the destination
		        this.orders.path = AStar(grid,start,end,'Euclidean');
		        if (this.orders.path.length>1){
		            var nextStep = {x:this.orders.path[1].x+0.5,y:this.orders.path[1].y+0.5};
		            newDirection = findAngle(nextStep,this,this.directions);
		        } else if(start[0]==end[0] && start[1] == end[1]){
		            // Reached destination grid square
		            this.orders.path = [this,destination];
		            newDirection = findAngle(destination,this,this.directions);
		        } else {
		            // There is no path
		            return false;
		        }
		    }

			// check if moving along current direction might cause collision..
			// If so, change newDirection
			var collisionObjects = this.checkCollisionObjects(grid);
			this.hardCollision = false;
			if (collisionObjects.length>0){
				this.colliding = true;

				// Create a force vector object that adds up repulsion from all colliding objects
				var forceVector = {x:0,y:0}
				// By default, the next step has a mild attraction force
				collisionObjects.push({collisionType:"attraction", with:{x:this.orders.path[1].x+0.5,y:this.orders.path[1].y+0.5}});
				for (var i = collisionObjects.length - 1; i >= 0; i--){
			        var collObject = collisionObjects[i];
			        var objectAngle = findAngle(collObject.with,this,this.directions);
					var objectAngleRadians = -(objectAngle/this.directions)*2*Math.PI ;
			        var forceMagnitude;
					switch(collObject.collisionType){
						case "hard":
							forceMagnitude = 2;
							this.hardCollision = true;
							break;
						case "soft":
							forceMagnitude = 1;
							break;
						case "attraction":
							forceMagnitude = -0.25;
							break;
					}

					forceVector.x += (forceMagnitude*Math.sin(objectAngleRadians));
					forceVector.y += (forceMagnitude*Math.cos(objectAngleRadians));
			    };
				// Find a new direction based on the force vector
				newDirection = findAngle(forceVector,{x:0,y:0},this.directions);
			} else {
				this.colliding = false;
			}

		    // Calculate turn amount for new direction
		    var difference = angleDiff(this.direction,newDirection,this.directions);
		    var turnAmount = this.turnSpeed*game.turnSpeedAdjustmentFactor;

			// Either turn or move forward based on collision type
			if (this.hardCollision){
				// In case of hard collision, do not move forward, just turn towards new direction
				if (Math.abs(difference)>turnAmount){
					this.direction = wrapDirection(this.direction+ turnAmount*Math.abs(difference)/difference, this.directions);
				}
			} else {
				// Otherwise, move forward, but keep turning as needed
				var movement = this.speed*game.speedAdjustmentFactor;
				var angleRadians = -(Math.round(this.direction)/this.directions)*2*Math.PI ;
				this.lastMovementX = - (movement*Math.sin(angleRadians));
				this.lastMovementY = - (movement*Math.cos(angleRadians));
				this.x = (this.x +this.lastMovementX);
				this.y = (this.y +this.lastMovementY);
				if (Math.abs(difference)>turnAmount){
					this.direction = wrapDirection(this.direction+ turnAmount*Math.abs(difference)/difference, this.directions);
				}
			}
			return true;
		},
		drawLifeBar:function(){
		    var x = this.drawingX;
		    var y = this.drawingY - 2*game.lifeBarHeight;
		    game.foregroundContext.fillStyle = (this.lifeCode == "healthy")?game.healthBarHealthyFillColor:game.healthBarDamagedFillColor;
		    game.foregroundContext.fillRect(x,y,this.pixelWidth*this.life/this.hitPoints,game.lifeBarHeight)
		    game.foregroundContext.strokeStyle = game.healthBarBorderColor;
		    game.foregroundContext.lineWidth = 1;
		    game.foregroundContext.strokeRect(x,y,this.pixelWidth,game.lifeBarHeight)
		},
		drawSelection:function(){
		    var x = this.drawingX + this.pixelOffsetX;
		    var y = this.drawingY + this.pixelOffsetY;
		    game.foregroundContext.strokeStyle = game.selectionBorderColor;
		    game.foregroundContext.lineWidth = 1;
		    game.foregroundContext.beginPath();
		    game.foregroundContext.arc(x,y,this.radius,0,Math.PI*2,false);
		    game.foregroundContext.fillStyle = game.selectionFillColor;
		    game.foregroundContext.fill();
		    game.foregroundContext.stroke();
		},
		draw:function(){
		    var x = (this.x*game.gridSize)-game.offsetX- this.pixelOffsetX + this.lastMovementX*game.drawingInterpolationFactor*game.gridSize;
		    var y = (this.y*game.gridSize)-game.offsetY- this.pixelOffsetY + this.lastMovementY*game.drawingInterpolationFactor*game.gridSize;
		    this.drawingX = x;
		    this.drawingY = y;
		    if (this.selected){
		        this.drawSelection();
		        this.drawLifeBar();
		    }
		    var colorIndex = (this.team == "blue")?0:1;
		    var colorOffset = colorIndex*this.pixelHeight;
		    game.foregroundContext.drawImage(this.spriteSheet, this.imageOffset*this.pixelWidth,colorOffset, this.pixelWidth,this.pixelHeight,x,y,this.pixelWidth,this.pixelHeight);

		    // Draw glow while teleporting in
		    if(this.brightness){
		        game.foregroundContext.beginPath();
		        game.foregroundContext.arc(x+ this.pixelOffsetX, y+this.pixelOffsetY, this.radius, 0 , Math.PI*2,false);
		        game.foregroundContext.fillStyle = 'rgba(255,255,255,'+this.brightness+')';
		        game.foregroundContext.fill();
		    }

		}

    },
    load:loadItem,
    add:addItem,
}


text:
module Stats
  class RequestForFurtherInfoDataGenerator < BaseDataGenerator
    private

    def report_types
      {
        'claims_authorised_after_info_requested' => 'requested',
        'claims_authorised_without_further_info' => 'not requested'
      }
    end
  end
end


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

using System.Windows.Forms;
using BondTech.HotkeyManagement.Win;
using Microsoft.VisualBasic; // Add a reference to Microsoft.VisualBasic.

namespace GlobalShortcutCS.Win
{
    public partial class AppStarter : Form
    {
        internal HotKeyManager MyHotKeyManager;
        private bool LogEvent = true;

        #region **HotKeys
        GlobalHotKey ghkNotepad = new GlobalHotKey("ghkNotepad", Modifiers.Control | Modifiers.Shift, Keys.N);
        GlobalHotKey ghkWordpad = new GlobalHotKey("ghkWordpad", Modifiers.Control | Modifiers.Shift, Keys.W);
        GlobalHotKey ghkCalc = new GlobalHotKey("ghkCalc", Modifiers.Control | Modifiers.Alt, Keys.C);
        GlobalHotKey ghkTaskMan = new GlobalHotKey("ghkTaskMan", Modifiers.Control | Modifiers.Shift, Keys.T);
        GlobalHotKey ghkUninstall = new GlobalHotKey("ghkUninstall", Modifiers.Control | Modifiers.Alt, Keys.U);
        GlobalHotKey ghkCustom = new GlobalHotKey("ghkCustom", Modifiers.Shift | Modifiers.Control | Modifiers.Alt, Keys.T);

        LocalHotKey lhkNewHotkey = new LocalHotKey("lhkNewHotKey", Keys.A);
        LocalHotKey lhkNewLocalKey = new LocalHotKey("lhkNewLocalKey", Modifiers.Control, Keys.A);
        LocalHotKey lhkCopyLog = new LocalHotKey("lhkCopyLog", Keys.C);
        LocalHotKey lhkClearLog = new LocalHotKey("lhkClearLog", Keys.Escape);
        LocalHotKey lhkDisableLog = new LocalHotKey("lhkDisableLog", Modifiers.Alt, Keys.D);

        ChordHotKey chotCmd = new ChordHotKey("chotCmd", Modifiers.Alt, Keys.C, Modifiers.Alt, Keys.P);
        ChordHotKey chotPowerShell = new ChordHotKey("chotPowerShell", Modifiers.Control, Keys.P, Modifiers.None, Keys.D1);
        ChordHotKey chotIExplore = new ChordHotKey("chotIExplore", Modifiers.Control, Keys.I, Modifiers.Control, Keys.E);
        ChordHotKey chotRegEdit = new ChordHotKey("chotRegEdit", Modifiers.Alt | Modifiers.Control, Keys.R, Modifiers.None, Keys.E);
        ChordHotKey chotCharMap = new ChordHotKey("chotCharMap", Modifiers.Shift, Keys.C, Modifiers.None, Keys.M);
        #endregion

        public AppStarter()
        {
            InitializeComponent();
            MyHotKeyManager = new HotKeyManager(this);
            MyHotKeyManager.GlobalHotKeyPressed += new GlobalHotKeyEventHandler(MyHotKeyManager_GlobalHotKeyPressed);
            MyHotKeyManager.LocalHotKeyPressed += new LocalHotKeyEventHandler(MyHotKeyManager_LocalHotKeyPressed);
            MyHotKeyManager.ChordStarted += new PreChordHotkeyEventHandler(MyHotKeyManager_ChordStarted);
            MyHotKeyManager.ChordPressed += new ChordHotKeyEventHandler(MyHotKeyManager_ChordPressed);
            btnAddHotKey.Click += delegate { AddNewHotKey(); };
            RegisterHotKeys();
            MyHotKeyManager.DisableOnManagerFormInactive = true;
        }

        void MyHotKeyManager_ChordStarted(object sender, PreChordHotKeyEventArgs e)
        {
            LogEvents("Chord Started... (" + e.Info() + ") waiting for the second key of chord.");
        }

        void MyHotKeyManager_ChordPressed(object sender, ChordHotKeyEventArgs e)
        {
            System.Diagnostics.Process.Start((e.HotKey.Tag as string));
            LogEvents(e.HotKey);
        }

        void MyHotKeyManager_LocalHotKeyPressed(object sender, LocalHotKeyEventArgs e)
        {
            switch (e.HotKey.Name.ToLower())
            {
                case "lhkcopylog":
                    if (!string.IsNullOrEmpty(txtLog.Text)) { Clipboard.SetText(txtLog.Text); }
                    break;

                case "lhkclearlog":
                    txtLog.Clear();
                    return;

                case "lhkdisablelog":
                    LogEvent = !LogEvent;
                    break;

                case "lhknewlocalkey":
                    NewLocal LocalForm = new NewLocal();
                    LocalForm.MainForm = this;
                    LocalForm.ShowDialog();
                    break;

                default:
                    if (e.HotKey.Tag != null) System.Diagnostics.Process.Start((string)e.HotKey.Tag);
                    break;
            }
            LogEvents(e.HotKey.FullInfo());
        }

        void MyHotKeyManager_GlobalHotKeyPressed(object sender, GlobalHotKeyEventArgs e)
        {
            if (e.HotKey.Name.ToLower() == "ghkcustom") { HandleCustomHotKey(); LogEvents(e.HotKey); return; }
            System.Diagnostics.Process.Start((e.HotKey.Tag as string));
            LogEvents(e.HotKey);
        }

        void AddNewHotKey()
        {
            NewKey NewShortcut = new NewKey();
            NewShortcut.MainForm = this;
            NewShortcut.ShowDialog();
        }

        private void LogEvents(string text)
        {
            if (LogEvent)
            {
                txtLog.Text += text + Environment.NewLine;
                txtLog.Select(txtLog.Text.Length, 0);
                txtLog.ScrollToCaret();
            }
        }

        internal void LogEvents(GlobalHotKey HotKey)
        {
            if (LogEvent)
            {
                txtLog.Text += string.Format("{0} : Hotkey Processed! Name: {1}; {2}",
                                             HotKey.Name, HotKey.FullInfo(), Environment.NewLine);
                txtLog.Select(txtLog.Text.Length, 0);
                txtLog.ScrollToCaret();
            }
        }

        internal void LogEvents(ChordHotKey HotKey)
        {
            if (LogEvent)
            {
                txtLog.Text += string.Format("{0} : Hotkey Processed! Name: {1}; {2}",
                                             HotKey.Name, HotKey.FullInfo(), Environment.NewLine);
                txtLog.Select(txtLog.Text.Length, 0);
                txtLog.ScrollToCaret();
            }
        }

        void RegisterHotKeys()
        {
            ghkNotepad.Enabled = chkNotepad.Checked;
            ghkWordpad.Enabled = chkWordpad.Checked;
            ghkCalc.Enabled = chkCalculator.Checked;
            ghkTaskMan.Enabled = chkTaskManager.Checked;
            ghkUninstall.Enabled = chkUninstall.Checked;
            ghkCustom.Enabled = chkCustomEnabled.Checked;

            lhkNewHotkey.Enabled = chkNewHotKey.Checked;
            lhkNewLocalKey.Enabled = chkNewLocal.Checked;
            lhkCopyLog.Enabled = chkCopyClipboard.Checked;
            lhkClearLog.Enabled = chkCopyClipboard.Checked;
            lhkDisableLog.Enabled = chkDisableLogging.Checked;

            //Store an information in the tag of the hotkeys.
            ghkNotepad.Tag = "Notepad.exe";
            ghkWordpad.Tag = "Wordpad.exe";
            ghkCalc.Tag = "Calc.exe";
            ghkTaskMan.Tag = "Taskmgr.exe";
            ghkUninstall.Tag = "appwiz.cpl";

            chotCmd.Tag = "cmd.exe";
            chotPowerShell.Tag = "powershell.exe";
            chotIExplore.Tag = "iexplore.exe";
            chotRegEdit.Tag = "regedit.exe";
            chotCharMap.Tag = "charmap.exe";

            lhkNewHotkey.HotKeyPressed += delegate { AddNewHotKey(); };

            //Now, we'll add the Keys to the HotKeyManager
            MyHotKeyManager.AddGlobalHotKey(ghkNotepad);
            MyHotKeyManager.AddGlobalHotKey(ghkWordpad);
            MyHotKeyManager.AddGlobalHotKey(ghkCalc);
            MyHotKeyManager.AddGlobalHotKey(ghkTaskMan);
            MyHotKeyManager.AddGlobalHotKey(ghkUninstall);
            MyHotKeyManager.AddGlobalHotKey(ghkCustom);
            //Add the Local HotKeys.
            MyHotKeyManager.AddLocalHotKey(lhkNewHotkey);
            MyHotKeyManager.AddLocalHotKey(lhkNewLocalKey);
            MyHotKeyManager.AddLocalHotKey(lhkCopyLog);
            MyHotKeyManager.AddLocalHotKey(lhkClearLog);
            MyHotKeyManager.AddLocalHotKey(lhkDisableLog);
            //Add the Chord HotKeys.
            MyHotKeyManager.AddChordHotKey(chotCmd);
            MyHotKeyManager.AddChordHotKey(chotPowerShell);
            MyHotKeyManager.AddChordHotKey(chotIExplore);
            MyHotKeyManager.AddChordHotKey(chotRegEdit);
            MyHotKeyManager.AddChordHotKey(chotCharMap);
        }

        void HandleCustomHotKey()
        {
            if (optVisibility.Checked) // Visibility is to be toggled.
            {
                if (this.Visible)   // The form is already visible.
                {
                    this.Hide();
                }
                else //The form is hidden.
                {
                    this.Show();
                }
            }
            else     // A message is to be shown. Since there are only two radio buttons on the form.
            {
                if (MessageBox.Show("You have pressed the global shortcut. :)\nWould you like to visit my page now?",
                    "Global Shortcut Example", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start("http://www.codeproject.com/bonded");
                }
            }
        }

        #region **CheckBox Events.
        private void chkNotepad_CheckedChanged(object sender, EventArgs e)
        {
            ghkNotepad.Enabled = chkNotepad.Checked;
            LogEvents(ghkNotepad);
        }

        private void chkWordpad_CheckedChanged(object sender, EventArgs e)
        {
            ghkWordpad.Enabled = chkWordpad.Checked;
            LogEvents(ghkWordpad);
        }

        private void chkCalculator_CheckedChanged(object sender, EventArgs e)
        {
            ghkCalc.Enabled = chkCalculator.Checked;
            LogEvents(ghkCalc);
        }

        private void chkTaskManager_CheckedChanged(object sender, EventArgs e)
        {
            ghkTaskMan.Enabled = chkTaskManager.Checked;
            LogEvents(ghkTaskMan);
        }

        private void chkUninstall_CheckedChanged(object sender, EventArgs e)
        {
            ghkUninstall.Enabled = chkUninstall.Checked;
            LogEvents(ghkUninstall);
        }

        private void chkNewHotKey_CheckedChanged(object sender, EventArgs e)
        {
            lhkNewHotkey.Enabled = (sender as CheckBox).Checked;
            LogEvents(lhkNewHotkey.FullInfo());
        }

        private void chkNewLocal_CheckedChanged(object sender, EventArgs e)
        {
            lhkNewLocalKey.Enabled = (sender as CheckBox).Checked;
            LogEvents(lhkNewLocalKey.FullInfo());
            //Since LocalHotKkeys can be converted to GlobalHotKeys
            LogEvents((GlobalHotKey)lhkNewLocalKey);
        }

        private void chkCopyClipboard_CheckedChanged(object sender, EventArgs e)
        {
            lhkCopyLog.Enabled = chkCopyClipboard.Checked;
            LogEvents(lhkCopyLog.FullInfo());
        }

        private void chkClearLog_CheckedChanged(object sender, EventArgs e)
        {
            lhkClearLog.Enabled = chkClearLog.Checked;
            LogEvents(lhkClearLog.FullInfo());
        }

        private void chkDisableLogging_CheckedChanged(object sender, EventArgs e)
        {
            lhkDisableLog.Enabled = chkDisableLogging.Checked;
            LogEvents(lhkDisableLog.FullInfo());
        }

        private void chkCustomEnabled_CheckedChanged(object sender, EventArgs e)
        {
            ghkCustom.Enabled = chkCustomEnabled.Checked;
            LogEvents(ghkCustom);
        }

        private void chkCmd_CheckedChanged(object sender, EventArgs e)
        {
            chotCmd.Enabled = chkCmd.Checked;
            LogEvents(chotCmd);
        }

        private void chkPowerShell_CheckedChanged(object sender, EventArgs e)
        {
            chotPowerShell.Enabled = chkPowerShell.Checked;
            LogEvents(chotPowerShell);
        }

        private void chkIExplore_CheckedChanged(object sender, EventArgs e)
        {
            chotIExplore.Enabled = chkIExplore.Checked;
            LogEvents(chotIExplore);
        }

        private void chkRegEdit_CheckedChanged(object sender, EventArgs e)
        {
            chotRegEdit.Enabled = chkRegEdit.Checked;
            LogEvents(chotRegEdit);
        }

        private void chkCharMap_CheckedChanged(object sender, EventArgs e)
        {
            chotCharMap.Enabled = chkCharMap.Checked;
            LogEvents(chotCharMap);
        }
        #endregion

        private void btnModify_Click(object sender, EventArgs e)
        {
            lblShortcut.Text = SetKey.ChangeShortcut(lblShortcut.Text);
            UpdateCustomShortcut(lblShortcut.Text);
        }

        void UpdateCustomShortcut(string text)
        {
            LogEvents("Attempting to update custom shortcut to: " + text);

            //Will help determine if the shortcut has any modifier.
            bool HasAlt = false; bool HasControl = false; bool HasShift = false;

            Modifiers Modifier = Modifiers.None;		//Variable to contain modifier.
            Keys key = 0;           //The key to register.

            string[] result;
            string[] separators = new string[] { " + " };
            result = text.Split(separators, StringSplitOptions.RemoveEmptyEntries);

            //Iterate through the keys and find the modifier.
            foreach (string entry in result)
            {
                //Find the Control Key.
                if (entry.Trim() == Keys.Control.ToString())
                {
                    HasControl = true;
                }
                //Find the Alt key.
                if (entry.Trim() == Keys.Alt.ToString())
                {
                    HasAlt = true;
                }
                //Find the Shift key.
                if (entry.Trim() == Keys.Shift.ToString())
                {
                    HasShift = true;
                }
            }

            if (HasControl) { Modifier |= Modifiers.Control; }
            if (HasAlt) { Modifier |= Modifiers.Alt; }
            if (HasShift) { Modifier |= Modifiers.Shift; }

            //Get the last key in the shortcut
            KeysConverter keyconverter = new KeysConverter();
            key = (Keys)keyconverter.ConvertFrom(result.GetValue(result.Length - 1));

            ghkCustom.Enabled = chkCustomEnabled.Checked;
            ghkCustom.Key = key;
            ghkCustom.Modifier = Modifier;

            LogEvents(string.Format("Custom shortcut updated. \n Key:{0}, Modifier:{1}", ghkCustom.Key, ghkCustom.Modifier));
        }

        private void btnEnumerate_Click(object sender, EventArgs e)
        {
            string message = "Global HotKeys.\n";

            foreach (GlobalHotKey gh in MyHotKeyManager.EnumerateGlobalHotKeys)
            {
                message += string.Format("{0}{1}", Environment.NewLine, gh.FullInfo());
            }

            message += "\n\nLocal HotKeys.\n";

            foreach (LocalHotKey lh in MyHotKeyManager.EnumerateLocalHotKeys)
            {
                message += string.Format("{0}{1}", Environment.NewLine, lh.FullInfo());
            }

            message += "\n\nChord HotKeys.\n";

            foreach (ChordHotKey ch in MyHotKeyManager.EnumerateChordHotKeys)
            {
                message += string.Format("{0}{1}", Environment.NewLine, ch.FullInfo());
            }

            MessageBox.Show(message, "All HotKeys registered by this app.", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        private void btnSimulate_Click(object sender, EventArgs e)
        {
            MyHotKeyManager.SimulateKeyDown(Keys.Control);
            MyHotKeyManager.SimulateKeyPress(Keys.A);
            MyHotKeyManager.SimulateKeyUp(Keys.Control);
        }

        static bool KeysToggle;
        private void btnToggle_Click(object sender, EventArgs e)
        {
            KeysToggle = !KeysToggle;

            //Here we disable the keys A,E,I,O,U and any other key pressed while the Shift Key is held down
            //by hooking our class to listen to all keyboard messages.
            //Then we handle the keys we want by setting Handled to true.

            if (KeysToggle)
            {
                if (!MyHotKeyManager.KeyboardHooked) MyHotKeyManager.KeyBoardHook();

                MyHotKeyManager.KeyBoardKeyDown += keyboardhandler;

                LogEvents("Keys A, E , I , O and U disabled on the keyboard.");
                LogEvents("The Shift key disables all keys.");
                btnToggleKeys.Text = "Enable Keys";
            }
            else
            {
                MyHotKeyManager.KeyBoardKeyDown -= keyboardhandler;
                MyHotKeyManager.KeyBoardUnHook();
                LogEvents("All keys enabled on the keyboard.");
                btnToggleKeys.Text = "Disable Keys";
            }
        }

        KeyboardHookEventHandler keyboardhandler = (sender, handler) =>
        {
            if (handler.Modifier == KeyboardHookEventArgs.modifiers.Shift)
            { handler.Handled = true; }

            switch (handler.Key)
            {
                case Keys.A:
                case Keys.E:
                case Keys.I:
                case Keys.O:
                case Keys.U:
                    handler.Handled = true;
                    return;
            }
        };
    }
}


text:
<?php
declare(strict_types=1);

namespace Gdbots\Tests\Pbj\Fixtures\Enum;

enum IntEnum: int
{
    case UNKNOWN = 0;
    case A_INT = 1;
}


text:
title:  Pengendalian Diri
date:   11/01/2018
---

Bacalah ayat-ayat berikut. Apakah yang ayat-ayat tersebut katakan yang dapat dan seharusnya menolong kita memahami bagaimana orang-orang, kaya atau miskin, bisa melindungi diri mereka sendiri dari bahaya yang keserakahan, ketamakan, dan cinta uang dan hal-hal materi bisa sajikan kepada orang Kristen?

`Kis 24:24–26`

`Gal. 5:22–25`

`2 Ptr. 1:5–9`

Ayat-ayat ini begitu kaya dan penuh dengan perintah Ilahi tentang bagaimana kita harus hidup. Tetapi perhatikan satu benang merah: Pengendalian diri. Sifat ini bisa menjadi sangat sulit ketika tiba kepada keserakahan, ketamakan, dan keinginan untuk memiliki harta benda. Hanya melalui pengendalian diri, pertama pikiran kita dan selanjutnya tindakan kita, kita bisa dilindungi dari bahaya-bahaya terhadap hal-hal yang telah kita bicarakan.

Kita bisa melatih pengendalian itu hanya kepada tingkat penyerahan diri kita sendiri kepada kuasa Tuhan. Tak satu pun dari kita, dengan kuasa kita sendiri, bisa mengalahkan sifat-sifat dosa ini, terutama jika mereka telah lama diperkembang dan dimanja. Kita benar-benar membutuhkan kerja supernatural Roh Suci di dalam hidup kita jika kita mau memperoleh kemenangan atas penipuan-penipuan yang kuat ini. "Pencobaan-pencobaan yang kamu alami ialah pencobaan-pencobaan biasa, yang tidak melebihi kekuatan manusia. Sebab Allah setia dan karena itu Ia tidak akan membiarkan kamu dicobai melampaui kekuatanmu. Pada waktu kamu dicobai. Ia akan memberikan kepadamu jalan keluar, sehingga kamu dapat menanggungnya" (1 Kor. 10:13).

`Bacalah kembali 2 Petrus 1:5–9. Apakah jalan yang Petrus tunjuk Apakah langkah-langkahnya, dan bagaimankah kita bisa belajar mengikutinya, khususnya di dalam pergumulan kita melawan keserakahan dan ketamakan?`


text:
@interface ViewController ()<NSCacheDelegate>

@property (nonatomic, strong)NSCache *cache;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    self.cache = [[NSCache alloc] init];
    self.cache.name = @"test";
    self.cache.delegate = self;

    for (int i = 1; i <= 6 ; i++) {
        [self.cache setObject:[UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",i]] forKey:[NSString stringWithFormat:@"%d.jpg",i]];
    }

}

- (void)cache:(NSCache *)cache willEvictObject:(id)obj{

    NSLog(@"当内存达到了一定程度,NSCache会自己释放内存,在这里可以操作CoreData等影响IO操作");

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
// The MIT License (MIT)
//
// Copyright (c) 2014-2017, Institute for Software & Systems Engineering
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

namespace Tests.Analysis.Ordering
{
	using System.Linq;
	using SafetySharp.Analysis;
	using SafetySharp.Modeling;
	using ISSE.SafetyChecking.Modeling;
	using ISSE.SafetyChecking.Formula;
	using ISSE.SafetyChecking.MinimalCriticalSetAnalysis;
	using Shouldly;

	internal class StrictlyPrecedesAll : AnalysisTestObject
	{
		protected override void Check()
		{
			var c = new C();
			var result = AnalyzeOrder(c.X == 6, c);

			result.SafetyAnalysisResults.MinimalCriticalSets.Count.ShouldBe(1);
			ShouldContain(result.SafetyAnalysisResults.MinimalCriticalSets, c.F1, c.F2, c.F3);
			var relationships = result.OrderRelationships[result.SafetyAnalysisResults.MinimalCriticalSets.Single()].ToArray();
			relationships.Length.ShouldBe(3);

			ShouldContain(relationships, c.F1, c.F2, OrderRelationshipKind.StrictlyPrecedes);
			ShouldContain(relationships, c.F1, c.F3, OrderRelationshipKind.StrictlyPrecedes);
			ShouldContain(relationships, c.F2, c.F3, OrderRelationshipKind.StrictlyPrecedes);
		}

		private class C : Component
		{
			public readonly Fault F1 = new TransientFault();
			public readonly Fault F2 = new TransientFault();
			public readonly Fault F3 = new TransientFault();
			public int X;
			public virtual int X1 => 0;
			public virtual int X2 => 0;
			public virtual int X3 => 0;

			public override void Update()
			{
				if (X == 0 && X1 == 2)
					X = 2;
				else if (X == 2 && X2 == 2)
					X = 4;
				else if (X == 4 && X3 == 2)
					X = 6;
			}

			[FaultEffect(Fault = nameof(F1))]
			private class E1 : C
			{
				public override int X1 => 2;
			}

			[FaultEffect(Fault = nameof(F2))]
			private class E2 : C
			{
				public override int X2 => 2;
			}

			[FaultEffect(Fault = nameof(F3))]
			private class E3 : C
			{
				public override int X3 => 2;
			}
		}
	}
}


text:
from setuptools import setup
from setuptools import find_packages
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext

setup(
    name='coinstac',
    version='0.3.0',
    description='Python utility library for coinstac',
    url='https://github.com/trendscenter/coinstac/coinstac-utilities/coinstac-python',
    author='Ross Kelly',
    author_email='rkelly30@gsu.edu',
    license='MIT',
    packages=['coinstac'],
    install_requires=[
       "asyncio",
       "websockets",
    ],

    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],
)