text:
<!--
Copyright 2017 Next Century Corporation

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.
-->

<!doctype html>

<html>
<head>
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  <title>query-transformer</title>
  <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
  <script src="../bower_components/web-component-tester/browser.js"></script>
  <link rel="import" href="../elements/query-transformer/query-transformer.html">
</head>

<body>
<test-fixture id="query-transformer-fixture">
  <template>
    <query-transformer></query-transformer>
  </template>
</test-fixture>

<script>
  /* globals suite, setup, fixture, test, expect, flush */
  /* jshint -W030 */
  suite('query-transformer tests', function() {
    var element;

    setup(function() {
      element = fixture('query-transformer-fixture');
      element.demand = false;
    });

    test('properties are set to default values', function() {
      expect(element.error).to.not.exist;
      expect(element.loading).to.not.exist;
      expect(element.processRequest).to.not.exist;
      expect(element.resultFunction).to.not.exist;
      expect(element.results).to.not.exist;
      expect(element.searchFunction).to.not.exist;
      expect(element.searchParameters).to.not.exist;
      expect(element.url).to.not.exist;
      expect(element._body).to.not.exist;
      expect(element._response).to.not.exist;
      expect(element.page).to.equal(1);
      expect(element.pageSize).to.equal(25);
    });

    test('does have iron-ajax and json-transform elements', function() {
      expect(element.$$('iron-ajax')).to.exist;
      expect(element.$$('iron-ajax').getAttribute('content-type')).to.equal('application/json');
      expect(element.$$('iron-ajax').getAttribute('method')).to.equal('POST');
      expect(element.$$('json-transform')).to.exist;
    });

    test('_exists works', function() {
      expect(element._exists()).to.be.false;
      expect(element._exists(null)).to.be.false;
      expect(element._exists({})).to.be.true;
      expect(element._exists({
        type: {
          term: {
            text: 'test'
          }
        }
      })).to.be.true;
    });

    test('setting processRequest, searchFunction, and searchParameters does set _body', function() {
      element.processRequest = true;
      expect(element._body).to.not.exist;
      var functionCalled = false;
      element.searchFunction = function(page, pageSize, searchParameters) {
        expect(page).to.equal(element.page);
        expect(pageSize).to.equal(element.pageSize);
        expect(searchParameters).to.deep.equal(element.searchParameters);
        expect(element._body).to.not.exist;
        functionCalled = true;
        return 'body';
      };
      expect(element._body).to.not.exist;
      element.searchParameters = {
        type: {
          term: {
            enabled: true
          }
        }
      };
      expect(element._body).to.equal('body');
      expect(functionCalled).to.be.true;
    });

    test('setting processRequest to false does not set _body', function() {
      element.processRequest = false;
      expect(element._body).to.not.exist;
      var functionCalled = false;
      element.searchFunction = function() {
        functionCalled = true;
        return 'body';
      };
      expect(element._body).to.not.exist;
      element.searchParameters = {
        type: {
          term: {
            enabled: true
          }
        }
      };
      expect(element._body).to.not.exist;
      expect(functionCalled).to.be.false;
    });

    test('setting searchFunction to null does not set _body', function() {
      element.processRequest = true;
      expect(element._body).to.not.exist;
      element.searchFunction = null;
      expect(element._body).to.not.exist;
      element.searchParameters = {
        type: {
          term: {
            enabled: true
          }
        }
      };
      expect(element._body).to.not.exist;
    });

    test('setting empty searchParameters does not set _body', function() {
      element.processRequest = true;
      expect(element._body).to.not.exist;
      var functionCalled = false;
      element.searchFunction = function() {
        functionCalled = true;
        return 'body';
      };
      expect(element._body).to.not.exist;
      element.searchParameters = {};
      expect(element._body).to.not.exist;
      expect(functionCalled).to.be.false;
    });

    test('setting disabled searchParameters does not set _body', function() {
      element.processRequest = true;
      expect(element._body).to.not.exist;
      var functionCalled = false;
      element.searchFunction = function() {
        functionCalled = true;
        return 'body';
      };
      expect(element._body).to.not.exist;
      element.searchParameters = {
        type: {
          term: {
            enabled: false
          }
        }
      };
      expect(element._body).to.not.exist;
      expect(functionCalled).to.be.false;
    });

    test('setting empty searchParameters with demand does set _body', function() {
      element.demand = true;
      expect(element._body).to.not.exist;
      element.processRequest = true;
      expect(element._body).to.not.exist;
      var functionCalled = false;
      element.searchFunction = function() {
        functionCalled = true;
        return 'body';
      };
      expect(element._body).to.not.exist;
      element.searchParameters = {};
      expect(element._body).to.equal('body');
      expect(functionCalled).to.be.true;
    });

    test('error and results are set to null before _body is set', function() {
      element.error = 'error';
      element.results = 'results';

      element.processRequest = true;
      expect(element._body).to.not.exist;
      element.searchFunction = function() {
        expect(element.error).to.be.null;
        expect(element.results).to.be.null;
        return 'body';
      };
      element.searchParameters = {
        type: {
          term: {
            enabled: true
          }
        }
      };
      expect(element._body).to.equal('body');
    });

    test('_resetPage resets page property to 1', function() {
      element.page = 2;
      element._resetPage();

      expect(element.page).to.equal(1);
    });

    test('observer resets page to 1 when searchParameters are updated', function(done) {
      element.page = 2;
      element.searchParameters = {
        type: {
          term: {
            enabled: true
          }
        }
      };

      flush(function() {
        expect(element.page).to.equal(1);
        done();
      });
    });

  });
</script>
</body>
</html>


text:
package org.springframework.security.oauth2.server.resource.authentication;

import java.util.Collection;

import org.springframework.core.convert.converter.Converter;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
import org.springframework.security.oauth2.core.OAuth2Error;
import org.springframework.security.oauth2.jwt.Jwt;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.security.oauth2.jwt.JwtException;
import org.springframework.security.oauth2.server.resource.BearerTokenAuthenticationToken;
import org.springframework.security.oauth2.server.resource.BearerTokenError;
import org.springframework.security.oauth2.server.resource.BearerTokenErrorCodes;
import org.springframework.util.Assert;

/**
 * An {@link AuthenticationProvider} implementation of the {@link Jwt}-encoded
 * Bearer Tokens
 * for protecting OAuth 2.0 Resource Servers.
 *

 *

 * This {@link AuthenticationProvider} is responsible for decoding and verifying a {@link Jwt}-encoded access token,
 * returning its claims set as part of the {@link Authentication} statement.
 *

 *

 * Scopes are translated into {@link GrantedAuthority}s according to the following algorithm:
 *
 * 1. If there is a "scope" or "scp" attribute, then
 * 		if a {@link String}, then split by spaces and return, or
 * 		if a {@link Collection}, then simply return
 * 2. Take the resulting {@link Collection} of {@link String}s and prepend the "SCOPE_" keyword, adding
 * 		as {@link GrantedAuthority}s.
 *
 * @author Josh Cummings
 * @author Joe Grandja
 * @since 5.1
 * @see AuthenticationProvider
 * @see JwtDecoder
 */
public final class JwtAuthenticationProvider implements AuthenticationProvider {
	private final JwtDecoder jwtDecoder;

	private Converter<Jwt, ? extends AbstractAuthenticationToken> jwtAuthenticationConverter = new JwtAuthenticationConverter();

	private static final OAuth2Error DEFAULT_INVALID_TOKEN =
			invalidToken("An error occurred while attempting to decode the Jwt: Invalid token");

	public JwtAuthenticationProvider(JwtDecoder jwtDecoder) {
		Assert.notNull(jwtDecoder, "jwtDecoder cannot be null");
		this.jwtDecoder = jwtDecoder;
	}

	/**
	 * Decode and validate the
	 * Bearer Token.
	 *
	 * @param authentication the authentication request object.
	 *
	 * @return A successful authentication
	 * @throws AuthenticationException if authentication failed for some reason
	 */
	@Override
	public Authentication authenticate(Authentication authentication) throws AuthenticationException {
		BearerTokenAuthenticationToken bearer = (BearerTokenAuthenticationToken) authentication;

		Jwt jwt;
		try {
			jwt = this.jwtDecoder.decode(bearer.getToken());
		} catch (JwtException failed) {
			OAuth2Error invalidToken = invalidToken(failed.getMessage());
			throw new OAuth2AuthenticationException(invalidToken, invalidToken.getDescription(), failed);
		}

		AbstractAuthenticationToken token = this.jwtAuthenticationConverter.convert(jwt);
		token.setDetails(bearer.getDetails());

		return token;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public boolean supports(Class<?> authentication) {
		return BearerTokenAuthenticationToken.class.isAssignableFrom(authentication);
	}

	public void setJwtAuthenticationConverter(
			Converter<Jwt, ? extends AbstractAuthenticationToken> jwtAuthenticationConverter) {

		Assert.notNull(jwtAuthenticationConverter, "jwtAuthenticationConverter cannot be null");
		this.jwtAuthenticationConverter = jwtAuthenticationConverter;
	}

	private static OAuth2Error invalidToken(String message) {
		try {
			return new BearerTokenError(
					BearerTokenErrorCodes.INVALID_TOKEN,
					HttpStatus.UNAUTHORIZED,
					message,
					"https://tools.ietf.org/html/rfc6750#section-3.1");
		} catch (IllegalArgumentException malformed) {
			// some third-party library error messages are not suitable for RFC 6750's error message charset
			return DEFAULT_INVALID_TOKEN;
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
@implementation EnableLinkageServiceCmd
-(VIHOME_CMD)cmd
{
    return VIHOME_CMD_REPORT_LINKAGE;
}

-(NSDictionary *)payload
{
    if (self.userName) {
        [sendDic setObject:self.userName forKey:@"userName"];
    }
    if (self.linkageId) {
        [sendDic setObject:self.linkageId forKey:@"linkageId"];

    }

    return sendDic;

}
@end


text:
package space.harbour.l61.command;

import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

/**
 * Created by tully.
 */
public class Main {
    private Queue<Command> commandQueue = new ConcurrentLinkedQueue<>();

    public static void main(String[] args) {
        Main main = new Main();
        main.addCommand(new Command2Receiver("Out 1", new Receiver()));
        main.addCommand(new Command2Receiver("Out 2", new Receiver()));

        main.processCommands();
    }

    // add in thread 1
    private void addCommand(Command command) {
        commandQueue.add(command);
    }

    // process in thread 2
    // Invoker of the Command pattern.
    private void processCommands() {
        for (Command command : commandQueue) {
            command.execute();
        }
    }
}


text:
#pragma once

NS_ASSUME_NONNULL_BEGIN

/*!
 The 'WRLDOverlay' protocol provides a marker interface for geographic map
 content to be added to a map view. Overlays are data objects that define
 geographic information associated with a point or region on the map, allowing
 a visual representation to be displayed on a map view when the point or region
 comes into view. Several concrete classes adopt this protocol to define
 primitive shapes, such as polygons and polylines. An overlay object is added
 to a WRLDMapView by calling its addOverlay(_:) method.
 */
@protocol WRLDOverlay

@end

NS_ASSUME_NONNULL_END


text:
package data_structures;

import org.testng.Assert;
import org.testng.annotations.Test;

import java.util.regex.Pattern;

/**
 * Created by why on 4/28/2017.
 */
public class MyArrayStackTest {
  @Test
  public void testPush() throws Exception {

    MyArrayStack<String> stack = new MyArrayStack(20);
    stack.push("a");
    stack.push("b");
    stack.push("c");

    System.out.println(stack.size());

    System.out.println(stack.peek());
    System.out.println(stack.pop());
    System.out.println(stack.pop());
    System.out.println(stack.pop());
    System.out.println(stack.pop());

    Assert.assertEquals(stack.size, 0);

  }

  /**
   * 四则运算,把中缀表达式转化为后缀表达式
   * 输入:9+(3-1)*3+10/2
   * 输出:9 3 1 - 3 * + 10 2 / +
   */
  @Test
  public void testCalc() {
    String[] mathString = "9+(3-1)*3+10/2".split("");

    Pattern digitPattern = Pattern.compile("^[0-9]\\d*$");
//        System.out.println(digitPattern.matcher("").matches());

    boolean digit;
    boolean symbol = false;

    MyArrayStack<String> stack = new MyArrayStack<>(50);
    for (String s : mathString) {
      digit = digitPattern.matcher(s).matches();
      if (digit) {
        System.out.print(s);
        if (symbol) {
          System.out.print(" ");
        }
        symbol = false;
      } else {
        stack.push(s);
        symbol = true;
      }

      if (")".equals(stack.peek())) {
        while (true) {
          String pop = stack.pop();
          if (")".equals(pop))
            continue;
          else if ("(".equals(pop))
            break;
          System.out.print(" " + pop + " ");
        }
      }
    }
  }

}


text:
goog.declareModuleId('Blockly.test.eventCommentMove');

import {sharedTestSetup, sharedTestTeardown} from './test_helpers/setup_teardown.js';

suite('Comment Move Event', function() {
  setup(function() {
    sharedTestSetup.call(this);
    this.workspace = new Blockly.Workspace();
  });

  teardown(function() {
    sharedTestTeardown.call(this);
  });

  suite('Serialization', function() {
    test('events round-trip through JSON', function() {
      const comment =
          new Blockly.WorkspaceComment(this.workspace, 'test text', 10, 10);
      const origEvent = new Blockly.Events.CommentMove(comment);
      comment.moveBy(10, 10);
      origEvent.recordNew();

      const json = origEvent.toJson();
      const newEvent = new Blockly.Events.fromJson(json, this.workspace);
      delete origEvent.comment_;  // Ignore private properties.
      delete newEvent.comment_;  // Ignore private properties.

      chai.assert.deepEqual(newEvent, origEvent);
    });
  });
});


text:
<?php

/**
 * W3 Total Cache ExtensionsAdmin plugin
 */
if (!defined('W3TC')) {
    die();
}

w3_require_once(W3TC_LIB_W3_DIR . '/Plugin.php');

class W3_Plugin_ExtensionsAdmin extends W3_Plugin {

    public function run() {
        add_filter('w3tc_menu', array($this, 'menu'));
        add_action('w3tc_menu-w3tc_extensions', array($this, 'options'));

        add_action('after_setup_theme', array(
            $this,
            'maybe_deactivate_unsupported_extensions'));

        add_action('w3tc_saved_options', array(
            $this,
            'on_saved_options'), 10, 2);

        if (isset($_GET['page']) && $_GET['page'] == 'w3tc_extensions') {
            w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
            w3_extensions_admin_init();
            if (isset($_GET['extension']) && isset($_GET['action'])) {
                if (in_array($_GET['action'], array('activate', 'deactivate'))) {
                    add_action('init', array($this, 'change_extension_status'));
                }
            } elseif (isset($_POST['checked'])) {
                add_action('init', array($this, 'change_extensions_status'));
            }
        }
    }

    /**
     * Adds menu
     *
     * @param $menu
     * @return array
     */
    public function menu($menu) {
        $menu_item = array(
            'w3tc_extensions' => array(
                __('Extensions', 'w3-total-cache'),
                __('Extensions', 'w3-total-cache'),
                'network_show' => false
            )
        );
        return array_merge($menu, $menu_item);
    }

    /**
     * Loads options page and corresponding view
     */
    public function options() {
        /**
         * @var W3_UI_ExtensionsAdminView $options_dashboard
         */
        $options_dashboard = w3_instance('W3_UI_ExtensionsAdminView');
        $options_dashboard->options();
    }

    /**
     * Alters the active state of multiple extensions
     */
    public function change_extensions_status() {
        w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');
        $extensions = W3_Request::get_array('checked');
        $action = W3_Request::get('action');
        $all_extensions = w3_get_extensions($this->_config);
        $message = '';
        if ('activate-selected' == $action) {
            foreach ($extensions as $extension) {
                if ($this->activate($extension, $all_extensions))
                    $message .= '&activated=' . $extension;
            }
            wp_redirect(w3_admin_url(sprintf('admin.php?page=w3tc_extensions%s', $message)));
        } elseif ('deactivate-selected' == $action) {
            foreach ($extensions as $extension) {
                if ($this->deactivate($extension, $this->_config))
                    $message .= '&deactivated=' . $extension;
            }
            wp_redirect(w3_admin_url(sprintf('admin.php?page=w3tc_extensions%s', $message)));
        } else {
            wp_redirect(w3_admin_url('admin.php?page=w3tc_extensions'));
        }
    }

    /**
     * Alters the active state of an extension
     */
    public function change_extension_status() {
        $action = W3_Request::get_string('action');

        if (in_array($action, array('activate', 'deactivate'))) {
            w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');

            $extension = W3_Request::get_string('extension');
            $all_extensions = w3_get_extensions($this->_config);
            if ('activate' == $action) {
                $this->activate($extension, $all_extensions);
                wp_redirect(w3_admin_url(sprintf('admin.php?page=w3tc_extensions&activated=%s', $extension)));
            } elseif ('deactivate' == $action) {
                $this->deactivate($extension, $this->_config);
                wp_redirect(w3_admin_url(sprintf('admin.php?page=w3tc_extensions&deactivated=%s', $extension)));
            }
        }
    }

    /**
     * Maybe deactivates extensions which cannt be active according to current settings
     */
    public function maybe_deactivate_unsupported_extensions() {
        if (isset($_GET['activated']))   // page loaded after theme switch
            $this->deactivate_unsupported_extensions($this->_config);
    }

    /**
     * Saved options
     */
    public function on_saved_options($config, $admin_config) {
        $this->deactivate_unsupported_extensions($config, true);
    }

    /**
     * Deactivates extensions which cannt be active according to current settings
     */
    public function deactivate_unsupported_extensions($config, $dont_save_config = false) {
        w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');

        w3_extensions_admin_init();
        $all_extensions = w3_get_extensions($config);

        foreach ($all_extensions as $name => $descriptor) {
            if (!$descriptor['enabled']) {
                $this->deactivate($name, $config, $dont_save_config);
            }
        }
    }

    /**
     * @param $extension
     * @param $all_extensions
     * @return bool
     */
    private function activate($extension, $all_extensions) {
        $extensions = $this->_config->get_array('extensions.active');
        if (!w3_is_extension_active($extension)) {
            $meta = $all_extensions[$extension];
            $extensions[$extension] = $meta['path'];

            ksort($extensions, SORT_STRING);
            $this->_config->set('extensions.active', $extensions);
            try {
                $this->_config->save();
                do_action("w3tc_activate_extension-{$extension}");
                return true;
            } catch (Exception $ex) {}
        }
        return false;
    }

    /**
     * @param $extension
     * @return bool
     */
    private function deactivate($extension, $config, $dont_save_config = false) {
        $extensions = $config->get_array('extensions.active');
        if (array_key_exists($extension, $extensions)) {
            unset($extensions[$extension]);
            ksort($extensions, SORT_STRING);
            $config->set('extensions.active', $extensions);
            try {
                if (!$dont_save_config)
                    $config->save();
                do_action("w3tc_deactivate_extension-{$extension}");
                return true;
            } catch (Exception $ex) {}
        }
        return false;
    }
}


text:
This project is a simple text editor as Notepad.
In this is a project I was try to use the i18n, bundles and other kind  of L&F.

## Documentation
I will trying to write.

## Release notes
* Convert to Maven project
* Upgraded from JDK 1.6 to JDK 1.8
* License changed to Apache 2.0

##  System requirements
  JDK:
    1.8.
  Memory:
    N/A
  Disk:
    N/A
  Operating System:
    Windows:

    Unix-based systems (Linux, Solaris and Mac OS X) and others:

##  Install
  1.
  2.
  3.
  4.
  5.

## License
Please look at LICENSE file.


text:
[![Travis (.com)](https://api.travis-ci.com/[org_name]/[repo_url].svg?branch=develop)](https://travis-ci.com/github/[org_name]/[repo_url])

# My awesome plugin README example
Explain what your plugin does and who it's useful for.

## Example animated gif of usage if appropriate
![screenshot](https://user-images.githubusercontent.com/220864/99979953-97841d80-2d9f-11eb-9782-5f65817c58f4.PNG)

## Installing

```
npm install --no-save --legacy-peer-deps [plugin_name]
```

or Use the Etherpad ``/admin`` interface.

## Settings
Document settings if any

## Testing
Document how to run backend / frontend tests.

### Frontend

Visit http://whatever/tests/frontend/ to run the frontend tests.

### backend

Type ``cd src && npm run test`` to run the backend tests.

## LICENSE
Apache 2.0


text:
import { Component } from '@angular/core';

@Component({
  moduleId: module.id,
  selector: 'my-app',
  templateUrl: './app.component.html',
})
export class AppComponent {
  name = 'Angular';
   }


text:
<?php

/* FdrAdminBundle:Role:show.html.twig */
class __TwigTemplate_a9a14944ae2e46c8d9323f7773db33af7f9d1ae5d6eb0e50fddf779371b5627c extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        try {
            $this->parent = $this->env->loadTemplate("::base.html.twig");
        } catch (Twig_Error_Loader $e) {
            $e->setTemplateFile($this->getTemplateName());
            $e->setTemplateLine(1);

            throw $e;
        }

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'body' => array($this, 'block_body'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "::base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_title($context, array $blocks = array())
    {
        echo "Role|Show";
    }

    // line 3
    public function block_body($context, array $blocks = array())
    {
        // line 4
        echo "
Role

                Id
                ";
        // line 10
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "id", array()), "html", null, true);
        echo "

                Nomrole
                ";
        // line 14
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "nomRole", array()), "html", null, true);
        echo "

                Description
                ";
        // line 18
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "description", array()), "html", null, true);
        echo "

                Crudfdr
                ";
        // line 22
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDFDR", array()), "html", null, true);
        echo "

                Crudfdrpanne
                ";
        // line 26
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDFDRPanne", array()), "html", null, true);
        echo "

                Crudfdragence
                ";
        // line 30
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDFDRAgence", array()), "html", null, true);
        echo "

                Crudclientcompefdl
                ";
        // line 34
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDClientCompeFDL", array()), "html", null, true);
        echo "

                Crudclientnoncomptefdl
                ";
        // line 38
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDClientNonCompteFDL", array()), "html", null, true);
        echo "

                Affectationvehiculeaffr
                ";
        // line 42
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "affectationVehiculeAffr", array()), "html", null, true);
        echo "

                Cloturerfdr
                ";
        // line 46
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cloturerFDR", array()), "html", null, true);
        echo "

                Cloturerfdraffr
                ";
        // line 50
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cloturerFDRAffr", array()), "html", null, true);
        echo "

                Confrecdocctm
                ";
        // line 54
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "confRecDocCtm", array()), "html", null, true);
        echo "

                Confrecdocclient
                ";
        // line 58
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "confRecDocClient", array()), "html", null, true);
        echo "

                Editcompteur
                ";
        // line 62
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "editCompteur", array()), "html", null, true);
        echo "

                Pourcentageassurance
                ";
        // line 66
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "pourcentageAssurance", array()), "html", null, true);
        echo "

                Crudclient
                ";
        // line 70
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDClient", array()), "html", null, true);
        echo "

                Crudvehicule
                ";
        // line 74
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDVehicule", array()), "html", null, true);
        echo "

                Crudchauffeur
                ";
        // line 78
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDChauffeur", array()), "html", null, true);
        echo "

                Crudutilisateur
                ";
        // line 82
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDUtilisateur", array()), "html", null, true);
        echo "

                Cruddepot
                ";
        // line 86
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDDepot", array()), "html", null, true);
        echo "

                Crudfiliale
                ";
        // line 90
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDFiliale", array()), "html", null, true);
        echo "

                Crudmanutentionnaire
                ";
        // line 94
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDManutentionnaire", array()), "html", null, true);
        echo "

                Crudindisponibilite
                ";
        // line 98
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDIndisponibilite", array()), "html", null, true);
        echo "

                Cruditineraire
                ";
        // line 102
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDItineraire", array()), "html", null, true);
        echo "

                Crudprestation
                ";
        // line 106
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDPrestation", array()), "html", null, true);
        echo "

                Crudtypeprestation
                ";
        // line 110
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDTypePrestation", array()), "html", null, true);
        echo "

                Crudsecteur
                ";
        // line 114
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDSecteur", array()), "html", null, true);
        echo "

                Crudtypeconsommation
                ";
        // line 118
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "cRUDTypeConsommation", array()), "html", null, true);
        echo "

        env->getExtension('routing')->getPath("role");
        echo "\">
            Back to the list

        env, $this->env->getExtension('routing')->getPath("role_edit", array("id" => $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "id", array()))), "html", null, true);
        echo "\">
            Edit

";
        // line 134
        echo         $this->env->getExtension('form')->renderer->renderBlock((isset($context["delete_form"]) ? $context["delete_form"] : $this->getContext($context, "delete_form")), 'form');
        echo "

";
    }

    public function getTemplateName()
    {
        return "FdrAdminBundle:Role:show.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  268 => 134,  261 => 130,  253 => 125,  243 => 118,  236 => 114,  229 => 110,  222 => 106,  215 => 102,  208 => 98,  201 => 94,  194 => 90,  187 => 86,  180 => 82,  173 => 78,  166 => 74,  159 => 70,  152 => 66,  145 => 62,  138 => 58,  131 => 54,  124 => 50,  117 => 46,  110 => 42,  103 => 38,  96 => 34,  89 => 30,  82 => 26,  75 => 22,  68 => 18,  61 => 14,  54 => 10,  46 => 4,  43 => 3,  37 => 2,  11 => 1,);
    }
}


text:
/// <autosync enabled="true" />
/// <reference path="jquery-ui-1.11.4.js" />
/// <reference path="modernizr-2.6.2.js" />
/// <reference path="bootstrap.js" />
/// <reference path="respond.js" />
/// <reference path="jquery.validate.js" />
/// <reference path="jquery.validate.unobtrusive.js" />
/// <reference path="application/app.js" />
/// <reference path="tests/apptests.js" />
/// <reference path="jquery-2.1.3.js" />
/// <reference path="angular-touch.min.js" />
/// <reference path="angular-scenario.js" />
/// <reference path="angular-sanitize.min.js" />
/// <reference path="angular-route.min.js" />
/// <reference path="angular-resource.min.js" />
/// <reference path="angular-mocks.js" />
/// <reference path="angular-messages.min.js" />
/// <reference path="angular-loader.min.js" />
/// <reference path="angular-cookies.min.js" />
/// <reference path="angular-aria.min.js" />
/// <reference path="angular-animate.min.js" />
/// <reference path="angular.min.js" />
/// <reference path="jquery-ui-1.11.4.min.js" />
/// <reference path="application/start.js" />
/// <reference path="application/gulpfile.js" />
/// <reference path="application/build/start.js" />
/// <reference path="application/azure-js-sdk/tablequery.js" />
/// <reference path="application/azure-js-sdk/constants.js" />
/// <reference path="application/azure-js-sdk/edmtype.js" />
/// <reference path="application/azure-js-sdk/tableservice.js" />
/// <reference path="application/azure-js-sdk/validate.js" />
/// <reference path="application/azure-js-sdk/services/storageserviceclient.js" />
/// <reference path="application/azure-js-sdk/services/storageservicesettings.js" />
/// <reference path="application/azure-js-sdk/services/servicesettings.js" />
/// <reference path="application/azure-js-sdk/services/connectionstringparser.js" />
/// <reference path="application/azure-js-sdk/services/serviceclientconstants.js" />
/// <reference path="application/azure-js-sdk/logger.js" />
/// <reference path="application/azure-js-sdk/webresource.js" />
/// <reference path="application/azure-js-sdk/batchserviceclient.js" />
/// <reference path="application/azure-js-sdk/azure-common.js" />
/// <reference path="application/azure-js-sdk/azure-sdk-util.js" />
/// <reference path="application/atscommonutils.js" />
/// <reference path="application/azure-js-sdk/azure-storage.js" />
/// <reference path="cryptojs/enc-base64-min.js" />
/// <reference path="cryptojs/hmac-sha256.js" />
/// <reference path="application/azure-js-sdk/models/batchresult.js" />
/// <reference path="application/azure-js-sdk/models/entityresult.js" />
/// <reference path="application/azure-js-sdk/models/tableresult.js" />
/// <reference path="application/azure-js-sdk/internal/edmhandler.js" />
/// <reference path="application/azure-js-sdk/internal/odatahandler.js" />
/// <reference path="application/azure-js-sdk/internal/requesthandler.js" />
/// <reference path="application/azure-js-sdk/internal/sharedkeytable.js" />
/// <reference path="application/azure-js-sdk/tableutilities.js" />
/// <reference path="application/azure-js-sdk/sr.js" />
/// <reference path="application/azure-js-sdk/storageutilities.js" />
/// <reference path="application/azure-js-sdk/signing/sharedkeytable.js" />
/// <reference path="application/azure-js-sdk/signing/sharedkeylitetable.js" />
/// <reference path="application/azure-js-sdk/signing/hmacSha256Sign.js" />
/// <reference path="application/azure-js-sdk/signing/sharedkey.js" />
/// <reference path="application/azure-js-sdk/services/serviceclient.js" />
/// <reference path="application/azure-js-sdk/browser-request.js" />


text:
<?php

namespace twiger;

class Router{

	private $routes;

	public function __construct($routes){
		$this->routes = $routes;
	}

	public function handle($requestUri){
		foreach ($this->routes as $name => $route)
			if (preg_match($this->matcher($route['pattern']), $requestUri))
				return $this->params($route, $requestUri, $name);
	}

	public function matcher($requestUri){
		$matcher = addcslashes($requestUri, '/');
		$matcher = preg_replace('/({\w+})/', '\w+', $matcher);
		$matcher = '/('.$matcher.')$/A';
		return $matcher;
	}

	public function params($route, $requestUri, $name){
		$base = explode('/', $route['pattern']);
		$parametered = explode('/', $requestUri);
		for ($i=0; $i < count($base) ; $i++) {
			if (preg_match('/({\w+})/', $base[$i])) {
				$route['route_params'][substr($base[$i], 1, -1)] = $parametered[$i];
			}
		}
		$route['name'] = $name;
		$route['requestUri'] = $requestUri;
		return $route;
	}

}


text:
ragel -G2 src/ngx_http_xss_util.rl
if [ $? != 0 ]; then
    echo 'Failed to generate the ngx_http_xss_util.c.' 1>&2
    exit 1;
fi

root=`pwd`
home=~
version=$1
force=$2

ngx-build $force $version \
            --with-cc-opt="-O3 -funsigned-char" \
        --with-http_ssl_module \
            --without-mail_pop3_module \
            --without-mail_imap_module \
            --without-mail_smtp_module \
            --without-http_upstream_ip_hash_module \
            --without-http_empty_gif_module \
            --without-http_memcached_module \
            --without-http_referer_module \
            --without-http_autoindex_module \
            --without-http_auth_basic_module \
            --without-http_userid_module \
          --add-module=$home/git/echo-nginx-module \
          --add-module=$home/git/ndk-nginx-module \
          --add-module=$home/git/lua-nginx-module \
          --add-module=$root $opts \
          --with-debug
          #--with-cc-opt="-g3 -O0"
          #--add-module=$root/../echo-nginx-module \
  #--without-http_ssi_module  # we cannot disable ssi because echo_location_async depends on it (i dunno why?!)


text:
// Copyright 2016 Twitter. 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.twitter.heron.uploader.localfs;

import java.util.Map;

import com.twitter.heron.spi.common.Resource;

final class LocalFileSystemConfigKeys {

  // holds the mapping of keys to their corresponding key strings
  private static Map<String, Object> keys;

  // load the resource for config keys
  static {
    try {
      keys = Resource.load(
          "com.twitter.heron.uploader.localfs.LocalFileSystemConfigKeys",
          LocalFileSystemConstants.KEYS_YAML);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("Unable to load the local file system uploader keys class " + e);
    }
  }

  private LocalFileSystemConfigKeys() {
  }

  /*
   * Get the key string value for the given key
   *
   * @param key, the key
   * @return String, the key string value for the key
   */
  public static String get(String key) {
    return (String) keys.get(key);
  }
}


text:
package internal

import (
	"github.com/golang/protobuf/proto"
	netcontext "golang.org/x/net/context"
)

type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error

var callOverrideKey = "holds []CallOverrideFunc"

func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context {
	// We avoid appending to any existing call override
	// so we don't risk overwriting a popped stack below.
	var cofs []CallOverrideFunc
	if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok {
		cofs = append(cofs, uf...)
	}
	cofs = append(cofs, f)
	return netcontext.WithValue(ctx, &callOverrideKey, cofs)
}

func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) {
	cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc)
	if len(cofs) == 0 {
		return nil, nil, false
	}
	// We found a list of overrides; grab the last, and reconstitute a
	// context that will hide it.
	f := cofs[len(cofs)-1]
	ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1])
	return f, ctx, true
}

type logOverrideFunc func(level int64, format string, args ...interface{})

var logOverrideKey = "holds a logOverrideFunc"

func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context {
	return netcontext.WithValue(ctx, &logOverrideKey, f)
}

var appIDOverrideKey = "holds a string, being the full app ID"

func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context {
	return netcontext.WithValue(ctx, &appIDOverrideKey, appID)
}

var namespaceKey = "holds the namespace string"

func WithNamespace(ctx netcontext.Context, ns string) netcontext.Context {
	return netcontext.WithValue(ctx, &namespaceKey, ns)
}

func NamespaceFromContext(ctx netcontext.Context) string {
	// If there's no namespace, return the empty string.
	ns, _ := ctx.Value(&namespaceKey).(string)
	return ns
}

// FullyQualifiedAppID returns the fully-qualified application ID.
// This may contain a partition prefix (e.g. "s~" for High Replication apps),
// or a domain prefix (e.g. "example.com:").
func FullyQualifiedAppID(ctx netcontext.Context) string {
	if id, ok := ctx.Value(&appIDOverrideKey).(string); ok {
		return id
	}
	return fullyQualifiedAppID(ctx)
}

func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) {
	if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok {
		f(level, format, args...)
		return
	}
	logf(fromContext(ctx), level, format, args...)
}


text:
namespace web {
class WebState;
}

typedef void (^ProceduralBlockWithBool)(BOOL);

// This protocol must be implemented by all classes which may alter the DOM tree
// of a web page. Before altering the DOM, the class must call
// DOMAlteringLock::Acquire() and can only proceed if the lock is really
// acquired.
// After restoring the DOM tree, the class must call DOMAlteringLock::Release().
@protocol DOMAltering<NSObject>

// Method called when another class wants to acquire the lock.
// Return YES if the class is ready to restore the DOM tree to its initial state
// and release the lock. A call to `releaseDOMLockWithCompletionHandler:`
// will follow to do the actual cleaning.
// Return NO if the class wants to keep an exclusive access to the DOM tree.
// Other features must account for the fact that they may not be able to acquire
// a lock on the DOM and behave accordingly.
- (BOOL)canReleaseDOMLock;

// Method called when another class wants to acquire the lock.
// The class must restore the DOM tree, call DOMAlteringLock::Release() and then
// `completionHandler`.
- (void)releaseDOMLockWithCompletionHandler:(ProceduralBlock)completionHandler;

@end

class DOMAlteringLock : public web::WebStateUserData<DOMAlteringLock> {
 public:
  DOMAlteringLock(web::WebState* web_state);
  ~DOMAlteringLock() override;

  // This method must be called before altering the DOM of the page. This will
  // ensure that only one class tries to alter the page at a time.
  // The completion handler is called with YES if the lock was acquired, or NO
  // if it could not.
  // This method must be called on the UI thread.
  void Acquire(id<DOMAltering> feature, ProceduralBlockWithBool lockAction);

  // Releases the lock on the DOM tree.
  // The lock is always released, even if it was acquired multiple times.
  // This method must be called on the UI thread.
  void Release(id<DOMAltering> feature);

 private:
  friend class web::WebStateUserData<DOMAlteringLock>;

  // DOMAltering object currently having the lock.
  __weak id<DOMAltering> current_dom_altering_feature_ = nil;
  WEB_STATE_USER_DATA_KEY_DECL();
};

#endif  // IOS_CHROME_BROWSER_WEB_DOM_ALTERING_LOCK_H_


text:
RssReader
=========

A simple RSS XML Parser android application and widget.


text:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApi02ListUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('api-02-list-users', function (Blueprint $table) {
            $table->unsignedBigInteger('id')->unique();
            $table->mediumText('id_str');
            $table->text('name');
            $table->text('location')->nullable();
            $table->text('screen_name');
            $table->text('description')->nullable();
            $table->text('url')->nullable();
            $table->mediumText('entities')->nullable();
            $table->unsignedTinyInteger('protected');
            $table->mediumInteger('followers_count')->default(0);
            $table->mediumInteger('friends_count')->default(0);
            $table->integer('listed_count')->default(0)->nullable();
            $table->dateTime('created_at');
            $table->mediumInteger('favourites_count')->default(0)->nullable();
            $table->integer('utc_offset')->nullable();
            $table->string('time_zone')->nullable();
            $table->unsignedTinyInteger('geo_enabled');
            $table->unsignedTinyInteger('verified');
            $table->mediumInteger('statuses_count')->default(0)->nullable();
            $table->text('lang')->nullable();
            $table->mediumText('status')->nullable();
            $table->unsignedTinyInteger('contributors_enabled');
            $table->unsignedTinyInteger('is_translator');
            $table->unsignedTinyInteger('is_translation_enabled');
            $table->text('profile_background_color')->nullable();
            $table->text('profile_background_image_url')->nullable();
            $table->text('profile_background_image_url_https')->nullable();
            $table->unsignedTinyInteger('profile_background_tile')->nullable();
            $table->text('profile_image_url')->nullable();
            $table->text('profile_image_url_https')->nullable();
            $table->text('profile_banner_url')->nullable();
            $table->text('profile_link_color')->nullable();
            $table->text('profile_sidebar_border_color')->nullable();
            $table->text('profile_sidebar_fill_color')->nullable();
            $table->text('profile_text_color')->nullable();
            $table->unsignedTinyInteger('profile_use_background_image');
            $table->unsignedTinyInteger('has_extended_profile');
            $table->unsignedTinyInteger('default_profile');
            $table->unsignedTinyInteger('default_profile_image');
            $table->unsignedTinyInteger('following');
            $table->unsignedTinyInteger('follow_request_sent');
            $table->unsignedTinyInteger('notifications');
            $table->text('translator_type')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('api-02-list-users');
    }
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:orientation="vertical" >

        <Button
            android:id="@+id/button_cifar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/button_cifar" />

        <Button
            android:id="@+id/button_image_cifar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/button_image_cifar" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_margin="5dp"
        android:background="@android:color/holo_blue_dark"
        android:orientation="vertical" >

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/statement"
            android:textColor="@android:color/primary_text_dark" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/cifar10_web"
            android:textColor="@android:color/primary_text_dark" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/cifar10_cite"
            android:textColor="@android:color/primary_text_dark" />
    </LinearLayout>

</RelativeLayout>


text:
import hyperstyle as cssx
from definitions import definitions
import unittest

class TestCr(unittest.TestCase):
    def expect(self, source, expected):
        output = cssx.expand_statement(source)
        self.assertEqual(output, expected)

    def test_unparseables(self):
        self.expect('aoeu', None)

    def test_display_block(self):
        self.expect('db', 'display: block')

    def test_ms_units(self):
        self.expect('tdur300', 'transition-duration: 300ms')

    def test_display_block_with_indent(self):
        self.expect('  db', '  display: block')

    def test_double_semicolon(self):
        self.expect('  position: fixed', '  position: fixed')

    def test_dont_expand_p(self):
        self.expect('  p', None)

    def test_mopobo(self):
        self.expect('m0', 'margin: 0')
        self.expect('b0', 'border: 0')
        self.expect('p0', 'padding: 0')

    def test_unparseables_with_indent(self):
        self.expect('  aoeu', None)

    def test_numeric(self):
        self.expect('m0', 'margin: 0')

    def test_z_index(self):
        self.expect('zi0', 'z-index: 0')
        self.expect('z0', 'z-index: 0')

    def _test_multi_numeric(self):
        self.expect('m0 3px', 'margin: 0 3px')

    def test_numeric_with_em_as_default_unit(self):
        self.expect('fs3', 'font-size: 3em')

    def test_numeric_with_unitless_values(self):
        self.expect('lh3', 'line-height: 3')

    def test_numeric_with_unitless_values_and_decimal_point(self):
        self.expect('lh1.5', 'line-height: 1.5')

    def test_numeric_with_implied_unit(self):
        self.expect('w10', 'width: 10px')

    def test_border_0(self):
        self.expect('b0', 'border: 0')

    def test_skip_non_numeric_properties(self):
        self.expect('fw0', None)

    def test_numeric_negative_with_implied_value(self):
        self.expect('w-10', 'width: -10px')

    def test_numeric_em_short(self):
        self.expect('m2m', 'margin: 2em')

    def test_numeric_em_short(self):
        self.expect('m2e', 'margin: 2em')

    def test_numeric_em(self):
        self.expect('m2em', 'margin: 2em')

    def test_numeric_decimal_em(self):
        self.expect('m2.5m', 'margin: 2.5em')

    def test_auto_comma(self):
        self.expect('  font-weight: 400', '  font-weight: 400')

    def test_auto_space(self):
        self.expect('  font-weight:400', '  font-weight: 400')

    def test_auto_space_2(self):
        self.expect('  opacity:1', '  opacity: 1')

    def test_auto_space_unknown_property(self):
        self.expect('  x-y:1', '  x-y: 1')

    def test_autocomplete_values(self):
        self.expect('  float: l', '  float: left')

    def test_flex(self):
        # should not mess with flex: property
        self.expect('flex', 'display: flex')

    def test_flex_grow(self):
        self.expect('fgrow1', 'flex-grow: 1')

    def test_flex_grow_short(self):
        self.expect('fg1', 'flex-grow: 1')

    def test_flex_grow_short(self):
        self.expect('fwrap', 'flex-wrap: wrap')

    def test_expand_units(self):
        self.expect('width: 3', 'width: 3px')

    def test_expand_units_no_space(self):
        self.expect('width:3', 'width: 3px')

    def test_position(self):
        self.expect('abs', 'position: absolute')
        self.expect('rel', 'position: relative')

    def test_z_index_number(self):
        self.expect('z9', 'z-index: 9')

    def test_opacity_number(self):
        self.expect('op0.5', 'opacity: 0.5')

    def test_rtl(self):
        self.expect('rtl', 'direction: rtl')

    def test_zoom_number(self):
        self.expect('zo1', 'zoom: 1')

    def test_font_weights(self):
        self.expect('f1', 'font-weight: 100')
        self.expect('fw1', 'font-weight: 100')
        self.expect('fw100', 'font-weight: 100')
        self.expect('f100', 'font-weight: 100')
        self.expect('under', 'text-decoration: underline')

    def test_misc(self):
        self.expect('oh', 'overflow: hidden')
        self.expect('os', 'overflow: scroll')
        self.expect('mo', 'margin: 0')
        self.expect('moa', 'margin: 0 auto')
        self.expect('fn', 'float: none')
        self.expect('fl', 'float: left')

    def test_leave_selectors_alone(self):
        self.expect('p:before', None)
        self.expect('p:hover', None)
        self.expect('p::placeholder', None)
        self.expect('cursor:w{', None)

class TestSpace(unittest.TestCase):
    def expect(self, source, expected):
        output = cssx.expand_property(source)
        self.assertEqual(output, expected)

    def test_simple(self):
        self.expect('m', 'margin:')

    def test_display(self):
        self.expect('d', 'display:')

    def test_border_right(self):
        self.expect('bri', 'border-right:')

    def test_blacklist_of_br(self):
        # Because `br` is a tag. Use `bri`.
        self.expect('br', None)

    def test_display_fuzzying(self):
        self.expect('dis', 'display:')
        self.expect('disp', 'display:')
        self.expect('displ', 'display:')

    def test_alias_fuzzying(self):
        self.expect('bgcolor', 'background-color:')

    def test_border(self):
        self.expect('bor', 'border:')

    def test_simple_2(self):
        self.expect('tt', 'text-transform:')

    def test_expansion_with_hyphens(self):
        self.expect('border-co', 'border-color:')
        self.expect('borco', 'border-color:')

    def test_font_shortcuts(self):
        self.expect('fow', 'font-weight:')
        self.expect('fw', 'font-weight:')
        self.expect('fos', 'font-size:')
        self.expect('fs', 'font-size:')
        self.expect('fost', 'font-style:')
        self.expect('fst', 'font-style:')
        self.expect('fova', 'font-variant:')
        self.expect('fov', 'font-variant:')
        self.expect('fv', 'font-variant:')
        self.expect('fvar', 'font-variant:')

    def test_padding_shortcuts(self):
        self.expect('pad', 'padding:')
        self.expect('padt', 'padding-top:')
        self.expect('padl', 'padding-left:')
        self.expect('padb', 'padding-bottom:')
        self.expect('padr', 'padding-right:')
        self.expect('padt', 'padding-top:')
        self.expect('padl', 'padding-left:')
        self.expect('padb', 'padding-bottom:')
        self.expect('padr', 'padding-right:')

    def test_margin_shortcuts(self):
        self.expect('mar', 'margin:')
        self.expect('mart', 'margin-top:')
        self.expect('marl', 'margin-left:')
        self.expect('marb', 'margin-bottom:')
        self.expect('marr', 'margin-right:')
        self.expect('mt', 'margin-top:')
        self.expect('ml', 'margin-left:')
        self.expect('mb', 'margin-bottom:')
        self.expect('mr', 'margin-right:')

    def test_border_shortcuts(self):
        self.expect('boc', 'border-color:')
        self.expect('bbo', 'border-bottom:')
        self.expect('bbot', 'border-bottom:')
        self.expect('bto', 'border-top:')
        self.expect('btop', 'border-top:')
        self.expect('bri', 'border-right:')
        self.expect('brig', 'border-right:')
        self.expect('borr', 'border-right:')
        self.expect('bs', 'box-shadow:')
        self.expect('bos', 'box-shadow:')
        self.expect('bot', 'bottom:')
        self.expect('bott', 'bottom:')
        self.expect('borr', 'border-right:')
        self.expect('borl', 'border-left:')
        self.expect('borb', 'border-bottom:')
        self.expect('bortop', 'border-top:')
        self.expect('bort', 'border-top:')
        self.expect('bsh', 'box-shadow:')
        self.expect('bs', 'box-shadow:')
        self.expect('bsi', 'box-sizing:')
        self.expect('bsize', 'box-sizing:')

    def test_misc_shortcuts(self):
        self.expect('tl', 'table-layout:')
        self.expect('ta', 'text-align:')
        self.expect('tb', None)
        self.expect('tc', None)
        self.expect('td', 'text-decoration:')
        self.expect('te', 'text-align:')
        self.expect('tf', 'transform:')
        self.expect('tg', None)
        self.expect('tr', 'transition:')

class TestSelectorLike(unittest.TestCase):
    def expect(self, input, expected):
        output = cssx.is_selectorlike(input)
        self.assertEqual(not not output, expected)

    def test_simple(self):
        self.expect("pad:10", False)

    def test_simple_2(self):
        self.expect("p:10", False)

    def test_before(self):
        self.expect("p:before", True)

class TestExpanders(unittest.TestCase):
    def keyword(self, a, b):
        return cssx.match_keyword(a, b)

    def full(self, prop, val):
        return cssx.expand_full_value(prop, val)

    def test_simple(self):
        self.assertEqual(self.keyword('l', ['left', 'right']), 'left')

    def test_prioritize_prefixes(self):
        self.assertEqual(self.keyword('r', ['lefrt', 'right']), 'right')

    def test_no_matches(self):
        self.assertEqual(self.keyword('x', ['lert', 'right']), None)

    def test_auto_unit(self):
        self.assertEqual(self.full('3', 'margin'), '3px')

    def test_keyword_for_margin(self):
        self.assertEqual(self.full('a', 'margin'), 'auto')

    def test_keyword_for_text_align(self):
        self.assertEqual(self.full('le', 'text-align'), 'left')

    def test_keyword_for_vertical_align(self):
        self.assertEqual(self.full('mid', 'vertical-align'), 'middle')

    def test_expand_unit(self):
        self.assertEqual(self.full('3x', 'margin'), '3px')

    def test_leave_alone(self):
        self.assertEqual(self.full('aoeuaoeu', 'margin'), None)

# TODO:
# - [x] autocompleting values (float: l => float: left)
# - [x] auto-uniting values (margin: 3 => margin: 3px)
# - [ ] better autocompleting values (jc:s => justify-content: flex-start)
# - [ ] multi numeric (m0 3 => margin: 0 3px)

if __name__ == '__main__':
    unittest.main()


text:
<!DOCTYPE html>

Slideshow with images, Default Fade

Slideshow with images with horizontal transition (current slide not specified)

Play   Pause

Slideshow with horizontal cross transition

        < prev
        1
        2
        3
        4
          next >

Slideshow with vertical slide transition

        < prev
        1
        2
        3
        4
          next >

Slideshow individual with vertical cross transition

        < prev
        1
        2
        3
        4
          next >

Slideshow with panning transition

        < prev
        1
        2
        3
        4
        5
        6
        7
        8
        9
          next >

Slideshow with new auto of shrinking

        < prev
        1
        2
        3
        4
          next >

Slideshow with new auto of horizontal shrinking

Images courtesy of Jim Knox's Wild Zoofari


text:
package secondly

import (
	"testing"
)

func TestExtractFields(t *testing.T) {
	c := testConf{
		AppName: "Secondly",
		Version: 1.1,
		Database: testDatabaseConf{
			Adapter: "mysql",
			Host:    "localhost",
			Port:    3306,
		},
	}

	fields := indexFields(extractFields(c, ""))
	testField := func(fname, kind string, val interface{}) {
		if f, ok := fields[fname]; ok {
			if f.Kind != kind {
				t.Errorf("%s expected to be of kind %q, got %q", fname, kind, f.Kind)
			}
			if f.Value != val {
				t.Errorf("%s expected to have value %q, got %q", fname, val, f.Value)
			}
		} else {
			t.Errorf("Missing %s field", fname)
		}
	}

	testField("app_name", "string", c.AppName)
	testField("version", "float32", c.Version)
	testField("database.adapter", "string", c.Database.Adapter)
	testField("database.host", "string", c.Database.Host)
	testField("database.port", "int", c.Database.Port)
}

func TestDiff(t *testing.T) {
	c1 := testConf{
		AppName: "Secondly",
		Version: 1.3,
		Database: testDatabaseConf{
			Adapter: "mysql",
			Host:    "localhost",
			Port:    3306,
		},
	}
	c2 := testConf{
		AppName: "Secondly",
		Version: 2,
		Database: testDatabaseConf{
			Adapter:  "postgresql",
			Host:     "localhost",
			Port:     5432,
			Username: "root",
		},
	}

	d := diff(c1, c2)
	testField := func(fname string, oldVal, newVal interface{}) {
		if f, ok := d[fname]; ok {
			if f[0] != oldVal {
				t.Errorf("%s field old value was %q, not %q", oldVal, f[0])
			}
			if f[1] != newVal {
				t.Errorf("%s field new value was %q, not %q", newVal, f[1])
			}
		} else {
			t.Errorf("Expected %s field to have different values", fname)
		}
	}

	unchangedFields := []string{"app_name", "database.host", "database.password"}
	for _, f := range unchangedFields {
		if _, ok := d[f]; ok {
			t.Errorf("Expected %q field to be unchanged", f)
		}
	}

	testField("version", c1.Version, c2.Version)
	testField("database.adapter", c1.Database.Adapter, c2.Database.Adapter)
	testField("database.port", c1.Database.Port, c2.Database.Port)
	testField("database.username", c1.Database.Username, c2.Database.Username)
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.xyy</groupId>
    <artifactId>smart-dao</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <modules>
        <module>model-2-mybatisdao</module>
        <module>smart-dao-example</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>6.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>1.5.3.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test</artifactId>
            <version>1.5.3.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.3.8.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j</artifactId>
            <version>1.3.8.RELEASE</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>loonxi-nexus-releases</id>
            <name>core Release Repository</name>
            <url>http://54.183.108.244:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>loonxi-nexus-snapshots</id>
            <name>core Snapshots Repository</name>
            <url>http://54.183.108.244:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

</project>


text:
@interface GDCWebViewController : UIViewController
@property(weak, nonatomic) IBOutlet UIWebView *webView;
@property (nullable, nonatomic, assign) id <UIWebViewDelegate> delegate;

- (void)openUrl:(NSString *)url;
- (void)handleBack:(UIBarButtonItem *)sender;

@end


text:
using System;

namespace NuGetPe
{
    public static class Constants
    {
        internal const string PackageServiceEntitySetName = "Packages";

        internal const string PackageRelationshipNamespace = "http://schemas.microsoft.com/packaging/2010/07/";
        public static readonly string PackageExtension = ".nupkg";
        public static readonly string SymbolPackageExtension = ".snupkg";
        public static readonly string ManifestExtension = ".nuspec";
        public static readonly string ContentDirectory = "content";
        public static readonly string LibDirectory = "lib";
        public static readonly string ToolsDirectory = "tools";
        public static readonly string BuildDirectory = "build";

        // Starting from nuget 2.0, we use a file with the special name '_._' to represent an empty folder.
        public const string PackageEmptyFileName = "_._";

        // This is temporary until we fix the gallery to have proper first class support for this.
        // The magic unpublished date is 1900-01-01T00:00:00
        public static readonly DateTimeOffset Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeSpan.Zero); // v3
        public static readonly DateTimeOffset V2Unpublished = new DateTimeOffset(1900, 1, 1, 0, 0, 0, TimeZoneInfo.Local.BaseUtcOffset); // v2
    }
}


text:
require 'spec_helper'
require 'wlang/html'
module WLang
  describe Html, "*{...}" do

    def render(tpl, scope = {})
      Html.render(tpl, scope, "")
    end

    let(:numbers){ [1, 2, 3] }

    it 'renders the main block for each element' do
      render("*{numbers}{+{self}}", binding).should eq("123")
    end

    it 'renders the between block if present' do
      render("*{numbers}{+{self}}{,}", binding).should eq("1,2,3")
    end

    it 'preserves spacing in the third block' do
      render("*{numbers}{+{self}}{, }", binding).should eq("1, 2, 3")
    end

    it 'renders nothing on empty collections' do
      empty = []
      render("*{empty}{+{self}}", binding).should eq("")
    end

    it 'supports any enumerable' do
      elms = (1..5)
      render("*{elms}{+{self}}{,}", binding).should eq("1,2,3,4,5")
    end

  end
end


text:
- [#152](https://github.com/trello/RxLifecycle/pull/152): Support RxJava 1.2.0.

  This change is not backwards compatible with RxJava 1.1.x, so if you want to continue
  receiving updates for RxLifecycle you will eventually need to upgrade to RxJava 1.2.x.

## 0.7.0 (2016-08-24)

There are a couple major breaking changes in this release, so read carefully.

- [#143](https://github.com/trello/RxLifecycle/pull/143): Split Android parts of rxlifecycle into rxlifecycle-android

  Now the `rxlifecycle` dependency is a pure Java core. To use RxLifecycle with Android, you should also include
  `rxlifecycle-android` as well now.

  `RxLifecycle` methods that are for Android (`bindActivity()`, `bindFragment()` and `bindView()`) are now in
  `RxLifecycleAndroid` (found in the `rxlifecycle-android` artifact).

   Deprecated methods in `RxLifecycle` were removed as well.

- [#138](https://github.com/trello/RxLifecycle/pull/138) / [#139](https://github.com/trello/RxLifecycle/pull/139):
Replace `ActivityLifecycleProvider` and `FragmentLifecycleProvider` with `LifecycleProvider<T>`.

  This means that you need to replace `ActivityLifecycleProvider` with `LifecycleProvider<ActivityEvent>` and
  `FragmentLifecycleProvider` with `LifecycleProvider<FragmentEvent>`.

Other changes:

- [#140](https://github.com/trello/RxLifecycle/pull/140): Fixed type inference for LifecycleTransformer.forSingle()
- [#135](https://github.com/trello/RxLifecycle/pull/135): Add Kotlin extensions for Singles and Completables

## 0.6.1 (2016-05-11)

- [#118](https://github.com/trello/RxLifecycle/pull/118): Use `LifecycleTransformer` in the provider interfaces

## 0.6.0 (2016-05-06)

- Added `LifecycleTransformer`, which provides `Single` and `Completable` support.
- [#111](https://github.com/trello/RxLifecycle/pull/111): Added component support for `AppCompatDialogFragment`
- [#107](https://github.com/trello/RxLifecycle/pull/107): Fixed navi component package

## 0.5.0 (2016-02-27)

There are a few methods which have been **deprecated** and will be removed in a future release. Each one has a drop-in
replacement (and currently calling the deprecated version just routes to the new one):

* `bindUntilActivityEvent()` and `bindUntilFragmentEvent()` -> `bindUntilEvent()`
* `bindView()` -> `bind()`

The other changes mostly involve opening up the API for more customization:

* [#78](https://github.com/trello/RxLifecycle/pull/78): Added rxlifecycle-kotlin (adds some extensions)
* [#79](https://github.com/trello/RxLifecycle/pull/79): Made bindUntilEvent() public, deprecated more specific calls
* [#82](https://github.com/trello/RxLifecycle/pull/82): Opened up bind() methods for public consumption
* [#83](https://github.com/trello/RxLifecycle/pull/83), [#85](https://github.com/trello/RxLifecycle/pull/85): Added
annotations for better lint checking
* [#88](https://github.com/trello/RxLifecycle/pull/88): Use `.equals()` instead of == for event comparison (for
custom event support with the newly opened-up `bind()`)
* [#89](https://github.com/trello/RxLifecycle/pull/89): Make OutsideLifecycleException public (for anyone who wants
to write their own `bind()` implementations)

## 0.4.0 (2015-12-10)

* [#62](https://github.com/trello/RxLifecycle/pull/62), [#67](https://github.com/trello/RxLifecycle/pull/67): Added
[Navi](https://github.com/trello/navi/)-based implementation of providers.
* [#61](https://github.com/trello/RxLifecycle/pull/61): Moved `ActivityLifecycleProvider` and
`FragmentLifecycleProvider` into the core library so that multiple implementations can share them easily. The package
 name changed so you may need to re-import them in your code.
* [#60](https://github.com/trello/RxLifecycle/pull/60): Reverted generic parameters back to `Transformer<T, T>`

## 0.3.1 (2015-11-27)

* [#46](https://github.com/trello/RxLifecycle/pull/46): Updated generic parameters of `Transformer<T, T>` to support Kotlin type inference.

## 0.3.0

* [#12](https://github.com/trello/RxLifecycle/pull/12): Added `RxLifecycle.bindView()`. This allows binding a
`Subscription` until a `View` detaches itself from the window.
* [#30](https://github.com/trello/RxLifecycle/pull/30): Calling `bindActivity()` or `bindFragment()` outside of the
lifecycle causes the sequence to immediately complete (instead of throwing an error).
* [#31](https://github.com/trello/RxLifecycle/pull/31): Passing nulls to RxLifecycle now always immediately throws an
exception.

## 0.2.0

* [#14](https://github.com/trello/RxLifecycle/pull/14): Use takeUntil internally (instead of a faulty custom operator)

    While this fixes some intractable problems that could occur with the old system, it also includes a major behavior
    change: when the bind decides to stop subscribing, it calls `onCompleted` (whereas before it would just
    unsubscribe).

    When upgrading, you should check that your usages of `onCompleted` (either in `subscribe()`, `doOnCompleted()`,
    or `doOnTerminate()`) can handle the sequence ending due to the lifecycle bind.

    If you still need the old behavior in some spots, you should handle the `Subscription` yourself manually (and call
    `unsubscribe()` when appropriate).

* [#16](https://github.com/trello/RxLifecycle/pull/16): Lowered minSdkVersion to 14

## 0.1.0

Initial independent release (split from RxAndroid 0.25.0)

* Added support for AppCompatActivity via `RxAppCompatActivity`
* Components (e.g. `RxActivity`) now support `bindUntilEvent()` and `bindToLifecycle()`, which avoids having to deal with the lifecycle `Observable` directly.

### Differences from RxAndroid 0.25

* Renamed `LifecycleObservable` to `RxLifecycle`
* Switched from wrapping `Observables` to using `Transformer` + `compose()` (which allows for chaining)
* Split `LifecycleEvent` into two parts - `ActivityEvent` and `FragmentEvent`, in order to prevent easy mixups that could occur before
* Split `bindUntilLifecycleEvent()` into `bindUntilFragmentEvent()` and `bindUntilActivityEvent()`
* Renamed `bindFragmentLifecycle()` to `bindFragment()`
* Renamed `bindActivityLifecycle()` to `bindActivity()`


text:
package com.opengamma.core.security.impl;

import java.io.Serializable;
import java.util.Map;

import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.BeanDefinition;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaProperty;
import org.joda.beans.Property;
import org.joda.beans.PropertyDefinition;
import org.joda.beans.impl.direct.DirectBean;
import org.joda.beans.impl.direct.DirectBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaBean;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;

import com.google.common.collect.Maps;
import com.opengamma.core.security.Security;
import com.opengamma.id.ExternalId;
import com.opengamma.id.ExternalIdBundle;
import com.opengamma.id.MutableUniqueIdentifiable;
import com.opengamma.id.UniqueId;
import com.opengamma.util.ArgumentChecker;

/**
 * Simple implementation of {@code Security}.
 *

 * This is the simplest possible implementation of the {@link Security} interface.
 *

 * This class is mutable and not thread-safe.
 * It is intended to be used in the engine via the read-only {@code Security} interface.
 */
@BeanDefinition
public class SimpleSecurity extends DirectBean
    implements Security, MutableUniqueIdentifiable, Serializable {

  /** Serialization version. */
  private static final long serialVersionUID = 1L;

  /**
   * The unique identifier.
   */
  @PropertyDefinition(overrideGet = true, overrideSet = true)
  private UniqueId _uniqueId;
  /**
   * The external identifier bundle.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private ExternalIdBundle _externalIdBundle = ExternalIdBundle.EMPTY;
  /**
   * The security type.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private String _securityType;
  /**
   * The display name.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private String _name = "";
  /**
   * The general purpose security attributes.
   * These can be used to add arbitrary additional information to the object.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true, overrideSet = true)
  private final Map<String, String> _attributes = Maps.newHashMap();

  /**
   * Creates an instance.
   */
  private SimpleSecurity() {
  }

  /**
   * Creates an instance.
   *
   * @param securityType  the security type, not null
   */
  public SimpleSecurity(String securityType) {
    setSecurityType(securityType);
  }

  /**
   * Creates an instance.
   *
   * @param uniqueId  the unique identifier, may be null
   * @param bundle  the external identifier bundle, not null
   * @param securityType  the security type, not null
   * @param name  the display name, not null
   */
  public SimpleSecurity(UniqueId uniqueId, ExternalIdBundle bundle, String securityType, String name) {
    setUniqueId(uniqueId);
    setExternalIdBundle(bundle);
    setSecurityType(securityType);
    setName(name);
  }

  //-------------------------------------------------------------------------
  /**
   * Adds an external identifier to the bundle.
   *
   * @param externalId  the external identifier, not null
   */
  public void addExternalId(final ExternalId externalId) {
    setExternalIdBundle(getExternalIdBundle().withExternalId(externalId));
  }

  //-------------------------------------------------------------------------
  @Override
  public void addAttribute(String key, String value) {
    ArgumentChecker.notNull(key, "key");
    ArgumentChecker.notNull(value, "value");
    _attributes.put(key, value);
  }

  //------------------------- AUTOGENERATED START -------------------------
  ///CLOVER:OFF
  /**
   * The meta-bean for {@code SimpleSecurity}.
   * @return the meta-bean, not null
   */
  public static SimpleSecurity.Meta meta() {
    return SimpleSecurity.Meta.INSTANCE;
  }

  static {
    JodaBeanUtils.registerMetaBean(SimpleSecurity.Meta.INSTANCE);
  }

  @Override
  public SimpleSecurity.Meta metaBean() {
    return SimpleSecurity.Meta.INSTANCE;
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the unique identifier.
   * @return the value of the property
   */
  @Override
  public UniqueId getUniqueId() {
    return _uniqueId;
  }

  /**
   * Sets the unique identifier.
   * @param uniqueId  the new value of the property
   */
  @Override
  public void setUniqueId(UniqueId uniqueId) {
    this._uniqueId = uniqueId;
  }

  /**
   * Gets the the {@code uniqueId} property.
   * @return the property, not null
   */
  public final Property<UniqueId> uniqueId() {
    return metaBean().uniqueId().createProperty(this);
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the external identifier bundle.
   * @return the value of the property, not null
   */
  @Override
  public ExternalIdBundle getExternalIdBundle() {
    return _externalIdBundle;
  }

  /**
   * Sets the external identifier bundle.
   * @param externalIdBundle  the new value of the property, not null
   */
  public void setExternalIdBundle(ExternalIdBundle externalIdBundle) {
    JodaBeanUtils.notNull(externalIdBundle, "externalIdBundle");
    this._externalIdBundle = externalIdBundle;
  }

  /**
   * Gets the the {@code externalIdBundle} property.
   * @return the property, not null
   */
  public final Property<ExternalIdBundle> externalIdBundle() {
    return metaBean().externalIdBundle().createProperty(this);
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the security type.
   * @return the value of the property, not null
   */
  @Override
  public String getSecurityType() {
    return _securityType;
  }

  /**
   * Sets the security type.
   * @param securityType  the new value of the property, not null
   */
  public void setSecurityType(String securityType) {
    JodaBeanUtils.notNull(securityType, "securityType");
    this._securityType = securityType;
  }

  /**
   * Gets the the {@code securityType} property.
   * @return the property, not null
   */
  public final Property<String> securityType() {
    return metaBean().securityType().createProperty(this);
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the display name.
   * @return the value of the property, not null
   */
  @Override
  public String getName() {
    return _name;
  }

  /**
   * Sets the display name.
   * @param name  the new value of the property, not null
   */
  public void setName(String name) {
    JodaBeanUtils.notNull(name, "name");
    this._name = name;
  }

  /**
   * Gets the the {@code name} property.
   * @return the property, not null
   */
  public final Property<String> name() {
    return metaBean().name().createProperty(this);
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the general purpose security attributes.
   * These can be used to add arbitrary additional information to the object.
   * @return the value of the property, not null
   */
  @Override
  public Map<String, String> getAttributes() {
    return _attributes;
  }

  /**
   * Sets the general purpose security attributes.
   * These can be used to add arbitrary additional information to the object.
   * @param attributes  the new value of the property, not null
   */
  @Override
  public void setAttributes(Map<String, String> attributes) {
    JodaBeanUtils.notNull(attributes, "attributes");
    this._attributes.clear();
    this._attributes.putAll(attributes);
  }

  /**
   * Gets the the {@code attributes} property.
   * These can be used to add arbitrary additional information to the object.
   * @return the property, not null
   */
  public final Property<Map<String, String>> attributes() {
    return metaBean().attributes().createProperty(this);
  }

  //-----------------------------------------------------------------------
  @Override
  public SimpleSecurity clone() {
    return JodaBeanUtils.cloneAlways(this);
  }

  @Override
  public boolean equals(Object obj) {
    if (obj == this) {
      return true;
    }
    if (obj != null && obj.getClass() == this.getClass()) {
      SimpleSecurity other = (SimpleSecurity) obj;
      return JodaBeanUtils.equal(getUniqueId(), other.getUniqueId()) &&
          JodaBeanUtils.equal(getExternalIdBundle(), other.getExternalIdBundle()) &&
          JodaBeanUtils.equal(getSecurityType(), other.getSecurityType()) &&
          JodaBeanUtils.equal(getName(), other.getName()) &&
          JodaBeanUtils.equal(getAttributes(), other.getAttributes());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int hash = getClass().hashCode();
    hash = hash * 31 + JodaBeanUtils.hashCode(getUniqueId());
    hash = hash * 31 + JodaBeanUtils.hashCode(getExternalIdBundle());
    hash = hash * 31 + JodaBeanUtils.hashCode(getSecurityType());
    hash = hash * 31 + JodaBeanUtils.hashCode(getName());
    hash = hash * 31 + JodaBeanUtils.hashCode(getAttributes());
    return hash;
  }

  @Override
  public String toString() {
    StringBuilder buf = new StringBuilder(192);
    buf.append("SimpleSecurity{");
    int len = buf.length();
    toString(buf);
    if (buf.length() > len) {
      buf.setLength(buf.length() - 2);
    }
    buf.append('}');
    return buf.toString();
  }

  protected void toString(StringBuilder buf) {
    buf.append("uniqueId").append('=').append(JodaBeanUtils.toString(getUniqueId())).append(',').append(' ');
    buf.append("externalIdBundle").append('=').append(JodaBeanUtils.toString(getExternalIdBundle())).append(',').append(' ');
    buf.append("securityType").append('=').append(JodaBeanUtils.toString(getSecurityType())).append(',').append(' ');
    buf.append("name").append('=').append(JodaBeanUtils.toString(getName())).append(',').append(' ');
    buf.append("attributes").append('=').append(JodaBeanUtils.toString(getAttributes())).append(',').append(' ');
  }

  //-----------------------------------------------------------------------
  /**
   * The meta-bean for {@code SimpleSecurity}.
   */
  public static class Meta extends DirectMetaBean {
    /**
     * The singleton instance of the meta-bean.
     */
    static final Meta INSTANCE = new Meta();

    /**
     * The meta-property for the {@code uniqueId} property.
     */
    private final MetaProperty<UniqueId> _uniqueId = DirectMetaProperty.ofReadWrite(
        this, "uniqueId", SimpleSecurity.class, UniqueId.class);
    /**
     * The meta-property for the {@code externalIdBundle} property.
     */
    private final MetaProperty<ExternalIdBundle> _externalIdBundle = DirectMetaProperty.ofReadWrite(
        this, "externalIdBundle", SimpleSecurity.class, ExternalIdBundle.class);
    /**
     * The meta-property for the {@code securityType} property.
     */
    private final MetaProperty<String> _securityType = DirectMetaProperty.ofReadWrite(
        this, "securityType", SimpleSecurity.class, String.class);
    /**
     * The meta-property for the {@code name} property.
     */
    private final MetaProperty<String> _name = DirectMetaProperty.ofReadWrite(
        this, "name", SimpleSecurity.class, String.class);
    /**
     * The meta-property for the {@code attributes} property.
     */
    @SuppressWarnings({"unchecked", "rawtypes" })
    private final MetaProperty<Map<String, String>> _attributes = DirectMetaProperty.ofReadWrite(
        this, "attributes", SimpleSecurity.class, (Class) Map.class);
    /**
     * The meta-properties.
     */
    private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap(
        this, null,
        "uniqueId",
        "externalIdBundle",
        "securityType",
        "name",
        "attributes");

    /**
     * Restricted constructor.
     */
    protected Meta() {
    }

    @Override
    protected MetaProperty<?> metaPropertyGet(String propertyName) {
      switch (propertyName.hashCode()) {
        case -294460212:  // uniqueId
          return _uniqueId;
        case -736922008:  // externalIdBundle
          return _externalIdBundle;
        case 808245914:  // securityType
          return _securityType;
        case 3373707:  // name
          return _name;
        case 405645655:  // attributes
          return _attributes;
      }
      return super.metaPropertyGet(propertyName);
    }

    @Override
    public BeanBuilder<? extends SimpleSecurity> builder() {
      return new DirectBeanBuilder<SimpleSecurity>(new SimpleSecurity());
    }

    @Override
    public Class<? extends SimpleSecurity> beanType() {
      return SimpleSecurity.class;
    }

    @Override
    public Map<String, MetaProperty<?>> metaPropertyMap() {
      return _metaPropertyMap$;
    }

    //-----------------------------------------------------------------------
    /**
     * The meta-property for the {@code uniqueId} property.
     * @return the meta-property, not null
     */
    public final MetaProperty<UniqueId> uniqueId() {
      return _uniqueId;
    }

    /**
     * The meta-property for the {@code externalIdBundle} property.
     * @return the meta-property, not null
     */
    public final MetaProperty<ExternalIdBundle> externalIdBundle() {
      return _externalIdBundle;
    }

    /**
     * The meta-property for the {@code securityType} property.
     * @return the meta-property, not null
     */
    public final MetaProperty<String> securityType() {
      return _securityType;
    }

    /**
     * The meta-property for the {@code name} property.
     * @return the meta-property, not null
     */
    public final MetaProperty<String> name() {
      return _name;
    }

    /**
     * The meta-property for the {@code attributes} property.
     * @return the meta-property, not null
     */
    public final MetaProperty<Map<String, String>> attributes() {
      return _attributes;
    }

    //-----------------------------------------------------------------------
    @Override
    protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
      switch (propertyName.hashCode()) {
        case -294460212:  // uniqueId
          return ((SimpleSecurity) bean).getUniqueId();
        case -736922008:  // externalIdBundle
          return ((SimpleSecurity) bean).getExternalIdBundle();
        case 808245914:  // securityType
          return ((SimpleSecurity) bean).getSecurityType();
        case 3373707:  // name
          return ((SimpleSecurity) bean).getName();
        case 405645655:  // attributes
          return ((SimpleSecurity) bean).getAttributes();
      }
      return super.propertyGet(bean, propertyName, quiet);
    }

    @SuppressWarnings("unchecked")
    @Override
    protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
      switch (propertyName.hashCode()) {
        case -294460212:  // uniqueId
          ((SimpleSecurity) bean).setUniqueId((UniqueId) newValue);
          return;
        case -736922008:  // externalIdBundle
          ((SimpleSecurity) bean).setExternalIdBundle((ExternalIdBundle) newValue);
          return;
        case 808245914:  // securityType
          ((SimpleSecurity) bean).setSecurityType((String) newValue);
          return;
        case 3373707:  // name
          ((SimpleSecurity) bean).setName((String) newValue);
          return;
        case 405645655:  // attributes
          ((SimpleSecurity) bean).setAttributes((Map<String, String>) newValue);
          return;
      }
      super.propertySet(bean, propertyName, newValue, quiet);
    }

    @Override
    protected void validate(Bean bean) {
      JodaBeanUtils.notNull(((SimpleSecurity) bean)._externalIdBundle, "externalIdBundle");
      JodaBeanUtils.notNull(((SimpleSecurity) bean)._securityType, "securityType");
      JodaBeanUtils.notNull(((SimpleSecurity) bean)._name, "name");
      JodaBeanUtils.notNull(((SimpleSecurity) bean)._attributes, "attributes");
    }

  }

  ///CLOVER:ON
  //-------------------------- AUTOGENERATED END --------------------------
}


text:
<readable><title>2594459477_8ca0121a9a</title><content>
A little girl in a rain puddle .
A little girl is walking in a puddle of rain water in a hole in the road .
A little girl stands in a puddle of water in the middle of the street .
A little girl stands in a puddle on the concrete , shrowded in darkness .
A little girl stands in a puddle outside .
</content></readable>