text:
import six
import unittest
from mock import Mock, patch

from zope.interface import directlyProvides

from twisted.trial import unittest
from twisted.internet.defer import ensureDeferred, succeed

import txtorcon

if six.PY2:
    raise unittest.skip()

class Python3ControllerTests(unittest.TestCase):

    def setUp(self):
        reactor = Mock()
        proto = Mock()
        directlyProvides(proto, txtorcon.ITorControlProtocol)
        self.cfg = Mock()
        self.tor = txtorcon.Tor(reactor, proto, _tor_config=self.cfg)

    def test_authentication(self):
        return ensureDeferred(self.async_test_authentication())

    async def async_test_authentication(self):
        add = patch.object(self.tor, "add_onion_authentication", return_value=succeed(None))
        remove = patch.object(self.tor, "remove_onion_authentication", return_value=succeed(None))
        with add as adder, remove as remover:
            async with self.tor.onion_authentication("timaq4ygg2iegci7.onion", "seekrit token"):
                self.assertTrue(adder.called)
                self.assertFalse(remover.called)
            self.assertTrue(remover.called)


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

namespace UnityEngine.UI
{
    public static class LayoutUtility
    {
        public static float GetMinSize(RectTransform rect, int axis)
        {
            if (axis == 0)
                return GetMinWidth(rect);
            return GetMinHeight(rect);
        }

        public static float GetPreferredSize(RectTransform rect, int axis)
        {
            if (axis == 0)
                return GetPreferredWidth(rect);
            return GetPreferredHeight(rect);
        }

        public static float GetFlexibleSize(RectTransform rect, int axis)
        {
            if (axis == 0)
                return GetFlexibleWidth(rect);
            return GetFlexibleHeight(rect);
        }

        public static float GetMinWidth(RectTransform rect)
        {
            return GetLayoutProperty(rect, e => e.minWidth, 0);
        }

        public static float GetPreferredWidth(RectTransform rect)
        {
            return Mathf.Max(GetLayoutProperty(rect, e => e.minWidth, 0), GetLayoutProperty(rect, e => e.preferredWidth, 0));
        }

        public static float GetFlexibleWidth(RectTransform rect)
        {
            return GetLayoutProperty(rect, e => e.flexibleWidth, 0);
        }

        public static float GetMinHeight(RectTransform rect)
        {
            return GetLayoutProperty(rect, e => e.minHeight, 0);
        }

        public static float GetPreferredHeight(RectTransform rect)
        {
            return Mathf.Max(GetLayoutProperty(rect, e => e.minHeight, 0), GetLayoutProperty(rect, e => e.preferredHeight, 0));
        }

        public static float GetFlexibleHeight(RectTransform rect)
        {
            return GetLayoutProperty(rect, e => e.flexibleHeight, 0);
        }

        public static float GetLayoutProperty(RectTransform rect, System.Func<ILayoutElement, float> property, float defaultValue)
        {
            ILayoutElement dummy;
            return GetLayoutProperty(rect, property, defaultValue, out dummy);
        }

        public static float GetLayoutProperty(RectTransform rect, System.Func<ILayoutElement, float> property, float defaultValue, out ILayoutElement source)
        {
            source = null;
            if (rect == null)
                return 0;
            float min = defaultValue;
            int maxPriority = System.Int32.MinValue;
            var components = ComponentListPool.Get();
            rect.GetComponents(typeof(ILayoutElement), components);

            for (int i = 0; i < components.Count; i++)
            {
                var layoutComp = components[i] as ILayoutElement;
                if (layoutComp is Behaviour && !(layoutComp as Behaviour).enabled)
                    continue;

                int priority = layoutComp.layoutPriority;
                // If this layout components has lower priority than a previously used, ignore it.
                if (priority < maxPriority)
                    continue;
                float prop = property(layoutComp);
                // If this layout property is set to a negative value, it means it should be ignored.
                if (prop < 0)
                    continue;

                // If this layout component has higher priority than all previous ones,
                // overwrite with this one's value.
                if (priority > maxPriority)
                {
                    min = prop;
                    maxPriority = priority;
                    source = layoutComp;
                }
                // If the layout component has the same priority as a previously used,
                // use the largest of the values with the same priority.
                else if (prop > min)
                {
                    min = prop;
                    source = layoutComp;
                }
            }

            ComponentListPool.Release(components);
            return min;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
export default function print() {
  console.log('I got called from print.js');
}


text:
This package contains public API and introduction

JDBM intro

	Key-Value databases have got a lot of attention recently, but their history is much older. GDBM (predecessor of JDBM) started
	in 1970 and was called 'pre rational' database. JDBM is under development since 2000. Version 1.0 was in production
	since 2005 with only a few bugs reported. Version 2.0 adds some features on top of JDBM (most importantly java.util.Map views)

	JDBM 2.0 goal is to provide simple and fast persistence. It is very simple to use, it has minimal overhead and standalone
	JAR takes only 130KB. It is excelent choice for Swing application or Android phone. JDBM also handles huge datasets well
	and can be used for data processing (author is using it to process astronomical data).
	The source code is not complicated; it is well readabable and can also be used for teaching.
	On the other hand, it does not have some important features (concurrent scalability, multiple transaction, annotations,
	clustering...), which is the reason why it is so simple and small. For example, multiple transaction would introduce a new dimension  of problems, such as concurrent updates, optimistic/pesimistic record locking, etc.
	JDBM does not try to replicate Valdemort, HBase or other more advanced Key Value databases.

JDBM2 is

Not a SQL database

	JDBM2 is more low level. With this comes great power (speed, resource usage, no ORM)
	but also big responsibility. You are responsible for data integrity, partioning, typing etc...
	Excelent embedded SQL database is H2 (in fact it is faster than JDBM2 in many cases).

Not an Object database

	The fact that JDBM2 uses serialization may give you a false sense of security. It does not
	magically split a huge object graph into smaller pieces, nor does it handle duplicates.
	With JDBM you may easily end up with single instance being persisted in several copies over a datastore.
	An object database would do this magic for you as it traverses object graph references and
	makes sure there are no duplicates in a datastore. Have look at
	NeoDatis or DB4o

Not at enterprise level

	JDBM2 codebase is propably very good and without bugs, but it is a community project. You may easily endup without
	support. For something more enterprisey have a look at
	Berkley DB Java Edition from Oracle. BDB has more
	features, it is more robust, it has better documentation, bigger overhead and comes with a pricetag.

Not distributed

	Key Value databases are associated with distributed stores, map reduce etc. JDBM is not distributed, it runs on single computer only.
	It does not even have a network interface and can not act as a server.
	You would be propably looking for Valdemort.

JDBM2 overview

	JDBM2 has some helpfull features to make it easier to use. It also brings it closer to SQL and helps with data
	integrity checks and data queries.

Low level page store

	This is Key-Value database in its literal mean. Key is a record identifier number (recid) which points to a location in file.
	Since recid is a physical pointer, new key values must be assgned by store (wherever the free space is found).
	Value can be any object, serializable to a byte[] array. Page store also provides transaction and cache.

Named objects

	Number as an identifier is not very practical. So there is a table that translates Strings to recid. This is recommended
	approach for persisting singletons.

Primary maps

	{@link jdbm.PrimaryStoreMap}, 	{@link jdbm.PrimaryTreeMap} and {@link jdbm.PrimaryHashMap} implements java.util.map interface
	from Java Collections. But they use page store for persistence. So you can create HashMap with bilions of items and worry only about the commits.

Secondary maps

	Secondary maps (indexes) provide side information and associations for the primary map. For example, if there is a Person class persisted in the primary map,
	the secondary maps can provide fast lookup by name, address, age... The secondary maps are 'views' to the primary map and are readonly.
	They are updated by the primary map automatically.

Cache

	JDBM has object instance cache. This reduces the serialization time and disk IO. By default JDBM uses SoftReference cache. If JVM have
	less then 50MB heap space available, MRU (Most Recently Used) fixed size cache is used instead.

Transactions

	JDBM provides transactions with commit and rollback. The transaction mechanism is safe and tested (in usage for the last 5 years). JDBM allows only
	single concurrent transactions and there are no problems with concurrent updates and locking.

10 things to keep in mind

Uncommited data are stored in memory, and if you get OutOfMemoryException you have to make commits more
		frequently.

Keys and values are stored as part of the index nodes. They are instanciated each time the index is searched.
		If you have larger values (>512 bytes), these may hurt performance and cause OutOfMemoryException
		In this case use  {@link jdbm.helper.StoreReference} or {@link jdbm.PrimaryStoreMap} to store values outside of the index.

If you run into performance problems, use the profiler rather then asking for it over the internet.

JDBM caches returned object instances. If you modify an object (like set new name on a person),
		next time RecordManager may return the object with this modification.

Iteration over Maps is not guaranteed if there are changes
		(for example adding a new entry while iterating). There is no fail fast policy yet.
		So all iterations over Maps should be synchronized on RecordManager.

More memory means better performance; use -Xmx000m generously. JDBM has good SoftReference cache.

SoftReference cache may be blocking some memory for other tasks. The memory is released automatically, but it may take longer then you expect.
		Consider clearing the cache manually with RecordManager.clearCache() before starting a new type
		of task.

It is safe not to close the db before exiting, but if you that there will be a long cleanup upon the next start.

JDBM may have problem reclaiming free space after many records are delete/updated. You may want to run
		RecordManager.defrag() from time to time.

A Key-Value db does not support N-M relations easily. It takes a lot of care to handle them correctly.


text:
package mock_gpio

import (
	. "github.com/alext/gpio"
	gomock "github.com/golang/mock/gomock"
)

// Mock of Pin interface
type MockPin struct {
	ctrl     *gomock.Controller
	recorder *_MockPinRecorder
}

// Recorder for MockPin (not exported)
type _MockPinRecorder struct {
	mock *MockPin
}

func NewMockPin(ctrl *gomock.Controller) *MockPin {
	mock := &MockPin{ctrl: ctrl}
	mock.recorder = &_MockPinRecorder{mock}
	return mock
}

func (_m *MockPin) EXPECT() *_MockPinRecorder {
	return _m.recorder
}

func (_m *MockPin) Mode() (Mode, error) {
	ret := _m.ctrl.Call(_m, "Mode")
	ret0, _ := ret[0].(Mode)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func (_mr *_MockPinRecorder) Mode() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Mode")
}

func (_m *MockPin) SetMode(_param0 Mode) error {
	ret := _m.ctrl.Call(_m, "SetMode", _param0)
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) SetMode(arg0 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "SetMode", arg0)
}

func (_m *MockPin) Set() error {
	ret := _m.ctrl.Call(_m, "Set")
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) Set() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Set")
}

func (_m *MockPin) Clear() error {
	ret := _m.ctrl.Call(_m, "Clear")
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) Clear() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Clear")
}

func (_m *MockPin) Close() error {
	ret := _m.ctrl.Call(_m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) Close() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Close")
}

func (_m *MockPin) Get() (bool, error) {
	ret := _m.ctrl.Call(_m, "Get")
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func (_mr *_MockPinRecorder) Get() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Get")
}

func (_m *MockPin) BeginWatch(_param0 Edge, _param1 IRQEvent) error {
	ret := _m.ctrl.Call(_m, "BeginWatch", _param0, _param1)
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) BeginWatch(arg0, arg1 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "BeginWatch", arg0, arg1)
}

func (_m *MockPin) EndWatch() error {
	ret := _m.ctrl.Call(_m, "EndWatch")
	ret0, _ := ret[0].(error)
	return ret0
}

func (_mr *_MockPinRecorder) EndWatch() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "EndWatch")
}

func (_m *MockPin) Wait(_param0 bool) {
	_m.ctrl.Call(_m, "Wait", _param0)
}

func (_mr *_MockPinRecorder) Wait(arg0 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Wait", arg0)
}


text:
@class TLPCloudModel;

@interface TLPLevelHandler : NSObject

@property NSMutableArray *clouds;

- (id)initWithFileName:(NSString*)filename;

@end


text:
Pokémon bot for Showdown.

Formerly Tauros, the RBY IRC battling bot (never finished).


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<title>Speed Test</title>
<meta name="description" content="Speed Test is free and is the only real maximum Bandwidth meter.">
<meta name="Keywords" content="speed test, bandwidth test, bandwidth meter, transfer speeds, throughput calculator, computer testing">
<meta name="verify-v1" content="M3cCMyTLmQcxoadwg3KGyr77NwfPcGjRB2wWE82bq8s=" />
<link rel="stylesheet" type="text/css" href="styles/stylesheet.css">
<link rel='Shortcut Icon' href='http://www.speedtestpro.net/favicon.ico'>

Speed Test

           Home    Products    Support    Speed Test

    Home
    Products
    Resellers
    Purchase
    Download

    Frequently asked questions
    Support
    Feedback

      Add to Favorites
      Make Home Page
      Link to us

    <form id="subscribe" action="http://www.absolutefuturity.com/subscribe.asp" method="post">

             Name:

       <input id="name" size="25" name="name">

             E-Mail:

       <input id="email" size="25" name="email">

             <input type="submit" value="Subscribe" id=submit1 name=submit1>
    </form>

    Site Map
    Privacy Policy

Speed Test - Vista Sidebar Gadget

!! Increase the power of your Gadget !!

You can add many more features to your Gadget by using Speed Test Pro. Speed Test Pro sends the information to the Gadget so you can view anything from the Gadget itseft.

Speed Test Pro adds more Power to your Gadget

The FREEWARE version will add the ability to:

Test your Maximum Internet Speed (Trial)

Test your own websites performance

The Registered version will add the ability to:

Test your Maximum Internet Speed

Test your own websites performance

Test your Network connections speed

Monitor Upload/Download transfer rate

Monitor Internet connections quality

Monitor Ping response times

Monitor WIFI Signal strength

Monitor Battery status

Monitor Drive space

Monitor Drive activity

Monitor Ping response times

Monitor a processes memory usage

and much more...

with...

Speed Test Pro
Much more...

What is Speed Testing? Answer: Downloading data from the Internet and measuring the largest amount of data that can pass through your connection within a specified time period. Speed Test allows you to do this, completely autonomously without your intervention.

Speed Test doesn't just monitor your connection,
 it will actually download a file on a regular basis to test your connection.

!! Click here to download the Freeware version !!

Display graphs over time of your connection behavior and maximum bandwidth.

Speed Test is a meter that monitors your internet connection, web site, cpu, memory, Hard Drives, Wifi, LAN, Processes and much more all in real
time and will store all data recorded into an log, so it can be
easily imported into almost any application. This data can be used to help in
resolving problems with your internet connection or computer. Speed Test is a must for
resolving connection or computer issues. Speed Test has the flexibility to allow you to view
the data in many ways to suit your needs.

If you have a computer, then Speed Test is a must have product.

Try the CPU Node first until you are familiar with Speed Test

Measure your actual maximum Bandwidth Speed by downloading from our server.

Measure your Quality of Service.

Test your own web site's speed, connectivity, response time and errors.

Test your Home network or LAN's speed.

You can monitor network connections as well as Broadband Internet connections.

You can also monitor dial-up connections using the (local Host).

You can Monitor as many connections as you need.

Quick and easy viewing of logs inside of graphs.

Ping Packet size up to 1k.

Ability to ping a website to estimate connections speeds.

View your WIFI signal strength with a graph in real time.

View CPU usage in graphs. (Supports dual/quad cores and more)

View Memory status in graphs.

View Hard Drive space in graphs.

View Hard Drive activity in graphs.

View System uptime in graphs.

View Battery status in graphs.

View a Processes Memory usage in graphs.

Alert Wizard, allowing you to print, run an app, restart, send an email under any condition that you specify.

Click image to enlarge

Control Panel

Alert Wizard

Line Graph

Bar Graph

Systray Icon Graphs

*** Click here to Download the Freeware version ***

<form id="subscribe" action="http://www.absolutefuturity.com/subscribe.asp" method="post">

  Name:

  <input id="name" size="40" name="name">

  E-Mail:

  <input id="email" size="40" name="email">

  <input type="submit" value="Subscribe">
</form>
To unsubscribe, click here for our  Support page.

Download

Speed Test

System Requirements

Windows 95/98/ME/XP/Vista

Windows NT 4.0 SP4 or later

Pentium 366MHz or greater

32MB RAM

100MB free hard drive space for logs

Internet Connection

Pricing

Click Here to see the pricing information.

<nobr>[ Home ]</nobr> <nobr>[ Contents ]</nobr> <nobr>[ Support ]</nobr> <nobr>[ F.A.Q. ]</nobr> <nobr>[ Resellers ]</nobr> <nobr>[ Privacy Policy ]</nobr> <nobr>[ Links ]</nobr>

Copyright © 2007 Absolute Futurity


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

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

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-spring-boot-compatible</artifactId>
        <version>${revision}</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>dubbo-spring-boot-actuator-compatible</artifactId>
    <description>Apache Dubbo Spring Boot Compatible for Spring Boot 1.x Actuator</description>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- @ConfigurationProperties annotation processing (metadata for IDEs) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Dubbo autoconfigure -->
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
            <version>${revision}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo</artifactId>
            <version>${revision}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-common</artifactId>
            <version>${revision}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-config-spring</artifactId>
            <version>${revision}</version>
            <optional>true</optional>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>


text:
(function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    function Plugin () {
      global.add('colorpicker', function () {
        console.warn('Color picker plugin is now built in to the core editor, please remove it from your editor configuration');
      });
    }

    Plugin();

}());


text:
package com.fzd.agg;

/**
 * Created by bdfus002 on 2017/7/26.
 */
public class TownShipBase {
    //建筑面积
    private String buildArea;

    //结构
    private String structure;

    //用途
    private String purpose;

    //登记状态
    private String state;

    //是否抵押
    private String mortgage;

    //是否查封
    private String attachment;

    //是否可售
    private String sale;

    public TownShipBase() {
    }

    public String getBuildArea() {
        return buildArea;
    }

    public void setBuildArea(String buildArea) {
        this.buildArea = buildArea;
    }

    public String getStructure() {
        return structure;
    }

    public void setStructure(String structure) {
        this.structure = structure;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getMortgage() {
        return mortgage;
    }

    public void setMortgage(String mortgage) {
        this.mortgage = mortgage;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public String getSale() {
        return sale;
    }

    public void setSale(String sale) {
        this.sale = sale;
    }

    @Override
    public String toString() {
        return "TownShipBase{" +
                "buildArea='" + buildArea + '\'' +
                ", structure='" + structure + '\'' +
                ", purpose='" + purpose + '\'' +
                ", state='" + state + '\'' +
                ", mortgage='" + mortgage + '\'' +
                ", attachment='" + attachment + '\'' +
                ", sale='" + sale + '\'' +
                '}';
    }
}


text:
<!doctype html>

    <base href="./" />
    <title>JSDoc: directive:drawing-manager</title>
    <link type="text/css" rel="stylesheet" href="css/jsdoc-default.css" />
    <link href="css/prettify-tomorrow.css" type="text/css" rel="stylesheet" />

Index

service

Attr2Options

GeoCoder

NavigatorGeolocation

StreetView

directive

bicycling-layer

cloud-layer

custom-control

directions

drawing-manager

dynamic-maps-engine-layer

fusion-tables-layer

heatmap-layer

info-window

kml-layer

map-data

map-lazy-load

map-type

maps-engine-layer

marker

overlay-map-type

places-auto-complete

shape

streetview-panorama

traffic-layer

transit-layer

weather-layer

controller

MapController

module: ngMap

directive

ngMap.map

      directive:drawing-manager
        source

Requires:  map directive
  Restrict To:  Element

Dependencies:

Name	Type	Description

                Attr2Options

                  service

convert html attribute to Gogole map api options

Example

Example:
 <map zoom="13" center="37.774546, -122.433523" map-type-id="SATELLITE">
   <drawing-manager  on-overlaycomplete="onMapOverlayCompleted()" position="ControlPosition.TOP_CENTER" drawingModes="POLYGON,CIRCLE" drawingControl="true" circleOptions="fillColor: '#FFFF00';fillOpacity: 1;strokeWeight: 5;clickable: false;zIndex: 1;editable: true;" ></drawing-manager>
 </map>
 TODO: Add remove button.
 currently, for out solution, we have the shapes/markers in our own controller, and we use some css classes to change the shape button
 to a remove button (<div>X</div>) and have the remove operation in our own controller.

      Documentation generated by
      JSDoc 3.3.2
      using
      Angular-JSDoc template


text:
. demo_repo.sh

silent git checkout origin/main

run git map-branches
pcommand git nav-downstream
git nav-downstream --pick 0 2>&1
run git map-branches
run git nav-downstream  2>&1
run git map-branches


text:
define(function(require, exports, module) {
    main.consumes = ["Plugin", "tabManager", "ui", "ace"];
    main.provides = ["c9.caniuse"];
    return main;

    function main(options, imports, register) {
        var Plugin = imports.Plugin;
        var plugin = new Plugin("ozcanovunc", main.consumes, {
            name: "c9.caniuse"
        });
        var tabManager = imports.tabManager;
        var ui = imports.ui;
        var ace = imports.ace;
        var path = require("path");
        var extensions = require("./src/extensions");
        var caniuse = require("./src/caniuse");

        var markup = require("text!./bar.xml");
        var css = require("text!./bar.less");
        var loaded = false;
        var onFocusEventSet = false;
        var bar = null;

        plugin.freezePublicAPI({});

        plugin.on("load", function() {
            if (loaded) return;
            loaded = true;
        });

        plugin.on("unload", function() {
            plugin = null;
            loaded = false;
            onFocusEventSet = false;
            bar = null;
        });

        // Insert markup
        ace.on("create", function(e) {
            var editor = e.editor;
            if (editor.type != "ace")
                return;

            editor.once("draw", function() {
                ui.insertCss(css, plugin);
                ui.insertMarkup(editor.aml, markup, plugin);
                bar = plugin.getElement("caniuse-bar");
            }, editor);
        });

        tabManager.on("focus", function(e) {
            if (e.tab.editorType === "ace" && !onFocusEventSet) {
                onFocusEventSet = true;
                onFocus(e);
            }
        });

        function onFocus(e) {
            var tab = e.tab;
            var editor = tab.editor;
            var ace = editor.ace;
            var scroller = ace.renderer.scroller;

            scroller.addEventListener("mouseup", function() {
                var currentTab = tabManager.focussedTab;
                var title = currentTab.document.title;
                var extension = path.extname(title);
                if (extensions.indexOf(extension) > -1) {
                    var selectedText = ace.getCopyText() || "";
                    var report = caniuse(selectedText);
                    show(report);
                }
                else {
                    show();
                }
            });
        }

        function show(report) {
            report = report || {};
            var browsers = Object.keys(report);
            bar.$html.style.display = (browsers.length > 0) ? "" : "none";
            browsers.forEach(function(browser) {
                var version = report[browser];
                var lblVersion = plugin.getElement("caniuse-" + browser + "-version");
                var lblCheck = plugin.getElement("caniuse-" + browser + "-check");
                var lblUncheck = plugin.getElement("caniuse-" + browser + "-uncheck");

                if (version) {
                    lblVersion.setAttribute("caption", version);
                    lblCheck.$html.style.display = "";
                    lblUncheck.$html.style.display = "none";
                }
                else {
                    lblVersion.setAttribute("caption", "");
                    lblCheck.$html.style.display = "none";
                    lblUncheck.$html.style.display = "";
                }
            });
        }

        register(null, {
            "c9.caniuse": plugin
        });
    }
});


text:
require 'faraday'
require 'faraday_middleware'

require 'validic/rest/apps'
require 'validic/rest/biometrics'
require 'validic/rest/diabetes'
require 'validic/rest/fitness'
require 'validic/rest/nutrition'
require 'validic/rest/organizations'
require 'validic/rest/profile'
require 'validic/rest/request'
require 'validic/rest/routine'
require 'validic/rest/sleep'
require 'validic/rest/tobacco_cessation'
require 'validic/rest/users'
require 'validic/rest/utils'
require 'validic/rest/weight'
require 'validic/version'

module Validic
  class Client
    include REST::Apps
    include REST::Biometrics
    include REST::Diabetes
    include REST::Fitness
    include REST::Nutrition
    include REST::Organizations
    include REST::Profile
    include REST::Request
    include REST::Routine
    include REST::Sleep
    include REST::TobaccoCessation
    include REST::Users
    include REST::Utils
    include REST::Weight

    attr_accessor :api_url,
      :api_version,
      :access_token,
      :organization_id

    ##
    # Create a new Validic::Client object
    #
    # @params options[Hash]
    def initialize(options={})
      @api_url          = options.fetch(:api_url, 'https://api.validic.com')
      @api_version      = options.fetch(:api_version, 'v1')
      @access_token     = options.fetch(:access_token, Validic.access_token)
      @organization_id  = options.fetch(:organization_id, Validic.organization_id)
    end

    ##
    # Create a Faraday::Connection object
    #
    # @return [Faraday::Connection]
    def connection
      Faraday.new(url: @api_url, headers: default_headers, ssl: { verify: true }) do |faraday|
        # faraday.use FaradayMiddleware::Mashify
        faraday.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
        faraday.use FaradayMiddleware::FollowRedirects
        faraday.adapter Faraday.default_adapter
      end
    end

    private

    def default_headers
      {
        accept: 'application/json',
        content_type: 'application/json',
        user_agent: "Ruby Gem by Validic #{Validic::VERSION}"
      }
    end

    def reload_config
      Validic.api_url = api_url
      Validic.api_version = api_version
      Validic.access_token = access_token
      Validic.organization_id = organization_id
    end
  end
end


text:
REPO_DIR = ../..

# Includi i comandi comuni a tutti i makefile.
include $(REPO_DIR)/script/global.mk

# Includi il makefile di default dei documenti.
# Se servisse, sostituire questa inclusione con il codice specializzato.
include $(REPO_DIR)/script/default-doc.mk


text:
<?php

final class PhabricatorApplicationPaste extends PhabricatorApplication {

  public function getBaseURI() {
    return '/paste/';
  }

  public function getIconName() {
    return 'paste';
  }

  public function getTitleGlyph() {
    return "\xE2\x9C\x8E";
  }

  public function getApplicationGroup() {
    return self::GROUP_UTILITIES;
  }

  public function getQuickCreateURI() {
    return $this->getBaseURI().'create/';
  }

  public function getRemarkupRules() {
    return array(
      new PhabricatorPasteRemarkupRule(),
    );
  }

  public function getRoutes() {
    return array(
      '/P(?P<id>[1-9]\d*)' => 'PhabricatorPasteViewController',
      '/paste/' => array(
        '(query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorPasteListController',
        'create/'                       => 'PhabricatorPasteEditController',
        'edit/(?P<id>[1-9]\d*)/'        => 'PhabricatorPasteEditController',
      ),
    );
  }

}


text:
package org.dync.giftlibrary.util;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;

/**
 * Created by KathLine on 2017/4/27.
 */

public class RecyclerViewUtil {
    private RecyclerView mRecyclerView = null;
    private GestureDetector mGestureDetector = null;
    private RecyclerView.SimpleOnItemTouchListener mSimpleOnItemTouchListener;
    private OnItemClickListener mOnItemClickListener = null;
    private OnItemLongClickListener mOnItemLongClickListener = null;
    private Context context;

    public RecyclerViewUtil(Context context, RecyclerView recyclerView) {
        this.context = context;
        this.mRecyclerView = recyclerView;

        mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
            //长按事件
            @Override
            public void onLongPress(MotionEvent e) {
                super.onLongPress(e);
                if (mOnItemLongClickListener != null) {
                    View childView = mRecyclerView.findChildViewUnder(e.getX(), e.getY());
                    if (childView != null) {
                        int position = mRecyclerView.getChildLayoutPosition(childView);
                        mOnItemLongClickListener.onItemLongClick(position, childView);
                    }
                }
            }

            //单击事件
            @Override
            public boolean onSingleTapUp(MotionEvent e) {
                if (mOnItemClickListener != null) {
                    View childView = mRecyclerView.findChildViewUnder(e.getX(), e.getY());
                    if (childView != null) {
                        int position = mRecyclerView.getChildLayoutPosition(childView);
                        mOnItemClickListener.onItemClick(position, childView);
                        return true;
                    }
                }

                return super.onSingleTapUp(e);
            }
        });

        mSimpleOnItemTouchListener = new RecyclerView.SimpleOnItemTouchListener() {
            @Override
            public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
                if (mGestureDetector.onTouchEvent(e)) {
                    return true;
                }
                return false;
            }
        };

        mRecyclerView.addOnItemTouchListener(mSimpleOnItemTouchListener);
    }

    public void setOnItemClickListener(OnItemClickListener l) {
        mOnItemClickListener = l;
    }

    public void setOnItemLongClickListener(OnItemLongClickListener l) {
        mOnItemLongClickListener = l;
    }

    //长按事件接口
    public interface OnItemLongClickListener {
        void onItemLongClick(int position, View view);
    }

    //单击事件接口
    public interface OnItemClickListener {
        void onItemClick(int position, View view);
    }
}


text:
package com.github.cybortronik.registry.controller;

import com.github.cybortronik.registry.JsonTransformer;
import com.github.cybortronik.registry.bean.Company;
import com.github.cybortronik.registry.bean.FilterRequestFactory;
import com.github.cybortronik.registry.repository.bean.FilterRequest;
import com.github.cybortronik.registry.repository.bean.FilterResult;
import com.github.cybortronik.registry.service.CompanyService;
import spark.Request;
import spark.Response;

import javax.inject.Inject;

import static java.util.Objects.isNull;
import static org.eclipse.jetty.util.StringUtil.isBlank;
import static spark.Spark.halt;

/**
 * Created by stanislav on 11/17/15.
 */
public class CompaniesController {

    private CompanyService companyService;
    private FilterRequestFactory filterRequestFactory;
    private JsonTransformer jsonTransformer;

    @Inject
    public CompaniesController(CompanyService companyService, FilterRequestFactory filterRequestFactory, JsonTransformer jsonTransformer) {
        this.companyService = companyService;
        this.filterRequestFactory = filterRequestFactory;
        this.jsonTransformer = jsonTransformer;
    }

    public FilterResult<Company> getCompanies(Request request, Response response) {
        FilterRequest filterRequest = filterRequestFactory.create(request);
        return companyService.filter(filterRequest);
    }

    public Company create(Request request, Response response) {
        String body = request.body();
        Company company = jsonTransformer.fromJson(body, Company.class);
        return companyService.createCompany(company);
    }

    public String delete(Request request, Response response) {
        String companyId = getCompanyUuid(request);
        companyService.delete(companyId);
        requiredCompany(companyService.findById(companyId));
        halt(204);
        return "";
    }

    public Company show(Request request, Response response) {
        String companyId = getCompanyUuid(request);
        Company updatedCompany = companyService.findById(companyId);
        requiredCompany(updatedCompany);
        return updatedCompany;
    }

    public Company update(Request request, Response response) {
        String companyId = getCompanyUuid(request);
        String body = request.body();
        Company company = jsonTransformer.fromJson(body, Company.class);
        Company updatedCompany = companyService.updateCompany(companyId, company);
        requiredCompany(updatedCompany);
        return updatedCompany;
    }

    private String getCompanyUuid(Request request) {
        String uuid = request.params(":uuid");
        if (isBlank(uuid)) {
            halt(400, "Cannot find a company without identifier");
        }
        return uuid;
    }

    private void requiredCompany(Company company) {
        if (isNull(company))
            halt(400, "Company not found please check the request");
    }
}


text:
build:
	scons

test: build
	python serve.py --root ./_build --silence

clean:
	rm -rf _build
	rm -rf _build_uploaded
	rm -rf _static/img/gen

publish: clean build
	scons publish


text:
@interface  WalletUtils()

@property (nonatomic, strong) NSMutableArray *registeredWallets;
@end

@implementation WalletUtils

+ (WalletUtils *)sharedInstance
{
    static WalletUtils *instance = nil;
    static dispatch_once_t dispatch_once_block;

    dispatch_once(&dispatch_once_block, ^ {
        instance = [WalletUtils new];
        instance.registeredWallets = [NSMutableArray new];
    });

    return instance;
}

// TODO: Implement when architecture is discussed
//- (NSError *)registerWalletType: (NSString *)xtype
//{
//    NSMutableArray *wallets = self.registeredWallets;
//
//    NSError *ret;
//    if ([wallets containsObject:xtype])
//    {
//        return [NSError new];
//    }
//
//
//}

-(NSError *)createAndOpenWalletWithPoolName:(NSString *) poolName
                                      xtype:(NSString *) xtype
                                     handle:(IndyHandle *) handle
{
    __block NSError *err = nil;
    NSError *ret = nil;

    XCTestExpectation* completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];

    NSString *walletName = [NSString stringWithFormat:@"default-wallet-name-%lu", (unsigned long)[[SequenceUtils sharedInstance] getNextId]];
    NSString *xTypeStr = (xtype) ? xtype : @"default";

    ret = [[IndyWallet sharedInstance] createWalletWithPoolName:  poolName
                                                           name:  walletName
                                                          xType:  xTypeStr
                                                         config:  nil
                                                    credentials:  nil
                                                     completion: ^(NSError* error)
           {
               err = error;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils defaultTimeout]];

    if( err.code != Success)
    {
        return err;
    }

    completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];
    __block IndyHandle walletHandle = 0;

    ret = [[IndyWallet sharedInstance] openWalletWithName:walletName
                                              runtimeConfig:nil
                                                credentials:nil
                                                 completion:^(NSError *error, IndyHandle h)
           {
               err = error;
               walletHandle = h;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils defaultTimeout]];

    if (handle) { *handle = walletHandle; }

    return err;
}

- (NSError *)createWalletWithPoolName:(NSString *)poolName
                           walletName:(NSString *)walletName
                                xtype:(NSString *)xtype
                               config:(NSString *)config
{
    __block NSError *err = nil;
    NSError *ret = nil;

    XCTestExpectation* completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];

    ret = [[IndyWallet sharedInstance] createWalletWithPoolName:  poolName
                                                             name:  walletName
                                                            xType:  xtype
                                                           config:  config
                                                      credentials:  nil
                                                       completion: ^(NSError *error)
           {
               err = error;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils defaultTimeout]];
    return err;
}

- (NSError *)deleteWalletWithName:(NSString *)walletName
{
    __block NSError *err;
    NSError *ret = nil;

    XCTestExpectation* completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];

    ret = [[IndyWallet sharedInstance] deleteWalletWithName:walletName
                                                  credentials:nil
                                                   completion:^(NSError *error)
           {
               err = error;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils defaultTimeout]];

    return err;
}

- (NSError *)openWalletWithName:(NSString *)walletName
                         config:(NSString *)config
                      outHandle:(IndyHandle *)handle
{
    __block NSError *err;
    __block IndyHandle outHandle = 0;
    NSError *ret = nil;

    XCTestExpectation* completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];

    ret = [[IndyWallet sharedInstance] openWalletWithName:walletName
                                              runtimeConfig:config
                                                credentials:nil
                                                 completion:^(NSError *error, IndyHandle h)
           {
               err = error;
               outHandle = h;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils defaultTimeout]];

    if (handle) { *handle = outHandle; }
    return err;
}

- (NSError *)closeWalletWithHandle:(IndyHandle)walletHandle
{
    __block NSError *err;
    NSError *ret = nil;

    XCTestExpectation* completionExpectation = [[ XCTestExpectation alloc] initWithDescription: @"completion finished"];

    ret = [[IndyWallet sharedInstance] closeWalletWithHandle:walletHandle
                                                    completion:^(NSError *error)
           {
               err = error;
               [completionExpectation fulfill];
           }];

    if( ret.code != Success )
    {
        return ret;
    }

    [self waitForExpectations: @[completionExpectation] timeout:[TestUtils shortTimeout]];

    return err;
}

@end


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

#include "chrome/browser/permissions/permission_context_base.h"

#include <stddef.h>

#include <string>
#include <utility>

#include "base/callback.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/permissions/permission_decision_auto_blocker.h"
#include "chrome/browser/permissions/permission_request.h"
#include "chrome/browser/permissions/permission_request_id.h"
#include "chrome/browser/permissions/permission_request_impl.h"
#include "chrome/browser/permissions/permission_request_manager.h"
#include "chrome/browser/permissions/permission_uma_util.h"
#include "chrome/browser/permissions/permission_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/browser/website_settings_registry.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing_db/database_manager.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "url/gurl.h"

#if defined(OS_ANDROID)
#include "chrome/browser/permissions/permission_queue_controller.h"
#endif

// static
const char PermissionContextBase::kPermissionsKillSwitchFieldStudy[] =
    "PermissionsKillSwitch";
// static
const char PermissionContextBase::kPermissionsKillSwitchBlockedValue[] =
    "blocked";
// Maximum time in milliseconds to wait for safe browsing service to check a
// url for blacklisting. After this amount of time, the check will be aborted
// and the url will be treated as not blacklisted.
// TODO(meredithl): Revisit this once UMA metrics have data about request time.
const int kCheckUrlTimeoutMs = 2000;

PermissionContextBase::PermissionContextBase(
    Profile* profile,
    const content::PermissionType permission_type,
    const ContentSettingsType content_settings_type)
    : profile_(profile),
      permission_type_(permission_type),
      content_settings_type_(content_settings_type),
      safe_browsing_timeout_(kCheckUrlTimeoutMs),
      weak_factory_(this) {
#if defined(OS_ANDROID)
  permission_queue_controller_.reset(new PermissionQueueController(
      profile_, permission_type_, content_settings_type_));
#endif
  PermissionDecisionAutoBlocker::UpdateFromVariations();
}

PermissionContextBase::~PermissionContextBase() {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}

void PermissionContextBase::RequestPermission(
    content::WebContents* web_contents,
    const PermissionRequestID& id,
    const GURL& requesting_frame,
    bool user_gesture,
    const BrowserPermissionCallback& callback) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

  // First check if this permission has been disabled.
  if (IsPermissionKillSwitchOn()) {
    // Log to the developer console.
    web_contents->GetMainFrame()->AddMessageToConsole(
        content::CONSOLE_MESSAGE_LEVEL_LOG,
        base::StringPrintf(
            "%s permission has been blocked.",
            PermissionUtil::GetPermissionString(permission_type_).c_str()));
    // The kill switch is enabled for this permission; Block all requests.
    callback.Run(CONTENT_SETTING_BLOCK);
    return;
  }

  GURL requesting_origin = requesting_frame.GetOrigin();
  GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin();

  if (!requesting_origin.is_valid() || !embedding_origin.is_valid()) {
    std::string type_name =
        content_settings::WebsiteSettingsRegistry::GetInstance()
            ->Get(content_settings_type_)
            ->name();

    DVLOG(1) << "Attempt to use " << type_name
             << " from an invalid URL: " << requesting_origin << ","
             << embedding_origin << " (" << type_name
             << " is not supported in popups)";
    NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
                        false /* persist */, CONTENT_SETTING_BLOCK);
    return;
  }

  // Synchronously check the content setting to see if the user has already made
  // a decision, or if the origin is under embargo. If so, respect that
  // decision.
  ContentSetting content_setting =
      GetPermissionStatus(requesting_origin, embedding_origin);
  if (content_setting == CONTENT_SETTING_ALLOW) {
    HostContentSettingsMapFactory::GetForProfile(profile_)->UpdateLastUsage(
        requesting_origin, embedding_origin, content_settings_type_);
  }

  if (content_setting == CONTENT_SETTING_ALLOW ||
      content_setting == CONTENT_SETTING_BLOCK) {
    NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
                        false /* persist */, content_setting);
    return;
  }

  if (!db_manager_) {
    safe_browsing::SafeBrowsingService* sb_service =
        g_browser_process->safe_browsing_service();
    if (sb_service)
      db_manager_ = sb_service->database_manager();
  }

  // Asynchronously check whether the origin should be blocked from making this
  // permission request. It may be on the Safe Browsing API blacklist, or it may
  // have been dismissed too many times in a row. If the origin is allowed to
  // request, that request will be made to ContinueRequestPermission().
  PermissionDecisionAutoBlocker::UpdateEmbargoedStatus(
      db_manager_, permission_type_, requesting_origin, web_contents,
      safe_browsing_timeout_, profile_, base::Time::Now(),
      base::Bind(&PermissionContextBase::ContinueRequestPermission,
                 weak_factory_.GetWeakPtr(), web_contents, id,
                 requesting_origin, embedding_origin, user_gesture, callback));
}

void PermissionContextBase::ContinueRequestPermission(
    content::WebContents* web_contents,
    const PermissionRequestID& id,
    const GURL& requesting_origin,
    const GURL& embedding_origin,
    bool user_gesture,
    const BrowserPermissionCallback& callback,
    bool permission_blocked) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
  if (permission_blocked) {
    // TODO(meredithl): Add UMA metrics here.
    web_contents->GetMainFrame()->AddMessageToConsole(
        content::CONSOLE_MESSAGE_LEVEL_LOG,
        base::StringPrintf(
            "%s permission has been auto-blocked.",
            PermissionUtil::GetPermissionString(permission_type_).c_str()));
    // Permission has been blacklisted, block the request.
    // TODO(meredithl): Consider setting the content setting and persisting
    // the decision to block.
    callback.Run(CONTENT_SETTING_BLOCK);
    return;
  }

  // Site is not blacklisted by Safe Browsing for the requested permission.
  PermissionUmaUtil::PermissionRequested(permission_type_, requesting_origin,
                                         embedding_origin, profile_);

  DecidePermission(web_contents, id, requesting_origin, embedding_origin,
                   user_gesture, callback);
}

ContentSetting PermissionContextBase::GetPermissionStatus(
    const GURL& requesting_origin,
    const GURL& embedding_origin) const {
  // If the permission has been disabled through Finch, block all requests.
  if (IsPermissionKillSwitchOn())
    return CONTENT_SETTING_BLOCK;

  if (IsRestrictedToSecureOrigins() &&
      !content::IsOriginSecure(requesting_origin)) {
    return CONTENT_SETTING_BLOCK;
  }

  ContentSetting content_setting =
      GetPermissionStatusInternal(requesting_origin, embedding_origin);
  if (content_setting == CONTENT_SETTING_ASK &&
      PermissionDecisionAutoBlocker::IsUnderEmbargo(
          permission_type_, profile_, requesting_origin, base::Time::Now())) {
    return CONTENT_SETTING_BLOCK;
  }
  return content_setting;
}

void PermissionContextBase::ResetPermission(
    const GURL& requesting_origin,
    const GURL& embedding_origin) {
  HostContentSettingsMapFactory::GetForProfile(profile_)
      ->SetContentSettingDefaultScope(requesting_origin, embedding_origin,
                                      content_settings_type_, std::string(),
                                      CONTENT_SETTING_DEFAULT);
}

void PermissionContextBase::CancelPermissionRequest(
    content::WebContents* web_contents,
    const PermissionRequestID& id) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

  if (PermissionRequestManager::IsEnabled()) {
    auto it = pending_requests_.find(id.ToString());
    if (it != pending_requests_.end() && web_contents != nullptr &&
        PermissionRequestManager::FromWebContents(web_contents) != nullptr) {
      PermissionRequestManager::FromWebContents(web_contents)
          ->CancelRequest(it->second.get());
    }
  } else {
#if defined(OS_ANDROID)
    GetQueueController()->CancelInfoBarRequest(id);
#else
    NOTREACHED();
#endif
  }
}

bool PermissionContextBase::IsPermissionKillSwitchOn() const {
  const std::string param = variations::GetVariationParamValue(
      kPermissionsKillSwitchFieldStudy,
      PermissionUtil::GetPermissionString(permission_type_));

  return param == kPermissionsKillSwitchBlockedValue;
}

ContentSetting PermissionContextBase::GetPermissionStatusInternal(
    const GURL& requesting_origin,
    const GURL& embedding_origin) const {
  return HostContentSettingsMapFactory::GetForProfile(profile_)
      ->GetContentSetting(requesting_origin, embedding_origin,
                          content_settings_type_, std::string());
}

void PermissionContextBase::DecidePermission(
    content::WebContents* web_contents,
    const PermissionRequestID& id,
    const GURL& requesting_origin,
    const GURL& embedding_origin,
    bool user_gesture,
    const BrowserPermissionCallback& callback) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

  if (PermissionRequestManager::IsEnabled()) {
    PermissionRequestManager* permission_request_manager =
        PermissionRequestManager::FromWebContents(web_contents);
    // TODO(felt): sometimes |permission_request_manager| is null. This check is
    // meant to prevent crashes. See crbug.com/457091.
    if (!permission_request_manager)
      return;

    std::unique_ptr<PermissionRequest> request_ptr =
        base::MakeUnique<PermissionRequestImpl>(
            requesting_origin, permission_type_, profile_, user_gesture,
            base::Bind(&PermissionContextBase::PermissionDecided,
                       weak_factory_.GetWeakPtr(), id, requesting_origin,
                       embedding_origin, user_gesture, callback),
            base::Bind(&PermissionContextBase::CleanUpRequest,
                       weak_factory_.GetWeakPtr(), id));
    PermissionRequest* request = request_ptr.get();

    bool inserted =
        pending_requests_
            .insert(std::make_pair(id.ToString(), std::move(request_ptr)))
            .second;
    DCHECK(inserted) << "Duplicate id " << id.ToString();
    permission_request_manager->AddRequest(request);
  } else {
#if defined(OS_ANDROID)
    GetQueueController()->CreateInfoBarRequest(
        id, requesting_origin, embedding_origin, user_gesture,
        base::Bind(&PermissionContextBase::PermissionDecided,
                   weak_factory_.GetWeakPtr(), id, requesting_origin,
                   embedding_origin, user_gesture, callback,
                   // the queue controller takes care of persisting the
                   // permission
                   false));
#else
    NOTREACHED();
#endif
  }
}

void PermissionContextBase::PermissionDecided(
    const PermissionRequestID& id,
    const GURL& requesting_origin,
    const GURL& embedding_origin,
    bool user_gesture,
    const BrowserPermissionCallback& callback,
    bool persist,
    ContentSetting content_setting) {
  if (PermissionRequestManager::IsEnabled()) {
    // Infobar persistence and its related UMA is tracked on the infobar
    // controller directly.
    PermissionRequestGestureType gesture_type =
        user_gesture ? PermissionRequestGestureType::GESTURE
                     : PermissionRequestGestureType::NO_GESTURE;
    DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
           content_setting == CONTENT_SETTING_BLOCK ||
           content_setting == CONTENT_SETTING_DEFAULT);
    if (content_setting == CONTENT_SETTING_ALLOW) {
      PermissionUmaUtil::PermissionGranted(permission_type_, gesture_type,
                                           requesting_origin, profile_);
    } else if (content_setting == CONTENT_SETTING_BLOCK) {
      PermissionUmaUtil::PermissionDenied(permission_type_, gesture_type,
                                          requesting_origin, profile_);
    } else {
      PermissionUmaUtil::PermissionDismissed(permission_type_, gesture_type,
                                             requesting_origin, profile_);
    }
  }

  if (content_setting == CONTENT_SETTING_DEFAULT &&
      PermissionDecisionAutoBlocker::RecordDismissAndEmbargo(
          requesting_origin, permission_type_, profile_, base::Time::Now())) {
    // The permission has been embargoed, so it is blocked for this permission
    // request, but not persisted.
    content_setting = CONTENT_SETTING_BLOCK;
  }

  NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
                      persist, content_setting);
}

#if defined(OS_ANDROID)
PermissionQueueController* PermissionContextBase::GetQueueController() {
  return permission_queue_controller_.get();
}
#endif

Profile* PermissionContextBase::profile() const {
  return profile_;
}

void PermissionContextBase::NotifyPermissionSet(
    const PermissionRequestID& id,
    const GURL& requesting_origin,
    const GURL& embedding_origin,
    const BrowserPermissionCallback& callback,
    bool persist,
    ContentSetting content_setting) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

  if (persist)
    UpdateContentSetting(requesting_origin, embedding_origin, content_setting);

  UpdateTabContext(id, requesting_origin,
                   content_setting == CONTENT_SETTING_ALLOW);

  if (content_setting == CONTENT_SETTING_DEFAULT)
    content_setting = CONTENT_SETTING_ASK;

  callback.Run(content_setting);
}

void PermissionContextBase::CleanUpRequest(const PermissionRequestID& id) {
  size_t success = pending_requests_.erase(id.ToString());
  DCHECK(success == 1) << "Missing request " << id.ToString();
}

void PermissionContextBase::UpdateContentSetting(
    const GURL& requesting_origin,
    const GURL& embedding_origin,
    ContentSetting content_setting) {
  DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin());
  DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin());
  DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
         content_setting == CONTENT_SETTING_BLOCK);
  DCHECK(!requesting_origin.SchemeIsFile());
  DCHECK(!embedding_origin.SchemeIsFile());

  HostContentSettingsMapFactory::GetForProfile(profile_)
      ->SetContentSettingDefaultScope(requesting_origin, embedding_origin,
                                      content_settings_type_, std::string(),
                                      content_setting);
}

void PermissionContextBase::SetSafeBrowsingDatabaseManagerAndTimeoutForTest(
    scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> db_manager,
    int timeout) {
  db_manager_ = db_manager;
  safe_browsing_timeout_ = timeout;
}


text:
package gr.iti.mklab.reveal.util;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import eu.socialsensor.framework.common.domain.*;

/**
 * Created by kandreadou on 10/7/14.
 */
public class MediaCluster implements JSONable, Serializable {
    /**
     *
     */
    private static final long serialVersionUID = -7926531925761955502L;
    public MediaCluster(String id) {
        this.id = id;
    }
    // Unique id of a Media cluster
    @Expose
    @SerializedName(value = "id")
    private String id;
    @Expose
    @SerializedName(value = "members")
    private Set<String> members = new HashSet<String>();
    @Expose
    @SerializedName(value = "count")
    private int count = 0;

    @com.google.gson.annotations.Expose
    @com.google.gson.annotations.SerializedName("item")
    public MediaItem item;

    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Set<String> getMembers() {
        return members;
    }
    public void addMembers(Set<String> members) {
        this.members.addAll(members);
        this.count = this.members.size();
    }
    public void addMember(String member) {
        this.members.add(member);
        this.count = this.members.size();
    }
    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public String toJSONString() {
        Gson gson = new GsonBuilder()
                .excludeFieldsWithoutExposeAnnotation()
                .create();
        return gson.toJson(this);
    }
}


text:
<?php
/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/

namespace app\ctrl\index;

use app\classes\index\Ctrl;
use ginkgo\Loader;
use ginkgo\Plugin;

//不能非法包含或直接执行
if (!defined('IN_GINKGO')) {
  return 'Access denied';
}

class Spec extends Ctrl {

  protected function c_init($param = array()) {
    parent::c_init();

    $this->mdl_attach           = Loader::model('Attach');
    $this->mdl_spec             = Loader::model('Spec');
    $this->mdl_articleSpecView  = Loader::model('Article_Spec_View');
  }

  public function index() {
    $_mix_init = $this->indexInit();

    if ($_mix_init !== true) {
      return $this->error($_mix_init['msg'], $_mix_init['rcode']);
    }

    $_arr_searchParam = array(
      'key' => array('str', ''),
    );

    $_arr_search = $this->obj_request->param($_arr_searchParam);

    $_arr_search['status'] = 'show';

    $_arr_getData  = $this->mdl_spec->lists($this->configVisit['perpage_spec'], $_arr_search); //列出

    $_arr_tplData = array(
      'urlRow'    => $this->mdl_spec->urlLists(),
      'search'    => $_arr_search,
      'pageRow'   => $_arr_getData['pageRow'],
      'specRows'  => $this->obj_index->specListsProcess($_arr_getData['dataRows']),
    );

    $_arr_tpl = array_replace_recursive($this->generalData, $_arr_tplData);

    $_arr_tpl = Plugin::listen('filter_pub_spec_lists', $_arr_tpl);

    $this->assign($_arr_tpl);

    return $this->fetch();
  }

  function show() {
    $_mix_init = $this->indexInit();

    if ($_mix_init !== true) {
      return $this->error($_mix_init['msg'], $_mix_init['rcode']);
    }

    $_num_specId = 0;

    if (isset($this->param['id'])) {
      $_num_specId = $this->obj_request->input($this->param['id'], 'int', 0);
    }

    if ($_num_specId < 1) {
      return $this->error('Missing ID', 'x180202', 400);
    }

    $_arr_specRow = $this->obj_index->specRead($_num_specId);

    if ($_arr_specRow['rcode'] != 'y180102') {
      return $this->error($_arr_specRow['msg'], $_arr_specRow['rcode'], 404);
    }

    $_arr_search['spec_ids']      = array($_num_specId);
    $_arr_getData                 = $this->mdl_articleSpecView->lists($this->configVisit['perpage_in_spec'], $_arr_search); //列出
    $_arr_specRow['spec_content'] = $this->obj_index->albumProcess($_arr_specRow['spec_content']);

    $_arr_attachRow = $this->mdl_attach->read($_arr_specRow['spec_attach_id']);

    $_arr_tplData = array(
      'urlRow'        => $_arr_specRow['spec_url'],
      'search'        => $_arr_search,
      'pageRow'       => $_arr_getData['pageRow'],
      'articleRows'   => $this->obj_index->articleListsProcess($_arr_getData['dataRows']),
      'specRow'       => $_arr_specRow,
      'attachRow'     => $_arr_attachRow,
    );

    $_arr_tpl = array_replace_recursive($this->generalData, $_arr_tplData);

    $_arr_tpl = Plugin::listen('filter_pub_spec_show', $_arr_tpl);

    $this->assign($_arr_tpl);

    return $this->fetch();
  }
}


text:
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");

function _classPrivateMethodInitSpec(obj, privateSet) {
  checkPrivateRedeclaration(obj, privateSet);
  privateSet.add(obj);
}

module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;


text:
[![Code Climate](https://codeclimate.com/repos/526ab75ff3ea007df603b773/badges/32cb8e64b2e265d8cad6/gpa.svg)](https://codeclimate.com/repos/526ab75ff3ea007df603b773/feed)

# Run on local

Register app on Github with

http://localhost:5000

Run your application on local with

http://0.0.0.0:5000

!Don't use localhost as github is not recognizing it.

This codebase is the Rails app for
[HoundOpen](http://houndopen.com),
a hosted service
that reviews GitHub pull requests
for Ruby, JavaScript, CoffeeScript, and SCSS
style guide violations.

If you have questions about the service,
see our [FAQ] or email [hound@houndopen.com].

To contribute to the HoundOpen codebase,
see the [CONTRIBUTING.md] file.

[FAQ]: https://houndopen.com/faq
[hound@houndopen.com]: mailto:hound@houndopen.com
[CONTRIBUTING.md]: CONTRIBUTING.md

## License

The names and logos for HoundOpen are trademarks of HoundOpen, inc.

HoundOpen is Copyright © 2015 houndopen, inc.  It is free software, and may be
redistributed under the terms specified in the [LICENSE](LICENSE) file.


text:
layout:     post
title:      "HSC16 Puzzle Booklet"
subtitle:   "Available for download."
author:     "Dr. Steven Clontz"
date:       2016-05-24 13:21:00
header-img: "img/bg/silly-walk.jpg"
---

Thanks to everyone who participated in our [High School Challenge '16][hsc16]
competition! We'll be sending a wrap-up email sometime soon, but we wanted
to go ahead and share our newly open-sourced puzzle materials from that
event.

[hsc16]: /programs/hsc/16/

<https://github.com/MaPPmath/hsc16>

Happy puzzling!


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.xb.bluetoothlearning"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
FactoryGirl.define do
  factory :survey_assignment do
  end
end


text:
which etckeeper &> /dev/null && which git &> /dev/null || apt-get -y install etckeeper git-core

if [ '!' -w "/etc/etckeeper/etckeeper.conf" ]; then
	echo "Can't write to /etc/etckeeper/etckeeper.conf, maybe try as root? Aborting" >&2
	exit 1
fi

sed -i -e 's/^[[:space:]]*VCS=/#VCS=/g' "/etc/etckeeper/etckeeper.conf"
sed -i -e 's/[[:space:]]*#[[:space:]]*VCS="git"/VCS="git"/g' "/etc/etckeeper/etckeeper.conf"

etckeeper init
etckeeper commit "Initial Commit"