text:
class Main {
  void foo() throws ReflectiveOperationException {
    Class.forName("java.lang.StringBuffer<caret>");
  }
}


text:
from __future__ import absolute_import
import os

from datetime import datetime
from traits.api import Str, List, Instance

# ============= standard library imports ========================
# ============= local library imports  ==========================
from pychron.core.xml.xml_parser import XMLParser
from pychron.loggable import Loggable
from pychron.processing.xml.primitives import XMLLabnumber, XMLProjectRecordView, \
    XMLSpectrometerRecord, XMLIrradiationRecordView, XMLAnalysis, XMLAnalysisRecord

class MockSession(object):
    def __enter__(self):
        pass

    def __exit__(self, exc_type, exc_val, exc_tb):
        pass

class XMLDatabase(Loggable):
    kind = None
    path = Str

    projects = List
    samples = List
    irradiations = List
    mass_spectrometers = List

    _parser = Instance(XMLParser)

    def _path_changed(self, new):
        self.datasource_url = 'Invalid Path'
        if new:
            if os.path.isfile(new):
                self.datasource_url = os.path.join(os.path.basename(os.path.dirname(new)), os.path.basename(new))

                self._parser = XMLParser(new)

                self._load_projects()
                self._load_mass_spectrometers()
                self._load_irradiations()

                self._load_sample_meta()

    def make_analyses(self, ans, **kw):
        return self.get_analyses_uuid([ai.identifier for ai in ans], klass=XMLAnalysis)

    # DatabaseAdapter interface
    def session_ctx(self, *args, **kw):
        return MockSession()

    def get_projects(self, *args, **kw):
        return self.projects

    def get_mass_spectrometers(self):
        return self.mass_spectrometers

    def get_irradiations(self, *args, **kw):
        return self.irradiations

    def get_project_date_range(self, names):
        dt = datetime.now()
        return dt, dt

    def get_project_labnumbers(self, projects, filter_non_run_samples=None, lp=None, hp=None,
                               analysis_types=None,
                               mass_spectrometers=None):
        elems = self._parser.get_elements('Sample')

        return [XMLLabnumber(i) for i in elems]

    def get_labnumber_analyses(self, lns, **kw):
        for li in lns:
            elems = self._parser.get_elements('Sample')
            for e in elems:
                if e.get('igsn') == li:
                    ms = e.xpath('Parameters/Experiment/Measurement')
                    ans = [XMLAnalysisRecord(e, mi) for mi in ms]
                    return ans, len(ans)

    def get_analysis_groups(self, *args, **kw):
        return []

    def get_analyses_uuid(self, uuids, klass=None):
        if klass is None:
            klass = XMLAnalysisRecord

        ms = self._parser.get_elements('Parameters/Experiment/Measurement')
        ans = []

        for ui in uuids:
            mi = next((mi for mi in ms if mi.get('measurementNumber') == ui))

            cur = mi
            while 1:
                elem = cur.getparent()
                if elem.tag == 'Sample':
                    break
                else:
                    cur = elem
            # elem = next((ei for ei in elems if ei.get('')))
            ans.append(klass(elem, mi))

        return ans

    def get_labnumber_figures(self, lns):
        return []

    # private
    def _load_projects(self):
        elem = self._parser.get_elements('Parameters/Experiment')
        self.projects = [XMLProjectRecordView(i.get('projectName')) for i in elem]

    def _load_irradiations(self):
        elem = self._parser.get_elements('Parameters/Experiment/Irradiation')
        self.irradiations = [XMLIrradiationRecordView(i.get('irradiationName')) for i in elem]

    def _load_mass_spectrometers(self):
        elem = self._parser.get_elements('Parameters/Experiment')
        self.mass_spectrometers = [XMLSpectrometerRecord(i.get('massSpectrometer')) for i in elem]

    def _load_sample_meta(self):
        elem = self._parser.get_elements('Sample')
        pass

# ============= EOF =============================================

redpajama_set_name: RedPajamaGithub


text:
import createFlow from './_createFlow';

/**
 * This method is like `_.flow` except that it creates a function that
 * invokes the given functions from right to left.
 *
 * @static
 * @memberOf _
 * @category Util
 * @param {...(Function|Function[])} [funcs] Functions to invoke.
 * @returns {Function} Returns the new function.
 * @example
 *
 * function square(n) {
 *   return n * n;
 * }
 *
 * var addSquare = _.flowRight(square, _.add);
 * addSquare(1, 2);
 * // => 9
 */
var flowRight = createFlow(true);

export default flowRight;


text:
typedef testing::Test MessageFormatterTest;

namespace base {
namespace i18n {

class MessageFormatterTest : public testing::Test {
 protected:
  MessageFormatterTest() {
    original_locale_ = GetConfiguredLocale();
    SetICUDefaultLocale("en-US");
  }
  ~MessageFormatterTest() override {
    SetICUDefaultLocale(original_locale_);
  }

 private:
  std::string original_locale_;
};

namespace {

void AppendFormattedDateTime(const std::unique_ptr<icu::DateFormat>& df,
                             const Time& now,
                             std::string* result) {
  icu::UnicodeString formatted;
  df->format(static_cast<UDate>(now.ToJsTime()), formatted).
      toUTF8String(*result);
}

}  // namespace

TEST_F(MessageFormatterTest, PluralNamedArgs) {
  const std::u16string pattern =
      u"{num_people, plural, "
      u"=0 {I met nobody in {place}.}"
      u"=1 {I met a person in {place}.}"
      u"other {I met # people in {place}.}}";

  std::string result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 0, "place", "Paris"));
  EXPECT_EQ("I met nobody in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 1, "place", "Paris"));
  EXPECT_EQ("I met a person in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 5, "place", "Paris"));
  EXPECT_EQ("I met 5 people in Paris.", result);
}

TEST_F(MessageFormatterTest, PluralNamedArgsWithOffset) {
  const std::u16string pattern =
      u"{num_people, plural, offset:1 "
      u"=0 {I met nobody in {place}.}"
      u"=1 {I met {person} in {place}.}"
      u"=2 {I met {person} and one other person in {place}.}"
      u"=13 {I met {person} and a dozen other people in {place}.}"
      u"other {I met {person} and # other people in {place}.}}";

  std::string result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 0, "place", "Paris"));
  EXPECT_EQ("I met nobody in Paris.", result);
  // {person} is ignored if {num_people} is 0.
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 0, "place", "Paris", "person", "Peter"));
  EXPECT_EQ("I met nobody in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 1, "place", "Paris", "person", "Peter"));
  EXPECT_EQ("I met Peter in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 2, "place", "Paris", "person", "Peter"));
  EXPECT_EQ("I met Peter and one other person in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 13, "place", "Paris", "person", "Peter"));
  EXPECT_EQ("I met Peter and a dozen other people in Paris.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNamedArgs(
      pattern, "num_people", 50, "place", "Paris", "person", "Peter"));
  EXPECT_EQ("I met Peter and 49 other people in Paris.", result);
}

TEST_F(MessageFormatterTest, PluralNumberedArgs) {
  const std::u16string pattern =
      u"{1, plural, "
      u"=1 {The cert for {0} expired yesterday.}"
      u"=7 {The cert for {0} expired a week ago.}"
      u"other {The cert for {0} expired # days ago.}}";

  std::string result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "example.com", 1));
  EXPECT_EQ("The cert for example.com expired yesterday.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "example.com", 7));
  EXPECT_EQ("The cert for example.com expired a week ago.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "example.com", 15));
  EXPECT_EQ("The cert for example.com expired 15 days ago.", result);
}

TEST_F(MessageFormatterTest, PluralNumberedArgsWithDate) {
  const std::u16string pattern =
      u"{1, plural, "
      u"=1 {The cert for {0} expired yesterday. Today is {2,date,full}}"
      u"other {The cert for {0} expired # days ago. Today is {2,date,full}}}";

  base::Time now = base::Time::Now();
  using icu::DateFormat;
  std::unique_ptr<DateFormat> df(
      DateFormat::createDateInstance(DateFormat::FULL));
  std::string second_sentence = " Today is ";
  AppendFormattedDateTime(df, now, &second_sentence);

  std::string result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "example.com", 1, now));
  EXPECT_EQ("The cert for example.com expired yesterday." + second_sentence,
            result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "example.com", 15, now));
  EXPECT_EQ("The cert for example.com expired 15 days ago." + second_sentence,
            result);
}

TEST_F(MessageFormatterTest, DateTimeAndNumber) {
  // Note that using 'mph' for all locales is not a good i18n practice.
  const std::u16string pattern =
      u"At {0,time, short} on {0,date, medium}, "
      u"there was {1} at building {2,number,integer}. "
      u"The speed of the wind was {3,number,###.#} mph.";

  using icu::DateFormat;
  std::unique_ptr<DateFormat> tf(
      DateFormat::createTimeInstance(DateFormat::SHORT));
  std::unique_ptr<DateFormat> df(
      DateFormat::createDateInstance(DateFormat::MEDIUM));

  base::Time now = base::Time::Now();
  std::string expected = "At ";
  AppendFormattedDateTime(tf, now, &expected);
  expected.append(" on ");
  AppendFormattedDateTime(df, now, &expected);
  expected.append(", there was an explosion at building 3. "
                  "The speed of the wind was 37.4 mph.");

  EXPECT_EQ(expected, UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, now, "an explosion", 3, 37.413)));
}

TEST_F(MessageFormatterTest, SelectorSingleOrMultiple) {
  const std::u16string pattern =
      u"{0, select,"
      u"single {Select a file to upload.}"
      u"multiple {Select files to upload.}"
      u"other {UNUSED}}";

  std::string result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "single"));
  EXPECT_EQ("Select a file to upload.", result);
  result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "multiple"));
  EXPECT_EQ("Select files to upload.", result);

  // fallback if a parameter is not selectors specified in the message pattern.
  result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs(
      pattern, "foobar"));
  EXPECT_EQ("UNUSED", result);
}

}  // namespace i18n
}  // namespace base


text:
namespace Bakery.Hashing
{
	using System;

	public static class HashCode
	{
		public static Int32 Of(Object @object, params Object[] objects)
		{
			// This is the largest prime number that can be represented with 32 bits. It was
			// discovered by Leonhard Euler in the year 1772.

			const Int32 PRIME_NUMBER = 0x7fffffff;

			unchecked
			{
				if (objects == null)
					throw new ArgumentNullException(nameof(objects));

				var hashCode = 0;

				if (@object != null)
					hashCode = @object.GetHashCode();

				for (var i = 0; i < objects.Length; i++)
				{
					if (objects[i] == null)
						continue;

					hashCode *= PRIME_NUMBER;
					hashCode += objects[i].GetHashCode();
				}

				return hashCode;
			}
		}
	}
}


text:
using System;
using System.Linq;
using Smidge.FileProcessors;
using Smidge.Models;

namespace Smidge.Nuglify
{

    /// <summary>
    /// Remove the minifiers from the pipeline if the file path matches the minified globbing pattern.
    /// </summary>
    public class NuglifyMinifiedFilePathConvention : IFileProcessingConvention
    {
        public IWebFile Apply(IWebFile file)
        {
            var pattern = file.DependencyType == WebFileType.Css ? "min.css" : "min.js";
            if (file.FilePath.EndsWith(pattern, StringComparison.OrdinalIgnoreCase))
            {
                var found = file.Pipeline.Processors.Where(x => x is NuglifyJs || x is NuglifyCss).ToList();
                if (found.Count > 0)
                {
                    // copy the pipeline
                    file.Pipeline = file.Pipeline.Copy();

                    // now modify the pipeline
                    foreach (var preProcessor in found)
                    {
                        file.Pipeline.Processors.Remove(preProcessor);
                    }
                }
            }
            return file;
        }
    }
}


text:
package org.zuinnote.flink.bitcoin.example

import org.apache.flink.api.java.utils.ParameterTool
import org.apache.flink.api.scala._
import org.apache.flink.core.fs.FileSystem

import org.zuinnote.flink.bitcoin._

import  org.zuinnote.hadoop.bitcoin.format.mapreduce.AbstractBitcoinRecordReader

/**
*
*/

object FlinkScalaBitcoinBlockCounter {
   def main(args: Array[String]): Unit = {
        val  env = ExecutionEnvironment.getExecutionEnvironment
        val params: ParameterTool = ParameterTool.fromArgs(args)
        countTotalTransactions(env,params.get("input"),params.get("output"))
        env.execute("Flink Scala Bitcoin transaction counter")
      }

      def countTotalTransactions(env: ExecutionEnvironment, inputFile: String, outputFile: String): Unit = {
        val inputFormat = new BitcoinBlockFlinkInputFormat(AbstractBitcoinRecordReader.DEFAULT_MAXSIZE_BITCOINBLOCK,"F9BEB4D9",false)
        val blockChainData = env.readFile(inputFormat, inputFile)
        val totalTransactionCounts = blockChainData.map{bitcoinBlock => ("Number of Transactions: ",bitcoinBlock.getTransactions().size())}
          .groupBy(0)
          .sum(1)

       totalTransactionCounts.writeAsText(outputFile,FileSystem.WriteMode.OVERWRITE)
     }

 }


text:
package org.jzy3d.plot3d.primitives;

import javax.media.opengl.GL2;
import javax.media.opengl.glu.GLU;

import org.jzy3d.colors.Color;
import org.jzy3d.colors.ISingleColorable;
import org.jzy3d.events.DrawableChangedEvent;
import org.jzy3d.maths.BoundingBox3d;
import org.jzy3d.maths.Coord3d;
import org.jzy3d.maths.Utils;
import org.jzy3d.plot3d.rendering.scene.Graph;
import org.jzy3d.plot3d.rendering.view.Camera;

/** A Point3d is a storage for a Coord3d and a Color that represents
 * a drawable 3d point.
 *

 * The Point3d is used for:
 *

 *
adding a Point3d to a {@link Graph}.
 *
providing to other primitives (e.g. {@link Polygon})
 * a way to associate a coordinate and a color.
 *

 *

 * A Point3d is defined by the following methods:
 *

 *
setData() defines the point's position
 *
setColor() defines the point's color
 *
setWidth() defines the point's width
 *

 *
 * @author Martin Pernollet
 *
 */
public class Point extends AbstractDrawable implements ISingleColorable{

	/** Intialize a point at the origin, with a white color and a width of 1.*/
	public Point(){
		this(Coord3d.ORIGIN, Color.WHITE, 1.0f);
	}

	/** Intialize a point with a white color and a width of 1.*/
	public Point(Coord3d xyz){
		this(xyz, Color.WHITE, 1.0f);
	}

	/** Intialize a point with a width of 1.*/
	public Point(Coord3d xyz, Color rgb){
		this(xyz, rgb, 1.0f);
	}

	public Point(Coord3d xyz, Color rgb, float width){
		bbox = new BoundingBox3d();
		setData(xyz);
		setWidth(width);
		setColor(rgb);
	}

	/**********************************************************************/

	public void draw(GL2 gl, GLU glu, Camera cam){
		if(transform!=null)
			transform.execute(gl);

		gl.glPointSize(width);

		gl.glBegin(GL2.GL_POINTS);
		gl.glColor4f(rgb.r, rgb.g, rgb.b, rgb.a);
		gl.glVertex3f(xyz.x, xyz.y, xyz.z);
		gl.glEnd();
	}

	/*********************************************************************/

	/**
	 * Set the coordinates of the point.
	 * @param xyz point's coordinates
	 */
	public void setData(Coord3d xyz){
		this.xyz = xyz;

		bbox.reset();
		bbox.add(this);
	}

	public void setColor(Color color){
		this.rgb = color;

		fireDrawableChanged(new DrawableChangedEvent(this, DrawableChangedEvent.FIELD_COLOR));
	}

	public Color getColor(){
		return rgb;
	}

	public void setWidth(float width){
		this.width = width;
	}

	public double getDistance(Camera camera){
		return xyz.distance(camera.getEye());
	}

	public double getShortestDistance(Camera camera){
		return xyz.distance(camera.getEye());
	}

	public double getLongestDistance(Camera camera){
		return xyz.distance(camera.getEye());
	}

	/**********************************************************************/

	public String toString(int depth){
		return (Utils.blanks(depth) + "(Point) coord=" + xyz + ", color=" + rgb);
	}

	/**********************************************************************/

	public Coord3d xyz;
	public Color   rgb;
	public float   width;
}


text:
<?php

namespace CodeProject\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    /**
     * The application's global HTTP middleware stack.
     *
     * @var array
     */
    protected $middleware = [
        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
        \CodeProject\Http\Middleware\EncryptCookies::class,
        \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,

    ];

    /**
     * The application's route middleware.
     *
     * @var array
     */
    protected $routeMiddleware = [
        'auth' => \CodeProject\Http\Middleware\Authenticate::class,
        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
        'guest' => \CodeProject\Http\Middleware\RedirectIfAuthenticated::class,
        'csrf'  => \CodeProject\Http\Middleware\VerifyCsrfToken::class,
    ];
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Serialized Form (smack-tcp 4.2.0-beta3-SNAPSHOT API)</title>
<meta name="date" content="2016-08-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Serialized Form

Package org.jivesoftware.smack.sm

Class org.jivesoftware.smack.sm.StreamManagementException extends org.jivesoftware.smack.SmackException implements Serializable

serialVersionUID:

3767590115788821101L

Class org.jivesoftware.smack.sm.StreamManagementException.StreamIdDoesNotMatchException extends StreamManagementException implements Serializable

serialVersionUID:

1191073341336559621L

Class org.jivesoftware.smack.sm.StreamManagementException.StreamManagementCounterError extends StreamManagementException implements Serializable

serialVersionUID:

1L

Serialized Fields

handledCount

long handledCount

previousServerHandledCount

long previousServerHandledCount

ackedStanzaCount

long ackedStanzaCount

outstandingStanzasCount

int outstandingStanzasCount

ackedStanzas

java.util.List<E> ackedStanzas

Class org.jivesoftware.smack.sm.StreamManagementException.StreamManagementNotEnabledException extends StreamManagementException implements Serializable

serialVersionUID:

2624821584352571307L

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
use clap::ArgMatches;
use environment::Environment;
use types::EthSpec;

use web3::{transports::Http, Web3};

pub fn run<T: EthSpec>(env: Environment<T>, matches: &ArgMatches<'_>) -> Result<(), String> {
    let eth1_http: String = clap_utils::parse_required(matches, "eth1-http")?;
    let confirmations: usize = clap_utils::parse_required(matches, "confirmations")?;
    let validator_count: Option<usize> = clap_utils::parse_optional(matches, "validator-count")?;

    let transport =
        Http::new(&eth1_http).map_err(|e| format!("Unable to connect to eth1 HTTP: {:?}", e))?;
    let web3 = Web3::new(transport);

    env.runtime().block_on(async {
        let contract = eth1_test_rig::DepositContract::deploy(web3, confirmations, None)
            .await
            .map_err(|e| format!("Failed to deploy deposit contract: {:?}", e))?;

        println!("Deposit contract address: {:?}", contract.address());

        // Deposit insecure validators to the deposit contract created
        if let Some(validator_count) = validator_count {
            let amount = env.eth2_config.spec.max_effective_balance;
            for i in 0..validator_count {
                println!("Submitting deposit for validator {}...", i);
                contract.deposit_deterministic_async::<T>(i, amount).await?;
            }
        }
        Ok(())
    })
}


text:
@implementation ARSettingsBaseViewController

NSString *SettingsCellReuse = @"SettingsCellReuse";

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self addBackButton];

    if (_tableView) {
        [_tableView reloadData];
        _tableView.bounces = NO;
        _tableView.separatorInset = UIEdgeInsetsZero;
    }
}

- (void)setTitle:(NSString *)title
{
    UILabel *titleView = (UILabel *)self.navigationItem.titleView;
    if (!titleView) {
        titleView = [[UILabel alloc] initWithFrame:CGRectZero];
        titleView.backgroundColor = [UIColor whiteColor];
        title = [title uppercaseString];

        titleView.font = [UIFont sansSerifFontWithSize:ARFontSansRegular];
        titleView.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.0];
        titleView.textColor = [UIColor blackColor];
        titleView.textAlignment = NSTextAlignmentCenter;

        self.navigationItem.titleView = titleView;
    }
    if ([titleView respondsToSelector:@selector(text)]) {
        titleView.text = [title uppercaseString];
    }
    [self.navigationItem.titleView sizeToFit];
}

#pragma mark stubs
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"warning %@", NSStringFromSelector(_cmd));

    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:SettingsCellReuse];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"warning %@", NSStringFromSelector(_cmd));
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    NSLog(@"warning %@", NSStringFromSelector(_cmd));
    return 0;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 0;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return [sectionHeaders count];
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
    return sectionHeaders[section];
}

- (void)addBackButton
{
    if ([self.navigationController.viewControllers count] > 1) {
        UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [backButton setBackgroundImage:[UIImage imageNamed:@"MenuBack"] forState:UIControlStateNormal];
        [backButton setBackgroundImage:[UIImage imageNamed:@"MenuBackSelected"] forState:UIControlStateHighlighted];
        backButton.titleLabel.font = [UIFont sansSerifFontWithSize:ARFontSansSmall];
        [backButton addTarget:self action:@selector(popViewController) forControlEvents:UIControlEventTouchUpInside];
        backButton.frame = CGRectMake(0, 0, 64, 32);
        backButton.accessibilityLabel = @"SettingsBackButton";
        UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
        self.navigationItem.hidesBackButton = YES;
        self.navigationItem.leftBarButtonItem = barButtonItem;
    }
}

- (void)popViewController
{
    [self.navigationController popViewControllerAnimated:YES];
}

@end


text:
comments: true
date: 2015-05-17 21:18:07+00:00
layout: post
slug: kivy-designer-development
title: Kivy Designer development
categories:
- Android
- iOS
- Python
tags:
- Android
- google
- gsoc
- ios
- kivy
- mobile
- python
- python2
- python3
- student
---

Hi!

I'm very happy to announce that I'll be developing the Kivy Designer in the next months. My proposal was accepted by Google Summer of Code, so I'll be developing a IDE to help mobile development with Python.

Take a look in my new blog, where I'm going to share the development process: [http://aron-bordin.github.io/kivy-designer](http://aron-bordin.github.io/kivy-designer)

And take a look in my roadmap here: [http://aron-bordin.github.io/kivy-designe/blog/kivy-designer-roadmap/](http://aron-bordin.github.io/kivy-designer/blog/kivy-designer-roadmap/)

I'll not be able to update this blog in the next months, busy :)

Thx for reading,

Aron Bordin.


text:
package org.apache.jena.engine.row;

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

import org.apache.jena.engine.Row ;
import org.apache.jena.engine.RowBuilder ;

import com.hp.hpl.jena.sparql.core.Var ;
/**
 * Implementation of Row based on a parent+chain of additonal bindings.
 */
public class RowVarBinding<X> implements Row<X> {
    // Companion builder?

    // Muttering about lack of tail recursion.
    private final Row<X> parentRow ;
    private final RowVarBinding<X> parent ;
    private final Var var ;
    private final X value ;
    private Collection<Var> vars = null ;

    public RowVarBinding(Row<X> parent, Var var, X value) {
        if ( parent instanceof RowVarBinding<?> ) {
            this.parent = (RowVarBinding<X>)parent ;
            this.parentRow = null ;
        } else {
            this.parent = null ;
            this.parentRow = parent ;
        }
        this.var = var ;
        this.value = value ;
    }

    public RowVarBinding(RowVarBinding<X> parent, Var var, X value) {
        this.parent = parent ;
        this.parentRow = null ;
        this.var = var ;
        this.value = value ;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder() ;
        sb.append("(") ;
        String sep = "" ;
        RowVarBinding<X> x = this ;
        for (;;) {
            sb.append(sep).append(x.var).append("=").append(x.value) ;
            sep = ", " ;
            if ( x.parent == null )
                break ;
            x = x.parent ;
        }
        sb.append("=>") ;
        sb.append(x.parentRow) ;
        sb.append(")") ;
        return sb.toString() ;
    }
    // Avoid excession tail recursion by looping on RowVarBinding's until a
    // a proper row is encountered.
    @Override
    public X get(Var var) {
        RowVarBinding<X> here = this ;
        for(;;) {
            if ( here.var.equals(var) )
                return here.value ;
            if ( here.parent == null )
                break ;
            here = here.parent ;
        }
        if ( here.parentRow != null ) return here.parentRow.get(var) ;
        return null ;
    }

    @Override
    public boolean contains(Var v) {
        return get(v) != null ;
    }
    @Override
    public Collection<Var> vars() {
        if ( vars == null ) {
            vars = new ArrayList<>() ;
            RowVarBinding<X> here = this ;
            for(;;) {
                vars.add(here.var) ;
                if ( here.parent == null )
                    break ;
                here = here.parent ;
            }
            if ( here.parentRow != null )
                vars.addAll(here.parentRow.vars()) ;
        }
        return vars ;
    }

    public Row<X> flatten(RowBuilder<X> rb) {
        RowVarBinding<X> here = this ;
        for (;;) {
            rb.add(here.var, here.value) ;
            if ( here.parent == null )
                break ;
            here = here.parent ;
        }
        if ( here.parentRow != null )
            rb.merge(here.parentRow) ;
        return rb.build() ;
    }

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

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

}


text:
package br.com.maplink2.webservices;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;

/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.6b21
 * Generated source version: 2.2
 *
 */
@WebServiceClient(name = "AddressFinder", targetNamespace = "http://webservices.maplink2.com.br", wsdlLocation = "http://localhost.maplink.com/addressFinder?wsdl")
public class AddressFinder
    extends Service
{

    private final static URL ADDRESSFINDER_WSDL_LOCATION;
    private final static WebServiceException ADDRESSFINDER_EXCEPTION;
    private final static QName ADDRESSFINDER_QNAME = new QName("http://webservices.maplink2.com.br", "AddressFinder");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("http://localhost.maplink.com/addressFinder?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        ADDRESSFINDER_WSDL_LOCATION = url;
        ADDRESSFINDER_EXCEPTION = e;
    }

    public AddressFinder() {
        super(__getWsdlLocation(), ADDRESSFINDER_QNAME);
    }

    /**
     *
     * @return
     *     returns AddressFinderSoap
     */
    @WebEndpoint(name = "AddressFinderSoap")
    public AddressFinderSoap getAddressFinderSoap() {
        return super.getPort(new QName("http://webservices.maplink2.com.br", "AddressFinderSoap"), AddressFinderSoap.class);
    }

    /**
     *
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the features parameter will have their default values.
     * @return
     *     returns AddressFinderSoap
     */
    @WebEndpoint(name = "AddressFinderSoap")
    public AddressFinderSoap getAddressFinderSoap(WebServiceFeature... features) {
        return super.getPort(new QName("http://webservices.maplink2.com.br", "AddressFinderSoap"), AddressFinderSoap.class, features);
    }

    private static URL __getWsdlLocation() {
        if (ADDRESSFINDER_EXCEPTION!= null) {
            throw ADDRESSFINDER_EXCEPTION;
        }
        return ADDRESSFINDER_WSDL_LOCATION;
    }

}


text:
package com.jeesms.manager.base;

import com.jeesms.annotation.Permission;
import com.jeesms.common.Constants;
import com.jeesms.dao.base.BaseDao;
import com.jeesms.entity.base.IdEntity;
import com.jeesms.exception.ServiceException;
import com.jeesms.persistence.Pager;
import com.jeesms.persistence.QueryFilter;
import com.jeesms.util.QueryUtils;
import com.jeesms.util.ReflectUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Restrictions;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 基础Manager
 * 没有继承GenericEntity的实体Mananger继承此类
 *
 * @param <Model>
 */
@Transactional
public abstract class BaseManager<Model extends IdEntity> {

    public abstract BaseDao<Model> getBaseDao();

    /**
     * 获取对象
     *
     * @param id
     * @return
     */
    public Model get(String id) {
        return getBaseDao().get(id);
    }

    /**
     * 保存或更新对象
     *
     * @param model
     */
    @Transactional(readOnly = false)
    @Permission(code = "${className}-edit")
    public void saveOrUpdate(Model model) {
        getBaseDao().saveOrUpdate(model);
    }

    /**
     * 删除对象
     *
     * @param ids
     */
    @Transactional(readOnly = false)
    @Permission(code = "${className}-delete")
    public void deleteByIds(final String ids) {
        Assert.hasText(ids, "ids不能为空!");
        String[] array = StringUtils.split(ids, Constants.STRING_SPLIT);
        for (String id : array) {
            Model entity = getBaseDao().get(id);
            if (entity == null) {
                throw new ServiceException(entity.getClass().getSimpleName() + "[" + id + "]" + "数据不存在");
            }
            delete(entity);
        }
    }

    @Transactional(readOnly = false)
    @Permission(code = "${className}-delete")
    public void delete(final Model entity) {
        getBaseDao().delete(entity);
    }

    /**
     * 分页查询
     *
     * @param page
     * @param rows
     * @param sort
     * @param order
     * @param request
     * @return
     */
    public Pager<Model> pageQueryDatas(int page, int rows, String sort, String order, HttpServletRequest request) {
        List<QueryFilter> queryFilters = QueryUtils.createQueryFilters(request);
        Class<?> genricClass = getDetachedCriteriaOfClass();
        DetachedCriteria detachedCriteria = DetachedCriteria.forClass(genricClass);
        //填充查询条件
        fillQueryConditionForDetachedCriteria(queryFilters, detachedCriteria);
        return getBaseDao().pageQueryDatas(page, rows, sort, order, detachedCriteria);
    }

    protected void fillQueryConditionForDetachedCriteria(List<QueryFilter> queryFilters, DetachedCriteria detachedCriteria) {
        if (CollectionUtils.isNotEmpty(queryFilters)) {
            for (QueryFilter qf : queryFilters) {
                String name = qf.getPropertyName();
                Object value = qf.getPropertyValue();
                switch (qf.getPropertyCondition()) {
                    case EQ:
                        detachedCriteria.add(Restrictions.eq(name, value));
                        break;
                    case NE:
                        detachedCriteria.add(Restrictions.ne(name, value));
                        break;
                    case GT:
                        detachedCriteria.add(Restrictions.gt(name, value));
                        break;
                    case GE:
                        detachedCriteria.add(Restrictions.ge(name, value));
                        break;
                    case LT:
                        detachedCriteria.add(Restrictions.lt(name, value));
                        break;
                    case LE:
                        detachedCriteria.add(Restrictions.le(name, value));
                        break;
                    case LIKE:
                        detachedCriteria.add(Restrictions.like(name, (String) value, MatchMode.ANYWHERE));
                        break;
                    case LIKES:
                        detachedCriteria.add(Restrictions.like(name, (String) value, MatchMode.START));
                        break;
                    case LIKEE:
                        detachedCriteria.add(Restrictions.like(name, (String) value, MatchMode.END));
                        break;
                    default:
                        break;
                }
            }
        }
    }

    /**
     * 获取泛型类
     *
     * @return
     */
    public Class getDetachedCriteriaOfClass() {
        Class genricClass = ReflectUtils.getSuperClassGenricType(super.getClass());
        return genricClass;
    }

    public Integer queryMaxOrderModel() {
        return getBaseDao().queryMaxOrderModel();
    }
}


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

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".ui.activity.MainActivity"
            android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar">
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.activity.CarDetailsActivity"
            android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar" />
    </application>

</manifest>


text:
class Xkeyboardconfig < Formula
  desc "Keyboard configuration database for the X Window System"
  homepage "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/"
  url "https://xorg.freedesktop.org/archive/individual/data/xkeyboard-config/xkeyboard-config-2.35.1.tar.xz"
  sha256 "18ce50ff0c74ae6093062bce1aeab3d363913ea35162fe271f8a0ce399de85cc"
  license "MIT"
  head "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, all: "b75845c115895b723228026a66e259049cee436a805f3013fa1b22966c3fcbc1"
  end

  depends_on "gettext" => :build
  depends_on "meson" => :build
  depends_on "ninja" => :build
  depends_on "pkg-config" => [:build, :test]
  depends_on "python@3.10" => :build

  uses_from_macos "libxslt" => :build

  def install
    mkdir "build" do
      system "meson", *std_meson_args, ".."
      system "ninja", "-v"
      system "ninja", "install", "-v"
    end
  end

  test do
    assert_predicate man7/"xkeyboard-config.7", :exist?
    assert_equal "#{share}/X11/xkb", shell_output("pkg-config --variable=xkb_base xkeyboard-config").chomp
    assert_match "Language-Team: English",
      shell_output("strings #{share}/locale/en_GB/LC_MESSAGES/xkeyboard-config.mo")
  end
end


text:
<!DOCTYPE html>

	   <meta charset="utf-8">
	   <meta http-equiv="X-UA-Compatible" content="IE=edge">
	   <meta name="viewport" content="width=device-width, initial-scale=1">
	   <title>P&P Proyectos - Proyectos con Sentido</title>

	   <link href="css/bootstrap.css" rel="stylesheet">
	   <link href="css/styles.css" rel="stylesheet">

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
              Toggle navigation

            </button>

INICIO

SERVICIOS

PROYECTOS

EL EQUIPO

CONTACTO

              <form class="form-inline">

                  Idioma/Language
                  <select id="selectLang1" class="form-control">
                    <option>Español</option>
                    <option>English</option>
                  </select>

              </form>

ESCRÍBANOS

Complete los siguientes datos y estaremos respondiendo a sus inquietudes a la brevedad.

            <form class="form-horizontal" action="process.php" method="post" id="contactForm">

                	Nombres

                  	<input id="cname" type="text" class="form-control" name="name" placeholder="Escriba su nombre" required>

               	Apellidos

                  	<input id="clastname" type="text" class="form-control" name="lastname" placeholder="Apellidos" requiered>

               	Email

                  <input id="cemail" type="email" class="form-control" name="email" placeholder="Email" required>

               	Su mensaje

                  	<textarea id="ccomment" class="form-control" name="message" rows="3" requiered></textarea>

                  	<button type="submit" class="btn btn-primary">ENVIAR DATOS</button>

            </form>

NUESTRAS OFICINAS

                  <address>
                    Carrera 7 No. 75-51 Oficina 302

                    PBX 519-0905

                    Bogotá, DC, Colombia

                    contacto@pyp-proyectos.com
                  </address>

Síganos en Instagram

        <address>
          P&P Proyectos S.A.S.

          Carrera 7 No. 75-51 Oficina 302

          Bogotá DC, Colombia

          PBX: 519-0905
        </address>


text:
<?php

Class CFriendsAccess implements CAccessInterface
{
    /**
	 * Method to check if a user is authorised to perform an action in this class
	 *
	 * @param	integer	$userId	Id of the user for which to check authorisation.
	 * @param	string	$action	The name of the action to authorise.
	 * @param	mixed	$asset	Name of the asset as a string.
	 *
	 * @return	boolean	True if authorised.
	 * @since	Jomsocial 2.4
	 */
	static public function authorise()
	{
		$args      = func_get_args();
		$assetName = array_shift ( $args );

		if (method_exists(__CLASS__,$assetName)) {
			return call_user_func_array(array(__CLASS__, $assetName), $args);
		} else {
			return null;
		}
	}

	/*
	 * This function will get the permission to view friend list
	 *
	 * @return : bool
	 */
    static public function friendsView($userId, $assetId)
	{
        $accesAllowed = CPrivacy::isAccessAllowed($userId, $assetId, 'user', 'privacyFriendsView');
        if(!$accesAllowed || ($userId == 0 && $assetId == 0)) {
            return false;
        }
        return true;
    }

	/*
	 * This function will get the permission to send private message
	 * @param type $userId
	 * @param type $assetId
	 * @return : bool
	 */
    static public function friendsPmView($userId, $assetId)
    {
		$config = CFactory::getConfig();

        if (($userId != $assetId) && $config->get('enablepm')) {
            return true;
        } else {
          return false;
        }
    }
}


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

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;

import com.google.common.base.Functions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.testing.EqualsTester;
import com.google.devtools.build.lib.actions.FileStateValue;
import com.google.devtools.build.lib.actions.FileValue;
import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.analysis.ServerDirectories;
import com.google.devtools.build.lib.analysis.util.AnalysisMock;
import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.events.NullEventHandler;
import com.google.devtools.build.lib.io.InconsistentFilesystemException;
import com.google.devtools.build.lib.packages.RuleClassProvider;
import com.google.devtools.build.lib.packages.WorkspaceFileValue;
import com.google.devtools.build.lib.pkgcache.PathPackageLocator;
import com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunction;
import com.google.devtools.build.lib.skyframe.ExternalFilesHelper.ExternalFileAction;
import com.google.devtools.build.lib.skyframe.GlobValue.InvalidGlobPatternException;
import com.google.devtools.build.lib.skyframe.PackageLookupFunction.CrossRepositoryLabelViolationStrategy;
import com.google.devtools.build.lib.testutil.ManualClock;
import com.google.devtools.build.lib.testutil.TestConstants;
import com.google.devtools.build.lib.util.io.TimestampGranularityMonitor;
import com.google.devtools.build.lib.vfs.DigestHashFunction;
import com.google.devtools.build.lib.vfs.Dirent;
import com.google.devtools.build.lib.vfs.FileStatus;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.RootedPath;
import com.google.devtools.build.lib.vfs.UnixGlob;
import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
import com.google.devtools.build.skyframe.ErrorInfo;
import com.google.devtools.build.skyframe.EvaluationContext;
import com.google.devtools.build.skyframe.EvaluationResult;
import com.google.devtools.build.skyframe.InMemoryMemoizingEvaluator;
import com.google.devtools.build.skyframe.MemoizingEvaluator;
import com.google.devtools.build.skyframe.RecordingDifferencer;
import com.google.devtools.build.skyframe.SequencedRecordingDifferencer;
import com.google.devtools.build.skyframe.SequentialBuildDriver;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyFunctionName;
import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.Nullable;
import net.starlark.java.eval.StarlarkSemantics;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/**
 * Tests for {@link GlobFunction}.
 */
public abstract class GlobFunctionTest {
  private static final EvaluationContext EVALUATION_OPTIONS =
      EvaluationContext.newBuilder()
          .setKeepGoing(false)
          .setNumThreads(SkyframeExecutor.DEFAULT_THREAD_COUNT)
          .setEventHandler(NullEventHandler.INSTANCE)
          .build();

  @RunWith(JUnit4.class)
  public static class GlobFunctionAlwaysUseDirListingTest extends GlobFunctionTest {
    @Override
    protected boolean alwaysUseDirListing() {
      return true;
    }
  }

  @RunWith(JUnit4.class)
  public static class RegularGlobFunctionTest extends GlobFunctionTest {
    @Override
    protected boolean alwaysUseDirListing() {
      return false;
    }
  }

  private CustomInMemoryFs fs;
  private MemoizingEvaluator evaluator;
  private SequentialBuildDriver driver;
  private RecordingDifferencer differencer;
  private Path root;
  private Path writableRoot;
  private Path outputBase;
  private Path pkgPath;
  private AtomicReference<PathPackageLocator> pkgLocator;

  private static final PackageIdentifier PKG_ID = PackageIdentifier.createInMainRepo("pkg");

  @Before
  public final void setUp() throws Exception  {
    fs = new CustomInMemoryFs(new ManualClock());
    root = fs.getPath("/root/workspace");
    writableRoot = fs.getPath("/writableRoot/workspace");
    outputBase = fs.getPath("/output_base");
    pkgPath = root.getRelative(PKG_ID.getPackageFragment());

    pkgLocator =
        new AtomicReference<>(
            new PathPackageLocator(
                outputBase,
                ImmutableList.of(Root.fromPath(writableRoot), Root.fromPath(root)),
                BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY));

    differencer = new SequencedRecordingDifferencer();
    evaluator = new InMemoryMemoizingEvaluator(createFunctionMap(), differencer);
    driver = new SequentialBuildDriver(evaluator);
    PrecomputedValue.BUILD_ID.set(differencer, UUID.randomUUID());
    PrecomputedValue.PATH_PACKAGE_LOCATOR.set(differencer, pkgLocator.get());
    PrecomputedValue.STARLARK_SEMANTICS.set(differencer, StarlarkSemantics.DEFAULT);
    RepositoryDelegatorFunction.RESOLVED_FILE_INSTEAD_OF_WORKSPACE.set(
        differencer, Optional.empty());
    RepositoryDelegatorFunction.ENABLE_BZLMOD.set(differencer, false);

    createTestFiles();
  }

  private Map<SkyFunctionName, SkyFunction> createFunctionMap() {
    AtomicReference<ImmutableSet<PackageIdentifier>> deletedPackages =
        new AtomicReference<>(ImmutableSet.<PackageIdentifier>of());
    BlazeDirectories directories =
        new BlazeDirectories(
            new ServerDirectories(root, root, root),
            root,
            /* defaultSystemJavabase= */ null,
            TestConstants.PRODUCT_NAME);
    ExternalFilesHelper externalFilesHelper =
        ExternalFilesHelper.createForTesting(
            pkgLocator,
            ExternalFileAction.DEPEND_ON_EXTERNAL_PKG_FOR_EXTERNAL_REPO_PATHS,
            directories);

    Map<SkyFunctionName, SkyFunction> skyFunctions = new HashMap<>();
    skyFunctions.put(SkyFunctions.GLOB, new GlobFunction(alwaysUseDirListing()));
    skyFunctions.put(
        SkyFunctions.DIRECTORY_LISTING_STATE,
        new DirectoryListingStateFunction(
            externalFilesHelper, new AtomicReference<>(UnixGlob.DEFAULT_SYSCALLS)));
    skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
    skyFunctions.put(
        SkyFunctions.PACKAGE_LOOKUP,
        new PackageLookupFunction(
            deletedPackages,
            CrossRepositoryLabelViolationStrategy.ERROR,
            BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY,
            BazelSkyframeExecutorConstants.EXTERNAL_PACKAGE_HELPER));
    skyFunctions.put(
        SkyFunctions.IGNORED_PACKAGE_PREFIXES,
        BazelSkyframeExecutorConstants.IGNORED_PACKAGE_PREFIXES_FUNCTION);
    skyFunctions.put(
        FileStateValue.FILE_STATE,
        new FileStateFunction(
            new AtomicReference<TimestampGranularityMonitor>(),
            new AtomicReference<>(UnixGlob.DEFAULT_SYSCALLS),
            externalFilesHelper));
    skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
    skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
    skyFunctions.put(
        SkyFunctions.DIRECTORY_LISTING_STATE,
        new DirectoryListingStateFunction(
            externalFilesHelper, new AtomicReference<>(UnixGlob.DEFAULT_SYSCALLS)));

    AnalysisMock analysisMock = AnalysisMock.get();
    RuleClassProvider ruleClassProvider = analysisMock.createRuleClassProvider();
    skyFunctions.put(
        WorkspaceFileValue.WORKSPACE_FILE,
        new WorkspaceFileFunction(
            ruleClassProvider,
            analysisMock
                .getPackageFactoryBuilderForTesting(directories)
                .build(ruleClassProvider, fs),
            directories,
            /*bzlLoadFunctionForInlining=*/ null));
    skyFunctions.put(
        SkyFunctions.EXTERNAL_PACKAGE,
        new ExternalPackageFunction(BazelSkyframeExecutorConstants.EXTERNAL_PACKAGE_HELPER));
    skyFunctions.put(
        SkyFunctions.LOCAL_REPOSITORY_LOOKUP,
        new LocalRepositoryLookupFunction(BazelSkyframeExecutorConstants.EXTERNAL_PACKAGE_HELPER));
    return skyFunctions;
  }

  protected abstract boolean alwaysUseDirListing();

  private void createTestFiles() throws IOException {
    FileSystemUtils.createDirectoryAndParents(pkgPath);
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("BUILD"));
    for (String dir :
        ImmutableList.of(
            "foo/bar/wiz", "foo/barnacle/wiz", "food/barnacle/wiz", "fool/barnacle/wiz")) {
      FileSystemUtils.createDirectoryAndParents(pkgPath.getRelative(dir));
    }
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/wiz/file"));

    // Used for testing the behavior of globbing into nested subpackages.
    for (String dir : ImmutableList.of("a1/b1/c", "a2/b2/c")) {
      FileSystemUtils.createDirectoryAndParents(pkgPath.getRelative(dir));
    }
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("a2/b2/BUILD"));
  }

  @Test
  public void testSimple() throws Exception {
    assertGlobMatches("food", /* => */ "food");
  }

  @Test
  public void testIgnoreList() throws Exception {
    FileSystemUtils.writeContentAsLatin1(root.getRelative(".bazelignore"), "pkg/foo/bar");
    assertGlobMatches("foo/**", "foo/barnacle/wiz", "foo/barnacle", "foo");
    differencer.invalidate(
        ImmutableList.of(
            FileStateValue.key(
                RootedPath.toRootedPath(
                    Root.fromPath(root), PathFragment.create(".bazelignore")))));

    FileSystemUtils.createEmptyFile(root.getRelative(".bazelignore"));
    assertGlobMatches(
        "foo/**",
        "foo/bar/wiz",
        "foo/bar/wiz/file",
        "foo/bar",
        "foo/barnacle/wiz",
        "foo/barnacle",
        "foo");
  }

  @Test
  public void testStartsWithStar() throws Exception {
    assertGlobMatches("*oo", /* => */ "foo");
  }

  @Test
  public void testStartsWithStarWithMiddleStar() throws Exception {
    assertGlobMatches("*f*o", /* => */ "foo");
  }

  @Test
  public void testSingleMatchEqual() throws Exception {
    assertGlobsEqual("*oo", "*f*o"); // both produce "foo"
  }

  @Test
  public void testEndsWithStar() throws Exception {
    assertGlobMatches("foo*", /* => */ "foo", "food", "fool");
  }

  @Test
  public void testEndsWithStarWithMiddleStar() throws Exception {
    assertGlobMatches("f*oo*", /* => */ "foo", "food", "fool");
  }

  @Test
  public void testMultipleMatchesEqual() throws Exception {
    assertGlobsEqual("foo*", "f*oo*"); // both produce "foo", "food", "fool"
  }

  @Test
  public void testMiddleStar() throws Exception {
    assertGlobMatches("f*o", /* => */ "foo");
  }

  @Test
  public void testTwoMiddleStars() throws Exception {
    assertGlobMatches("f*o*o", /* => */ "foo");
  }

  @Test
  public void testSingleStarPatternWithNamedChild() throws Exception {
    assertGlobMatches("*/bar", /* => */ "foo/bar");
  }

  @Test
  public void testDeepSubpackages() throws Exception {
    assertGlobMatches("*/*/c", /* => */ "a1/b1/c");
  }

  @Test
  public void testSingleStarPatternWithChildGlob() throws Exception {
    assertGlobMatches(
        "*/bar*", /* => */ "foo/bar", "foo/barnacle", "food/barnacle", "fool/barnacle");
  }

  @Test
  public void testSingleStarAsChildGlob() throws Exception {
    assertGlobMatches("foo/*/wiz", /* => */ "foo/bar/wiz", "foo/barnacle/wiz");
  }

  @Test
  public void testNoAsteriskAndFilesDontExist() throws Exception {
    // Note un-UNIX like semantics:
    assertGlobMatches("ceci/n'est/pas/une/globbe" /* => nothing */);
  }

  @Test
  public void testSingleAsteriskUnderNonexistentDirectory() throws Exception {
    // Note un-UNIX like semantics:
    assertGlobMatches("not-there/*" /* => nothing */);
  }

  @Test
  public void testDifferentGlobsSameResultEqual() throws Exception {
    // Once the globs are run, it doesn't matter what pattern ran; only the output.
    assertGlobsEqual("not-there/*", "syzygy/*"); // Both produce nothing.
  }

  @Test
  public void testGlobUnderFile() throws Exception {
    assertGlobMatches("foo/bar/wiz/file/*" /* => nothing */);
  }

  @Test
  public void testGlobEqualsHashCode() throws Exception {
    // Each "equality group" forms a set of elements that are all equals() to one another,
    // and also produce the same hashCode.
    new EqualsTester()
        .addEqualityGroup(runGlob(false, "no-such-file")) // Matches nothing.
        .addEqualityGroup(runGlob(false, "BUILD"), runGlob(true, "BUILD")) // Matches BUILD.
        .addEqualityGroup(runGlob(false, "**")) // Matches lots of things.
        .addEqualityGroup(
            runGlob(false, "f*o/bar*"),
            runGlob(false, "foo/bar*")) // Matches foo/bar and foo/barnacle.
        .testEquals();
  }

  @Test
  public void testGlobDoesNotCrossPackageBoundary() throws Exception {
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/BUILD"));
    // "foo/bar" should not be in the results because foo is a separate package.
    assertGlobMatches("f*/*", /* => */ "food/barnacle", "fool/barnacle");
  }

  @Test
  public void testGlobDirectoryMatchDoesNotCrossPackageBoundary() throws Exception {
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is a separate package.
    assertGlobMatches("foo/*", /* => */ "foo/barnacle");
  }

  @Test
  public void testStarStarDoesNotCrossPackageBoundary() throws Exception {
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is a separate package.
    assertGlobMatches("foo/**", /* => */ "foo/barnacle/wiz", "foo/barnacle", "foo");
  }

  @Test
  public void testGlobDoesNotCrossPackageBoundaryUnderOtherPackagePath() throws Exception {
    FileSystemUtils.createDirectoryAndParents(writableRoot.getRelative("pkg/foo/bar"));
    FileSystemUtils.createEmptyFile(writableRoot.getRelative("pkg/foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is detected as a separate package,
    // even though it is under a different package path.
    assertGlobMatches("foo/**", /* => */ "foo/barnacle/wiz", "foo/barnacle", "foo");
  }

  @Test
  public void testGlobDoesNotCrossRepositoryBoundary() throws Exception {
    FileSystemUtils.appendIsoLatin1(
        root.getRelative("WORKSPACE"), "local_repository(name='local', path='pkg/foo')");
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/WORKSPACE"));
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/BUILD"));
    // "foo/bar" should not be in the results because foo is a separate repository.
    assertGlobMatches("f*/*", /* => */ "food/barnacle", "fool/barnacle");
  }

  @Test
  public void testGlobDirectoryMatchDoesNotCrossRepositoryBoundary() throws Exception {
    FileSystemUtils.appendIsoLatin1(
        root.getRelative("WORKSPACE"), "local_repository(name='local', path='pkg/foo/bar')");
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/WORKSPACE"));
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is a separate repository.
    assertGlobMatches("foo/*", /* => */ "foo/barnacle");
  }

  @Test
  public void testStarStarDoesNotCrossRepositoryBoundary() throws Exception {
    FileSystemUtils.appendIsoLatin1(
        root.getRelative("WORKSPACE"), "local_repository(name='local', path='pkg/foo/bar')");
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/WORKSPACE"));
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is a separate repository.
    assertGlobMatches("foo/**", /* => */ "foo/barnacle/wiz", "foo/barnacle", "foo");
  }

  @Test
  public void testGlobDoesNotCrossRepositoryBoundaryUnderOtherPackagePath() throws Exception {
    FileSystemUtils.appendIsoLatin1(
        root.getRelative("WORKSPACE"),
        "local_repository(name='local', path='"
            + writableRoot.getRelative("pkg/foo/bar").getPathString()
            + "')");
    FileSystemUtils.createDirectoryAndParents(writableRoot.getRelative("pkg/foo/bar"));
    FileSystemUtils.createEmptyFile(writableRoot.getRelative("pkg/foo/bar/WORKSPACE"));
    FileSystemUtils.createEmptyFile(writableRoot.getRelative("pkg/foo/bar/BUILD"));
    // "foo/bar" should not be in the results because foo/bar is detected as a separate package,
    // even though it is under a different package path.
    assertGlobMatches("foo/**", /* => */ "foo/barnacle/wiz", "foo/barnacle", "foo");
  }

  private void assertGlobMatches(String pattern, String... expecteds) throws Exception {
    assertGlobMatches(false, pattern, expecteds);
  }

  private void assertGlobMatches(boolean excludeDirs, String pattern, String... expecteds)
      throws Exception {
    // The order requirement is not strictly necessary -- a change to GlobFunction semantics that
    // changes the output order is fine, but we require that the order be the same here to detect
    // potential non-determinism in output order, which would be bad.
    // The current order in the case of "**" or "*" is roughly that of nestedset.Order.STABLE_ORDER,
    // putting subdirectories before directories, but putting ordinary files after their parent
    // directories.
    assertThat(
            Iterables.transform(
                runGlob(excludeDirs, pattern).getMatches().toList(), Functions.toStringFunction()))
        .containsExactlyElementsIn(ImmutableList.copyOf(expecteds))
        .inOrder();
  }

  private void assertGlobWithoutDirsMatches(String pattern, String... expecteds) throws Exception {
    assertGlobMatches(true, pattern, expecteds);
  }

  private void assertGlobsEqual(String pattern1, String pattern2) throws Exception {
    GlobValue value1 = runGlob(false, pattern1);
    GlobValue value2 = runGlob(false, pattern2);
    new EqualsTester()
        .addEqualityGroup(value1, value2)
        .testEquals();
  }

  private GlobValue runGlob(boolean excludeDirs, String pattern) throws Exception {
    SkyKey skyKey =
        GlobValue.key(
            PKG_ID, Root.fromPath(root), pattern, excludeDirs, PathFragment.EMPTY_FRAGMENT);
    EvaluationResult<SkyValue> result =
        driver.evaluate(ImmutableList.of(skyKey), EVALUATION_OPTIONS);
    if (result.hasError()) {
      throw result.getError().getException();
    }
    return (GlobValue) result.get(skyKey);
  }

  @Test
  public void testGlobWithoutWildcards() throws Exception {
    String pattern = "foo/bar/wiz/file";

    assertGlobMatches(pattern, "foo/bar/wiz/file");
    // Ensure that the glob depends on the FileValue and not on the DirectoryListingValue.
    pkgPath.getRelative("foo/bar/wiz/file").delete();
    // Nothing has been invalidated yet, so the cached result is returned.
    assertGlobMatches(pattern, "foo/bar/wiz/file");

    if (alwaysUseDirListing()) {
      differencer.invalidate(
          ImmutableList.of(
              FileStateValue.key(
                  RootedPath.toRootedPath(
                      Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz/file")))));
      // The result should not rely on the FileStateValue, so it's still a cache hit.
      assertGlobMatches(pattern, "foo/bar/wiz/file");

      differencer.invalidate(
          ImmutableList.of(
              DirectoryListingStateValue.key(
                  RootedPath.toRootedPath(
                      Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz")))));
      // This should have invalidated the glob result.
      assertGlobMatches(pattern /* => nothing */);
    } else {
      differencer.invalidate(
          ImmutableList.of(
              DirectoryListingStateValue.key(
                  RootedPath.toRootedPath(
                      Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz")))));
      // The result should not rely on the DirectoryListingValue, so it's still a cache hit.
      assertGlobMatches(pattern, "foo/bar/wiz/file");

      differencer.invalidate(
          ImmutableList.of(
              FileStateValue.key(
                  RootedPath.toRootedPath(
                      Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz/file")))));
      // This should have invalidated the glob result.
      assertGlobMatches(pattern /* => nothing */);
    }
  }

  @Test
  public void testIllegalPatterns() throws Exception {
    assertIllegalPattern("foo**bar");
    assertIllegalPattern("?");
    assertIllegalPattern("");
    assertIllegalPattern(".");
    assertIllegalPattern("/foo");
    assertIllegalPattern("./foo");
    assertIllegalPattern("foo/");
    assertIllegalPattern("foo/./bar");
    assertIllegalPattern("../foo/bar");
    assertIllegalPattern("foo//bar");
  }

  @Test
  public void testIllegalRecursivePatterns() throws Exception {
    for (String prefix : Lists.newArrayList("", "*/", "**/", "ba/")) {
      String suffix = ("/" + prefix).substring(0, prefix.length());
      for (String pattern : Lists.newArrayList("**fo", "fo**", "**fo**", "fo**fo", "fo**fo**fo")) {
        assertIllegalPattern(prefix + pattern);
        assertIllegalPattern(pattern + suffix);
      }
    }
  }

  private void assertIllegalPattern(String pattern) {
    assertThrows(
        "invalid pattern not detected: " + pattern,
        InvalidGlobPatternException.class,
        () ->
            GlobValue.key(
                PKG_ID, Root.fromPath(root), pattern, false, PathFragment.EMPTY_FRAGMENT));
  }

  /**
   * Tests that globs can contain Java regular expression special characters
   */
  @Test
  public void testSpecialRegexCharacter() throws Exception {
    Path aDotB = pkgPath.getChild("a.b");
    FileSystemUtils.createEmptyFile(aDotB);
    FileSystemUtils.createEmptyFile(pkgPath.getChild("aab"));
    // Note: this contains two asterisks because otherwise a RE is not built,
    // as an optimization.
    assertThat(UnixGlob.forPath(pkgPath).addPattern("*a.b*").globInterruptible())
        .containsExactly(aDotB);
  }

  @Test
  public void testMatchesCallWithNoCache() {
    assertThat(UnixGlob.matches("*a*b", "CaCb", null)).isTrue();
  }

  @Test
  public void testHiddenFiles() throws Exception {
    for (String dir : ImmutableList.of(".hidden", "..also.hidden", "not.hidden")) {
      FileSystemUtils.createDirectoryAndParents(pkgPath.getRelative(dir));
    }
    // Note that these are not in the result: ".", ".."
    assertGlobMatches(
        "*", "..also.hidden", ".hidden", "BUILD", "a1", "a2", "foo", "food", "fool", "not.hidden");
    assertGlobMatches("*.hidden", "not.hidden");
  }

  @Test
  public void testDoubleStar() throws Exception {
    assertGlobMatches(
        "**",
        "a1/b1/c",
        "a1/b1",
        "a1",
        "a2",
        "foo/bar/wiz",
        "foo/bar/wiz/file",
        "foo/bar",
        "foo/barnacle/wiz",
        "foo/barnacle",
        "foo",
        "food/barnacle/wiz",
        "food/barnacle",
        "food",
        "fool/barnacle/wiz",
        "fool/barnacle",
        "fool",
        "BUILD");
  }

  @Test
  public void testDoubleStarExcludeDirs() throws Exception {
    assertGlobWithoutDirsMatches("**", "foo/bar/wiz/file", "BUILD");
  }

  @Test
  public void testDoubleDoubleStar() throws Exception {
    assertGlobMatches(
        "**/**",
        "a1/b1/c",
        "a1/b1",
        "a1",
        "a2",
        "foo/bar/wiz",
        "foo/bar/wiz/file",
        "foo/bar",
        "foo/barnacle/wiz",
        "foo/barnacle",
        "foo",
        "food/barnacle/wiz",
        "food/barnacle",
        "food",
        "fool/barnacle/wiz",
        "fool/barnacle",
        "fool",
        "BUILD");
  }

  @Test
  public void testDirectoryWithDoubleStar() throws Exception {
    assertGlobMatches(
        "foo/**",
        "foo/bar/wiz",
        "foo/bar/wiz/file",
        "foo/bar",
        "foo/barnacle/wiz",
        "foo/barnacle",
        "foo");
  }

  @Test
  public void testDoubleStarPatternWithNamedChild() throws Exception {
    assertGlobMatches("**/bar", "foo/bar");
  }

  @Test
  public void testDoubleStarPatternWithChildGlob() throws Exception {
    assertGlobMatches("**/ba*", "foo/bar", "foo/barnacle", "food/barnacle", "fool/barnacle");
  }

  @Test
  public void testDoubleStarAsChildGlob() throws Exception {
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("foo/barnacle/wiz/wiz"));
    FileSystemUtils.createDirectoryAndParents(pkgPath.getRelative("foo/barnacle/baz/wiz"));

    assertGlobMatches(
        "foo/**/wiz",
        "foo/bar/wiz",
        "foo/barnacle/wiz",
        "foo/barnacle/baz/wiz",
        "foo/barnacle/wiz/wiz");
  }

  @Test
  public void testDoubleStarUnderNonexistentDirectory() throws Exception {
    assertGlobMatches("not-there/**" /* => nothing */);
  }

  @Test
  public void testDoubleStarUnderFile() throws Exception {
    assertGlobMatches("foo/bar/wiz/file/**" /* => nothing */);
  }

  /** Regression test for b/13319874: Directory listing crash. */
  @Test
  public void testResilienceToFilesystemInconsistencies_directoryExistence() throws Exception {
    // Our custom filesystem says "pkgPath/BUILD" exists but "pkgPath" does not exist.
    fs.stubStat(pkgPath, null);
    RootedPath pkgRootedPath = RootedPath.toRootedPath(Root.fromPath(root), pkgPath);
    FileStateValue pkgDirFileStateValue = FileStateValue.create(pkgRootedPath, null);
    FileValue pkgDirValue =
        FileValue.value(
            ImmutableList.of(pkgRootedPath),
            null,
            null,
            pkgRootedPath,
            pkgDirFileStateValue,
            pkgRootedPath,
            pkgDirFileStateValue);
    differencer.inject(ImmutableMap.of(FileValue.key(pkgRootedPath), pkgDirValue));
    String expectedMessage = "/root/workspace/pkg is no longer an existing directory";
    SkyKey skyKey =
        GlobValue.key(PKG_ID, Root.fromPath(root), "*/foo", false, PathFragment.EMPTY_FRAGMENT);
    EvaluationResult<GlobValue> result =
        driver.evaluate(ImmutableList.of(skyKey), EVALUATION_OPTIONS);
    assertThat(result.hasError()).isTrue();
    ErrorInfo errorInfo = result.getError(skyKey);
    assertThat(errorInfo.getException()).isInstanceOf(InconsistentFilesystemException.class);
    assertThat(errorInfo.getException()).hasMessageThat().contains(expectedMessage);
  }

  @Test
  public void testResilienceToFilesystemInconsistencies_subdirectoryExistence() throws Exception {
    // Our custom filesystem says directory "pkgPath/foo/bar" contains a subdirectory "wiz" but a
    // direct stat on "pkgPath/foo/bar/wiz" says it does not exist.
    Path fooBarDir = pkgPath.getRelative("foo/bar");
    fs.stubStat(fooBarDir.getRelative("wiz"), null);
    RootedPath fooBarDirRootedPath = RootedPath.toRootedPath(Root.fromPath(root), fooBarDir);
    SkyValue fooBarDirListingValue =
        DirectoryListingStateValue.create(
            ImmutableList.of(new Dirent("wiz", Dirent.Type.DIRECTORY)));
    differencer.inject(
        ImmutableMap.of(
            DirectoryListingStateValue.key(fooBarDirRootedPath), fooBarDirListingValue));
    String expectedMessage = "/root/workspace/pkg/foo/bar/wiz is no longer an existing directory.";
    SkyKey skyKey =
        GlobValue.key(PKG_ID, Root.fromPath(root), "**/wiz", false, PathFragment.EMPTY_FRAGMENT);
    EvaluationResult<GlobValue> result =
        driver.evaluate(ImmutableList.of(skyKey), EVALUATION_OPTIONS);
    assertThat(result.hasError()).isTrue();
    ErrorInfo errorInfo = result.getError(skyKey);
    assertThat(errorInfo.getException()).isInstanceOf(InconsistentFilesystemException.class);
    assertThat(errorInfo.getException()).hasMessageThat().contains(expectedMessage);
  }

  @Test
  public void testResilienceToFilesystemInconsistencies_symlinkType() throws Exception {
    RootedPath wizRootedPath =
        RootedPath.toRootedPath(Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz"));
    RootedPath fileRootedPath =
        RootedPath.toRootedPath(Root.fromPath(root), pkgPath.getRelative("foo/bar/wiz/file"));
    final FileStatus realStat = fileRootedPath.asPath().stat();
    fs.stubStat(
        fileRootedPath.asPath(),
        new FileStatus() {

          @Override
          public boolean isFile() {
            // The stat says foo/bar/wiz/file is a real file, not a symlink.
            return true;
          }

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

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

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

          @Override
          public long getSize() throws IOException {
            return realStat.getSize();
          }

          @Override
          public long getLastModifiedTime() throws IOException {
            return realStat.getLastModifiedTime();
          }

          @Override
          public long getLastChangeTime() throws IOException {
            return realStat.getLastChangeTime();
          }

          @Override
          public long getNodeId() throws IOException {
            return realStat.getNodeId();
          }
        });
    // But the dir listing say foo/bar/wiz/file is a symlink.
    SkyValue wizDirListingValue =
        DirectoryListingStateValue.create(
            ImmutableList.of(new Dirent("file", Dirent.Type.SYMLINK)));
    differencer.inject(
        ImmutableMap.of(DirectoryListingStateValue.key(wizRootedPath), wizDirListingValue));
    String expectedMessage =
        "readdir and stat disagree about whether " + fileRootedPath.asPath() + " is a symlink";
    SkyKey skyKey =
        GlobValue.key(
            PKG_ID, Root.fromPath(root), "foo/bar/wiz/*", false, PathFragment.EMPTY_FRAGMENT);
    EvaluationResult<GlobValue> result =
        driver.evaluate(ImmutableList.of(skyKey), EVALUATION_OPTIONS);
    assertThat(result.hasError()).isTrue();
    ErrorInfo errorInfo = result.getError(skyKey);
    assertThat(errorInfo.getException()).isInstanceOf(InconsistentFilesystemException.class);
    assertThat(errorInfo.getException()).hasMessageThat().contains(expectedMessage);
  }

  @Test
  public void testSymlinks() throws Exception {
    FileSystemUtils.createDirectoryAndParents(pkgPath.getRelative("symlinks"));
    FileSystemUtils.ensureSymbolicLink(pkgPath.getRelative("symlinks/dangling.txt"), "nope");
    FileSystemUtils.createEmptyFile(pkgPath.getRelative("symlinks/yup"));
    FileSystemUtils.ensureSymbolicLink(pkgPath.getRelative("symlinks/existing.txt"), "yup");
    assertGlobMatches("symlinks/*.txt", "symlinks/existing.txt");
  }

  private static final class CustomInMemoryFs extends InMemoryFileSystem {

    private Map<PathFragment, FileStatus> stubbedStats = Maps.newHashMap();

    public CustomInMemoryFs(ManualClock manualClock) {
      super(manualClock, DigestHashFunction.SHA256);
    }

    public void stubStat(Path path, @Nullable FileStatus stubbedResult) {
      stubbedStats.put(path.asFragment(), stubbedResult);
    }

    @Override
    public FileStatus statIfFound(PathFragment path, boolean followSymlinks) throws IOException {
      if (stubbedStats.containsKey(path)) {
        return stubbedStats.get(path);
      }
      return super.statIfFound(path, followSymlinks);
    }
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 1991-2014 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
For terms of use, see http://www.unicode.org/copyright.html
-->
<ldml xmlns:sil="urn://www.sil.org/ldml/0.1">
	<identity>
		<version number="$Revision: 10739 $"/>
		<generation date="$Date: 2014-08-07 17:54 +0000 $"/>
		<language type="ts"/>
		<special>
			<sil:identity source="cldr" defaultRegion="ZA" script="Latn" draft="approved"/>
		</special>
	</identity>
	<localeDisplayNames>
		<languages>
			<language type="cs" draft="unconfirmed">Xi Czech</language>
			<language type="da" draft="unconfirmed">Xi Danish</language>
			<language type="de" draft="unconfirmed">Xi Jarimani</language>
			<language type="el" draft="unconfirmed">Xi Giriki</language>
			<language type="en" draft="unconfirmed">Xi Nghezi</language>
			<language type="es" draft="unconfirmed">Xi spain</language>
			<language type="et" draft="unconfirmed">hi xi Estonia</language>
			<language type="fi" draft="unconfirmed">Xi Finnish</language>
			<language type="fr" draft="unconfirmed">Xi Furwa</language>
			<language type="he" draft="unconfirmed">XiHeberu</language>
			<language type="hu" draft="unconfirmed">hi xi Hungary</language>
			<language type="is" draft="unconfirmed">hi xi Iceland</language>
			<language type="it" draft="unconfirmed">Xi Ithali</language>
			<language type="ja" draft="unconfirmed">Xi Japani</language>
			<language type="ko" draft="unconfirmed">Xikorea</language>
			<language type="lt" draft="unconfirmed">hi xi Lithuania</language>
			<language type="lv" draft="unconfirmed">hi xi Latvia</language>
			<language type="nl" draft="unconfirmed">Xi bunu</language>
			<language type="no" draft="unconfirmed">Xi Norway</language>
			<language type="pl" draft="unconfirmed">Xi Polixi</language>
			<language type="pt" draft="unconfirmed">Putukezi</language>
			<language type="ro" draft="unconfirmed">hi xi Romania</language>
			<language type="ru" draft="unconfirmed">Xi Rhaxiya</language>
			<language type="sv" draft="unconfirmed">Xi Swiden</language>
			<language type="ts" draft="provisional">Xitsonga</language>
		</languages>
	</localeDisplayNames>
	<characters>
		<exemplarCharacters>[a b c d e f g h i j k l m n o p q r s t u v w x y z]</exemplarCharacters>
		<exemplarCharacters type="index" draft="unconfirmed">[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]</exemplarCharacters>
	</characters>
	<delimiters>
		<quotationStart draft="unconfirmed">'</quotationStart>
		<quotationEnd draft="unconfirmed">'</quotationEnd>
		<alternateQuotationStart draft="unconfirmed">"</alternateQuotationStart>
		<alternateQuotationEnd draft="unconfirmed">"</alternateQuotationEnd>
	</delimiters>
	<dates>
		<calendars>
			<calendar type="gregorian">
				<months>
					<monthContext type="format">
						<monthWidth type="abbreviated">
							<month type="1" draft="unconfirmed">Sun</month>
							<month type="2" draft="unconfirmed">Yan</month>
							<month type="3" draft="unconfirmed">Kul</month>
							<month type="4" draft="unconfirmed">Dzi</month>
							<month type="5" draft="unconfirmed">Mud</month>
							<month type="6" draft="unconfirmed">Kho</month>
							<month type="7" draft="unconfirmed">Maw</month>
							<month type="8" draft="unconfirmed">Mha</month>
							<month type="9" draft="unconfirmed">Ndz</month>
							<month type="10" draft="unconfirmed">Nhl</month>
							<month type="11" draft="unconfirmed">Huk</month>
							<month type="12" draft="unconfirmed">N'w</month>
						</monthWidth>
						<monthWidth type="wide">
							<month type="1" draft="unconfirmed">Sunguti</month>
							<month type="2" draft="unconfirmed">Nyenyenyani</month>
							<month type="3" draft="unconfirmed">Nyenyankulu</month>
							<month type="4" draft="unconfirmed">Dzivamisoko</month>
							<month type="5" draft="unconfirmed">Mudyaxihi</month>
							<month type="6" draft="unconfirmed">Khotavuxika</month>
							<month type="7" draft="unconfirmed">Mawuwani</month>
							<month type="8" draft="unconfirmed">Mhawuri</month>
							<month type="9" draft="unconfirmed">Ndzhati</month>
							<month type="10" draft="unconfirmed">Nhlangula</month>
							<month type="11" draft="unconfirmed">Hukuri</month>
							<month type="12" draft="unconfirmed">N'wendzamhala</month>
						</monthWidth>
					</monthContext>
				</months>
				<days>
					<dayContext type="format">
						<dayWidth type="abbreviated">
							<day type="sun" draft="unconfirmed">Son</day>
							<day type="mon" draft="unconfirmed">Mus</day>
							<day type="tue" draft="unconfirmed">Bir</day>
							<day type="wed" draft="unconfirmed">Har</day>
							<day type="thu" draft="unconfirmed">Ne</day>
							<day type="fri" draft="unconfirmed">Tlh</day>
							<day type="sat" draft="unconfirmed">Mug</day>
						</dayWidth>
						<dayWidth type="wide">
							<day type="sun" draft="unconfirmed">Sonto</day>
							<day type="mon" draft="unconfirmed">Musumbhunuku</day>
							<day type="tue" draft="unconfirmed">Ravumbirhi</day>
							<day type="wed" draft="unconfirmed">Ravunharhu</day>
							<day type="thu" draft="unconfirmed">Ravumune</day>
							<day type="fri" draft="unconfirmed">Ravuntlhanu</day>
							<day type="sat" draft="unconfirmed">Mugqivela</day>
						</dayWidth>
					</dayContext>
				</days>
				<quarters>
					<quarterContext type="format">
						<quarterWidth type="abbreviated">
							<quarter type="1" draft="unconfirmed">K1</quarter>
							<quarter type="2" draft="unconfirmed">K2</quarter>
							<quarter type="3" draft="unconfirmed">K3</quarter>
							<quarter type="4" draft="unconfirmed">K4</quarter>
						</quarterWidth>
						<quarterWidth type="wide">
							<quarter type="1" draft="unconfirmed">Kotara yo sungula</quarter>
							<quarter type="2" draft="unconfirmed">Kotara ya vumbirhi</quarter>
							<quarter type="3" draft="unconfirmed">Kotara ya vunharhu</quarter>
							<quarter type="4" draft="unconfirmed">Kotara ya vumune</quarter>
						</quarterWidth>
					</quarterContext>
				</quarters>
			</calendar>
		</calendars>
	</dates>
	<numbers>
		<symbols numberSystem="latn">
			<decimal>,</decimal>
			<group/>
		</symbols>
		<currencyFormats numberSystem="latn">
			<currencyFormatLength>
				<currencyFormat type="standard">
					<pattern>¤#,##0.00</pattern>
				</currencyFormat>
			</currencyFormatLength>
		</currencyFormats>
		<currencies>
			<currency type="ZAR">
				<symbol>R</symbol>
			</currency>
		</currencies>
	</numbers>
	<metadata>
		<casingData>
			<casingItem type="language">titlecase</casingItem>
		</casingData>
	</metadata>
	<special>
		<sil:external-resources>
			<sil:font name="Charis SIL" types="default">
				<sil:url>https://wirl.api.sil.org/CharisSILReg&type=ttf</sil:url>
			</sil:font>
			<sil:font name="Noto Sans"><!--types="ui"-->
				<sil:url>https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSans/NotoSans-Regular.ttf</sil:url>
			</sil:font>
			<sil:font name="Noto Serif">
				<sil:url>https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSerif/NotoSerif-Regular.ttf</sil:url>
			</sil:font>
			<sil:sampletext type="udhr">
				<sil:url>https://unicode.org/udhr/d/udhr_tso_ZW.txt</sil:url>
			</sil:sampletext>
		</sil:external-resources>
	</special>
</ldml>


text:
//
//  NVBShowBeacon.h
//  Demo
//
//  Created by Alexandru Chis on 11/01/16.
//  Copyright (c) 2015 Alexandru Chis. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 * This class remembers for which of the proximy states, the promotion view was shown
 *
 */
@interface NVBShowBeacon : NSObject

@property (nonatomic, assign) BOOL hideImmediate; //if the view is hidden for the immediate proximity
@property (nonatomic, assign) BOOL hideNear; //if the view is hidden for the immediate proximity
@property (nonatomic, assign) BOOL hideFar; //if the view is hidden for the immediate proximity

-(void) reset; //we reset the fields, usually when the beacon object is newly detected or some previous actions must be discarded

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Windows.Forms;

using SolidWorks.Interop.sldworks;
using SolidWorks.Interop.swcommands;
using SolidWorks.Interop.swconst;
using SolidWorks.Interop.swpublished;
using SolidWorksTools;
/*
using SldWorks;
using SwCommands;
using SwConst;
using SWPublished;
*/

namespace ChronoEngine_SwAddin
{

[ComVisible(true)]
public class SWIntegration : ISwAddin
{
    public SldWorks mSWApplication;
    private int mSWCookie;
    private TaskpaneView mTaskpaneView;
    private SWTaskpaneHost mTaskpaneHost;

    public AttributeDef defattr_chbody = default(AttributeDef);
    //public AttributeDef defattr_chconveyor = default(AttributeDef);
    public AttributeDef defattr_test = default(AttributeDef);

    public bool ConnectToSW(object ThisSW, int Cookie)
    {
        //System.Windows.Forms.MessageBox.Show("Add-in: ConnectToSW");
        try
        {
            mSWApplication = (SldWorks)ThisSW;
            mSWCookie = Cookie;
            bool result = mSWApplication.SetAddinCallbackInfo(0, this, Cookie);

            // Attributes register

            defattr_chbody = (AttributeDef)mSWApplication.DefineAttribute("chrono_ChBody");
            defattr_chbody.AddParameter("friction",             (int)swParamType_e.swParamTypeDouble, 0.6, 0);
            defattr_chbody.AddParameter("rolling_friction",     (int)swParamType_e.swParamTypeDouble, 0, 0);
            defattr_chbody.AddParameter("spinning_friction",    (int)swParamType_e.swParamTypeDouble, 0, 0);
            defattr_chbody.AddParameter("restitution",          (int)swParamType_e.swParamTypeDouble, 0, 0);
            defattr_chbody.AddParameter("collision_on",         (int)swParamType_e.swParamTypeDouble, 1, 0);
            defattr_chbody.AddParameter("collision_margin",     (int)swParamType_e.swParamTypeDouble, 0.01, 0);
            defattr_chbody.AddParameter("collision_envelope",   (int)swParamType_e.swParamTypeDouble, 0.03, 0);
            defattr_chbody.AddParameter("collision_family",     (int)swParamType_e.swParamTypeDouble, 0, 0);
            defattr_chbody.Register();
            /*
            defattr_chconveyor = (AttributeDef)moSWApplication.DefineAttribute("chrono_ChConveyor");
            defattr_chconveyor.AddParameter("conveyor_speed",   (int)swParamType_e.swParamTypeDouble, 1.0, 0);
            defattr_chconveyor.Register();
            */

            // Register the taskpane
            this.UISetup();

            // Event register: here is an example of how to do...
            SldWorks moSWApplication = (SldWorks)mSWApplication;
            moSWApplication.ActiveDocChangeNotify += new DSldWorksEvents_ActiveDocChangeNotifyEventHandler(test_event_ActiveDocChangeNotify);
            moSWApplication.ActiveModelDocChangeNotify += new DSldWorksEvents_ActiveModelDocChangeNotifyEventHandler(test_event_ActiveModelDocChangeNotify);
        }
        catch (Exception ex)
        {
            System.Windows.Forms.MessageBox.Show("ConnectToSW failed! " + ex.Message);
        }

        return true;

    }

    public bool DisconnectFromSW()
    {
        this.UITeardown();
        return true;
    }
    private void UISetup()
    {
        mTaskpaneView = mSWApplication.CreateTaskpaneView2(string.Empty, "Chrono::Engine tools");
        mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID,"");
        mTaskpaneHost.mSWApplication = this.mSWApplication;
        mTaskpaneHost.mSWintegration = this;
    }
    private void UITeardown()
    {
        mTaskpaneHost = null;
        mTaskpaneView.DeleteView();
        Marshal.ReleaseComObject(mTaskpaneView);
        mTaskpaneView = null;
    }

    [ComRegisterFunction()]
    private static void ComRegister(Type t)
    {
        //System.Windows.Forms.MessageBox.Show("Add-in: ComRegister()");
        string keyPath = String.Format(@"SOFTWARE\SolidWorks\AddIns\{0:b}", t.GUID);
        using (Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine.CreateSubKey(keyPath))
        {
            rk.SetValue(null, 1); // Load at startup
            rk.SetValue("Title", "ChronoEngine SwAddin"); // Title
            rk.SetValue("Description", "Add-in for designing Chrono::Engine assets with SolidWorks"); // Description
        }
    }

    [ComUnregisterFunction()]
    private static void ComUnregister(Type t)
    {
        string keyPath = String.Format(@"SOFTWARE\SolidWorks\AddIns\{0:b}", t.GUID);
        Microsoft.Win32.Registry.LocalMachine.DeleteSubKeyTree(keyPath);
    }

    int test_event_ActiveDocChangeNotify()
    {
        //System.Windows.Forms.MessageBox.Show("ActiveDocChangeNotify");
        return 0;
    }
    int test_event_ActiveModelDocChangeNotify()
    {
        //System.Windows.Forms.MessageBox.Show("ActiveDocChangeNotify");
        return 0;
    }

}

} // end namespace


text:
require File.expand_path("../spec_helper", __FILE__)
require "ambry/active_model"

class Book
  extend Ambry::Model
  extend Ambry::ActiveModel
  field :slug, :title, :author
  validates_presence_of :slug
  validates_uniqueness_of :slug, :title
  before_save :save_callback_fired
  before_destroy :destroy_callback_fired

  def save_callback_fired
    @save_callback_fired = true
  end

  def destroy_callback_fired
    @destroy_callback_fired = true
  end
end

module ActiveModuleSupportSpecHelper
  def valid_book
    {:slug => "war-and-peace", :title => "War and Peace", :author => "Leo Tolstoy"}
  end

  def load_fixtures
    Ambry.adapters.clear
    Ambry::Adapter.new :name => :main
    Book.use :main
    @model = Book.create! valid_book
  end
end

describe Ambry::ActiveModel do

  before { load_fixtures }

  include ActiveModuleSupportSpecHelper
  include ActiveModel::Lint::Tests

  describe ".model_name" do
    it "should return an ActiveModel::Name" do
      assert_kind_of ::ActiveModel::Name, Book.model_name
    end
  end

  describe "#keys" do
    it "should return an array of attribute names" do
      assert @model.keys.include?(:slug), "@model.keys should include :slug"
    end
  end

  describe "#save!" do
    it "should raise an exception if the model is not valid" do
      assert_raises Ambry::AmbryError do
        Book.new.save!
      end
    end
  end

  describe "#create" do
    it "should not store invalid model instances" do
      old_count = Book.count
      Book.create({})
      assert_equal old_count, Book.count
    end
  end

  describe "#save" do
    it "should not store invalid model instances" do
      old_count = Book.count
      book = Book.new
      assert !book.valid?
      book.save
      assert_equal old_count, Book.count
    end
  end

  describe "#to_json" do
    it "should serialize" do
      json = @model.to_json
      refute_nil @model.to_json
      assert_match(/"author":"Leo Tolstoy"/, json)
    end
  end

  describe "#valid?" do
    it "should do validation" do
      book = Book.new
      refute book.valid?
      book.slug = "hello-world"
      assert book.valid?
    end
  end

  describe "callbacks" do
    it "should fire save callbacks" do
      Book.mapper.clear
      book = Book.new valid_book
      assert book.valid?
      book.save
      assert book.instance_variable_defined? :@save_callback_fired
    end

    it "should fire destroy callbacks" do
      @model.destroy
      assert @model.instance_variable_defined? :@destroy_callback_fired
    end
  end

  describe ".validates_uniqueness_of" do
    it "should validate on id attribute" do
      @book = Book.new valid_book.merge(:title => "War and Peace II")
      refute @book.valid?
      @book.slug = "war-and-peace-2"
      assert @book.valid?
    end

    it "should validate on non-id attribute" do
      @book = Book.new valid_book.merge(:slug => "war-and-peace-2")
      refute @book.valid?
      @book.title = "War and Peace II"
      assert @book.valid?
    end
  end

  describe "to_partial_path" do
    it "should return something reasonable" do
      assert_equal "books/book", Book.new.to_partial_path
    end
  end

end


text:
Adds tag filter control for layers (marker, geojson features etc.) to LeafLet. Check out the [demo](http://maydemirx.github.io/leaflet-tag-filter-button/)

[![](https://data.jsdelivr.com/v1/package/npm/leaflet-tag-filter-button/badge)](https://www.jsdelivr.com/package/npm/leaflet-tag-filter-button)

- [Usage](#usage)
  * [Set data from external url/ajax](#set-data-from-external-url-or-ajax)
  * [Selection complete callback](#selection-complete-callback)
- [API Docs](#api-docs)
    + [Options](#options)
    + [Methods](#methods)
- [Change Log](#change-log)
- [Authors](#authors)

# Usage

Required [Leaflet.EasyButton](https://github.com/CliffCloud/Leaflet.EasyButton)

Simple usage :

If your markers contains tags option the plugin filters them by selected tags when popup is closed
For example:

```

var map = L.map('map');

var fastMarker = L.marker([50.5, 30.5], { tags: ['fast'] }).addTo(map);
var slowMarker = L.marker([50.5, 30.5], { tags: ['slow'] }).addTo(map);
var bothMarker = L.marker([50.5, 30.5], { tags: ['fast', 'slow'] }).addTo(map);

L.control.tagFilterButton({
	data: ['fast', 'slow']
}).addTo( map );

```

## Set data from external url or ajax

*note: this option not implemented yet!*

```

var map = L.map('map');
L.tagFilterButton({
	ajaxData: function(callback) {
		$.get('https://leaflet-tag-filter-button.herokuapp.com/data', function(data)) {
			callback(data);
		}
	}
}).addTo( map );

```

## Selection complete callback

```

var map = L.map('map');
L.tagFilterButton({
	data: function(callback) {
		$.get('https://leaflet-tag-filter-button.herokuapp.com/data', function(data)) {
			callback(data);
		}
	},
	onSelectionComplete: function(tags) {
		console.log('selected tags are', tags);
	}
}).addTo( map );

```

# API Docs

### Options

Option                 | Type          | Default              | Description
-----------------------|---------------|----------------------|----------------------------
`icon`               | `String or HTML`  | `fa-filter`          | The button icon. Default is fa-filter. You can use html syntax for the icon for example `<img src="/filter.png">`
`onSelectionComplete`               | `Function`  | `null`    | The callback function for selected tags. It fires when popup is closed and sends selected tags to the callback function as a parameter.
`data`               | `Array or Function`  | `null`    | The data to be used for tags popup, it can be array or function. If it's a function, the function must return tags array.
`clearText`               | `String`  | `clear`    | The text of the clear button
`filterOnEveryClick`  | `Boolean`  | `false`    | if set as true the plugin do filtering operation on every click event on the checkboxes.
`openPopupOnHover`  | `Boolean`  | `false`    | if set as true, the popup that contains tags will be open at mouse over time.

### Methods

Method                          | Returns		| Description
--------------------------------|---------------|----------------------------
`update()`                      | `void`			| Updates markers with last selected tags.
`hasFiltered()`                 | `Boolean`		| returns true if any tag(s) selected otherwise false.
`registerCustomSource(<`[`Object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)`> source`) | `throws an exception if `source` has no name or `source.hide` function is not implemented`		| Registers `source` object for filtering markers by tags. If you want to to use this function you must implement `hide` function
`enablePruneCluster(<`[`PruneCluster`](https://github.com/SINTEF-9012/PruneCluster)`> pruneClusterInstance`) | `void`	| Searches markers for filtering on given `pruneClusterInstance` object
`resetCaches(<`[`Boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)`> update?`) | `void` | Resets internal caches. if the `update` parameter sent as true, the `update()` function will be call after cleaning the cache.
`addToReleated(<`[`TagFilterButton`](https://github.com/maydemirx/leaflet-tag-filter-button)`> tagFilterButton)` | `Boolean` | If it required to use multiple TagFilterButtons in the same map you must link two instance of TagFilterButtons by using this method. If linking is successful returns true otherwise returns false.

# Change Log

Please check the [Releases](https://github.com/maydemirx/leaflet-tag-filter-button/releases) page

# Authors

Thanks to [Contributors](https://github.com/maydemirx/leaflet-tag-filter-button/graphs/contributors)