text:
module Concise
  class Compiler < RBX::Compiler
    def self.compiled_filename(filename)
      if filename =~ /.cn$/
        filename + "c"
      else
        filename + ".compiled.cnc"
      end
    end

    def self.always_recompile=(flag)
      @always_recompile = flag
    end

    def self.compile_if_needed(file, output = nil, print = Print.new)
      compiled = output || compiled_filename(file)
      needed = @always_recompile || !File.exists?(compiled) ||
        File.stat(compiled).mtime < File.stat(file).mtime
      if needed
        compile_file(file, compiled, print)
      else
        Concise::CodeLoader.new(compiled).load_compiled_file(compiled, 0, 0)
      end
    end

    def self.compile_file(file, output = nil, print = Print.new)
      compiler = new :concise_file, :compiled_file
      parser = compiler.parser

      parser.input file

      compiler.generator = RBX::Generator.new
      compiler.writer.name = output || compiled_filename(file)

      parser.print = print
      compiler.packager.print.bytecode = true if print.asm?

      begin
        compiler.run
      rescue Exception => e
        compiler_error "Error trying to compile concise: #{file}", e
      end
    end

    def self.compile_for_eval(code, variable_scope, file = "(eval)", line = 0, print = Print.new)
      compiler = new :concise_code, :compiled_method
      parser = compiler.parser

      parser.input code, file, line
      compiler.generator.root = RBX::AST::EvalExpression
      compiler.generator.variable_scope = variable_scope

      parser.print = print
      compiler.packager.print.bytecode = true if print.asm?

      begin
        compiler.run
      rescue Exception => e
        compiler_error "Error trying to compile concise: #{file}", e
      end
    end

    class Print < Struct.new(:sexp, :ast, :asm)
      def sexp?
        @sexp
      end

      def ast?
        @ast
      end

      def asm?
        @asm
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
using System.IO;
using System.Reflection;
using Demo.FolderBrowserDialog.ScreenObjects;
using NUnit.Framework;
using TechTalk.SpecFlow;
using TestBaseClasses.Features;
using TestStack.White;
using TestStack.White.Factory;
using TestStack.White.ScreenObjects;

namespace Demo.FolderBrowserDialog.Features
{
    [Binding]
    public class BrowseFolderSteps : FeatureSteps<MainScreen>
    {
        private BrowseFolderScreen? browseFolderScreen;

        protected override Application LaunchApplication()
        {
            // ReSharper disable once AssignNullToNotNullAttribute
            string applicationFilePath = Path.Combine(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                "Demo.FolderBrowserDialog.exe");

            return Application.Launch(applicationFilePath);
        }

        protected override MainScreen GetMainScreen(ScreenRepository screenRepository)
        {
            return screenRepository.Get<MainScreen>("Demo - Folder Browser Dialog", InitializeOption.NoCache);
        }

        [Given("I have browsed a folder")]
        public void BrowseFolder()
        {
            browseFolderScreen = MainScreen!.ClickBrowse();
        }

        [When("I press confirm")]
        public void Confirm()
        {
            browseFolderScreen!.ClickOK();
        }

        [When("I cancel")]
        public void Cancel()
        {
            browseFolderScreen!.ClickCancel();
        }

        [Then("the folder should be opened")]
        public void VerifyFolderWasOpened()
        {
            Assert.That(MainScreen!.FileName, Is.Not.Empty);
        }

        [Then("the folder should not be opened")]
        public void VerifyFolderWasNotOpened()
        {
            Assert.That(MainScreen!.FileName, Is.Empty);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<rootTag>
  <Award>
    <AwardTitle>VOSS: Documents and the Doing of Science: Studying Cyberinfrastructures in Use</AwardTitle>
    <AwardEffectiveDate>09/01/2012</AwardEffectiveDate>
    <AwardExpirationDate>08/31/2017</AwardExpirationDate>
    <AwardAmount>413631</AwardAmount>
    <AwardInstrument>
      <Value>Standard Grant</Value>
    </AwardInstrument>
    <Organization>
      05090000
      <Directorate>
        <LongName>Direct For Computer & Info Scie & Enginr</LongName>
      </Directorate>
      <Division>
        <LongName>Div Of Advanced Cyberinfrastructure</LongName>
      </Division>
    </Organization>
    <ProgramOfficer>
      <SignBlockName>Rajiv Ramnath</SignBlockName>
    </ProgramOfficer>
    <AbstractNarration>This project will build and validate a typology of collaboration types associated with cyberinfrastructure (CI) use in the conduct of science. The research focuses on documents and documenting practices as important windows into the socio-technical arrangements of scientific teams. A large number of virtual scientific collaborations will be studied and compared using a mix of text mining, social network analysis and qualitative methods. The research will result in: (1) a detailed compendium regarding what document infrastructures scientists build to support their virtual organizing and documenting practices and (2) specific design principles for the distributed, social and technical aspects of scientific work. The findings will have implications for better design and management of virtual scientific teams and for CI to support scientific endeavors.</AbstractNarration>
    <MinAmdLetterDate>08/27/2012</MinAmdLetterDate>
    <MaxAmdLetterDate>06/12/2014</MaxAmdLetterDate>
    <ARRAAmount/>
    <AwardID>1221945</AwardID>
    <Investigator>
      <FirstName>Carsten</FirstName>
      <LastName>Oesterlund</LastName>
      <EmailAddress>costerlu@syr.edu</EmailAddress>
      <StartDate>08/27/2012</StartDate>
      <EndDate/>
      <RoleCode>Co-Principal Investigator</RoleCode>
    </Investigator>
    <Investigator>
      <FirstName>Steven</FirstName>
      <LastName>Sawyer</LastName>
      <EmailAddress>ssawyer@syr.edu</EmailAddress>
      <StartDate>08/27/2012</StartDate>
      <EndDate/>
      <RoleCode>Principal Investigator</RoleCode>
    </Investigator>
    <Institution>
      <Name>Syracuse University</Name>
      <CityName>SYRACUSE</CityName>
      <ZipCode>132441200</ZipCode>
      <PhoneNumber>3154432807</PhoneNumber>
      <StreetAddress>OFFICE OF SPONSORED PROGRAMS</StreetAddress>
      <CountryName>United States</CountryName>
      <StateName>New York</StateName>
      <StateCode>NY</StateCode>
    </Institution>
    <ProgramElement>
      7361
      <Text>EDUCATION AND WORKFORCE</Text>
    </ProgramElement>
    <ProgramElement>
      7642
      <Text>VIRTUAL ORGANIZATIONS</Text>
    </ProgramElement>
    <ProgramElement>
      7953
      <Text>SOCIAL-COMPUTATIONAL SYSTEMS</Text>
    </ProgramElement>
    <ProgramElement>
      8031
      <Text>Science of Organizations</Text>
    </ProgramElement>
    <ProgramReference>
      9251
      <Text>RES EXPER FOR UNDERGRAD-SUPPLT</Text>
    </ProgramReference>
    <ProgramReference>
      7642
      <Text>VIRTUAL ORGANIZATIONS</Text>
    </ProgramReference>
    <ProgramReference>
      7953
      <Text>SOCIAL-COMPUTATIONAL SYSTEMS</Text>
    </ProgramReference>
  </Award>
</rootTag>


text:
#include "bgp/bgp_peer_key.h"

#include "base/string_util.h"
#include "bgp/bgp_config.h"

using boost::asio::ip::address;
using boost::system::error_code;
using boost::uuids::nil_generator;
using std::exception;

BgpPeerKey::BgpPeerKey() {
    nil_generator nil;
    uuid = nil();
}

BgpPeerKey::BgpPeerKey(const BgpNeighborConfig *config) {
    error_code ec;
    endpoint.address(config->peer_address());
    endpoint.port(config->port());

    if (!config->uuid().empty()) {
#if defined(__EXCEPTIONS)
    try {
#endif
        uuid = StringToUuid(config->uuid());
#if defined(__EXCEPTIONS)
    } catch (exception &ex) {
        nil_generator nil;
        uuid = nil();
    }
#endif
    } else {
        boost::uuids::nil_generator nil;
        uuid = nil();
    }
}

bool BgpPeerKey::operator<(const BgpPeerKey &rhs) const {
    if (endpoint != rhs.endpoint) {
        return (endpoint < rhs.endpoint);
    }
    return uuid < rhs.uuid;
}

bool BgpPeerKey::operator>(const BgpPeerKey &rhs) const {
    if (endpoint != rhs.endpoint) {
        return (endpoint > rhs.endpoint);
    }
    return uuid > rhs.uuid;
}

bool BgpPeerKey::operator==(const BgpPeerKey &rhs) const {
    return (endpoint == rhs.endpoint && uuid == rhs.uuid);
}

bool BgpPeerKey::operator!=(const BgpPeerKey &rhs) const {
    return (endpoint != rhs.endpoint || uuid != rhs.uuid);
}


text:
@interface GPKGFeatureTileUtils : GPKGCreateGeoPackageTestCase

+(GPKGFeatureDao *) createFeatureDaoWithGeoPackage: (GPKGGeoPackage *) geoPackage;

+(int) insertFeaturesWithGeoPackage: (GPKGGeoPackage *) geoPackage andFeatureDao: (GPKGFeatureDao *) featureDao;

+(GPKGFeatureTiles *) createFeatureTilesWithGeoPackage: (GPKGGeoPackage *) geoPackage andFeatureDao: (GPKGFeatureDao *) featureDao andUseIcon: (BOOL) useIcon;

+(void) insertFourPointsWithFeatureDao: (GPKGFeatureDao *) featureDao andX: (double) x andY: (double) y;

+(void) insertFourLinesWithFeatureDao: (GPKGFeatureDao *) featureDao andPoints: (NSArray *) points;

+(void) insertFourPolygonsWithFeatureDao: (GPKGFeatureDao *) featureDao andLines: (NSArray *) lines;

+(NSArray *) convertPoints: (NSArray *) points withNegativeY: (BOOL) negativeY andNegativeX: (BOOL) negativeX;

+(NSArray *) convertLines: (NSArray *) lines withNegativeY: (BOOL) negativeY andNegativeX: (BOOL) negativeX;

+(long long) insertPointWithFeatureDao: (GPKGFeatureDao *) featureDao andX: (double) x andY: (double) y;

+(void) setPointWithFeatureRow: (GPKGFeatureRow *) featureRow andX: (double) x andY: (double) y;

+(long long) insertLineWithFeatureDao: (GPKGFeatureDao *) featureDao andPoints: (NSArray *) points;

+(SFLineString *) lineStringWithPoints: (NSArray *) points;

+(long long) insertPolygonWithFeatureDao: (GPKGFeatureDao *) featureDao andLines: (NSArray *) lines;

+(void) updateLastChangeWithGeoPackage: (GPKGGeoPackage *) geoPackage andFeatureDao: (GPKGFeatureDao *) featureDao;

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="youzi.com.sharelove.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/appbar_padding_top"
        android:theme="@style/AppTheme.AppBarOverlay">

        <Button
            android:id="@+id/btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="222"
            android:visibility="gone"></Button>

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/AppTheme.PopupOverlay">

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

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/news"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal|right"
        android:layout_margin="2dp"
        android:src="@android:drawable/ic_menu_help" />

</android.support.design.widget.CoordinatorLayout>


text:
namespace Azure.Analytics.Synapse.AccessControl
{
    public partial class AccessControlClientOptions : Azure.Core.ClientOptions
    {
        public AccessControlClientOptions(Azure.Analytics.Synapse.AccessControl.AccessControlClientOptions.ServiceVersion version = Azure.Analytics.Synapse.AccessControl.AccessControlClientOptions.ServiceVersion.V2020_12_01) { }
        public enum ServiceVersion
        {
            V2020_12_01 = 1,
        }
    }
    public partial class CheckAccessDecision
    {
        internal CheckAccessDecision() { }
        public string AccessDecision { get { throw null; } }
        public string ActionId { get { throw null; } }
        public Azure.Analytics.Synapse.AccessControl.RoleAssignmentDetails RoleAssignment { get { throw null; } }
    }
    public partial class CheckPrincipalAccessRequest
    {
        public CheckPrincipalAccessRequest(Azure.Analytics.Synapse.AccessControl.SubjectInfo subject, System.Collections.Generic.IEnumerable<Azure.Analytics.Synapse.AccessControl.RequiredAction> actions, string scope) { }
        public System.Collections.Generic.IList<Azure.Analytics.Synapse.AccessControl.RequiredAction> Actions { get { throw null; } }
        public string Scope { get { throw null; } }
        public Azure.Analytics.Synapse.AccessControl.SubjectInfo Subject { get { throw null; } }
        public static implicit operator Azure.Core.RequestContent (Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessRequest accessRequest) { throw null; }
    }
    public partial class CheckPrincipalAccessResponse
    {
        internal CheckPrincipalAccessResponse() { }
        public System.Collections.Generic.IReadOnlyList<Azure.Analytics.Synapse.AccessControl.CheckAccessDecision> AccessDecisions { get { throw null; } }
        public static implicit operator Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessResponse (Azure.Response response) { throw null; }
    }
    public partial class RequiredAction
    {
        public RequiredAction(string id, bool isDataAction) { }
        public string Id { get { throw null; } }
        public bool IsDataAction { get { throw null; } }
    }
    public partial class RoleAssignmentDetails
    {
        internal RoleAssignmentDetails() { }
        public string Id { get { throw null; } }
        public System.Guid? PrincipalId { get { throw null; } }
        public string PrincipalType { get { throw null; } }
        public System.Guid? RoleDefinitionId { get { throw null; } }
        public string Scope { get { throw null; } }
        public static implicit operator Azure.Analytics.Synapse.AccessControl.RoleAssignmentDetails (Azure.Response response) { throw null; }
    }
    public partial class RoleAssignmentsClient
    {
        protected RoleAssignmentsClient() { }
        public RoleAssignmentsClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { }
        public RoleAssignmentsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Synapse.AccessControl.AccessControlClientOptions options) { }
        public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
        public virtual Azure.Response<Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessResponse> CheckPrincipalAccess(Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessRequest checkAccessRequest) { throw null; }
        public virtual Azure.Response CheckPrincipalAccess(Azure.Core.RequestContent content, Azure.Core.ContentType contentType, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessResponse>> CheckPrincipalAccessAsync(Azure.Analytics.Synapse.AccessControl.CheckPrincipalAccessRequest checkAccessRequest) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> CheckPrincipalAccessAsync(Azure.Core.RequestContent content, Azure.Core.ContentType contentType, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response CreateRoleAssignment(string roleAssignmentId, Azure.Core.RequestContent content, Azure.Core.ContentType contentType, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> CreateRoleAssignmentAsync(string roleAssignmentId, Azure.Core.RequestContent content, Azure.Core.ContentType contentType, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response DeleteRoleAssignmentById(string roleAssignmentId, string scope = null, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DeleteRoleAssignmentByIdAsync(string roleAssignmentId, string scope = null, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.Analytics.Synapse.AccessControl.RoleAssignmentDetails> GetRoleAssignmentById(string roleAssignmentId) { throw null; }
        public virtual Azure.Response GetRoleAssignmentById(string roleAssignmentId, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Synapse.AccessControl.RoleAssignmentDetails>> GetRoleAssignmentByIdAsync(string roleAssignmentId) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetRoleAssignmentByIdAsync(string roleAssignmentId, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response GetRoleAssignments(string roleId = null, string principalId = null, string scope = null, string continuationToken = null, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetRoleAssignmentsAsync(string roleId = null, string principalId = null, string scope = null, string continuationToken = null, Azure.RequestContext context = null) { throw null; }
    }
    public partial class RoleDefinitionsClient
    {
        protected RoleDefinitionsClient() { }
        public RoleDefinitionsClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { }
        public RoleDefinitionsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Synapse.AccessControl.AccessControlClientOptions options) { }
        public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
        public virtual Azure.Response GetRoleDefinitionById(string roleDefinitionId, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetRoleDefinitionByIdAsync(string roleDefinitionId, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response GetRoleDefinitions(bool? isBuiltIn = default(bool?), string scope = null, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetRoleDefinitionsAsync(bool? isBuiltIn = default(bool?), string scope = null, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response GetScopes(Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetScopesAsync(Azure.RequestContext context = null) { throw null; }
    }
    public partial class SubjectInfo
    {
        public SubjectInfo(System.Guid principalId) { }
        public System.Collections.Generic.IList<System.Guid> GroupIds { get { throw null; } }
        public System.Guid PrincipalId { get { throw null; } }
    }
}


text:
<?php

use PHPAST\Node;
use PHPAST\WhileOp;
use PHPAST\ContinueOp;
use PHPAST\BreakOp;
use PHPAST\Prog;

class WhileOpTest extends NodeTest {

	/**
	 * Standard NodeTest node creation
	 */
	public function createNode($label = NULL) {
		return new WhileOp($this->getMockLiteral(0),
		                   $this->getMockLiteral(1),
		                   $label);
	}

	public function testEvaluate() {
		$cond = $this->createMock(Node::class);
		$node = $this->createMock(Node::class);

		$i = 0;

		$that = $this;

		$cond
			->method('evaluate')
			->will($this->returnCallback(function() use (&$i, $that) {
						return $that->getMockLiteral($i < 10);
					}));

		$calls = [];
		$node
			->expects($this->exactly(10))
			->method('evaluate')
			->will($this->returnCallback(function ($st) use (&$i, &$calls) {
						$calls[] = $i;
						$i++;
						return $this->getMockLiteral(1);
					}));

		$op = new WhileOp($cond, $node);
		$op->evaluate($this->getMockSymbolTable());

		$this->assertEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], $calls);
	}
}


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

package com.google.api.graphql.schema.firestore;

import com.google.api.graphql.rejoiner.GaxSchemaModule;
import com.google.api.graphql.rejoiner.Namespace;
import com.google.api.graphql.rejoiner.SchemaModule;
import com.google.cloud.firestore.v1beta1.FirestoreClient;
import com.google.common.collect.ImmutableList;

/**
 * A GraphQL {@link SchemaModule} backed by a gRPC service.
 *
 *
Calls to this gRPC API is managed by an generated client library, which manages the channel,
 * authentication, etc.
 *
 *
https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto
 */
@Namespace("firestore")
public final class FirestoreSchemaModule extends GaxSchemaModule {

  @Override
  protected void configureSchema() {
    addMutationList(
        serviceToFields(
            FirestoreClient.class,
            ImmutableList.of("createDocument", "updateDocument", "deleteDocument")));
    addQueryList(
        serviceToFields(FirestoreClient.class, ImmutableList.of("getDocument", "listDocuments")));
  }
}


text:
package com.helger.photon.bootstrap3.stub.config;

import javax.annotation.Nullable;

import com.helger.commons.annotation.IsSPIImplementation;
import com.helger.commons.thirdparty.IThirdPartyModule;
import com.helger.commons.thirdparty.IThirdPartyModuleProviderSPI;
import com.helger.photon.app.PhotonAppConfig;

/**
 * Implement this SPI interface if your JAR file contains external third party
 * modules.
 *
 * @author Philip Helger
 */
@IsSPIImplementation
public final class ThirdPartyModuleProvider_ph_oton_bootstrap3_stub implements IThirdPartyModuleProviderSPI
{
  @Nullable
  public IThirdPartyModule [] getAllThirdPartyModules ()
  {
    return new IThirdPartyModule [] { PhotonAppConfig.LOG4J2 };
  }
}


text:
using UnityEngine;
using System.Collections;

public class StaminaBody : MonoBehaviour
{

    public RagDollSpine player;
    public bool isLeftHand = false;
    public bool isRightHand = false;
    public bool isHead = false;
    public bool isLeftFoot = false;
    public bool isRightFoot = false;
    HingeJoint2D joint;
    StaminaBarScript stamina;
    Rigidbody2D rb;

    void OnCollisionEnter2D(Collision2D coll)
    {
        if (stamina == null)
        {
            stamina = player.StaminaBar.GetComponent<StaminaBarScript>();
        }
        if (rb == null)
        {
            rb = GetComponent<Rigidbody2D>();
        }
        if (stamina.Health > 0 && !stamina.Regening)
        {

            if (coll.gameObject.layer == 31)
            {
                float collisionForce = coll.rigidbody.velocity.magnitude;
                rb.AddForce(coll.relativeVelocity / stamina.Health * (isHead ? 1.5f : 1));
                stamina.DecreaseBar(collisionForce / 5f * (isHead ? 1.5f : 1));
                if (isHead || isLeftFoot || isLeftHand || isRightFoot || isRightHand && rb.velocity.magnitude > 10)
                {
                    SoundManager.instance.PlaySound("Punch");
                }
            }
            else
            {
                float collisionForce = rb.velocity.magnitude;
                if (collisionForce > 10f)
                {
                    stamina.DecreaseBar(collisionForce / 5f * (isHead ? 1.5f : 1));
                }
                player.touchingGround = true;
                if (isLeftFoot)
                {
                    player.leftGrounded = true;
                }
                else if (isRightFoot)
                {
                    player.rightGrounded = true;
                }
            }
        }
    }

    void OnCollisionStay2D(Collision2D coll)
    {
        if (coll.gameObject.tag.Contains("Player"))
        {
            if (joint.enabled == false && isLeftHand && Input.GetAxis("LeftTrigger" + ((int)player.player2).ToString()) > .1f)
            {
                joint.enabled = true;
                joint.connectedBody = coll.rigidbody;
                player.leftGrabbing = true;
            }
            if (joint.enabled == false && isRightHand && Input.GetAxis("RightTrigger" + ((int)player.player).ToString()) > .1f)
            {
                joint.enabled = true;
                joint.connectedBody = coll.rigidbody;
                player.rightGrabbing = true;
            }
        }
        else
        {
            player.touchingGround = true;
            if (isLeftFoot)
            {
                player.leftGrounded = true;
            }
            else if (isRightFoot)
            {
                player.rightGrounded = true;
            }
        }
    }

    // Use this for initialization
    void OnCollisionExit2D(Collision2D coll)
    {
        if (!coll.gameObject.tag.Contains("Player"))
        {
            player.touchingGround = false;
            if (isLeftFoot)
            {
                player.leftGrounded = false;
            }
            else if (isRightFoot)
            {
                player.rightGrounded = false;
            }
        }
    }

    // Use this for initialization
    void Start()
    {
        joint = gameObject.AddComponent<HingeJoint2D>();
        joint.autoConfigureConnectedAnchor = true;
        joint.enabled = false;
    }

    // Update is called once per frame
    void Update()
    {
        //Debug.Log(Input.GetAxis("RightTrigger" + ((int)player.player).ToString()).ToString());

        if (joint != null)
        {
            if (stamina == null)
            {
                stamina = player.StaminaBar.GetComponent<StaminaBarScript>();
            }
            if (rb == null)
            {
                rb = GetComponent<Rigidbody2D>();
            }
            if (stamina.Health == 0)
            {
                joint.connectedBody = null;
                joint.enabled = false;
                player.rightGrabbing = false;
                player.leftGrabbing = false;
            }
            if (joint.enabled == true && isLeftHand && Input.GetAxis("LeftTrigger" + ((int)player.player2).ToString()) <= .1f)
            {
                joint.connectedBody = null;
                joint.enabled = false;
                player.leftGrabbing = false;
            }
            if (joint.enabled == true && isRightHand && Input.GetAxis("RightTrigger" + ((int)player.player).ToString()) <= .1f)
            {
                joint.connectedBody = null;
                joint.enabled = false;
                player.rightGrabbing = false;
            }
        }

    }
}


text:
package com.yydcdut.note.mvp.v.note;

import com.yydcdut.note.mvp.IView;

/**
 * Created by yuyidong on 15/11/16.
 */
public interface IDetailFragView extends IView {

    void showImage(int width, int height, String path);

    void jump2ZoomActivity(int categoryId, int position, int comparator);

}


text:
Imports System.Speech.Recognition
Imports System.Speech.Synthesis

Module ModuleMain

    Friend Sub Main()

        Console.Title = "Talk to Me"
        Console.WriteLine("Press any key to exit.")

        Using speechRecognition = GetSpeechRecognitionEngine()
            SayIt("Waiting you voice . . .")
            speechRecognition.RecognizeAsync(RecognizeMode.Multiple)

            While Not Console.KeyAvailable
                ' waiting for the key
            End While
        End Using
    End Sub

    Private Function GetSpeechRecognitionEngine() As SpeechRecognitionEngine

        Dim sre = New SpeechRecognitionEngine()

        With sre
            .LoadGrammar(New DictationGrammar())
            .SetInputToDefaultAudioDevice()

            AddHandler .SpeechRecognized, _
                Sub(s, e)
                    If e.Result IsNot Nothing AndAlso Not [String].IsNullOrEmpty(e.Result.Text) Then
                        Using New ConsoleForegroundColor(ConsoleColor.Green)
                            Console.WriteLine(e.Result.Text)
                        End Using

                        Return
                    End If

                    Using New ConsoleForegroundColor(ConsoleColor.Red)
                        Console.WriteLine("Recognized text not available.")
                    End Using
                End Sub
            ' AddHandler .SpeechRecognized, AddressOf SpeechRecognizedHandler
        End With

        Return sre
    End Function

    Private Sub SayIt(toSaid As [String])
        Using synthesizer = New SpeechSynthesizer()
            Using New ConsoleForegroundColor(ConsoleColor.Blue)
                Console.WriteLine(toSaid)
            End Using

            synthesizer.Speak(toSaid)
        End Using
    End Sub

    Private Sub SpeechRecognizedHandler(sender As [Object], e As RecognitionEventArgs)
        If e.Result IsNot Nothing AndAlso Not [String].IsNullOrEmpty(e.Result.Text) Then
            Using New ConsoleForegroundColor(ConsoleColor.Green)
                Console.WriteLine(e.Result.Text)
            End Using

            Return
        End If

        Using New ConsoleForegroundColor(ConsoleColor.Red)
            Console.WriteLine("Recognized text not available.")
        End Using
    End Sub

End Module


text:
layout: page
title: Orb Liberated Limited Conference
date: 2016-05-24
author: Jose Coleman
tags: weekly links, java
status: published
summary: Nulla feugiat lorem eu ligula convallis auctor.
banner: images/banner/office-01.jpg
booking:
  startDate: 03/29/2016
  endDate: 03/31/2016
  ctyhocn: MRNNCHX
  groupCode: OLLC
published: true
---
Proin et purus id purus hendrerit faucibus et eu lectus. Aliquam volutpat urna eu urna laoreet, a vulputate sapien porttitor. Etiam fermentum libero velit, sed sodales nunc efficitur non. Sed sapien diam, fringilla sed rhoncus laoreet, scelerisque porttitor est. Donec sit amet ornare ante, nec lacinia metus. Vestibulum posuere tincidunt augue, id ornare nisl bibendum eu. Phasellus sed tellus commodo, molestie velit dictum, dignissim lectus. Proin luctus aliquet pretium. Suspendisse non sem ac ligula efficitur rhoncus. Suspendisse ut orci est. Morbi cursus magna in neque blandit porttitor. Nunc non dolor tortor. In aliquet mauris sed nulla ornare dapibus.

1 Integer cursus sem a eros convallis, sit amet euismod magna venenatis
1 Duis aliquam lacus ac finibus convallis
1 Aenean non nisi ullamcorper, commodo magna ac, condimentum odio.

Vivamus varius viverra gravida. Aenean lorem ligula, commodo nec congue tempus, gravida ut dolor. Nulla facilisi. Praesent id turpis tincidunt odio pulvinar congue vel a nisl. Nam orci felis, venenatis non purus eget, pulvinar lacinia tortor. Sed at tempor ante. In ornare tristique gravida. In hac habitasse platea dictumst. Ut neque neque, mattis condimentum turpis a, aliquam commodo purus. Phasellus eget nibh felis. Phasellus sed nulla auctor erat euismod posuere eget maximus turpis. Aliquam erat volutpat.
Suspendisse dapibus vel eros a accumsan. Nam accumsan gravida sapien quis consectetur. Proin ac sem tortor. Etiam malesuada tempus erat, ut blandit nulla interdum nec. Praesent tristique tincidunt ante ut pulvinar. In fermentum luctus ante, at sagittis magna rhoncus nec. Nunc at vulputate enim. In hac habitasse platea dictumst. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.


text:
(function () {
    'use strict';

    angular.module('admin')
        .component('scientillaAdminMetrics', {
            templateUrl: 'partials/scientilla-admin-metrics.html',
            controller: scientillaAdminMetrics,
            controllerAs: 'vm',
            bindings: {}
        });

    scientillaAdminMetrics.$inject = [
        'Restangular',
        'Notification',
        '$timeout',
        '$element'
    ];

    function scientillaAdminMetrics(Restangular, Notification, $timeout, $element) {
        const vm = this;

        vm.name = 'metricsImport';
        vm.shouldBeReloaded = true;

        vm.importMetrics = importMetrics;
        vm.assignMetrics = assignMetrics;
        vm.getLogs = getLogs;
        vm.getMetrics = getMetrics;

        vm.types = {
            'import': {
                taskName: 'import:sourcesMetrics',
                element: '#log-viewer-import',
                refreshingLogs: false,
                logs: [],
                refreshingMetrics: false,
                metrics: []
            },
            'assign': {
                taskName: 'documents:assignMetrics',
                element: '#log-viewer-assign',
                refreshingLogs: false,
                logs: [],
                refreshingMetrics: false,
                metrics: []
            }
        };

        vm.$onInit = function () {
            const registerTab = requireParentMethod($element, 'registerTab');
            registerTab(vm);
        };

        vm.$onDestroy = function () {
            const unregisterTab = requireParentMethod($element, 'unregisterTab');
            unregisterTab(vm);
        };

        vm.reload = () => {
            vm.years = getYears();
            vm.years.unshift('All');
            vm.year = vm.years[0];

            for (const type in vm.types) {
                getLogs(type);
                getMetrics(type);
            }
        };

        function getYears() {
            const years = [];
            const today = new Date();
            let year = today.getFullYear();

            while(year >= 2016) {
                years.push(year);
                year--;
            }

            return years;
        }

        /* jshint ignore:start */
        async function importMetrics() {
            const formData = new FormData();
            if (vm.sourceMetricsFile) {
                formData.append('file', vm.sourceMetricsFile);
            }

            await Restangular.one('source-metrics/import').customPOST(formData, '', undefined, {'Content-Type': undefined});

            vm.sourceMetricsFile = null;
            document.getElementById('sourceMetricsFile').value = null;

            Notification.success('Import source metrics is been started!');
        }

        async function assignMetrics() {
            await Restangular.one('source-metrics/assign').customPOST({year: vm.year});

            vm.sourceMetricsFile = null;
            document.getElementById('year').selectedIndex = 0;
            vm.year = vm.years[0];

            Notification.success('Assignment source metrics is been started!');
        }

        async function getMetrics(type) {
            vm.types[type].refreshingMetrics = true;
            vm.types[type].metrics = await Restangular.one('source-metrics/' + type).get();
            $timeout(() => {
                vm.types[type].refreshingMetrics = false;
            }, 500);
        }

        async function getLogs(type) {
            vm.types[type].refreshingLogs = true;

            const res = await Restangular.one('logs/' + vm.types[type].taskName).get();

            if (res.type === 'success') {
                vm.types[type].logs = res.logs;
            }

            $timeout(() => {
                vm.types[type].refreshingLogs = false;
                angular.element(vm.types[type].element).scrollTop(99999999);
            }, 500);
        }
        /* jshint ignore:end */
    }

})();


text:
module HLearn.Data.SpaceTree.Algorithms
    (

    Neighbor (..)

    , findNeighbor
    , findNeighbor_NoSort
    )
    where

import GHC.Exts (inline)
import Data.List (sortBy)

import SubHask
import SubHask.Algebra.Array
import SubHask.Algebra.Container
import SubHask.Algebra.Vector
import SubHask.Compatibility.Containers
import SubHask.Monad
import SubHask.TemplateHaskell.Deriving

import HLearn.Data.SpaceTree

-------------------------------------------------------------------------------

data Neighbor dp = Neighbor
    { neighbor         :: !dp
    , neighborDistance :: !(Scalar dp)
    }

deriving instance (Show dp, Show (Scalar dp)) => Show (Neighbor dp)

instance (NFData dp, NFData (Scalar dp)) => NFData (Neighbor dp) where
    rnf (Neighbor _ _) = ()

type instance Logic (Neighbor dp) = Bool

instance (Eq dp, Eq (Scalar dp)) => Eq_ (Neighbor dp) where
    (Neighbor dp1 dist1)==(Neighbor dp2 dist2) = dist1==dist2 && dp1==dp2

----------------------------------------

-- | Find the nearest neighbor of a node.
--
-- NOTE:
-- If we remove the call to "inline" on "foldr'",
-- GHC 7.10 will pass dictionaries and everything becomes very slow.
{-# INLINE findNeighbor #-}
findNeighbor ::
    ( SpaceTree t dp
    , Bounded (Scalar dp)
    ) => Scalar dp -> t dp -> dp -> Neighbor dp
findNeighbor ε t q =
    {-# SCC findNeighbor #-}
    go (Labeled' t startdist) startnode
    where
        startnode = if startdist == 0
            then Neighbor q maxBound
            else Neighbor (stNode t) startdist

        startdist = distance (stNode t) q

        go (Labeled' t dist) (Neighbor n distn) = if dist*ε > maxdist
            then Neighbor n distn
            else inline foldr' go leafres
                $ sortBy (\(Labeled' _ d1) (Labeled' _ d2) -> compare d2 d1)
                $ map (\t' -> Labeled' t' (distanceUB q (stNode t') (distnleaf+stMaxDescendentDistance t)))
                $ toList
                $ stChildren t
            where
                leafres@(Neighbor _ distnleaf) = inline foldr'
                    (\dp n@(Neighbor _ distn') -> cata dp (distanceUB q dp distn') n)
                    (cata (stNode t) dist (Neighbor n distn))
                    (stLeaves t)

                maxdist = distn+stMaxDescendentDistance t

        cata !dp !dist (Neighbor n distn) =
            if dist==0 || dist>distn
                then Neighbor n distn
                else Neighbor dp dist

----------------------------------------

-- | Find the nearest neighbor of a node.
-- Internally, this function does not sort the distances of the children before descending.
-- In some (rare) cases this reduces the number of distance comparisons.
{-# INLINE findNeighbor_NoSort #-}
findNeighbor_NoSort ::
    ( SpaceTree t dp
    , Bounded (Scalar dp)
    ) => Scalar dp -> t dp -> dp -> Neighbor dp
findNeighbor_NoSort ε t q =
    {-# SCC findNeighbor_NoSort #-}
    go t (Neighbor q maxBound)
    where
        go t res@(Neighbor _ distn) = if dist*ε > maxdist
            then res
            else inline foldr' go leafres $ stChildren t
            where
                leafres = inline foldr'
                    (\dp n@(Neighbor _ distn') -> cata dp (distanceUB q dp distn') n)
                    (cata (stNode t) dist res)
                    (stLeaves t)

                dist = distanceUB q (stNode t) maxdist
                maxdist = distn+stMaxDescendentDistance t

        cata !dp !dist (Neighbor n distn) =
            if dist==0 || dist>distn
                then Neighbor n distn
                else Neighbor dp dist


text:
/**
 * Created by tokunaga on 2015/09/23.
 */
(function(){
    Parse.initialize("5R4FX9XGUVWgEGEdUz2dTxjvZsYlxJswNbht98Ga", "E7IvAMZ7Bs9Hczwdgx5ktIO2OJ0pxV1N6vFwXsuH");
    var currentUser = Parse.User.current();
    if(currentUser){

    }else{
        location.href="./login.html";
    }

    $('#login-submit').click(function(event){
        event.preventDefault();//‰æ–ʂ̃Šƒ[ƒh'ð–h'®
        var username = $('#login-username').val();
        var password = $('#login-password').val();
        Parse.User.logIn(username,password,{
                success:function(user){
//                    self.undelegateEvents();
                    console.log(user);
                    window.sessionStorage.setItem("use",user);
//                      window.location.href("./todo.html");
                    document.location = ("../todo.html");

                    delete self;
                },
                error: function(    user,error){
                    self.$(".login-form .error").html("Invalid username or password. Please try again.").show();

                    self.$(".login-form button").removeAttr("disabled");
                }
            }
        );
    });
    $('#signup-submit').click(function(event){
        event.preventDefault();//prevent reload
        var username = $('#signup-username').val();
        var password = $('#signup-password').val();
        var newUser = new Parse.User();
        newUser.set("username",username);
        newUser.set("password",password);
        newUser.signUp(null,{
            success: function(user){

            },
            error: function(user,error){
                alert("Error:"+error.code+ "" +error.message);
            }
        });

    });

//    Parse.initialize("APPLICATION_ID", "JAVASCRIPT_KEY");
//
//    var TestObject = Parse.Object.extend("TestObject");
//    var testObject = new TestObject();
//    testObject.save({foo: "bar"}, {
//        success: function(object) {
//            $(".success").show();
//        },
//        error: function(model, error) {
//            $(".error").show();
//        }
//    });
    //var Task = Backbone.Model.extend({
    //    defaults: {
    //        title: 'do something',
    //        completed: false
    //    },
    //    validate: function(attrs){
    //        if(_.isEmpty(attrs.title)){
    //            return 'title must not be empty';
    //        }
    //    },
    //    initialize: function(){
    //        this.on('invalid', function(model, error){
    //           $('#error').html(error);
    //        });
    //    }
    //});
    //var Tasks = Backbone.Collection.extend({model: Task});
    //var TaskView = Backbone.View.extend({
    //    tagName: 'li',
    //    initialize: function(){
    //        this.model.on('destroy', this.remove, this);
    //        this.model.on('change', this.render, this);
    //    },
    //    events: {
    //      'click .delete': 'destroy',
    //        'click .toggle': 'toggle'
    //    },
    //    toggle: function(){
    //        console.log(this.model.get('completed'));
    //      this.model.set('completed', !this.model.get('completed'));
    //    },
    //    destroy: function(){
    //        if(confirm('are you sure?')){
    //            this.model.destroy();
    //        }
    //    },
    //    remove: function(){
    //      this.$el.remove();
    //    },
    //    template: _.template($('#task-template').html()),
    //    render: function(){
    //        var template = this.template(this.model.toJSON());
    //        this.$el.html(template);
    //        return this;
    //    }
    //});
    //var TasksView = Backbone.View.extend({
    //   tagName: 'ul',
    //    initialize: function(){
    //      this.collection.on('add', this.addNew, this);
    //        this.collection.on('destroy', this.updateCount, this);
    //        this.collection.on('change', this.updateCount, this);
    //    },
    //    updateCount: function(){
    //        var uncompletedTasks = this.collection.filter(function(task){
    //           return !task.get('completed');
    //        });
    //        $('#count').html(uncompletedTasks.length);
    //    },
    //    addNew: function(task){
    //      var taskView = new TaskView({model: task});
    //        this.$el.append(taskView.render().$el);
    //        $('#title').val('').focus();
    //        this.updateCount();
    //    },
    //    render: function(){
    //
    //        this.collection.each(function(task){
    //            console.log(task);
    //           var taskView = new TaskView({model: task});
    //            this.$el.append(taskView.render().el);
    //        },this);
    //        this.updateCount();
    //        return this;
    //    }
    //});
    //var AddTaskView = Backbone.View.extend({
    //   el: '#addTask',
    //    events:{
    //        'submit': 'submit'
    //    },
    //    submit: function(e){
    //        e.preventDefault();
    //       // var task = new Task({title: $('#title').val()});
    //        var task = new Task();
    //        if(task.set({title: $('#title').val()},{validate: true})){
    //            this.collection.add(task);
    //            $('#error').empty();
    //
    //        }
    //
    //    }
    //});
    //
    //var tasks = new Tasks([
    //    {
    //        title: 'task1"',
    //        completed: true
    //    },
    //    {
    //        title: 'task2"'
    //    },
    //    {
    //        title: 'task3"'
    //    }
    //]);
    //var tasksView = new TasksView({collection: tasks});
    //console.log(tasksView);
    //console.log($('#tasks'));
    //$('#tasks').html(tasksView.render().el);
    //var addTaskView = new AddTaskView({collection: tasks});
})();


text:
<?php

require_once dirname(__FILE__).'/../lib/roleGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/roleGeneratorHelper.class.php';

/**
 * role actions.
 *
 * @package    sf_sandbox
 * @subpackage role
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class roleActions extends autoRoleActions
{
}