text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Buffers;
using System.Buffers.Text;
using System.Diagnostics;

namespace System.Text.Json
{
    public sealed partial class Utf8JsonWriter
    {
        /// <summary>
        /// Writes the pre-encoded property name and <see cref="Guid"/> value (as a JSON string) as part of a name/value pair of a JSON object.
        /// </summary>
        /// <param name="propertyName">The JSON-encoded name of the property to write.</param>
        /// <param name="value">The value to write.</param>
        /// <exception cref="InvalidOperationException">
        /// Thrown if this would result in invalid JSON being written (while validation is enabled).
        /// </exception>
        /// <remarks>
        /// Writes the <see cref="Guid"/> using the default <see cref="StandardFormat"/> (that is, 'D'), as the form: nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.
        /// </remarks>
        public void WriteString(JsonEncodedText propertyName, Guid value)
            => WriteStringHelper(propertyName.EncodedUtf8Bytes, value);

        private void WriteStringHelper(ReadOnlySpan<byte> utf8PropertyName, Guid value)
        {
            Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);

            WriteStringByOptions(utf8PropertyName, value);

            SetFlagToAddListSeparatorBeforeNextItem();
            _tokenType = JsonTokenType.String;
        }

        /// <summary>
        /// Writes the property name and <see cref="Guid"/> value (as a JSON string) as part of a name/value pair of a JSON object.
        /// </summary>
        /// <param name="propertyName">The name of the property to write.</param>
        /// <param name="value">The value to write.</param>
        /// <exception cref="ArgumentException">
        /// Thrown when the specified property name is too large.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// The <paramref name="propertyName"/> parameter is <see langword="null"/>.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Thrown if this would result in invalid JSON being written (while validation is enabled).
        /// </exception>
        /// <remarks>
        /// Writes the <see cref="Guid"/> using the default <see cref="StandardFormat"/> (that is, 'D'), as the form: nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.
        /// The property name is escaped before writing.
        /// </remarks>
        public void WriteString(string propertyName, Guid value)
            => WriteString((propertyName ?? throw new ArgumentNullException(nameof(propertyName))).AsSpan(), value);

        /// <summary>
        /// Writes the property name and <see cref="Guid"/> value (as a JSON string) as part of a name/value pair of a JSON object.
        /// </summary>
        /// <param name="propertyName">The name of the property to write.</param>
        /// <param name="value">The value to write.</param>
        /// <exception cref="ArgumentException">
        /// Thrown when the specified property name is too large.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Thrown if this would result in invalid JSON being written (while validation is enabled).
        /// </exception>
        /// <remarks>
        /// Writes the <see cref="Guid"/> using the default <see cref="StandardFormat"/> (that is, 'D'), as the form: nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.
        /// The property name is escaped before writing.
        /// </remarks>
        public void WriteString(ReadOnlySpan<char> propertyName, Guid value)
        {
            JsonWriterHelper.ValidateProperty(propertyName);

            WriteStringEscape(propertyName, value);

            SetFlagToAddListSeparatorBeforeNextItem();
            _tokenType = JsonTokenType.String;
        }

        /// <summary>
        /// Writes the property name and <see cref="Guid"/> value (as a JSON string) as part of a name/value pair of a JSON object.
        /// </summary>
        /// <param name="utf8PropertyName">The UTF-8 encoded name of the property to write.</param>
        /// <param name="value">The value to write.</param>
        /// <exception cref="ArgumentException">
        /// Thrown when the specified property name is too large.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Thrown if this would result in invalid JSON being written (while validation is enabled).
        /// </exception>
        /// <remarks>
        /// Writes the <see cref="Guid"/> using the default <see cref="StandardFormat"/> (that is, 'D'), as the form: nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.
        /// The property name is escaped before writing.
        /// </remarks>
        public void WriteString(ReadOnlySpan<byte> utf8PropertyName, Guid value)
        {
            JsonWriterHelper.ValidateProperty(utf8PropertyName);

            WriteStringEscape(utf8PropertyName, value);

            SetFlagToAddListSeparatorBeforeNextItem();
            _tokenType = JsonTokenType.String;
        }

        private void WriteStringEscape(ReadOnlySpan<char> propertyName, Guid value)
        {
            int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName, _options.Encoder);

            Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length);

            if (propertyIdx != -1)
            {
                WriteStringEscapeProperty(propertyName, value, propertyIdx);
            }
            else
            {
                WriteStringByOptions(propertyName, value);
            }
        }

        private void WriteStringEscape(ReadOnlySpan<byte> utf8PropertyName, Guid value)
        {
            int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName, _options.Encoder);

            Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);

            if (propertyIdx != -1)
            {
                WriteStringEscapeProperty(utf8PropertyName, value, propertyIdx);
            }
            else
            {
                WriteStringByOptions(utf8PropertyName, value);
            }
        }

        private void WriteStringEscapeProperty(ReadOnlySpan<char> propertyName, Guid value, int firstEscapeIndexProp)
        {
            Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
            Debug.Assert(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);

            char[] propertyArray = null;

            int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp);

            Span<char> escapedPropertyName = length <= JsonConstants.StackallocThreshold ?
                stackalloc char[length] :
                (propertyArray = ArrayPool<char>.Shared.Rent(length));

            JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);

            WriteStringByOptions(escapedPropertyName.Slice(0, written), value);

            if (propertyArray != null)
            {
                ArrayPool<char>.Shared.Return(propertyArray);
            }
        }

        private void WriteStringEscapeProperty(ReadOnlySpan<byte> utf8PropertyName, Guid value, int firstEscapeIndexProp)
        {
            Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
            Debug.Assert(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);

            byte[] propertyArray = null;

            int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp);

            Span<byte> escapedPropertyName = length <= JsonConstants.StackallocThreshold ?
                stackalloc byte[length] :
                (propertyArray = ArrayPool<byte>.Shared.Rent(length));

            JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, _options.Encoder, out int written);

            WriteStringByOptions(escapedPropertyName.Slice(0, written), value);

            if (propertyArray != null)
            {
                ArrayPool<byte>.Shared.Return(propertyArray);
            }
        }

        private void WriteStringByOptions(ReadOnlySpan<char> propertyName, Guid value)
        {
            ValidateWritingProperty();
            if (_options.Indented)
            {
                WriteStringIndented(propertyName, value);
            }
            else
            {
                WriteStringMinimized(propertyName, value);
            }
        }

        private void WriteStringByOptions(ReadOnlySpan<byte> utf8PropertyName, Guid value)
        {
            ValidateWritingProperty();
            if (_options.Indented)
            {
                WriteStringIndented(utf8PropertyName, value);
            }
            else
            {
                WriteStringMinimized(utf8PropertyName, value);
            }
        }

        private void WriteStringMinimized(ReadOnlySpan<char> escapedPropertyName, Guid value)
        {
            Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatGuidLength - 6);

            // All ASCII, 2 quotes for property name, 2 quotes for date, and 1 colon => escapedPropertyName.Length + JsonConstants.MaximumFormatGuidLength + 5
            // Optionally, 1 list separator, and up to 3x growth when transcoding
            int maxRequired = (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatGuidLength + 6;

            if (_memory.Length - BytesPending < maxRequired)
            {
                Grow(maxRequired);
            }

            Span<byte> output = _memory.Span;

            if (_currentDepth < 0)
            {
                output[BytesPending++] = JsonConstants.ListSeparator;
            }
            output[BytesPending++] = JsonConstants.Quote;

            TranscodeAndWrite(escapedPropertyName, output);

            output[BytesPending++] = JsonConstants.Quote;
            output[BytesPending++] = JsonConstants.KeyValueSeperator;

            output[BytesPending++] = JsonConstants.Quote;

            bool result = Utf8Formatter.TryFormat(value, output.Slice(BytesPending), out int bytesWritten);
            Debug.Assert(result);
            BytesPending += bytesWritten;

            output[BytesPending++] = JsonConstants.Quote;
        }

        private void WriteStringMinimized(ReadOnlySpan<byte> escapedPropertyName, Guid value)
        {
            Debug.Assert(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatGuidLength - 6);

            int minRequired = escapedPropertyName.Length + JsonConstants.MaximumFormatGuidLength + 5; // 2 quotes for property name, 2 quotes for date, and 1 colon
            int maxRequired = minRequired + 1; // Optionally, 1 list separator

            if (_memory.Length - BytesPending < maxRequired)
            {
                Grow(maxRequired);
            }

            Span<byte> output = _memory.Span;

            if (_currentDepth < 0)
            {
                output[BytesPending++] = JsonConstants.ListSeparator;
            }
            output[BytesPending++] = JsonConstants.Quote;

            escapedPropertyName.CopyTo(output.Slice(BytesPending));
            BytesPending += escapedPropertyName.Length;

            output[BytesPending++] = JsonConstants.Quote;
            output[BytesPending++] = JsonConstants.KeyValueSeperator;

            output[BytesPending++] = JsonConstants.Quote;

            bool result = Utf8Formatter.TryFormat(value, output.Slice(BytesPending), out int bytesWritten);
            Debug.Assert(result);
            BytesPending += bytesWritten;

            output[BytesPending++] = JsonConstants.Quote;
        }

        private void WriteStringIndented(ReadOnlySpan<char> escapedPropertyName, Guid value)
        {
            int indent = Indentation;
            Debug.Assert(indent <= 2 * JsonConstants.MaxWriterDepth);

            Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 - s_newLineLength);

            // All ASCII, 2 quotes for property name, 2 quotes for date, 1 colon, and 1 space => escapedPropertyName.Length + JsonConstants.MaximumFormatGuidLength + 6
            // Optionally, 1 list separator, 1-2 bytes for new line, and up to 3x growth when transcoding
            int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatGuidLength + 7 + s_newLineLength;

            if (_memory.Length - BytesPending < maxRequired)
            {
                Grow(maxRequired);
            }

            Span<byte> output = _memory.Span;

            if (_currentDepth < 0)
            {
                output[BytesPending++] = JsonConstants.ListSeparator;
            }

            Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);

            if (_tokenType != JsonTokenType.None)
            {
                WriteNewLine(output);
            }

            JsonWriterHelper.WriteIndentation(output.Slice(BytesPending), indent);
            BytesPending += indent;

            output[BytesPending++] = JsonConstants.Quote;

            TranscodeAndWrite(escapedPropertyName, output);

            output[BytesPending++] = JsonConstants.Quote;
            output[BytesPending++] = JsonConstants.KeyValueSeperator;
            output[BytesPending++] = JsonConstants.Space;

            output[BytesPending++] = JsonConstants.Quote;

            bool result = Utf8Formatter.TryFormat(value, output.Slice(BytesPending), out int bytesWritten);
            Debug.Assert(result);
            BytesPending += bytesWritten;

            output[BytesPending++] = JsonConstants.Quote;
        }

        private void WriteStringIndented(ReadOnlySpan<byte> escapedPropertyName, Guid value)
        {
            int indent = Indentation;
            Debug.Assert(indent <= 2 * JsonConstants.MaxWriterDepth);

            Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 7 - s_newLineLength);

            int minRequired = indent + escapedPropertyName.Length + JsonConstants.MaximumFormatGuidLength + 6; // 2 quotes for property name, 2 quotes for date, 1 colon, and 1 space
            int maxRequired = minRequired + 1 + s_newLineLength; // Optionally, 1 list separator and 1-2 bytes for new line

            if (_memory.Length - BytesPending < maxRequired)
            {
                Grow(maxRequired);
            }

            Span<byte> output = _memory.Span;

            if (_currentDepth < 0)
            {
                output[BytesPending++] = JsonConstants.ListSeparator;
            }

            Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);

            if (_tokenType != JsonTokenType.None)
            {
                WriteNewLine(output);
            }

            JsonWriterHelper.WriteIndentation(output.Slice(BytesPending), indent);
            BytesPending += indent;

            output[BytesPending++] = JsonConstants.Quote;

            escapedPropertyName.CopyTo(output.Slice(BytesPending));
            BytesPending += escapedPropertyName.Length;

            output[BytesPending++] = JsonConstants.Quote;
            output[BytesPending++] = JsonConstants.KeyValueSeperator;
            output[BytesPending++] = JsonConstants.Space;

            output[BytesPending++] = JsonConstants.Quote;

            bool result = Utf8Formatter.TryFormat(value, output.Slice(BytesPending), out int bytesWritten);
            Debug.Assert(result);
            BytesPending += bytesWritten;

            output[BytesPending++] = JsonConstants.Quote;
        }
    }
}


text:
#ifndef RenderSVGContainer_h
#define RenderSVGContainer_h

#if ENABLE(SVG)

#include "RenderSVGModelObject.h"

namespace WebCore {

class SVGElement;

class RenderSVGContainer : public RenderSVGModelObject {
public:
    virtual ~RenderSVGContainer();

    RenderObject* firstChild() const { return m_children.firstChild(); }
    RenderObject* lastChild() const { return m_children.lastChild(); }

    virtual const RenderObjectChildList* children() const OVERRIDE FINAL { return &m_children; }
    virtual RenderObjectChildList* children() OVERRIDE FINAL { return &m_children; }

    virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
    virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUpdate = true; }
    virtual bool needsBoundariesUpdate() OVERRIDE FINAL { return m_needsBoundariesUpdate; }
    virtual bool didTransformToRootUpdate() { return false; }
    bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; }

protected:
    explicit RenderSVGContainer(SVGElement&);

    virtual bool isSVGContainer() const OVERRIDE FINAL { return true; }
    virtual const char* renderName() const OVERRIDE { return "RenderSVGContainer"; }

    virtual void layout() OVERRIDE;

    virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OVERRIDE FINAL;
    virtual void removeChild(RenderObject*) OVERRIDE FINAL;
    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL;

    virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_objectBoundingBox; }
    virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_strokeBoundingBox; }
    virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE FINAL { return m_repaintBoundingBox; }

    virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction) OVERRIDE;

    // Allow RenderSVGTransformableContainer to hook in at the right time in layout()
    virtual bool calculateLocalTransform() { return false; }

    // Allow RenderSVGViewportContainer to hook in at the right times in layout(), paint() and nodeAtFloatPoint()
    virtual void calcViewport() { }
    virtual void applyViewportClip(PaintInfo&) { }
    virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; }

    virtual void determineIfLayoutSizeChanged() { }

    bool selfWillPaint();
    void updateCachedBoundaries();

private:
    RenderObjectChildList m_children;
    FloatRect m_objectBoundingBox;
    bool m_objectBoundingBoxValid;
    FloatRect m_strokeBoundingBox;
    FloatRect m_repaintBoundingBox;
    bool m_needsBoundariesUpdate : 1;
};

inline RenderSVGContainer* toRenderSVGContainer(RenderObject* object)
{
    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGContainer());
    return static_cast<RenderSVGContainer*>(object);
}

inline const RenderSVGContainer* toRenderSVGContainer(const RenderObject* object)
{
    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGContainer());
    return static_cast<const RenderSVGContainer*>(object);
}

// This will catch anyone doing an unnecessary cast.
void toRenderSVGContainer(const RenderSVGContainer*);

} // namespace WebCore

#endif // ENABLE(SVG)
#endif // RenderSVGContainer_h

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

namespace Laminas\Hydrator\Exception;

/**
 * Bad method call exception
 */
class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
{
}


text:
using System.Globalization;
using System.Threading.Tasks;
using Abp.ZeroCore.SampleApp.Application.Shop;
using Shouldly;
using Xunit;

namespace Abp.Zero.MultiLingual
{
    public class MultiLingual_Mapping_Tests : AbpZeroTestBase
    {
        private readonly IProductAppService _productAppService;

        public MultiLingual_Mapping_Tests()
        {
            _productAppService = Resolve<IProductAppService>();
        }

        [Fact]
        public async Task CreateMultiLingualMap_Tests()
        {
            CultureInfo.CurrentUICulture = new CultureInfo("tr");

            var products = await _productAppService.GetProducts();
            products.ShouldNotBeNull();

            products.Items.Count.ShouldBe(3);
            var product1 = products.Items[0];
            var product2 = products.Items[1];
            var product3 = products.Items[2];

            product1.Language.ShouldBe("tr");
            product1.Name.ShouldBe("Saat");

            product2.Language.ShouldBe("en");
            product2.Name.ShouldBe("Bike");

            product3.Language.ShouldBe("it");
            product3.Name.ShouldBe("Giornale");

            CultureInfo.CurrentUICulture = new CultureInfo("fr");

            products = await _productAppService.GetProducts();
            products.ShouldNotBeNull();

            products.Items.Count.ShouldBe(3);
            product1 = products.Items[0];
            product2 = products.Items[1];
            product3 = products.Items[2];

            product1.Language.ShouldBe("en");
            product1.Name.ShouldBe("Watch");

            product2.Language.ShouldBe("fr");
            product2.Name.ShouldBe("Bicyclette");

            product3.Language.ShouldBe("it");
            product3.Name.ShouldBe("Giornale");
        }

        [Fact]
        public async Task CreateMultiLingualMap_Tests_Dont_Override_MultiLingual_Entity_Id()
        {
            CultureInfo.CurrentUICulture = new CultureInfo("tr");

            var products = await _productAppService.GetProducts();
            products.ShouldNotBeNull();

            var product1 = products.Items[0];

            product1.Language.ShouldBe("tr");
            product1.Name.ShouldBe("Saat");
            product1.Id.ShouldBe(1);
        }
    }
}


text:
package com.groupon.jenkins.dynamic.buildconfiguration;

import hudson.EnvVars;

import java.util.List;
import java.util.Map;

import org.junit.Test;

import static com.groupon.jenkins.testhelpers.TestHelpers.list;
import static com.groupon.jenkins.testhelpers.TestHelpers.map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

public class OneToTwoTranslatorTest {

	@Test
	public void should_not_do_any_translation_if_already_version2() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("environment", "something"), new EnvVars());
		assertFalse(translator.needsTranslation());

		translator = new OneToTwoTranslator(map("language", "ruby"), new EnvVars());
		assertTrue(translator.needsTranslation());
	}

	@Test
	public void should_move_language_into_enviroment_section() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby"), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertEquals("ruby", getEnvironment(config).get("language"));
	}

	@Test
	public void should_rename_nodejs_node() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "nodejs"), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertEquals("node", getEnvironment(config).get("language"));
	}

	@Test
	public void should_move_services_to_packages() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "nodejs", "services", list("mongo", "mysql")), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getEnvironment(config).get("packages"));
		assertNotNull("mongo", ((List<?>) getEnvironment(config).get("packages")).get(0));
		assertNotNull("mysql", ((List<?>) getEnvironment(config).get("packages")).get(1));
	}

	@Test
	public void should_move_ruby_version_to_language_version() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "ruby_version", "ruby-1.8.7"), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getEnvironment(config).get("language_versions"));
		assertEquals("1.8.7", ((List<?>) getEnvironment(config).get("language_versions")).get(0));
	}

	@Test
	public void should_move_ruby_versions_to_language_version() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "ruby_version", list("ruby-1.8.7", "ree-1.9.3")), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getEnvironment(config).get("language_versions"));
		assertEquals("1.8.7", ((List<?>) getEnvironment(config).get("language_versions")).get(0));
		assertEquals("ree-1.9.3", ((List<?>) getEnvironment(config).get("language_versions")).get(1));
	}

	@Test
	public void should_move_script_into_build_run() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "script", "rake test"), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getBuild(config));
		assertEquals("rake test", getBuild(config).get("run"));
	}

	@Test
	public void should_move_output_files_to_output_files_plugin_section() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "output_files", "blah"), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(config.get("plugins"));
		assertTrue(config.get("plugins") instanceof List);
	}

	@Test
	public void should_move_multiconfig_scripts_into_build_run() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "script", list(map("spec", "rake test"), map("cucumber", "echo cucumber"))), new EnvVars());
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getBuild(config));
		assertEquals("rake test", ((Map<?, ?>) getBuild(config).get("run")).get("spec"));
	}

	@Test
	public void should_move_notifications_section() {
		OneToTwoTranslator translator = new OneToTwoTranslator(map("language", "ruby", "notifications", map("master", map("email", "foo@example.com"))), new EnvVars("BRANCH", "master"));
		Map<?, ?> config = translator.getConfig();
		assertNotNull(getBuild(config));
		Object notifications = config.get("notifications");
		assertNotNull(notifications);
		assertTrue(notifications instanceof List);
		assertTrue(((List<?>) notifications).get(0) instanceof Map);
		assertEquals("foo@example.com", ((Map<?, ?>) ((List<?>) notifications).get(0)).get("email"));
	}

	private Map<?, ?> getBuild(Map<?, ?> config) {
		return (Map<?, ?>) config.get("build");
	}

	private Map<?, ?> getEnvironment(Map<?, ?> config) {
		return (Map<?, ?>) config.get("environment");
	}

}


text:
package org.epnoi.informationhandler.wrappers;

import org.epnoi.model.Content;
import org.epnoi.model.Context;
import org.epnoi.model.Resource;
import org.epnoi.model.Selector;
import org.epnoi.model.modules.Core;
import org.epnoi.model.modules.InformationStore;
import org.epnoi.model.modules.InformationStoreHelper;

public class FeedWrapper implements Wrapper {
	Core core;

	// -------------------------------------------------------------------------------------------------------------

	public FeedWrapper(Core core) {
		this.core = core;
	}

	// -------------------------------------------------------------------------------------------------------------
	public void put(Resource resource, Context context) {
		/*
		System.out.println("Entra con estos valores ");
		System.out.println("R " + resource);
		System.out.println("C " + context);
		*/
		InformationStore informationStore = this.core.getInformationHandler()
				.getInformationStoresByType(
						InformationStoreHelper.RDF_INFORMATION_STORE).get(0);
		// System.out.println("--------------------------------------------->  "+informationStore);
		informationStore.put(resource, context);
		informationStore = this.core.getInformationHandler().getInformationStoresByType(
				InformationStoreHelper.SOLR_INFORMATION_STORE).get(0);
		/*
		System.out
				.println("]------------------------------------------------------------"
						+ informationStore);
*/
		informationStore.put(resource, context);

		//-----------------

		informationStore = this.core.getInformationHandler().getInformationStoresByType(
				InformationStoreHelper.CASSANDRA_INFORMATION_STORE).get(0);
		/*
		System.out
				.println("]------------------------------------------------------------"
						+ informationStore);
						*/
		informationStore.put(resource, context);

	}

	// ------------------------------------------------------------------------------------

	// -------------------------------------------------------------------------------------------------------------

	public Resource get(String URI) {
		// TODO Auto-generated method stub
		return null;
	}

	// -------------------------------------------------------------------------------------

	public void remove(String URI) {
		// TODO Auto-generated method stub

	}

	// -------------------------------------------------------------------------------------

	@Override
	public void update(Resource resource) {
		// TODO Auto-generated method stub

	}

	// -------------------------------------------------------------------------------------

	@Override
	public boolean exists(String URI) {
		// TODO Auto-generated method stub
		return false;
	}

	// -------------------------------------------------------------------------------------

	@Override
	public Content<String> getContent(Selector selector) {
		// TODO Auto-generated method stub
		return null;
	}

	// -------------------------------------------------------------------------------------

	@Override
	public void setContent(Selector selector, Content<String> content) {
		// TODO Auto-generated method stub

	}

	// -------------------------------------------------------------------------------------

	@Override
	public Content<Object> getAnnotatedContent(Selector selector) {
		// TODO Auto-generated method stub
		return null;
	}

	// -------------------------------------------------------------------------------------

	@Override
	public void setAnnotatedContent(Selector selector,
			Content<Object> annotatedContent) {
		// TODO Auto-generated method stub

	}

	// -------------------------------------------------------------------------------------

}


text:
package com.summer.sso.controller;

import com.summer.common.pojo.SummerResult;
import com.summer.common.utils.ExceptionUtil;
import com.summer.sso.service.LoginService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJacksonValue;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by toy on 7/17/16.
 */
@Controller
public class LoginController {
    @Autowired
    private LoginService loginService;

    @RequestMapping(value = "/user/login", method = RequestMethod.POST)
    @ResponseBody
    public SummerResult login(String username, String password, HttpServletRequest request, HttpServletResponse response) {
        try {
            SummerResult summerResult = loginService.login(username, password, request, response);
            return summerResult;

        } catch (Exception e) {
            e.printStackTrace();
            return SummerResult.build(500, ExceptionUtil.getStackTrace(e));
        }
    }

    @RequestMapping("/user/token/{token}")
    @ResponseBody
    public Object getUserByToken(@PathVariable String token, String callback) {
        try {
            SummerResult result = loginService.getUserByToken(token);
            if (StringUtils.isNotBlank(callback)) {
                MappingJacksonValue mappingJacksonValue = new MappingJacksonValue(result);
                mappingJacksonValue.setJsonpFunction(callback);
                return mappingJacksonValue;
            }
            return result;
        } catch (Exception e) {
            e.printStackTrace();
            return SummerResult.build(500, ExceptionUtil.getStackTrace(e));
        }
    }

    @RequestMapping(value = "/test", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public String echo(@RequestBody String call) {
        return call;
    }

}


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\ThemeBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

/**
 * @author Kamil Kokot <kamil@kokot.me>
 */
final class TranslationTest extends WebTestCase
{
    /**
     * @test
     */
    public function it_respects_theming_logic_while_translating_messages(): void
    {
        $client = self::createClient();

        $crawler = $client->request('GET', '/template/:Translation:translationsTest.txt.twig');

        foreach ($this->getTranslationsLines() as $expectedContent) {
            $this->assertContains($expectedContent, $crawler->text());
        }
    }

    /**
     * @return array
     */
    protected function getTranslationsLines()
    {
        return [
            'BUNDLE/Resources/translations: BUNDLE/Resources/translations',
            'app/Resources/BUNDLE_NAME/translations: app/Resources/BUNDLE_NAME/translations',
            'app/Resources/translations: app/Resources/translations',
            'THEME/BUNDLE_NAME/translations: THEME/BUNDLE_NAME/translations',
            'THEME/translations: THEME/translations',
            'PARENT_THEME/BUNDLE_NAME/translations: PARENT_THEME/BUNDLE_NAME/translations',
            'PARENT_THEME/translations: PARENT_THEME/translations',
        ];
    }
}


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

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})

export class AppComponent {
    fields: any[] =
    [
        { name: 'id', type: 'string' },
        { name: 'status', map: 'state', type: 'string' },
        { name: 'text', map: 'label', type: 'string' },
        { name: 'tags', type: 'string' },
        { name: 'color', map: 'hex', type: 'string' },
        { name: 'resourceId', type: 'number' }
    ];

    source: any =
    {
        localData: [
            { id: '1161', state: 'new', label: 'Make a new Dashboard', tags: 'dashboard', hex: '#36c7d0', resourceId: 3 },
            { id: '1645', state: 'work', label: 'Prepare new release', tags: 'release', hex: '#ff7878', resourceId: 1 },
            { id: '9213', state: 'new', label: 'One item added to the cart', tags: 'cart', hex: '#96c443', resourceId: 3 },
            { id: '6546', state: 'done', label: 'Edit Item Price', tags: 'price, edit', hex: '#ff7878', resourceId: 4 },
            { id: '9034', state: 'new', label: 'Login 404 issue', tags: 'issue, login', hex: '#96c443' }
        ],
        dataType: 'array',
        dataFields: this.fields
    };

    dataAdapter: any = new jqx.dataAdapter(this.source);

    resourcesAdapterFunc = (): any => {
        let resourcesSource =
            {
                localData: [
                    { id: 0, name: 'No name', image: '../jqwidgets/styles/images/common.png', common: true },
                    { id: 1, name: 'Andrew Fuller', image: '../images/andrew.png' },
                    { id: 2, name: 'Janet Leverling', image: '../images/janet.png' },
                    { id: 3, name: 'Steven Buchanan', image: '../images/steven.png' },
                    { id: 4, name: 'Nancy Davolio', image: '../images/nancy.png' },
                    { id: 5, name: 'Michael Buchanan', image: '../images/Michael.png' },
                    { id: 6, name: 'Margaret Buchanan', image: '../images/margaret.png' },
                    { id: 7, name: 'Robert Buchanan', image: '../images/robert.png' },
                    { id: 8, name: 'Laura Buchanan', image: '../images/Laura.png' },
                    { id: 9, name: 'Laura Buchanan', image: '../images/Anne.png' }
                ],
                dataType: 'array',
                dataFields: [
                    { name: 'id', type: 'number' },
                    { name: 'name', type: 'string' },
                    { name: 'image', type: 'string' },
                    { name: 'common', type: 'boolean' }
                ]
            };
        let resourcesDataAdapter = new jqx.dataAdapter(resourcesSource);
        return resourcesDataAdapter;
    }

    columns: any[] =
    [
        { text: 'Backlog', dataField: 'new' },
        { text: 'In Progress', dataField: 'work' },
        { text: 'Done', dataField: 'done' }
    ];
}


text:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)

package edu.wustl.catissuecore.domainobject;

import java.util.Collection;

// Referenced classes of package edu.wustl.catissuecore.domainobject:
//            EventParameters

public interface AuditEvent
    extends EventParameters
{

    public abstract String getIpAddress();

    public abstract void setIpAddress(String s);

    public abstract Collection getAuditEventLogCollection();

    public abstract void setAuditEventLogCollection(Collection collection);
}


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

public class TwitterEventListener : MonoBehaviour
{
#if UNITY_IPHONE || UNITY_ANDROID
	// Listens to all the events.  All event listeners MUST be removed before this object is disposed!
	void OnEnable()
	{
		TwitterManager.loginSucceededEvent += loginSucceeded;
		TwitterManager.loginFailedEvent += loginFailed;
		TwitterManager.requestDidFinishEvent += requestDidFinishEvent;
		TwitterManager.requestDidFailEvent += requestDidFailEvent;
		TwitterManager.tweetSheetCompletedEvent += tweetSheetCompletedEvent;
	}

	void OnDisable()
	{
		// Remove all the event handlers
		// Twitter
		TwitterManager.loginSucceededEvent -= loginSucceeded;
		TwitterManager.loginFailedEvent -= loginFailed;
		TwitterManager.requestDidFinishEvent -= requestDidFinishEvent;
		TwitterManager.requestDidFailEvent -= requestDidFailEvent;
		TwitterManager.tweetSheetCompletedEvent -= tweetSheetCompletedEvent;
	}

	// Twitter events
	void loginSucceeded( string username )
	{
		Debug.Log( "Successfully logged in to Twitter: " + username );
	}

	void loginFailed( string error )
	{
		Debug.Log( "Twitter login failed: " + error );
	}

	void requestDidFailEvent( string error )
	{
		Debug.Log( "requestDidFailEvent: " + error );
	}

	void requestDidFinishEvent( object result )
	{
		if( result != null )
		{
			Debug.Log( "requestDidFinishEvent" );
			Prime31.Utils.logObject( result );
		}
	}

	void tweetSheetCompletedEvent( bool didSucceed )
	{
		Debug.Log( "tweetSheetCompletedEvent didSucceed: " + didSucceed );
	}

#endif
}


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > Rush Limbaugh: The Right-Wing Personified

						Expand All | Collapse All

Rush Limbaugh: The Right-Wing Personified

With this doctrine out of the way, Limbaugh was free to say whatever he wanted to, and not have to give equal time to anyone. He took full advantage of this ruling. His audience consists of a large segment of American society, especially the right-wing, conservative, Christian coalition.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
package org.jsimpledb.core;

import com.google.common.base.Preconditions;

import org.dellroad.stuff.java.Primitive;
import org.jsimpledb.util.ByteReader;
import org.jsimpledb.util.ByteWriter;

class BooleanType extends PrimitiveType<Boolean> {

    private static final byte FALSE_VALUE = (byte)0;
    private static final byte TRUE_VALUE = (byte)1;

    BooleanType() {
       super(Primitive.BOOLEAN);
    }

    @Override
    public Boolean read(ByteReader reader) {
        final int value = reader.readByte();
        switch (value) {
        case FALSE_VALUE:
            return Boolean.FALSE;
        case TRUE_VALUE:
            return Boolean.TRUE;
        default:
            throw new IllegalArgumentException(String.format("invalid encoded boolean value 0x%02x", value));
        }
    }

    @Override
    public void write(ByteWriter writer, Boolean value) {
        Preconditions.checkArgument(value != null, "null value");
        writer.writeByte(value ? TRUE_VALUE : FALSE_VALUE);
    }

    @Override
    public void skip(ByteReader reader) {
        this.read(reader);
    }

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


text:
package ch.ethz.inf.vs.californium.network;

import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Logger;

import ch.ethz.inf.vs.californium.coap.CoAP.Type;
import ch.ethz.inf.vs.californium.coap.EmptyMessage;
import ch.ethz.inf.vs.californium.coap.Message;
import ch.ethz.inf.vs.californium.coap.Request;
import ch.ethz.inf.vs.californium.coap.Response;
import ch.ethz.inf.vs.californium.network.Exchange.KeyMID;
import ch.ethz.inf.vs.californium.network.Exchange.KeyToken;
import ch.ethz.inf.vs.californium.network.Exchange.KeyUri;
import ch.ethz.inf.vs.californium.network.Exchange.Origin;
import ch.ethz.inf.vs.californium.network.config.NetworkConfig;
import ch.ethz.inf.vs.californium.network.config.NetworkConfigDefaults;
import ch.ethz.inf.vs.californium.network.dedupl.Deduplicator;
import ch.ethz.inf.vs.californium.network.dedupl.DeduplicatorFactory;
import ch.ethz.inf.vs.californium.network.layer.ExchangeForwarder;

public class Matcher {

	private final static Logger LOGGER = Logger.getLogger(Matcher.class.getCanonicalName());

	private boolean started;
	private ExchangeObserver exchangeObserver = new ExchangeObserverImpl();

	private ExchangeForwarder forwarder; // TODO: still necessary?

	/** The executor. */
	private ScheduledExecutorService executor;

	// TODO: Make per endpoint
	private AtomicInteger currendMID;

	private ConcurrentHashMap<KeyMID, Exchange> exchangesByMID; // Outgoing
	private ConcurrentHashMap<KeyToken, Exchange> exchangesByToken;

	private ConcurrentHashMap<KeyUri, Exchange> ongoingExchanges; // for blockwise

	// TODO: Multicast Exchanges: should not be removed from deduplicator
	private Deduplicator deduplicator;
	// Idea: Only store acks/rsts and not the whole exchange. Responses should be sent CON.

	public Matcher(ExchangeForwarder forwarder, NetworkConfig config) {
		this.forwarder = forwarder;
		this.started = false;
		this.exchangesByMID = new ConcurrentHashMap<KeyMID, Exchange>();
		this.exchangesByToken = new ConcurrentHashMap<KeyToken, Exchange>();
		this.ongoingExchanges = new ConcurrentHashMap<KeyUri, Exchange>();

		DeduplicatorFactory factory = DeduplicatorFactory.getDeduplicatorFactory();
		this.deduplicator = factory.createDeduplicator(config);

		if (config.getBoolean(NetworkConfigDefaults.USE_RANDOM_MID_START))
			currendMID = new AtomicInteger(new Random().nextInt(1<<16));
		else currendMID = new AtomicInteger(0);
	}

	public synchronized void start() {
		if (started) return;
		else started = true;
		if (executor == null)
			throw new IllegalStateException("Matcher has no executor to schedule exchnage removal");
		deduplicator.start();
	}

	public synchronized void stop() {
		if (!started) return;
		else started = false;
		deduplicator.stop();
		clear();
	}

	public synchronized void setExecutor(ScheduledExecutorService executor) {
		deduplicator.setExecutor(executor);
		this.executor = executor;
	}

	public void sendRequest(Exchange exchange, Request request) {
		if (request.getMID() == Message.NONE)
			request.setMID(currendMID.getAndIncrement()%(1<<16));

		/*
		 * The request is a CON or NCON and must be prepared for these responses
		 * - CON  => ACK/RST/ACK+response/CON+response/NCON+response
		 * - NCON => RST/CON+response/NCON+response
		 * If this request goes lost, we do not get anything back.
		 */

		KeyMID idByMID = new KeyMID(request.getMID(),
				request.getDestination().getAddress(), request.getDestinationPort());
		//XXX che l'accrocchio sia con me!
		KeyToken idByTok;
		if (request.isMulticast()) {
			idByTok = new KeyToken(request.getToken(),
					new byte[0], request.getDestinationPort());

		} else {
			idByTok = new KeyToken(request.getToken(),
				request.getDestination().getAddress(), request.getDestinationPort());
		}
		exchange.setObserver(exchangeObserver);

		// TODO: remove this statement to save computation?
		LOGGER.fine("Remember by MID "+idByMID+" and by Token "+idByTok);

		exchangesByMID.put(idByMID, exchange);
		exchangesByToken.put(idByTok, exchange);
	}

	public void sendResponse(Exchange exchange, Response response) {
		if (response.getMID() == Message.NONE)
			response.setMID(currendMID.getAndIncrement()%(1<<16));

		/*
		 * The response is a CON or NON or ACK and must be prepared for these
		 * - CON  => ACK/RST // we only care to stop retransmission
		 * - NCON => RST // we don't care
		 * - ACK  => nothing!
		 * If this response goes lost, we must be prepared to get the same
		 * CON/NCON request with same MID again. We then find the corresponding
		 * exchange and the retransmissionlayer resends this response.
		 */

		if (response.getDestination() == null)
			throw new NullPointerException("Response has no destination address set");
		if (response.getDestinationPort() == 0)
			throw new NullPointerException("Response hsa no destination port set");

		// Insert CON and NON to match ACKs and RSTs to the exchange
		KeyMID idByMID = new KeyMID(response.getMID(),
				response.getDestination().getAddress(), response.getDestinationPort());
		exchangesByMID.put(idByMID, exchange);

		if (/*exchange.getCurrentRequest().getCode() == Code.GET
				&&*/ response.getOptions().hasBlock2()) {
			// Remember ongoing blockwise GET requests
			Request request = exchange.getRequest();
//			KeyToken idByTok = new KeyToken(request.getToken(),
//					request.getSource().getAddress(), request.getSourcePort());
			KeyUri keyUri = new KeyUri(request.getURI(),
					response.getDestination().getAddress(), response.getDestinationPort());
			LOGGER.fine("Add request to ongoing exchanges with key "+keyUri);
			ongoingExchanges.put(keyUri, exchange);
		}

		if (response.getType() == Type.ACK || response.getType() == Type.NON) {
			// Since this is an ACK or NON, the exchange is over with sending this response.
			if (response.isLast()) {
				exchange.setComplete(true);
				exchangeObserver.completed(exchange);
			}
		} // else this is a CON and we need to wait for the ACK or RST
	}

	public void sendEmptyMessage(Exchange exchange, EmptyMessage message) {

		if (message.getType() == Type.RST && exchange != null) {
			// We have rejected the request or response
			exchange.setComplete(true);
			exchangeObserver.completed(exchange);
		}

		/*
		 * We do not expect any response for an empty message
		 */
		if (message.getMID() == Message.NONE)
			LOGGER.warning("Empy message "+ message+" has MID NONE // debugging");
	}

	public Exchange receiveRequest(Request request) {
		/*
		 * This request could be
		 *  - Complete origin request => deliver with new exchange
		 *  - One origin block        => deliver with ongoing exchange
		 *  - Complete duplicate request or one duplicate block (because client got no ACK)
		 *      =>
		 * 		if ACK got lost => resend ACK
		 * 		if ACK+response got lost => resend ACK+response
		 * 		if nothing has been sent yet => do nothing
		 * (Retransmission is supposed to be done by the retransm. layer)
		 */

		KeyMID idByMID = new KeyMID(request.getMID(),
				request.getSource().getAddress(), request.getSourcePort());

//		KeyToken idByTok = new KeyToken(request.getToken(),
//				request.getSource().getAddress(), request.getSourcePort());

		/*
		 * The differentiation between the case where there is a Block1 or
		 * Block2 option and the case where there is none has the advantage that
		 * all exchanges that do not need blockwise transfer have simpler and
		 * faster code than exchanges with blockwise transfer.
		 */

		if (!request.getOptions().hasBlock1() && !request.getOptions().hasBlock2()) {
			LOGGER.fine("Create new exchange for remote request");

			Exchange exchange = new Exchange(request, Origin.REMOTE);
			Exchange previous = deduplicator.findPrevious(idByMID, exchange);
			if (previous == null) {
				return exchange;

			} else {
				LOGGER.info("Message is a duplicate, ignore: "+request);
				request.setDuplicate(true);
				return previous;
			}

		} else {

			KeyUri idByUri = new KeyUri(request.getURI(),
					request.getSource().getAddress(), request.getSourcePort());

			LOGGER.fine("Lookup ongoing exchange for "+idByUri);
			Exchange ongoing = ongoingExchanges.get(idByUri);
			if (ongoing != null) {
				LOGGER.fine("Found exchange"); // TODO: remove this line
				// This is a block of an ongoing request

				Exchange prev = deduplicator.findPrevious(idByMID, ongoing);
				if (prev != null) {
					LOGGER.info("Message is a duplicate: "+request);
					request.setDuplicate(true);
				}
				return ongoing;

			} else {
				// We have no ongoing exchange for that block.
				/*
				 * Note the difficulty of the following code: The first message
				 * of a blockwise transfer might arrive twice due to a
				 * retransmission. The new Exchange must be inserted in both the
				 * hash map 'ongoing' and the deduplicator. They must agree on
				 * which exchange they store!
				 */

				LOGGER.fine("Create new exchange for remote request with blockwise transfer");
				Exchange exchange = new Exchange(request, Origin.REMOTE);
				Exchange previous = deduplicator.findPrevious(idByMID, exchange);
				if (previous == null) {
					ongoingExchanges.put(idByUri, exchange);
					return exchange;

				} else {
					LOGGER.info("Message is a duplicate: "+request);
					request.setDuplicate(true);
					return previous;
				}
			} // if ongoing
		} // if blockwise
	}

	public Exchange receiveResponse(Response response) {

		/*
		 * This response could be
		 * - The first CON/NCON/ACK+response => deliver
		 * - Retransmitted CON (because client got no ACK)
		 * 		=> resend ACK
		 */

		KeyMID idByMID = new KeyMID(response.getMID(),
				response.getSource().getAddress(), response.getSourcePort());

		KeyToken idByTok = new KeyToken(response.getToken(),
				response.getSource().getAddress(), response.getSourcePort());

		Exchange exchange = exchangesByToken.get(idByTok);
//XXX che l'accrocchio sia con me!
		if (exchange == null) {
			idByTok = new KeyToken(response.getToken(),
						new byte[0], response.getSourcePort());
			exchange = exchangesByToken.get(idByTok);
		}

		if (exchange != null) {
			// There is an exchange with the given token

			if (response.getType() != Type.ACK) {
				// Need deduplication for CON and NON but not for ACK (because MID defined by server)
				Exchange prev = deduplicator.findPrevious(idByMID, exchange);
				if (prev != null) { // (and thus it holds: prev == exchange)
					LOGGER.fine("Response is a duplicate "+response);
					response.setDuplicate(true);
				}
			} else {
				/*
				 * In the draft coap-18, section 4.5, there is nothing written
				 * about deduplication of ACKs. Deduplicating ACKs might lead to
				 * a problem, when a server sends requests to itself:
				 * [5683] CON [MID=1234] GET --->  [5683] // => remember MID=1234
				 * [5683] <--- ACK [MID=1234] 2.00 [5683] // => MID=1234 is a duplicate
				 */
			}

			if (response.getType() == Type.ACK) {
				// this is a piggy-backed response and the MID must match
				if (exchange.getCurrentRequest().getMID() == response.getMID()) {
					// The token and MID match. This is a response for this exchange
					return exchange;

				} else {
					// The token matches but not the MID. This is a response for an older exchange
					LOGGER.info("Token matches but not MID: wants "+exchange.getCurrentRequest().getMID()+" but gets "+response.getMID());
					EmptyMessage rst = EmptyMessage.newRST(response);
					sendEmptyMessage(exchange, rst);
					// ignore response
					return null;
				}

			} else {
				// this is a separate response that we can deliver
				return exchange;
			}

		} else {
			// There is no exchange with the given token.

			// This might be a duplicate response to an exchanges that is already completed
			if (response.getType() != Type.ACK) {
				// Need deduplication for CON and NON but not for ACK (because MID defined by server)
				Exchange prev = deduplicator.find(idByMID);
				if (prev != null) { // (and thus it holds: prev == exchange)
					LOGGER.info("Message is a duplicate, ignore: "+response);
					response.setDuplicate(true);
					return prev;
				}
			}

			LOGGER.info("Received response with unknown token "+idByTok+" and MID "+idByMID+". Reject "+response);
			// This is a totally unexpected response.
			EmptyMessage rst = EmptyMessage.newRST(response);
			sendEmptyMessage(exchange, rst);
			// ignore response
			return null;
		}
	}

	public Exchange receiveEmptyMessage(EmptyMessage message) {

		KeyMID idByMID = new KeyMID(message.getMID(),
				message.getSource().getAddress(), message.getSourcePort());

		Exchange exchange = exchangesByMID.get(idByMID);

		if (exchange != null) {
			return exchange;
		} else {
			LOGGER.info("Matcher received empty message that does not match any exchange: "+message);
			// ignore message;
			return null;
		} // else, this is an ACK for an unknown exchange and we ignore it
	}

	public void clear() {
		this.exchangesByMID.clear();
		this.exchangesByToken.clear();
		this.ongoingExchanges.clear();
		deduplicator.clear();
	}

	private class ExchangeObserverImpl implements ExchangeObserver {

		@Override
		public void completed(Exchange exchange) {
			if (exchange.getOrigin() == Origin.LOCAL) {
				// TODO: Observe+Blockwise use multiple tokens and we have to
				//       remove all of them
				Request request = exchange.getRequest();
				KeyToken tokKey = new KeyToken(exchange.getCurrentRequest().getToken(),
						request.getDestination().getAddress(), request.getDestinationPort());
				LOGGER.fine("Exchange completed, forget token "+tokKey);
				exchangesByToken.remove(tokKey);
				// TODO: What if the request is only a block?

				KeyMID midKey = new KeyMID(request.getMID(),
						request.getDestination().getAddress(), request.getDestinationPort());
				exchangesByMID.remove(midKey);
			}
			if (exchange.getOrigin() == Origin.REMOTE) {
				Request request = exchange.getCurrentRequest();
				if (request != null) {
					KeyUri uriKey = new KeyUri(request.getURI(),
							request.getSource().getAddress(), request.getSourcePort());
					LOGGER.fine("Exchange completed, forget blockwise transfer to URI "+uriKey);
					ongoingExchanges.remove(uriKey);
				}
				// TODO: What if the request is only a block?
				// TODO: This should only happen if the transfer was blockwise

				Response response = exchange.getResponse();
				if (response != null) {
					KeyMID midKey = new KeyMID(response.getMID(),
							response.getDestination().getAddress(), response.getDestinationPort());
					exchangesByMID.remove(midKey);
				}

			}
		}

	}

}


text:
class Bunker < ActiveRecord::Base
  validate :password, secure: true
  validate :location, :protected => true

  def alert_staff
    staph.all_alert
    Staff.alert_all
  end

  def alert_president
    SecretService.stand_down
    alert_staff || go_crazy
  end
end


text:
<!DOCTYPE html>

	<meta charset="utf-8" />
	<title>Beautiful | A Responsive HTML5 Template | Home</title>
	<meta name="description" content="Beautiful is a responsive, clean, creative, HTML5 / CSS3 template." />
	<meta name="author" content="Roman Polyarush, WebVision" />

	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

	<link rel="shortcut icon" href="images/favicon.ico" />
	<link rel="apple-touch-icon" href="images/apple-touch-icon.png" />
	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png" />
	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png" />

	<link rel="stylesheet" href="layout/styles/base.css" />
	<link rel="stylesheet" href="layout/styles/skeleton.css" />
	<link rel="stylesheet" href="layout/styles/layout.css" />

	<link rel="stylesheet" href="layout/scripts/fancybox/styles/jquery.fancybox.css" type="text/css" media="screen" />

	<link rel="stylesheet" href="layout/scripts/isotop/isotop.css" type="text/css" media="screen" />

	<link href="layout/styles/fonts.css" rel="stylesheet" type="text/css" />

	<link href="layout/styles/colors.css" rel="stylesheet" type="text/css" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Contact details

Reader will be distracted by the readable content of a page when looking at its layout. The point of using is that it has.

30 You Streen Name, Vancouver, BC 58963 Canada

Phone: +1 800 204 21 87

Fax: +1 800 890 00 41

E-mail: mail@sc.chinaz.com

Website: http://sc.chinaz.com

Contact form

					<form action="#" method="post" />
						<input type="text" value="" placeholder="Name*" />
						<input type="text" value="" placeholder="Email*" />
						<textarea cols="50" rows="3" placeholder="Message*"></textarea>
						<input type="submit" value="Send message" class="submit-btn" />
					</form>

				Toggle Upper

			Toggle Upper

					info@yoursc.chinaz.com

					Sign Up
					Registration

Sign Up

					<form action="#" method="post" class="sign-form" />
						Login: <input type="text" value="" />

						Password: <input type="password" value="" />

Forgot password?
						<input type="submit" value="Sign Up" class="submit-btn" />

					</form>

responcive/minimal/HTML5

						This is a site tagline.

						Call us: +1 (495) 708-48-39

Home

Sliders

Basic Slider

Creative Slider

Photos Slider

Features

Typography

Elements

Info Boxes

Columns

Tabs&Toggle

Pricing Table

Template Pages

About Us

Services

FAQ

404 Error Page

Alternate Home Layout

							Portfolio

Portfolio 2 Columns

Portfolio 3 Columns

Portfolio 4 Columns

Portfolio Item Page

Blog

Single Post

Contact

					<select id="main-menu-mobile">
						<option value="#" />Navigate to
						<option value="index.html" /> - Home
						<option value="slider.html" /> - Sliders

							<option value="index.html" />     -- Basic Slider
							<option value="slider.html" />     -- Creative Slider
							<option value="home.html" />     -- Photos Slider

						<option value="typography.html" /> - Features

							<option value="typography.html" />     -- Typography
							<option value="info-boxes.html" />     -- Elements
								<option value="info-boxes.html" />        --- Info Boxes
								<option value="columns.html" />        --- Columns
								<option value="tabs.html" />        --- Tabs&Toggle
								<option value="pricing.html" />        --- Pricing Table
							<option value="about.html" />     -- Template Pages
								<option value="about.html" />        --- About Us
								<option value="services.html" />        --- Services
								<option value="faq.html" />        --- FAQ
								<option value="404.html" />        --- 404 Error Page
							<option value="home.html" />     -- Alternate Home Layout

						<option value="portfolio-2c.html" /> - Portfolio
							<option value="portfolio-2c.html" />     -- Portfolio 2 Columns
							<option value="portfolio-3c.html" />     -- Portfolio 3 Columns
							<option value="portfolio-4c.html" />     -- Portfolio 4 Columns
							<option value="portfolio-page.html" />Portfolio Item Page
						<option value="blog.html" /> - Blog
							<option value="blog-page.html" />     -- Single Post
						<option value="contact.html" /> - Contact
					</select>

					<form action="#" method="post" class="search_block" />
						<input type="text" value="Search site " onFocus="if(this.value=='Search site ')this.value='';" onBlur="if(this.value=='')this.value='Search site ';" />
						<input type="submit" value="" />
					</form>

				You are here: Home  Portfolio 2 columns

Portfolio 2 columns

This is Beautiful a very clean, responsive theme.

Filter:

								All
								Web Design
								Photography
								Illustration
								Video

						Hide/Show Filtr

Drive my soul

photography

Walking on a dream

web design

Unconscious life

illustration

The sweet escape

web design

The weight of time

photography

Invisible winds

video

Cinderella in Wonderland

photography

Destiny cards

illustration

The weight of time

video

Ebb and flow

illustration

The violence behind

photography

If the dream flies away

video

Reader will be distracted by the readable content of a page when looking at its layout. The point of using is that it has a more-or-less normal distribution.

Latest blog posts

							 Content of a page when randomised.

Mar 27, 2012

							 Majority have suffered alteratio in some.

Mar 12, 2012 15:20 PM

Latest News

							Reader will be distracted by the readable content.

Mar 20, 2012, 9:15 AM

							Looking at its layout. The point using is that it has.

Mar 12, 2012 15:20 PM

Get in touch

Addres: 760, Street, CA, Vancouver

						Phone: (256) 489-41-31

						Fax: (256) 489-24-36

Email: info@yoursc.chinaz.com

Home

Sliders

Features

Portfolio

Blog

Contact

© Copyright © 2013.Company name All rights reserved.网页模板

<link href="http://fonts.googleapis.com/css?family=Dosis:300,600,700,800" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700" rel="stylesheet" type="text/css" />


text:
ContactManager.addRegions({
    mainRegion: "#main-region",
    modalRegion: "#modal-region"
});


text:
package org.apache.storm.topology;

import org.apache.storm.state.State;

/**
 * A windowed bolt abstraction for supporting windowing operation with state.
 */
public interface IStatefulWindowedBolt<T extends State> extends IStatefulComponent<T>, IWindowedBolt {
    /**
     * If the stateful windowed bolt should have its windows persisted in state and maintain a subset of events in memory.
     * <p>
     * The default is to keep all the window events in memory.
     * </p>
     *
     * @return true if the windows should be persisted
     */
    default boolean isPersistent() {
        return false;
    }

    /**
     * The maximum number of window events to keep in memory.
     */
    default long maxEventsInMemory() {
        return 1_000_000L; // default
    }
}


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

<title>Using as: Single</title>

<meta name="description" content="Using as: Single">
<meta name="keywords" content="Using as: Single">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Pseudo-Ops.html#Pseudo-Ops" rel="up" title="Pseudo Ops">
<link href="Size.html#Size" rel="next" title="Size">
<link href="Short.html#Short" rel="prev" title="Short">

Next: Size, Previous: Short, Up: Pseudo Ops   [Contents][Index]

7.81 .single <var>flonums</var>

This directive assembles zero or more flonums, separated by commas.  It
has the same effect as .float.
The exact kind of floating point numbers emitted depends on how
as is configured.  See Machine Dependencies.


text:
search:
   keywords: ['java', 'osecurityrole', 'getdocument']
---

# OSecurityRole - getDocument()

Retrieves the document of the role.

## Role Document

Internally, OrientDB stores the role as a document in the database.  Using this method, you can retrieve the document for further operation.

### Syntax

```
ODocument OSecurityRole().getDocument()
```


text:
package org.springframework.cloud.sleuth.autoconfig.instrument.kafka;

import reactor.kafka.receiver.KafkaReceiver;

import org.springframework.beans.factory.BeanFactory;
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.cloud.sleuth.Tracer;
import org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration;
import org.springframework.cloud.sleuth.instrument.kafka.TracingKafkaConsumerFactory;
import org.springframework.cloud.sleuth.instrument.kafka.TracingKafkaProducerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration
 * Auto-configuration} that registers instrumentation for Reactor Kafka.
 *
 * @author Anders Clausen
 * @author Flaviu Muresan
 * @since 3.1.0
 */
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(KafkaReceiver.class)
@ConditionalOnBean(Tracer.class)
@AutoConfigureAfter(BraveAutoConfiguration.class)
@ConditionalOnProperty(value = "spring.sleuth.kafka.enabled", matchIfMissing = true)
public class TracingReactorKafkaAutoConfiguration {

	@Bean
	@ConditionalOnMissingBean
	TracingKafkaProducerFactory tracingKafkaProducerFactory(BeanFactory beanFactory) {
		return new TracingKafkaProducerFactory(beanFactory);
	}

	@Bean
	@ConditionalOnMissingBean
	TracingKafkaConsumerFactory tracingKafkaConsumerFactory(BeanFactory beanFactory) {
		return new TracingKafkaConsumerFactory(beanFactory);
	}

}


text:
<link rel="stylesheet" type="text/css" href="../theme/app/geoexplorer.css" />

<link rel="stylesheet" type="text/css" href="../theme/ux/colorpicker/color-picker.ux.css" />

<link rel="stylesheet" type="text/css" href="../externals/PrintPreview/resources/css/printpreview.css">


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

/**
 * Controller for the action bar delete item component. It adds option to delete item from
 * details page action bar.
 *
 * @final
 */
export class ActionbarEditItemController {
  /**
   * @param {!./../../resource/verber_service.VerberService} kdResourceVerberService
   * @param {!ui.router.$state} $state
   * @ngInject
   */
  constructor(kdResourceVerberService, $state) {
    /** @export {string} Initialized from a binding. */
    this.resourceKindName;

    /** @export {!backendApi.TypeMeta} Initialized from a binding. */
    this.typeMeta;

    /** @export {!backendApi.ObjectMeta} Initialized from a binding. */
    this.objectMeta;

    /** @private {!./../../resource/verber_service.VerberService} */
    this.kdResourceVerberService_ = kdResourceVerberService;

    /** @private {!ui.router.$state}} */
    this.state_ = $state;

    /** @export */
    this.i18n = i18n;
  }

  /**
   * @export
   */
  edit() {
    this.kdResourceVerberService_
        .showEditDialog(this.resourceKindName, this.typeMeta, this.objectMeta)
        .then(() => { this.state_.reload(); });
  }

  /**
   * @export
   * @return {string}
   */
  getEditTooltip() {
    /**
     * @type {string} @desc Generic "Edit some resource" tooltip text which appears over the
     * edit icon on the global action bar.
     */
    let MSG_ACTION_BAR_EDIT_TOOLTIP =
        goog.getMsg('Edit {$resourceName}', {'resourceName': this.resourceKindName});
    return MSG_ACTION_BAR_EDIT_TOOLTIP;
  }
}

/**
 * Action bar edit item component is to be used on resource details page in order to
 * add button that allows for edit.
 *
 * @type {!angular.Component}
 */
export const actionbarEditItemComponent = {
  templateUrl: 'common/components/actionbar/actionbaredititem.html',
  bindings: {
    'resourceKindName': '@',
    'typeMeta': '<',
    'objectMeta': '<',
  },
  bindToController: true,
  controller: ActionbarEditItemController,
};

const i18n = {
  /** @export {string} @desc Action 'Edit' for the edit button on the global action bar. */
  MSG_ACTION_BAR_EDIT_ACTION: goog.getMsg('Edit'),
};


text:
<readable><title>2884400562_e0851014fc</title><content>
A man dressed like a rockstar poses in front of a brick wall .
A man with a heavy-metal hairstyle wearing a studded leather jacket and tight lace-up pants stands in front of a brick wall .
A man with a lot of jewelry and punk rock clothes poses against a brick wall .
A man with long blond hair and a lot of jewelry stands by a wall .
an older man with long blond hair wearing a rocker outfit
</content></readable>


text:
require 'spec_helper'

describe Gitlab::Client do
  describe ".merge_requests" do
    before do
      stub_get("/projects/3/merge_requests", "merge_requests")
      @merge_requests = Gitlab.merge_requests(3)
    end

    it "should get the correct resource" do
      expect(a_get("/projects/3/merge_requests")).to have_been_made
    end

    it "should return an array of project's merge requests" do
      expect(@merge_requests).to be_an Array
      expect(@merge_requests.first.project_id).to eq(3)
    end
  end

  describe ".merge_request" do
    before do
      stub_get("/projects/3/merge_request/1", "merge_request")
      @merge_request = Gitlab.merge_request(3, 1)
    end

    it "should get the correct resource" do
      expect(a_get("/projects/3/merge_request/1")).to have_been_made
    end

    it "should return information about a merge request" do
      expect(@merge_request.project_id).to eq(3)
      expect(@merge_request.assignee.name).to eq("Jack Smith")
    end
  end

  describe ".create_merge_request" do
    before do
      stub_post("/projects/3/merge_requests", "merge_request")
    end

    it "should fail if it doesn't have a source_branch" do
      expect {
        Gitlab.create_merge_request(3, 'New merge request', :target_branch => 'master')
      }.to raise_error Gitlab::Error::MissingAttributes
    end

    it "should fail if it doesn't have a target_branch" do
      expect {
        Gitlab.create_merge_request(3, 'New merge request', :source_branch => 'dev')
      }.to raise_error Gitlab::Error::MissingAttributes
    end

    it "should return information about a merge request" do
      @merge_request = Gitlab.create_merge_request(3, 'New feature',
        :source_branch => 'api',
        :target_branch => 'master'
      )
      expect(@merge_request.project_id).to eq(3)
      expect(@merge_request.assignee.name).to eq("Jack Smith")
    end
  end

  describe ".update_merge_request" do
    before do
      stub_put("/projects/3/merge_request/2", "merge_request").
        with(:body => {
          :assignee_id => '1',
          :target_branch => 'master',
          :title => 'A different new feature'
        })
      @merge_request = Gitlab.update_merge_request(3, 2,
        :assignee_id   => '1',
        :target_branch => 'master',
        :title         => 'A different new feature'
      )
    end

    it "should get the correct resource" do
      expect(a_put("/projects/3/merge_request/2").
        with(:body => {
          :assignee_id => '1',
          :target_branch => 'master',
          :title => 'A different new feature'
        })).to have_been_made
    end

    it "should return information about a merge request" do
      expect(@merge_request.project_id).to eq(3)
      expect(@merge_request.assignee.name).to eq("Jack Smith")
    end
  end

  describe ".accept_merge_request" do
    before do
      stub_put("/projects/5/merge_request/42/merge", "merge_request").
        with(:body => {:merge_commit_message => 'Nice!'})
      @merge_request = Gitlab.accept_merge_request(5, 42, :merge_commit_message => 'Nice!')
    end

    it "should get the correct resource" do
      expect(a_put("/projects/5/merge_request/42/merge").
        with(:body => {:merge_commit_message => 'Nice!'})).to have_been_made
    end

    it "should return information about merged merge request" do
      expect(@merge_request.project_id).to eq(3)
      expect(@merge_request.assignee.name).to eq("Jack Smith")
    end
  end

  describe ".merge_request_comments" do
    before do
      stub_get("/projects/3/merge_request/2/comments", "merge_request_comments")
      @merge_request = Gitlab.merge_request_comments(3, 2)
    end

    it "should get the correct resource" do
      expect(a_get("/projects/3/merge_request/2/comments")).to have_been_made
    end

    it "should return merge request's comments" do
      expect(@merge_request).to be_an Array
      expect(@merge_request.length).to eq(2)
      expect(@merge_request[0].note).to eq("this is the 1st comment on the 2merge merge request")
      expect(@merge_request[0].author.id).to eq(11)
      expect(@merge_request[1].note).to eq("another discussion point on the 2merge request")
      expect(@merge_request[1].author.id).to eq(12)
    end
  end

  describe ".create_merge_request_comment" do
    before do
      stub_post("/projects/3/merge_request/2/comments", "merge_request_comment")
      @merge_request = Gitlab.create_merge_request_comment(3, 2, 'Cool Merge Request!')
    end

    it "should get the correct resource" do
      expect(a_post("/projects/3/merge_request/2/comments")).to have_been_made
    end

    it "should return information about a merge request" do
      expect(@merge_request.note).to eq('Cool Merge Request!')
      expect(@merge_request.author.id).to eq(1)
    end
  end
end


text:
import core from "./libs/core";
import es from "./libs/es";

export default {
  // adds runtime checks in runtime if values to bind is effectful, and makes
  // it effectful if not
  coerce: false,

  // default profile name
  profile: null,

  // "es" | "commonjs"
  modules: "es",

  // default namespace name for directives
  ns: null,

  // Monad bind operation name
  bindName: "chain",

  // Monad `return` operation name
  returnName: "pure",

  // Exception's `raise` operation name
  raiseName: "raise",

  // pure jump to another frame operation name
  pureBindName: "jump",

  // uses number representation for effectful frames, and emit dispatching
  // switch statements
  defunct: false,

  // throw exception on invalid state (for debugging purposes)
  defunctGuardInvalidState: true,

  // defunct `switch` statement discriminant source
  // "arg" - handler's function argument
  defunctStateDiscriminant: false,

  // utilize pass through switch cases if possible
  defunctCasesPassThrough: false,

  // creates a context object for each effectul function's call
  scopeContext: false,

  // pass context to operations (as their first argument)
  threadContext: false,

  // adds extra first frame, e.g. to make the effectful result object suspended
  // after effectful function call
  scopePrefix: false,

  // adds extra last frame, e.g. to extract some effectful data from context
  scopePostfix: false,

  // name of a function to construct context object
  scopeConstructor: "context",
  // name of a function to construct an object with closure captured variables
  pureScopeConstructor: false,

  // calls operations from either namespace or context object, otherwise
  // from current effectful object, this applies only for operations with
  // effectful argument, otherwise they are all static
  static: false,

  // combines Monadic bind and effectful operation into one function's call
  combineOps: false,

  // mapping from Babel AST node name to operation's name (or `true` for some default name)
  ops: null,

  // using pure lean iterator for for-of statement
  pureForOf: true,

  // translates pure `for-of` into lean iterators traversal
  // activated only with `loose:true`
  leanForOf: true,

  // use ECMAScript iteration protocol for for-ofs
  esForOf: false,
  esForAwaitOf: false,

  // name of a function to call for each effectful function
  // it may change something in object's protocol for that function
  wrapFunction: null,

  // how context is passed, the value is either:
  // * this - context is bound to this argument in each frame
  // * parameter - context is a first argument
  // * reference - as a closure captured variable - incompatible with topLevel
  // * closure - context is the function closure, no other object is created
  //           - works only with `inline***: "promise"`
  contextBy: "parameter",

  // handles JavaScript exceptions, by adding corresponding try-catch
  // statements otherwise will replace `throw` with `M.raise` in effectful
  // functions and ignores anything thrown from JS
  jsExceptions: true,

  // stores all local variables in context objects
  contextState: false,

  // variable names prefix/postfix for context store
  closVarPrefix: "_",
  closVarPostfix: "",

  // takes static operation from context object rather than namespace object
  contextMethodOps: false,

  // override `contextMethodOps` for specific operations
  // now overrides only `true`, otherwise not checked
  contextMethodOpsSpec: {},

  // marks operation binding some value with "B" character
  // otherwise every operation is marked
  markBindValue: false,

  // marks number of additional arguments threaded to op's call
  // if more than `unpackMax` it is "N" character
  markArgNum: false,

  // marks pure jumps back from inside loop block
  // to insert some trampoline if needed
  markRepeat: false,

  // marks operations containing error handling continuation with "H" character
  markErrorCont: false,

  // marks operation containing result continuation with "F" character
  markResultCont: false,

  // does some optimization specific conversion in pure code
  loose: false,

  // calls `exit` for `for-of` iterators if control exits
  // them before the iterator is done
  finalizeForOf: true,

  // moves frames out of function's body to the module top level
  topLevel: false,

  // detects import matching the pattern to apply compile-time options
  // true - means only pre-defined embedded libs are checked
  presetsImportPattern: true,

  // injects runtime from provided module
  importRT: null,

  // transpiles only modules containing the runtime import
  detectRT: null,

  // runtime function to be inlined in the module
  inlineRT: null,

  // name of global variable used as default control namespaces
  importGlobal: null,

  // stores control flow continuation in the field's name of context object
  storeCont: null,

  // stores currently applied continuation
  storeRunningCont: null,

  // stores result continuation in the field's name of context object
  storeResultCont: null,

  // stores error continuation in the field's name of context object
  storeErrorCont: null,

  // name of a handler function for defunct: true
  storeHandler: "$run",

  // keep single defunctHandler in a prototype
  defunctHandlerInProto: false,

  // some named templates for some operations (mostly for ES compatibility):
  inlineChainOp: null, // "promise" | null
  inlineScopeOp: null, // "unwrap" | "call" | "context" | null
  inlineYieldOp: null, // "iterator" | "iteratorResult" | "iteratorResultPromise" | null
  inlineYieldStarOp: null, // "iterator" | null
  inlinePureOp: null, // "asis" | "iterator" | "promise" | null
  inlineRaiseOp: null, // "throw" | "promise" | null

  // compose `chain` operator at its left(first) argument
  // by default they are composed on its right(second)
  // e.g. `f(g(k))` is converted to equivalent of `chain(k,x => chain(f(x), k))`
  // with `leftChain: true` it will be like `chain(chain(k,g),f)`
  // both options should be equivalent if monadic laws hold, but
  // some may have better performance
  // now the option is implemented only for `inlineChainOp:"promise"`
  leftChain: false,

  // inlines try-catch statements with redirect to handle continuation
  inlineJsExceptions: false,

  // convert `throw` statements into a error continuation calls
  inlineThrow: false,

  // inlines pure jumps between frames
  // possible values are:
  // * 'call' - replaces with simple function call
  // * 'tail' - optimized for defunct:true (requires inlineContAssign)
  // * 'promise' - wraps with promise resolve
  // * 'exit' - same tail calls but managed on generator (requires inlineContAssign)
  inlinePureJumps: null,

  // this inlines check and if an operation returns pure value
  // does a tail jump to the next frame
  // possible values
  // * falsy - nothing is injected
  // * true - everything is treated as jump (assumes exceptions suspend the control)
  // * string - name of a function to call for checking
  // * { singelton: string } - name of a runtime value with which it will be compared
  // * { symbol: string } - will check if this (computed) property isn't falsy
  inlineTailCoerce: null,

  // unsets variables if their values are not used after in control flow,
  // to avoid possible leaks if effectful computation is suspended for long
  cleanupFrameVars: false,

  // tries to minimize number of generated temporal variables
  reuseTempVars: true,

  // always calls `pure` operation at return
  keepLastPure: false,

  // always calls `raise` operation at function's exit by exception
  keepLastRaise: false,

  // inline assigning of error and result continuations into context
  // specifies name of a context's field to assign it to
  inlineResultContAssign: false,
  inlineErrorContAssign: false,
  // assign contination to context field before any jumps
  inlineContAssign: false,

  // resets normal continuation to type error to conform ES
  inlineReentryCheck: null,

  // wrap `value` field of async iterator with additional implicit await
  // the option applies only for inlining transform
  wrapAsyncIteratorValue: true,

  // if false it drops requirement `g[@@iterator]() === g` for generators
  // but avoids allocating single object per generator
  wrapGeneratorResult: true,

  // default libraries
  // the defaults here are only for testing purposes
  libs: {
    "@effectful/core": core,
    "@effectful/core-ct": core,
    "@effectful/js": core,
    "@effectful/js-ct": core,
    "@effectful/es": es,
    "@effectful/es-ct": es,
    "@effectful/generators": es,
    "@effectful/generators-ct": es
  },

  // profile definitions (dictionary of same opts object)
  profiles: {},

  // babylon options (not used if executed using babel tools)
  parser: {},

  // babel-generator options (not used if executed using babel tools)
  printer: {},

  // effectful operations to be called as method of its first argument object
  // this is applied only for `static: false`
  methodOps: {
    chain: true,
    map: true
  },

  // inline effectful value coercing if coerce: true
  inlineCoerce: false,

  // when inlining coerce check corresponding operation method is a function
  inlineCoerceCheckIsFunc: false,

  // if `false` it will avoid injecting anything for handling block scoping
  // that emit more optimized code but should be used only if you are sure
  // your don't use it, like the `@effectful/js`, all higher order functions
  // immediately execute their argument functions (like Array::map, filter) etc
  // so no needs to handle block scoping
  loopBlockScoping: true,

  // replaces `let`/`const` with `var`
  blockScoping: false,

  // rewrites module's import
  moduleAliases: null,

  // removes calls to `assert` functions
  removeAsserts: false,

  // using in-code directives to change translator settings
  // (`M.option`, `M.profile`)
  directives: true,

  // converts JS block directives into options assignment
  // string value or true for keys means profile assignment (same name if `true`)
  blockDirectives: {
    par: { parRegion: true },
    seq: { parRegion: false }
  },
  // defines call expressions to treat as effectful
  // {
  //    byNs: {[name:string]:boolen},   // ns names i.e. console
  //    libNs: {[name:string]:boolean}, // functions from the effectful library
  //    all: boolean,                   // default to all calls
  //    ns: boolean                     // effectful library ns
  // }
  // may be null to avoid perform the check
  bindCalls: {},

  // marks function nodes where transform is to be applied
  transform: false,

  // target JS engine has tail calls
  jsTailCalls: false,

  // Name of a context's field to store captured closures.
  // By default stored directly in context
  // Requires `contextState:true`
  closureStorageField: null,

  // store all references to closure ancestors contexts
  closureShortcuts: true,

  // name of a context's field to store local variables
  // stored directly in context if not defined
  // handled only with `contextState:true`
  varStorageField: null,

  // don't use function name in frame's name (ignored in with topLevel)
  shortFrameNames: true,

  // dictionary of hooks to apply before named stage in transforms pipline
  // the hook is a token stream transducer function
  before: null,

  // dictionary of hooks to apply after named stage in transforms pipline
  after: null,

  // applies normalization steps even for pure code
  // this may be needed for some extension
  normPureDoWhile: false,
  normPureWhile: false,
  normPureForIn: false,
  normPureBlocks: false,

  // tries to parallelize effects frames if possible
  // it is a function's level option, if it is set to `true` it isn't going
  // to be parallelized immediately, only parts with `parActive:true` will
  // be considered, use `"par"` or `"seq"` block directives to amend `parActive`
  par: false,
  // for functions with `par` specifies which parts of code should
  // be parallel or sequential (usually changed with "par", "seq" block directives)
  parRegion: false,

  // where to store thread's local variables
  // "closure" | "context"
  parThreadState: "closure",

  // inject `share` operations for shared effectful values
  parShare: true,

  // context's field name for storing thread local variables
  // for `parThreadState:"context"
  threadStorageField: "tls",

  // same as `scopeConstructor` but for function with implicit threads
  // default to the value of `scopeConstructor`
  parScopeConstructor: null,

  // same as `wrapFunction` but for functions with implicit threads
  // default to the value of `wrapFunction`
  parWrapFunction: null,

  // wrap each JSX element with coerce expression
  jsxCoerce: false,

  // name of a function to replace block-level directives
  blockDirsFunc: false,

  // wraps top level of each module into IIFE, thus module's topLevel can have effects
  // this works only for commonjs imports, each require returns an effectful value
  // and must be bound
  topIIFE: false,

  // name of a function to call for each module with effectful functions
  // the resulting value will be added arguments of `wrapFunction` calls
  injectModuleMeta: null,

  // path to sources root (will be use for making relative module paths)
  // if `=== true` the babel's root will be used
  srcRoot: null,

  // add meta-information object for each function as an argument of `wrapFunction`
  // the meta-information content is specific to libraries
  injectFuncMeta: null,

  // adds a reference to a parent's scope description in the meta-info
  metaParentClosure: false,

  // adds `new.target` as an argument of `scope` function
  // this way the context can handle `new` operator
  passNewTarget: null,

  // moves all closures to top level
  // requires `topLevel` and `injectFuncMeta`
  closConv: false,

  // when storing `arguments` wrap it by the function call
  wrapArguments: false,

  // replace global identifiers in callees to RT operation if the matched name is in the map
  replaceGlobals: null,

  // an operation to wrap an eval's argument
  evalWrapArg: null,

  // injects scope description parameter for `eval` functions
  injectEvalCtx: false,

  // Specifies function's call interfaces
  // false | "apply" | "call"
  callProtocol: false,

  // for `callProtocol` !== false specifies the name of the method
  callName: false,

  // Replacing new operator with a method call or an operation
  // null | "op" | "method"
  newProtocol: false,

  // for `newProtocol` !== null specify the operation or method name
  newName: "construct",

  // custom operation implementation injection
  // { [name:string]: { init?: string, deps?: string[] } }
  injectOps: null,

  // replace operation invocation with template's text
  // { [name:string]: { content?: string, deps?: string[] } }
  inlineOps: null,

  // name for a function context object
  contextSymName: null,

  // operations which can write to `function.sent`
  functionSentOps: {
    yld: true,
    scope: true
  },

  // store function's sent in context's field
  functionStateField: false,

  // converts update expressions and assignments without `=` operation into
  // assignments with `=`
  normalizeAssign: false,
  // converts properties set/get/delete into operations calls
  // {[get|set|delete]:true|{bind:boolean}|falsy,[locals|globals]:boolean,arrArgs:boolean}
  wrapPropAccess: null,
  // assumes the output is passed to some static bandler like webpack or parcel,
  // thus avoiding dynamic `require` injections
  staticBundler: true,
  // shifts line number values
  adjustLine: 0,
  // disables all optimizations if `false`
  optimizations: true,
  // adding some comment inside body (to make regenerator tests happy)
  bodyCommentHack: false
};


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:id="@+id/forecast_detail_card_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:clickable="true"
    android:foreground="?android:attr/selectableItemBackground"
    android:orientation="vertical"
    card_view:cardBackgroundColor="@android:color/white"
    card_view:cardCornerRadius="4dp"
    card_view:contentPaddingBottom="10dp"
    card_view:contentPaddingTop="10dp">

    <!--Contains the weather icon, the day of the week, and the icon summary-->
    <RelativeLayout
        android:id="@+id/icon_day_summary_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ImageView
            android:id="@+id/forecast_weather_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:minHeight="100dp"
            android:minWidth="100dp"
            android:src="@mipmap/phunware_launcher"
            android:visibility="visible" />

        <TextView
            android:id="@+id/day_of_week"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:layout_toRightOf="@id/forecast_weather_icon"
            android:text="@string/day_of_week"
            android:textSize="20dp"
            android:textStyle="bold" />

        <View
            android:id="@+id/detail_separator0"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_below="@id/day_of_week"
            android:layout_toRightOf="@id/forecast_weather_icon"
            android:background="#CFD8DC" />

        <TextView
            android:id="@+id/forecast_icon_info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/detail_separator0"
            android:layout_margin="10dp"
            android:layout_toRightOf="@id/forecast_weather_icon"
            android:gravity="fill_horizontal"
            android:text="@string/unknown"
            android:textSize="19dp"
            android:textStyle="bold" />

        <View
            android:id="@+id/detail_separator1"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_below="@id/forecast_weather_icon"
            android:background="#CFD8DC" />

        <TextView
            android:id="@+id/forecast_summary_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/detail_separator1"
            android:layout_gravity="center_vertical"
            android:layout_margin="10dp"
            android:nestedScrollingEnabled="false"
            android:text="@string/unknown"
            android:textSize="16dp" />

    </RelativeLayout>

</android.support.v7.widget.CardView>


text:
using MatterHackers.Agg.UI;
using MatterHackers.PolygonMesh;
using MatterHackers.VectorMath;

namespace MatterHackers.MatterControl.PartPreviewWindow
{
	internal class DeleteUndoCommand : IUndoRedoCommand
	{
		private int deletedIndex;
		private View3DWidget view3DWidget;
		private Matrix4X4 deletedTransform;
		PlatingMeshGroupData deletedPlatingData;

		MeshGroup meshGroupThatWasDeleted;

		public DeleteUndoCommand(View3DWidget view3DWidget, int deletedIndex)
		{
			this.view3DWidget = view3DWidget;
			this.deletedIndex = deletedIndex;
			meshGroupThatWasDeleted = view3DWidget.MeshGroups[deletedIndex];
			deletedTransform = view3DWidget.MeshGroupTransforms[deletedIndex];
			deletedPlatingData = view3DWidget.MeshGroupExtraData[deletedIndex];
		}

		public void Do()
		{
			view3DWidget.MeshGroups.RemoveAt(deletedIndex);
			view3DWidget.MeshGroupExtraData.RemoveAt(deletedIndex);
			view3DWidget.MeshGroupTransforms.RemoveAt(deletedIndex);
			if (view3DWidget.SelectedMeshGroupIndex >= view3DWidget.MeshGroups.Count)
			{
				view3DWidget.SelectedMeshGroupIndex = view3DWidget.MeshGroups.Count - 1;
			}
			view3DWidget.PartHasBeenChanged();
		}

		public void Undo()
		{
			view3DWidget.MeshGroups.Insert(deletedIndex, meshGroupThatWasDeleted);
			view3DWidget.MeshGroupTransforms.Insert(deletedIndex, deletedTransform);
			view3DWidget.MeshGroupExtraData.Insert(deletedIndex, deletedPlatingData);
			view3DWidget.Invalidate();
			view3DWidget.SelectedMeshGroupIndex = view3DWidget.MeshGroups.Count - 1;
		}
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Ubblysoft - venta y desarrollo de software</title>

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

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css">

    <link rel="stylesheet" href="css/magnific-popup.css" type="text/css">

    <link rel="stylesheet" href="css/creative.css" type="text/css">

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

                </button>
                Ubblysoft

                        ¿De que trata?

                        Noticias

                        Contacto

                        Documentos

                        recursos

                        | soporte@ubblysoft.me

Desarrollo y venta de productos online

Desarrollamos mas que simplemente software, vendemos software y productos de calidad!

                Lee mas

Bienvenido a la pagina de noticias UbblySoft

Aca encontraras documentos, recursos y ayuda sobre cualquier producto que hayas adquirido en UbblyHost.

                    Algunos de nuestros productos

Novedades / Noticias

Ubblyhost

Cada dia nos esforzamos mas en nuestra empresa, siempre tratamos de dar lo mejor de nosotros, a continuación podras ver algunos cambios que hemos hecho y errores solucionados.

*Solucionado error que no dejaba subir archivos a nuevos directorios por FTP

*Solucionado el problema que no dejaba conectarse por FTP

*Solucionado problema que no dejaba romper bloques en el servidor minecraft

Cosas por solucionar:

No debes dar /stop al servidor a menos que sea una emergencia, para volver a iniciarlo debes solicitar un inicio por email de soporte

De momento se debe usar un usuario llamado console para ejecutar comandos iniciales ya que la consola web no pudo ser implementada, el mes de Marzo se implementara un panel de control. A pesar de esto, es posible administrar por completo el servidor usando FTP y OP.

Contactanos!

Habla con alguien de nuestro equipo de atención al cliente para obtener mas información sobre nosotros y las empresas asociadas con nosotros

+1 631 975 0374

llamada internaciónal a Estados Unidos, nos puedes llamar y dejar tus datos en nuestro buzón de voz y en 24Hrs te contactaremos.

soporte@ubblysoft.me

Obten información por correo sobre nuestros productos y sobre las empresas asociadas con nosotros.


text:
...

Hello from import