text:
namespace ipcz {
namespace {

class RouteEdgeTest : public testing::Test {
 public:
  Ref<RouterLink> CreateLink() {
    // This link does not need to be usable, it just needs to be unique. Hence
    // we create and link two throwaway routers. and return one of their links.
    auto a = MakeRefCounted<Router>();
    auto b = MakeRefCounted<Router>();
    auto [a_link, b_blink] =
        LocalRouterLink::CreatePair(LinkType::kCentral, {a, b});
    return a_link;
  }
};

TEST_F(RouteEdgeTest, Stability) {
  RouteEdge edge;

  // Fresh edges are stable.
  EXPECT_TRUE(edge.is_stable());

  // Edges with only a primary link are stable.
  auto link = CreateLink();
  edge.SetPrimaryLink(link);
  EXPECT_TRUE(edge.is_stable());
  edge.ReleasePrimaryLink();

  // Edges with a deferred decaying link are not stable.
  edge.BeginPrimaryLinkDecay();
  EXPECT_FALSE(edge.is_stable());

  // Edges with only a decaying link are not stable. This link will be set to
  // decay immediately due to the deferred decay from above.
  edge.SetPrimaryLink(link);
  EXPECT_FALSE(edge.is_stable());

  // Edges with both a primary and decaying link are still not stable.
  auto new_link = CreateLink();
  edge.SetPrimaryLink(new_link);
  EXPECT_FALSE(edge.is_stable());

  // But once the decaying link is dropped, the edge is stable again.
  edge.ReleaseDecayingLink();
  EXPECT_TRUE(edge.is_stable());
}

TEST_F(RouteEdgeTest, LinkSelection) {
  RouteEdge edge;
  auto first_link = CreateLink();
  auto second_link = CreateLink();

  // With no primary or decaying link, the primary link is the default choice.
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(0)));

  // Now with only a primary link, that link is always selected.
  edge.SetPrimaryLink(first_link);
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(0)));
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(5)));
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(10)));

  // With a decaying link but no outgoing sequence length limit, the decaying
  // link is always selected.
  edge.BeginPrimaryLinkDecay();
  edge.SetPrimaryLink(second_link);
  EXPECT_EQ(second_link, edge.primary_link());
  EXPECT_EQ(first_link, edge.decaying_link());
  EXPECT_TRUE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(0)));
  EXPECT_TRUE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(5)));
  EXPECT_TRUE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(10)));

  // Finally, with a limit on the decaying link's sequence length, selection now
  // depends on the specific SequenceNumber being transmitted.
  edge.set_length_to_decaying_link(SequenceNumber(5));
  EXPECT_TRUE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(0)));
  EXPECT_TRUE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(4)));
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(5)));
  EXPECT_FALSE(edge.ShouldTransmitOnDecayingLink(SequenceNumber(10)));
}

TEST_F(RouteEdgeTest, FinishDecay) {
  RouteEdge edge;
  auto link = CreateLink();
  edge.SetPrimaryLink(link);
  edge.BeginPrimaryLinkDecay();

  // Decay cannot finish until inbound and outbound sequence length limits are
  // set.
  EXPECT_FALSE(edge.MaybeFinishDecay(SequenceNumber(0), SequenceNumber(0)));
  edge.set_length_to_decaying_link(SequenceNumber(0));
  EXPECT_FALSE(edge.MaybeFinishDecay(SequenceNumber(0), SequenceNumber(0)));
  edge.set_length_from_decaying_link(SequenceNumber(0));
  EXPECT_TRUE(edge.decaying_link());
  EXPECT_TRUE(edge.MaybeFinishDecay(SequenceNumber(0), SequenceNumber(0)));
  EXPECT_FALSE(edge.decaying_link());

  // Decay also cannot finish while the sequence length limits have not yet
  // been met by messages transmitted and received over the decaying link.
  edge.SetPrimaryLink(link);
  edge.BeginPrimaryLinkDecay();
  edge.set_length_to_decaying_link(SequenceNumber(2));
  edge.set_length_from_decaying_link(SequenceNumber(4));
  EXPECT_FALSE(edge.MaybeFinishDecay(SequenceNumber(1), SequenceNumber(3)));
  EXPECT_FALSE(edge.MaybeFinishDecay(SequenceNumber(1), SequenceNumber(4)));
  EXPECT_TRUE(edge.decaying_link());
  EXPECT_TRUE(edge.MaybeFinishDecay(SequenceNumber(2), SequenceNumber(4)));
  EXPECT_FALSE(edge.decaying_link());
}

}  // namespace
}  // namespace ipcz


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Coupon_Generator
{
    /// <summary>
    /// Interaction logic for Coupon.xaml
    /// </summary>
    public partial class Coupon : UserControl
    {
        #region Fields/Properties
        CouponSettings m_couponSettings;
        public CouponSettings CouponSettings
        {
            get { return m_couponSettings; }
            set
            {
                m_couponSettings = value;
                UpdateCoupon();
            }
        }

        int m_couponID;
        public int CouponID
        {
            get { return m_couponID; }
            set
            {
                m_couponID = value;

                if (m_couponSettings != null)
                {
                    if (m_couponSettings.CouponIDEnabled)
                    {
                        couponIDTextBlock.Text = m_couponID.ToString();
                        couponIDTextBlock.Margin = m_couponSettings.CouponIDMargin;
                        couponIDTextBlock.HorizontalAlignment = m_couponSettings.CouponIDHorizontalAlignment;
                        couponIDTextBlock.VerticalAlignment = m_couponSettings.CouponIDVerticalAlignment;
                    }
                    else couponIDTextBlock.Text = "";
                }
            }
        }
        #endregion

        public Coupon()
        {
            Loaded += Coupon_Loaded;
            InitializeComponent();
        }

        void Coupon_Loaded(object sender, RoutedEventArgs e)
        {
            //m_couponSettings = new CouponSettings();
            //m_couponID = 1;

            UpdateCoupon();
        }

        public void UpdateCoupon()
        {
            if (m_couponSettings == null) return;

            // Background
            Background = new SolidColorBrush(m_couponSettings.BackgroundColor);

            if (m_couponSettings.ImageLocation != null)
                backgroundImage.Source = new BitmapImage(m_couponSettings.ImageLocation);
            else backgroundImage.Source = new BitmapImage();

            // Border
            BorderBrush = new SolidColorBrush(m_couponSettings.BorderColor);
            BorderThickness = new Thickness(m_couponSettings.BorderThickness);

            // Header
            if (m_couponSettings.HeaderEnabled)
            {
                headerTextBlock.Text = m_couponSettings.HeaderText;
                headerTextBlock.Margin = m_couponSettings.HeaderMargin;
                headerTextBlock.HorizontalAlignment = m_couponSettings.HeaderHorizontalAlignment;
                headerTextBlock.VerticalAlignment = m_couponSettings.HeaderVerticalAlignment;
            }
            else headerTextBlock.Text = "";

            // Body
            if (m_couponSettings.BodyEnabled)
            {
                bodyTextBlock.Text = m_couponSettings.BodyText;
                bodyTextBlock.Margin = m_couponSettings.BodyMargin;
                bodyTextBlock.HorizontalAlignment = m_couponSettings.BodyHorizontalAlignment;
                bodyTextBlock.VerticalAlignment = m_couponSettings.BodyVerticalAlignment;
            }
            else bodyTextBlock.Text = "";

            // Expiry Date
            if (m_couponSettings.ExpiryDateEnabled)
            {
                string dateText = "";
                if (string.IsNullOrEmpty(m_couponSettings.ExpiryText) ||
                    string.IsNullOrWhiteSpace(m_couponSettings.ExpiryText))
                    dateText = m_couponSettings.ExpiryDate.ToLongDateString();
                else
                    dateText = m_couponSettings.ExpiryText + " " + m_couponSettings.ExpiryDate.ToLongDateString();

                switch (m_couponSettings.ExpiryDateCase)
                {
                    case ExpiryDateCase.AllUpper: expiryDateTextBlock.Text = dateText.ToUpper();    break;
                    case ExpiryDateCase.AllLower: expiryDateTextBlock.Text = dateText.ToLower();    break;
                    case ExpiryDateCase.Default:
                    default:
                        expiryDateTextBlock.Text = dateText;
                        break;
                }

                expiryDateTextBlock.Margin = m_couponSettings.ExpiryDateMargin;
                expiryDateTextBlock.HorizontalAlignment = m_couponSettings.ExpiryDateHorizontalAlignment;
                expiryDateTextBlock.VerticalAlignment = m_couponSettings.ExpiryDateVerticalAlignment;
            }
            else expiryDateTextBlock.Text = "";
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*!
 * \file
 * \brief Texture filtering performance tests.
 *//*--------------------------------------------------------------------*/

#include "es3pTextureFilteringTests.hpp"
#include "es3pTextureCases.hpp"
#include "tcuMatrixUtil.hpp"

#include "glwEnums.hpp"

using std::string;

namespace deqp
{
namespace gles3
{
namespace Performance
{

TextureFilteringTests::TextureFilteringTests (Context& context)
	: TestCaseGroup(context, "filter", "Texture Filtering Performance Tests")
{
}

TextureFilteringTests::~TextureFilteringTests (void)
{
}

void TextureFilteringTests::init (void)
{
	static const struct
	{
		const char*	name;
		deUint32	internalFormat;
	} texFormats[] =
	{
		{ "rgb565",		GL_RGB565	},
		{ "rgba8",		GL_RGBA8	},
		{ "rg16f",		GL_RG16F	},
		{ "rgba16f",	GL_RGBA16F	}
	};
	static const struct
	{
		const char*	name;
		deUint32	filter;
		bool		minify;
	} cases[] =
	{
		{ "nearest",				GL_NEAREST,					true	},
		{ "nearest",				GL_NEAREST,					false	},
		{ "linear",					GL_LINEAR,					true	},
		{ "linear",					GL_LINEAR,					false	},
		{ "nearest_mipmap_nearest",	GL_NEAREST_MIPMAP_NEAREST,	true	},
		{ "nearest_mipmap_linear",	GL_NEAREST_MIPMAP_LINEAR,	true	},
		{ "linear_mipmap_nearest",	GL_LINEAR_MIPMAP_NEAREST,	true	},
		{ "linear_mipmap_linear",	GL_LINEAR_MIPMAP_LINEAR,	true	}
	};

	tcu::Mat3 minTransform	= tcu::translationMatrix(tcu::Vec2(-0.3f, -0.6f)) * tcu::Mat3(tcu::Vec3(1.7f, 2.3f, 1.0f));
	tcu::Mat3 magTransform	= tcu::translationMatrix(tcu::Vec2( 0.3f,  0.4f)) * tcu::Mat3(tcu::Vec3(0.3f, 0.2f, 1.0f));

	for (int caseNdx = 0; caseNdx < DE_LENGTH_OF_ARRAY(cases); caseNdx++)
	{
		for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(texFormats); formatNdx++)
		{
			deUint32	format		= texFormats[formatNdx].internalFormat;
			deUint32	minFilter	= cases[caseNdx].filter;
			deUint32	magFilter	= (minFilter == GL_NEAREST || minFilter == GL_LINEAR) ? minFilter : GL_LINEAR;
			deUint32	wrapS		= GL_REPEAT;
			deUint32	wrapT		= GL_REPEAT;
			int			numTextures	= 1;
			bool		minify		= cases[caseNdx].minify;
			string		name		= string(cases[caseNdx].name) + (minify ? "_minify_" : "_magnify_") + texFormats[formatNdx].name;

			addChild(new Texture2DRenderCase(m_context, name.c_str(), "", format, wrapS, wrapT, minFilter, magFilter, minify ? minTransform : magTransform, numTextures, true /* pot */));
		}
	}
}

} // Performance
} // gles3
} // deqp


text:
(function($) {
		$.fn.jqueryzoom = function(options) {
			var settings = {
				xzoom: 200,			//zoomed width default width
				yzoom: 200,			//zoomed div default width
				offset: 10,			//zoomed div default offset
				position: "right"	//zoomed div default position,offset position is to the right of the image
			};

			if(options)
				$.extend(settings, options);

			var noalt ='';

			$(this).hover(function() {
				var imageLeft = $(this).get(0).offsetLeft;
				var imageTop =  $(this).get(0).offsetTop;
				var imageWidth = $(this).get(0).offsetWidth;
				var imageHeight = $(this).get(0).offsetHeight;

				noalt = $(this).attr("alt");
				var bigimage = noalt;
				$(this).attr("alt", '');

				if($("div.zoomdiv").get().length == 0)
					$(this).after("

");

				if(settings.position == "right")
					leftpos = imageLeft + imageWidth + settings.offset;
				else
					leftpos = imageLeft - settings.xzoom - settings.offset;

				$("div.zoomdiv").css({top: imageTop,left: leftpos});
				$("div.zoomdiv").width(settings.xzoom);
				$("div.zoomdiv").height(settings.yzoom);
				$("div.zoomdiv").show();

				$(document.body).mousemove(function(e) {
					var bigwidth = $(".bigimg").get(0).offsetWidth;
					var bigheight = $(".bigimg").get(0).offsetHeight;
					var scaley ='x';
					var scalex= 'y';

					if(isNaN(scalex)|isNaN(scaley)) {
						var scalex = Math.round(bigwidth/imageWidth) ;
						var scaley = Math.round(bigheight/imageHeight);
					}

					mouse = new MouseEvent(e);

					scrolly = mouse.y - imageTop - ($("div.zoomdiv").height()*1/scaley)/2 ;
					$("div.zoomdiv").get(0).scrollTop = scrolly * scaley  ;
					scrollx = mouse.x - imageLeft - ($("div.zoomdiv").width()*1/scalex)/2 ;
					$("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ;
				});
			}, function() {
				$(this).attr("alt", noalt);
				$("div.zoomdiv").hide();
				$(document.body).unbind("mousemove");
				$(".lenszoom").remove();
				$("div.zoomdiv").remove();
			});
		}
})(jQuery);

function MouseEvent(e) {
	this.x = e.pageX
	this.y = e.pageY
}


text:
:host {

  /** Force layout boundary **/
  display: block;
  overflow: hidden;
  box-sizing: border-box;

  /*
  Fundamentally, translateZ(0) and other hacks indirectly cause layer
  creation but lack the context about why layer is needed, and what
  the user intends to do with it. With will-animate, we have more intent
  from the content author, which lets us do more "right" things --- for
  instance, width animation gives us a good indication that the content
  will change every frame, which can be a strong signal to not retain the
  texture for the layer after it is created.
  */

   /*will-animate: transform; */

  /** Hint a region is likely to change **/
  /** Spec: http://tabatkins.github.io/specs/css-will-change/ **/
  /** Blink: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/M62y2nKZ-gE **/
  /** FF support: https://bug940842.bugzilla.mozilla.org/attachment.cgi?id=8367378 **/
  will-change: contents;

  /** Promote to a dedicated layer - used until will-change more broadly available **/
  -webkit-transform: translatez(0);
  -moz-transform: translatez(0);
  -ms-transform: translatez(0);
  -o-transform: translatez(0);
  transform: translatez(0);

  /** Base styling **/
  width: 300px;
  height: 300px;
  background: yellow;
}


text:
global check_cpuid
global check_long_mode

extern early_error

section .init
bits 32
check_cpuid:                ;check if the cpuid instruction is available
    ;move flags register to eax
    pushfd
    pop eax

    ;copy eax and flip bit 21
    mov ecx, eax
    xor eax, 1 << 21

    ;move eax to flags register
    push eax
    popfd

    ;move flags register back to eax
    pushfd
    pop eax

    ;check if the value changed
    cmp eax, ecx
    je .no_cpuid
    ret
.no_cpuid:
    mov eax, no_long_mode_error
    jmp early_error

check_long_mode:            ;check if long mode is supported
    ;check for extended processor information
    mov eax, 1 << 31
    cpuid                   ;checks for the highest supported argument
    cmp eax, 1 << 31 | 1 << 0 ;if the argument is supported
    jb .no_long_mode        ;the argument is not supported -> no long mode

    mov eax, 1 << 31 | 1 << 0 ;argument for extended information
    cpuid
    test edx, 1 << 29       ;if bit 29 is set, long mode is supported
    jz .no_long_mode
    ret
.no_long_mode:
    mov eax, no_long_mode_error
    jmp early_error

no_long_mode_error:
    db "Your CPU does not support 64 Bit mode. That means it's not possible to use this OS on your computer. Aborting...",0


text:
\documentclass[letterpaper, 10pt]{article}

\usepackage{hyperref}
\usepackage{soul}

\begin{document}
first page \clearpage \clearpage
second page \ul{\url{http://www.imdb.com/title/tt1843866/}}
more text
\end{document}


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

public class TouchInput : MonoBehaviour
{
    float jumpForce;
    bool isJumping = false;

    bool isPerimeter = false;

    bool isMovingLeft = false;

    bool isFlipped = false;

    float numJumps = 0;

    public AudioClip jumpSound;

    Popup pausePopup;

    Timer currTime;

    float moveSpeed = 3;

    float waitTime;

    Animator playerAnimation;

    // Use this for initialization
    void Start()
    {
        jumpForce = 4;

        // Disables Built-in Gravity on player
        this.GetComponent<Rigidbody2D>().gravityScale = 0;
        // Disables Built-in Rotation on player
        this.GetComponent<Rigidbody2D>().freezeRotation = true;

        GameObject popupController = GameObject.Find("PopupController");
        pausePopup = popupController.GetComponent<Popup>();

        // Insantiate timer obj
        GameObject timer = GameObject.Find("timer");
        currTime = timer.GetComponent<Timer>();

        // Player animation
        playerAnimation = this.GetComponent<Animator>();

    }

    // Update is called once per frame
    void Update()
    {

        //Check currTime. If it is 150 then increase speed by 1. Increase speed by 1 at every 50
        if(((int)currTime.time >= 50.0f) && ((int)currTime.time % 50 == 0) && moveSpeed <= 5)
        {
            if (Time.time > waitTime)
            {
                moveSpeed++;
                Debug.Log(moveSpeed);
                waitTime = Time.time + 1.0f;
            }
        }

        if (isMovingLeft)
        {
            // Moves the player to the left.
            transform.Translate(Vector2.left * Time.deltaTime * moveSpeed);

            // Flip player
            if (isFlipped == false)
            {
                Vector3 newScale = transform.localScale;
                newScale.x *= -1;
                transform.localScale = newScale;

                isFlipped = true;
            }
        }
        else
        {
            // Moves the player to the right.
            transform.Translate(Vector2.right * Time.deltaTime * moveSpeed);

            // Flip player
            if (isFlipped)
            {
                Vector3 newScale = transform.localScale;
                newScale.x *= -1;
                transform.localScale = newScale;

                isFlipped = false;
            }
        }

        // If the player has touched and released the screen and the they are on the ground then the player jumps.
        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began && IsJumping == false)
        {
            if (!(pausePopup.Paused))
            {
                if (isPerimeter == false)
                {

                    numJumps++;

                    if (numJumps == 2)
                    {
                        this.GetComponent<Rigidbody2D>().velocity = Vector2.zero;
                    }
                    this.GetComponent<Rigidbody2D>().AddForce(transform.up * jumpForce, ForceMode2D.Impulse);

                    IsJumping = true;

                    GetComponent<AudioSource>().PlayOneShot(jumpSound, 1);
                }
                else
                {
                    if (isMovingLeft == true)
                    {
                        isMovingLeft = false;
                    }
                    else
                    {
                        isMovingLeft = true;
                    }
                    GameObject.Find("Cloudus 456").GetComponent<obstacleGenerator>().ChangeDirection(isMovingLeft);
                    isPerimeter = false;
                }
            }
        }

        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended)
        {
            if (numJumps != 2)
            {
                IsJumping = false;
            }
        }

        // For testing through computer.
        if (Input.GetKeyDown(KeyCode.W) && IsJumping == false)
        {
            if (!(pausePopup.Paused))
            {
                if (isPerimeter == false)
                {

                    numJumps++;

                    if (numJumps == 2)
                    {
                        this.GetComponent<Rigidbody2D>().velocity = Vector2.zero;
                    }
                    this.GetComponent<Rigidbody2D>().AddForce(transform.up * jumpForce, ForceMode2D.Impulse);

                    IsJumping = true;

                    GetComponent<AudioSource>().PlayOneShot(jumpSound, 1);
                }
                else
                {
                    if (isMovingLeft == true)
                    {
                        isMovingLeft = false;
                    }
                    else
                    {
                        isMovingLeft = true;
                    }
                    GameObject.Find("Cloudus 456").GetComponent<obstacleGenerator>().ChangeDirection(isMovingLeft);
                    isPerimeter = false;
                }
            }
        }

        if (Input.GetKeyUp(KeyCode.W))
        {
            if (numJumps != 2)
            {
                IsJumping = false;
            }
        }

        if (Input.GetKey(KeyCode.Escape))
        {
            if(!pausePopup.Dead)
                pausePopup.Pause();
        }

        if (isJumping)
        {
            playerAnimation.speed = 0;
        }
    }

    // When the player has touched the floor then they are able to jump again.
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.name == "Cloudus 456")
        {
            IsJumping = false;
            numJumps = 0;
            playerAnimation.speed = 1.0f;
        }
    }

    public bool IsInPerimeter
    {
        get
        {
            return isPerimeter;
        }

        set
        {
            isPerimeter = value;
        }
    }

    public bool IsJumping
    {
        get
        {
            return isJumping;
        }

        set
        {
            isJumping = value;
        }
    }

    public float NumJumps
    {
        get
        {
            return numJumps;
        }

        set
        {
            numJumps = value;
        }
    }
}


text:
using System.Collections.Generic;
using Microsoft.Xrm.Client;
using Microsoft.Xrm.Portal.Runtime;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;

namespace Microsoft.Xrm.Portal.Web.Providers
{
	public class EntityWebsiteProvider : IEntityWebsiteProvider // MSBug #120034: Won't seal, inheritance is used extension point.
	{
		public virtual Entity GetWebsite(OrganizationServiceContext context, Entity entity)
		{
			context.ThrowOnNull("context");

			if (entity == null)
			{
				return null;
			}

			var entitiesWithoutWebsites = new Dictionary<string, Relationship>
			{
				{ "adx_weblink", "adx_weblinkset_weblink".ToRelationship() },
			};

			Relationship hasWebsiteRelationship;

			if (entitiesWithoutWebsites.TryGetValue(entity.LogicalName, out hasWebsiteRelationship))
			{
				return GetWebsite(context, entity.GetRelatedEntity(context, hasWebsiteRelationship));
			}

			var lookup = new Dictionary<string, Relationship>
			{
				{ "adx_weblinkset", "adx_website_weblinkset".ToRelationship() },
				{ "adx_webpage", "adx_website_webpage".ToRelationship() },
				{ "adx_webfile", "adx_website_webfile".ToRelationship() },
				{ "adx_sitemarker", "adx_website_sitemarker".ToRelationship() },
				{ "adx_pagetemplate", "adx_website_pagetemplate".ToRelationship() },
				{ "adx_contentsnippet", "adx_website_contentsnippet".ToRelationship() },
			};

			Relationship websiteRelationship;

			if (lookup.TryGetValue(entity.LogicalName, out websiteRelationship))
			{
				return entity.GetRelatedEntity(context, websiteRelationship);
			}

			return null;
		}
	}
}


text:
layout: page
title: Say Hello
permalink: /contact/
---

<div class="py2">
  <form action="https://formspree.io/{{ site.email }}" method="POST" class="form-stacked form-light">
    <input type="text" name="_replyto" class="input mobile-block" placeholder="Email Address">
    <textarea type="text" name="content" class="input mobile-block" rows="5" placeholder="What would you like to say?"></textarea>
    <input type="hidden" name="_next" value="{{ site.baseurl }}/thanks.html" />
    <input type="hidden" name="_subject" value="New submission!" />
    <input type="text" name="_gotcha" style="display:none" />
    <input type="submit" class="button button-blue button-big mobile-block" value="Say Hello">
  </form>
</div>


text:
using Microsoft.Uii.HostedApplicationToolkit.AutomationHosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace Microsoft.USD.ComponentLibrary.Adapters
{
    /// <summary>
    /// HAT Base adapter is to be configured as a USD Hosted Control
    /// The Automation XML is not populated
    /// Instead create a <HAT> </HAT> tag in the Extension XML and include the initstring for HAT inside that
    /// </summary>
    public class HATBase : SetParentBase
    {
        /// <summary>
        /// UII Constructor
        /// </summary>
        /// <param name="appID">ID of the application</param>
        /// <param name="appName">Name of the application</param>
        /// <param name="initString">Initializing XML for the application</param>
        public HATBase(Guid appID, string appName, string initString)
            : base(appID, appName, initString)
        {

        }

        AutomationAdapter _AutomationAdapter = new AutomationAdapter();
        protected override void DesktopReady()
        {
            base.DesktopReady();

            AddImplicitAction(AutomationAdapter.DdaActionFindControl);
            AddImplicitAction(AutomationAdapter.DdaActionGetControlValue);
            AddImplicitAction(AutomationAdapter.DdaActionSetControlValue);
            AddImplicitAction(AutomationAdapter.DdaActionExecuteControlAction);
            AddImplicitAction(AutomationAdapter.DdaActionAddDoActionEventTrigger);
            AddImplicitAction(AutomationAdapter.DdaActionRemoveDoActionEventTrigger);
            this.WindowAttached += HATBase_WindowAttached;
        }

        protected override void DoAction(Uii.Csr.RequestActionEventArgs args)
        {
            // EXAMPLE ACTION
            //if (args.Action.Equals("Test1", StringComparison.InvariantCultureIgnoreCase))
            //{
            //    string param = "<DdaParameters><ControlName>UIA:3</ControlName><ControlValue></ControlValue><Data></Data></DdaParameters>";
            //    RequestActionEventArgs raArgs = new RequestActionEventArgs(args.SessionId, this.ApplicationName, AutomationAdapter.DdaActionFindControl, param);
            //    bool ret = _AutomationAdapter.DoAction(actions[AutomationAdapter.DdaActionFindControl], raArgs);
            //    Trace.WriteLine("RET=" + raArgs.ActionReturnValue);
            //    ret = _AutomationAdapter.DoAction(actions[AutomationAdapter.DdaActionExecuteControlAction], raArgs);
            //    Trace.WriteLine("RET=" + raArgs.ActionReturnValue);
            //    //System.Threading.Thread run = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(RunCalcCallback));
            //    //run.Start("45/98*324-78+541");

            //    //RunCalc("45/98*324-78+541");
            //}

            base.DoAction(args);
        }

        private XmlDocument CaptureHATInitString()
        {
            XmlNode nodeBindings = InitString.SelectSingleNode(".//HAT");
            if (nodeBindings != null)
            {
                XmlDocument doc = new XmlDocument();
                doc.AppendChild(doc.ImportNode(nodeBindings.FirstChild, true));
                return doc;
            }
            return null;
        }

        protected virtual void HATBase_WindowAttached(object sender, EventArgs e)
        {
            _AutomationAdapter.SessionWorkItem = AppHostWorkItem;
            _AutomationAdapter.DdaApplicationObject = win.Handle;
            _AutomationAdapter.Name = ApplicationName;
            _AutomationAdapter.ApplicationInitString = CaptureHATInitString().OuterXml;
            _AutomationAdapter.AdapterFireRequestActionEvent += DoAction;
            _AutomationAdapter.AdapterContextChangedEvent += _AutomationAdapter_AdapterContextChangedEvent;
            _AutomationAdapter.Initialize();
        }

        void _AutomationAdapter_AdapterContextChangedEvent(Uii.Csr.Context newContext)
        {
            FireChangeContext(new Uii.Csr.ContextEventArgs(newContext));
        }
    }
}


text:
/**
 *
 * This program generates square waves as 16bit mono PCM samples and outputs
 * them to stdout.
 *
 * Due to rounding errors this code will only produce a close approximation
 * of the tone frequency specified. The deviation is inversely proportional
 * to the sampling rate.
 *
 *
 * @file		audio-hello-world.c
 * @author		ToneGenerated
 * @contact		JonRuttan@gmail.com
 * @copyright	Copyright (C) 2012 Jon Ruttan
 * @license		Apache License, Version 2.0
 * @version	0.1.0
 * @date		2012-03-18
 *
 */

#include <stdio.h>
#include <stdlib.h>

int gen_square_wave(int sample_rate, int frequency, int duration, float amplitude)
{
	/*
		Given the input parameters generates square waves and outputs them
		to stdout.

		Parameters:

		- `sample_rate`: The audio hardware's sampling rate in Hz
			(samples/sec.)
		- `frequency`: The square wave frequency in Hz (cycles/sec.)
		- `duration`: The duration of the square wave tone in ms.
		- `amplitude`: The amplitude of the square wave represented as a
			fraction of the maximum output volume.

	*/

	// Calculate the total number of samples required to produce a tone of
	// the duration specified.
	int samples = sample_rate * duration / 1000;

	// Calculate the number of samples in each half of the tone's cycle.
	int tone_midpoint = sample_rate / frequency / 2;

	// Calculate the maximum (negative) sample value.
	int sample = -(1 << (16 - 1)) * amplitude;

	// Iterate over the range of samples we've calculated are required.
	int i;
	for(i=0; i < samples; i++)
	{
		// Each time the iterator value reaches a half-cycle, change the
		// sample's sign, from the positive to the negative domain and
		// vice-versa.
		if(i % tone_midpoint == 0)
			sample = -sample;

		// Output the sample value to stdout as a little-endian 16bit integer
		printf("%c%c", sample & 0xff, (sample >> 8) & 0xff);
	}

	return 0;
}

int main(int argc, char *argv[])
{
	gen_square_wave(44100, 440, 1000, 0.3);
	return 0;
}


text:
<?php

/* @var $this \yii\web\View */
?>

				<?= \skeeks\cms\cmsWidgets\text\TextCmsWidget::widget([
				'namespace'         => 'text-footer-left',
				'text'              => <<<HTML

О компании

Нас можно найти по адресу.

				<address>

							г. Москва,

							г. Зеленоград 2005-29

							Телефон: +7 (495) 722 28-73

							info@skeeks.com

				</address>

HTML
,
			]); ?>

				<?= \skeeks\cms\cmsWidgets\contentElements\ContentElementsCmsWidget::widget([
					'namespace'         => 'ContentElementsCmsWidget-footer',
					'viewFile'          => '@template/widgets/ContentElementsCmsWidget/articles-footer',
					'label'             => 'Новости и статьи',
					'enabledCurrentTree'=> \skeeks\cms\components\Cms::BOOL_N,
					'limit'             => 4,
				])?>

				<?= \skeeks\cms\cmsWidgets\treeMenu\TreeMenuCmsWidget::widget([
					'namespace'      => 'menu-footer-2',
					'viewFile'       => '@template/widgets/TreeMenuCmsWidget/menu-footer.php',
					'label'          => 'Меню',
					'level'          => '1',
				]); ?>

				<?= \skeeks\cms\cmsWidgets\text\TextCmsWidget::widget([
				'namespace'         => 'text-footer-social-1',
				'text'              => <<<HTML

Социальные сети

Вступайте в наши группы и соц сети.

HTML
,
			]); ?>

Разработка сайта — SkeekS.com (SkeekS CMS Yii2)

			<?= \skeeks\cms\cmsWidgets\text\TextCmsWidget::widget([
				'namespace'         => 'text-footer-rights',
				'text'              => <<


text:
[![Build Status](https://travis-ci.org/daylerees/container-debug.png)](https://travis-ci.org/daylerees/container-debug.png)

# Container Debug

The container debug command can be used to inspect the Laravel four service container. It's similar to the container:debug from the Symfony framework. It will show a list of all bindings, their types, values if scalar, and the time it takes to resolve each binding.

## Installation

Add the following dependency to your Laravel project:

    "daylerees/container-debug": "4.0.*"

Now run...

    composer update

to download the package. Now add the service provider to your project configuration at `app/config/app.php`.

    'providers' => array(
        'Illuminate\Foundation\Providers\ArtisanServiceProvider',
        'Illuminate\Auth\AuthServiceProvider',
        'Illuminate\Cache\CacheServiceProvider',
        'Illuminate\Foundation\Providers\CommandCreatorServiceProvider',
        --- more ---
        'DayleRees\ContainerDebug\ServiceProvider'
    ),

Now you can execute the command using the Artisan CLI tool.

## Usage

    php artisan container:debug

You will see an output similar to the following.

    +--------------------------+------------------------------------------------------------+----------------------+
    | Identifier               | Service                                                    | Resolution time (ms) |
    +--------------------------+------------------------------------------------------------+----------------------+
    | artisan                  | Illuminate\Console\Application                             | 0.011                |
    | asset.publisher          | Illuminate\Foundation\AssetPublisher                       | 0.020                |
    | auth                     | Illuminate\Auth\AuthManager                                | 0.023                |
    | auth.reminder            | Unable to resolve service.                                 | N/A                  |
    | auth.reminder.repository | Unable to resolve service.                                 | N/A                  |
    | cache                    | Illuminate\Cache\CacheManager                              | 0.044                |
    | command.asset.publish    | Illuminate\Foundation\Console\AssetPublishCommand          | 0.058                |
    | command.auth.reminders   | Illuminate\Auth\Console\MakeRemindersCommand               | 0.029                |
    | command.cache.clear      | Illuminate\Cache\Console\ClearCommand                      | 0.023                |
    | command.dump-autoload    | Illuminate\Foundation\Console\AutoloadCommand              | 0.022                |
    | command.environment      | Illuminate\Foundation\Console\EnvironmentCommand           | 0.023                |
    | command.key.generate     | Illuminate\Foundation\Console\KeyGenerateCommand           | 0.022                |
    | env                      | <string> "production"                                      | 0.017                |
    | events                   | Illuminate\Events\Dispatcher                               | 0.018                |
    | exception                | Illuminate\Exception\Handler                               | 0.019                |
    | exception.debug          | Illuminate\Exception\WhoopsDisplayer                       | 0.018                |
    +--------------------------+------------------------------------------------------------+----------------------+

The first column contains the identifier for the service within the IoC container.

The second column contains information about the service which depends on its type:
- (Scalar Value) The type and value. e.g <string> "foo"
- (Non Scalar Value) The type of the value. e.g <array>
- (Object) The class name of the object. e.g DateTime

If an exception is thrown when the service is resolved, then the column will show 'Unable to resolve service.'.

The third column displays the time taken to resolve the service from the IoC container in milliseconds.

## Possible Uses

- Quick lookup of container objects : php artisan container:debug | grep "mail"
- Find which classes are represented by Facades to container objects.
- Diagnose performance issues by studying resolution times of container objects.

Enjoy, and as always, star the repo and tell your friends!


text:
/**
 * Created by Evgeniy_Generalov on 10/28/2016.
 */
"use strict";
var ProxyExpectation_1 = require("../expectation/ProxyExpectation");
function proxy(options) {
    return new ProxyExpectation_1.ProxyExpectation(options);
}
exports.proxy = proxy;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJveHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xpZW50L21vY2svcHJveHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7O0FBR0gsb0VBQWlFO0FBR2pFLGVBQXNCLE9BQW9CO0lBQ3hDLE1BQU0sQ0FBQyxJQUFJLG1DQUFnQixDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQ3ZDLENBQUM7QUFGRCxzQkFFQyJ9


text:
> Test for special uppercase characters.
> For example French has these uppercase letters `Ê`, `À`, `Ė`, `Ç`, etc.
> More information: <https://stackoverflow.com/a/4052294/7149816>.

- Éxecute une commande (exec a cmd in French):

`command`


text:
module Spree
  module Api
    ProductsController.class_eval do
      # Push your product with interface name and id. When the product doesn't exist, it gets created, otherwise it gets updated.
      # Noteable attributes:
      # - interface_name: string that identifies your system
      # - id: the id in your system
      def push
        authorize! :push, Product
        params[:product][:available_on] ||= Time.now
        set_up_shipping_category
        # check if interfacing attributes are available
        unless params[:interface_name] && params[:id]
          render :text => { :exception => 'interface_name and/or id params missing' }.to_json, :status => 422 and return
        end
        ia = Spree::InterfaceAttribute.where(interfaceable_type: Spree::Product, interface_name: params[:interface_name], name: 'id', value: params[:id]).first
        if ia
          @product = ia.interfaceable
          @product.update_attributes(product_params)
        else
          @product = Spree::Product.new(product_params)
        end

        if @product.save
          variants_params.each do |variant_attribute|
            # make sure the product is assigned before the options=
            @product.variants.create({ product: @product }.merge(variant_attribute))
          end

          option_types_params.each do |name|
            option_type = OptionType.where(name: name).first_or_initialize do |option_type|
              option_type.presentation = name
              option_type.save!
            end

            @product.option_types << option_type unless @product.option_types.include?(option_type)
          end

          # update product properties ([{'name': '', 'value': },{'name': '', 'value': }])
          Spree::ProductPropertyImporter.import(@product,properties_params)
          # update product taxon
          Spree::ProductTaxonImporter.import(@product,params[:product][:categ_id])

          Spree::InterfaceAttribute.find_or_create_by(interfaceable: @product, interface_name: params[:interface_name], name: 'id', value: params[:id])
          # schedule update of images
          RetrieveImagesFromThrWorker.perform_async(@product.id, images_params)

          respond_with(@product, :status => 201, :default_template => :show, :location => api_products_url)
        else
          invalid_resource!(@product)
        end
      end

      # Push products in bulk. When pushing a lot of products at once, it is wiser to make one big call to avoid the overhead of multiple single product calls.
      # This method expects an array of products.
      def push_bulk
        authorize! :push_bulk, Product
        unless params[:interface_name] && params[:products]
          render :text => { :exception => 'interface_name and/or products param missing' }.to_json, :status => 422 and return
        end

        params[:products].each do |product_parameters|
          UpdateProductWorker.perform_async(params[:interface_name], product_parameters)
        end
        render :text => { :message => "Product bulk push successful. This message doesn't mean that everything went fine, only that everything is processed." }.to_json, :status => 201
      end

      # Retract the product from the site.
      # Noteable attributes:
      # - interface_name: string that identifies your system
      # - id: the id in your system
      def retract
        ia = Spree::InterfaceAttribute.where(interfaceable_type: Spree::Product, interface_name: params[:interface_name], name: 'id', value: params[:id]).first
        unless ia
          raise ActiveRecord::RecordNotFound
        end
        @product = find_product(ia.interfaceable_id)
        authorize! :destroy, @product
        @product.destroy
        respond_with(@product, :status => 204, :location => api_products_url)
      end

      # Receive stock for a product
      # Noteable attributes:
      # - interface_name: string that identifies your system
      # - id: the id in your system
      # - quantity: the quantity you whish to receive
      def receive
        authorize! :receive, Product
        render :text => { :exception => 'quantity parameter missing' }.to_json, :status => 422 and return unless params[:stock_movement][:quantity]
        ia = Spree::InterfaceAttribute.where(interfaceable_type: Spree::Product, interface_name: params[:interface_name], name: 'id', value: params[:id]).first
        unless ia
          raise ActiveRecord::RecordNotFound
        end
        product = find_product(ia.interfaceable_id)
        # important to note is that this limits you to only have 1 stock location
        params[:stock_movement][:stock_item] = product.stock_items.first
        @stock_movement = Spree::StockMovement.new(quantity: params[:stock_movement][:quantity], stock_item: params[:stock_movement][:stock_item])
        if @stock_movement.save
          render :text => { :message => "Quantity changed by #{@stock_movement.quantity}. Total quantity now #{product.total_on_hand}." }.to_json, :status => 201
        else
          invalid_resource!(@stock_movement)
        end
      end

      private

        def images_params
          params[:product].delete(:images) || []
        end

        def properties_params
          params[:product].delete(:properties) || []
        end
    end
  end
end


text:
.class final synthetic Lcom/android/systemui/-$Lambda$I2vXdvxuaXHgW_yDfz07zk_J_pA$5;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/android/systemui/Dependency$DependencyProvider;

# direct methods
.method private final synthetic $m$0()Ljava/lang/Object;
    .locals 1

    invoke-static {}, Lcom/android/systemui/Dependency;->lambda$-com_android_systemui_Dependency_11556()Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public synthetic constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public final createDependency()Ljava/lang/Object;
    .locals 1

    invoke-direct {p0}, Lcom/android/systemui/-$Lambda$I2vXdvxuaXHgW_yDfz07zk_J_pA$5;->$m$0()Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method


text:
package com.netflix.priam.agent;

import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import java.io.IOException;
import java.util.List;

public interface NodeStatus
{
    public JSONObject info() throws JSONException;

    public boolean isJoined();

    public String getEndpoint();

    public int getExceptionCount();

    public List<String> getLiveNodes();

    public List<String> getMovingNodes();

    public List<String> getJoiningNodes();

    public List<String> getUnreachableNodes();

    public String getOperationMode();

    public String getGossipInfo();

    public int getCompactionThroughput();

    public void invalidateKeyCache() throws Exception;

    public void compact() throws Exception;

    public void decommission() throws Exception;

    public void cleanup() throws Exception;

    public void joinRing() throws IOException;

    public void refresh(List<String> keyspaces) throws Exception;

    public void removeNode(String token) throws Exception;

    public void startThriftServer() throws Exception;

    public void move(String token) throws Exception;

    public void flush() throws Exception;

    public void repair(boolean sequential, boolean localDataCenterOnly) throws Exception;

    public void invalidateRowCache() throws Exception;

    public void stopGossiping() throws Exception;

    public void startGossiping() throws Exception;

    public void stopThriftServer() throws Exception;

    public void drain() throws Exception;
}


text:
package com.ericsson.ei.handlers;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.ericsson.ei.jmespath.JmesPathInterface;
import com.ericsson.ei.mongodbhandler.MongoDBHandler;
import com.ericsson.ei.rules.RulesObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

/**
 * @author evasiba
 * Class for handling event to object map.
 * The map has the event id as key and the value is a list
 * with all the ids of objects that an event has contributed to.
 *
 */
@Component
public class EventToObjectMapHandler {

    static Logger log = (Logger) LoggerFactory.getLogger(ExtractionHandler.class);

    @Value("${event_object_map.collection.name}") private String collectionName;
    @Value("${spring.data.mongodb.database}") private String databaseName;

    private final String listPropertyName = "objects";

    @Autowired
    MongoDBHandler mongodbhandler;

    @Autowired
    JmesPathInterface jmesPathInterface;

    public void setCollectionName(String collectionName) {
        this.collectionName = collectionName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public void setMongodbhandler(MongoDBHandler mongodbhandler) {
        this.mongodbhandler = mongodbhandler;
    }

    public void setJmesPathInterface(JmesPathInterface jmesPathInterface) {
        this.jmesPathInterface = jmesPathInterface;
    }

    public ArrayList<String> getObjectsForEvent(RulesObject rulesObject, String event) {
        String eventId = getEventId(rulesObject, event);
        return getEventToObjectList(eventId);
    }

    public ArrayList<String> getObjectsForEventId(String eventId) {
        return getEventToObjectList(eventId);
    }

    public void updateEventToObjectMapInMemoryDB(RulesObject rulesObject, String event, String objectId) {
        String eventId = getEventId(rulesObject, event);
        String condition = "{\"_id\" : \"" + eventId + "\"}";
        ArrayList<String> list =  getEventToObjectList(eventId);
        boolean firstTime = list.isEmpty();
        list = updateList(list, eventId, objectId);
        ObjectMapper mapper = new ObjectMapper();
        JsonNode entry = null;

        try {
            entry = new ObjectMapper().readValue(condition, JsonNode.class);
            ArrayNode jsonNode = mapper.convertValue(list, ArrayNode.class);
            ((ObjectNode) entry).set(listPropertyName, mapper.readTree(jsonNode.toString()));
            String mapStr = entry.toString();
            log.debug("MongoDbHandler Insert/Update Event: " + mapStr +
            		"\nto database: " + databaseName + " and to Collection: " + collectionName);
            if (firstTime) {
                mongodbhandler.insertDocument(databaseName, collectionName, mapStr);
            } else {
                mongodbhandler.updateDocument(databaseName, collectionName, condition, mapStr);
            }
        } catch (Exception e) {
            log.info(e.getMessage(),e);
        }
    }

    public String getEventId(RulesObject rulesObject, String event) {
        String idRule = rulesObject.getIdRule();
        JsonNode eventIdJson = jmesPathInterface.runRuleOnEvent(idRule, event);
        return eventIdJson.textValue();
    }

    public ArrayList<String> updateList(ArrayList<String> list, String eventId, String objectId) {
        list.add(objectId);
        return list;
    }

    public ArrayList<String> getEventToObjectList(String eventId) {
        ArrayList<String> list = new ArrayList<String>();
        String condition = "{\"_id\" : \"" + eventId + "\"}";
        ArrayList<String> documents = mongodbhandler.find(databaseName, collectionName, condition);
        if (!documents.isEmpty()) {
            String mapStr = documents.get(0);
            ObjectMapper mapper = new ObjectMapper();
            try {
                JsonNode document = mapper.readValue(mapStr, JsonNode.class);
                JsonNode value = document.get(listPropertyName);
                list = new ObjectMapper().readValue(value.traverse(), new TypeReference<ArrayList<String>>(){});
            } catch (Exception e) {
                log.info(e.getMessage(),e);
            }
        }
        return list;
    }

    /**
     * The method is responsible for the delete the EventObjectMap by using the suffix template Name
     *
     * @param templateName
     * @return boolean
     */
    public boolean deleteEventObjectMap(String templateName) {
        String condition = "{\"objects\": { \"$in\" : [/.*" + templateName + "/]} }";
        log.info("The Json condition for delete aggregated object is : " + condition);
        return mongodbhandler.dropDocument(databaseName, collectionName, condition);
    }

    public boolean isEventInEventObjectMap(String eventId) {
        String condition = "{\"_id\" : \"" + eventId + "\"}";
        List<String> documents = mongodbhandler.find(databaseName, collectionName, condition);
        return !documents.isEmpty();
    }

}


text:
This is a chatbot for the popular (at least I think it's popular) GroupMe group
messaging application. This bot is heavily inspired and based on
[Aaron Bieber](https://github.com/qbit/)'s IRC Bot,
[McChunkie](https://github.com/qbit/mcchunkie/). This bot was written (mostly)
over the course of an afternoon, and as such, may have unexplored bugs.

## Features and Commands

Currently, McChunkie Jr has only a few commands:

* !weather `location` - looks up the weather for provided locations
* !beer `foo` - uses the fantastic [brewerydb](http://brewerydb.com) to look up
  the beer `foo`
* o/ (and \o) - because sometimes, high fives just make you feel better
* !sherlock - a moderately bad Markov chain working with Arthur Conan Doyle's
  *The Adventures of Sherlock Holmes*.
* !wiki `article` - searches Wikipedia for article title. Will follow redirects.
* McChunkie will also respond to various pleasentries like hello, goodbye, and
  thanks.

## Disclaimer:

This code is pretty terrible. Like I said, I wrote it mostly in an afternoon
while trying to waste just a little time. This will probably only be useful for
me, and I don't particularly recommend using it. If you're really motivated,
however, you will need API keys from: [GroupMe](https://dev.groupme.com/bots),
[Wunderground](http://www.wunderground.com/weather/api/), and
[BreweryDB](http://brewerydb.com/developers/). I also ask that you change the
provided User-Agent in [wiki.rb](wiki.rb).

Also, I don't particularly recommend running `git log` or looking at the history
at all. Honestly, it's so bad that I feel bad looking through it. Now that
McChunkie Jr is on Github, I will probably take a little more care with it. But
maybe not. Who knows?

## Contribooting

If you really feel like making a pull request, feel free to do so under a fork
and new branch.


text:
<!--
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END

Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-->

<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="system configuration">
  <service name="system/config-user" version="1">
    <instance name="default" enabled="true">
      <property_group name="user_account">
          <propval name="login" value="vagrant"/>
          <propval name="password" value="$5$JsTLqHcZ$nAJVjxQ48k8YyIFaAo4.L0980WHDeDJbYt2caVuRw34"/>
          <propval name="description" value="default_user"/>
          <propval name="shell" value="/usr/bin/bash"/>
          <propval name="uid" value="101"/>
          <propval name="gid" value="10"/>
          <propval name="type" value="normal"/>
          <propval name="roles" value="root"/>
          <propval name="profiles" value="System Administrator"/>
      </property_group>
      <property_group name="root_account">
        <propval name="password" value="$5$JsTLqHcZ$nAJVjxQ48k8YyIFaAo4.L0980WHDeDJbYt2caVuRw34"/>
        <propval name="type" value="role"/>
      </property_group>
    </instance>
  </service>
  <service version="1" name="system/identity">
    <instance enabled="true" name="node">
      <property_group name="config">
        <propval name="nodename" value="vagrant-solaris"/>
      </property_group>
    </instance>
  </service>
  <service name="system/console-login" version="1">
    <instance enabled="true" name="default">
      <property_group name="ttymon">
        <propval name="terminal_type" value="sun-color"/>
      </property_group>
    </instance>
  </service>
  <service version="1" name="system/timezone">
    <instance enabled="true" name="default">
      <property_group name="timezone">
        <propval name="localtime" value="UTC"/>
      </property_group>
    </instance>
  </service>
  <service version="1" name="system/environment">
    <instance enabled="true" name="init">
      <property_group name="environment">
        <propval name="LANG" value="C"/>
      </property_group>
    </instance>
  </service>
  <service version="1" name="system/keymap">
    <instance enabled="true" name="default">
      <property_group name="keymap">
        <propval name="layout" value="US-English"/>
      </property_group>
    </instance>
  </service>
  <service version="1" name="network/physical">
    <instance enabled="true" name="default">
      <property_group type="application" name="netcfg">
        <propval name="active_ncp" value="Automatic"/>
      </property_group>
    </instance>
  </service>
</service_bundle>


text:
<?php
	$hourService = true;
	$pageTitle = 'View Submitted Hours';
	require_once $_SERVER['DOCUMENT_ROOT'] . '/com/header.php';

	$hoursArray = $hourService->getAllSubmittedHours();
	if (count($hoursArray)):
		viewSubmitted ($hoursArray, false);
	else:
 ?>

There have been no hours submitted in the last 5 days.

<?php
	endif;
	require_once $_SERVER['DOCUMENT_ROOT'] . '/com/footer.php';
?>


text:
using DotNetOpenAuth.AspNet;
using NGM.OpenAuthentication.Models;
using Orchard;

namespace NGM.OpenAuthentication.Services.Clients {
    public interface IExternalAuthenticationClient : IDependency {
        string ProviderName { get; }
        IAuthenticationClient Build(ProviderConfiguration providerConfigurationRecord);
    }
}


text:
class RenameContactRecordToContact < ActiveRecord::Migration
  def change
    rename_table :contact_records, :contacts

    rename_column :email_addresses, :contact_record_id, :contact_id
    rename_column :offices, :contact_record_id, :contact_id
    rename_column :phone_numbers, :contact_record_id, :contact_id
    rename_column :post_addresses, :contact_record_id, :contact_id
    rename_column :websites, :contact_record_id, :contact_id
  end
end


text:
This is side project to get soccer calendar's information from livescore.com

## Information

### Ruby version
2.2.2

### Rails
4.2.3

### Testing
Rspec and Cucumber to apply TDD/BDD

### Hosting
Heroku

## How it works
- Use crawl technique to fetch and parse data from livescore.com, then store in data into database.
- Use Grape as a web API to expose data

There are 4 tables:
- Matches: id, tournament_id, happen_datetime, score, home, guest
- Teams: id, name, match_id, points, played_number
- Tournaments: id, name, tournament_type_id
- TournamentTypes: id, name


text:
package org.openehealth.tewepo.twp.dmp.dmc.server.email.dicommail;

import java.security.InvalidParameterException;

/**
 * An object of this class represents a mail account.
 *
 * @author Benjamin Schneider
 *
 */
public class MailAccount {
	private String username = "someone@test.de";
	private String password = "test";
	private String smtpHost = "smtp.test.de";

	/**
	 * Creates a new mail account with all required parameters.
	 *
	 * @param username
	 *            ; must not be null and ""
	 * @param password
	 *            ; must not be null and ""
	 * @param smtpHost
	 *            must not be null and ""
	 *
	 * @throws InvalidParameterException
	 *             , if parameters null or ""
	 */
	public MailAccount(String username, String password, String smtpHost) {
		/*
		 * check parameters
		 */
		if (!(username != null && !username.equals("") && password != null
				&& !password.equals("") && smtpHost != null && !smtpHost
				.equals(""))) {
			throw new InvalidParameterException();
		}
		this.username = username;
		this.password = password;
		this.smtpHost = smtpHost;
	}

	/**
	 * Gets the SMTP Host's name.
	 *
	 * @return SMTP host
	 */
	public String getSmtpHost() {
		return smtpHost;
	}

	/**
	 * Gets the username.
	 *
	 * @return username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * Gets the password.
	 *
	 * @return password
	 */
	public String getPassword() {
		return password;
	}
}


text:
import {inject,transient,Container} from 'aurelia-dependency-injection';
import {Config} from 'aurelia-api';
import {metadata} from 'aurelia-metadata';
import {Validator,ValidationRules} from 'aurelia-validation';
import {getLogger} from 'aurelia-logging';
import {Config as ViewManagerConfig,resolvedView} from 'aurelia-view-manager';
import {bindingMode,BindingEngine} from 'aurelia-binding';
import {bindable,customElement} from 'aurelia-templating';

/**
 * The Repository basis class
 */
export declare class Repository {
  transport: any;

  /**
     * Construct.
     *
     * @param {Config} clientConfig
     *
     * @constructor
     */
  constructor(clientConfig?: any);

  /**
     * Get the transport for the resource this repository represents.
     *
     * @return {Rest}
     */
  getTransport(): any;

  /**
     * Set the associated entity's meta data
     *
     * @param {{}} meta
     */
  setMeta(meta?: any): any;

  /**
     * Get the associated entity's meta data.
     * @return {{}}
     */
  getMeta(): any;

  /**
     * Set the identifier
     *
     * @param {string} identifier
     * @return {Repository} this
     * @chainable
     */
  setIdentifier(identifier?: any): any;

  /**
     * Get the identifier
     *
     * @return {string|null}
     */
  getIdentifier(): any;

  /**
     * Set the resource
     *
     * @param {string} resource
     * @return {Repository} this
     * @chainable
     */
  setResource(resource?: any): any;

  /**
     * Get the resource
     *
     * @return {string|null}
     */
  getResource(): any;

  /**
     * Perform a find query and populate entities with the retrieved data.
     *
     * @param {{}|number|string} criteria Criteria to add to the query. A plain string or number will be used as relative path.
     * @param {boolean}          [raw]    Set to true to get a POJO in stead of populated entities.
     *
     * @return {Promise<Entity|[Entity]>}
     */
  find(criteria?: any, raw?: any): any;

  /**
     * Perform a find query and populate entities with the retrieved data, limited to one result.
     *
     * @param {{}|number|string} criteria Criteria to add to the query. A plain string or number will be used as relative path.
     * @param {boolean}          [raw]    Set to true to get a POJO in stead of populated entities.
     *
     * @return {Promise<Entity|[Entity]>}
     */
  findOne(criteria?: any, raw?: any): any;

  /**
     * Perform a find query for `path` and populate entities with the retrieved data.
     *
     * @param {string}           path
     * @param {{}|number|string} criteria Criteria to add to the query. A plain string or number will be used as relative path.
     * @param {boolean}          [raw]    Set to true to get a POJO in stead of populated entities.
     * @param {boolean}          [single] Whether or not this is a findOne.
     *
     * @return {Promise<Entity|[Entity]>}
     */
  findPath(path?: any, criteria?: any, raw?: any, single?: any): any;

  /**
     * Perform a count on the resource.
     *
     * @param {null|{}} criteria
     *
     * @return {Promise<number>}
     */
  count(criteria?: any): any;

  /**
     * Get new populated entity or entities based on supplied data including associations
     *
     * @param {{}|[{}]} data|[data] The data to populate with
     * @param {boolean} [clean]     Mark the entities as clean or not
     *
     * @return {Entity|[Entity]}
     */
  populateEntities(data?: any, clean?: any): any;

  /**
     * Populate a (new) entity including associations
     *
     * @param {{}}      data     The data to populate with
     * @param {Entity}  [entity] optional. if not set, a new entity is returned
     * @param {boolean} [clean]  Mark the entities as clean or not
     *
     * @return {Entity}
     */
  getPopulatedEntity(data?: any, entity?: any, clean?: any): any;

  /**
     * Get a new instance for entityReference.
     *
     * @return {Entity}
     */
  getNewEntity(): any;

  /**
     * Populate a new entity with the empty associations set.
     *
     * @return {Entity}
     */
  getNewPopulatedEntity(): any;
}

/**
 * The DefaultRepository class
 * @transient
 */
export declare class DefaultRepository extends Repository {

}
export declare class OrmMetadata {
  static forTarget(target?: any): any;
}

/**
 * The MetaData class for Entity and Repository
 *
 */
export declare class Metadata {

  // The key used to identify this specific metadata
  static key: any;

  /**
     * Construct metadata with sensible defaults (so we can make assumptions in the code).
     */
  constructor();

  /**
     * Add a value to an array.
     *
     * @param {string} key
     * @param {*} value
     *
     * @return {Metadata} itself
     * @chainable
  */
  addTo(key?: any, value?: any): any;

  /**
     * Set a value for key, or one level deeper (key.key).
     *
     * @param {string} key
     * @param {string|*} valueOrNestedKey
     * @param {null|*} [valueOrNull]
     *
     * @return {Metadata} itself
     * @chainable
     */
  put(key?: any, valueOrNestedKey?: any, valueOrNull?: any): any;

  /**
     * Check if key, or key.nested exists.
     *
     * @param {string} key
     * @param {string} [nested]
     *
     * @return {boolean}
     */
  has(key?: any, nested?: any): any;

  /**
     * Fetch key or key.nested from metadata.
     *
     * @param {string} key
     * @param {string} [nested]
     *
     * @return {*}
     */
  fetch(key?: any, nested?: any): any;
}

/* eslint-disable max-lines */
/**
 * The Entity basis class
 * @transient
 */
export declare class Entity {

  /**
     * Construct a new entity.
     *
     * @param {Validator} validator
     */
  constructor();

  /**
     * Get the transport for the resource this repository represents.
     *
     * @return {Rest}
     */
  getTransport(): any;

  /**
     * Get reference to the repository.
     *
     * @return {Repository}
     */
  getRepository(): any;

  /**
     * Set reference to the repository.
     *
     * @param {Repository} repository
     *
     * @return {Entity} this
     * @chainable
     */
  setRepository(repository?: any): any;

  /**
     * Define a non-enumerable property on the entity.
     *
     * @param {string}  property
     * @param {*}       value
     * @param {boolean} [writable]
     * @chainable
     *
     * @return {Entity} this
     * @chainable
     */
  define(property?: any, value?: any, writable?: any): any;

  /**
     * Get the metadata for this entity.
     *
     * @return {Metadata}
     */
  getMeta(): any;

  /**
     * Get the id property name for this entity.
     *
     * @return {string}
     */
  getIdProperty(): any;

  /**
     * Get the id property name of the entity (static).
     *
     * @return {string}
     */
  static getIdProperty(): any;

  /**
     * Get the Id value for this entity.
     *
     * @return {number|string}
     */
  getId(): any;

  /**
     * Set the Id value for this entity.
     *
     * @param {number|string} id
     *
     * @return {Entity}  this
     * @chainable
     */
  setId(id?: any): any;

  /**
     * Persist the entity's state to the server.
     * Either creates a new record (POST) or updates an existing one (PUT) based on the entity's state,
     *
     * @return {Promise}
     */
  save(): any;

  /**
     * Persist the changes made to this entity to the server.
     *
     * @see .save()
     *
     * @return {Promise}
     *
     * @throws {Error}
     */
  update(): any;

  /**
     * Add an entity to a collection (persist).
     *
     * When given entity has data, create the entity and set up the relation.
     *
     * @param {Entity|number} entity     Entity or id
     * @param {string}        [property] The name of the property
     *
     * @return {Promise}
     */
  addCollectionAssociation(entity?: any, property?: any): any;

  /**
     * Remove an entity from a collection.
     *
     * @param {Entity|number} entity     Entity or id
     * @param {string}        [property] The name of the property
     *
     * @return {Promise}
     */
  removeCollectionAssociation(entity?: any, property?: any): any;

  /**
     * Persist the collections on the entity.
     *
     * @return {Promise} itself
     */
  saveCollections(): any;

  /**
     * Mark this entity as clean, in its current state.
     *
     * @return {Entity} itself
     * @chainable
     */
  markClean(): any;

  /**
     * Return if the entity is clean.
     *
     * @return {boolean}
     */
  isClean(): any;

  /**
     * Return if the entity is dirty.
     *
     * @return {boolean}
     */
  isDirty(): any;

  /**
     * Return if the entity is new (ergo, hasn't been persisted to the server).
     *
     * @return {boolean}
     */
  isNew(): any;

  /**
     * Resets the entity to the clean state
     *
     * @param {boolean} [shallow]
     *
     * @return {Entity} itself
     */
  reset(shallow?: any): any;

  /**
     * Sets the entity's properties to their clean values
     *
     * @return {Entity} itself
     * @chainable
     */
  clear(): any;

  /**
     * Get the identifier name of this entity's reference (static).
     *
     * @return {string|null}
     */
  static getIdentifier(): any;

  /**
     * Get the identifier name of this entity instance
     *
     * @return {string|null}
     */
  getIdentifier(): any;

  /**
     * Set this instance's identifier.
     *
     * @param {string} identifier
     *
     * @return {Entity} itself
     * @chainable
     */
  setIdentifier(identifier?: any): any;

  /**
     * Get the resource name of this entity's reference (static).
     *
     * @return {string|null}
     */
  static getResource(): any;

  /**
     * Get the resource name of this entity instance
     *
     * @return {string|null}
     */
  getResource(): any;

  /**
     * Set this instance's resource.
     *
     * @param {string} resource
     *
     * @return {Entity} itself
     * @chainable
     */
  setResource(resource?: any): any;

  /**
     * Destroy this entity (DELETE request to the server).
     *
     * @return {Promise}
     */
  destroy(): any;

  /**
     * Get the name of the entity. This is useful for labels in texts.
     *
     * @return {string}
     */
  getName(): any;

  /**
     * Get the name of the entity (static). This is useful for labels in texts.
     *
     * @return {string}
     */
  static getName(): any;

  /**
     * Set data on this entity.
     *
     * @param {{}} data
     * @param {boolean} markClean
     * @return {Entity} itself
     * @chainable
     */
  setData(data?: any, markClean?: any): any;

  /**
     * Set the validator instance.
     *
     * @param {Validator} validator
     * @return {Entity} itself
     * @chainable
     */
  setValidator(validator?: any): any;

  /**
     * Get the validator instance.
     *
     * @return {Validator}
     */
  getValidator(): any;

  /**
     * Check if entity has validation enabled.
     *
     * @return {boolean}
     */
  hasValidation(): any;

  /**
     * Validates the entity
     *
     * @param {string|null} propertyName Optional. The name of the property to validate. If unspecified,
     * all properties will be validated.
     * @param {Rule<*, *>[]|null} rules Optional. If unspecified, the rules will be looked up using
     * the metadata for the object created by ValidationRules....on(class/object)
     * @return {Promise<ValidateResult[]>}
     */
  validate(propertyName?: any, rules?: any): any;

  /**
     * Get the data in this entity as a POJO.
     *
     * @param {boolean} [shallow]
     *
     * @return {{}}
     */
  asObject(shallow?: any): any;

  /**
     * Get the data in this entity as a json string.
     *
     * @param {boolean} [shallow]
     *
     * @return {string}
     */
  asJson(shallow?: any): any;
}

/**
 * Set the id property for en entity
 *
 * @export
 * @param {string} propertyName
 * @returns {function}
 *
 * @decorator
 */
export declare function idProperty(propertyName?: any): any;

/**
 * Set the 'identifierName' metadata on the entity
 *
 * @param {string} identifierName The name of the identifier
 *
 * @return {function}
 *
 * @decorator
 */
export declare function identifier(identifierName?: any): any;

/**
 * Set the 'name' metadata on the entity
 *
 * @param {string} entityName=target.name.toLowerCase The (custom) name to use
 *
 * @return {function}
 *
 * @decorator
 */
export declare function name(entityName?: any): any;

/**
 * Set the repositoryReference metadata on the entity
 *
 * @param {string} repositoryReference The repository reference to use
 *
 * @return {function}
 *
 * @decorator
 */
export declare function repository(repositoryReference?: any): any;

/**
 * Set the 'resourceName' metadata on the entity
 *
 * @param {string} resourceName The name of the resource
 *
 * @return {function}
 *
 * @decorator
 */
export declare function resource(resourceName?: any): any;

/**
 * Set the 'validation' metadata to 'true'
 *
 * @param {[function]} ValidatorClass = Validator
 *
 * @return {function}
 *
 * @decorator
 */
export declare function validation(ValidatorClass?: any): any;

/**
 * The EntityManager class
 */
export declare class EntityManager {
  repositories: any;
  entities: any;

  /**
     * Construct a new EntityManager.
     *
     * @param {Container} container
     */
  constructor(container?: any);

  /**
     * Register an array of entity classes.
     *
     * @param {function[]|function} EntityClasses Array or object of Entity constructors.
     *
     * @return {EntityManager} itself
     * @chainable
     */
  registerEntities(EntityClasses?: any): any;

  /**
     * Register an Entity class.
     *
     * @param {function} EntityClass
     *
     * @return {EntityManager} itself
     * @chainable
     */
  registerEntity(EntityClass?: any): any;

  /**
     * Get a repository instance.
     *
     * @param {Entity|string} entity
     *
     * @return {Repository}
     * @throws {Error}
     */
  getRepository(entity?: any): any;

  /**
     * Resolve given resource value to an entityReference
     *
     * @param {Entity|string} resource
     *
     * @return {Entity}
     * @throws {Error}
     */
  resolveEntityReference(resource?: any): any;

  /**
     * Get an instance for `entity`
     *
     * @param {string|Entity} entity
     *
     * @return {Entity}
     */
  getEntity(entity?: any): any;
}

/**
 * Set the 'resource' metadata and enables validation on the entity
 *
 * @param {string} resourceName The name of the resource
 * @param {[function]} ValidatorClass = Validator
 *
 * @return {function}
 *
 * @decorator
 */
export declare function validatedResource(resourceName?: any, ValidatorClass?: any): any;

// eslint-disable-line no-unused-vars
// eslint-disable-line no-unused-vars
/**
 * Plugin configure
 *
 * @export
 * @param {*} frameworkConfig
 * @param {*} configCallback
 */
export declare function configure(frameworkConfig?: any, configCallback?: any): any;
export declare const logger: any;

/**
* Set generic 'data' metadata.
*
 * @param {{}} metaData The data to set
 *
 * @returns {function}
 *
 * @decorator
 */
export declare function data(metaData?: any): any;

/**
 * Set the 'endpoint' metadta of an entity. Needs a set resource
 *
 * @param {string} entityEndpoint The endpoint name to use
 *
 * @return {function}
 *
 * @decorator
 */
export declare function endpoint(entityEndpoint?: any): any;

// fix for babels property decorator
export declare function ensurePropertyIsConfigurable(target?: any, propertyName?: any, descriptor?: any): any;

/**
 * Associate a property with an entity (toOne) or a collection (toMany)
 *
 * @param {undefined|string|{}} associationData undefined={entity:propertyName}, string={entity:string}, Object={entity: string, collection: string}
 *
 * @return {function}
 *
 * @decorator
 */
export declare function association(associationData?: any): any;

/**
 * Registers the 'enumerations' for an attribute's values
 *
 * @param {*[]} values - a list of valid values for the entity's attribute
 *
 * @return {Function}
 *
 * @decorator
 */
export declare function enumeration(values?: any): any;

/**
 * Set the 'types' metadata on the entity
 *
 * @param {string} typeValue The type(text,string,date,datetime,integer,int,number,float,boolean,bool,smart,autodetect (based on value)) to use for this property using typer
 *
 * @return {function}
 *
 * @decorator
 */
export declare function type(typeValue?: any): any;
export declare class AssociationSelect {
  criteria: any;
  name: any;
  repository: any;
  identifier: any;
  property: any;
  resource: any;
  options: any;
  association: any;
  manyAssociation: any;
  value: any;
  error: any;
  multiple: any;
  hidePlaceholder: any;
  selectablePlaceholder: any;
  placeholderValue: any;
  disabled: any;
  placeholderText: any;
  ownMeta: any;

  /**
     * Create a new select element.
     *
     * @param {BindingEngine} bindingEngine
     * @param {EntityManager} entityManager
     */
  constructor(bindingEngine?: any, entityManager?: any);

  /**
     * (Re)Load the data for the select.
     *
     * @param {string|Array|{}} [reservedValue]
     *
     * @return {Promise}
     */
  load(reservedValue?: any): any;

  /**
     * Set the value for the select.
     *
     * @param {string|Array|{}} value
     */
  setValue(value?: any): any;

  /**
     * Get criteria, or default to empty object.
     *
     * @return {{}}
     */
  getCriteria(): any;

  /**
     * Build the find that's going to fetch the option values for the select.
     * This method works well with associations, and reloads when they change.
     *
     * @return {Promise}
     */
  buildFind(): any;

  /**
     * Check if all associations have values set.
     *
     * @return {boolean}
     */
  verifyAssociationValues(): any;

  /**
     * Add a watcher to the list. Whenever given association changes, the select will reload its contents.
     *
     * @param {Entity|Array} association Entity or array of Entity instances.
     *
     * @return {AssociationSelect}
     */
  observe(association?: any): any;

  /**
     * Check if the element property has changed
     *
     * @param  {string}      property
     * @param  {string|{}}   newVal
     * @param  {string|{}}   oldVal
     *
     * @return {boolean}
     */
  isChanged(property?: any, newVal?: any, oldVal?: any): any;

  /**
     * Changed resource handler
     *
     * @param  {string} resource
     */
  resourceChanged(resource?: any): any;

  /**
     * Changed criteria handler
     *
     * @param  {{}} newVal
     * @param  {{}} oldVal
     */
  criteriaChanged(newVal?: any, oldVal?: any): any;
  bind(): any;

  /**
     * Find the name of the property in meta, reversed by resource.
     *
     * @param {Metadata} meta
     * @param {string}   resource
     *
     * @return {string}
     */
  propertyForResource(meta?: any, resource?: any): any;

  /**
     * Dispose all subscriptions on unbind.
     */
  unbind(): any;
}
export declare class Paged {
  data: any;
  loading: any;
  page: any;
  error: any;
  criteria: any;
  repository: any;
  resource: any;
  limit: any;
  constructor(entityManager?: any);

  /**
     * Attach to view
     */
  attached(): any;

  /**
     * Reload data
     */
  reloadData(): any;

  /**
     * Check if the element property has changed
     *
     * @param  {string}      property New element property
     * @param  {string|{}}   newVal New value
     * @param  {string|{}}   oldVal Old value
     *
     * @return {boolean}
     */
  isChanged(property?: any, newVal?: any, oldVal?: any): any;

  /**
     * Changed page handler
     *
     * @param  {integer} newVal New page value
     * @param  {integer} oldVal Old page value
     */
  pageChanged(newVal?: any, oldVal?: any): any;

  /**
     * Changed resource handler
     *
     * @param  {{}} newVal New resource value
     * @param  {{}} oldVal Old resource value
     */
  resourceChanged(newVal?: any, oldVal?: any): any;

  /**
     * Changed criteria handler
     *
     * @param  {{}} newVal New criteria value
     * @param  {{}} oldVal Old criteria value
     */
  criteriaChanged(newVal?: any, oldVal?: any): any;

  /**
     * Changed resource handler
     *
     * @param  {string} resource New resource value
     */
  resourceChanged(resource?: any): any;

  /**
     * Get data from repository
     */
  getData(): any;
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace MockHttpContext.WebForm.Controls
{

    public partial class LoginControl
    {
    }
}


text:
description: Learn how to use DTR APIs.
keywords:
- docker, registry, DTR, APIs
title: DTR APIs
---

This section includes the following topics:

* [API overview](overview.md)


text:
module Softlayer
  module Container
    module Network
      module Storage
        module Evault
          autoload :Vault, 'softlayer/container/network/storage/evault/vault'
          autoload :WebCc, 'softlayer/container/network/storage/evault/web_cc'
        end
      end
    end
  end
end


text:
U="$USER"
echo "Enter database password"
read MARIADB_PW
echo "$MARIADB_PW"
apt-get -y update
apt-get -y upgrade
echo mariadb-server mysql-server/root_password password $MARIADB_PW | sudo debconf-set-selections
echo mariadb-server mysql-server/root_password_again password $MARIADB_PW | sudo debconf-set-selections
apt-get -y install mariadb-server openssh-server python-software-properties openssh-server nginx php5-fpm php5-gd php-apc php5-mcrypt php5-cli php5-curl php5-mysql openbabel subversion
wget https://raw.githubusercontent.com/adalecki/drugscreen/master/www
mv www /etc/nginx/sites-available
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/www /etc/nginx/sites-enabled/www
svn export https://github.com/adalecki/drugscreen/trunk/publication_database /usr/share/nginx/html/publication_database
wget https://github.com/adalecki/drugscreen/raw/master/sqlbuddy.tar.gz
gunzip sqlbuddy.tar.gz
tar -zxf sqlbuddy.tar -C /usr/share/nginx/html/
echo "AllowUsers $U" >> /etc/ssh/sshd_config
echo "		upstream php5-fpm-sock {
			server unix:/var/run/php5-fpm.sock;
		}" > /etc/nginx/conf.d/php-sock.conf
echo "CREATE DATABASE publication_database" | mysql -u root -p$MARIADB_PW
echo "CREATE USER 'publicationdb'@'localhost' IDENTIFIED BY 'publicationdb';" | mysql -u root -p$MARIADB_PW
echo "GRANT ALL ON publication_database.* TO 'publicationdb'@'localhost';" | mysql -u root -p$MARIADB_PW
mysql -u root -p$MARIADB_PW publication_database < /usr/share/nginx/html/publication_database/publication_database.sql
chown -R www-data:www-data /usr/share/nginx/html/publication_database/svgimages
chown -R www-data:www-data /usr/share/nginx/html/publication_database/temp
/etc/init.d/php5-fpm restart
/etc/init.d/nginx reload


text:
package azkaban.webapp;

import org.codehaus.jackson.annotate.JsonProperty;

/**
 * This is an abstract class for representing azkaban common status.
 */
public abstract class Status {
  @JsonProperty("version")
  private final String version;
  @JsonProperty("pid")
  private final String pid;
  @JsonProperty("installationPath")
  private final String installationPath;
  @JsonProperty("usedMemory")
  private final long usedMemory;
  @JsonProperty("xmx")
  private final long xmx;
  @JsonProperty("isDatabaseUp")
  private final boolean isDatabaseUp;

  public Status(final String version,
      final String pid,
      final String installationPath,
      final long usedMemory,
      final long xmx,
      final boolean isDatabaseUp) {
    this.version = version;
    this.pid = pid;
    this.installationPath = installationPath;
    this.usedMemory = usedMemory;
    this.xmx = xmx;
    this.isDatabaseUp = isDatabaseUp;
  }

  public String getVersion() {
    return version;
  }

  public String getPid() {
    return pid;
  }

  public String getInstallationPath() {
    return installationPath;
  }

  public long getUsedMemory() {
    return usedMemory;
  }

  public long getXmx() {
    return xmx;
  }

  public boolean isDatabaseUp() {
    return isDatabaseUp;
  }
}


text:
vm_initial_bootstrap() {

  bootstrap_file="${FUNCNAME[0]}"

  if check_bootstraped "$bootstrap_file" ""; then
    logger "Bootstraping $vm_name "

    logger "Setting SSH keys"
    vm_set_ssh "use_password"

    test_action="$(vm_execute " ls && echo '$testKey'")"

    if [[ "$test_action" == *"$testKey"* ]] ; then
      #set the lock
      check_bootstraped "$bootstrap_file" "set"
    else
      logger "ERROR at $bootstrap_file for $vm_name. Test output: $test_action"
    fi
  else
    logger "$bootstrap_file already configured"
  fi
}

#$1 vm_name
wait_vm_ready() {
  : #not needed
}

wait_vm_ssh_ready() {
  : #not needed
}


text:
/**
 * Contains classes that act as the data access layer and translate
 * raw queried data from data sources to domain models.
 * @author I.A
 */
package data_science.database.query;


text:
Question

Analysis

Code

Please in backup code here!


text:
package org.ovirt.engine.ui.common.widget.label;

import org.ovirt.engine.core.common.utils.SizeConverter;
import org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer;
import com.google.gwt.user.client.ui.ValueLabel;

public class DiskSizeLabel<T extends Number> extends ValueLabel<T> {

    public DiskSizeLabel() {
        super(new DiskSizeRenderer<T>(SizeConverter.SizeUnit.GiB));
    }

    public DiskSizeLabel(SizeConverter.SizeUnit diskSizeUnit) {
        super(new DiskSizeRenderer<T>(diskSizeUnit));
    }
}


text:
<?php

namespace RedKiteCms\Action\Seo;

use RedKiteCms\Action\BaseAction;
use RedKiteCms\Content\BlockManager\BlockManagerAdd;
use RedKiteCms\Content\Page\PageManager;
use Silex\Application;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
 * Class EditSeoAction defines the object assigned to edit a page for a specific language
 *
 * @package RedKiteCms\Action
 */
class EditSeoAction extends BaseAction
{
    /**
     * {@inheritdoc}
     */
    public function execute(array $options, $username)
    {
        $data = $options["data"];
        $pageName = $data["pageName"];
        $seoData = $data["seoData"];
        $pageManager = $this->app["red_kite_cms.page_manager"];
        $pageManager
            ->contributor($username)
            ->edit($pageName, $seoData)
        ;
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
				http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>fr.ethilvan.bukkit</groupId>
		<artifactId>parent</artifactId>
		<version>1.4.7-dev-SNAPSHOT</version>
	</parent>

	<artifactId>inventories</artifactId>

	<name>Inventories</name>
	<description>Inventories management plugin</description>

	<dependencies>
		<dependency>
			<groupId>fr.ethilvan.bukkit</groupId>
			<artifactId>api</artifactId>
		</dependency>
	</dependencies>

</project>


text:
date: 2009-07-17 20:00:15+00:00
title: Rain and Silk Markets
wordpress_id: 74
locations:
- China
- Beijing
redirect_from:
  - /china/beijing/china-2009/three-nations/rain-and-silk-markets/
---

We got up nice and early for breakfast so we were ready for today's programme, only to find that the
heavy rain had meant the programme was amended slightly and we had the morning off. We therefore
decided to take a walk around the Forbidden Palace to see the lake. By the time we got there, most
people's waterproofs had failed and we looked a little like a group of happy drowned rats, so we
headed back to the hotel to dry off.

We chose to have lunch in a Western Style restaurant, where Rosie and Mark ate burgers, chips and
sandwiches and I had Kuangpau Chicken, but for some reason I was given a fork and a spoon. After a
little confusion over the lack of chopsticks we tucked in. Although it was all very nice, Western
Style also seems to mean Western prices! :disappointed: Nevermind, we won't be doing that again.

We were then all taken to the Silk Road Markets for a few (5) hours to do a bit of shopping. It turns
out that Chinese market stall holders believe that the louder they shout, and the more forceful they
are, the more likely people are to buy their wares! Surprisingly this didn't work too well with us.
However the whole experience was great fun, if a little tiring. Mark even managed to get a silk tailor
to not only understand his needs, but to tailor an amazing red silk liner in under 15 minutes! We were
all suitably impressed.

Our tour guides then took us out for a traditional Mongolian Hot Pot (which is a traditional meal in
Beijing for some reason). This involved each person having a small pan filled with some form of broth
and a load of raw meats, fish and vegetables and we had to cook it ourselves - great fun!.


text:
"use strict";
var Cocktail = (function () {
    function Cocktail() {
    }
    return Cocktail;
}());
exports.Cocktail = Cocktail;
//# sourceMappingURL=cocktail.js.map