text:
{{'Dictionary Configuration' | translate}}

<form name="configForm" novalidate>
<fieldset data-ng-disabled="isSaving">
<button class="btn btn-primary {{interfaceConfig.pullToSide}}" data-ng-click="configurationApply()"
    data-ng-disabled="configForm.$pristine || isSaving">
    {{'Apply' | translate}}</button>
<tabset>
    <tab heading="Input Systems" class="{{interfaceConfig.pullNormal}}">

    </tab>
    <tab heading="Fields" class="{{interfaceConfig.pullNormal}}">

                <button data-ng-click="showAllFields = ! showAllFields" class="btn btn-small">{{showAllFields ? 'Show Only Common Fields' : 'Show All Fields' | translate}}</button>

                            {{fieldConfig[fieldName].label}}

                            {{fieldConfig[fieldName].label}}

                            {{fieldConfig[fieldName].label}}

            <small translate="Custom Fields shown in italics">

                <button class="btn btn-small" data-ng-click="openNewCustomFieldModal()">{{'New Custom Field' | translate}} </button>

                <button class="btn" data-ng-click="removeSelectedCustomField()"
                    data-ng-show="showRemoveCustomField(currentField.name)">
                    {{'Remove Custom Field' | translate}} </button>

{{fieldConfig[currentField.name].label}} {{'Field Setup' | translate}}

                    {{'Display Name' | translate}}

                        <input type="text" id="displayName"
                            data-ng-model="fieldConfig[currentField.name].label"/>

                            <input type="checkbox" id="hideIfEmpty"
                                data-ng-model="fieldConfig[currentField.name].hideIfEmpty"/>
                            {{'Hidden if empty' | translate}}

                            <input type="checkbox"
                                data-ng-model="fieldConfig[currentField.name].displayMultiline"/>
                            {{'Display as multi-line text' | translate}}

                    {{'Width' | translate}}

                        <input type="number" id="width" min="20" max="40"
                            data-ng-model="fieldConfig[currentField.name].width"/>

{{fieldConfig[currentField.name].captionLabel}} {{'Field Setup' | translate}}

                            <input type="checkbox" id="captionHideIfEmpty"
                                data-ng-model="fieldConfig[currentField.name].captionHideIfEmpty"/>
                            {{'Hidden if empty' | translate}}

                            {{'Input Systems' | translate}}

<input data-ng-model="currentField.inputSystems.selecteds[inputSystemTag]" type="checkbox"/>
                                        {{configDirty.inputSystems[inputSystemTag].abbreviation}}

                            {{'Edit input systems' | translate}}

                            <button class="btn" id="upButton"
                                data-ng-click="moveUp(currentField.inputSystems.tag)"
                                data-ng-disabled="currentField.inputSystems.fieldOrder[0] == currentField.inputSystems.tag || !currentField.inputSystems.tag">
                                  </button>
                            <button class="btn" id="downButton"
                                data-ng-click="moveDown(currentField.inputSystems.tag)"
                                data-ng-disabled="currentField.inputSystems.fieldOrder[currentField.inputSystems.fieldOrder.length - 1] == currentField.inputSystems.tag || !currentField.inputSystems.tag">
                                  </button>

                        <button class="btn btn-primary {{interfaceConfig.pullToSide}}"
                            data-ng-click="editInputSystems.done()">{{'Done' | translate}}</button>

    </tab>
    <tab heading="Tasks" class="{{interfaceConfig.pullNormal}}">

                        <select class="form-control" id="timeRange"
                            data-ng-model="configDirty.tasks['dashboard'].timeRange"
                            data-ng-options="selects.timeRange.options[key] for key in selects.timeRange.optionsOrder">
                            <option value="">-- {{'choose a time range' | translate}} --</option></select>

                        <input type="number" min="0" id="wordCount"
                            data-ng-model="configDirty.tasks['dashboard'].targetWordCount">

                        <select class="form-control" id="language"
                            data-ng-model="configDirty.tasks['semdom'].language"
                            data-ng-options="key as option for (key, option) in selects.language.options">
                            <option value="">-- {{'choose a language' | translate}} --</option></select>

                                <input type="checkbox" data-ng-model="configDirty.tasks['semdom'].visibleFields.definition">
                                 {{'Definition' | translate}}

                                <input type="checkbox" data-ng-model="configDirty.tasks['semdom'].visibleFields.partOfSpeech">
                                 {{'Part Of Speech' | translate}}

                                <input type="checkbox" data-ng-model="configDirty.tasks['semdom'].visibleFields.sentence">
                                 {{'Example Sentence' | translate}}

                                <input type="checkbox" data-ng-model="configDirty.tasks['semdom'].visibleFields.translation">
                                 {{'Example Translation' | translate}}

    </tab>
    <tab heading="Option Lists" class="{{interfaceConfig.pullNormal}}">

                        {{optionList.name}}

{{optionlistDirty[currentListIndex].name}}

                    <picklist-editor items="optionlistDirty[currentListIndex].items"
                        pristine-items="optionlistPristine[currentListIndex].items"></picklist-editor>

    </tab>
</tabset>
</fieldset>
</form>


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RemotePlusLibrary.Extension.ResourceSystem.ResourceTypes.Devices
{
    public class MouseDevice : IODevice
    {
        public MouseDevice(string id, string name, string description, string deviceID) : base(id, name, description, deviceID)
        {
        }
        public override string ResourceType => "Mouse";

        public override void BeginIO()
        {

        }

        public override void Close()
        {

        }

        public override Stream OpenReadStream()
        {
            throw new NotImplementedException("Cannot open mouse for reading.");
        }

        public override Stream OpenWriteStream()
        {
            throw new NotImplementedException("Cannot write to mouse.");
        }

        public override int Read(byte[] buffer, int offset, int length)
        {
            throw new NotImplementedException("Cannot open mouse for reading.");
        }

        public override void Write(byte[] data, int offset, int length)
        {
            throw new NotImplementedException("Cannot write to mouse."); ;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
{% extends "core/landing/baselanding.html" %}

{% block title %}Edit Test Result{% endblock title %}

{% block pageContents %}

    <form enctype="multipart/form-data" action="" method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <input type="submit" value="Save"/>
    </form>

{% endblock pageContents %}


text:
package com.intellij.codeInsight.daemon.quickFix;

import com.intellij.codeInsight.intention.IntentionAction;

/**
 * tests corresponding intention for availability only, does not invoke action
 * @author cdr
 */
public abstract class LightQuickFixAvailabilityTestCase extends LightQuickFixParameterizedTestCase {
  @Override
  protected void doAction(final String text, final boolean actionShouldBeAvailable, final String testFullPath, final String testName)
    throws Exception {
    IntentionAction action = findActionWithText(text);
    assertTrue("Action with text '" + text + "' is " + (action == null ? "not " :"") +
               "available in test " + testFullPath,
      (action != null) == actionShouldBeAvailable);
  }
}


text:
/**
==============================================================
 * Sentir - Responsive admin & dashboard template
 * Version 		1.3.0
 * Release		February 14, 2015
 * Additional	Sentir Agency Coming Soon
==============================================================
**/

@import url(http://fonts.googleapis.com/css?family=Lato:100,200,300,400,500,600,700,900);
body{
	background: #fff;
	font-family: 'Lato', Calibri, Arial, sans-serif;
	font-size: 14px;
	color: #656D78;
}

/**
-------------------------------------------
BUTTON
-------------------------------------------
**/
.btn 					{border-radius: 2px;}
.btn.btn-square 			{border-radius: 0px;}
.btn.btn-rounded-lg 		{border-radius: 4px;}
.btn-group.btn-square > .btn,
.btn-lg.btn-square,
.btn-group-lg.btn-square > .btn,
.btn-sm.btn-square,
.btn-group-sm.btn-square > .btn,btn-xs.btn-square,
.btn-group-xs.btn-square > .btn {
	border-radius: 0px;
}
.btn:active,
.btn.active {
	-webkit-box-shadow: inset 0 3px 40px rgba(0, 0, 0, .1);
          box-shadow: inset 0 3px 40px rgba(0, 0, 0, .1);
}
.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #DBDBDB;
	-moz-box-shadow: 0px 3px 0px #DBDBDB;
	box-shadow: 0px 3px 0px #DBDBDB;
	top: 0;
	position: relative;
}
.btn-perspective:active{
	top: 2px;
	-webkit-box-shadow: 0px 1px 0px #DBDBDB;
	-moz-box-shadow: 0px 1px 0px #DBDBDB;
	box-shadow: 0px 1px 0px #DBDBDB;
}
.btn-default {
	color: #333;
	background-color: #F5F7FA;
	border-color: #E6E9ED;
}
.btn-default.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #CCD1D9;
	-moz-box-shadow: 0px 3px 0px #CCD1D9;
	box-shadow: 0px 3px 0px #CCD1D9;
}
.btn-default.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #CCD1D9;
	-moz-box-shadow: 0px 1px 0px #CCD1D9;
	box-shadow: 0px 1px 0px #CCD1D9;
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open .dropdown-toggle.btn-default {
	color: #333;
	background-color: #E6E9ED;
	border-color: #E6E9ED;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
	background-color: #fff;
	border-color: #E6E9ED;
}
.btn-primary {
	background-color: #37BC9B;
	border-color: #37BC9B;
}
.btn-primary.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #279D81;
	-moz-box-shadow: 0px 3px 0px #279D81;
	box-shadow: 0px 3px 0px #279D81;
}
.btn-primary.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #279D81;
	-moz-box-shadow: 0px 1px 0px #279D81;
	box-shadow: 0px 1px 0px #279D81;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
	background-color: #29AF8E;
	border-color: #29AF8E;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
	background-color: #5ADBBC;
	border-color: #5ADBBC;
}
.btn-primary .badge {color: #5ADBBC;}

.btn-success {
	background-color: #8CC152;
	border-color: #8CC152;
}
.btn-success.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #629031;
	-moz-box-shadow: 0px 3px 0px #629031;
	box-shadow: 0px 3px 0px #629031;
}
.btn-success.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #629031;
	-moz-box-shadow: 0px 1px 0px #629031;
	box-shadow: 0px 1px 0px #629031;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
	background-color: #74AD3B;
	border-color: #74AD3B;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
  background-color: #B4E87E;
  border-color: #B4E87E;
}
.btn-success .badge {color: #B4E87E;}

.btn-info {
	background-color: #3BAFDA;
	border-color: #3BAFDA;
}
.btn-info.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #218BB2;
	-moz-box-shadow: 0px 3px 0px #218BB2;
	box-shadow: 0px 3px 0px #218BB2;
}
.btn-info.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #218BB2;
	-moz-box-shadow: 0px 1px 0px #218BB2;
	box-shadow: 0px 1px 0px #218BB2;
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open .dropdown-toggle.btn-info {
	background-color: #29A0CB;
	border-color: #29A0CB;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
	background-color: #5DCBF7;
	border-color: #5DCBF7;
}
.btn-info .badge {color: #5DCBF7;}

.btn-warning {
	background-color: #F6BB42;
	border-color: #F6BB42;
}
.btn-warning.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #C6901F;
	-moz-box-shadow: 0px 3px 0px #C6901F;
	box-shadow: 0px 3px 0px #C6901F;
}
.btn-warning.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #C6901F;
	-moz-box-shadow: 0px 1px 0px #C6901F;
	box-shadow: 0px 1px 0px #C6901F;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open .dropdown-toggle.btn-warning {
	background-color: #E8AA2E;
	border-color: #E8AA2E;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
	background-color: #FCCB6A;
	border-color: #FCCB6A;
}
.btn-warning .badge {color: #FCCB6A;}

.btn-danger {
	background-color: #E9573F;
	border-color: #E9573F;
}
.btn-danger.btn-perspective{
	-webkit-box-shadow: 0px 3px 0px #C14029;
	-moz-box-shadow: 0px 3px 0px #C14029;
	box-shadow: 0px 3px 0px #C14029;
}
.btn-danger.btn-perspective:active{
	-webkit-box-shadow: 0px 1px 0px #C14029;
	-moz-box-shadow: 0px 1px 0px #C14029;
	box-shadow: 0px 1px 0px #C14029;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open .dropdown-toggle.btn-danger {
	background-color: #D8482C;
	border-color: #D8482C;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
	background-color: #FC7C64;
	border-color: #FC7C64;
}
.btn-danger .badge 		{color: #FC7C64;}
.btn-link 				{color: #37BC9B;}
.btn-link:hover,
.btn-link:focus {
  color: #29AF8E;
}

/**
---------------------------
HEADER
---------------------------
**/
.logo{
	text-align: center;
	margin: 30px 0;
}
.logo img{width: 160px;}
h1.heading{
	font-size: 60px;
	font-weight: 700;
	color: #fff;
	line-height: 100%;
}

/**
---------------------------
COUNTER
---------------------------
**/
.counter-wrap:before,
.counter-wrap:after {
	display: table;
	content: " ";
}
.counter-wrap:after {clear: both;}
.counter-wrap {margin: 50px 0;}
.counter-item{
	float: left;
	width: 25%;
	text-align: center;
	background: #fff;
	padding: 80px 0;
	height: 350px;
}
.counter-item h1{
	font-size: 80px;
	font-weight: 900;
}
.counter-item p{
	font-size: 30px;
	font-weight: 400;
	text-transform: uppercase;
}
.bg-primary	{background: #35bc9b}
.bg-success	{background: #8ec051}
.bg-info	{background: #3eafdb}
.bg-danger	{background: #e7573f}
.bg-warning	{background: #f6bb43}
.bg-primary,
.bg-success,
.bg-info,
.bg-danger,
.bg-warning	{color: #fff;}
p.about-text{
	font-size: 18px;
	color: #fff;
	margin: 25px 0;
}

/**
---------------------------
SUBSCRIBE FORM
---------------------------
**/
.subscribe{
	margin: 20px 0 50px;
	padding: 0;
	text-align: center;
}
.subscribe .form-control{
	border: none;
	height: 50px;
	border-radius: 0;
	font-size: 18px;
	color: #d3d8de;
	margin-bottom: 20px;
	text-align: center;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0);
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0);
	-webkit-transition: border-color ease-in-out 0s, box-shadow ease-in-out 0s;
          transition: border-color ease-in-out 0s, box-shadow ease-in-out 0s;
}
.subscribe .form-control:focus{
	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0), 0 0 8px rgba(102, 175, 233, 0);
          box-shadow: inset 0 1px 1px rgba(0,0,0,0), 0 0 8px rgba(102, 175, 233, 0);
}
.subscribe .form-control::-moz-placeholder {
  color: #d3d8de;
  opacity: 1;
}
.subscribe .form-control:-ms-input-placeholder {
  color: #d3d8de;
}
.subscribe .form-control::-webkit-input-placeholder {
  color: #d3d8de;
}
.subscribe-btn {
	height: 50px;
	border-radius: 2px;
	font-size: 18px;
	font-weight: 700;
	padding-left: 40px;
	padding-right: 40px;
	border: 3px solid #fff;
	background: transparent;
}
.subscribe-btn:hover,
.subscribe-btn:focus {
	border: none;
}

/**
---------------------------
SOCIAL ICON
---------------------------
**/
p.social-icon {
	margin: 10px 0 50px;
}
.icon-rounded{
	border-radius: 5px;
	text-align: center;
	display: inline-block;
}
.icon-sm{
	width: 40px;
	height: 40px;
	font-size: 20px;
	padding: 10px 0;
}
.icon-social-footer{
	margin-right: 5px;
	margin-top: 5px;
	font-size: 16px;
	padding-top: 13px;
	background: #1A212B;
}
.icon-social-footer.icon-facebook,
.icon-social-footer.icon-facebook:hover,
.icon-social-footer.icon-facebook:focus,
a .icon-social-footer.icon-facebook,
a .icon-social-footer.icon-facebook:hover,
a .icon-social-footer.icon-facebook:focus{
	background-color: #3B5A98;
	color: #fff;
}
.icon-social-footer.icon-twitter,
.icon-social-footer.icon-twitter:hover,
.icon-social-footer.icon-twitter:focus,
a .icon-social-footer.icon-twitter,
a .icon-social-footer.icon-twitter:hover,
a .icon-social-footer.icon-twitter:focus{
	background-color: #3490D3;
	color: #fff;
}
.icon-social-footer.icon-google-plus,
.icon-social-footer.icon-google-plus:hover,
.icon-social-footer.icon-google-plus:focus,
a .icon-social-footer.icon-google-plus,
a .icon-social-footer.icon-google-plus:hover,
a .icon-social-footer.icon-google-plus:focus{
	background-color: #BC2C1F;
	color: #fff;
}
.icon-social-footer.icon-dribbble,
.icon-social-footer.icon-dribbble:hover,
.icon-social-footer.icon-dribbble:focus,
a .icon-social-footer.icon-dribbble,
a .icon-social-footer.icon-dribbble:hover,
a .icon-social-footer.icon-dribbble:focus{
	background-color: #D33471;
	color: #fff;
}
.icon-social-footer.icon-flickr,
.icon-social-footer.icon-flickr:hover,
.icon-social-footer.icon-flickr:focus,
a .icon-social-footer.icon-flickr,
a .icon-social-footer.icon-flickr:hover,
a .icon-social-footer.icon-flickr:focus{
	background-color: #0555BF;
	color: #fff;
}
.icon-social-footer.icon-pinterest,
.icon-social-footer.icon-pinterest:hover,
.icon-social-footer.icon-pinterest:focus,
a .icon-social-footer.icon-pinterest,
a .icon-social-footer.icon-pinterest:hover,
a .icon-social-footer.icon-pinterest:focus{
	background-color: #B70F12;
	color: #fff;
}
.icon-social-footer.icon-youtube,
.icon-social-footer.icon-youtube:hover,
.icon-social-footer.icon-youtube:focus,
a .icon-social-footer.icon-youtube,
a .icon-social-footer.icon-youtube:hover,
a .icon-social-footer.icon-youtube:focus{
	background-color: #C91212;
	color: #fff;
}
.icon-social-footer.icon-dropbox,
.icon-social-footer.icon-dropbox:hover,
.icon-social-footer.icon-dropbox:focus,
a .icon-social-footer.icon-dropbox,
a .icon-social-footer.icon-dropbox:hover,
a .icon-social-footer.icon-dropbox:focus{
	background-color: #0864B2;
	color: #fff;
}
.icon-social-footer.icon-foursquare,
.icon-social-footer.icon-foursquare:hover,
.icon-social-footer.icon-foursquare:focus,
a .icon-social-footer.icon-foursquare,
a .icon-social-footer.icon-foursquare:hover,
a .icon-social-footer.icon-foursquare:focus{
	background-color: #0571A0;
	color: #fff;
}
.icon-social-footer.icon-github,
.icon-social-footer.icon-github:hover,
.icon-social-footer.icon-github:focus,
a .icon-social-footer.icon-github,
a .icon-social-footer.icon-github:hover,
a .icon-social-footer.icon-github:focus{
	background-color: #212121;
	color: #fff;
}
.icon-social-footer.icon-linkedin,
.icon-social-footer.icon-linkedin:hover,
.icon-social-footer.icon-linkedin:focus,
a .icon-social-footer.icon-linkedin,
a .icon-social-footer.icon-linkedin:hover,
a .icon-social-footer.icon-linkedin:focus{
	background-color: #036C8E;
	color: #fff;
}
.icon-social-footer.icon-tumblr,
.icon-social-footer.icon-tumblr:hover,
.icon-social-footer.icon-tumblr:focus,
a .icon-social-footer.icon-tumblr,
a .icon-social-footer.icon-tumblr:hover,
a .icon-social-footer.icon-tumblr:focus{
	background-color: #2E485D;
	color: #fff;
}
.icon-social-footer.icon-vimeo,
.icon-social-footer.icon-vimeo:hover,
.icon-social-footer.icon-vimeo:focus,
a .icon-social-footer.icon-vimeo,
a .icon-social-footer.icon-vimeo:hover,
a .icon-social-footer.icon-vimeo:focus{
	background-color: #0D9DD1;
	color: #fff;
}

/**
---------------------------
FOOTER
---------------------------
**/
footer{
	color : #fff;
	padding: 5px 0 60px;
	text-align: center;
}

/**
=================================
TABLET < 767px
=================================
**/
@media (max-width: 767px) {
	.counter-item{
		width: 50%;
		height: auto;
	}
}

/**
=================================
TABLET < 767px
=================================
**/
@media (max-width: 640px) {
	h1.heading{
		font-size: 40px;
	}
	.counter-item{
		width: 50%;
		height: auto;
		padding: 30px 0;
	}
	.counter-item h1{
		font-size: 40px;
	}
	.counter-item p{
		font-size: 20px;
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:id="@+id/notifMain"
    android:background="#fff"
    android:layout_width="match_parent"
    android:layout_height="50dp">
    <!--
    https://developer.android.com/guide/topics/ui/notifiers/notifications#Templates
    No higher than 64 dp
     -->

    <ImageView
        android:id="@+id/notifIcon"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_centerVertical="true"
        android:padding="5dp"
        android:src="@mipmap/icon_app"/>

    <TextView
        android:id="@+id/notifHeader"
        tools:text="Time = 2018-01-23 01:23:45.678"
        android:textColor="#444"
        android:layout_toEndOf="@id/notifIcon"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="14dp"/>

    <TextView
        android:id="@+id/notifTemperature"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toEndOf="@id/notifIcon"
        android:layout_below="@id/notifHeader"
        style="@style/baseText"
        android:textSize="26dp"
        tools:text="30.0 °C"/>

    <LinearLayout
        android:layout_toEndOf="@id/notifTemperature"
        android:layout_below="@id/notifHeader"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/notifVoltage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="@style/notifText"
            tools:text="4000 mV"/>

        <TextView
            android:id="@+id/notifVoltage2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="@style/notifText"
            android:visibility="gone"
            tools:text="4020 mV"/>

        <TextView
            android:id="@+id/notifCurrent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="@style/notifText"
            tools:text="123 mA"/>

        <TextView
            android:id="@+id/notifCurrent2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:visibility="gone"
            style="@style/notifText"
            tools:text="12345 mA"/>
    </LinearLayout>

</RelativeLayout>


text:
Refer these documents as a guide to all other relevant documents for the version of Apollo that you would like to build out.

- [Apollo 5.5](apollo_5.5_technical_tutorial.md)
- [Apollo 5.0](apollo_5.0_technical_tutorial.md)
- [Apollo 3.5](apollo_3.5_technical_tutorial.md)
- [Apollo 3.0](apollo_3.0_technical_tutorial.md)
- [Apollo 3.0 中文版](apollo_3.0_technical_tutorial_cn.md)
- [Apollo 2.5](apollo_2.5_technical_tutorial.md)
- [Navigation Mode中文版](navigation_mode_tutorial_cn.md)
- [Apollo Best Coding Practice](apollo_best_coding_practice.md)


text:
class AttrExtras::AttrImplement
  def initialize(klass, names)
    @klass, @names = klass, names.dup
  end

  def apply
    arg_names = @names.last.is_a?(Array) ? @names.pop : []
    expected_arity = arg_names.length

    # Make available within the block.
    names = @names

    mod = Module.new do
      define_method :method_missing do |name, *args|
        if names.include?(name)
          provided_arity = args.length

          if provided_arity != expected_arity
            raise ArgumentError, "wrong number of arguments (#{provided_arity} for #{expected_arity})"
          end

          raise AttrExtras::MethodNotImplementedError, "Implement a '#{name}(#{arg_names.join(", ")})' method"
        else
          super(name, *args)
        end
      end
    end

    # include is private in Ruby 2.0 and earlier.
    @klass.send(:include, mod)
  end
end


text:
package fr.cvlaminck.builders.uri;

import fr.cvlaminck.builders.Builder;
import fr.cvlaminck.builders.authority.AuthorityBuilderOperations;
import fr.cvlaminck.builders.path.PathBuilderOperations;
import fr.cvlaminck.builders.query.QueryParametersBuilderOperations;

public interface UriBuilder
        extends UriBuilderOperations<UriBuilder>, AuthorityBuilderOperations<UriBuilder>,
        PathBuilderOperations<UriBuilder>, QueryParametersBuilderOperations<UriBuilder>,
        Builder<Uri> {
}


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

<title>edu.mit.appinventor.raspberrypi</title>
<meta name="date" content="2016-08-02">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

edu.mit.appinventor.raspberrypi

Classes

BoardTest

ListenerService

PinRegistry

Server

TopicRegistry


text:
class Class
  def load_for_delayed_job(arg)
    self
  end

  def dump_for_delayed_job
    name
  end
end

module Delayed
  class PerformableMethod < Struct.new(:object, :method, :args)
    STRING_FORMAT = /^LOAD\;([A-Z][\w\:]+)(?:\;(\w+))?$/

    class LoadError < StandardError
    end

    def initialize(object, method, args)
      raise NoMethodError, "undefined method `#{method}' for #{object.inspect}" unless object.respond_to?(method, true)

      self.object = dump(object)
      self.args   = args.map { |a| dump(a) }
      self.method = method.to_sym
    end

    def display_name
      if STRING_FORMAT === object
        "#{$1}#{$2 ? '#' : '.'}#{method}"
      else
        "#{object.class}##{method}"
      end
    end

    def perform
      load(object).send(method, *args.map{|a| load(a)})
    rescue PerformableMethod::LoadError
      # We cannot do anything about objects that can't be loaded
      true
    end

    private

    def load(obj)
      if STRING_FORMAT === obj
        $1.constantize.load_for_delayed_job($2)
      else
        obj
      end
    rescue => e
      Delayed::Worker.logger.warn "Could not load object for job: #{e.message}"
      raise PerformableMethod::LoadError
    end

    def dump(obj)
      if obj.respond_to?(:dump_for_delayed_job)
        "LOAD;#{obj.dump_for_delayed_job}"
      else
        obj
      end
    end
  end
end


text:
/**
 * Centerer.h
 *
 * Centers and scales opengl content within an area to fill
 * the screen.
 *
 * You set this up with your desired resolution, then you
 * do your drawing between begin() and end(). You also send
 * all your
 *
 * Created by Marek Bereza on 19/07/2011.
 *
 */
#include "ofMain.h"

#pragma once

class Centerer {
public:

	void setup(float width, float height) {

		this->width = width;
		this->height = height;

	}

	void begin() {
		fakeGameModeScale = (float)ofGetHeight()/height;
		resizedScreenWidth = (float)ofGetWidth()/fakeGameModeScale;
		moveRightBy = (resizedScreenWidth - width)/2;
		//printf("Scale %f\nScreen Width: %f\nmoveRightBy: %f\n", fakeGameModeScale, resizedScreenWidth, moveRightBy);
		// do a fake OF_GAME_MODE - the real one locks up the computer when it crashes
		ofPushMatrix();
		ofScale(fakeGameModeScale, fakeGameModeScale, fakeGameModeScale);
		ofTranslate(moveRightBy, 0, 0);
	}

	void end() {
		ofSetHexColor(0);
		// letterbox
		ofRect(-1000, 0, 1000, height);
		ofRect(width, 0, 1000, height);
		ofPopMatrix();
	}

	void transformMouse(ofMouseEventArgs &m) {
		//printf("Transformed %.0f %.0f", m.x, m.y);
		transformMouse(m.x, m.y);
		//printf("   to %.0f %.0f\n", m.x, m.y);
	}

	void transformMouse(float &x, float &y) {
		x /= fakeGameModeScale;
		y /= fakeGameModeScale;
		x -= moveRightBy;
	}

private:
	float fakeGameModeScale;
	float resizedScreenWidth;
	float moveRightBy;

	float width;
	float height;
};


text:
package jalf.relation.algebra;

import java.util.Arrays;
import java.util.List;

import jalf.AttrList;
import jalf.Relation;
import jalf.Visitor;
import jalf.type.RelationType;

public class Intersect extends BinaryOperator{

    private final Relation left;

    private final Relation right;

    private final RelationType type;

    public Intersect(RelationType type, Relation left, Relation right) {
        this.left = left;
        this.right = right;
        this.type = type;
    }

    public Intersect(Relation left, Relation right){
        this.left = left;
        this.right = right;
        this.type = typeCheck();
    }

    @Override
    public RelationType getType() {
        return type;
    }

    @Override
    public Relation getLeft() {
        return left;
    }

    @Override
    public Relation getRight() {
        return right;
    }

    /**
     * Return the attributes on which the intersect operates.
     * @return left attributes as an AttrList instance.
     */
    public AttrList getIntersectAttrList() {
        AttrList leftAttrs = left.getType().toAttrList();
        return leftAttrs;
    }

    @Override
    protected RelationType typeCheck() {
        return left.getType().intersect(right.getType());
    }

    @Override
    public List<Object> getArguments() {
        return Arrays.asList();
    }

    @Override
    public <R> R accept(Visitor<R> visitor) {
        return visitor.visit(this);
    }

}


text:
define([
    "entity-components/EC_Sound"
    ], function(EC_Sound) {

/**
    This is implementation of EC_Sound using Web Audio API.

    @class EC_Sound_WebAudio
    @extends EC_Sound
    @constructor
*/
var EC_Sound_WebAudio = EC_Sound.$extend(
{
    __init__ : function(id, typeId, typeName, name)
    {
        this.$super(id, typeId, typeName, name);
    },

    __classvars__ :
    {
        Implementation : "webaudio"
    },

    /**
        Called only ONCE when the component is initialized
    */
    update : function()
    {
        this.cache = {
            _soundGainNode: Tundra.audio.context.createGain(),
            _position: new THREE.Vector3(),
            _pannerNode: Tundra.audio.context.createPanner(),
            _placeable: undefined
        };

        this.cache._soundGainNode.gain.value = this.soundGain;

        this.cache._pannerNode.setPosition(this.cache._position.x, this.cache._position.y, this.cache._position.z);
        this.cache._pannerNode.connect(Tundra.audio.masterGainNode);

        this.checkAndUpdatePlaceable();
        this.checkAndUpdateSoundRef();

        // Register events listener for creating/removing placeable components
        this.parentEntity.onComponentCreated(this, this.onComponentCreated);
        this.parentEntity.onComponentRemoved(this, this.onComponentRemoved);
    },

    reset : function()
    {
        this.disposeSource();
    },

    disposeSource : function()
    {
        if (this.cache._element)
            this.cache._element.pause();

        if (this.cache._source)
            this.cache._source.disconnect();

        this.cache._element = undefined;
        this.cache._source = undefined;
    },

    play: function()
    {
        if (this.cache._element)
            this.cache._element.play();
    },

    stop: function()
    {
        if (this.cache._element)
        {
            this.cache._element.pause();
            this.cache._element.currentTime = 0;
        }
    },

    pause: function()
    {
        if (this.cache._element)
            this.cache._element.pause();
    },

    checkAndUpdateSoundRef: function()
    {
        if (this.soundRef)
        {
            this.disposeSource();

            var _element = new Audio(this.soundRef);
            _element.crossOrigin = "anonymous";

            if (this.cache._source)
                this.cache._source.disconnect();

            this.cache._element = _element;
            this.cache._source = Tundra.audio.context.createMediaElementSource(_element);

            if (this.playOnLoad)
            {
                // Setting it to false still performs autoplay,
                // so set it only if playOnLoad
                _element.autoplay = true;
            }

            _element.loop = this.loopSound;

            this._reconnectSourceNode();
        }
        else
            this.disposeSource();
    },

    _reconnectSourceNode: function()
    {
        if (this.cache._source)
        {
            this.cache._source.disconnect();
            this.cache._soundGainNode.disconnect();
            this.cache._source.connect(this.cache._soundGainNode);
            this.cache._soundGainNode.connect(Tundra.audio.ambientNode);

            // Spatial is not set, connect to gain node regardless of placeable or pannerNode
            if (!this.spatial)
                this.cache._soundGainNode.connect(Tundra.audio.masterGainNode);
            // Spatial is set, pannerNode exists, placeable is available
            else if (this.spatial && this.cache._pannerNode && this.cache._placeable)
            {
                // It is safe to call disconnect() even if not connected before
                this.cache._soundGainNode.connect(this.cache._pannerNode);
            }
            else
            {
                // Something is wrong (spatial is set but no pannerNode or no placeable), just disconnect
                if (this.cache._source)
                    this.cache._source.disconnect();
            }
        }
    },

    _updatePosition: function()
    {
        if (this.cache._pannerNode && this.cache._placeable)
        {
            this.parentEntity.placeable.worldPosition(this.cache._position);
            this.cache._pannerNode.setPosition(this.cache._position.x, this.cache._position.y, this.cache._position.z);
        }
    },

    checkAndUpdatePlaceable: function()
    {
        /* If there is already a placeable attached do nothing (only first placeable component is considered) */
        if (this.cache._placeable)
            return;

        /* Otherwise, get read its initial position and attach an attribute change listener to it */
        if (this.hasParentEntity() && this.parentEntity.placeable)
        {
            this.cache._placeable = this.parentEntity.placeable;
            this._updatePosition();

            // TODO: Check if unsubscribe is required later
            this.parentEntity.placeable.onAttributeChanged(this, this.onPlaceableAttributeChanged);
        }
    },

    onComponentCreated: function(ent, component)
    {
        // Check if the created component is Placeable
        if (component.typeId == 20)
        {
            this.checkAndUpdatePlaceable();
            this._reconnectSourceNode();
        }
    },

    onComponentRemoved: function(ent, component)
    {
        /* Check if the removed component is Placeable and the same placeable cached */
        if (component.typeId == 20 && this.cache._placeable && this.cache._placeable.id === component.id)
        {
            this.cache._placeable = undefined;
            this._reconnectSourceNode();
        }
    },

    onPlaceableAttributeChanged: function(entity, component, attributeIndex, attributeName, attributeValue)
    {
        if (attributeIndex == 0) // transform
            this._updatePosition();
    },

    changeGain: function()
    {
        if (this.cache._soundGainNode)
            this.cache._soundGainNode.gain.value = this.soundGain;
    },

    changeLoopSound: function()
    {
        if (this.cache._element)
            this.cache._element.loop = this.loopSound;
    },

    attributeChanged : function(index, name, value)
    {
        switch(index)
        {
            case 0: // soundRef
                this.checkAndUpdateSoundRef();
                break;
            case 3: // soundGain
                this.changeGain();
                break;
            case 4: // playOnLoad
                if (value)
                    this.play();
                break;
            case 5: // loopSound
                this.changeLoopSound();
                break;
            case 6: // spatial
                this._reconnectSourceNode();
                break;
            default:
                break;
        }
    }
});

return EC_Sound_WebAudio;

}); // require js


text:
/**
 *
 */
package stone.mvc.result.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import stone.exception.StoneWebException;
import stone.mvc.RequestContext;
import stone.mvc.result.ResultHandler;
import stone.mvc.views.ViewHandler;
import stone.mvc.views.ViewHandlerResolver;

/**
 * @author langhsu
 *
 */
public class StringHandler implements ResultHandler<String> {
	private Logger log = LoggerFactory.getLogger(getClass());

	private ViewHandlerResolver viewHandlerResolver;

	private String defaultType = "jsp";

	private ViewHandler defaultHandler;

	@Override
	public void init() {
		viewHandlerResolver = new ViewHandlerResolver();
		try {
			viewHandlerResolver.init();

			defaultHandler = viewHandlerResolver.lookup(defaultType);
			if (defaultHandler == null) {
				throw new IllegalStateException(
						"Cannot find the default view resolver: " + defaultType);
			}
		} catch (Exception e) {
			log.error(e.getMessage(), e);
		}
	}

	@Override
	public void handle(RequestContext ctx, String result) throws Exception {
		ViewHandler viewHandler = null;

		String url;
		if (result == null) {
			url = ctx.getPath();
		} else {
			int ipos = result.indexOf(':');
			if (ipos > 0) {
				// 根据 URL 前缀查找 view
				String type = result.substring(0, ipos);
				url = result.substring(ipos + 1);
				viewHandler = viewHandlerResolver.lookup(type);
				if (viewHandler == null) {
					throw new StoneWebException(
							"Can't find view resolver for path: " + result);
				}
			} else {
				url = result;
			}
		}

		if (viewHandler == null) {
			// 根据后缀名查找 view
			String suffix = getFileExtension(result);
			if (suffix != null) {
				viewHandler = viewHandlerResolver.lookup(suffix);
				if (viewHandler == null) {
					throw new StoneWebException("Can't find view resolver for path: " + result);
				}
			}
		}

		if (viewHandler == null) {
			// 使用默认配置 view
			viewHandler = defaultHandler;
		}

		viewHandler.render(ctx, url);
	}

	public static String getFileExtension(final String path) {
		if (path == null) {
			return null;
		}
		int extIndex = path.lastIndexOf('.');
		if (extIndex == -1) {
			return null;
		}
		return path.substring(extIndex + 1);
	}
}


text:
class SorceryCore < <%= migration_class_name %>
  def change
    create_table :<%= tableized_model_class %> do |t|
      t.string :email,            null: false, index: { unique: true }
      t.string :crypted_password
      t.string :salt

      t.timestamps                null: false
    end
  end
end


text:
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.objects.photos.responses;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.vk.api.sdk.objects.Validable;
import java.util.Objects;

/**
 * OwnerUploadResponse object
 */
public class OwnerUploadResponse implements Validable {
    /**
     * Uploading hash
     */
    @SerializedName("hash")
    private String hash;

    /**
     * Uploaded photo data
     */
    @SerializedName("photo")
    private String photo;

    /**
     * Upload server number
     */
    @SerializedName("server")
    private Integer server;

    public String getHash() {
        return hash;
    }

    public OwnerUploadResponse setHash(String hash) {
        this.hash = hash;
        return this;
    }

    public String getPhoto() {
        return photo;
    }

    public OwnerUploadResponse setPhoto(String photo) {
        this.photo = photo;
        return this;
    }

    public Integer getServer() {
        return server;
    }

    public OwnerUploadResponse setServer(Integer server) {
        this.server = server;
        return this;
    }

    @Override
    public int hashCode() {
        return Objects.hash(server, photo, hash);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OwnerUploadResponse ownerUploadResponse = (OwnerUploadResponse) o;
        return Objects.equals(server, ownerUploadResponse.server) &&
                Objects.equals(photo, ownerUploadResponse.photo) &&
                Objects.equals(hash, ownerUploadResponse.hash);
    }

    @Override
    public String toString() {
        final Gson gson = new Gson();
        return gson.toJson(this);
    }

    public String toPrettyString() {
        final StringBuilder sb = new StringBuilder("OwnerUploadResponse{");
        sb.append("server=").append(server);
        sb.append(", photo='").append(photo).append("'");
        sb.append(", hash='").append(hash).append("'");
        sb.append('}');
        return sb.toString();
    }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.murillo.sdp;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 *
 * @author Sergio
 */
public class FormatAttribute implements Attribute {

    private Integer fmt;
    private LinkedHashMap<String,String> parameters;

    public FormatAttribute() {
	this.parameters = new LinkedHashMap<String,String>();
    }

    public FormatAttribute(Integer fmt) {
        this.fmt = fmt;
        this.parameters = new LinkedHashMap<String,String>();
    }

    public FormatAttribute(Integer fmt, String parameters) {
        this.fmt = fmt;
        this.parameters = new LinkedHashMap<String,String>();
	//Set them
	setParameters(parameters);
    }

    @Override
    public FormatAttribute clone() {
	    //Clone it
	    FormatAttribute cloned = new FormatAttribute(fmt);
	    //Add parameters
	    for (Map.Entry<String,String> parameter : parameters.entrySet())
		    //Add it to clone
		    cloned.addParameter(parameter.getKey(), parameter.getValue());
	    //Return cloned one
	    return cloned;
    }

    @Override
    public String getField() {
        return "fmtp";
    }

    @Override
    public String getValue() {
        String string  = "";
	//For each parameter
	for (Map.Entry<String,String> entry : parameters.entrySet())
	{
		//Add separator
	       if (string.isEmpty())
		   string += " " + entry.getKey();
	       else
		   string += "; " + entry.getKey();
	       //If got value
	       if (entry.getValue()!=null)
		       //Append it
		       string += "="+entry.getValue();
	}
	return  fmt + string;
    }

    @Override
    public String toString() {
        //Get value
        String value = getValue();
        //Generic attr
        return "a="+ getField() + (value!=null ? ":" + value : "") + "\r\n";
    }

    public Integer getFmt() {
        return fmt;
    }

    public void setFmt(Integer fmt) {
        this.fmt = fmt;
    }

    public Map<String,String> getParameters() {
        return parameters;
    }

    public void setParameters(String parameters) {
        //Split by ;
	for (String param : parameters.split(";"))
	{
		//Remove spaces, and split by =
		String[] vals =param.trim().split("=");
		//Add to map
		this.parameters.put(vals[0].trim(), vals.length>1?vals[1].trim():null);
	}
    }

    public void addParameter(String parameter) {

    }
    public void addParameter(String key,String val) {
        parameters.put(key, val);
    }
    public void addParameter(String key,Integer val) {
        addParameter(key,val.toString());
    }

    public boolean isEmpty() {
	return parameters!=null ? parameters.isEmpty() : true;
    }

}


text:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Xaml;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Controls;
using TAlex.WPF.Helpers;
using NUnit.Framework;

namespace TAlex.WPF.Controls.Tests.Helpers
{
    [TestFixture]
    public class WPFVisualHelperTests
    {
        #region FindAncestor

        [Test]
        [STAThread]
        public void FindAncestor_SomeDependencyObject_Ancestor()
        {
            //arrange
            FrameworkElement visualTree = XamlServices.Parse(@"
                <Grid xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
		            <StackPanel Orientation=""Horizontal"">
			            <Image x:Name=""itemImage"" />
			            <TextBlock Text=""Some Text"" />
		            </StackPanel>
                </Grid>
                ") as FrameworkElement;

            //action
            DependencyObject foundElement = WPFVisualHelper.FindAncestor<Grid>(visualTree.FindName("itemImage") as DependencyObject);

            //assert
            Assert.IsNotNull(foundElement);
        }

        [Test]
        [STAThread]
        public void FindAncestor_FindNotExistingAncestor_Null()
        {
            //arrange
            FrameworkElement visualTree = XamlServices.Parse(@"
                <Grid xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
		            <StackPanel Orientation=""Horizontal"">
			            <Image x:Name=""itemImage"" />
			            <TextBlock Text=""Some Text"" />
		            </StackPanel>
                </Grid>
                ") as FrameworkElement;

            //action
            DependencyObject notFoundElement = WPFVisualHelper.FindAncestor<WrapPanel>(visualTree.FindName("itemImage") as DependencyObject);

            //assert
            Assert.IsNull(notFoundElement);
        }

        [Test]
        public void FindAncestor_NotVisualElement_Null()
        {
            //arrange
            DependencyObject visualTree = XamlServices.Parse(@"
                <Hyperlink xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
		            Some Text
                </Hyperlink>
                ") as DependencyObject;

            //action
            DependencyObject item = WPFVisualHelper.FindAncestor<TextBlock>(visualTree);

            //assert
            Assert.IsNull(item);
        }

        #endregion
    }
}


text:
package necat.bootstrap;

public interface NxBootstrap {

}


text:
package com.github.obiteaaron.commons.util;

/**
 * code come from {@code org.elasticsearch.common.Strings}
 * 一些字符串工具
 *
 * @author Obite Aaron
 * @since 1.0
 */
public final class Strings {
    /**
     * 转换成驼峰格式
     */
    public static String toCamelCase(String value) {
        return toCamelCase(value, (StringBuilder) null);
    }

    /**
     * 转换成驼峰格式
     */
    public static String toCamelCase(String value, StringBuilder sb) {
        boolean changed = false;

        for (int i = 0; i < value.length(); ++i) {
            char c = value.charAt(i);
            if (c == 95 && i > 0) {
                if (!changed) {
                    if (sb != null) {
                        sb.setLength(0);
                    } else {
                        sb = new StringBuilder();
                    }

                    for (int j = 0; j < i; ++j) {
                        sb.append(value.charAt(j));
                    }

                    changed = true;
                }

                if (i < value.length() - 1) {
                    ++i;
                    sb.append(Character.toUpperCase(value.charAt(i)));
                }
            } else if (changed) {
                sb.append(c);
            }
        }

        if (!changed) {
            return value;
        } else {
            return sb.toString();
        }
    }

    /**
     * 转换成下划线格式
     */
    public static String toUnderscoreCase(String value) {
        return toUnderscoreCase(value, (StringBuilder) null);
    }

    /**
     * 转换成下划线格式
     */
    public static String toUnderscoreCase(String value, StringBuilder sb) {
        boolean changed = false;

        for (int i = 0; i < value.length(); ++i) {
            char c = value.charAt(i);
            if (!Character.isUpperCase(c)) {
                if (changed) {
                    sb.append(c);
                }
            } else if (changed) {
                sb.append('_');
                sb.append(Character.toLowerCase(c));
            } else {
                if (sb != null) {
                    sb.setLength(0);
                } else {
                    sb = new StringBuilder();
                }

                for (int j = 0; j < i; ++j) {
                    sb.append(value.charAt(j));
                }

                changed = true;
                if (i == 0) {
                    sb.append(Character.toLowerCase(c));
                } else {
                    sb.append('_');
                    sb.append(Character.toLowerCase(c));
                }
            }
        }

        if (!changed) {
            return value;
        } else {
            return sb.toString();
        }
    }

    /**
     * 模式串pattern和字符串content是否匹配
     *
     * @param pattern 模式串,支持*号模糊多个匹配和?号单个匹配
     * @param content 字符串
     * @return true 匹配 | false 不匹配
     */
    public static boolean match(String pattern, String content) {
        return WildcardCharacter.test(pattern, content);
    }

    /**
     * 模式串pattern和字符串content是否匹配,支持*号模糊多个匹配和?号单个匹配
     */
    private static class WildcardCharacter {
        /**
         * @param pattern 匹配模式
         * @param content 待匹配内容
         * @param p       匹配模式的当前字符位置
         * @param c       内容的当前字符位置
         * @return true 匹配 | false 不匹配
         */
        static boolean match(String pattern, String content, int p, int c) {
            // if we reatch both end of two string, we are done
            if (pattern.length() == p && content.length() == c)
                return true;
            /** make sure that the characters after '*' are present in second string.
             this function assumes that the first string will not contain two
             consecutive '*'*/
            if (pattern.length() > p && '*' == pattern.charAt(p) && pattern.length() > p + 1 && content.length() == c)
                return match(pattern, content, p + 1, c);
            /** if the first string contains '?', or current characters of both strings match */
            if (pattern.length() > p && content.length() > c && ('?' == pattern.charAt(p) || pattern.charAt(p) == content.charAt(c)))
                return match(pattern, content, p + 1, c + 1);
            /** if there is *, then there are two possibilities
             a) We consider current character of second string
             b) We ignore current character of second string.*/
            if (pattern.length() > p && '*' == pattern.charAt(p))
                return match(pattern, content, p + 1, c) || match(pattern, content, p, c + 1);
            return false;
        }

        /**
         * @param pattern 匹配模式
         * @param content 待匹配内容
         * @return true 匹配 | false 不匹配
         */
        static boolean test(String pattern, String content) {
            if (null == pattern || null == content)
                return false;
            pattern = pattern.replaceAll("\\*{2,}", "*");
            return match(pattern, content, 0, 0);
        }
    }
}


text:
/* !!!! GENERATED FILE - DO NOT EDIT !!!! */

/*
 * Copyright (c) 2014 liblcf authors
 * This file is released under the MIT License
 * http://opensource.org/licenses/MIT
 */

// Headers
#include "rpg_troopmember.h"

/**
 * Constructor.
 */
RPG::TroopMember::TroopMember() {
	ID = 0;
	enemy_id = 1;
	x = 0;
	y = 0;
	invisible = false;
}


text:
<!DOCTYPE HTML>

    <title>Ice Cores</title>
    <meta charset="utf-8">

    WebGL Globe • Created by the Google Data Arts Team • Data acquired from NCDC

    All
    Accumulation
    Black Carbon
    Melt Layer

    Measurements

    This is a Chrome Experiment