text:
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.Management.Resources.Models;

namespace Azure.Management.Resources
{
    internal partial class TagsRestClient
    {
        private string subscriptionId;
        private Uri endpoint;
        private string apiVersion;
        private ClientDiagnostics _clientDiagnostics;
        private HttpPipeline _pipeline;

        /// <summary> Initializes a new instance of TagsRestClient. </summary>
        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
        /// <param name="subscriptionId"> The ID of the target subscription. </param>
        /// <param name="endpoint"> server parameter. </param>
        /// <param name="apiVersion"> Api Version. </param>
        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception>
        public TagsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2017-05-10")
        {
            if (subscriptionId == null)
            {
                throw new ArgumentNullException(nameof(subscriptionId));
            }
            endpoint ??= new Uri("https://management.azure.com");
            if (apiVersion == null)
            {
                throw new ArgumentNullException(nameof(apiVersion));
            }

            this.subscriptionId = subscriptionId;
            this.endpoint = endpoint;
            this.apiVersion = apiVersion;
            _clientDiagnostics = clientDiagnostics;
            _pipeline = pipeline;
        }

        internal Core.HttpMessage CreateDeleteValueRequest(string tagName, string tagValue)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Delete;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/tagNames/", false);
            uri.AppendPath(tagName, true);
            uri.AppendPath("/tagValues/", false);
            uri.AppendPath(tagValue, true);
            uri.AppendQuery("api-version", apiVersion, true);
            request.Uri = uri;
            return message;
        }

        /// <summary> Deletes a tag value. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="tagValue"> The value of the tag to delete. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response> DeleteValueAsync(string tagName, string tagValue, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }
            if (tagValue == null)
            {
                throw new ArgumentNullException(nameof(tagValue));
            }

            using var message = CreateDeleteValueRequest(tagName, tagValue);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 204:
                    return message.Response;
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> Deletes a tag value. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="tagValue"> The value of the tag to delete. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response DeleteValue(string tagName, string tagValue, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }
            if (tagValue == null)
            {
                throw new ArgumentNullException(nameof(tagValue));
            }

            using var message = CreateDeleteValueRequest(tagName, tagValue);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 204:
                    return message.Response;
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal Core.HttpMessage CreateCreateOrUpdateValueRequest(string tagName, string tagValue)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Put;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/tagNames/", false);
            uri.AppendPath(tagName, true);
            uri.AppendPath("/tagValues/", false);
            uri.AppendPath(tagValue, true);
            uri.AppendQuery("api-version", apiVersion, true);
            request.Uri = uri;
            return message;
        }

        /// <summary> Creates a tag value. The name of the tag must already exist. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="tagValue"> The value of the tag to create. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response<TagValue>> CreateOrUpdateValueAsync(string tagName, string tagValue, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }
            if (tagValue == null)
            {
                throw new ArgumentNullException(nameof(tagValue));
            }

            using var message = CreateCreateOrUpdateValueRequest(tagName, tagValue);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    {
                        TagValue value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagValue.DeserializeTagValue(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> Creates a tag value. The name of the tag must already exist. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="tagValue"> The value of the tag to create. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<TagValue> CreateOrUpdateValue(string tagName, string tagValue, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }
            if (tagValue == null)
            {
                throw new ArgumentNullException(nameof(tagValue));
            }

            using var message = CreateCreateOrUpdateValueRequest(tagName, tagValue);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    {
                        TagValue value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagValue.DeserializeTagValue(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal Core.HttpMessage CreateCreateOrUpdateRequest(string tagName)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Put;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/tagNames/", false);
            uri.AppendPath(tagName, true);
            uri.AppendQuery("api-version", apiVersion, true);
            request.Uri = uri;
            return message;
        }

        /// <summary> The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes. </summary>
        /// <param name="tagName"> The name of the tag to create. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response<TagDetails>> CreateOrUpdateAsync(string tagName, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }

            using var message = CreateCreateOrUpdateRequest(tagName);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    {
                        TagDetails value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagDetails.DeserializeTagDetails(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes. </summary>
        /// <param name="tagName"> The name of the tag to create. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<TagDetails> CreateOrUpdate(string tagName, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }

            using var message = CreateCreateOrUpdateRequest(tagName);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 201:
                    {
                        TagDetails value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagDetails.DeserializeTagDetails(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal Core.HttpMessage CreateDeleteRequest(string tagName)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Delete;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/tagNames/", false);
            uri.AppendPath(tagName, true);
            uri.AppendQuery("api-version", apiVersion, true);
            request.Uri = uri;
            return message;
        }

        /// <summary> You must remove all values from a resource tag before you can delete it. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response> DeleteAsync(string tagName, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }

            using var message = CreateDeleteRequest(tagName);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                case 204:
                    return message.Response;
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> You must remove all values from a resource tag before you can delete it. </summary>
        /// <param name="tagName"> The name of the tag. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response Delete(string tagName, CancellationToken cancellationToken = default)
        {
            if (tagName == null)
            {
                throw new ArgumentNullException(nameof(tagName));
            }

            using var message = CreateDeleteRequest(tagName);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                case 204:
                    return message.Response;
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal Core.HttpMessage CreateListRequest()
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendPath("/subscriptions/", false);
            uri.AppendPath(subscriptionId, true);
            uri.AppendPath("/tagNames", false);
            uri.AppendQuery("api-version", apiVersion, true);
            request.Uri = uri;
            return message;
        }

        /// <summary> Gets the names and values of all resource tags that are defined in a subscription. </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response<TagsListResult>> ListAsync(CancellationToken cancellationToken = default)
        {
            using var message = CreateListRequest();
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        TagsListResult value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagsListResult.DeserializeTagsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> Gets the names and values of all resource tags that are defined in a subscription. </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<TagsListResult> List(CancellationToken cancellationToken = default)
        {
            using var message = CreateListRequest();
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        TagsListResult value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagsListResult.DeserializeTagsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }

        internal Core.HttpMessage CreateListNextPageRequest(string nextLink)
        {
            var message = _pipeline.CreateMessage();
            var request = message.Request;
            request.Method = RequestMethod.Get;
            var uri = new RawRequestUriBuilder();
            uri.Reset(endpoint);
            uri.AppendRawNextLink(nextLink, false);
            request.Uri = uri;
            return message;
        }

        /// <summary> Gets the names and values of all resource tags that are defined in a subscription. </summary>
        /// <param name="nextLink"> The URL to the next page of results. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public async ValueTask<Response<TagsListResult>> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default)
        {
            if (nextLink == null)
            {
                throw new ArgumentNullException(nameof(nextLink));
            }

            using var message = CreateListNextPageRequest(nextLink);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        TagsListResult value = default;
                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagsListResult.DeserializeTagsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }

        /// <summary> Gets the names and values of all resource tags that are defined in a subscription. </summary>
        /// <param name="nextLink"> The URL to the next page of results. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public Response<TagsListResult> ListNextPage(string nextLink, CancellationToken cancellationToken = default)
        {
            if (nextLink == null)
            {
                throw new ArgumentNullException(nameof(nextLink));
            }

            using var message = CreateListNextPageRequest(nextLink);
            _pipeline.Send(message, cancellationToken);
            switch (message.Response.Status)
            {
                case 200:
                    {
                        TagsListResult value = default;
                        using var document = JsonDocument.Parse(message.Response.ContentStream);
                        if (document.RootElement.ValueKind == JsonValueKind.Null)
                        {
                            value = null;
                        }
                        else
                        {
                            value = TagsListResult.DeserializeTagsListResult(document.RootElement);
                        }
                        return Response.FromValue(value, message.Response);
                    }
                default:
                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }
    }
}


text:
/* Tip: Use "@import" to add styles instead of adding <link>'s in your
   HTML, and volo will inline it when building for production */

/* Styles for the installation button */
@import "install-button.css";

/* Your styles here */

html {
  background:
    url(../img/pattern.png) repeat left top,
    url(../img/gradient.png) no-repeat left top / 100% 100%;
    min-height: 100%;
}

body {
  font-family: Arial, sans-serif;
}

/* battery indicator */
#indicator {
  border: 2px solid #999;
  text-align: center;
  font-weight: bold;
  margin: 20px 0;
  color: #fff;
}
#indicator span {
  padding: 20px 0;
  background: red;
  display: block;

  transition-property: all;
  transition-duration: 2s;
}

#indicator.charging {
  border-color: gold;
}
#indicator.charging span {
  background: green;
}

.container:before, .container:after {
    content: "\0020";
    display: block;
    height: 0;
    overflow: hidden;
}
.container:after {
    clear: both;
}

/* functional list builder */
.items, .controls {
    width: 46%;
    float: left;
    padding: 1%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }
  .items {
    margin-right: 2%;
  }
  .items ul {
    display: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
  .items.has-items ul {
    display: block;
  }
  .items li {
    position: relative;
    padding: 10px 100px 10px 10px;
    border-bottom: 1px dotted #666;
  }

  .items p {
    padding: 10px 0;
  }
  .items h2, .items p {
    margin: 0;
  }

  .items.has-items p {
    display: none;
  }
  .controls {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
  }
  .controls input {
    width: 76%;
    display: inline-block;
    margin-right: 1%;
    padding: 2%;
    font-size: 1em;
  }
  .add-button {
    background: url(../img/recommend.png) 0 bottom repeat-x #00caf2;
    text-align: center;
    display: inline-block;
    padding: 2%;
    color: white;
    border: 0;
    cursor: pointer;
    width: 15%;
    display: inline-block;
    font-size: 1em;
  }

  .delete {
    color: #f34f00;
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8em;
  }

 /* adjust to smaller devices */
 @media only screen and (max-width : 500px) {

  #indicator {
    width: auto;
    margin: 0;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 10px;
    border-width: 2px;
    overflow: hidden;
    text-indent: -9999px;
    padding: 0;
  }

  .container {
    margin-top: 30px;
  }

  .items, .controls {
    width: auto;
    float: none;
    margin: 0;
    padding: 3%;
  }

  .items {
    margin: 0 0 20px 0;
  }

  .controls input, .controls button {
    display: block;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    font-size: 1.3em;
  }
 }

redpajama_set_name: RedPajamaGithub


text:
var mw = require('./middleware');

module.exports = [ {
  title: 'Errors',
  middleware: [ mw.formatQuery, mw.paginate, mw.find ],
  template: 'admin/pages/errors',
  reload: true
} ];


text:
package org.springframework.boot.test.autoconfigure.web.servlet;

import java.util.concurrent.Executors;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.security.concurrent.DelegatingSecurityContextExecutor;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.htmlunit.webdriver.MockMvcHtmlUnitDriverBuilder;
import org.springframework.util.ClassUtils;

/**
 * Auto-configuration for Selenium {@link WebDriver} MockMVC integration.
 *
 * @author Phillip Webb
 * @since 1.4.0
 */
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(HtmlUnitDriver.class)
@AutoConfigureAfter(MockMvcAutoConfiguration.class)
@ConditionalOnProperty(prefix = "spring.test.mockmvc.webdriver", name = "enabled",
		matchIfMissing = true)
public class MockMvcWebDriverAutoConfiguration {

	private static final String SECURITY_CONTEXT_EXECUTOR = "org.springframework.security.concurrent.DelegatingSecurityContextExecutor";

	@Bean
	@ConditionalOnMissingBean({ WebDriver.class, MockMvcHtmlUnitDriverBuilder.class })
	@ConditionalOnBean(MockMvc.class)
	public MockMvcHtmlUnitDriverBuilder mockMvcHtmlUnitDriverBuilder(MockMvc mockMvc,
			Environment environment) {
		return MockMvcHtmlUnitDriverBuilder.mockMvcSetup(mockMvc)
				.withDelegate(new LocalHostWebConnectionHtmlUnitDriver(environment,
						BrowserVersion.CHROME));
	}

	@Bean
	@ConditionalOnMissingBean(WebDriver.class)
	@ConditionalOnBean(MockMvcHtmlUnitDriverBuilder.class)
	public HtmlUnitDriver htmlUnitDriver(MockMvcHtmlUnitDriverBuilder builder) {
		HtmlUnitDriver driver = builder.build();
		if (ClassUtils.isPresent(SECURITY_CONTEXT_EXECUTOR,
				getClass().getClassLoader())) {
			driver.setExecutor(new DelegatingSecurityContextExecutor(
					Executors.newSingleThreadExecutor()));
		}
		return driver;
	}

}


text:
'use strict'

var Model = require('./model')

var objects = []
var bindingsMap = {}
var modelsMap = {}

/**
 * Binding contructor.
 *
 * @param {Cycle} cycle
 * @param {Model} model
 * @param {String} prop
 * @api private
 */
function Binding(cycle, model, prop) {
    this.cycle = cycle
    this.model = model
    this.prop = prop
}

module.exports = Binding

/**
 * Create a Binding instance.
 *
 * @param {Cycle} cycle
 * @param {Object} object
 * @param {String} prop
 * @return {Binding}
 * @api public
 */
Binding.create = function (cycle, object, prop) {
    var objectIndex = objects.indexOf(object)
    var binding

    // Check if we have already a binding for this object.prop.
    if (objectIndex >= 0) {
        binding = bindingsMap[objectIndex][prop]
    }

    if (binding) return binding

    var model
    // Check if we have already a model for this object.
    if (objectIndex >= 0) {
        model = modelsMap[objectIndex]
    }

    if (objectIndex == -1) {
        objects.push(object)
        objectIndex = objects.length - 1
    }

    if (!model) {
        model = new Model()
        modelsMap[objectIndex] = model
        cycle.add(model)
    }

    binding = new Binding(cycle, model, prop)
    if (!bindingsMap[objectIndex]) bindingsMap[objectIndex] = {}
    bindingsMap[objectIndex][prop] = binding
    Binding.defineProperty(object, prop, model)

    return binding
}

/**
 * Create getter/setter connected to the model.
 *
 * @param {Object} object
 * @param {String} prop
 * @param {Model} model
 * @api private
 */
Binding.defineProperty = function (object, prop, model) {
    // Don't loose the value if already defined.
    if (object[prop] != null) model.set(prop, object[prop])
    Object.defineProperty(object, prop, {
        enumerable: true,
        get: function () {
            return model.get(prop)
        },
        set: function (value) {
            model.set(prop, value)
        }
    })
}

/**
 * Bind current object to some other one.
 *
 * Options:
 *   - `transform` returned value will be applied, gets a value as a param
 *   - `changed` callback with new value (after transformation) as a param
 *
 * @param {Object} object
 * @param {String} prop
 * @param {Object} [options]
 * @api public
 */
Binding.prototype.to = function (object, prop, options) {
    options || (options = {})
    var binding = Binding.create(this.cycle, object, prop)

    this.model.on('change:' + this.prop, function (value) {
        if (options.transform) value = options.transform(value)
        binding.model.set(prop, value)
        if (options.changed) options.changed(value)
    }.bind(this))

    return binding
}


text:
module Navigation
  module Global

    class UpArrow < AppleScriptBuilder
      def initialize
        super
        @action << <<-APPLESCRIPT.align_left
          set _dictateApp to (name of current application)
          on srhandler(vars)
            set spokenArguments to (varSpokenArguments of vars)
            repeat spokenInteger(spokenArguments) times
              tell application "System Events"
                key code 126
              end tell
            end repeat
          end srhandler
        APPLESCRIPT
        include_spoken_integer
      end
    end

    class DownArrow < AppleScriptBuilder
      def initialize
        super
        @action << <<-APPLESCRIPT.align_left
          set _dictateApp to (name of current application)
          on srhandler(vars)
            set spokenArguments to (varSpokenArguments of vars)
            repeat spokenInteger(spokenArguments) times
              tell application "System Events"
                key code 125
              end tell
            end repeat
          end srhandler
        APPLESCRIPT
        include_spoken_integer
      end
    end

  end
end


text:
Need specification

				You have selected the resource and the properties to enrich. To find
				contributors we need to express the knowledge need in a structured
				way. On this page you can choose how you want to express the
				knowledge need (either manual, automatic
				or supervised) and see

			<form role="form">

					 <input type="radio" name="optionsRadios"
						id="optionsRadios1" value="manual" disabled> Manual: you
						provide the domain knowledge yourself

					 <input type="radio" name="optionsRadios"
						id="optionsRadios2" value="automatic" disabled> Automatic:
						the domain knowledge is inferred from the domain of the resource

					 <input type="radio" name="optionsRadios"
						id="optionsRadios3" value="supervised" checked>
						Supervised: you specify the domain knowledge using an external
						knowledge source

					Knowledge
						source <select class="form-control" id="ddlKnowledgeModel">
						<option selected>Wordnet Domains</option>
						<option>Iconclass</option>
					</select>

			</form>

Wordnet Domains
				contains a mapping from 168 domains to words in the lexical database
				Wordnet. Drag the domains to the right for which you want to find
				knowledgeable potential contributors.

IconClass is a
				hierarchically ordered subject-specific classification system and is
				commonly used to annotate works of art. Drag the domains to the
				right for which you want to find knowledgeable potential
				contributors.

			<select multiple class="form-control" id="all">
				<option>dbpedia-owl:ArchitecturalStructure</option>
				<option>dbpedia-owl:Building</option>
				<option>dbpedia-owl:Church</option>
				<option>dbpedia-owl:Place</option>
				<option>dbpedia-owl:ReligiousBuilding</option>
				<option>dbpedia-owl:Wikidata:Q532</option>
				<option>http://schema.org/Place</option>
				<option>owl:Thing</option>
				<option>dbpedia-nl:Categorie:Kerkgebouw_in_Delft</option>
				<option>dbpedia-nl:Categorie:Luthers_kerkgebouw_in_Nederland</option>
				<option>dbpedia-nl:Categorie:Rijksmonument_in_Delft</option>
			</select>

			<button type="button" class="btn btn-default" id="btnLeft">

			</button>
			<button type="button" class="btn btn-default" id="btnRight">

			</button>

			<select multiple class="form-control" id="selected">
			</select>


text:
<title>Edit Account</title>

Change Your Password

	<? AuthUI.changePasswordForm ?>

Add another email address

	<? AuthUI.addAccountForm ?>

Your Email Addresses:

<? AuthUI.accountList ?>

	<? AuthUI.mainPageLink ?>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace BAG.Common.Data
{

    public class CData : IXmlSerializable
    {
        public string Value { get; set; }

        public static CData Empty = string.Empty;

        public static implicit operator CData(string value)
        {
            return new CData(value);
        }

        public static implicit operator string(CData cdata)
        {
            return cdata == null ? null : cdata.Value;
        }

        public CData() : this(string.Empty)
        {
        }

        public CData(string value)
        {
            this.Value = value;
        }

        public override string ToString()
        {
            return Value;
        }

        public System.Xml.Schema.XmlSchema GetSchema()
        {
            return null;
        }

        public void ReadXml(System.Xml.XmlReader reader)
        {
            Value = reader.ReadElementString();
        }

        public void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteCData(Value);
        }
        public string ToUpper()
        {
            return this.Value.ToUpper();
        }
        public string ToLower()
        {
            return this.Value.ToLower();
        }
    }
}


text:
title: Mesosphere and Percona Server for MongoDB
date: 2018-04-24
speaker: Ravi Yadav, Mesosphere & Jeff Sandstrom, Percona
eventimage: Santa_Clara.jpg
eventlocation: Santa Clara, CA, US
eventname: Percona Live 2018
category: Ecosystem
description: Mesosphere and Percona Server for MongoDB
layout: event.jade
collection: events
lunr: true
---

# Abstract

Learn about the benefits of running your database on the Mesosphere cloud container platform, and get a preview of what Percona is working on with Mesosphere.

[Mesosphere and Percona MongoDB](https://www.percona.com/live/18/sessions/mesosphere-and-percona-server-for-mongodb)

# Slides

<iframe src="https://docs.google.com/presentation/d/13XYt_tVEVoYtyu9dPHPi2CnB1n44b1MvMhvmloaLwhA/embed?start=false&loop=false&delayms=3000" frameborder="0" width="640" height="389" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>


text:
export PORT=8000
export IMAGE_NAME=rcarmo/desktop-chrome
default:
	docker build -t $(IMAGE_NAME):latest -f Dockerfile .

tiger:
	docker build -t $(IMAGE_NAME):tiger -f Dockerfile_tiger .

run:
	docker run -d -p 2211:22 $(IMAGE_NAME)

vnc:
	docker run -d -p 5901:5901 $(IMAGE_NAME) /quickstart.sh

rmi:
	docker rmi -f $(IMAGE_NAME)

push:
	-docker push $(IMAGE_NAME)
	-docker push $(IMAGE_NAME):tiger

clean:
	-docker rm -v $$(docker ps -a -q -f status=exited)
	-docker rmi $$(docker images -q -f dangling=true)
	-docker rmi $(IMAGE_NAME)


text:
<?php
namespace Icecave\Collections;

use Countable;

/**
 * An iterable collection with unique elements.
 */
interface SetInterface extends MutableIterableInterface, Countable
{
    /**
     * Return the first of the given elements that is contained in the set.
     *
     * @param mixed $element        The element to search for.
     * @param mixed $additional,... Additional elements to search for.
     *
     * @return mixed                         The first of the given elements that is contained in the set.
     * @throws Exception\UnknownKeyException if none of the elements exist.
     */
    public function cascade($element);

    /**
     * Return the first of the given elements that is contained in the set, or a default if none are found.
     *
     * @param mixed $default        The default value to return if no such elements exist.
     * @param mixed $element        The element to search for.
     * @param mixed $additional,... Additional elements to search for.
     *
     * @return mixed The first of the given elements that is contained in the set, or $default if none are found.
     */
    public function cascadeWithDefault($default, $element);

    /**
     * Return the first of the given elements that is contained in the set.
     *
     * Behaves as per {@see SetInterface::cascade()} except that the elements are provided as
     * a traversable (eg, array) instead of via a variable argument list.
     *
     * @param mixed<mixed> $elements The list of elements.
     *
     * @return mixed                         The first of the given elements that is contained in the set.
     * @throws Exception\UnknownKeyException if none of the elements exist.
     */
    public function cascadeIterable($elements);

    /**
     * Return the first of the given elements that is contained in the set, or a default if none are found.
     *
     * Behaves as per {@see SetInterface::cascadeDefault()} except that the elements are provided as
     * a traversable (eg, array) instead of via a variable argument list.
     *
     * @param mixed        $default  The default value to return if no such elements exist.
     * @param mixed<mixed> $elements The list of elements.
     *
     * @return mixed The first of the given elements that is contained in the set, or $default if none are found.
     */
    public function cascadeIterableWithDefault($default, $elements);

    /**
     * Add an element to the set.
     *
     * @param mixed $element The element to add.
     *
     * @return boolean True if the element was added to the set, or false if the set already contained the element.
     */
    public function add($element);

    /**
     * Add multiple elements to the set.
     *
     * @see SetInterface::unionInPlace() may be faster when adding all elements from a another set.
     *
     * @param mixed<mixed> $elements The elements to add.
     */
    public function addMany($elements);

    /**
     * Remove an element from the set, if it exists.
     *
     * @param mixed $element The element to remove.
     *
     * @return boolean True if the element was removed from the set, or false if the set dot not contain the element.
     */
    public function remove($element);

    /**
     * Remove multiple elements from the set.
     *
     * @see SetInterface::diffInPlace() may be faster when removing all elements from a another set.
     *
     * @param mixed<mixed> $elements The elements to remote.
     */
    public function removeMany($elements);

    /**
     * Check if this set is equal to another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains the same elements as $set; otherwise false.
     */
    public function isEqualSet(SetInterface $set);

    /**
     * Check if this set is a superset of another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains all of the elements in $set; otherwise, false.
     */
    public function isSuperSet(SetInterface $set);

    /**
     * Check if this set is a subset of another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains only elements present in $set; otherwise, false.
     */
    public function isSubSet(SetInterface $set);

    /**
     * Check if this set is a proper superset of another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains all of elements in $set, but is not equal to $set; otherwise, false.
     */
    public function isProperSuperSet(SetInterface $set);

    /**
     * Check if this set is a proper subset of another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains only elements present in $set, but is not equal to $set; otherwise, false.
     */
    public function isProperSubSet(SetInterface $set);

    /**
     * Check if this set is intersecting another.
     *
     * @param SetInterface $set The set to compare against.
     *
     * @return boolean True if this set contains one or more elements present in $set; otherwise false.
     */
    public function isIntersecting(SetInterface $set);

    /**
     * Compute the union of this set and another.
     *
     * @param SetInterface $set The second set.
     *
     * @return SetInterface A set containing all elements of $this and $elements.
     */
    public function union(SetInterface $set);

    /**
     * Compute the union of this set and another, in place.
     *
     * @param SetInterface $set The second set.
     */
    public function unionInPlace(SetInterface $set);

    /**
     * Compute the intersection of this set and another.
     *
     * @param SetInterface $set The second set.
     *
     * @return SetInterface A set containing only the elements present in $this and $elements.
     */
    public function intersect(SetInterface $set);

    /**
     * Compute the intersection of this set and another, in place.
     *
     * @param SetInterface $set The second set.
     */
    public function intersectInPlace(SetInterface $set);

    /**
     * Compute the difference (or complement) of this set and another.
     *
     * @param SetInterface $set The second set.
     *
     * @return SetInterface A set containing only the elements present in $this, but not $elements.
     */
    public function diff(SetInterface $set);

    /**
     * Compute the difference (or complement) of this set and another, in place.
     *
     * @param SetInterface $set The second set.
     */
    public function diffInPlace(SetInterface $set);

    /**
     * Compute the symmetric difference (or complement) of this set and another.
     *
     * The symmetric difference is the set of elements which are in either of the sets and not in their intersection.
     *
     * @param SetInterface $set The second set.
     *
     * @return SetInterface A set containing only the elements present in $this, or $elements, but not both.
     */
    public function symmetricDiff(SetInterface $set);

    /**
     * Compute the symmetric difference (or complement) of this set and another, in place.
     *
     * The symmetric difference is the set of elements which are in either of the sets and not in their intersection.
     *
     * @param SetInterface $set The second set.
     */
    public function symmetricDiffInPlace(SetInterface $set);
}


text:
<?php

namespace FPlus\Millennium\Soap\Message;

class BookAppointment
{
    /**
     * @var int
     */
    protected $clientId;

    /**
     * @var Opening
     */
    protected $openingToBook;

    /**
     * @param int     $clientId
     * @param Opening $openingToBook
     */
    public function __construct($clientId, $openingToBook)
    {
        $this->clientId = $clientId;
        $this->openingToBook = $openingToBook;
    }

    /**
     * @return int
     */
    public function getClientId()
    {
        return $this->clientId;
    }

    /**
     * @param int $clientId
     *
     * @return BookAppointment
     */
    public function setClientId($clientId)
    {
        $this->clientId = $clientId;

        return $this;
    }

    /**
     * @return Opening
     */
    public function getOpeningToBook()
    {
        return $this->openingToBook;
    }

    /**
     * @param Opening $openingToBook
     *
     * @return BookAppointment
     */
    public function setOpeningToBook($openingToBook)
    {
        $this->openingToBook = $openingToBook;

        return $this;
    }
}


text:
package nl.uva.polyql.ast.expressions;

import java.util.HashSet;
import java.util.Set;

import nl.uva.polyql.ast.Question;
import nl.uva.polyql.ast.values.BooleanValue;
import nl.uva.polyql.ast.values.Type;
import nl.uva.polyql.validation.ValidationErrors;

public class BooleanAtom extends Expression {

    private final BooleanValue mValue;

    public BooleanAtom(final String value) {
        mValue = new BooleanValue(Boolean.parseBoolean(value));
    }

    @Override
    public Type getReturnType() {
        return Type.BOOLEAN;
    }

    @Override
    public BooleanValue getValue() {
        return mValue;
    }

    @Override
    public String toString() {
        return getValue().toString();
    }

    @Override
    public Set<Question> getReferencedQuestions() {
        return new HashSet<>();
    }

    @Override
    public ValidationErrors validate() {
        return new ValidationErrors();
    }

}


text:
/**
 * \file
 * \brief General Numa functions
 *
 */

/*
 * Copyright (c) 2014, ETH Zurich.
 * All rights reserved.
 *
 * This file is distributed under the terms in the attached LICENSE file.
 * If you do not find this file, copies can be found by writing to:
 * ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
 */

#include <stdio.h>
#include <string.h>

#include <barrelfish/barrelfish.h>
#include <skb/skb.h>

#include <numa.h>

#include "numa_internal.h"

/**
 * \brief dumps the numa topology structure
 *
 * \param topology pointer to the topology to dump
 */
void numa_dump_topology(struct numa_topology *topology)
{
    if (topology->nodes == NULL) {
        printf("NUMA TOPOLOGY INVALID\n");
        return;
    }

    printf("dumping NUMA topology\n");
    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n");

    printf("Cores: %" PRIuCOREID "  Nodes: %" PRIuNODEID" \n", topology->num_cores,
           topology->num_nodes);

    printf("---------------------------------------\n");
    for (nodeid_t nodeid = 0; nodeid < topology->num_nodes; ++nodeid) {
        struct numa_node *node = &topology->nodes[nodeid];
        printf(" # Node %" PRIuNODEID ":  [0x%016" PRIxLPADDR ", 0x%016" PRIxLPADDR
               "] of %" PRIu64 " MB\n", nodeid, node->mem_base, node->mem_limit,
               (uint64_t)(node->mem_limit - node->mem_base) >> 20);
        for (coreid_t coreid = 0; coreid < node->num_cores; ++coreid) {
            struct numa_core *core = &node->cores[coreid];
            printf("  + Core %-3" PRIuCOREID ": [apic=%-3" PRIu16 ", node=%-3"
                        PRIuNODEID "]\n", core->id, core->apicid, core->node->id);
        }
    }

    printf("---------------------------------------\n");
    for (coreid_t coreid = 0; coreid < topology->num_cores; ++coreid) {
        struct numa_core *core = topology->cores[coreid];
        printf(" # Core %-3" PRIuCOREID ": [apic=%-3" PRIu16 ", node=%-3"
               PRIuNODEID "]\n", coreid, core->apicid, core->node->id);
    }

    printf("---------------------------------------\n");
    printf("Locality map:\n");
    printf("     ");
    for (coreid_t node_from = 0; node_from < topology->num_nodes; ++node_from) {
        printf("%02" PRIuNODEID " ", node_from);
    }
    printf("\n");
    for (coreid_t node_from = 0; node_from < topology->num_nodes; ++node_from) {
        printf("  %02" PRIuNODEID  " ", node_from);
        for (coreid_t node_to = 0; node_to < topology->num_nodes; ++node_to) {
            printf("%02" PRIu32 " ",
                   topology->distances[node_from * topology->num_nodes + node_to]);
        }
        printf("\n");
    }

    printf("\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
}

/**
 * \brief obtains the system topology from the SKB
 *
 * \param topology pointer to the topology information structure
 *
 * \returns SYS_ERR_OK on SUCCESS
 *          errval on FAILURE
 */
errval_t numa_get_topology_from_skb(struct numa_topology *topology)
{
    errval_t err;

    /* don't query if no return pointer is specified */
    if (topology == NULL) {
        return SYS_ERR_OK;
    }

    NUMA_DEBUG_INIT("getting topology from SKB...\n");

    err = skb_client_connect();
    if (err_is_fail(err)) {
        return err_push(err, NUMA_ERR_SKB);
    }

    err = skb_execute_query("get_system_topology(Nnodes,Ncores,Lnodes,Lcores,Llocalities),"
                            "writeln(num(nodes(Nnodes),cores(Ncores))),"
                            "writeln(Lnodes),writeln(Lcores), writeln(Llocalities).");
    if (err_is_fail(err)) {
        DEBUG_ERR(err, "skb query failed");
        return err_push(err, NUMA_ERR_SKB);
    }

    uint32_t core = 0;
    uint32_t node = 0;
    err = skb_read_output("num(nodes(%d), cores(%d))", &node, &core);
    if (err_is_fail(err)) {
        return err_push(err, NUMA_ERR_SKB_DATA);
    }

    NUMA_DEBUG_INIT("discovered topology with %" PRIuNODEID " nodes, %" PRIuCOREID
                    " cores\n", node, core);

    if (!core || !node || node > core) {
        NUMA_ERROR("invalid number of cores %" PRIu32 " or nodes %" PRIu32 ".",
                   core, node);
        return err_push(err, NUMA_ERR_SKB_DATA);
    }

    if (core >= MAX_COREID || node >= NUMA_MAX_NUMNODES) {
        NUMA_ERROR("too large number of cores %" PRIu32 " or nodes %" PRIu32 ".",
                   core, node);
        return err_push(err, NUMA_ERR_SKB_DATA);
    }

    topology->num_cores = (coreid_t) core;
    topology->num_nodes = (nodeid_t) node;

    topology->preferred = NUMA_POLICY_DEFAULT;
    topology->strict = NUMA_POLICY_DEFAULT;

    topology->nodes = malloc(node * sizeof(struct numa_node)
                                + node * node * sizeof(uint32_t)
                                + core * sizeof(struct numa_core)
                                + core * sizeof(void *));
    if (topology->nodes == NULL) {
        return LIB_ERR_MALLOC_FAIL;
    }

    struct numa_core *cores_array = (struct numa_core *)(topology->nodes + node);

    topology->cores = (struct numa_core **) (cores_array + core);
    topology->distances = (uint32_t*)(topology->cores + core);

    /* skip over the initial node and core information */
    char *output = strchr(skb_get_output(), '\n') + 1;
    uint32_t parsed = 0;

    /* read the node list */
    struct list_parser_status parser;
    skb_read_list_init_offset(&parser, output, 0);

    lpaddr_t base, limit;

    NUMA_DEBUG_INIT("parsing node information...\n");
    while (skb_read_list(&parser, "node(%" PRIu32 ", %" PRIuLPADDR ", %" PRIuLPADDR ")",
                         &node, &base, &limit)) {
        if (parsed == topology->num_nodes) {
            parsed++;
            break;
        }

        // XXX: assume the IDs are labelled 0..n-1
        assert(parsed == node);

        topology->nodes[parsed].num_cores = 0;
        topology->nodes[parsed].id = node;
        topology->nodes[parsed].mem_base = base;
        topology->nodes[parsed].mem_limit = limit;
        topology->nodes[parsed].apicid = (uint16_t) -1;
        topology->nodes[parsed].cores = NULL;

        // TODO: topology->nodes[node].coresbm = allocbm()

        NUMA_DEBUG_INIT("  > node %" PRIuNODEID " [0x%016" PRIxLPADDR", 0x%016"
                        PRIxLPADDR "] (%" PRIuLPADDR " MB)\n",
                        node, base, limit, (limit-base) >> 20);
        parsed++;
    }

    if ((nodeid_t) parsed != topology->num_nodes) {
        NUMA_DEBUG_INIT("node list incomplete: %" PRIuNODEID ", %" PRIuNODEID "\n",
                        parsed, topology->num_nodes);
        err = NUMA_ERR_SKB_DATA;
        goto error_out;
    }

    char arch[10];
    uint32_t apic = 0;

    /* parse the numa core list */
    output = strchr(output, '\n') + 1;
    skb_read_list_init_offset(&parser, output, 0);
    parsed = 0;

    NUMA_DEBUG_INIT("parsing core information...\n");
    while (skb_read_list(&parser, "cpu(%" PRIu32 ", %" PRIu32 ", %" PRIu32 ", %[^,)] , "
                         "dummy)", &node, &core, &apic,arch)) {
        if (parsed == topology->num_cores) {
            parsed++;
            break;
        }
        if (!(node < topology->num_nodes)) {
            NUMA_DEBUG_INIT("core %" PRIuCOREID " invalid node id %" PRIuNODEID "\n",
                            core, node);
            err = NUMA_ERR_SKB_DATA;
            goto error_out;
        }

        topology->nodes[node].num_cores++;

        /* the cores come sorted by nodes. The first one sets the cores pointer*/
        if (topology->nodes[node].cores == NULL) {
            topology->nodes[node].cores = &cores_array[parsed];
        }

        // TODO:  set bitmask topology->nodes[node].coresbm
        cores_array[parsed].id = (coreid_t) core;
        cores_array[parsed].apicid = (uint16_t) apic;
        cores_array[parsed].node = &topology->nodes[node];
        cores_array[parsed].arch = archstr_to_cputype(arch);

        // set the entry in the cores array
        topology->cores[core] = &cores_array[parsed];

        if (cores_array[parsed].arch == CPU_TYPE_NUM) {
            err = SYS_ERR_ARCHITECTURE_NOT_SUPPORTED;
            goto error_out;
        }

        NUMA_DEBUG_INIT("  > %s core %" PRIuCOREID" apic=%" PRIu32 ", node=%"
                        PRIuNODEID "\n", arch, (coreid_t )core, apic, node);
        parsed++;
    }

    if ((coreid_t) parsed != topology->num_cores) {
        NUMA_DEBUG_INIT("core list incomplete: %" PRIuCOREID ", %" PRIuCOREID "\n",
                        (coreid_t )parsed, topology->num_cores);
        err = NUMA_ERR_SKB_DATA;
        goto error_out;
    }

    output = strchr(output, '\n') + 1;
    skb_read_list_init_offset(&parser, output, 0);
    parsed = 0;

    uint32_t from, to;
    uint32_t distance;
    NUMA_DEBUG_INIT("parsing locality information...\n");
    while (skb_read_list(&parser, "node_distance(%" PRIuNODEID ", %" PRIuNODEID ", %" PRIu32 ")",
                          &from, &to, &distance)) {\
        NUMA_DEBUG_INIT("  > [%" PRIuNODEID "] -> [%" PRIuNODEID "] = %" PRIu32"\n",
                        from, to, distance);
        topology->distances[from * topology->num_nodes + to] = distance;
        parsed++;
    }

    if (parsed == 0) {
        NUMA_DEBUG_INIT("locality list not existent setting all to 10...\n");
        for (nodeid_t i = 0; i < topology->num_nodes; ++i) {
            for (nodeid_t j = 0; j < topology->num_nodes; ++j) {
                topology->distances[from * topology->num_nodes + to] = 10;
            }
        }
    } else if (parsed != (uint32_t)topology->num_nodes * topology->num_nodes) {
        NUMA_DEBUG_INIT("locality list incomplete: %" PRIu32" / %" PRIu32 "\n",
                        parsed, (uint32_t)topology->num_nodes * topology->num_nodes);
        err = NUMA_ERR_SKB_DATA;
        goto error_out;
    }

    return SYS_ERR_OK;

    error_out:
    free(topology->nodes);
    return err;
}

/**
 * \brief frees the numa topology structure
 *
 * \param topology pointer to the topology information structure
 */
void numa_free_topology(struct numa_topology *topology)
{
    if (topology && topology->nodes) {
        free(topology->nodes);
    }
    memset(topology, 0, sizeof(*topology));
}


text:
package com.spectralogic.ds3autogen.docspec;

import com.google.common.collect.ImmutableMap;
import com.spectralogic.ds3autogen.api.models.docspec.Ds3DocSpec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Optional;

/**
 * Implements the Ds3DocSpec.
 */
public class Ds3DocSpecImpl implements Ds3DocSpec{

    private static final Logger LOG = LoggerFactory.getLogger(Ds3DocSpecImpl.class);

    /** Map of request name (key) and request descriptor (value) */
    private final ImmutableMap<String, String> requestDocs;

    /** Map of parameter name (key) and parameter descriptor (value) */
    private final ImmutableMap<String, String> paramDocs;

    public Ds3DocSpecImpl(
            final ImmutableMap<String, String> requestDocs,
            final ImmutableMap<String, String> paramDocs) {
        this.requestDocs = requestDocs;
        this.paramDocs = paramDocs;
    }

    /**
     * Retrieves the command descriptor for the specified request
     */
    @Override
    public Optional<String> getRequestDocumentation(final String requestName) {
        final Optional<String> descriptor = Optional.ofNullable(requestDocs.get(requestName));
        if (!descriptor.isPresent()) {
            LOG.warn("Request does not have a descriptor: {}", requestName);
        }
        return descriptor;
    }

    /**
     * Retrieves the specified parameter descriptor
     */
    @Override
    public Optional<String> getParamDocumentation(final String paramName) {
        final Optional<String> descriptor = Optional.ofNullable(paramDocs.get(paramName));
        if (!descriptor.isPresent()) {
            LOG.warn("Parameter does not have a descriptor: {}", paramName);
        }
        return descriptor;
    }
}


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\date\DatePicker;
use vova07\imperavi\Widget;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $model app\models\Session */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>
    <?php
    if($model->isNewRecord && Yii::$app->language=='ru') $model->ru=1;
    echo $form->field($model, 'ru',['options'=>['class'=>'form-group field140']])->dropDownList(['кыргызча','русский'],[]); ?>

    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'date',['options'=>['class'=>'form-group field140']])->widget(DatePicker::classname(), [
        'removeButton' => false,
        'language'=>'ru',
        'pluginOptions' => [
            'autoclose'=>true,
            'format' => 'yyyy-mm-dd',
            'todayHighlight' => true,
        ]
    ]);?>
    <?= $form->field($model, 'content')->widget(Widget::className(), [
        'settings' => [
            'lang' => 'ru',
            'minHeight' => 200,
            'fileUpload' => Url::to(['/decree/file-upload']),
            'fileManagerJson' => Url::to(['/decree/files-get']),
            'plugins' => [
                'filemanager',
                'table',
                'fontsize',
                'fullscreen',
            ],
        ]
    ]); ?>

        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
package brooklyn.enricher.basic;

import brooklyn.entity.Entity;
import brooklyn.entity.basic.EntityLocal;
import brooklyn.event.AttributeSensor;
import brooklyn.event.Sensor;
import brooklyn.event.SensorEventListener;
import brooklyn.event.basic.BasicSensorEvent;
import brooklyn.util.flags.SetFromFlag;

/**
 * Convenience base for transforming a single sensor into a single new sensor of the same type
 *
 * @deprecated since 0.7.0; use {@link Enrichers.builder()}
 */
public abstract class AbstractTypeTransformingEnricher<T,U> extends AbstractEnricher implements SensorEventListener<T> {

    @SetFromFlag
    private Entity producer;

    @SetFromFlag
    private Sensor<T> source;

    @SetFromFlag
    protected Sensor<U> target;

    public AbstractTypeTransformingEnricher() { // for rebind
    }

    public AbstractTypeTransformingEnricher(Entity producer, Sensor<T> source, Sensor<U> target) {
        this.producer = producer;
        this.source = source;
        this.target = target;
    }

    public void setEntity(EntityLocal entity) {
        super.setEntity(entity);
        if (producer==null) producer = entity;
        subscribe(producer, source, this);

        if (source instanceof AttributeSensor) {
            Object value = producer.getAttribute((AttributeSensor)source);
            // TODO Aled didn't you write a convenience to "subscribeAndRunIfSet" ? (-Alex)
            if (value!=null)
                onEvent(new BasicSensorEvent(source, producer, value));
        }
    }
}


text:
<?php

namespace DCS\TagBundle\Urlizer;

use Ferrandini\Urlizer as UrlizerManager;

class Urlizer implements UrlizerInterface
{
    /**
     * @param string $string
     * @param string $separator
     * @return string
     */
    public function urlize($string, $separator = '-')
    {
        return UrlizerManager::urlize($string, $separator);
    }
}


text:
/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #f1f1f1;
    background: #000000;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body, input, textarea {
    color: #373737;
    font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    line-height: 1.625;
}

body {
    background: ##000000;
}

textarea {
    color: #f1f1f1;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}
img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

body {
    height: 100%;
    width: 100%;
}

p {
    padding: 0;
    margin: 0;
}

div#wrapper {
    border: none;
    background-color: #000000;
    height: 640px;
    width: 640px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -320px 0 0 -320px;
    padding: 0;
}

div#header {
    position: absolute;
    top: 10px;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    color: #ffffff;
    text-align: left;
    width: 560px;
    padding: 0;
    margin: 0 40px;
}

div#header p {
    position: absolute;
    left: 0;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    color: #ffffff;
    text-align: left;
    padding: 0;
    width: 200px;
    margin: auto 0;
}

div#info {
    position: absolute;
    top: 3px;
    right: 20px;
    background-color: #3072CF;
    height: 16px;
    width: 16px;
    line-height: 16px;
    font-size: 10px;
    font-weight: normal;
    font-family: 'Times New Roman';
    cursor: pointer;
    color: #ffffff;
    text-align: center;
    padding: 0 0 0 1px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

div#info:hover {
    background-color: #3E9AFA;
}

div#undo {
    position: absolute;
    top: 3px;
    right: 0px;
    background-color: #dddddd;
    height: 16px;
    width: 16px;
    line-height: 16px;
    font-size: 10px;
    font-weight: normal;
    font-family: 'Times New Roman';
    cursor: pointer;
    color: #000000;
    text-align: center;
    padding: 0 0 0 1px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

div#undo:hover {
    background-color: #ffffff;
}

div#right-controls {
    position: absolute;
    top: 3px;
    right: 50px;
    height: 16px;
}

div#wolf {
    position: absolute;
    top: 0px;
    right: 40px;
    height: 24px;
    text-align: right;
    width: 300px;
}

div#wolf p{
    text-align: right;
    position: relative;
    width: 300px;
}

div#left-controls {
    position: absolute;
    top: 3px;
    height: 16px;
    right: 355px;
}

div#right-controls span, div#left-controls span {
    position: absolute;
    top: 0;
    display: inline-block;
    height: 16px;
    width: 16px;
    line-height: 16px;
    font-size: 10px;
    font-weight: normal;
    font-family: 'Times New Roman';
    cursor: pointer;
    color: #ffffff;
    text-align: center;
    padding: 0 0 0 1px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

div#left-controls span {
    padding: 0 1px 0 0;
}

#forward1 {
    right: 20px;
}

#forward5 {
    right: 0;
}

#back1 {
    right: 0;
}

#back5 {
    right: 20px;
}

div#header #slider {
    position: absolute;
    right: 100px;
    top: 5px;
    text-align: left;
    padding: 0;
    width: 240px;
    margin: auto 0;
}

div#header #slider .ui-slider-range {
    background: #777777;
}

div#paper, div#skymap, div#about {
    background: transparent;
    height: 560px;
    width: 560px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -280px 0 0 -280px;
    padding: 0;
    z-index: 5;
}

div#skymap {
    z-index: 0;
}

div#about {
    display: none;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #ffffff;
    background: #ffffff;
    color: #1b1b1b;
    height: 300px;
    width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -150px 0 0 -200px;
    padding: 10px;
    /*z-index: 0;*/
    -moz-box-shadow: 0px 0px 10px #fff;
    -webkit-box-shadow: 0px 0px 10px #fff;
    box-shadow: 0px 0px 10px #fff;
    /* For IE 8 */
    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=0, Color='#ffffff')";
    /* For IE 5.5 - 7 */
    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=0, Color='#ffffff');
}

div#about p, div#about h3 {
    padding: 0 0 10px 0;
    margin: 0;
}

div#footer {
    position: absolute;
    bottom: 10px;
    height: 24px;
    line-height: 24px;
    font-size: 10px;
    color: #ffffff;
    width: 560px;
    padding: 0;
    margin: 0 40px;
}

div#footer .right {
    position: absolute;
    text-align: right;
    display: inline-block;
    right: 0;
}

div#footer .left {
    position: absolute;
    text-align: left;
    display: inline-block;
    left: 0;
    width: 320px;
}

div#footer a {
    text-decoration: none;
    padding: 0;
    margin: 0;
}

#secret-form {
    display: none;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
}

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}


text:
module Util
    ( whisper
    , escapeStr
    , unescapeStr
    , prop_unescape_escape
    , prop_escape_notnull
    , prop_escape_nonewlines
    , prop_unescape_total
    ) where

import System.Console.CmdArgs.Verbosity (whenLoud)
import System.IO (hPutStrLn, stderr)

whisper :: String -> IO ()
whisper msg = whenLoud $ hPutStrLn stderr msg

escapeStr :: String -> String
escapeStr = show

unescapeStr :: String -> String
unescapeStr str =
    case reads str of
        [(a, "")] -> a
        _ -> str

prop_unescape_escape :: String -> Bool
prop_unescape_escape str = str == (unescapeStr . escapeStr) str

prop_escape_notnull  :: String -> Bool
prop_escape_notnull str = (not . null) (escapeStr str)

prop_escape_nonewlines :: String -> Bool
prop_escape_nonewlines str = notElem '\n' (escapeStr str)

prop_unescape_total :: String -> Bool
prop_unescape_total str = length (unescapeStr str) >= 0 -- Force evaluation


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

namespace Sigma
{
    public static class Constant
    {
        // Keep this document for global constants...

        /// <summary>
        /// The full path to the system's RTF editor. (Make this configurable!)
        /// </summary>
        //public const string SYS_RTF_EDITOR_FULLPATH = @"C:\Program Files\Windows NT\Accessories\wordpad.exe";
        public const string SYS_RTF_EDITOR_FULLPATH = @"C:\Program Files\Microsoft Office\Office14\winword.exe";

        /// <summary>
        /// A new line in a Windows form.
        /// </summary>
        public const string LF = "\r\n";
        public const string RTF_NEWLINE = "\\par" + LF;

        public const string PROJ_TOP_DIR = "Projects\\";
        public const string SCENE_DIR = "Scenes\\";
        public const string SCENE_PREFIX = "SC";
        public const string RICH_EXT = ".rtf";

        public const string PROJ_PREFIX = "PROJ";

        public const string PROJ_EXT = ".sws";
        //public const string CHARDB_EXT = ".swc";
        //public const string NOTEDB_EXT = ".swn";

        public const string CHAR_FILENAME = "chars.swc";
        public const string NOTE_FILENAME = "notes.swn";
        public const string HIST_FILENAME = "history.swh";

        public const string EMDASH = "\u2014";

        // These progress constants should add up to 100.
        public const int PROG_CHAR = 50;
        public const int PROG_BOOKS = 50;
    }
}


text:
<resources>

    <!--
        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
    -->
    <style name="AppBaseTheme" parent="android:Theme.Holo">
        <!-- API 11 theme customizations can go here. -->
    </style>
	<style name="borderlessButtonStyle">
    	<item name="android:background">?android:attr/selectableItemBackground</item>

    </style>
</resources>


text:
{{'common.versions' | translate}}

{{displayName}} ({{repoVersionFullName}})

{{'versions.register.title' | translate}}

    <button ng-switch-when="false" class="btn disabled btn-default" tooltip="{{'versions.alerts.cannotDeleteInstalled' | translate}}">{{'versions.deregister' | translate}}</button>
    <button ng-switch-when="true" class="btn btn-danger" ng-click="delete()">{{'versions.deregister' | translate}}</button>

<form class="form-horizontal register-version-form" role="form" name="versionRegForm" novalidate>

        {{stack.stackNameVersion}}

                {{'common.stack' | translate}}
                {{activeStackVersion.stackNameVersion}}

                {{'common.name' | translate}}
                {{activeStackVersion.displayName}}

                {{'common.version' | translate}}
                {{activeStackVersion.actualVersion}}

              <button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-info">
                {{activeStackVersion.stackNameRepositoryVersion}}

              </button>

                    {{version.stackNameRepositoryVersion}}
                    {{'versions.defaultVersion' | translate}}

                    {{'versions.addVersion' | translate}} ...

              {{'common.name' | translate}}:

                  {{activeStackVersion.stackNameVersion}}

                .

                  <input class="form-control" name="version" type="text" ng-model="activeStackVersion.editableDisplayName" ng-pattern="activeStackVersion.subVersionPattern"
                         placeholder="{{'versions.placeholder' | translate: '{pattern: activeStackVersion.pattern}'}}" ng-change="updateCurrentVersionInput()" required/>

                  &nbsp{{'common.alerts.isInvalid' | translate: '{term: activeStackVersion.displayName}'}}

                {{service.displayName}}
                {{service.version}}

      <input type="radio" ng-model="selectedOption.index" value="1" ng-change="togglePublicLocalOptionSelect()" ng-disabled="networkLost || useRedhatSatellite">
      {{'versions.usePublic' | translate}}
      {{'versions.networkIssues.networkLost'| translate}}

      <input type="radio" ng-model="selectedOption.index" value="2" ng-change="togglePublicLocalOptionSelect()">
      {{'versions.useLocal' | translate}}

  <form ng-class="{'visible': !allInfoCategoriesBlank()}" class="form-horizontal register-version-form hide-soft"
        role="form" name="repoRegForm" novalidate>

          {{'versions.repos' | translate}}
          <button ng-show="supports.addingNewRepository" class="btn btn-primary pull-right btn-xs pull-up"
                  ng-click="addRepository()">

            {{'versions.repository.add' | translate}}
          </button>

{{'versions.alerts.baseURLs' | translate}}

            {{'versions.alerts.validationFailed' | translate}}

{{'versions.os' | translate}}

{{'common.name' | translate}}

{{'versions.baseURL' | translate}}

              <button class="btn add-os-button dropdown-toggle" ng-disabled="isAddOsButtonDisabled()">
                 {{'common.controls.add' | translate}}  </button>

{{os.OperatingSystems.os_type}}

            {{'versions.contents.empty' | translate}}

                  {{os.OperatingSystems.os_type}}

                    {{repository.Repositories.repo_id}}

                      <input type="text" class="form-control"
                             placeholder="{{(repository.Repositories.repo_name.indexOf('UTILS') < 0 )?('versions.repository.placeholder' | translate) : ''}}"
                             ng-model="repository.Repositories.base_url"
                             ng-change="onRepoUrlChange(repository)" ng-disabled="useRedhatSatellite">

                    <i class="fa fa-undo orange-icon cursor-pointer"
                       ng-if="selectedOption.index == 1 && repository.Repositories.base_url != repository.Repositories.initial_base_url
                       || selectedOption.index == 2 && repository.Repositories.base_url != ''
                       || editController && repository.Repositories.base_url != repository.Repositories.initial_base_url"
                       ng-click="undoChange(repository)"
                       tooltip-html-unsafe="{{'common.undo' | translate}}"
                       aria-hidden="true">

{{'common.controls.remove' | translate}}

                  <input type="checkbox" ng-model="skipValidation" ng-change="clearErrors()"
                         ng-disabled="useRedhatSatellite">
                  {{'versions.skipValidation' | translate}}

                  <input type="checkbox" ng-model="useRedhatSatellite" ng-change="clearErrors()"
                         ng-disabled="isPublicRepoSelected()">
                  {{'versions.useRedhatSatellite.title' | translate}}

      <button class="btn btn-primary pull-right left-margin" ng-click="save()"
              ng-disabled="isSaveButtonDisabled() || (createController && versionRegForm.version.$invalid)">{{'common.controls.save' | translate}}
      </button>
      <button class="btn btn-default pull-right" ng-click="cancel()">{{'common.controls.cancel' | translate}}</button>

  </form>
</form>


text:
#include "../bsp/button.h"
/** Tells you the button state
* @return '1' if the buttons is pressed
*
* Example:
* @code
*   if( btn.istatus( ) )
*       // button pressed
*   else
*       // button not pressed
* @endcode
*/
inline static _Bool Status(m_button *button)
{
	_Bool status;
	status = HAL_GPIO_ReadPin(button->GPIOx,button->GPIO_Pin);
	return status;
}

/** make sure the button state if right,
*regenerate mark flag _isPressed or _isReleased
* @return void
*
* Example:
* @code
*   CheckBtnStatus( )
* @endcode
*/

void CheckBtnStatus(m_button *button)
{

	button->_buttonState  = Status(button);
	if (button->_buttonState == button->_lastButtonState)
	{
		if(button->_buttonState == button->active)
		{
			button->_isPressed = 1;
		}
		else
		{
			button->_isReleased = 1;
		}
	}
	button->_lastButtonState = button->_buttonState;
}

/** Tells you if a button has been pressed (only once)
* @return '1' if the buttons has been pressed
*
* Example:
* @code
*   if( btn.isPressed( ) )
*       // do something
* @endcode
*/
_Bool IsPressed(m_button  *button)
{
	_Bool isPressed;
	CheckBtnStatus(button);
	isPressed = button-> _isPressed;
	button-> _isPressed = 0;
	return isPressed;
}
/** Tells you if a button has been Released (only once)
* @return '1' if the buttons has been Released
*
* Example:
* @code
*   if( btn.isReleased( ) )
*       // do something
* @endcode
*/
_Bool IsReleased(m_button  *button)
{
	_Bool isReleased;
	CheckBtnStatus(button);
	isReleased =  button-> _isReleased;
	button-> _isReleased = 0;
	return isReleased;
}

_Bool IsClick(m_button  *button)
{
  static _Bool dir = 0;
  CheckBtnStatus(button);
  if (dir == 0)
  {
    if (button-> _isPressed == 1)
    {
      button-> _isPressed =0;
      button-> _isReleased = 0;
      dir = 1;
    }

  }
  else
  {
    if (button->_isReleased ==1)
    {
      button-> _isReleased = 0;
      button-> _isPressed =0;
      dir =0;
      return 1;
    }
  }
	return 0;
}

/** Init the instance
* @return void
*
* Example:
* @code
*
* @endcode
*/

void ButtonInit(m_button *button,GPIO_TypeDef  *GPIOx, uint32_t GPIO_Pin,_Bool active)
{
	button->GPIOx =GPIOx;
	button->GPIO_Pin=GPIO_Pin;

	button->active=active;
	button->_buttonState=0;
	button->_lastButtonState=0;
	button->_isPressed=0;
	button->_isReleased=0;

}


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Composition
Imports System.Linq
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.CodeFixes
Imports Microsoft.CodeAnalysis.VisualBasic
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.ApiDesignGuidelines.Analyzers
    ''' <summary>
    ''' CA1716: Identifiers should not match keywords
    ''' </summary>
    <ExportCodeFixProvider(LanguageNames.VisualBasic), [Shared]>
    Public NotInheritable Class BasicIdentifiersShouldNotMatchKeywordsFixer
        Inherits IdentifiersShouldNotMatchKeywordsFixer

    End Class
End Namespace


text:
//
// Shared file mapping class.
//

#define LOG_TAG "filemap"

#include <utils/FileMap.h>
#include <utils/Log.h>

#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO)
# define PRId32 "I32d"
# define PRIx32 "I32x"
# define PRId64 "I64d"
#else
#include <inttypes.h>
#endif
#include <stdio.h>
#include <stdlib.h>

#if !defined(__MINGW32__)
#include <sys/mman.h>
#endif

#include <string.h>
#include <memory.h>
#include <errno.h>
#include <assert.h>

using namespace android;

/*static*/ long FileMap::mPageSize = -1;

// Constructor.  Create an empty object.
FileMap::FileMap(void)
    : mFileName(nullptr),
      mBasePtr(nullptr),
      mBaseLength(0),
      mDataPtr(nullptr),
      mDataLength(0)
#if defined(__MINGW32__)
      ,
      mFileHandle(INVALID_HANDLE_VALUE),
      mFileMapping(NULL)
#endif
{
}

// Move Constructor.
FileMap::FileMap(FileMap&& other) noexcept
    : mFileName(other.mFileName),
      mBasePtr(other.mBasePtr),
      mBaseLength(other.mBaseLength),
      mDataOffset(other.mDataOffset),
      mDataPtr(other.mDataPtr),
      mDataLength(other.mDataLength)
#if defined(__MINGW32__)
      ,
      mFileHandle(other.mFileHandle),
      mFileMapping(other.mFileMapping)
#endif
{
    other.mFileName = nullptr;
    other.mBasePtr = nullptr;
    other.mDataPtr = nullptr;
#if defined(__MINGW32__)
    other.mFileHandle = INVALID_HANDLE_VALUE;
    other.mFileMapping = NULL;
#endif
}

// Move assign operator.
FileMap& FileMap::operator=(FileMap&& other) noexcept {
    mFileName = other.mFileName;
    mBasePtr = other.mBasePtr;
    mBaseLength = other.mBaseLength;
    mDataOffset = other.mDataOffset;
    mDataPtr = other.mDataPtr;
    mDataLength = other.mDataLength;
    other.mFileName = nullptr;
    other.mBasePtr = nullptr;
    other.mDataPtr = nullptr;
#if defined(__MINGW32__)
    mFileHandle = other.mFileHandle;
    mFileMapping = other.mFileMapping;
    other.mFileHandle = INVALID_HANDLE_VALUE;
    other.mFileMapping = NULL;
#endif
    return *this;
}

// Destructor.
FileMap::~FileMap(void)
{
    if (mFileName != nullptr) {
        free(mFileName);
    }
#if defined(__MINGW32__)
    if (mBasePtr && UnmapViewOfFile(mBasePtr) == 0) {
        ALOGD("UnmapViewOfFile(%p) failed, error = %lu\n", mBasePtr,
              GetLastError() );
    }
    if (mFileMapping != NULL) {
        CloseHandle(mFileMapping);
    }
#else
    if (mBasePtr && munmap(mBasePtr, mBaseLength) != 0) {
        ALOGD("munmap(%p, %zu) failed\n", mBasePtr, mBaseLength);
    }
#endif
}

// Create a new mapping on an open file.
//
// Closing the file descriptor does not unmap the pages, so we don't
// claim ownership of the fd.
//
// Returns "false" on failure.
bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t length,
        bool readOnly)
{
#if defined(__MINGW32__)
    int     adjust;
    off64_t adjOffset;
    size_t  adjLength;

    if (mPageSize == -1) {
        SYSTEM_INFO  si;

        GetSystemInfo( &si );
        mPageSize = si.dwAllocationGranularity;
    }

    DWORD  protect = readOnly ? PAGE_READONLY : PAGE_READWRITE;

    mFileHandle  = (HANDLE) _get_osfhandle(fd);
    mFileMapping = CreateFileMapping( mFileHandle, NULL, protect, 0, 0, NULL);
    if (mFileMapping == NULL) {
        ALOGE("CreateFileMapping(%p, %lx) failed with error %lu\n",
              mFileHandle, protect, GetLastError() );
        return false;
    }

    adjust    = offset % mPageSize;
    adjOffset = offset - adjust;
    adjLength = length + adjust;

    mBasePtr = MapViewOfFile( mFileMapping,
                              readOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS,
                              0,
                              (DWORD)(adjOffset),
                              adjLength );
    if (mBasePtr == NULL) {
        ALOGE("MapViewOfFile(%" PRId64 ", %zu) failed with error %lu\n",
              adjOffset, adjLength, GetLastError() );
        CloseHandle(mFileMapping);
        mFileMapping = NULL;
        return false;
    }
#else // !defined(__MINGW32__)
    assert(fd >= 0);
    assert(offset >= 0);
    assert(length > 0);

    // init on first use
    if (mPageSize == -1) {
        mPageSize = sysconf(_SC_PAGESIZE);
        if (mPageSize == -1) {
            ALOGE("could not get _SC_PAGESIZE\n");
            return false;
        }
    }

    int adjust = offset % mPageSize;
    off64_t adjOffset = offset - adjust;
    size_t adjLength;
    if (__builtin_add_overflow(length, adjust, &adjLength)) {
        ALOGE("adjusted length overflow: length %zu adjust %d", length, adjust);
        return false;
    }

    int flags = MAP_SHARED;
    int prot = PROT_READ;
    if (!readOnly) prot |= PROT_WRITE;

    void* ptr = mmap64(nullptr, adjLength, prot, flags, fd, adjOffset);
    if (ptr == MAP_FAILED) {
        if (errno == EINVAL && length == 0) {
            ptr = nullptr;
            adjust = 0;
        } else {
            ALOGE("mmap(%lld,%zu) failed: %s\n", (long long)adjOffset, adjLength, strerror(errno));
            return false;
        }
    }
    mBasePtr = ptr;
#endif // !defined(__MINGW32__)

    mFileName = origFileName != nullptr ? strdup(origFileName) : nullptr;
    mBaseLength = adjLength;
    mDataOffset = offset;
    mDataPtr = (char*) mBasePtr + adjust;
    mDataLength = length;

    ALOGV("MAP: base %p/%zu data %p/%zu\n",
        mBasePtr, mBaseLength, mDataPtr, mDataLength);

    return true;
}

// Provide guidance to the system.
#if !defined(_WIN32)
int FileMap::advise(MapAdvice advice)
{
    int cc, sysAdvice;

    switch (advice) {
        case NORMAL:        sysAdvice = MADV_NORMAL;        break;
        case RANDOM:        sysAdvice = MADV_RANDOM;        break;
        case SEQUENTIAL:    sysAdvice = MADV_SEQUENTIAL;    break;
        case WILLNEED:      sysAdvice = MADV_WILLNEED;      break;
        case DONTNEED:      sysAdvice = MADV_DONTNEED;      break;
        default:
                            assert(false);
                            return -1;
    }

    cc = madvise(mBasePtr, mBaseLength, sysAdvice);
    if (cc != 0)
        ALOGW("madvise(%d) failed: %s\n", sysAdvice, strerror(errno));
    return cc;
}

#else
int FileMap::advise(MapAdvice /* advice */)
{
    return -1;
}
#endif


text:
from setuptools import setup, find_packages

setup(
    name = 'webuni.sphinx.symfonydocs',
    version = '0.8.3',
    author = u'Martin Hasoň',
    author_email = 'martin.hason@gmail.com',
    description = 'Webuni Sphinx extension for Symfony documentation',
    license = 'MIT',
    platforms = 'any',
    packages = find_packages(),
    include_package_data = True,
    zip_safe = False,
    install_requires = [
        'Sphinx>=1.1',
        'Jinja2>=2.7',
        'requests>=1.0',
        'sphinx-php>=1.0'
    ],
    dependency_links = [
        'https://github.com/fabpot/sphinx-php/archive/master.zip#egg=sphinx-php-1.0'
    ]
)


text:
/* globals Ember */
var version = '2.8.0-beta.2';
Ember.libraries.register('Ember Flexberry', version);