text:
Adds array support to node-glob, sync and async. Also supports tilde expansion (user home) and resolving to global npm modules.

## TOC

- [Install](#install)
- [Usage](#usage)
- [Release history](#release-history)
- [Related projects](#related-projects)
- [Contributing](#contributing)
- [Building docs](#building-docs)
- [Running tests](#running-tests)
- [Author](#author)
- [License](#license)

_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save matched
```

## Usage

If non-glob patterns (e.g. file paths) are passed, only paths that exist on the file system are returned.

```js
var glob = require('matched');
```

**async**

```js
glob(['*.js'], function(err, files) {
  //=> ['utils.js', 'index.js']
});
```

**sync**

```js
var files = glob.sync(['*.js']);
//=> ['utils.js', 'index.js']
```

**promise**

```js
glob.promise(['*.txt'])
  .then(function(files) {
    //=> ['a.txt', 'b.txt', 'c.txt']
  });
```

**options**

All methods take options as the second argument:

```js
glob(['*.js'], {cwd: 'test'}, function(err, files) {
  //=> ['test.js']
});
```

## Release history

**v0.4.1**

* Exposes a non-enumerable `cache` property on the returned files array. This is a patch relase since the property does not change the existing API and should not otherwise effect behavior or results.

## Related projects

You might also be interested in these projects:

* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [look-up](https://www.npmjs.com/package/look-up): Faster drop-in replacement for find-up and findup-sync. | [homepage](https://github.com/jonschlinkert/look-up "Faster drop-in replacement for find-up and findup-sync.")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")

## Contributing

This document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit directly. Any changes to the readme must be made in [.verb.md](.verb.md). See [Building Docs](#building-docs).

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

Or visit the [verb-readme-generator](https://github.com/verbose/verb-readme-generator) project to submit bug reports or pull requests for the readme layout template.

## Building docs

_(This document was generated by [verb-readme-generator](https://github.com/verbose/verb-readme-generator) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-readme-generator && verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/matched/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 03, 2016._

redpajama_set_name: RedPajamaGithub


text:
var app = require('../../app');
var request = require('supertest')(app);
var mm = require('mm');
var config = require('../../config');
var passport = require('passport');
var configMiddleware = require('../../middlewares/conf');
var should = require('should');
var UserProxy = require('../../proxy/user');
var mailService = require('../../common/mail');
var pedding = require('pedding');
var utility = require('utility');
var tools = require('../../common/tools');

describe('test/controllers/sign.test.js', function () {
  var now = +new Date();
  var loginname = 'testuser' + now;
  var email = 'testuser' + now + '@gmail.com';
  var pass = 'wtffffffffffff';

  afterEach(function () {
    mm.restore();
  });

  describe('sign up', function () {

    it('should visit sign up page', function (done) {
      request.get('/signup')
      .expect(200, function (err, res) {
        res.text.should.containEql('确认密码');
        done(err);
      });
    });

    // it('should redirect to github oauth page', function (done) {
    //   mm(config.GITHUB_OAUTH, 'clientID', 'clientID chenged');
    //   app.get('/signup_github', configMiddleware.github, passport.authenticate('github'));
    //   request.get('/signup_github')
    //   .expect(302, function (err, res) {
    //     res.headers.location.should.containEql('https://github.com/login/oauth/authorize?');
    //     done(err);
    //   });
    // });

    it('should sign up a user', function (done) {
      done = pedding(done, 2);

      mm(mailService, 'sendMail', function (data) {
        data.to.should.match(new RegExp(loginname + '@gmail\\.com'));
        done();
      });
      request.post('/signup')
        .send({
          loginname: loginname,
          email: email,
          pass: pass,
          re_pass: pass,
        })
        .expect(200, function (err, res) {
          should.not.exists(err);
          res.text.should.containEql('欢迎加入');
          UserProxy.getUserByLoginName(loginname, function (err, user) {
            should.not.exists(err);
            user.should.ok;
            done();
          });
        });
    });

    it('should not sign up a user when loginname is exists', function (done) {
      request.post('/signup')
        .send({
          loginname: loginname,
          email: email + '1',
          pass: pass,
          re_pass: pass,
        })
        .expect(422, done);
    });

    it('should not sign up a user when email is exists', function (done) {
      request.post('/signup')
        .send({
          loginname: loginname + '1',
          email: email,
          pass: pass,
          re_pass: pass,
        })
        .expect(422, done);
    });
  });

  describe('login in', function () {
    it('should visit sign in page', function (done) {
      request.get('/signin').end(function (err, res) {
        res.text.should.containEql('登录');
        res.text.should.containEql('通过 GitHub 登录');
        done(err);
      });
    });

    it('should error when no loginname or no pass', function (done) {
      request.post('/signin')
      .send({
        name: loginname,
        pass: '',
      })
      .end(function (err, res) {
        res.status.should.equal(422);
        res.text.should.containEql('信息不完整。');
        done(err);
      });
    });

    it('should not login in when not actived', function (done) {
      request.post('/signin')
      .send({
        name: loginname,
        pass: pass,
      })
      .end(function (err, res) {
        res.status.should.equal(403);
        res.text.should.containEql('此帐号还没有被激活,激活链接已发送到');
        done(err);
      });
    });
  });

  describe('sign out', function () {
    it('should sign out', function (done) {
      request.post('/signout')
      .set('Cookie', config.auth_cookie_name + ':something;')
      .expect(302, function (err, res) {
        res.headers['set-cookie'].should.eql([ 'node_club=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT' ]);
        done(err);
      });
    });
  });

  describe('active', function () {
    it('should active account', function (done) {
      UserProxy.getUserByLoginName(loginname, function (err, user) {
        var key = utility.md5(user.email + user.pass + config.session_secret);
        request.get('/active_account')
        .query({
          key: key,
          name: loginname,
        })
        .expect(200, function (err, res) {
          res.text.should.containEql('帐号已被激活,请登录');
          done(err);
        });
      });
    });
  });

  describe('when new user is actived', function () {
    it('should login in successful', function (done) {
      request.post('/signin')
      .send({
        name: loginname,
        pass: pass,
      })
      .end(function (err, res) {
        res.status.should.equal(302);
        res.headers.location.should.equal('/');
        done(err);
      });
    });
  });

  describe('search pass', function () {
    var resetKey;

    it('should 200 when get /search_pass', function (done) {
      request.get('/search_pass')
      .expect(200, function (err, res) {
        res.text.should.containEql('找回密码');
        done(err);
      });
    });

    it('should update search pass', function (done) {
      done = pedding(done, 2);
      mm(mailService, 'sendMail', function (data) {
        data.from.should.equal('Nodeclub <club@126.com>');
        data.to.should.match(new RegExp(loginname));
        data.subject.should.equal('Nodeclub社区密码重置');
        data.html.should.match(new RegExp('<p>您好:' + loginname));
        resetKey = data.html.match(/key=(.+?)&/)[1];
        done();
      });

      request.post('/search_pass')
      .send({
        email: email
      })
      .expect(200, function (err, res) {
        res.text.should.containEql('我们已给您填写的电子邮箱发送了一封邮件,请在24小时内点击里面的链接来重置密码。');
        done(err);
      });
    });

    it('should 200 when get /reset_pass', function (done) {
      request.get('/reset_pass')
      .query({
        key : resetKey,
        name : loginname
      })
      .expect(200, function (err, res) {
        res.text.should.containEql('重置密码');
        done(err);
      });
    });

    it('should 403 get /reset_pass when with wrong resetKey', function (done) {
      request.get('/reset_pass')
      .query({
        key : 'wrong key',
        name : loginname
      })
      .expect(403, function (err, res) {
        res.text.should.containEql('信息有误,密码无法重置。');
        done(err);
      });
    });

    it('should update passwork', function (done) {
      request.post('/reset_pass')
      .send({
        psw: 'jkljkljkl',
        repsw: 'jkljkljkl',
        key: resetKey,
        name: loginname,
      })
      .expect(200, function (err, res) {
        res.text.should.containEql('你的密码已重置。');
        done(err);
      })
    })
  });
});


text:
AddCSLuaFile( "autorun/client/cl_init.lua" )
AddCSLuaFile( "autorun/client/cl_anticrashenforcer.lua" )
AddCSLuaFile( "autorun/client/cl_skin.lua" )

include( "autorun/server/anticrashenforcer.lua" )


text:
#include "config.h"
#include "core/css/resolver/ElementStyleResources.h"

#include "core/css/CSSGradientValue.h"
#include "core/css/CSSSVGDocumentValue.h"
#include "core/rendering/style/StyleGeneratedImage.h"
#include "core/rendering/style/StyleImage.h"
#include "core/rendering/style/StylePendingImage.h"
#include "platform/graphics/filters/FilterOperation.h"

namespace WebCore {

ElementStyleResources::ElementStyleResources()
    : m_hasNewCustomFilterProgram(false)
    , m_deviceScaleFactor(1)
{
}

PassRefPtr<StyleImage> ElementStyleResources::styleImage(const TextLinkColors& textLinkColors, Color currentColor, CSSPropertyID property, CSSValue* value)
{
    if (value->isImageValue())
        return cachedOrPendingFromValue(property, toCSSImageValue(value));

    if (value->isImageGeneratorValue()) {
        if (value->isGradientValue())
            return generatedOrPendingFromValue(property, toCSSGradientValue(value)->gradientWithStylesResolved(textLinkColors, currentColor).get());
        return generatedOrPendingFromValue(property, toCSSImageGeneratorValue(value));
    }

    if (value->isImageSetValue())
        return setOrPendingFromValue(property, toCSSImageSetValue(value));

    if (value->isCursorImageValue())
        return cursorOrPendingFromValue(property, toCSSCursorImageValue(value));

    return 0;
}

PassRefPtr<StyleImage> ElementStyleResources::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue* value)
{
    if (value->isPending()) {
        m_pendingImageProperties.set(property, value);
        return StylePendingImage::create(value);
    }
    return StyleGeneratedImage::create(value);
}

PassRefPtr<StyleImage> ElementStyleResources::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue* value)
{
    RefPtr<StyleImage> image = value->cachedOrPendingImageSet(m_deviceScaleFactor);
    if (image && image->isPendingImage())
        m_pendingImageProperties.set(property, value);
    return image.release();
}

PassRefPtr<StyleImage> ElementStyleResources::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value)
{
    RefPtr<StyleImage> image = value->cachedOrPendingImage();
    if (image && image->isPendingImage())
        m_pendingImageProperties.set(property, value);
    return image.release();
}

PassRefPtr<StyleImage> ElementStyleResources::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue* value)
{
    RefPtr<StyleImage> image = value->cachedOrPendingImage(m_deviceScaleFactor);
    if (image && image->isPendingImage())
        m_pendingImageProperties.set(property, value);
    return image.release();
}

void ElementStyleResources::addPendingSVGDocument(FilterOperation* filterOperation, CSSSVGDocumentValue* cssSVGDocumentValue)
{
    m_pendingSVGDocuments.set(filterOperation, cssSVGDocumentValue);
}

}


text:
This page was generated with Wiki Builder. Do not change the format!

## Info
A list of minimal information for items in an inventory: be it a character's inventory, or a Profile's inventory. (Note that the Vault is a collection of inventory buckets in the Profile's inventory) Inventory Items returned here are in a flat list, but importantly they have a bucketHash property that indicates the specific inventory bucket that is holding them. These buckets constitute things like the separate sections of the Vault, the user's inventory slots, etc. See DestinyInventoryBucketDefinition for more info.

## Schema
* **Schema Type:** Class
* **Type:** object

## Properties
Name | Type | Description
---- | ---- | -----------
items | [[DestinyItemComponent|Destiny-Entities-Items-DestinyItemComponent]][] | The items in this inventory. If you care to bucket them, use the item's bucketHash property to group them.

## Example
```javascript
{
    // Type: [[DestinyItemComponent|Destiny-Entities-Items-DestinyItemComponent]][]
    "items": [
       // Type: [[DestinyItemComponent|Destiny-Entities-Items-DestinyItemComponent]]
        {
            // Type: [[Destiny.Definitions.DestinyInventoryItemDefinition|Destiny-Definitions-DestinyInventoryItemDefinition]]:integer:uint32
            "itemHash": 0,
            // Type: integer:int64:nullable
            "itemInstanceId": 0,
            // Type: integer:int32
            "quantity": 0,
            // Type: [[ItemBindStatus|Destiny-ItemBindStatus]]:Enum
            "bindStatus": {},
            // Type: [[ItemLocation|Destiny-ItemLocation]]:Enum
            "location": {},
            // Type: [[Destiny.Definitions.DestinyInventoryBucketDefinition|Destiny-Definitions-DestinyInventoryBucketDefinition]]:integer:uint32
            "bucketHash": 0,
            // Type: [[TransferStatuses|Destiny-TransferStatuses]]:Enum
            "transferStatus": {},
            // Type: boolean
            "lockable": false,
            // Type: [[ItemState|Destiny-ItemState]]:Enum
            "state": {}
        }
    ]
}

```

## References
1. https://bungie-net.github.io/multi/schema_Destiny-Entities-Inventory-DestinyInventoryComponent.html#schema_Destiny-Entities-Inventory-DestinyInventoryComponent


text:
namespace google {
namespace protobuf {

#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)    \
  TypeName(const TypeName&);                           \
  void operator=(const TypeName&)

#undef GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS
#define GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
  TypeName();                                           \
  TypeName(const TypeName&);                            \
  void operator=(const TypeName&)

// ===================================================================
// from google3/base/basictypes.h

// The GOOGLE_ARRAYSIZE(arr) macro returns the # of elements in an array arr.
// The expression is a compile-time constant, and therefore can be
// used in defining new arrays, for example.
//
// GOOGLE_ARRAYSIZE catches a few type errors.  If you see a compiler error
//
//   "warning: division by zero in ..."
//
// when using GOOGLE_ARRAYSIZE, you are (wrongfully) giving it a pointer.
// You should only use GOOGLE_ARRAYSIZE on statically allocated arrays.
//
// The following comments are on the implementation details, and can
// be ignored by the users.
//
// ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in
// the array) and sizeof(*(arr)) (the # of bytes in one array
// element).  If the former is divisible by the latter, perhaps arr is
// indeed an array, in which case the division result is the # of
// elements in the array.  Otherwise, arr cannot possibly be an array,
// and we generate a compiler error to prevent the code from
// compiling.
//
// Since the size of bool is implementation-defined, we need to cast
// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
// result has type size_t.
//
// This macro is not perfect as it wrongfully accepts certain
// pointers, namely where the pointer size is divisible by the pointee
// size.  Since all our code has to go through a 32-bit compiler,
// where a pointer is 4 bytes, this means all pointers to a type whose
// size is 3 or greater than 4 will be (righteously) rejected.
//
// Kudos to Jorg Brown for this simple and elegant implementation.

#undef GOOGLE_ARRAYSIZE
#define GOOGLE_ARRAYSIZE(a) \
  ((sizeof(a) / sizeof(*(a))) / \
   static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))

// The COMPILE_ASSERT macro can be used to verify that a compile time
// expression is true. For example, you could use it to verify the
// size of a static array:
//
//   COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
//                  content_type_names_incorrect_size);
//
// or to make sure a struct is smaller than a certain size:
//
//   COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
//
// The second argument to the macro is the name of the variable. If
// the expression is false, most compilers will issue a warning/error
// containing the name of the variable.

namespace internal {

template <bool>
struct CompileAssert {
};

}  // namespace internal

#define GOOGLE_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)

}  // namespace protobuf
}  // namespace google

#endif  // GOOGLE_PROTOBUF_MACROS_H__


text:
<configuration scan="true" scanperiod="5 seconds">
   <property scope="context" name="pattern_stdout"
		value="%highlight(%.-5level)|%green(%date{yyyy-MM-dd HH:mm:ss.SSS})|%boldMagenta([%thread])|%yellow(%logger{70}:%boldYellow(%line)) - %msg%n%red(%rEx)" />

	<appender name="FILE" class="ch.qos.logback.core.FileAppender">
		<file>hibernateKata.log</file>
		<encoder>
			<pattern>[%level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - [requestID: %X{requestID}] %msg%n</pattern>
		</encoder>
	</appender>

		<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<charset>utf-8</charset>
			<pattern>${pattern_stdout}</pattern>
			<pattern></pattern>
		</encoder>
	</appender>
	<logger name="pl.java.scalatech" level="INFO"/>
        <logger name="org.hibernate" level="INFO"/>
        <logger name="org.hibernate.stat" level="DEBUG"/>
	<root level="INFO">
	    <appender-ref ref="console"/>
	    <appender-ref ref="FILE"/>
	</root>
</configuration>


text:
LUTEFISKDEMO_HOME="$(dirname $0)"/..
export LUTEFISKDEMO_HOME

. "${LUTEFISKDEMO_HOME}"/etc/common

"${LUTEFISKDEMO_BIN}"/django-manage.sh schemamigration lutefiskdemo --auto

# Local Variables:
# indent-tabs-mode: nil
# End:
# vim: ai et sw=4 ts=4


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Models;

namespace crisicheckinweb.ViewModels
{
    public class VolunteerViewModel
    {
        public IEnumerable<Disaster> Disasters { get; set; }
        public IEnumerable<DisasterCluster> DisasterClusters { get; set; }
        public IEnumerable<Commitment> MyCommitments { get; set; }
        public int RemoveCommitmentId { get; set; }
        public int PersonId { get; set; }
        [DisplayName("Volunteer for Disaster")]
        public int SelectedDisasterId { get; set; }
        [DisplayName("Activity")]
        public int SelectedClusterId { get; set; }
        [DisplayName("Start Date")]
        public DateTime SelectedStartDate { get; set; }
        [DisplayName("End Date")]
        public DateTime SelectedEndDate { get; set; }
        [DisplayName("Location")]
        public int VolunteerType { get; set; }
        public IEnumerable<VolunteerType> VolunteerTypes { get; set; }
        public Person Person { get; set; }
        public IEnumerable<ClusterCoordinator> ClusterCoordinators { get; set; }
    }
}


text:
/* Toolbar with buttons and title
----------------------------------------------------------------------------------------------------------------------*/

function Toolbar(calendar, toolbarOptions) {
	var t = this;

	// exports
	t.setToolbarOptions = setToolbarOptions;
	t.render = render;
	t.removeElement = removeElement;
	t.updateTitle = updateTitle;
	t.activateButton = activateButton;
	t.deactivateButton = deactivateButton;
	t.disableButton = disableButton;
	t.enableButton = enableButton;
	t.getViewsWithButtons = getViewsWithButtons;
	t.el = null; // mirrors local `el`

	// locals
	var el;
	var viewsWithButtons = [];
	var tm;

	// method to update toolbar-specific options, not calendar-wide options
	function setToolbarOptions(newToolbarOptions) {
		toolbarOptions = newToolbarOptions;
	}

	// can be called repeatedly and will rerender
	function render() {
		var sections = toolbarOptions.layout;

		tm = calendar.options.theme ? 'ui' : 'fc';

		if (sections) {
			if (!el) {
				el = this.el = $("
");
			}
			else {
				el.empty();
			}
			el.append(renderSection('left'))
				.append(renderSection('right'))
				.append(renderSection('center'))
				.append('
');
		}
		else {
			removeElement();
		}
	}

	function removeElement() {
		if (el) {
			el.remove();
			el = t.el = null;
		}
	}

	function renderSection(position) {
		var sectionEl = $('
');
		var buttonStr = toolbarOptions.layout[position];

		if (buttonStr) {
			$.each(buttonStr.split(' '), function(i) {
				var groupChildren = $();
				var isOnlyButtons = true;
				var groupEl;

				$.each(this.split(','), function(j, buttonName) {
					var customButtonProps;
					var viewSpec;
					var buttonClick;
					var overrideText; // text explicitly set by calendar's constructor options. overcomes icons
					var defaultText;
					var themeIcon;
					var normalIcon;
					var innerHtml;
					var classes;
					var button; // the element

					if (buttonName == 'title') {
						groupChildren = groupChildren.add($('

')); // we always want it to take up height
						isOnlyButtons = false;
					}
					else {
						if ((customButtonProps = (calendar.options.customButtons || {})[buttonName])) {
							buttonClick = function(ev) {
								if (customButtonProps.click) {
									customButtonProps.click.call(button[0], ev);
								}
							};
							overrideText = ''; // icons will override text
							defaultText = customButtonProps.text;
						}
						else if ((viewSpec = calendar.getViewSpec(buttonName))) {
							buttonClick = function() {
								calendar.changeView(buttonName);
							};
							viewsWithButtons.push(buttonName);
							overrideText = viewSpec.buttonTextOverride;
							defaultText = viewSpec.buttonTextDefault;
						}
						else if (calendar[buttonName]) { // a calendar method
							buttonClick = function() {
								calendar[buttonName]();
							};
							overrideText = (calendar.overrides.buttonText || {})[buttonName];
							defaultText = calendar.options.buttonText[buttonName]; // everything else is considered default
						}

						if (buttonClick) {

							themeIcon =
								customButtonProps ?
									customButtonProps.themeIcon :
									calendar.options.themeButtonIcons[buttonName];

							normalIcon =
								customButtonProps ?
									customButtonProps.icon :
									calendar.options.buttonIcons[buttonName];

							if (overrideText) {
								innerHtml = htmlEscape(overrideText);
							}
							else if (themeIcon && calendar.options.theme) {
								innerHtml = "";
							}
							else if (normalIcon && !calendar.options.theme) {
								innerHtml = "";
							}
							else {
								innerHtml = htmlEscape(defaultText);
							}

							classes = [
								'fc-' + buttonName + '-button',
								tm + '-button',
								tm + '-state-default'
							];

							button = $( // type="button" so that it doesn't submit a form
								'<button type="button" class="' + classes.join(' ') + '">' +
									innerHtml +
								'</button>'
								)
								.click(function(ev) {
									// don't process clicks for disabled buttons
									if (!button.hasClass(tm + '-state-disabled')) {

										buttonClick(ev);

										// after the click action, if the button becomes the "active" tab, or disabled,
										// it should never have a hover class, so remove it now.
										if (
											button.hasClass(tm + '-state-active') ||
											button.hasClass(tm + '-state-disabled')
										) {
											button.removeClass(tm + '-state-hover');
										}
									}
								})
								.mousedown(function() {
									// the *down* effect (mouse pressed in).
									// only on buttons that are not the "active" tab, or disabled
									button
										.not('.' + tm + '-state-active')
										.not('.' + tm + '-state-disabled')
										.addClass(tm + '-state-down');
								})
								.mouseup(function() {
									// undo the *down* effect
									button.removeClass(tm + '-state-down');
								})
								.hover(
									function() {
										// the *hover* effect.
										// only on buttons that are not the "active" tab, or disabled
										button
											.not('.' + tm + '-state-active')
											.not('.' + tm + '-state-disabled')
											.addClass(tm + '-state-hover');
									},
									function() {
										// undo the *hover* effect
										button
											.removeClass(tm + '-state-hover')
											.removeClass(tm + '-state-down'); // if mouseleave happens before mouseup
									}
								);

							groupChildren = groupChildren.add(button);
						}
					}
				});

				if (isOnlyButtons) {
					groupChildren
						.first().addClass(tm + '-corner-left').end()
						.last().addClass(tm + '-corner-right').end();
				}

				if (groupChildren.length > 1) {
					groupEl = $('
');
					if (isOnlyButtons) {
						groupEl.addClass('fc-button-group');
					}
					groupEl.append(groupChildren);
					sectionEl.append(groupEl);
				}
				else {
					sectionEl.append(groupChildren); // 1 or 0 children
				}
			});
		}

		return sectionEl;
	}

	function updateTitle(text) {
		if (el) {
			el.find('h2').text(text);
		}
	}

	function activateButton(buttonName) {
		if (el) {
			el.find('.fc-' + buttonName + '-button')
				.addClass(tm + '-state-active');
		}
	}

	function deactivateButton(buttonName) {
		if (el) {
			el.find('.fc-' + buttonName + '-button')
				.removeClass(tm + '-state-active');
		}
	}

	function disableButton(buttonName) {
		if (el) {
			el.find('.fc-' + buttonName + '-button')
				.prop('disabled', true)
				.addClass(tm + '-state-disabled');
		}
	}

	function enableButton(buttonName) {
		if (el) {
			el.find('.fc-' + buttonName + '-button')
				.prop('disabled', false)
				.removeClass(tm + '-state-disabled');
		}
	}

	function getViewsWithButtons() {
		return viewsWithButtons;
	}

}


text:
"""Implementation of compile_html for HTML source files."""

from __future__ import unicode_literals

import os
import io

from nikola.plugin_categories import PageCompiler
from nikola.utils import makedirs, write_metadata

class CompileHtml(PageCompiler):
    """Compile HTML into HTML."""

    name = "html"
    friendly_name = "HTML"

    def compile_html(self, source, dest, is_two_file=True):
        """Compile source file into HTML and save as dest."""
        makedirs(os.path.dirname(dest))
        with io.open(dest, "w+", encoding="utf8") as out_file:
            with io.open(source, "r", encoding="utf8") as in_file:
                data = in_file.read()
            if not is_two_file:
                _, data = self.split_metadata(data)
            data = self.site.apply_shortcodes(source)
            out_file.write(data)
        return True

    def create_post(self, path, **kw):
        """Create a new post."""
        content = kw.pop('content', None)
        onefile = kw.pop('onefile', False)
        # is_page is not used by create_post as of now.
        kw.pop('is_page', False)
        metadata = {}
        metadata.update(self.default_metadata)
        metadata.update(kw)
        makedirs(os.path.dirname(path))
        if not content.endswith('\n'):
            content += '\n'
        with io.open(path, "w+", encoding="utf8") as fd:
            if onefile:
                fd.write('<!--\n')
                fd.write(write_metadata(metadata))
                fd.write('-->\n\n')
            fd.write(content)


text:
[license]: https://tldrlegal.com/l/mit
[docs]: http://docs.oxidemod.org
[forums]: http://oxidemod.org/
[issues]: https://github.com/OxideMod/Oxide/issues
[downloads]: http://oxidemod.org/downloads/

# Oxide Mod [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)][License] [![Build Status](https://travis-ci.org/OxideMod/Oxide.png)](https://travis-ci.org/OxideMod/Oxide)

A complete rewrite of the popular, original Oxide API and Lua plugin framework. Previously only available for the legacy Rust game, Oxide now supports numerous games. Oxide's focus is on modularity and extensibility. The core is highly abstracted and loosely coupled, and could be used to mod any game that uses the .NET Framework.

Support for each game and plugin language is added via extensions. When loading, Oxide scans the binary folder for DLL extensions. Extension filenames are formatted as `Oxide.Ext.Name.dll` or `Oxide.Game.Name.dll`.

## Official Core Extensions

 * Oxide.Ext.CSharp - _Allows plugins written in [CSharp](http://en.wikipedia.org/wiki/C_Sharp_(programming_language)) to be loaded_
 * Oxide.Ext.JavaScript - _Allows plugins written in [JavaScript](http://en.wikipedia.org/wiki/JavaScript) to be loaded_
 * Oxide.Ext.Lua - _Allows plugins written in [Lua](http://www.lua.org/) to be loaded_
 * Oxide.Ext.MySql - _Allows plugins to access a [MySQL](http://www.mysql.com/) database_
 * Oxide.Ext.Python - _Allows plugins written in [Python](http://en.wikipedia.org/wiki/Python_(programming_language)) to be loaded_
 * Oxide.Ext.SQLite - _Allows plugins to access a [SQLite](http://www.sqlite.org/) database_
 * Oxide.Ext.Unity - _Provides support for [Unity](http://unity3d.com/) powered games_

## Supported Game Extensions
 * Oxide.Game.Blockstorm - _Provides support for the [Blockstorm](http://playblockstorm.com/) server_
 * Oxide.Game.HideHoldOut - _Provides support for the [Hide & Hold Out](http://h2o-game.net/) server_
 * Oxide.Game.Nomad - _Provides support for the [Nomad](http://playnomad.net) server_
 * Oxide.Game.ReignOfKings - _Provides support for the [Reign of Kings](http://www.reignofkings.net/) server_
 * Oxide.Game.Rust - _Provides support for the new [Rust](http://playrust.com/) server_
 * Oxide.Game.RustLegacy - _Provides support for the old [Rust](http://playrust.com/) Legacy server_
 * Oxide.Game.SevenDays - _Provides support for the [7 Days to Die](http://7daystodie.com/) server_
 * Oxide.Game.Terraria - _Provides support for the [Terraria](http://terraria.org/) server_
 * Oxide.Game.TheForest - _Provides support for [The Forest](http://survivetheforest.com/) server_
 * Oxide.Game.Unturned - _Provides support for the [Unturned](http://smartlydressedgames.com/) server_

## Open Source

Oxide is free, open source software distributed under the [MIT License][license]. We accept and encourage contributions from our community, and sometimes give cookies in return.

## Compiling Source

While we recommend using one of the [official release builds][downloads], you can compile your own builds if you'd like. Keep in mind that only official builds are supported by the Oxide team and community. _Good luck!_

 1. Download a Git client such as [GitHub Desktop](https://desktop.github.com/) or [SourceTree](https://www.sourcetreeapp.com/).

 2. Clone the repo `https://github.com/OxideMod/Oxide.git` _(recommended)_ or download and extract the [latest zip](https://github.com/OxideMod/Oxide/archive/master.zip) archive.

 3. Download and install [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx) _(community is free, but any edition will work)_ if you do not have it installed already.

 3. Open the `Oxide.sln` solution file in Visual Studio 2015.

 4. Build the solution. If you get errors, you're likely not using the latest Visual Studio 2015 which is required as Oxide uses some [C# 6.0](https://github.com/dotnet/roslyn/wiki/New-Language-Features-in-C%23-6) features.

 5. Copy the files from the `Bundles` directory for your game of choice to your server installation, then just start the server!

## Getting Help

* The best place to start with plugin development is the official [API documentation][docs].
* Still need help? Search our [community forums][forums] or create a new thread if needed.

## Contributing

* Got an idea or suggestion? Use the [community forums][forums] to share and discuss it.
* Troubleshoot issues you run into on the community forums so everyone can help and reference it later.
* File detailed [issues] on GitHub (version number, what you did, and actual vs expected outcomes).
* Want Oxide and plugins for your favorite game? Hook us up and we'll see what we can do!

## Reporting Security Issues

Please disclose security issues responsibly by emailing security@oxidemod.org with a full description. We'll work on releasing an updated version as quickly as possible. Please do not email non-security issues; use the [forums] or [issue tracker][issues] instead.


text:
package utils_test

import (
	"testing"

	"github.com/golang/protobuf/proto"
	configtxtest "github.com/hyperledger/fabric/common/configtx/test"
	"github.com/hyperledger/fabric/protos/common"
	cb "github.com/hyperledger/fabric/protos/common"
	"github.com/hyperledger/fabric/protos/utils"
	"github.com/stretchr/testify/assert"
)

var testChainID = "myuniquetestchainid"

func TestGetChainIDFromBlockBytes(t *testing.T) {
	gb, err := configtxtest.MakeGenesisBlock(testChainID)
	assert.NoError(t, err, "Failed to create test configuration block")
	bytes, err := proto.Marshal(gb)
	cid, err := utils.GetChainIDFromBlockBytes(bytes)
	assert.NoError(t, err)
	assert.Equal(t, testChainID, cid, "Failed to return expected chain ID")

	// bad block bytes
	_, err = utils.GetChainIDFromBlockBytes([]byte("bad block"))
	assert.Error(t, err, "Expected error with malformed block bytes")
}

func TestGetChainIDFromBlock(t *testing.T) {
	var err error
	var gb *common.Block
	var cid string

	// nil block
	_, err = utils.GetChainIDFromBlock(gb)
	assert.Error(t, err, "Expected error getting channel id from nil block")

	gb, err = configtxtest.MakeGenesisBlock(testChainID)
	assert.NoError(t, err, "Failed to create test configuration block")

	cid, err = utils.GetChainIDFromBlock(gb)
	assert.NoError(t, err, "Failed to get chain ID from block")
	assert.Equal(t, testChainID, cid, "Failed to return expected chain ID")

	// missing data
	badBlock := gb
	badBlock.Data = nil
	_, err = utils.GetChainIDFromBlock(badBlock)
	assert.Error(t, err, "Expected error with missing block data")

	// no envelope
	badBlock = &cb.Block{
		Data: &cb.BlockData{
			Data: [][]byte{[]byte("bad envelope")},
		},
	}
	_, err = utils.GetChainIDFromBlock(badBlock)
	assert.Error(t, err, "Expected error with no envelope in data")

	// bad payload
	env, _ := proto.Marshal(&cb.Envelope{
		Payload: []byte("bad payload"),
	})
	badBlock = &cb.Block{
		Data: &cb.BlockData{
			Data: [][]byte{env},
		},
	}
	_, err = utils.GetChainIDFromBlock(badBlock)
	assert.Error(t, err, "Expected error - malformed payload")

	// bad channel header
	payload, _ := proto.Marshal(&cb.Payload{
		Header: &cb.Header{
			ChannelHeader: []byte("bad header"),
		},
	})
	env, _ = proto.Marshal(&cb.Envelope{
		Payload: payload,
	})
	badBlock = &cb.Block{
		Data: &cb.BlockData{
			Data: [][]byte{env},
		},
	}
	_, err = utils.GetChainIDFromBlock(badBlock)
	assert.Error(t, err, "Expected error with malformed channel header")

	// nil payload header
	payload, _ = proto.Marshal(&cb.Payload{})
	env, _ = proto.Marshal(&cb.Envelope{
		Payload: payload,
	})
	badBlock = &cb.Block{
		Data: &cb.BlockData{
			Data: [][]byte{env},
		},
	}
	_, err = utils.GetChainIDFromBlock(badBlock)
	assert.Error(t, err, "Expected error when payload header is nil")
}

func TestGetBlockFromBlockBytes(t *testing.T) {
	testChainID := "myuniquetestchainid"
	gb, err := configtxtest.MakeGenesisBlock(testChainID)
	assert.NoError(t, err, "Failed to create test configuration block")
	blockBytes, err := utils.Marshal(gb)
	assert.NoError(t, err, "Failed to marshal block")
	_, err = utils.GetBlockFromBlockBytes(blockBytes)
	assert.NoError(t, err, "to get block from block bytes")

	// bad block bytes
	_, err = utils.GetBlockFromBlockBytes([]byte("bad block"))
	assert.Error(t, err, "Expected error for malformed block bytes")
}

func TestGetMetadataFromNewBlock(t *testing.T) {
	block := common.NewBlock(0, nil)
	md, err := utils.GetMetadataFromBlock(block, cb.BlockMetadataIndex_ORDERER)
	assert.NoError(t, err, "Unexpected error extracting metadata from new block")
	assert.Nil(t, md.Value, "Expected metadata field value to be nil")
	assert.Equal(t, 0, len(md.Value), "Expected length of metadata field value to be 0")
	md = utils.GetMetadataFromBlockOrPanic(block, cb.BlockMetadataIndex_ORDERER)
	assert.NotNil(t, md, "Expected to get metadata from block")

	// malformed metadata
	block.Metadata.Metadata[cb.BlockMetadataIndex_ORDERER] = []byte("bad metadata")
	_, err = utils.GetMetadataFromBlock(block, cb.BlockMetadataIndex_ORDERER)
	assert.Error(t, err, "Expected error with malformed metadata")
	assert.Panics(t, func() {
		_ = utils.GetMetadataFromBlockOrPanic(block, cb.BlockMetadataIndex_ORDERER)
	}, "Expected panic with malformed metadata")
}

func TestInitBlockMeta(t *testing.T) {
	// block with no metadata
	block := &cb.Block{}
	utils.InitBlockMetadata(block)
	// should have 3 entries
	assert.Equal(t, 3, len(block.Metadata.Metadata), "Expected block to have 3 metadata entries")

	// block with a single entry
	block = &cb.Block{
		Metadata: &cb.BlockMetadata{},
	}
	block.Metadata.Metadata = append(block.Metadata.Metadata, []byte{})
	utils.InitBlockMetadata(block)
	// should have 3 entries
	assert.Equal(t, 3, len(block.Metadata.Metadata), "Expected block to have 3 metadata entries")
}

func TestCopyBlockMetadata(t *testing.T) {
	srcBlock := common.NewBlock(0, nil)
	dstBlock := &cb.Block{}

	metadata, _ := proto.Marshal(&cb.Metadata{
		Value: []byte("orderer metadata"),
	})
	srcBlock.Metadata.Metadata[cb.BlockMetadataIndex_ORDERER] = metadata
	utils.CopyBlockMetadata(srcBlock, dstBlock)

	// check that the copy worked
	assert.Equal(t, len(srcBlock.Metadata.Metadata), len(dstBlock.Metadata.Metadata),
		"Expected target block to have same number of metadata entries after copy")
	assert.Equal(t, metadata, dstBlock.Metadata.Metadata[cb.BlockMetadataIndex_ORDERER],
		"Unexpected metadata from target block")
}

func TestGetLastConfigIndexFromBlock(t *testing.T) {
	block := common.NewBlock(0, nil)
	index := uint64(2)
	lc, _ := proto.Marshal(&cb.LastConfig{
		Index: index,
	})
	metadata, _ := proto.Marshal(&cb.Metadata{
		Value: lc,
	})
	block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = metadata
	result, err := utils.GetLastConfigIndexFromBlock(block)
	assert.NoError(t, err, "Unexpected error returning last config index")
	assert.Equal(t, index, result, "Unexpected last config index returned from block")
	result = utils.GetLastConfigIndexFromBlockOrPanic(block)
	assert.Equal(t, index, result, "Unexpected last config index returned from block")

	// malformed metadata
	block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = []byte("bad metadata")
	_, err = utils.GetLastConfigIndexFromBlock(block)
	assert.Error(t, err, "Expected error with malformed metadata")

	// malformed last config
	metadata, _ = proto.Marshal(&cb.Metadata{
		Value: []byte("bad last config"),
	})
	block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = metadata
	_, err = utils.GetLastConfigIndexFromBlock(block)
	assert.Error(t, err, "Expected error with malformed last config metadata")
	assert.Panics(t, func() {
		_ = utils.GetLastConfigIndexFromBlockOrPanic(block)
	}, "Expected panic with malformed last config metadata")
}


text:
package org.bbop.apollo.gwt.client.rest;

import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.URL;
import com.google.gwt.json.client.JSONObject;
import org.bbop.apollo.gwt.client.Annotator;
import org.bbop.apollo.gwt.shared.FeatureStringEnum;
import org.gwtbootstrap3.extras.bootbox.client.Bootbox;

/**
 * Created by ndunn on 1/14/15.
 */
public class RestService {

    public static void sendRequest(RequestCallback requestCallback, String url) {
        sendRequest(requestCallback, url, (String) null);
    }

    public static void sendRequest(RequestCallback requestCallback, String url, JSONObject jsonObject) {
        sendRequest(requestCallback, url, "data=" + jsonObject.toString());
    }

    public static void sendRequest(RequestCallback requestCallback, String url, String data) {
        sendRequest(requestCallback, url, data, RequestBuilder.POST);
    }

    public static void sendRequest(RequestCallback requestCallback, String url, String data, RequestBuilder.Method method) {
        String rootUrl = Annotator.getRootUrl();
        if (!url.startsWith(rootUrl)) {
            url = rootUrl + url;
        }
        // add the clientToken parameter if not exists
        if (!url.contains(FeatureStringEnum.CLIENT_TOKEN.getValue())) {
            url += url.contains("?") ? "&" : "?";
            url += FeatureStringEnum.CLIENT_TOKEN.getValue();
            url += "=";
            url += Annotator.getClientToken();
        }
        RequestBuilder builder = new RequestBuilder(method, URL.encode(url));
        if (data != null) {
            builder.setRequestData(data);
        }
        builder.setHeader("Content-type", "application/x-www-form-urlencoded");
        try {
            if (requestCallback != null) {
                builder.setCallback(requestCallback);
            }
            builder.send();
        } catch (RequestException e) {
            Bootbox.alert(e.getMessage());
        }

    }

    public static void sendGetRequest(RequestCallback requestCallback, String url) {
        sendRequest(requestCallback, url, null, RequestBuilder.GET);
    }
}


text:
set -eo pipefail

if [[ -z "${CREDENTIALS}" ]]; then
  CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
fi

if [[ -z "${STAGING_BUCKET}" ]]; then
  echo "Need to set STAGING_BUCKET environment variable"
  exit 1
fi

# work from the git root directory
pushd $(dirname "$0")/../../

# install docuploader package
python3 -m pip install gcp-docuploader

# compile all packages
mvn clean install -B -q -DskipTests=true

export NAME=google-cloud-livestream
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)

# build the docs
mvn site -B -q

pushd target/site/apidocs

# create metadata
python3 -m docuploader create-metadata \
  --name ${NAME} \
  --version ${VERSION} \
  --language java

# upload docs
python3 -m docuploader upload . \
  --credentials ${CREDENTIALS} \
  --staging-bucket ${STAGING_BUCKET}


text:
import org.jetbrains.annotations.NotNull;

class C {
  Object foo(boolean b) {
    if (b) {
        return newMethod();
    } else {
      return B.getInstance();
    }
  }

    @NotNull
    private Object newMethod() {
        return A.getInstance();
    }
}
class A {
  static A getInstance() {
    return new A();
  }
}
class B extends A {
  static B getInstance() {
    return new B();
  }
}


text: MX2 wrapper for Lua


text:
Java wrapper for the Reddit REST API

This Java Wrapper will provid a java object to interact with Reddit and handles all the work of getting more data past
the max post limit that reddit has.


text:
void ProcessInfo::updateProcesses()
{
    processList.clear();

    try {

        QStringList columns = { "pid", "rss", "pmem", "vsize", "uname:50", "pcpu", "start_time",
                                "state", "group", "nice", "cputime", "session", "cmd"};

        QStringList lines = CommandUtil::exec("ps", {"ax", "-weo", columns.join(","), "--no-headings"})
                .trimmed()
                .split(QChar('\n'));

        if (! lines.isEmpty()) {
            QRegExp sep("\\s+");
            for (const QString &line : lines) {
                QStringList procLine = line.trimmed().split(sep);

                if (procLine.count() >= columns.count()) {
                    Process proc;

                    proc.setPid(procLine.takeFirst().toLong());
                    proc.setRss(procLine.takeFirst().toLong() << 10);
                    proc.setPmem(procLine.takeFirst().toDouble());
                    proc.setVsize(procLine.takeFirst().toLong() << 10);
                    proc.setUname(procLine.takeFirst());
                    proc.setPcpu(procLine.takeFirst().toDouble());
                    proc.setStartTime(procLine.takeFirst());
                    proc.setState(procLine.takeFirst());
                    proc.setGroup(procLine.takeFirst());
                    proc.setNice(procLine.takeFirst().toInt());
                    proc.setCpuTime(procLine.takeFirst());
                    proc.setSession(procLine.takeFirst());
                    proc.setCmd(procLine.join(" "));

                    processList << proc;
                }
            }
        }

    } catch (QString &ex) {
        qCritical() << ex;
    }
}

QList<Process> ProcessInfo::getProcessList() const
{
    return processList;
}


text:
package com.sharksharding.sql.dialect.mysql.ast.clause;

import com.sharksharding.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
import com.sharksharding.sql.dialect.mysql.visitor.MySqlASTVisitor;

/**
 *
 * @Description: MySql procedure leave statement
 * @author zz email:455910092@qq.com
 * @date 2015-9-14
 * @version V1.0
 */
public class MySqlLeaveStatement extends MySqlStatementImpl {

	private String labelName;

	@Override
    public void accept0(MySqlASTVisitor visitor) {
		visitor.visit(this);
        visitor.endVisit(this);
    }

	public String getLabelName() {
		return labelName;
	}

	public void setLabelName(String labelName) {
		this.labelName = labelName;
	}

}


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Microsoft.Extensions.DependencyInjection</name>
    </assembly>
    <members>
        <member name="T:Microsoft.Extensions.DependencyInjection.ServiceCollection">
            <summary>
            Default implementation of <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.ServiceCollection.Count">
            <inheritdoc />
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.ServiceCollection.IsReadOnly">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Clear">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Contains(Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.CopyTo(Microsoft.Extensions.DependencyInjection.ServiceDescriptor[],System.Int32)">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Remove(Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.GetEnumerator">
            <inheritdoc />
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
            <summary>
            Creates an <see cref="T:System.IServiceProvider"/> containing services from the provided <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>.
            </summary>
            <param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> containing service descriptors.</param>
            <returns>The<see cref="T:System.IServiceProvider"/>.</returns>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Boolean)">
            <summary>
            Creates an <see cref="T:System.IServiceProvider"/> containing services from the provided <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>
            optionaly enabling scope validation.
            </summary>
            <param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> containing service descriptors.</param>
            <param name="validateScopes">
            <c>true</c> to perform check verifying that scoped services never gets resolved from root provider; otherwise <c>false</c>.
            </param>
            <returns>The<see cref="T:System.IServiceProvider"/>.</returns>
        </member>
        <member name="T:Microsoft.Extensions.DependencyInjection.ServiceProvider">
            <summary>
            The default IServiceProvider.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(System.Type)">
            <summary>
            Gets the service object of the specified type.
            </summary>
            <param name="serviceType"></param>
            <returns></returns>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.AmbigiousConstructorException">
            <summary>
            Unable to activate type '{0}'. The following constructors are ambigious:
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatAmbigiousConstructorException(System.Object)">
            <summary>
            Unable to activate type '{0}'. The following constructors are ambigious:
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.CannotResolveService">
            <summary>
            Unable to resolve service for type '{0}' while attempting to activate '{1}'.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatCannotResolveService(System.Object,System.Object)">
            <summary>
            Unable to resolve service for type '{0}' while attempting to activate '{1}'.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.CircularDependencyException">
            <summary>
            A circular dependency was detected for the service of type '{0}'.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatCircularDependencyException(System.Object)">
            <summary>
            A circular dependency was detected for the service of type '{0}'.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.UnableToActivateTypeException">
            <summary>
            No constructor for type '{0}' can be instantiated using services from the service container and default values.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatUnableToActivateTypeException(System.Object)">
            <summary>
            No constructor for type '{0}' can be instantiated using services from the service container and default values.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.OpenGenericServiceRequiresOpenGenericImplementation">
            <summary>
            Open generic service type '{0}' requires registering an open generic implementation type.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatOpenGenericServiceRequiresOpenGenericImplementation(System.Object)">
            <summary>
            Open generic service type '{0}' requires registering an open generic implementation type.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.TypeCannotBeActivated">
            <summary>
            Cannot instantiate implementation type '{0}' for service type '{1}'.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatTypeCannotBeActivated(System.Object,System.Object)">
            <summary>
            Cannot instantiate implementation type '{0}' for service type '{1}'.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.NoConstructorMatch">
            <summary>
            A suitable constructor for type '{0}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatNoConstructorMatch(System.Object)">
            <summary>
            A suitable constructor for type '{0}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.ScopedInSingletonException">
            <summary>
            Cannot consume {2} service '{0}' from {3} '{1}'.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatScopedInSingletonException(System.Object,System.Object,System.Object,System.Object)">
            <summary>
            Cannot consume {2} service '{0}' from {3} '{1}'.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.ScopedResolvedFromRootException">
            <summary>
            Cannot resolve '{0}' from root provider because it requires {2} service '{1}'.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatScopedResolvedFromRootException(System.Object,System.Object,System.Object)">
            <summary>
            Cannot resolve '{0}' from root provider because it requires {2} service '{1}'.
            </summary>
        </member>
        <member name="P:Microsoft.Extensions.DependencyInjection.Resources.DirectScopedResolvedFromRootException">
            <summary>
            Cannot resolve {1} service '{0}' from root provider.
            </summary>
        </member>
        <member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatDirectScopedResolvedFromRootException(System.Object,System.Object)">
            <summary>
            Cannot resolve {1} service '{0}' from root provider.
            </summary>
        </member>
        <member name="T:Microsoft.Extensions.DependencyInjection.ServiceLookup.InstanceService">
            <summary>
            Summary description for InstanceService
            </summary>
        </member>
        <member name="T:Microsoft.Extensions.DependencyInjection.ServiceLookup.IServiceCallSite">
            <summary>
            Summary description for IServiceCallSite
            </summary>
        </member>
    </members>
</doc>


text:
    <meta charset="utf-8"/>
    <link rel="shortcut icon" href="./flavicon.ico" />
    <title>LOGIN</title>

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

        <fieldset>

Proszę się zalogować

            Nazwa gracza:
  <input type="text" id="inputName" class="form-control" placeholder="Nazwa gracza" required autofocus>
  Hasło:
  <input type="password" id="inputPassword" class="form-control" placeholder="hasło" required>
  <button class="btn btn-lg btn-primary btn-block" type="submit" id="btnSign" onclick="makeLogin();">Zaloguj</button>
        </fieldset>

            <input class="form-check-input" type="radio" name="sign" id="signin" value="in" onchange="onChangeSign(this);" checked>
            Zaloguj się

            <input class="form-check-input" type="radio" name="sign" id="signon" onchange="onChangeSign(this);" value="on" >
            Utwórz gracza


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd">
    <fixture name="globalSearch"
             module="Magento_Backend"
             class="Magento\Backend\Test\Fixture\GlobalSearch">
        <field name="query" source="Magento\Backend\Test\Fixture\GlobalSearch\Query" />
    </fixture>
</config>


text:
import java.io.InputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.apache.commons.io.IOUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;

public class Local_Test
{

	// Google data
	private boolean digital_check;
	private boolean character_check;

	// Pattern expression
	private static Pattern p;
	private static Matcher m;
	private static String space_pattern = "^[0-9]";

	static ArrayList<String> code = new ArrayList<String>();
	static ArrayList<String> name = new ArrayList<String>();

	// Output
	JSONParser parser_output = new JSONParser();
	JSONArray array_output;
		// Tag
		private String l_cur;		// 成交價格
		private String ltt;			// 時間
		private String lt;			// 日期時間
		private String c;			// 漲跌
		private String cp;			// 漲跌幅
	// Display
	private String Display_str = "";

	public Local_Test(String input) throws Exception
	{
		Read_Taiwan_StockID();

		String get_return = "";
    	String get_stockname = "";
		String getstockcode = "";
		// Digital check
        digital_check = Regular_Expression_Digital(input);
        if(digital_check == true){
        	// Input stock ID
        	if(input.length() == 4){

        		get_stockname = "";
            	get_stockname = Return_name(input);
            	if(get_stockname.length() > 0){
            		System.out.println(get_stockname);
            		String result_txt;
            		// Google
            		result_txt = Google_data(input);
            		// Google Source Error
            		if(result_txt.equalsIgnoreCase("Google Source Error")){
            			System.out.println("Google Source Error");
            		}else{
            			// String to Json
                		JSONObject google_json = String_to_Json(result_txt);
                		Display_str = Disply(google_json);
                		//return new TextMessage(Display_str);
                		System.out.println(Display_str);
            		}

            	}else{
            		get_return = "illegal";
            		//return new TextMessage(get_return);
            		System.out.println(get_return);
            	}

        	}else{
        		get_return = "Please input 4 digital code or Stock name";
        		//return new TextMessage(get_return);
        		System.out.println(get_return);
        	}
        }else{
        	// Input stock name
        	getstockcode = "";
        	if(input.length() > 0){
        		getstockcode = Return_code(input);
        		//String result_txt;
        		// Google finicial
        		//result_txt = Google_data(getstockcode);

        		//return new TextMessage(result_txt);
        		//return new TextMessage(getstockcode);
        		System.out.println(getstockcode);
        	}else{
        		get_return = "illegal";
        		//return new TextMessage(get_return);
        		System.out.println(get_return);
        	}

        	//Google_data(event.getMessage().getText());
        }

	}

	private static void Read_Taiwan_StockID() throws Exception
	{
		String url = "http://isin.twse.com.tw/isin/C_public.jsp?strMode=2";
		// JSoup Example 2 - Reading HTML page from URL
		Document doc = Jsoup.connect(url).timeout(5000).get();
		doc.outputSettings().charset("UTF-8");

		String temp_str;
		// div embed
		Elements div_embed_ele = doc.select("tr");

		boolean dig_check;
		for(int i=0; i<div_embed_ele.size(); i++)
		{
			// childNode()
			if(div_embed_ele.get(i).childNodeSize() == 7){
				//System.out.println(i+"	"+div_embed_ele.get(i).child(0));
				temp_str = div_embed_ele.get(i).child(0).toString().substring(22, div_embed_ele.get(i).child(0).toString().indexOf("</td>"));
				dig_check = Pattern_expression_digital(temp_str);
				if(dig_check == true){
					Separation(temp_str);
				}
			}
		}
	}

	private static void Separation(String input)
	{
		String code_temp = input.substring(0, 4);
		String name_temp = input.substring(5, input.length());

		code.add(code_temp);
		name.add(name_temp);
	}

	private static boolean Pattern_expression_digital(String input)
	{
		boolean check = false;
		String temp;
		if(input.trim().length() < 5){
			temp = input.trim();
		}else{
			temp = input.substring(4, 5).trim();
		}
		//System.out.println(temp);
        p = Pattern.compile(space_pattern);
        m = p.matcher(temp);
        if(m.find()){
        	//System.out.println("Not Digital");
        	check = false;
        }else{
        	check = true;
        }

		return check;
	}

	private static boolean Regular_Expression_Digital(String input_str)
    {
    	//Regular_Expression
    	String num_pattern = "[0-9]{4}";

    	// Number check
    	Pattern p = Pattern.compile(num_pattern);
    	Matcher  m = p.matcher(input_str);

    	boolean digital_temp;
    	if(m.find()){
    		digital_temp = true;
        }else{
        	digital_temp = false;
        }

    	return digital_temp;
    }

    private static String Return_name(String code_str)
	{
		String return_name = "";
		boolean check = false;
		for(int i=0; i<code.size(); i++)
		{
			if(code.get(i).toString().equalsIgnoreCase(code_str)){
				return_name = name.get(i).toString();
				check = true;
				break;
			}
		}

		if(check == true){
			return return_name;
		}else{
			return "No name";
		}
	}

    private static String Return_code(String name_str)
	{
		String return_code = "";
		boolean check = false;
		for(int i=0; i<name.size(); i++)
		{
			if(name.get(i).toString().equalsIgnoreCase(name_str)){
				return_code = code.get(i).toString();
				check = true;
				break;
			}
		}

		if(check == true){
			return return_code;
		}else{
			return "No code";
		}
	}

    private JSONObject String_to_Json(String input) throws Exception
   	{
   		// String to JsonArray
       	String input_json = input.substring(3, input.length());
   		array_output = (JSONArray)parser_output.parse(input_json);
   		JSONObject output_json = (JSONObject)array_output.get(0);
   		//System.out.println(output_json);

   		return output_json;
   	}

    private String Disply(JSONObject google_json)
    {
//    	private String l_cur;		// 成交價格
//		private String ltt;			// 時間
//		private String lt;			// 日期時間
//		private String c;			// 漲跌
//		private String cp;			// 漲跌幅

    	String Display_return = "";
    	Display_return += "時間" + google_json.get("lt") +"\n";
    	Display_return += "成交價格" + google_json.get("l_cur") +"\n";
    	Display_return += "漲跌" + google_json.get("c") +"\n";

    	return Display_return;
    }

    private String Google_data(String code)
	{
    	String url = "http://finance.google.com/finance/info?client=ig&q=TPE:"+ code;
    	//String url = "http://finance.google.com/finance/info?client=ig&q=TPE:"+ 2317;

    	URL urla;
    	String result_txt = "";
		try {
			urla = new URL(url);
			urla.openConnection();
			InputStream reader = urla.openStream();
			result_txt = IOUtils.toString(reader);
			//System.out.println(result);

		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
			result_txt = "Google Source Error";
		}

		return result_txt;
	}

	public static void main(String args[])
	{
		String ID_str = "2317";
		String Name_str;

		String input = ID_str;

		try {
			Local_Test lt = new Local_Test(input);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}


text:
package com.facebook.buck.android.aapt;

import static org.junit.Assert.assertThat;

import com.facebook.buck.io.ProjectFilesystem;
import com.facebook.buck.model.BuildTarget;
import com.facebook.buck.rules.BuildRuleParams;
import com.facebook.buck.rules.BuildRuleParamsFactory;
import com.facebook.buck.rules.BuildRuleResolver;
import com.facebook.buck.rules.FakeBuildContext;
import com.facebook.buck.rules.FakeBuildableContext;
import com.facebook.buck.rules.SourcePath;
import com.facebook.buck.rules.SourcePathResolver;
import com.facebook.buck.rules.TestSourcePath;
import com.facebook.buck.step.ExecutionContext;
import com.facebook.buck.step.Step;
import com.facebook.buck.step.TestExecutionContext;
import com.google.common.base.Function;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;

import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;

public class MergeAndroidResourcesSourcesTest {
  private static final String RESOURCES_XML_HEADER =
      "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n";
  private static final String RESOURCES_XML_FOOTER =
      "</resources>";

  @Rule
  public TemporaryFolder tmp = new TemporaryFolder();

  private final Function<Step, String> stepDescriptionFunction =
      new Function<Step, String>() {
        @Override
        public String apply(Step input) {
          return input.getDescription(context);
        }
      };

  private ExecutionContext context;
  private ProjectFilesystem filesystem;

  @Before
  public void setUp() throws Exception {
    filesystem = new ProjectFilesystem(tmp.getRoot().toPath());
    context = TestExecutionContext
        .newBuilder()
        .setProjectFilesystem(filesystem)
        .build();

    tmp.newFolder("res_in_1");
    tmp.newFolder("res_in_1/values");
    tmp.newFolder("res_in_1/drawable");
    tmp.newFile("res_in_1/drawable/one.png");

    tmp.newFolder("res_in_2");
    tmp.newFolder("res_in_2/values");
    tmp.newFolder("res_in_2/drawable");
    tmp.newFile("res_in_2/drawable/two.png");

    filesystem.writeContentsToPath(
        RESOURCES_XML_HEADER +
            "<string name=\"override_me\">one</string>\n" +
            "<string name=\"only_in_first\">first</string>\n" +
            RESOURCES_XML_FOOTER,
        Paths.get("res_in_1/values/strings.xml"));

    filesystem.writeContentsToPath(
        RESOURCES_XML_HEADER +
            "<string name=\"override_me\">two</string>\n" +
            "<string name=\"only_in_second\">second</string>\n" +
            RESOURCES_XML_FOOTER,
        Paths.get("res_in_2/values/strings.xml"));

    filesystem.writeContentsToPath("png, trust me", Paths.get("res_in_1/drawable/one.png"));
    filesystem.writeContentsToPath("png, trust me", Paths.get("res_in_2/drawable/two.png"));
  }

  @Test
  @SuppressWarnings("unchecked")
  public void testRuleStepCreation() throws IOException, InterruptedException {
    BuildRuleParams buildRuleParams = BuildRuleParamsFactory.createTrivialBuildRuleParams(
        BuildTarget.builder("//", "output_folder").build());
    ImmutableList<SourcePath> directories = ImmutableList.<SourcePath>of(
        new TestSourcePath("res_in_1"),
        new TestSourcePath("res_in_2"));
    MergeAndroidResourceSources mergeAndroidResourceSourcesStep =
        new MergeAndroidResourceSources(
            buildRuleParams,
            new SourcePathResolver(new BuildRuleResolver()),
            directories);

    ImmutableList<Step> steps = mergeAndroidResourceSourcesStep.getBuildSteps(
        FakeBuildContext.NOOP_CONTEXT,
        new FakeBuildableContext());
    assertThat(
        steps,
        Matchers.contains(
            Matchers.hasProperty("shortName", Matchers.equalTo("rm_&&_mkdir")),
            Matchers.instanceOf(MergeAndroidResourceSourcesStep.class)
        ));
    assertThat(
        FluentIterable.from(steps).transform(stepDescriptionFunction),
        Matchers.contains(
            Matchers.stringContainsInOrder("rm", "mkdir"),
            Matchers.equalTo(
                "merge-resources res_in_1,res_in_2 -> " +
                    "buck-out/gen/__merged_resources_output_folder__")
        )
    );
  }

  @Test
  public void testStepExecution() throws IOException, InterruptedException {
    Path rootPath = tmp.getRoot().toPath();
    File outFolder = tmp.newFolder("out");

    MergeAndroidResourceSourcesStep step = new MergeAndroidResourceSourcesStep(
        ImmutableList.of(rootPath.resolve("res_in_1"), rootPath.resolve("res_in_2")),
        outFolder.toPath()
    );
    step.execute(context);
    assertThat(
        filesystem.getFilesUnderPath(outFolder.toPath()),
        Matchers.containsInAnyOrder(
            Paths.get("out", "drawable", "one.png"),
            Paths.get("out", "drawable", "two.png"),
            Paths.get("out", "values", "values.xml")
        ));
    assertThat(
        filesystem.readFileIfItExists(outFolder.toPath().resolve("values/values.xml")).get(),
        Matchers.equalTo(
            RESOURCES_XML_HEADER +
                "    <string name=\"only_in_first\">first</string>\n" +
                "    <string name=\"only_in_second\">second</string>\n" +
                "    <string name=\"override_me\">two</string>\n" +
            RESOURCES_XML_FOOTER
        )
    );
  }
}


text:
namespace settings {

AppearanceHandler::AppearanceHandler(content::WebUI* webui)
    : profile_(Profile::FromWebUI(webui)) {}

AppearanceHandler::~AppearanceHandler() {}

void AppearanceHandler::OnJavascriptAllowed() {}
void AppearanceHandler::OnJavascriptDisallowed() {}

void AppearanceHandler::RegisterMessages() {
  web_ui()->RegisterMessageCallback(
      "useDefaultTheme",
      base::BindRepeating(&AppearanceHandler::HandleUseDefaultTheme,
                          base::Unretained(this)));
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
  web_ui()->RegisterMessageCallback(
      "useSystemTheme",
      base::BindRepeating(&AppearanceHandler::HandleUseSystemTheme,
                          base::Unretained(this)));
#endif
}

void AppearanceHandler::HandleUseDefaultTheme(const base::ListValue* args) {
  ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme();
}

#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) {
  if (profile_->IsSupervised())
    NOTREACHED();
  else
    ThemeServiceFactory::GetForProfile(profile_)->UseSystemTheme();
}
#endif

}  // namespace settings


text:
require 'spec_helper'

describe HotelsPro::Api::Methods::AmendHotelBooking do
  include RequestHelper

  it "should build correct api params hash" do
    method = HotelsPro::Api::Methods::AmendHotelBooking.new(
      :tracking_id => "XI-HW-82431210",
      :check_in => Date.parse("2012-10-05"),
      :check_out => Date.parse("2012-10-12"),
      :lead_traveller_info => HotelsPro::Api::Elements::LeadTraveller.new(
        :pax_info => HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :title => "Mr", :first_name => "John", :last_name => "Doe"),
        :nationality => "US"
      ),
      :rooms => [
        HotelsPro::Api::Elements::PaxArray.new(
          :paxes => [
            HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :title => "Mr", :first_name => "John", :last_name => "Doe"),
            HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :age => 30, :title => "Mrs", :first_name => "Amanda", :last_name => "Doe")
          ]
        )
      ],
      :preferences => "nonSmoking",
      :note => "I don't like french fries"
    )

    method.to_api_params.should == {
      "trackingId" => "XI-HW-82431210",
      "checkIn" => "2012-10-05",
      "checkOut" => "2012-10-12",
      "leadTravellerInfo" => {
        "paxInfo" => {
          "paxType" => "Adult",
          "title" => "Mr",
          "firstName" => "John",
          "lastName" => "Doe"
        },
        "nationality" => "US"
      },
      "rooms" => [
        [{ "paxType" => "Adult", "title" => "Mr", "firstName" => "John", "lastName" => "Doe" }, { "paxType" => "Adult", "age" => "30", "title" => "Mrs", "firstName" => "Amanda", "lastName" => "Doe" }]
      ],
      "preferences" => "nonSmoking",
      "note" => "I don't like french fries"
    }
  end

  it "should return result when performed" do
    HotelsPro::Stubs.amend_hotel_booking.response(fixture('amend_hotel_booking'))

    method = HotelsPro::Api::Methods::AmendHotelBooking.new(
      :tracking_id => "XI-HW-82431210",
      :check_in => Date.parse("2012-10-05"),
      :check_out => Date.parse("2012-10-12"),
      :lead_traveller_info => HotelsPro::Api::Elements::LeadTraveller.new(
        :pax_info => HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :title => "Mr", :first_name => "John", :last_name => "Doe"),
        :nationality => "US"
      ),
      :rooms => [
        HotelsPro::Api::Elements::PaxArray.new(
          :paxes => [
            HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :title => "Mr", :first_name => "John", :last_name => "Doe"),
            HotelsPro::Api::Elements::Pax.new(:pax_type => "Adult", :age => 30, :title => "Mrs", :first_name => "Amanda", :last_name => "Doe")
          ]
        )
      ],
      :preferences => "nonSmoking",
      :note => "I don't like french fries"
    )

    result = method.perform

    result.should be_instance_of HotelsPro::Api::Methods::AmendHotelBooking::Result
    result.response_id.should == 5762113
    result.tracking_id.should == "XI-HW-82431210"
    result.amend_status.should == "Pending"
    result.note.should == "Your amendment request has been received. You will be contacted regarding amendment results by email or by message in our online system."
  end
end


text:
NAME = 'retask'
VERSION = '0.4'
DESCRIPTION = 'Task Queue implementation in python'
LONG_DESCRIPTION = '''Retask is a simple task queue implementation written for human beings. It provides generic solution to create and manage task queues.'''
AUTHOR = 'Kushal Das'
EMAIL = 'kushaldas@gmail.com'
COPYRIGHT = '2012-13 Kushal Das'
URL = 'https://github.com/kushaldas/retask'
LICENSE = 'MIT'

__all__ = ('NAME', 'VERSION', 'DESCRIPTION', 'LONG_DESCRIPTION', 'AUTHOR', 'EMAIL', 'COPYRIGHT', 'URL', 'LICENSE')


text:
<?php
global $action;
global $IC;
global $model;
global $itemtype;

$items = $IC->getItems(array("order" => "itemtype", "extend" => array("subscription_method" => true, "prices" => true)));
$item_options = $model->toOptions($items, "id", "name", ["add" => ["" => "Select an item"]]);

?>

New question

		<?= $JML->newList(array("label" => "List")) ?>

	<?= $model->formStart("save", array("class" => "i:defaultNew labelstyle:inject")) ?>
		<?= $model->input("status", array("type" => "hidden", "value" => 1)) ?>
		<?= $model->input("name", array("type" => "hidden", "value" => time())) ?>
		<fieldset>
			<?= $model->input("about_item_id", array(
				"type" => "select",
				"options" => $item_options,
			)) ?>
			<?= $model->input("question") ?>
		</fieldset>

		<?= $JML->newActions() ?>
	<?= $model->formEnd() ?>


text:
.. _id.appendix.behave_ecosystem:

Behave Ecosystem
==============================================================================

The following tools and extensions try to simplify the work with `behave`_.

.. _behave: https://github.com/behave/behave

Tools
------------------------------------------------------------------------------

=========================== ===========================================================================
Tool                        Description
=========================== ===========================================================================
`cucutags`_                 Generate `ctags`_-like information (cross-reference index)
                            for Gherkin feature files and behave step definitions.
=========================== ===========================================================================

.. _cucutags:   https://gitorious.org/cucutags/cucutags/
.. _ctags:      http://ctags.sourceforge.net/

Editor Plugins
------------------------------------------------------------------------------

=================== =============================================================================
Editor Plugin       Description
=================== =============================================================================
`gedit-behave`_     `gedit`_ plugin for jumping between feature and step files.
`vim-behave`_       `vim`_ plugin: Port of `vim-cucumber`_ to Python `behave`_.
=================== =============================================================================

.. _gedit:  https://projects.gnome.org/gedit/
.. _vim:    http://www.vim.org/

.. _gedit-behave:   https://gitorious.org/cucutags/gedit-behave
.. _vim-behave:     https://gitorious.org/cucutags/vim-behave
.. _vim-cucumber:   https://github.com/tpope/vim-cucumber.git


text:
import React from 'react';
import isEqual from 'lodash/isEqual';

import Button from 'app/components/button';
import {IconDelete} from 'app/icons';
import {t} from 'app/locale';

import {QueryBuilder} from '../queryBuilder';
import {
  ButtonSpinner,
  QueryActions,
  QueryActionsGroup,
  SavedQueryAction,
} from '../styles';
import {SavedQuery} from '../types';
import {parseSavedQuery} from '../utils';

import QueryFields from './queryFields';

type EditSavedQueryProps = {
  queryBuilder: QueryBuilder;
  onRunQuery: () => void;
  savedQuery: SavedQuery;
  onUpdateField: (field: string, value: any) => void;
  onDeleteQuery: () => void;
  onSaveQuery: (name: string) => void;
  isFetchingQuery: boolean;
  isLoading: boolean;
};

type EditSavedQueryState = {
  savedQueryName: string;
};

export default class EditSavedQuery extends React.Component<
  EditSavedQueryProps,
  EditSavedQueryState
> {
  constructor(props: EditSavedQueryProps) {
    super(props);
    this.state = {
      savedQueryName: props.savedQuery.name,
    };
  }

  handleUpdateName(savedQueryName: string) {
    this.setState({savedQueryName});
  }

  hasChanges() {
    const {queryBuilder, savedQuery} = this.props;

    const hasChanged =
      !isEqual(parseSavedQuery(savedQuery), queryBuilder.getInternal()) ||
      this.state.savedQueryName !== savedQuery.name;
    return hasChanged;
  }

  render() {
    const {
      queryBuilder,
      savedQuery,
      isFetchingQuery,
      onUpdateField,
      onRunQuery,
      onDeleteQuery,
      onSaveQuery,
      isLoading,
    } = this.props;

    const {savedQueryName} = this.state;

    return (
      <QueryFields
        queryBuilder={queryBuilder}
        onUpdateField={onUpdateField}
        isLoading={isLoading}
        savedQuery={savedQuery}
        savedQueryName={this.state.savedQueryName}
        onUpdateName={name => this.handleUpdateName(name)}
        actions={
          <QueryActions>
            <QueryActionsGroup>

                <Button
                  size="xsmall"
                  onClick={onRunQuery}
                  priority="primary"
                  busy={isFetchingQuery}
                >
                  {t('Run')}
                  {isFetchingQuery && <ButtonSpinner />}
                </Button>

                <Button
                  size="xsmall"
                  onClick={() => onSaveQuery(savedQueryName)}
                  disabled={!this.hasChanges()}
                >
                  {t('Save')}
                </Button>

            </QueryActionsGroup>

              <SavedQueryAction to="" data-test-id="delete" onClick={onDeleteQuery}>
                <IconDelete />
              </SavedQueryAction>

          </QueryActions>
        }
      />
    );
  }
}


text:
class EnvironmentUnitTest
{
    public:
        EnvironmentUnitTest();
    protected:
    private:
};

#endif // ENVIRONMENTUNITTEST_H


text:
'use strict';
angular.module('todoApp')
    .controller('homeCtrl', ['$scope', 'msalAuthenticationService', '$location', '$log', '$http', '$rootScope', function ($scope, msalService, $location, $log, $http, $rootScope) {
        $scope.login = function () {
            if (window.popUp) {
                msalService.loginPopup();
            } else {
                msalService.loginRedirect();
            }
        };

        $scope.logout = function () {
            msalService.logout();
        };
        $scope.isActive = function (viewLocation) {
            return viewLocation === $location.path();
        };

    }]);


text:
package com.ing.pomodoro.rest.client.model.wrapper;/**
 * Created by YoungGun on 2015-11-10.
 */

/**
 * @author YoungGun
 */

public class PTaskWrapper {
}


text:
Translations
============

The Qt GUI can be easily translated into other languages. Here's how we
handle those translations.

Files and Folders
-----------------

### fucoin-qt.pro

This file takes care of generating `.qm` files from `.ts` files. It is mostly
automated.

### src/qt/fucoin.qrc

This file must be updated whenever a new translation is added. Please note that
files must end with `.qm`, not `.ts`.

    <qresource prefix="/translations">
        <file alias="en">locale/fucoin_en.qm</file>
        ...
    </qresource>

### src/qt/locale/

This directory contains all translations. Filenames must adhere to this format:

    fucoin_xx_YY.ts or fucoin_xx.ts

#### Source file

`src/qt/locale/fucoin_en.ts` is treated in a special way. It is used as the
source for all other translations. Whenever a string in the code is changed
this file must be updated to reflect those changes. Usually, this can be
accomplished by running `lupdate` (included in the Qt SDK).

An updated source file should be merged to github and transifex will pick it
up from there. Afterwards the new strings show up as "Remaining" in transifex
and can be translated.

Syncing with transifex
----------------------

We are using http://transifex.net as a frontend for translating the client.

https://www.transifex.net/projects/p/fucoin/resource/tx/

The "transifex client" (see: http://help.transifex.net/features/client/)
will help with fetching new translations from transifex. Use the following
config to be able to connect with the client.

### .tx/config

    [main]
    host = https://www.transifex.net

    [fucoin.tx]
    file_filter = src/qt/locale/fucoin_<lang>.ts
    source_file = src/qt/locale/fucoin_en.ts
    source_lang = en

### .tx/config (for Windows)

    [main]
    host = https://www.transifex.net

    [fucoin.tx]
    file_filter = src\qt\locale\fucoin_<lang>.ts
    source_file = src\qt\locale\fucoin_en.ts
    source_lang = en

It is also possible to directly download new translations one by one from transifex.

### Fetching new translations

1. `tx pull -a`
2. update `src/qt/fucoin.qrc` manually or via
   `ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(fucoin_\(.*\)\).ts/<file alias="\2">locale/\1.qm<\/file>/'`
3. `git add` new translations from `src/qt/locale/`


text:
<?php

namespace Symfony\Bridge\Doctrine\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\ContainerAwareEventManager;
use Symfony\Component\DependencyInjection\Container;

class ContainerAwareEventManagerTest extends TestCase
{
    private $container;
    private $evm;

    protected function setUp(): void
    {
        $this->container = new Container();
        $this->evm = new ContainerAwareEventManager($this->container);
    }

    public function testDispatchEvent()
    {
        $this->container->set('lazy1', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy1');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());
        $this->container->set('lazy2', $listener3 = new MyListener());
        $this->evm->addEventListener('bar', 'lazy2');
        $this->evm->addEventListener('bar', $listener4 = new MyListener());
        $this->container->set('lazy3', $listener5 = new MyListener());
        $this->evm->addEventListener('foo', $listener5 = new MyListener());
        $this->evm->addEventListener('bar', $listener5);

        $this->evm->dispatchEvent('foo');
        $this->evm->dispatchEvent('bar');

        $this->assertSame(0, $listener1->calledByInvokeCount);
        $this->assertSame(1, $listener1->calledByEventNameCount);
        $this->assertSame(0, $listener2->calledByInvokeCount);
        $this->assertSame(1, $listener2->calledByEventNameCount);
        $this->assertSame(1, $listener3->calledByInvokeCount);
        $this->assertSame(0, $listener3->calledByEventNameCount);
        $this->assertSame(1, $listener4->calledByInvokeCount);
        $this->assertSame(0, $listener4->calledByEventNameCount);
        $this->assertSame(1, $listener5->calledByInvokeCount);
        $this->assertSame(1, $listener5->calledByEventNameCount);
    }

    public function testAddEventListenerAfterDispatchEvent()
    {
        $this->container->set('lazy1', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy1');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());
        $this->container->set('lazy2', $listener3 = new MyListener());
        $this->evm->addEventListener('bar', 'lazy2');
        $this->evm->addEventListener('bar', $listener4 = new MyListener());
        $this->container->set('lazy3', $listener5 = new MyListener());
        $this->evm->addEventListener('foo', $listener5 = new MyListener());
        $this->evm->addEventListener('bar', $listener5);

        $this->evm->dispatchEvent('foo');
        $this->evm->dispatchEvent('bar');

        $this->container->set('lazy4', $listener6 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy4');
        $this->evm->addEventListener('foo', $listener7 = new MyListener());
        $this->container->set('lazy5', $listener8 = new MyListener());
        $this->evm->addEventListener('bar', 'lazy5');
        $this->evm->addEventListener('bar', $listener9 = new MyListener());
        $this->container->set('lazy6', $listener10 = new MyListener());
        $this->evm->addEventListener('foo', $listener10 = new MyListener());
        $this->evm->addEventListener('bar', $listener10);

        $this->evm->dispatchEvent('foo');
        $this->evm->dispatchEvent('bar');

        $this->assertSame(0, $listener1->calledByInvokeCount);
        $this->assertSame(2, $listener1->calledByEventNameCount);
        $this->assertSame(0, $listener2->calledByInvokeCount);
        $this->assertSame(2, $listener2->calledByEventNameCount);
        $this->assertSame(2, $listener3->calledByInvokeCount);
        $this->assertSame(0, $listener3->calledByEventNameCount);
        $this->assertSame(2, $listener4->calledByInvokeCount);
        $this->assertSame(0, $listener4->calledByEventNameCount);
        $this->assertSame(2, $listener5->calledByInvokeCount);
        $this->assertSame(2, $listener5->calledByEventNameCount);

        $this->assertSame(0, $listener6->calledByInvokeCount);
        $this->assertSame(1, $listener6->calledByEventNameCount);
        $this->assertSame(0, $listener7->calledByInvokeCount);
        $this->assertSame(1, $listener7->calledByEventNameCount);
        $this->assertSame(1, $listener8->calledByInvokeCount);
        $this->assertSame(0, $listener8->calledByEventNameCount);
        $this->assertSame(1, $listener9->calledByInvokeCount);
        $this->assertSame(0, $listener9->calledByEventNameCount);
        $this->assertSame(1, $listener10->calledByInvokeCount);
        $this->assertSame(1, $listener10->calledByEventNameCount);
    }

    public function testGetListenersForEvent()
    {
        $this->container->set('lazy', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());

        $this->assertSame([$listener1, $listener2], array_values($this->evm->getListeners('foo')));
    }

    public function testGetListeners()
    {
        $this->container->set('lazy', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());

        $this->assertSame([$listener1, $listener2], array_values($this->evm->getListeners()['foo']));
    }

    public function testRemoveEventListener()
    {
        $this->container->set('lazy', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());

        $this->evm->removeEventListener('foo', $listener2);
        $this->assertSame([$listener1], array_values($this->evm->getListeners('foo')));

        $this->evm->removeEventListener('foo', 'lazy');
        $this->assertSame([], $this->evm->getListeners('foo'));
    }

    public function testRemoveEventListenerAfterDispatchEvent()
    {
        $this->container->set('lazy', $listener1 = new MyListener());
        $this->evm->addEventListener('foo', 'lazy');
        $this->evm->addEventListener('foo', $listener2 = new MyListener());

        $this->evm->dispatchEvent('foo');

        $this->evm->removeEventListener('foo', $listener2);
        $this->assertSame([$listener1], array_values($this->evm->getListeners('foo')));

        $this->evm->removeEventListener('foo', 'lazy');
        $this->assertSame([], $this->evm->getListeners('foo'));
    }
}

class MyListener
{
    public $calledByInvokeCount = 0;
    public $calledByEventNameCount = 0;

    public function __invoke(): void
    {
        ++$this->calledByInvokeCount;
    }

    public function foo()
    {
        ++$this->calledByEventNameCount;
    }
}


text:
package com.amazonaws.services.lambda.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AddLayerVersionPermissionResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * The permission statement.
     *

     */
    private String statement;
    /**
     *

     * A unique identifier for the current revision of the policy.
     *

     */
    private String revisionId;

    /**
     *

     * The permission statement.
     *

     *
     * @param statement
     *        The permission statement.
     */

    public void setStatement(String statement) {
        this.statement = statement;
    }

    /**
     *

     * The permission statement.
     *

     *
     * @return The permission statement.
     */

    public String getStatement() {
        return this.statement;
    }

    /**
     *

     * The permission statement.
     *

     *
     * @param statement
     *        The permission statement.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AddLayerVersionPermissionResult withStatement(String statement) {
        setStatement(statement);
        return this;
    }

    /**
     *

     * A unique identifier for the current revision of the policy.
     *

     *
     * @param revisionId
     *        A unique identifier for the current revision of the policy.
     */

    public void setRevisionId(String revisionId) {
        this.revisionId = revisionId;
    }

    /**
     *

     * A unique identifier for the current revision of the policy.
     *

     *
     * @return A unique identifier for the current revision of the policy.
     */

    public String getRevisionId() {
        return this.revisionId;
    }

    /**
     *

     * A unique identifier for the current revision of the policy.
     *

     *
     * @param revisionId
     *        A unique identifier for the current revision of the policy.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AddLayerVersionPermissionResult withRevisionId(String revisionId) {
        setRevisionId(revisionId);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStatement() != null)
            sb.append("Statement: ").append(getStatement()).append(",");
        if (getRevisionId() != null)
            sb.append("RevisionId: ").append(getRevisionId());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof AddLayerVersionPermissionResult == false)
            return false;
        AddLayerVersionPermissionResult other = (AddLayerVersionPermissionResult) obj;
        if (other.getStatement() == null ^ this.getStatement() == null)
            return false;
        if (other.getStatement() != null && other.getStatement().equals(this.getStatement()) == false)
            return false;
        if (other.getRevisionId() == null ^ this.getRevisionId() == null)
            return false;
        if (other.getRevisionId() != null && other.getRevisionId().equals(this.getRevisionId()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getStatement() == null) ? 0 : getStatement().hashCode());
        hashCode = prime * hashCode + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode());
        return hashCode;
    }

    @Override
    public AddLayerVersionPermissionResult clone() {
        try {
            return (AddLayerVersionPermissionResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}