text:
(function() {

	// converts a point at (lat, lng) and a given altitue above the earth
	// to a point in 3d space.  (0,0,0) is the centre of the earth and
	// an altitude of 1 is the surface of the earth
	function getPosition(lat, lng, alt){

		var pos = {};

		pos.y = (lat / 90) * (earthHeight / 2);
		pos.x = (lng / 180) * (earthWidth / 2);
		pos.z = alt;

		return pos;
	}

	function createScene(){
		// create the scene
		var scene = new THREE.Scene();

		return scene
	}

	function createEarth(width, height) {
		return new THREE.Mesh(new THREE.PlaneGeometry( width, height )
		   , new THREE.MeshPhongMaterial({
			map : THREE.ImageUtils.loadTexture('images/2_no_clouds_4k.jpg')
			}));
	}

	function createBackgroundLight(){
		return new THREE.AmbientLight( 0x999999 ); // soft white light
	}

	function createPointCloud() {
		attributes = {

			size: {	type: 'f', value: [] },
			customColor: { type: 'c', value: [] },
			lifeTime: { type: 'f', value: []}
		};

		var uniforms = {

			amplitude: { type: "f", value: 1.0 },
			color:     { type: "c", value: new THREE.Color( 0xffffff ) },
			texture:   { type: "t", value: THREE.ImageUtils.loadTexture( "images/spark.png" ) },

		};

		var shaderMaterial = new THREE.ShaderMaterial( {

			uniforms:       uniforms,
			attributes:     attributes,
			vertexShader:   document.getElementById( 'vertexshader' ).textContent,
			fragmentShader: document.getElementById( 'fragmentshader' ).textContent,

			blending:       THREE.AdditiveBlending,
			depthTest:      false,
			transparent:    true

		});

		var geometry = new THREE.Geometry();

		values_size = attributes.size.value;
		values_color = attributes.customColor.value;

		for ( var i = 0; i < countParticles; i ++ ) {

			var vertex = new THREE.Vector3();
			vertex.x = Number.POSITIVE_INFINITY;
			vertex.y = Number.POSITIVE_INFINITY;
			vertex.z = Number.POSITIVE_INFINITY;

			geometry.vertices.push( vertex );

			values_size[ i ] = 0.1;
			values_color[ i ] = new THREE.Color( 0xffaa00 );

		}

		var pointCloud = new THREE.PointCloud( geometry, shaderMaterial );

		return pointCloud;
	}

	function startLight(lat, lng, lifeTime){
		var timeNow = new Date().getTime();
		var index = -1;
		for ( var i = 0; i < countParticles; i ++ ) {
			if(attributes.lifeTime.value[i] == undefined || timeNow > attributes.lifeTime.value[i]) {
				index = i;

				if(index > maxParticles){
					console.log(index);
					maxParticles = index;
				}

				break;
			}
		}

		if(index > -1){
			attributes.lifeTime.value[index] = timeNow + lifeTime;

			var pos = getPosition(lat, lng, 0.02);

			pointCloud.geometry.vertices[index].x = pos.x;
			pointCloud.geometry.vertices[index].y = pos.y;
			pointCloud.geometry.vertices[index].z = pos.z;

		}
	}

	function render() {
		controls.update();

		var timeNow = new Date().getTime();

		for ( var i = 0; i < countParticles; i ++ ) {
			if(timeNow > attributes.lifeTime.value[i]) {
				pointCloud.geometry.vertices[i].x = Number.POSITIVE_INFINITY;
				pointCloud.geometry.vertices[i].y = Number.POSITIVE_INFINITY;
				pointCloud.geometry.vertices[i].z = Number.POSITIVE_INFINITY;
			}
		}

		pointCloud.geometry.verticesNeedUpdate = true;

		requestAnimationFrame(render);
		renderer.render(scene, camera);
	}

	// does the browser support web gl?
	if (!Detector.webgl) {
		Detector.addGetWebGLMessage(webglEl);
		return;
	}

	var width = window.innerWidth;
	var height = window.innerHeight;
	var earthWidth = 4;
	var earthHeight = 2;
	var values_size, values_color;
	var countParticles = 50000;
	var attributes;
	var maxParticles = 0;

	var scene = createScene();

	var earth = createEarth(earthWidth, earthHeight);
	scene.add(earth);

	var light = createBackgroundLight();
	scene.add(light);

	var pointCloud = createPointCloud();
	scene.add(pointCloud);

	// create the camera
	var camera = new THREE.PerspectiveCamera(45, width / height, 0.01, 1000);
	camera.position.z = 2.5;
	camera.position.y = -1;

	// create controls
	var controls = new THREE.OrbitControls(camera);
	controls.noRotate = true;

	// create renderer
	var renderer = new THREE.WebGLRenderer();
	renderer.setSize(width, height);
	var webglEl = document.getElementById('webgl');
	webglEl.appendChild(renderer.domElement);

	var socket = io();

	socket.on('tweet', function(coord) {
		startLight(coord.lat, coord.lng, 10000);
	});

	render();

}());


text:
"""EvaluationScore factory class.
"""

import logging

from . import eval_scores

class EvaluationScoreWorkerFactory(object):
  """Factory class used to instantiate evaluation score workers.

  The ctor gets the parametrs that are used to instatiate the evaluation score
  workers.
  """

  def __init__(self, polqa_tool_bin_path):
    self._polqa_tool_bin_path = polqa_tool_bin_path

  def GetInstance(self, evaluation_score_class):
    """Creates an EvaluationScore instance given a class object.

    Args:
      evaluation_score_class: EvaluationScore class object (not an instance).
    """
    logging.debug(
        'factory producing a %s evaluation score', evaluation_score_class)
    if evaluation_score_class == eval_scores.PolqaScore:
      return eval_scores.PolqaScore(self._polqa_tool_bin_path)
    else:
      # By default, no arguments in the constructor.
      return evaluation_score_class()

redpajama_set_name: RedPajamaGithub


text:
import styled from 'glamorous'

export const InstantMessages = styled.div({
  backgroundColor: '#ffffff',
  width: '100%',
  flex: '1 100%',
  display: 'flex',
})


text:
// <copyright file="Proxy.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;

namespace OpenQA.Selenium
{
    /// <summary>
    /// Describes the kind of proxy.
    /// </summary>
    /// <remarks>
    /// Keep these in sync with the Firefox preferences numbers:
    /// http://kb.mozillazine.org/Network.proxy.type
    /// </remarks>
    public enum ProxyKind
    {
        /// <summary>
        ///  Direct connection, no proxy (default on Windows).
        /// </summary>
        Direct = 0,

        /// <summary>
        /// Manual proxy settings (e.g., for httpProxy).
        /// </summary>
        Manual,

        /// <summary>
        /// Proxy automatic configuration from URL.
        /// </summary>
        ProxyAutoConfigure,

        /// <summary>
        /// Use proxy automatic detection.
        /// </summary>
        AutoDetect = 4,

        /// <summary>
        /// Use the system values for proxy settings (default on Linux).
        /// </summary>
        System,

        /// <summary>
        /// No proxy type is specified.
        /// </summary>
        Unspecified
    }

    /// <summary>
    /// Describes proxy settings to be used with a driver instance.
    /// </summary>
    [JsonObject(MemberSerialization.OptIn)]
    public class Proxy
    {
        private ProxyKind proxyKind = ProxyKind.Unspecified;
        private bool isAutoDetect;
        private string ftpProxyLocation;
        private string httpProxyLocation;
        private string noProxy;
        private string proxyAutoConfigUrl;
        private string sslProxyLocation;
        private string socksProxyLocation;
        private string socksUserName;
        private string socksPassword;

        /// <summary>
        /// Initializes a new instance of the <see cref="Proxy"/> class.
        /// </summary>
        public Proxy()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Proxy"/> class with the given proxy settings.
        /// </summary>
        /// <param name="settings">A dictionary of settings to use with the proxy.</param>
        public Proxy(Dictionary<string, object> settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings", "settings dictionary cannot be null");
            }

            if (settings.ContainsKey("proxyType"))
            {
                ProxyKind rawType = (ProxyKind)Enum.Parse(typeof(ProxyKind), settings["proxyType"].ToString(), true);
                this.Kind = rawType;
            }

            if (settings.ContainsKey("ftpProxy"))
            {
                this.FtpProxy = settings["ftpProxy"].ToString();
            }

            if (settings.ContainsKey("httpProxy"))
            {
                this.HttpProxy = settings["httpProxy"].ToString();
            }

            if (settings.ContainsKey("noProxy"))
            {
                this.NoProxy = settings["noProxy"].ToString();
            }

            if (settings.ContainsKey("proxyAutoconfigUrl"))
            {
                this.ProxyAutoConfigUrl = settings["proxyAutoconfigUrl"].ToString();
            }

            if (settings.ContainsKey("sslProxy"))
            {
                this.SslProxy = settings["sslProxy"].ToString();
            }

            if (settings.ContainsKey("socksProxy"))
            {
                this.SocksProxy = settings["socksProxy"].ToString();
            }

            if (settings.ContainsKey("socksUsername"))
            {
                this.SocksUserName = settings["socksUsername"].ToString();
            }

            if (settings.ContainsKey("socksPassword"))
            {
                this.SocksPassword = settings["socksPassword"].ToString();
            }

            if (settings.ContainsKey("autodetect"))
            {
                this.IsAutoDetect = (bool)settings["autodetect"];
            }
        }

        /// <summary>
        /// Gets or sets the type of proxy.
        /// </summary>
        [JsonIgnore]
        public ProxyKind Kind
        {
            get
            {
                return this.proxyKind;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(value);
                this.proxyKind = value;
            }
        }

        /// <summary>
        /// Gets the type of proxy as a string for JSON serialization.
        /// </summary>
        [JsonProperty("proxyType")]
        public string SerializableProxyKind
        {
            get
            {
                if (this.proxyKind == ProxyKind.ProxyAutoConfigure)
                {
                    return "PAC";
                }

                return this.proxyKind.ToString().ToUpperInvariant();
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether the proxy uses automatic detection.
        /// </summary>
        [JsonIgnore]
        public bool IsAutoDetect
        {
            get
            {
                return this.isAutoDetect;
            }

            set
            {
                if (this.isAutoDetect == value)
                {
                    return;
                }

                this.VerifyProxyTypeCompatilibily(ProxyKind.AutoDetect);
                this.proxyKind = ProxyKind.AutoDetect;
                this.isAutoDetect = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of the proxy for the FTP protocol.
        /// </summary>
        [JsonProperty("ftpProxy", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string FtpProxy
        {
            get
            {
                return this.ftpProxyLocation;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.ftpProxyLocation = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of the proxy for the HTTP protocol.
        /// </summary>
        [JsonProperty("httpProxy", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string HttpProxy
        {
            get
            {
                return this.httpProxyLocation;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.httpProxyLocation = value;
            }
        }

        /// <summary>
        /// Gets or sets the value for bypass proxy addresses.
        /// </summary>
        [JsonProperty("noProxy", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string NoProxy
        {
            get
            {
                return this.noProxy;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.noProxy = value;
            }
        }

        /// <summary>
        /// Gets or sets the URL used for proxy automatic configuration.
        /// </summary>
        [JsonProperty("proxyAutoconfigUrl", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string ProxyAutoConfigUrl
        {
            get
            {
                return this.proxyAutoConfigUrl;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.ProxyAutoConfigure);
                this.proxyKind = ProxyKind.ProxyAutoConfigure;
                this.proxyAutoConfigUrl = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of the proxy for the SSL protocol.
        /// </summary>
        [JsonProperty("sslProxy", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string SslProxy
        {
            get
            {
                return this.sslProxyLocation;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.sslProxyLocation = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of the proxy for the SOCKS protocol.
        /// </summary>
        [JsonProperty("socksProxy", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string SocksProxy
        {
            get
            {
                return this.socksProxyLocation;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.socksProxyLocation = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of username for the SOCKS proxy.
        /// </summary>
        [JsonProperty("socksUsername", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string SocksUserName
        {
            get
            {
                return this.socksUserName;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.socksUserName = value;
            }
        }

        /// <summary>
        /// Gets or sets the value of password for the SOCKS proxy.
        /// </summary>
        [JsonProperty("socksPassword", DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore)]
        public string SocksPassword
        {
            get
            {
                return this.socksPassword;
            }

            set
            {
                this.VerifyProxyTypeCompatilibily(ProxyKind.Manual);
                this.proxyKind = ProxyKind.Manual;
                this.socksPassword = value;
            }
        }

        private void VerifyProxyTypeCompatilibily(ProxyKind compatibleProxy)
        {
            if (this.proxyKind != ProxyKind.Unspecified && this.proxyKind != compatibleProxy)
            {
                string errorMessage = string.Format(
                    CultureInfo.InvariantCulture,
                    "Specified proxy type {0} is not compatible with current setting {1}",
                    compatibleProxy.ToString().ToUpperInvariant(),
                    this.proxyKind.ToString().ToUpperInvariant());

                throw new InvalidOperationException(errorMessage);
            }
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko;
using osu.Game.Tests.Visual.Navigation;
using osu.Game.Users;

namespace osu.Game.Tests.Visual.SongSelect
{
    public class TestSceneBeatmapRecommendations : OsuGameTestScene
    {
        [SetUpSteps]
        public override void SetUpSteps()
        {
            AddStep("register request handling", () =>
            {
                ((DummyAPIAccess)API).HandleRequest = req =>
                {
                    switch (req)
                    {
                        case GetUserRequest userRequest:
                            userRequest.TriggerSuccess(getUser(userRequest.Ruleset.ID));
                            return true;
                    }

                    return false;
                };
            });

            base.SetUpSteps();

            User getUser(int? rulesetID)
            {
                return new User
                {
                    Username = @"Dummy",
                    Id = 1001,
                    Statistics = new UserStatistics
                    {
                        PP = getNecessaryPP(rulesetID)
                    }
                };
            }

            decimal getNecessaryPP(int? rulesetID)
            {
                switch (rulesetID)
                {
                    case 0:
                        return 336; // recommended star rating of 2

                    case 1:
                        return 928; // SR 3

                    case 2:
                        return 1905; // SR 4

                    case 3:
                        return 3329; // SR 5

                    default:
                        return 0;
                }
            }
        }

        [Test]
        public void TestPresentedBeatmapIsRecommended()
        {
            List<BeatmapSetInfo> beatmapSets = null;
            const int import_count = 5;

            AddStep("import 5 maps", () =>
            {
                beatmapSets = new List<BeatmapSetInfo>();

                for (int i = 0; i < import_count; ++i)
                {
                    beatmapSets.Add(importBeatmapSet(i, Enumerable.Repeat(new OsuRuleset().RulesetInfo, 5)));
                }
            });

            AddAssert("all sets imported", () => ensureAllBeatmapSetsImported(beatmapSets));

            presentAndConfirm(() => beatmapSets[3], 2);
        }

        [Test]
        public void TestCurrentRulesetIsRecommended()
        {
            BeatmapSetInfo catchSet = null, mixedSet = null;

            AddStep("create catch beatmapset", () => catchSet = importBeatmapSet(0, new[] { new CatchRuleset().RulesetInfo }));
            AddStep("create mixed beatmapset", () => mixedSet = importBeatmapSet(1,
                new[] { new TaikoRuleset().RulesetInfo, new CatchRuleset().RulesetInfo, new ManiaRuleset().RulesetInfo }));

            AddAssert("all sets imported", () => ensureAllBeatmapSetsImported(new[] { catchSet, mixedSet }));

            // Switch to catch
            presentAndConfirm(() => catchSet, 1);

            // Present mixed difficulty set, expect current ruleset to be selected
            presentAndConfirm(() => mixedSet, 2);
        }

        [Test]
        public void TestBestRulesetIsRecommended()
        {
            BeatmapSetInfo osuSet = null, mixedSet = null;

            AddStep("create osu! beatmapset", () => osuSet = importBeatmapSet(0, new[] { new OsuRuleset().RulesetInfo }));
            AddStep("create mixed beatmapset", () => mixedSet = importBeatmapSet(1,
                new[] { new TaikoRuleset().RulesetInfo, new CatchRuleset().RulesetInfo, new ManiaRuleset().RulesetInfo }));

            AddAssert("all sets imported", () => ensureAllBeatmapSetsImported(new[] { osuSet, mixedSet }));

            // Make sure we are on standard ruleset
            presentAndConfirm(() => osuSet, 1);

            // Present mixed difficulty set, expect ruleset with highest star difficulty
            presentAndConfirm(() => mixedSet, 3);
        }

        [Test]
        public void TestSecondBestRulesetIsRecommended()
        {
            BeatmapSetInfo osuSet = null, mixedSet = null;

            AddStep("create osu! beatmapset", () => osuSet = importBeatmapSet(0, new[] { new OsuRuleset().RulesetInfo }));
            AddStep("create mixed beatmapset", () => mixedSet = importBeatmapSet(1,
                new[] { new TaikoRuleset().RulesetInfo, new CatchRuleset().RulesetInfo, new TaikoRuleset().RulesetInfo }));

            AddAssert("all sets imported", () => ensureAllBeatmapSetsImported(new[] { osuSet, mixedSet }));

            // Make sure we are on standard ruleset
            presentAndConfirm(() => osuSet, 1);

            // Present mixed difficulty set, expect ruleset with second highest star difficulty
            presentAndConfirm(() => mixedSet, 2);
        }

        [Test]
        public void TestCorrectStarRatingIsUsed()
        {
            BeatmapSetInfo osuSet = null, maniaSet = null;

            AddStep("create osu! beatmapset", () => osuSet = importBeatmapSet(0, new[] { new OsuRuleset().RulesetInfo }));
            AddStep("create mania beatmapset", () => maniaSet = importBeatmapSet(1, Enumerable.Repeat(new ManiaRuleset().RulesetInfo, 10)));

            AddAssert("all sets imported", () => ensureAllBeatmapSetsImported(new[] { osuSet, maniaSet }));

            // Make sure we are on standard ruleset
            presentAndConfirm(() => osuSet, 1);

            // Present mania set, expect the difficulty that matches recommended mania star rating
            presentAndConfirm(() => maniaSet, 5);
        }

        private BeatmapSetInfo importBeatmapSet(int importID, IEnumerable<RulesetInfo> difficultyRulesets)
        {
            var metadata = new BeatmapMetadata
            {
                Artist = "SomeArtist",
                AuthorString = "SomeAuthor",
                Title = $"import {importID}"
            };

            var beatmapSet = new BeatmapSetInfo
            {
                Hash = Guid.NewGuid().ToString(),
                OnlineBeatmapSetID = importID,
                Metadata = metadata,
                Beatmaps = difficultyRulesets.Select((ruleset, difficultyIndex) => new BeatmapInfo
                {
                    OnlineBeatmapID = importID * 1024 + difficultyIndex,
                    Metadata = metadata,
                    BaseDifficulty = new BeatmapDifficulty(),
                    Ruleset = ruleset,
                    StarDifficulty = difficultyIndex + 1,
                    Version = $"SR{difficultyIndex + 1}"
                }).ToList()
            };

            return Game.BeatmapManager.Import(beatmapSet).Result;
        }

        private bool ensureAllBeatmapSetsImported(IEnumerable<BeatmapSetInfo> beatmapSets) => beatmapSets.All(set => set != null);

        private void presentAndConfirm(Func<BeatmapSetInfo> getImport, int expectedDiff)
        {
            AddStep("present beatmap", () => Game.PresentBeatmap(getImport()));

            AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is Screens.Select.SongSelect);
            AddUntilStep("recommended beatmap displayed", () =>
            {
                int? expectedID = getImport().Beatmaps[expectedDiff - 1].OnlineBeatmapID;
                return Game.Beatmap.Value.BeatmapInfo.OnlineBeatmapID == expectedID;
            });
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/nmgc_log_reg_width"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:orientation="vertical" >

    <RelativeLayout
        android:id="@+id/dialog_switch_account_root"
        android:layout_width="@dimen/nmgc_log_reg_width"
        android:layout_height="@dimen/nmgc_log_reg_height"
        android:layout_marginLeft="@dimen/dialog_margin_left"
        android:layout_marginRight="@dimen/dialog_margin_right"
        android:layout_gravity="center"
        android:background="@drawable/nmgc_auto_login_dialog_bg"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/dialog_title"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dialog_title_bar_height"
            android:background="@color/transparent"
            android:gravity="center"
            android:text="@string/choice_account"
            android:textColor="#4c4d4d"
            android:textSize="18.33sp" />

        <ImageView
            android:id="@+id/dialog_switch_divider_line"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="@dimen/dialog_switch_account_Item_padding_left"
            android:layout_marginRight="@dimen/dialog_switch_account_Item_padding_left"
            android:layout_below="@id/dialog_title"
            android:layout_centerHorizontal="true"
            android:background="@drawable/keke_orange_divider"
            android:contentDescription="@null" />

        <Button
            android:id="@+id/dialog_switch_user_other_btn"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dialog_switch_account_listview_other_btn_h"
            android:layout_marginLeft="@dimen/dialog_switch_account_Item_padding_left"
            android:layout_marginRight="@dimen/dialog_switch_account_Item_padding_left"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="@dimen/dialog_switch_account_listview_other_btn_margin_top"
            android:layout_marginBottom="@dimen/dialog_switch_account_listview_other_btn_margin_bottom"
            android:background="@drawable/switch_account_btn_selector"
            android:text="@string/switch_account_use_other"
            android:textColor="#4c4d4d"
            android:textSize="@dimen/d_text_size" />

		<LinearLayout
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:layout_above="@id/dialog_switch_user_other_btn"
		    android:layout_below="@id/dialog_switch_divider_line" >
		    <com.nearme.gamecenter.open.core.view.AccountListView
		        android:id="@+id/dialog_switch_account_list_view"
		        android:layout_width="match_parent"
		        android:layout_height="wrap_content"
		        android:divider="@drawable/list_divider_horizontal"
		        android:listSelector="@color/transparent" />
		</LinearLayout>

    </RelativeLayout>

</LinearLayout>


text:
## capitalize(subjectString, [lowerCaseRest]) ⇒ String
Capitalizes the first character of a string.

**Returns**: String - A new capitalized string.
**Throws**:

- TypeError If `subjectString` is not string.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| subjectString | String |  | The string to capitalize its first character. |
| [lowerCaseRest] | Boolean | false | If true will lowercase the rest of the string. |

**Example**
```js
capitalize('hello');
// -> 'Hello'

capitalize('hElLo');
// -< 'HElLo'

capitalize('hElLo', true);
// -> 'Hello'
```


text:
package io.rx_cache2;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.CLASS;

@Target(METHOD)
@Retention(CLASS)
public @interface Actionable {

}


text:
package org.david.planetside.alertnotifier.model;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import org.david.planetside.alertnotifier.R;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * A faction.
 */
public class Faction {
  private final int id;
  private final String name;
  private final Bitmap icon;

  public Faction(int id, String name, Bitmap icon) {
    this.id = id;
    this.name = name;
    this.icon = icon;
  }

  public static Faction parse(JSONObject factionObject, Context context) throws JSONException {
    if (factionObject == null) {
      throw new IllegalArgumentException("The factionObject is null!");
    } else if (context == null) {
      throw new IllegalArgumentException("The context is null!");
    }

    int id = Integer.valueOf(factionObject.getString("faction_id"));
    String name = factionObject.getJSONObject("name").getString("en");
    boolean userSelectable = factionObject.getString("user_selectable").equals("1");

    // Do not include non-playable races.
    if (userSelectable) {
      // Hardcode the bitmap for now because the images from the server are high resolution.
      // Change this later if the faction information returned from census includes a small image.
      int iconId = 0;
      if (id == 1) {  // VS
        iconId = R.drawable.vs;
      } else if (id == 2) {  // NC
        iconId = R.drawable.nc;
      } else if (id == 3) {  // TR
        iconId = R.drawable.tr;
      }
      Bitmap factionIcon = BitmapFactory.decodeResource(context.getResources(), iconId);

      return new Faction(id, name, factionIcon);
    }

    return null;
  }

  @Override
  public String toString() {
    return String.format("%s (%d)", getName(), getId());
  }

  public int getId() {
    return id;
  }

  public String getName() {
    return name;
  }

  public Bitmap getIcon() {
    return icon;
  }
}


text:
bash scripts/cleanup-spinnaker.sh
sleep 31 # graceful termination period is 30s
bash scripts/startup-spinnaker.sh


text:
page_to_delete = ''

function delete_page() {
    page_to_delete = decodeURI($(this).attr('data-id'));
    $('#confirm-delete-dialog').modal();
}

function confirm_delete() {
    var id = page_to_delete;
    $.post('/admin/pages/delete/' + encodeURI(id) + '/', {}, function(data, status) {
        if (data == 'success') {
            $('tr[data-id=\'' + encodeURI(id) + '\']').remove();
            $('#confirm-delete-dialog').modal('toggle');
        }
    });
}

function reorder_pages() {
    var orders = {};
    $('tr.pages').each(function () {
        var id = $(this).attr('data-id');
        var order_str = $('.order[data-id=\'' + id + '\']').val();
        var order = parseInt(order_str);
        if (order === NaN || order === null) {
            alert('invalid number.');
        }
        orders[decodeURI(id)] = order;
    });
    var orders_str = JSON.stringify(orders);
    $.post('/admin/pages/reorder/', orders_str, function(data, status) {
        if (data === 'success') {
            location.reload(true);
        }
    });
}

$(document).ready(function() {
    $('.delete-page').click(delete_page);
    $('#confirm-delete').click(confirm_delete);
    $('#re-order').click(reorder_pages);
});


text: A simple blog using Jekyll. Hosted at [taylorwood.github.io](http://taylorwood.github.io).


text:
package com.google.walkaround.slob.server;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import com.google.inject.BindingAnnotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * Guice annotation for an App Engine task Queue for post-commit actions.
 *
 * @author ohler@google.com (Christian Ohler)
 */
@BindingAnnotation @Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
public @interface PostCommitActionQueue {}


text:
$(function () {

  'use strict';

  var $image = $(window.createCropperImage());

  $image.cropper({
    built: function () {

      QUnit.test('methods.zoomTo', function (assert) {
        var imageData = $image.cropper('zoomTo', 1).cropper('getImageData');
        var canvasData = $image.cropper('getCanvasData');

        assert.equal(imageData.width, imageData.naturalWidth);
        assert.equal(canvasData.width, canvasData.naturalWidth);
        assert.equal(canvasData.naturalWidth, imageData.naturalWidth);
      });

    }
  });

});


text:
package org.apache.hadoop.hive.metastore;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.metastore.api.Catalog;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.client.builder.CatalogBuilder;
import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
import org.apache.thrift.TException;
import org.junit.After;

/**
 * This tests metastore client calls that do not specify a catalog but with the config on the
 * client set to go to a non-default catalog.
 */
public class TestCatalogNonDefaultClient extends NonCatCallsWithCatalog {

  final private String catName = "non_default_catalog";
  private String catLocation;

  @After
  public void dropCatalog() throws TException {
    MetaStoreTestUtils.dropCatalogCascade(client, catName);
  }

  @Override
  protected IMetaStoreClient getClient() throws Exception {

    Configuration svrConf = new Configuration(conf);
    int port = MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(),
        svrConf, false, false, false, false, false);
    // Only set the default catalog on the client.
    MetastoreConf.setVar(conf, MetastoreConf.ConfVars.THRIFT_URIS, "thrift://localhost:" + port);
    MetastoreConf.setVar(conf, MetastoreConf.ConfVars.CATALOG_DEFAULT, catName);
    IMetaStoreClient client = new HiveMetaStoreClient(conf);
    assert !client.isLocalMetaStore();
    // Don't make any calls but catalog calls until the catalog has been created, as we just told
    // the client to direct all calls to a catalog that does not yet exist.
    catLocation = MetaStoreTestUtils.getTestWarehouseDir(catName);
    Catalog cat = new CatalogBuilder()
        .setName(catName)
        .setLocation(catLocation)
        .build();
    client.createCatalog(cat);
    return client;
  }

  @Override
  protected String expectedCatalog() {
    return catName;
  }

  @Override
  protected String expectedBaseDir() throws MetaException {
    return catLocation;
  }

  @Override
  protected String expectedExtBaseDir() throws MetaException {
    return catLocation;
  }
}


text:
#ifndef _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H
#define _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H

#if defined(_MSC_VER)
#pragma warning ( push )
#pragma warning ( disable: 4231 4251 4275 4786 )
#endif

#include <log4cxx/logstring.h>
#include <log4cxx/helpers/outputstream.h>
#include <log4cxx/helpers/socket.h>
#include <vector>

namespace log4cxx
{
	namespace helpers
	{
		LOG4CXX_LIST_DEF(ByteList, unsigned char);
		class LOG4CXX_EXPORT SocketOutputStream : public OutputStream
		{
		public:
			DECLARE_ABSTRACT_LOG4CXX_OBJECT(SocketOutputStream)
			BEGIN_LOG4CXX_CAST_MAP()
				LOG4CXX_CAST_ENTRY(SocketOutputStream)
				LOG4CXX_CAST_ENTRY_CHAIN(OutputStream)
			END_LOG4CXX_CAST_MAP()

			SocketOutputStream(const SocketPtr& socket);
			~SocketOutputStream();

			virtual void close(Pool& p);
			virtual void flush(Pool& p);
			virtual void write(ByteBuffer& buf, Pool& p);

		private:

			ByteList array;
			SocketPtr socket;
			//
			//   prevent copy and assignment statements
			SocketOutputStream(const SocketOutputStream&);
			SocketOutputStream& operator=(const SocketOutputStream&);

		};

		LOG4CXX_PTR_DEF(SocketOutputStream);

	}  // namespace helpers
} // namespace log4cxx

#if defined(_MSC_VER)
#pragma warning ( pop )
#endif

#endif // _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H


text:
// Copyright (c) 2017-2018 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/

#ifndef TAO_PEGTL_CONTRIB_PARSE_TREE_HPP
#define TAO_PEGTL_CONTRIB_PARSE_TREE_HPP

#include <cassert>
#include <memory>
#if defined(_MSC_VER) && _MSC_VER == 1900
#include <tuple>
#endif
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <vector>

#include "../config.hpp"
#include "../memory_input.hpp"
#include "../normal.hpp"
#include "../nothing.hpp"
#include "../parse.hpp"

#include "../analysis/counted.hpp"
#include "../analysis/generic.hpp"
#include "../internal/conditional.hpp"
#include "../internal/demangle.hpp"
#include "../internal/iterator.hpp"

namespace tao
{
   namespace TAO_PEGTL_NAMESPACE
   {
      namespace parse_tree
      {
         template< typename T >
         struct basic_node
         {
            using node_t = T;
            using children_t = std::vector< std::unique_ptr< node_t > >;
            children_t children;

            const std::type_info* id = nullptr;
            std::string source;

            TAO_PEGTL_NAMESPACE::internal::iterator m_begin;
            TAO_PEGTL_NAMESPACE::internal::iterator m_end;

            // each node will be default constructed
            basic_node() = default;

            // no copy/move is necessary
            // (nodes are always owned/handled by a std::unique_ptr)
            basic_node( const basic_node& ) = delete;
            basic_node( basic_node&& ) = delete;

            ~basic_node() = default;

            // no assignment either
            basic_node& operator=( const basic_node& ) = delete;
            basic_node& operator=( basic_node&& ) = delete;

            bool is_root() const noexcept
            {
               return id == nullptr;
            }

            template< typename U >
            bool is() const noexcept
            {
               return id == &typeid( U );
            }

            std::string name() const
            {
               assert( !is_root() );
               return TAO_PEGTL_NAMESPACE::internal::demangle( id->name() );
            }

            position begin() const
            {
               return position( m_begin, source );
            }

            position end() const
            {
               return position( m_end, source );
            }

            bool has_content() const noexcept
            {
               return m_end.data != nullptr;
            }

            std::string content() const
            {
               assert( has_content() );
               return std::string( m_begin.data, m_end.data );
            }

            template< tracking_mode P = tracking_mode::IMMEDIATE, typename Eol = eol::lf_crlf >
            memory_input< P, Eol > as_memory_input() const
            {
               assert( has_content() );
               return { m_begin.data, m_end.data, source, m_begin.byte, m_begin.line, m_begin.byte_in_line };
            }

            template< typename... States >
            void remove_content( States&&... /*unused*/ ) noexcept
            {
               m_end.reset();
            }

            // all non-root nodes are initialized by calling this method
            template< typename Rule, typename Input, typename... States >
            void start( const Input& in, States&&... /*unused*/ )
            {
               id = &typeid( Rule );
               source = in.source();
               m_begin = in.iterator();
            }

            // if parsing of the rule succeeded, this method is called
            template< typename Rule, typename Input, typename... States >
            void success( const Input& in, States&&... /*unused*/ ) noexcept
            {
               m_end = in.iterator();
            }

            // if parsing of the rule failed, this method is called
            template< typename Rule, typename Input, typename... States >
            void failure( const Input& /*unused*/, States&&... /*unused*/ ) noexcept
            {
            }

            // if parsing succeeded and the (optional) transform call
            // did not discard the node, it is appended to its parent.
            // note that "child" is the node whose Rule just succeeded
            // and "*this" is the parent where the node should be appended.
            template< typename... States >
            void emplace_back( std::unique_ptr< node_t > child, States&&... /*unused*/ )
            {
               assert( child );
               children.emplace_back( std::move( child ) );
            }
         };

         struct node
            : basic_node< node >
         {
         };

         namespace internal
         {
            template< typename Node >
            struct state
            {
               std::vector< std::unique_ptr< Node > > stack;

               state()
               {
                  emplace_back();
               }

               void emplace_back()
               {
                  stack.emplace_back( std::unique_ptr< Node >( new Node ) );  // NOLINT: std::make_unique requires C++14
               }

               std::unique_ptr< Node >& back() noexcept
               {
                  return stack.back();
               }

               void pop_back() noexcept
               {
                  return stack.pop_back();
               }
            };

            template< typename Selector, typename... States >
            void transform( States&&... /*unused*/ ) noexcept
            {
            }

            template< typename Selector, typename Node, typename... States >
            auto transform( std::unique_ptr< Node >& n, States&&... st ) noexcept( noexcept( Selector::transform( n, st... ) ) )
               -> decltype( Selector::transform( n, st... ), void() )
            {
               Selector::transform( n, st... );
            }

            template< unsigned Level, typename Analyse, template< typename... > class Selector >
            struct is_leaf
               : std::false_type
            {
            };

            template< analysis::rule_type Type, template< typename... > class Selector >
            struct is_leaf< 0, analysis::generic< Type >, Selector >
               : std::true_type
            {
            };

            template< analysis::rule_type Type, unsigned Count, template< typename... > class Selector >
            struct is_leaf< 0, analysis::counted< Type, Count >, Selector >
               : std::true_type
            {
            };

            template< analysis::rule_type Type, typename... Rules, template< typename... > class Selector >
            struct is_leaf< 0, analysis::generic< Type, Rules... >, Selector >
               : std::false_type
            {
            };

            template< analysis::rule_type Type, unsigned Count, typename... Rules, template< typename... > class Selector >
            struct is_leaf< 0, analysis::counted< Type, Count, Rules... >, Selector >
               : std::false_type
            {
            };

            template< bool... >
            struct bool_sequence;

            template< bool... Bs >
            using is_all = std::is_same< bool_sequence< Bs..., true >, bool_sequence< true, Bs... > >;

            template< unsigned Level, typename Rule, template< typename... > class Selector >
            using is_unselected_leaf = std::integral_constant< bool, !Selector< Rule >::value && is_leaf< Level, typename Rule::analyze_t, Selector >::value >;

            template< unsigned Level, analysis::rule_type Type, typename... Rules, template< typename... > class Selector >
            struct is_leaf< Level, analysis::generic< Type, Rules... >, Selector >
               : is_all< is_unselected_leaf< Level - 1, Rules, Selector >::value... >
            {
            };

            template< unsigned Level, analysis::rule_type Type, unsigned Count, typename... Rules, template< typename... > class Selector >
            struct is_leaf< Level, analysis::counted< Type, Count, Rules... >, Selector >
               : is_all< is_unselected_leaf< Level - 1, Rules, Selector >::value... >
            {
            };

            template< typename Node, template< typename... > class Selector, template< typename... > class Control >
            struct make_control
            {
               template< typename Rule, bool, bool >
               struct control;

               template< typename Rule >
               using type = control< Rule, Selector< Rule >::value, is_leaf< 8, typename Rule::analyze_t, Selector >::value >;
            };

            template< typename Node, template< typename... > class Selector, template< typename... > class Control >
            template< typename Rule >
            struct make_control< Node, Selector, Control >::control< Rule, false, true >
               : Control< Rule >
            {
#if defined(_MSC_VER) && _MSC_VER == 1900
               template< typename Input, std::size_t... Is, typename... States >
               static void start_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::start( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::start( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st ) noexcept( noexcept( start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void success_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::success( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::success( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st ) noexcept( noexcept( success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void failure_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::failure( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::failure( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st ) noexcept( noexcept( failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void raise_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::raise( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::raise( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st ) noexcept( noexcept( raise_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  raise_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Input, std::size_t... Is, typename... States >
               static auto apply0_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st ) noexcept( noexcept( apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, std::size_t... Is, typename... States >
               static auto apply_impl( const Iterator& begin, const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st ) noexcept( noexcept( apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }
#else
               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::start( in, st... ) ) )
               {
                  Control< Rule >::start( in, st... );
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::success( in, st... ) ) )
               {
                  Control< Rule >::success( in, st... );
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::failure( in, st... ) ) )
               {
                  Control< Rule >::failure( in, st... );
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st, state< Node >& /*unused*/ )
               {
                  Control< Rule >::raise( in, st... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, st... ) ) )
                  -> decltype( Control< Rule >::template apply0< Action >( in, st... ) )
               {
                  return Control< Rule >::template apply0< Action >( in, st... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, st... ) ) )
                  -> decltype( Control< Rule >::template apply< Action >( begin, in, st... ) )
               {
                  return Control< Rule >::template apply< Action >( begin, in, st... );
               }
#endif
            };

            template< typename Node, template< typename... > class Selector, template< typename... > class Control >
            template< typename Rule >
            struct make_control< Node, Selector, Control >::control< Rule, false, false >
               : Control< Rule >
            {
#if defined(_MSC_VER) && _MSC_VER == 1900
               template< typename Input, std::size_t... Is, typename... States >
               static void start_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::start( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  state.emplace_back();
               }

               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st ) noexcept( noexcept( start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void success_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::success( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  auto n = std::move( state.back() );
                  state.pop_back();
                  for( auto& c : n->children ) {
                     state.back()->children.emplace_back( std::move( c ) );
                  }
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st ) noexcept( noexcept( success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void failure_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::failure( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  state.pop_back();
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st ) noexcept( noexcept( failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void raise_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::raise( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st )
               {
                  raise_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Input, std::size_t... Is, typename... States >
               static auto apply0_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st ) noexcept( noexcept( apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, std::size_t... Is, typename... States >
               static auto apply_impl( const Iterator& begin, const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st ) noexcept( noexcept( apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }
#else
               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st, state< Node >& state )
               {
                  Control< Rule >::start( in, st... );
                  state.emplace_back();
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st, state< Node >& state )
               {
                  Control< Rule >::success( in, st... );
                  auto n = std::move( state.back() );
                  state.pop_back();
                  for( auto& c : n->children ) {
                     state.back()->children.emplace_back( std::move( c ) );
                  }
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st, state< Node >& state ) noexcept( noexcept( Control< Rule >::failure( in, st... ) ) )
               {
                  Control< Rule >::failure( in, st... );
                  state.pop_back();
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st, state< Node >& /*unused*/ )
               {
                  Control< Rule >::raise( in, st... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, st... ) ) )
                  -> decltype( Control< Rule >::template apply0< Action >( in, st... ) )
               {
                  return Control< Rule >::template apply0< Action >( in, st... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, st... ) ) )
                  -> decltype( Control< Rule >::template apply< Action >( begin, in, st... ) )
               {
                  return Control< Rule >::template apply< Action >( begin, in, st... );
               }
#endif
            };

            template< typename Node, template< typename... > class Selector, template< typename... > class Control >
            template< typename Rule, bool B >
            struct make_control< Node, Selector, Control >::control< Rule, true, B >
               : Control< Rule >
            {
#if defined(_MSC_VER) && _MSC_VER == 1900
               template< typename Input, std::size_t... Is, typename... States >
               static void start_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::start( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  state.emplace_back();
                  state.back()->template start< Rule >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st ) noexcept( noexcept( start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  start_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void success_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::success( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  auto n = std::move( state.back() );
                  state.pop_back();
                  n->template success< Rule >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  transform< Selector< Rule > >( n, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  if( n ) {
                     state.back()->emplace_back( std::move( n ), std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  }
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st ) noexcept( noexcept( success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  success_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void failure_impl( const Input& in, std::index_sequence< Is... >, States&&... st )
               {
                  Control< Rule >::failure( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state< Node >& state = std::get< sizeof...( st ) - 1 >( std::forward_as_tuple( st... ) );
                  state.back()->template failure< Rule >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
                  state.pop_back();
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st ) noexcept( noexcept( failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  failure_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< typename Input, std::size_t... Is, typename... States >
               static void raise_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::raise( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  Control< Rule >::raise( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st ) noexcept( noexcept( raise_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
               {
                  raise_impl( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Input, std::size_t... Is, typename... States >
               static auto apply0_impl( const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply0< Action >( in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st ) noexcept( noexcept( apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply0_impl< Action >( in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, std::size_t... Is, typename... States >
               static auto apply_impl( const Iterator& begin, const Input& in, std::index_sequence< Is... >, States&&... st ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... ) ) )
                  -> decltype( auto )
               {
                  std::get< sizeof...(st) - 1 >( std::forward_as_tuple( st... ) ); // silence C4100
                  return Control< Rule >::template apply< Action >( begin, in, std::get< Is >( std::forward_as_tuple ( st... ) )... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st ) noexcept( noexcept( apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... ) ) )
                  -> decltype( auto )
               {
                  return apply_impl< Action >( begin, in, std::make_index_sequence< sizeof...( st ) - 1 >{}, std::forward< States >( st )... );
               }
#else
               template< typename Input, typename... States >
               static void start( const Input& in, States&&... st, state< Node >& state )
               {
                  Control< Rule >::start( in, st... );
                  state.emplace_back();
                  state.back()->template start< Rule >( in, st... );
               }

               template< typename Input, typename... States >
               static void success( const Input& in, States&&... st, state< Node >& state )
               {
                  Control< Rule >::success( in, st... );
                  auto n = std::move( state.back() );
                  state.pop_back();
                  n->template success< Rule >( in, st... );
                  transform< Selector< Rule > >( n, st... );
                  if( n ) {
                     state.back()->emplace_back( std::move( n ), st... );
                  }
               }

               template< typename Input, typename... States >
               static void failure( const Input& in, States&&... st, state< Node >& state ) noexcept( noexcept( Control< Rule >::failure( in, st... ) ) && noexcept( std::declval< node& >().template failure< Rule >( in, st... ) ) )
               {
                  Control< Rule >::failure( in, st... );
                  state.back()->template failure< Rule >( in, st... );
                  state.pop_back();
               }

               template< typename Input, typename... States >
               static void raise( const Input& in, States&&... st, state< Node >& /*unused*/ )
               {
                  Control< Rule >::raise( in, st... );
               }

               template< template< typename... > class Action, typename Input, typename... States >
               static auto apply0( const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply0< Action >( in, st... ) ) )
                  -> decltype( Control< Rule >::template apply0< Action >( in, st... ) )
               {
                  return Control< Rule >::template apply0< Action >( in, st... );
               }

               template< template< typename... > class Action, typename Iterator, typename Input, typename... States >
               static auto apply( const Iterator& begin, const Input& in, States&&... st, state< Node >& /*unused*/ ) noexcept( noexcept( Control< Rule >::template apply< Action >( begin, in, st... ) ) )
                  -> decltype( Control< Rule >::template apply< Action >( begin, in, st... ) )
               {
                  return Control< Rule >::template apply< Action >( begin, in, st... );
               }
#endif
            };

            template< typename >
            struct element
            {
            };

            template< typename >
            struct store_all : std::true_type
            {
            };

         }  // namespace internal

         using store_content = std::true_type;

         // some nodes don't need to store their content
         struct remove_content : std::true_type
         {
            template< typename Node, typename... States >
            static void transform( std::unique_ptr< Node >& n, States&&... st ) noexcept( noexcept( n->Node::remove_content( st... ) ) )
            {
               n->remove_content( st... );
            }
         };

         // if a node has only one child, replace the node with its child, otherwise apply B
         template< typename Base >
         struct fold_one_or : Base
         {
            template< typename Node, typename... States >
            static void transform( std::unique_ptr< Node >& n, States&&... st ) noexcept( noexcept( n->children.size(), Base::transform( n, st... ) ) )
            {
               if( n->children.size() == 1 ) {
                  n = std::move( n->children.front() );
               }
               else {
                  Base::transform( n, st... );
               }
            }
         };

         // if a node has no children, discard the node, otherwise apply B
         template< typename Base >
         struct discard_empty_or : Base
         {
            template< typename Node, typename... States >
            static void transform( std::unique_ptr< Node >& n, States&&... st ) noexcept( noexcept( n->children.empty(), Base::transform( n, st... ) ) )
            {
               if( n->children.empty() ) {
                  n.reset();
               }
               else {
                  Base::transform( n, st... );
               }
            }
         };

         using fold_one = fold_one_or< remove_content >;
         using discard_empty = discard_empty_or< remove_content >;

         template< typename Rule, typename... Collections >
         struct selector : std::false_type
         {
         };

         // TODO: Implement in a non-recursive way
         // TODO: Check for multiple matches (currently: first match wins)
         template< typename Rule, typename Collection, typename... Collections >
         struct selector< Rule, Collection, Collections... >
            : TAO_PEGTL_NAMESPACE::internal::conditional< Collection::template contains< Rule >::value >::template type< typename Collection::type, selector< Rule, Collections... > >
         {
         };

         template< typename Base >
         struct apply
         {
            template< typename... Rules >
            struct to
               : internal::element< Rules >...
            {
               using type = Base;

               template< typename Rule >
               using contains = std::is_base_of< internal::element< Rule >, to >;
            };
         };

         using apply_store_content = apply< store_content >;
         using apply_remove_content = apply< remove_content >;
         using apply_fold_one = apply< fold_one >;
         using apply_discard_empty = apply< discard_empty >;

         template< typename Rule,
                   typename Node,
                   template< typename... > class Selector = internal::store_all,
                   template< typename... > class Action = nothing,
                   template< typename... > class Control = normal,
                   typename Input,
                   typename... States >
         std::unique_ptr< Node > parse( Input&& in, States&&... st )
         {
            internal::state< Node > state;
            if( !TAO_PEGTL_NAMESPACE::parse< Rule, Action, internal::make_control< Node, Selector, Control >::template type >( in, st..., state ) ) {
               return nullptr;
            }
            assert( state.stack.size() == 1 );
            return std::move( state.back() );
         }

         template< typename Rule,
                   template< typename... > class Selector = internal::store_all,
                   template< typename... > class Action = nothing,
                   template< typename... > class Control = normal,
                   typename Input,
                   typename... States >
         std::unique_ptr< node > parse( Input&& in, States&&... st )
         {
            return parse< Rule, node, Selector, Action, Control >( in, st... );
         }

      }  // namespace parse_tree

   }  // namespace TAO_PEGTL_NAMESPACE

}  // namespace tao

#endif


text:
import { FirebaseRxPlayPage } from './app.po';

describe('firebase-rx-play App', () => {
  let page: FirebaseRxPlayPage;

  beforeEach(() => {
    page = new FirebaseRxPlayPage();
  });

  it('should display message saying app works', () => {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('app works!');
  });
});


text:
@interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

//- (IBAction)oneTapped:(id)sender;
//- (IBAction)twoTapped:(id)sender;
//- (IBAction)threeTapped:(id)sender;

@property (weak, nonatomic) IBOutlet UIView *topView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@property (strong, nonatomic) NSArray *headerDataSource;
@property (strong, nonatomic) NSArray *labelDataSource;
@property (strong, nonatomic) NSArray *subtitleDataSource;

@end


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ux.service;

import br.com.ux.Categoria;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 *
 * @author charles
 */
@Stateless
@Path("categoria")
public class CategoriaFacadeREST extends AbstractFacade<Categoria> {

    @PersistenceContext(unitName = "TesteWebServicePU")
    private EntityManager em;

    public CategoriaFacadeREST() {
        super(Categoria.class);
    }

    @POST
    @Override
    @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public void create(Categoria entity) {
        super.create(entity);
    }

    @PUT
    @Path("{id}")
    @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public void edit(@PathParam("id") Integer id, Categoria entity) {
        super.edit(entity);
    }

    @DELETE
    @Path("{id}")
    public void remove(@PathParam("id") Integer id) {
        super.remove(super.find(id));
    }

    @GET
    @Path("{id}")
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Categoria find(@PathParam("id") Integer id) {
        return super.find(id);
    }

    @GET
    @Override
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public List<Categoria> findAll() {
        return super.findAll();
    }

    @GET
    @Path("{from}/{to}")
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public List<Categoria> findRange(@PathParam("from") Integer from, @PathParam("to") Integer to) {
        return super.findRange(new int[]{from, to});
    }

    @GET
    @Path("count")
    @Produces(MediaType.TEXT_PLAIN)
    public String countREST() {
        return String.valueOf(super.count());
    }

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

}


text:
package line

import (
	"github.com/kkserver/kk-lib/kk/app"
)

type LineCreateTaskResult struct {
	app.Result
	Line *Line `json:"line,omitempty"`
}

type LineCreateTask struct {
	app.Task
	RouteId   int64  `json:"routeId,string"` //路线ID
	Price     int64  `json:"price"`          //原价
	Alias     string `json:"alias"`          //别名
	Direction int    `json:"direction"`      //方向
	Times     string `json:"times"`          //站点时间 09:00,09:20

	CarId    int64 `json:"carId"`    //车辆ID
	DriverId int64 `json:"driverId"` //司机ID

	Result LineCreateTaskResult
}

func (task *LineCreateTask) GetResult() interface{} {
	return &task.Result
}

func (task *LineCreateTask) GetInhertType() string {
	return "line"
}

func (task *LineCreateTask) GetClientName() string {
	return "Line.Create"
}


text:
(function($) {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
$.fn.DefaultValue = function(klass,text) {
return this.each(function() {
//Make sure we're dealing with text-based form fields
if (this.type != 'text' && this.type != 'password' && this.type != 'textarea') {
return;
}

//Store field reference
var fld_current = this;
var fldVal = this.value.toLowerCase().trim();
var textVal = text.toLowerCase().trim();

//Set value initially if none are specified
if (fldVal == textVal || fldVal == "") {
$(this).addClass(klass);
this.value = text;
}

//Remove values on focus
$(this).focus(function() {
var fldVal = this.value.toLowerCase().trim();
if (fldVal == textVal || fldVal == "") {
this.value = "";
$(this).removeClass(klass);
}
});

//Place values back on blur
$(this).blur(function() {
var fldVal = this.value.toLowerCase().trim();
if (fldVal == textVal || fldVal == "") {
$(this).addClass(klass);
this.value = text;
}
});

//Capture parent form submission
//Remove field values that are still default
$(this).parents("form").each(function() {
//Bind parent form submit
$(this).submit(function() {
if (fld_current.value.toLowerCase().trim() == textVal) {
fld_current.value = "";
}
});
});
});
};
})(jQuery);