text:
import THREE from 'three'
import BaseHelper from "./BaseHelper"
import {GizmoMaterial,GizmoLineMaterial} from "./GizmoMaterial"

/*
 id: inner diameter : blank space at center of cross
*/
class CrossHelper extends BaseHelper{
  constructor( options ) {
    const DEFAULTS = {
      size:5,
      color:"#0F0",
      highlightColor: "#F00",
      opacity:0.8,
      internalDiameter:0 //??huh
    }

    options = Object.assign({}, DEFAULTS, options)
    super(options)
    Object.assign(this, options)

    let {internalDiameter,opacity, size} = this
    let offsetPos = size/2 + internalDiameter/2
    //starting point cross
    let startCrossGeometry = new THREE.Geometry()
    startCrossGeometry.vertices.push( new THREE.Vector3( 0, -offsetPos, 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( 0, -internalDiameter/2, 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( 0, offsetPos , 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( 0, internalDiameter/2 , 0 ) )

    startCrossGeometry.vertices.push( new THREE.Vector3( -offsetPos, 0, 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( -internalDiameter/2, 0, 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( offsetPos, 0 , 0 ) )
    startCrossGeometry.vertices.push( new THREE.Vector3( internalDiameter/2, 0 , 0 ) )

    this.centerCross = new THREE.Line( startCrossGeometry,
      new GizmoLineMaterial( {
        color: this.color,
        highlightColor:this.highlightColor,
        lineWidth:this.lineWidth,
        opacity:opacity,
        transparent:true,
        side:THREE.FrontSide } ),THREE.LinePieces )
    this.centerCross.material.depthTest   = false
    this.centerCross.material.depthWrite  = false
    this.centerCross.material.renderDepth = 1e20

    this.add( this.centerCross )
  }
}

export default CrossHelper


text:
package com.lightbend.lagom.maven

import java.net.URLClassLoader
import javax.inject.{ Inject, Singleton }

import org.eclipse.aether.artifact.Artifact

/**
 * Implements sharing of Scala classloaders, to save on memory
 */
@Singleton
class ScalaClassLoaderManager @Inject() (logger: MavenLoggerProxy) {

  /**
   * The list of Scala libraries. None of these libraries may have a dependency outside of this list, otherwise there
   * will be classloading issues.
   *
   * Note that while adding more libraries to this list will allow more to be shared, it may also mean that classloaders
   * can be shared in less cases, since it becomes less likely that there will be an exact match between two projects
   * in what can be shared.
   */
  private val ScalaLibs = Set(
    "org.scala-lang" -> "scala-library",
    "org.scala-lang" -> "scala-reflect",
    "org.scala-lang.modules" -> "scala-xml",
    "org.scala-lang.modules" -> "scala-parser-combinators",
    "org.scala-lang.modules" -> "scala-java8-compat"
  )

  private val ScalaVersionPattern = "_\\d+\\.\\d+.*$".r
  private def stripScalaVersion(artifactId: String) = ScalaVersionPattern.replaceFirstIn(artifactId, "")

  private def createCacheKey(artifacts: Seq[Artifact]): String = {
    artifacts.map { artifact =>
      import artifact._
      s"$getGroupId:$getArtifactId:$getVersion"
    }.sorted.mkString(",")
  }

  private var cache = Map.empty[String, ClassLoader]

  /**
   * Extract a Scala ClassLoader from the given classpath.
   */
  def extractScalaClassLoader(artifacts: Seq[Artifact]): ClassLoader = synchronized {
    val scalaArtifacts = artifacts.filter { artifact =>
      ScalaLibs.contains(artifact.getGroupId -> stripScalaVersion(artifact.getArtifactId))
    }

    val cacheKey = createCacheKey(scalaArtifacts)
    cache.get(cacheKey) match {
      case Some(classLoader) =>
        logger.debug(s"ScalaClassLoader cache hit - $cacheKey")
        classLoader
      case None =>
        logger.debug(s"ScalaClassLoader cache miss - $cacheKey")
        val classLoader = new URLClassLoader(scalaArtifacts.map(_.getFile.toURI.toURL).toArray, null)
        cache += (cacheKey -> classLoader)
        classLoader
    }
  }

}

redpajama_set_name: RedPajamaGithub


text:
package org.openforis.collect.event;

import org.openforis.idm.model.Value;

/**
 *
 * @author D. Wiell
 * @author S. Ricci
 *
 */
public abstract class AttributeValueUpdatedEvent<V extends Value> extends AttributeEvent {

	private V value;

	public V getValue() {
		return value;
	}

	public void setValue(V value) {
		this.value = value;
	}
}


text:
class CKeyConfigDlg : public CDialogEx
{
// Construction
public:
	CKeyConfigDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_KEYCONFIG_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CComboBox comboKeyS;
	CComboBox comboKeyE;
	afx_msg void OnBnClickedOk();
	CEdit editBrwose;
	afx_msg void OnBnClickedBrowse();
	CButton checkExplorer;
	afx_msg void OnBnClickedCheck1();
	CButton buttonBrowse;
	CButton checkKeepRuning;
	afx_msg void OnBnClickedCheck2();
	CButton checkDeactivateSwitch;
	afx_msg void OnBnClickedCheck3();
};


text:
<?php
include_once 'CapabilityAPI.php';

/**
 * Twilio TaskRouter Capability assigner
 *
 * @category Services
 * @package  Services_Twilio
 * @author Justin Witz <justin.witz@twilio.com>
 * @license  http://creativecommons.org/licenses/MIT/ MIT
 */
class Services_Twilio_TaskRouter_Worker_Capability
{
    private $accountSid;
    private $authToken;
    private $workspaceSid;
    private $workerSid;
    private $apiCapability;

    private $baseUrl = 'https://taskrouter.twilio.com/v1';
    private $baseWsUrl = 'https://event-bridge.twilio.com/v1/wschannels';
    private $workerUrl;
    private $reservationsUrl;
    private $activityUrl;

    private $required = array("required" => true);
    private $optional = array("required" => false);

    public function __construct($accountSid, $authToken, $workspaceSid, $workerSid, $overrideBaseUrl = null, $overrideBaseWSUrl = null)
    {
        $this->accountSid = $accountSid;
        $this->authToken = $authToken;
        $this->workspaceSid = $workspaceSid;
        $this->workerSid = $workerSid;
        $this->apiCapability = new Services_Twilio_API_Capability($accountSid, $authToken, 'v1', $workerSid);
        if(isset($overrideBaseUrl)) {
            $this->baseUrl = $overrideBaseUrl;
        }
        if(isset($overrideBaseWSUrl)) {
            $this->baseWsUrl = $overrideBaseWSUrl;
        }
        $this->baseUrl = $this->baseUrl.'/Workspaces/'.$workspaceSid;
        $this->workerUrl = $this->baseUrl.'/Workers/'.$workerSid;
        $this->reservationsUrl = $this->baseUrl.'/Tasks/**';
        $this->activityUrl = $this->baseUrl.'/Activities';

        //add permissions to GET and POST to the worker URI
        $this->apiCapability->generateAndAddPolicy($this->baseWsUrl."/".$this->accountSid."/".$this->workerSid, "GET", null, null);
        $this->apiCapability->generateAndAddPolicy($this->baseWsUrl."/".$this->accountSid."/".$this->workerSid, "POST", null, null);
        $this->apiCapability->generateAndAddPolicy($this->activityUrl, "GET", null, null);
    }

    public function allowWorkerActivityUpdates() {
        $method = 'POST';
        $queryFilter = array();
        $postFilter = array("ActivitySid" => $this->required);
        $this->apiCapability->generateAndAddPolicy($this->workerUrl, $method, $queryFilter, $postFilter);
    }

    public function allowWorkerFetchAttributes() {
        $method = 'GET';
        $queryFilter = array();
        $postFilter = array();
        $this->apiCapability->generateAndAddPolicy($this->workerUrl, $method, $queryFilter, $postFilter);
    }

    public function allowTaskReservationUpdates() {
        $method = 'POST';
        $queryFilter = array();
        $postFilter = array("ReservationStatus" => $this->required);
        $this->apiCapability->generateAndAddPolicy($this->reservationsUrl, $method, $queryFilter, $postFilter);
    }

     public function allowActivityListFetch(){
        $method = 'GET';
        $queryFilter = array();
        $postFilter = array();
        $this->apiCapability->generateAndAddPolicy($this->activityUrl, $method, $queryFilter, $postFilter);

    }

    public function generateToken($ttl = 3600) {
        $taskRouterAttributes = array(
            'account_sid' => $this->accountSid,
            'channel' => $this->workerSid,
            'workspace_sid' => $this->workspaceSid,
            'worker_sid' => $this->workerSid,
        );
    	return $this->apiCapability->generateToken($ttl, $taskRouterAttributes);
    }
}


text:
module XPath
  class Expression
    attr_accessor :expression, :arguments
    include XPath::DSL

    def initialize(expression, *arguments)
      @expression = expression
      @arguments = arguments
    end

    def current
      self
    end

    def to_xpath(type=nil)
      Renderer.render(self, type)
    end
    alias_method :to_s, :to_xpath
  end
end


text:
MO_NAMESPACE_BEGIN

MO_CLASS_IMPLEMENT_INHERITS(FTemplateParser, FConfigParser);

//============================================================
// <T>¹¹ÔìÄ£°å±êÇ©¡£</T>
//============================================================
FTemplateParser::FTemplateParser(){
   _optionTextNode = ETrue;
   _pFactory->Register(MO_CONFIG_ELEMENT_NODE, FTemplateTag::Class());
   _pFactory->Register(MO_CONFIG_ELEMENT_TEXT, FTemplateTagText::Class());
   _pFactory->Register(TC("write"), FTemplateTagWrite::Class());
   _pFactory->Register(TC("include"), FTemplateTagInclude::Class());
   _pFactory->Register(TC("true"), FTemplateTagTrue::Class());
   _pFactory->Register(TC("false"), FTemplateTagFalse::Class());
   _pFactory->Register(TC("counter"), FTemplateTagCounter::Class());
}

//============================================================
// <T>Îö¹¹Ä£°å±êÇ©¡£</T>
//============================================================
FTemplateParser::~FTemplateParser(){
}

//============================================================
// <T>½âÎöÀ´Ô´¹¹³ÉÄ£°å¡£</T>
//
// @return Ä£°å
//============================================================
FTemplateSource* FTemplateParser::Load(TCharC* pSource){
   // ½âÎöÄÚÈÝ
   FTemplateTag* pRootTag = FTemplateTag::InstanceCreate();
   Parse(pRootTag, pSource);
   // ´´½¨Ä£°å
   FTemplateSource* pTemplateSource = FTemplateSource::InstanceCreate();
   pTemplateSource->SetRootTag(pRootTag);
   return pTemplateSource;
}

MO_NAMESPACE_END


text:
package com.sheepdog.mashmesh.integration;

import com.google.appengine.api.mail.MailServicePb;
import com.meterware.httpunit.PostMethodWebRequest;
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
import com.meterware.servletunit.ServletUnitClient;
import com.sheepdog.mashmesh.TestLocationConstants;
import com.sheepdog.mashmesh.models.OfyService;
import com.sheepdog.mashmesh.models.RideRequest;
import com.sheepdog.mashmesh.tasks.SendNotificationTask;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.xml.sax.SAXException;

import java.io.IOException;
import java.util.Collections;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

/**
 * Tests for the case that an appointment notification is sent for a patient
 * when there are no volunteers in the system.
 */
public class MatchWithZeroVolunteersTest {
    private final IntegrationTestHelper integrationTestHelper = new IntegrationTestHelper();

    @Before
    public void setUp() throws Exception {
        integrationTestHelper.setUp();
    }

    @After
    public void tearDown() throws Exception {
        integrationTestHelper.tearDown();
    }

    /**
     * Integration test which checks that match failure notifications are sent to
     * patients when there are no volunteers in the system to match them with.
     */
    @Test
    public void testMatchWithoutVolunteer() throws IOException, SAXException {
        integrationTestHelper.signUpPatient(IntegrationTestConstants.PATIENT_1);
        integrationTestHelper.setNotLoggedIn();

        ServletUnitClient client = integrationTestHelper.getClient();

        WebRequest request = new PostMethodWebRequest("http://localhost/resources/notification");
        request.setParameter("patientEmail", IntegrationTestConstants.PATIENT_1.getEmail());
        request.setParameter("appointmentAddress", TestLocationConstants.PALO_ALTO_MEDICAL_FOUNDATION_ADDRESS);
        request.setParameter("appointmentTime", "2013-06-05T16:30:00-0700");

        WebResponse response = client.getResponse(request);
        assertEquals(200, response.getResponseCode());

        assertEquals(1, integrationTestHelper.getTaskCount(SendNotificationTask.QUEUE_NAME));
        assertTrue(integrationTestHelper.waitForTask());

        // Make sure that we sent out a match failure notification
        MailServicePb.MailMessage sentMessage = integrationTestHelper.popNextEmailMessage();
        assertTrue(sentMessage.getSubject().startsWith("No Pickup Available"));
        assertEquals(Collections.singletonList(IntegrationTestConstants.PATIENT_1.getEmail()), sentMessage.tos());

        // Make sure that no ride requests remain
        assertEquals(0, OfyService.ofy().query(RideRequest.class).count());
    }
}


text:
TAR=https://gitlab.redox-os.org/redox-os/gcc/-/archive/redox/gcc-redox.tar.gz
#GIT=https://gitlab.redox-os.org/redox-os/gcc.git
#GIT_UPSTREAM=https://gcc.gnu.org/git/gcc.git
#BRANCH=redox
BUILD_DEPENDS=(relibc)
DEPENDS="gnu-binutils relibc"

function recipe_version {
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    skip=1
}

function recipe_build {
    ./contrib/download_prerequisites
    cp config.sub gmp/config.sub
    cp config.sub isl/config.sub
    cp config.sub mpfr/config.sub
    cp -f config.sub mpc/config.sub

    sysroot="$(realpath ../sysroot)"
    mkdir -p "$sysroot/usr"
    ln -sf "$sysroot/include" "$sysroot/usr/include"
    ln -sf "$sysroot/lib" "$sysroot/usr/lib"
    export LDFLAGS="--static"
    ./configure \
        --build=${BUILD} \
        --host=${HOST} \
        --target=${HOST} \
        --prefix=/ \
        --with-sysroot=/ \
        --with-build-sysroot="$sysroot" \
        --enable-static \
        --enable-shared \
        --disable-dlopen \
        --disable-nls \
        --enable-languages=c,c++ \
        --enable-threads=posix
    "$REDOX_MAKE" -j "$(nproc)" all-gcc all-target-libgcc all-target-libstdc++-v3
    skip=1
}

function recipe_clean {
    "$REDOX_MAKE" clean
    skip=1
}

function recipe_stage {
    dest="$(realpath $1)"
    "$REDOX_MAKE" DESTDIR="$dest" install-gcc install-target-libgcc install-target-libstdc++-v3
    find "$dest"/{bin,libexec} -exec $STRIP {} ';' 2> /dev/null
    ln -s "gcc" "$1/bin/cc"
    skip=1
}


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

setlocal

set PRG=%0
rem check if path is quoted
if "%PRG:~-4,3%" == "bat" (
  set "PRG=%PRG:~1,-1%"
)
rem check if path is absolute
if not "%PRG:~1,1%" == ":" (
  set "PRG=%CD%\%PRG%"
)
rem determine DIRNAME and BASENAME
set "DIRNAME=%PRG%"
set BASENAME=
:dirname
if "%DIRNAME:~-1%" NEQ "\" (
  set "BASENAME=%DIRNAME:~-1%%BASENAME%"
  set "DIRNAME=%DIRNAME:~0,-1%"
  goto dirname
)
rem strip backslash (\)
set DIRNAME=%DIRNAME:~0,-1%

rem Guess BASEDIR if not defined
if not "%BASEDIR%" == "" goto okHome
set "BASEDIR=%DIRNAME%"
:basedir
if "%BASEDIR:~-1%" NEQ "\" (
  set "BASEDIR=%BASEDIR:~0,-1%"
  goto basedir
)
set BASEDIR=%BASEDIR:~0,-1%
if exist "%BASEDIR%\bin\%BASENAME%" goto okHome
echo The BASEDIR environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

if not "%NAME%" == "" goto gotName
set "NAME=%BASENAME%"
:name
if "%NAME:~-1%" NEQ "-" (
  set "NAME=%NAME:~0,-1%"
  goto name
)
rem strip dash (-)
set "NAME=%NAME:~0,-1%"
:gotName

set "EXECUTABLE=%BASEDIR%\bin\%NAME%.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

"%EXECUTABLE%" stop %CMD_LINE_ARGS%

:end


text:
process.stdin.resume();
process.stdin.setEncoding('ascii');

var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;

process.stdin.on('data', function (data) {
    input_stdin += data;
});

process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");
    main();
});

function readLine() {
    return input_stdin_array[input_currentline++];
}

function main(){
    // read the string s
    var s=readLine();
    var len=s.length;
    // create the Solution class object p
    var obj=new Solution();
    //push/enqueue all the characters of string s to stack
    for(var i=0;i<len;i++){
        obj.pushCharacter(s.charAt(i));
        obj.enqueueCharacter(s.charAt(i));
    }

    var isPalindrome=true;
    /*
    pop the top character from stack
    dequeue the first character from queue
    compare both the characters*/

    for(var i=0;i<len/2;i++){
        if(obj.popCharacter()!=obj.dequeueCharacter()){
            isPalindrome=false;
          	break;
        }
    }
    //finally print whether string s is palindrome or not

    if(isPalindrome)
        console.log("The word, "+s+", is a palindrome.");
    else
        console.log("The word, "+s+", is not a palindrome.");
}

function Solution(){
  //Write your code here
  var stack = []
  var queue = []

  //add to the different arrays
  this.pushCharacter = function(n) {
    stack.push(n)
  }

  this.enqueueCharacter = function(n) {
    queue.push(n)
  }

  //remove from the different arrays - pop to remove the last index and shift for the first index
  this.popCharacter = function() {
    return stack.pop()
  }

  this.dequeueCharacter = function() {
    return queue.shift()
  }
}


text:
<?php include("header.php"); include("../config.inc"); ?>

<a href="/student/?S<?php echo $sid?>">Student

<a href="document.php?S<?php echo $sid?>">Documents

<a href="audit.php?S<?php echo $sid?>">Audit

<?php
$error_exist = "";
$nerror = -1;

if ($_SERVER["REQUEST_METHOD"] == "POST") {
	$nerror = 0;
	if(isset($_FILES["file"])){
$allowedExts = array("jpeg", "jpg", "png", "pdf");
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/jpg")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "image/x-png")
|| ($_FILES["file"]["type"] == "image/png"))
&& in_array($extension, $allowedExts))
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "
";
    }
  else
    {

    if (file_exists("document/S" . $sid . "/" . $_FILES["file"]["name"]))
      {
      $error_exist = $_FILES["file"]["name"] . " already exists. ";
      $nerror++;
      }
    else
      {
      	if (!file_exists("document/S" . $sid)) {
    		mkdir("document/S" . $sid, 0777, true);
		}
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "document/S" . $sid . "/" . $_FILES["file"]["name"]);
      $name = $_FILES["file"]["name"];
      $username = $_SESSION['username'];
      $query = mysql_query("SELECT * FROM users WHERE username = '$username'");
      $row = mysql_fetch_array($query);
      $uploader = $row['name'];
      $notes = validateinput($_POST["notes"]);

      mysql_query ("INSERT INTO documents (`sid`,`name`, `uploaded`, `uploader`, `notes`) VALUES ($sid, '$name', DATE(NOW()), '$uploader', '$notes')");

	$username = $_SESSION['username'];
	$query = mysql_query("SELECT * FROM users WHERE username = '$username'");
	$row = mysql_fetch_array($query);
	$user = $row['name'];
	mysql_query ("INSERT INTO `saudits` (`sid`, `type`, `description`, `date`, `by`) VALUES ($sid, 'Document', '$name uploaded', DATE(NOW()), '$user');");

      }
    }
  }
else
  {
  echo "Invalid file";
  }
}
}

function validateinput($data)
{
   $data = trim($data);
   $data = stripslashes($data);
   $data = htmlspecialchars($data);
   return $data;
}
?>

<?php
			if ($nerror > 0) {
				echo "
";
				echo $error_exist;

				echo "
";
			} else if ($nerror == 0) {
				echo "
 Document successfully uploaded.

";
			}

			$query = sprintf("SELECT * FROM `students` WHERE sid = '" . $sid . "';");
			$result = mysql_query($query);
			$row = mysql_fetch_array($result);
		?>

				Number

				Name

				S<?php echo $sid ?>

				<?php echo $row['fname'] . " " . $row['mname'] . " " . $row['lname'];?>

		  Add Document

		<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);echo "?S" . $sid . "#documents";?>" method="post"
		enctype="multipart/form-data">

 Upload
		<input type="text" name="notes" style="width: 60%;" placeholder="Description">
		<input type="file" name="file" id="file" style="display:none;" required>
		<button type="submit" class="btn small" name="submit"  value="Submit">Save</button>
		</form>

			Name
			Uploaded
			By
			Notes

		<?php
		$query = sprintf("SELECT * FROM `documents` WHERE sid = '$sid';");
		$result = mysql_query($query);

		if (!$result) {
		    $message  = 'Invalid query: ' . mysql_error() . "\n";
		    $message .= 'Whole query: ' . $query;
		    die($message);
		}

		$fields_num = mysql_num_fields($result);

		if (mysql_num_rows($result) == 0) { echo ""; }

		else {

			while($row = mysql_fetch_array($result))
			{
				$date = new DateTime($row['uploaded']);
				echo "
";
				echo "" . $row['name'] . "	";
				echo "" . $date->format("d/m/Y") . "	";
				echo "" . $row['uploader'] . "	";
				echo "" . $row['notes'] . "	";
				echo "	";
				echo "
\n";
			}
			echo "
";

		}
		mysql_free_result($result);
		?>

<?php include("footer.php"); ?>


text:
#ifndef FFW_CONFIG
#define FFW_CONFIG

/*
#if __cplusplus < 201103L
#error This library needs at least a C++11 compliant compiler
#endif
*/

// Use multi byte strings, needed by windows.h
#define UNICODE 1

// FragmentFramework export
#ifdef FFW_EXPORTS
#define FFW_API __declspec(dllexport)
#else
#define FFW_API __declspec(dllimport)
#endif

// If using Visual Studio
#ifdef _MSC_VER
#define _USING_MSVC
#pragma warning( disable: 4251 )
// Use STD threads
#define FFW_USE_STD_THREADS 1
#endif

// If using MinGW
#ifdef __MINGW32__
#define _USING_MINGW
#endif

#endif


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>GH-1842 reloading iframe</title>

GH-1842 reloading iframe


text:
using Sniper.Common;
using System.Collections.ObjectModel;

namespace Sniper.Contracts.Entities.Common
{
    public interface IHasUserStories
    {
        Collection<UserStory> UserStories { get; }
    }
}


text:
@interface ZJProfileDetailViewController : UIViewController

@end


text:
package com.communote.server.core.plugin;

import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;

import org.apache.commons.lang3.StringUtils;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

import com.communote.server.core.common.caching.CacheElementProvider;
import com.communote.server.core.common.time.LastModificationAware;
import com.communote.server.model.property.PluginProperty;
import com.communote.server.persistence.property.PluginPropertyDao;

/**
 * @author Communote GmbH - http://www.communote.com/
 */
public class PluginPropertyCacheElementProvider implements
        CacheElementProvider<PluginPropertyCacheKey<? extends Serializable>, Serializable> {

    private final PluginPropertyDao pluginPropertyDao;

    private final ObjectMapper objectMapper;

    /**
     * Constructor.
     *
     * @param pluginPropertyDao
     *            The dao to use for access.
     * @param objectMapper
     *            The object mapper to use.
     */
    public PluginPropertyCacheElementProvider(PluginPropertyDao pluginPropertyDao,
            ObjectMapper objectMapper) {
        this.pluginPropertyDao = pluginPropertyDao;
        this.objectMapper = objectMapper;
    }

    /**
     * Method to assert if a property is either an application property or client property. This
     * method throws an {@link IllegalArgumentException}.
     *
     * @param pluginProperty
     *            The property to check.
     * @param isApplicationProperty
     *            If true, the property must be an application property, else a client property.
     */
    private void assertIsApplicationProperty(PluginProperty pluginProperty,
            boolean isApplicationProperty) {
        if (pluginProperty.isApplicationProperty() != isApplicationProperty) {
            throw new IllegalArgumentException(
                    "You tried to access a " + (isApplicationProperty ? "application" : "client")
                            + " property which is an "
                            + (isApplicationProperty ? "client" : "application")
                            + " property (id: " + pluginProperty.getId() + ")");
        }
    }

    /**
     * @return PluginProperty.
     */
    @Override
    public String getContentType() {
        return "pluginProperty";
    }

    /**
     * @param symbolicName
     *            Symbolic name of the bundle.
     * @param propertyKey
     *            The properties key.
     * @param isApplicationProperty
     *            True, if an application property, false for client property.
     * @return The property or null.
     */
    private PluginProperty getProperty(String symbolicName, String propertyKey,
            boolean isApplicationProperty) {
        PluginProperty pluginProperty = pluginPropertyDao.find(symbolicName, propertyKey);
        if (pluginProperty == null) {
            return null;
        }
        assertIsApplicationProperty(pluginProperty, isApplicationProperty);
        return pluginProperty;
    }

    /**
     * @param symbolicName
     *            Symbolic name of the bundle.
     * @param propertyKey
     *            The properties key.
     * @param isApplicationProperty
     *            True, if an application property, false for client property.
     * @return The property as object or null.
     * @param clazz
     *            Class holding the properties type.
     * @throws JsonParseException
     *             Exception.
     * @throws JsonMappingException
     *             Exception.
     * @throws IOException
     *             Exception.
     */
    private Serializable getPropertyAsObject(String symbolicName, String propertyKey,
            boolean isApplicationProperty, Class<? extends Serializable> clazz)
            throws JsonParseException, JsonMappingException, IOException {
        PluginProperty property = getProperty(symbolicName, propertyKey, isApplicationProperty);
        if (property == null || property.getPropertyValue() == null) {
            return null;
        }
        String valueAsString = StringUtils.substringAfter(property.getPropertyValue(), "=");
        Serializable result = objectMapper.readValue(valueAsString, clazz);
        if (result instanceof LastModificationAware) {
            ((LastModificationAware) result).setLastModificationDate(property
                    .getLastModificationDate());
        }
        return result;
    }

    private String getPropertyValue(String symbolicName, String propertyKey,
            boolean isApplicationProperty) {
        PluginProperty property = getProperty(symbolicName, propertyKey, isApplicationProperty);
        if (property != null) {
            return property.getPropertyValue();
        }
        return null;
    }

    /**
     * @return 7200.
     */
    @Override
    public int getTimeToLive() {
        return 7200;
    }

    @Override
    public Serializable load(PluginPropertyCacheKey<? extends Serializable> key) {
        if (key.isLoadAllProperties()) {
            return new HashMap<String, String>(pluginPropertyDao.getAllProperties(
                    key.getSymbolicName(), key.isApplicationProperty()));
        }
        if (key.getType() == null) {
            return getPropertyValue(key.getSymbolicName(), key.getPropertyKey(),
                    key.isApplicationProperty());
        }
        try {
            return getPropertyAsObject(key.getSymbolicName(), key.getPropertyKey(),
                    key.isApplicationProperty(), key.getType());
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            }
            throw new RuntimeException(e);
        }
    }

}


text:
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;
using Cimbalino.Toolkit.Services;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using Kliva.Messages;
using Kliva.Models;
using Kliva.Services.Interfaces;
using Kliva.Views;
using Microsoft.Practices.ServiceLocation;

namespace Kliva.ViewModels
{
    public class ActivityDetailViewModel : KlivaBaseViewModel
    {
        private readonly IStravaService _stravaService;

        private Activity _selectedActivity;
        public Activity SelectedActivity
        {
            get { return _selectedActivity; }
            set
            {
                Set(() => SelectedActivity, ref _selectedActivity, value);
                RaisePropertyChanged(() => KudosCount);
                RaisePropertyChanged(() => CommentCount);
                RaisePropertyChanged(() => PhotoCount);
            }
        }

        private ObservableCollection<AthleteSummary> _kudos = new ObservableCollection<AthleteSummary>();
        public ObservableCollection<AthleteSummary> Kudos
        {
            get { return _kudos; }
            set { Set(() => Kudos, ref _kudos, value); }
        }

        private ObservableCollection<Comment> _comments = new ObservableCollection<Comment>();
        public ObservableCollection<Comment> Comments
        {
            get { return _comments; }
            set { Set(() => Comments, ref _comments, value); }
        }

        private ObservableCollection<AthleteSummary> _relatedAthletes = new ObservableCollection<AthleteSummary>();
        public ObservableCollection<AthleteSummary> RelatedAthletes
        {
            get { return _relatedAthletes; }
            set { Set(() => RelatedAthletes, ref _relatedAthletes, value); }
        }

        private bool _hasSegments;
        public bool HasSegments
        {
            get { return _hasSegments; }
            set { Set(() => HasSegments, ref _hasSegments, value); }
        }

        private bool _hasPhotos;
        public bool HasPhotos
        {
            get { return _hasPhotos; }
            set { Set(() => HasPhotos, ref _hasPhotos, value); }
        }

        public int KudosCount => SelectedActivity?.KudosCount ?? 0;
        public int CommentCount => SelectedActivity?.CommentCount ?? 0;
        public int PhotoCount => SelectedActivity?.TotalPhotoCount ?? 0;

        private RelayCommand _kudosCommand;
        public RelayCommand KudosCommand => _kudosCommand ?? (_kudosCommand = new RelayCommand(async () => await OnKudos()));

        private RelayCommand _mapCommand;
        public RelayCommand MapCommand => _mapCommand ?? (_mapCommand = new RelayCommand(() => NavigationService.Navigate<MapPage>(SelectedActivity?.Map)));

        private RelayCommand<ItemClickEventArgs> _athleteTappedCommand;
        public RelayCommand<ItemClickEventArgs> AthleteTappedCommand => _athleteTappedCommand ?? (_athleteTappedCommand = new RelayCommand<ItemClickEventArgs>(OnAthleteTapped));

        public ActivityDetailViewModel(INavigationService navigationService, IStravaService stravaService) : base(navigationService)
        {
            _stravaService = stravaService;
            MessengerInstance.Register<ActivitySummaryMessage>(this, async item => await LoadActivityDetails(item.ActivitySummary.Id.ToString()));
        }

        private async Task LoadActivityDetails(string activityId)
        {
            Kudos.Clear();
            Comments.Clear();
            RelatedAthletes.Clear();

            var activity = await _stravaService.GetActivityAsync(activityId, true);
            var athlete = await _stravaService.GetAthleteAsync();

            if (activity != null)
            {
                SelectedActivity = activity;

                if (activity.KudosCount > 0 && activity.Kudos != null && activity.Kudos.Any())
                {
                    foreach (AthleteSummary kudo in activity.Kudos)
                        Kudos.Add(kudo);
                }

                if (activity.CommentCount > 0 && activity.Comments != null && activity.Comments.Any())
                {
                    foreach(Comment comment in activity.Comments)
                        Comments.Add(comment);
                }

                if (activity.OtherAthleteCount > 0 && activity.RelatedActivities != null && activity.RelatedActivities.Any())
                {
                    foreach (ActivitySummary relatedActivity in activity.RelatedActivities)
                        RelatedAthletes.Add(relatedActivity.Athlete);
                }

                //Currently the Public API of Strava will not give us Segments info for 'other' athletes then the one logged in
                HasSegments = SelectedActivity.SegmentEfforts != null;

                //Currently the Public API of Strava will not give us the Photo links for 'other' athletes then the one logged in
                //But we do get the photo count, so we also need to verify the current user vs the one from the activity
                HasPhotos = athlete.Id == SelectedActivity.Athlete.Id && SelectedActivity.TotalPhotoCount > 0;

                //TODO: Glenn - Why oh why are we not yet able to show/hide PivotItems through Visibility bindable
                ServiceLocator.Current.GetInstance<IMessenger>().Send<PivotMessage>(new PivotMessage(Pivots.Segments, HasSegments));
                ServiceLocator.Current.GetInstance<IMessenger>().Send<PivotMessage>(new PivotMessage(Pivots.Photos, HasPhotos));
            }
        }

        private async Task OnKudos()
        {
            await _stravaService.GiveKudosAsync(SelectedActivity.Id.ToString());
            await LoadActivityDetails(SelectedActivity.Id.ToString());
            ServiceLocator.Current.GetInstance<IMessenger>().Send<PivotMessage>(new PivotMessage(Pivots.Kudos, true, true));
        }
    }
}


text:
#include "null.hpp"

#include "../../debug.hpp"

#include <new>

using util::alloc::raw::null;

///////////////////////////////////////////////////////////////////////////////
void*
null::allocate (size_t bytes)
{
    return allocate (bytes, alignof (std::max_align_t));
}

//-----------------------------------------------------------------------------
void*
null::allocate (size_t bytes, size_t align)
{
    (void)bytes;
    (void)align;

    throw std::bad_alloc ();
}

//-----------------------------------------------------------------------------
void
null::deallocate (void *ptr, size_t bytes)
{
    return deallocate (ptr, bytes, alignof (std::max_align_t));
}

//-----------------------------------------------------------------------------
// calling deallocate with a non-null pointer is undefined, but we may as well
// let the application continuing running if we're not in a debug context.
void
null::deallocate (void *ptr, size_t bytes, size_t align)
{
    (void)ptr;
    (void)bytes;
    (void)align;

    // cast to void* to assist some of the printing machinary in the assertion
    CHECK_EQ (ptr, (void*)nullptr);
}

///////////////////////////////////////////////////////////////////////////////
void*
null::begin (void)
{
    return nullptr;
}

//-----------------------------------------------------------------------------
const void*
null::begin (void) const
{
    return nullptr;
}

//-----------------------------------------------------------------------------
size_t
null::offset (const void *ptr) const
{
    return reinterpret_cast<uintptr_t> (ptr);
}

///////////////////////////////////////////////////////////////////////////////
void
null::reset (void)
{
    ;
}

///////////////////////////////////////////////////////////////////////////////
size_t
null::capacity (void) const
{
    return 0;
}

//-----------------------------------------------------------------------------
size_t
null::used (void) const
{
    return 0;
}

//-----------------------------------------------------------------------------
size_t
null::remain (void) const
{
    return 0;
}


text:
import app from "../../app";

import React from "react";

const LoadNewsButton = ({ showNews, isChecked, toggleChange }) => {
  return (

        When you click this button, you are requesting content and sharing your IP address with blog.couchdb.org which is edited by the Apache CouchDB PMC and maintained by wordpress.com.

        If you don't want to share your IP address, do not click the button.

      <button className="btn btn-primary" onClick={showNews}>Load News</button>

        <input type="checkbox"
          checked={isChecked}
          onChange={toggleChange}
        />
        Remember my choice

  );
};

class NewsPage extends React.Component {
  constructor (props) {
    super(props);
    this.showNews = this.showNews.bind(this);
    this.toggleChange = this.toggleChange.bind(this);

    const allowsIpSharing = !!app.utils.localStorageGet('allow-IP-sharing');

    this.state = {
      showNews: allowsIpSharing ? true : false,
      allowsIpSharing
    };
  }

  showNews() {
    this.setState({ showNews: true });
  }

  toggleChange() {
    const allowsIpSharing = this.state.allowsIpSharing;
    this.setState({ allowsIpSharing: !allowsIpSharing });
    app.utils.localStorageSet('allow-IP-sharing', !allowsIpSharing);
  }

  render() {
    let newsContent = <LoadNewsButton
      showNews={this.showNews}
      toggleChange={this.toggleChange}
      isChecked={this.state.allowsIpSharing}></LoadNewsButton>;

    if (this.state.showNews) {
      newsContent = ;
    }

    return (

        {newsContent}

    );
  }
}

export default {
  NewsPage: NewsPage
};


text:
// Copyright 2011-2016 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.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel;

import com.google.security.zynamics.binnavi.CUtilityFunctions;
import com.google.security.zynamics.zylib.general.ListenerProvider;

import java.awt.BorderLayout;

import javax.swing.JComponent;
import javax.swing.JPanel;

/**
 * Abstract panel class for extending the bottom panel of graph windows.
 */
public abstract class CAbstractResultsPanel extends JPanel implements IResultsPanel {
  /**
   * Used for serialization.
   */
  private static final long serialVersionUID = -5563833680963943992L;

  /**
   * Listeners that are notified about changes in the results panel.
   */
  private final ListenerProvider<IResultsPanelListener> m_listeners =
      new ListenerProvider<>();

  /**
   * Creates a new panel object.
   *
   * @param borderLayout Layout of the panel.
   */
  public CAbstractResultsPanel(final BorderLayout borderLayout) {
    super(borderLayout);
  }

  /**
   * Asks the results panel to show a specific panel.
   *
   * @param panel The component of the panel to show.
   */
  protected void notifyShow(final JComponent panel) {
    for (final IResultsPanelListener listener : m_listeners) {
      try {
        listener.show(panel);
      } catch (final Exception exception) {
        CUtilityFunctions.logException(exception);
      }
    }
  }

  @Override
  public void addListener(final IResultsPanelListener listener) {
    m_listeners.addListener(listener);
  }

  @Override
  public final JComponent getComponent() {
    return this;
  }

  @Override
  public void removeListener(final IResultsPanelListener listener) {
    m_listeners.removeListener(listener);
  }
}


text:
#include "tensorflow/compiler/xla/service/gpu/reduction_layout_normalizer.h"

#include <algorithm>

#include "absl/algorithm/container.h"
#include "absl/strings/str_join.h"
#include "tensorflow/compiler/xla/service/dfs_hlo_visitor_with_default.h"
#include "tensorflow/compiler/xla/service/gpu/ir_emission_utils.h"
#include "tensorflow/compiler/xla/service/hlo_casting_utils.h"
#include "tensorflow/compiler/xla/service/hlo_instructions.h"
#include "tensorflow/compiler/xla/service/hlo_opcode.h"
#include "tensorflow/compiler/xla/service/pattern_matcher.h"
#include "tensorflow/compiler/xla/shape_util.h"
#include "tensorflow/compiler/xla/status_macros.h"
#include "tensorflow/compiler/xla/statusor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/stream_executor/lib/statusor.h"

namespace xla {
namespace gpu {

class EnforceMinorToMajorReduceOpVisitor : public DfsHloRewriteVisitor {
  Status HandleReduce(HloInstruction *reduce) override {
    VLOG(5) << "Input: " << reduce->ToString();
    HloInstruction *operand = reduce->mutable_operand(0);
    const Shape &operand_shape = operand->shape();
    const Layout &operand_layout = operand_shape.layout();
    const Shape &reduce_shape = reduce->shape();

    if (!reduce_shape.IsArray()) {
      // TODO(cheshire): Handle variadic reduction.
      return Status::OK();
    }

    std::vector<int64> new_reduce_dimensions;
    std::vector<int64> new_operand_shape_data;
    std::vector<int64> new_reduce_shape_data;

    // The layout order of the reduction output can be different to the
    // ordering of kept dimensions in the input operand, thus we need to
    // calculate the new layout.
    std::vector<int64> new_reduce_shape_layout(reduce_shape.rank());
    std::vector<int64> reduce_shape_logical_to_physical =
        LayoutUtil::MakeLogicalToPhysical(reduce_shape.layout());

    auto to_reduce_logical_dim = [&](int64 op_logical_dim) {
      return op_logical_dim -
             absl::c_count_if(reduce->dimensions(), [&](int64 dim) {
               CHECK(dim != op_logical_dim);
               return dim < op_logical_dim;
             });
    };

    for (int i = 0; i < operand_shape.rank(); i++) {
      // Process the dimensions in the major-to-minor order in order to enforce
      // the default layout.
      int64 major_to_minor_dim_idx = operand_shape.rank() - i - 1;
      int64 logical_dim = operand_layout.minor_to_major(major_to_minor_dim_idx);
      int64 dim_size = operand_shape.dimensions(logical_dim);
      VLOG(5) << "Processing logical dimension " << logical_dim << " of size "
              << dim_size;
      new_operand_shape_data.push_back(dim_size);

      if (absl::c_linear_search(reduce->dimensions(), logical_dim)) {
        new_reduce_dimensions.push_back(i);
      } else {
        new_reduce_shape_data.push_back(dim_size);
        int64 logical_reduce_dim = to_reduce_logical_dim(logical_dim);
        int64 physical_reduce_dim =
            reduce_shape_logical_to_physical[logical_reduce_dim];
        VLOG(5) << "logical_reduce_dim = " << logical_reduce_dim << ", "
                << "physical_reduce_dim = " << physical_reduce_dim;
        new_reduce_shape_layout[reduce_shape.rank() - physical_reduce_dim - 1] =
            new_reduce_shape_data.size() - 1;
      }
    }

    Shape new_operand_shape = ShapeUtil::MakeShape(operand_shape.element_type(),
                                                   new_operand_shape_data);
    if (new_operand_shape == operand_shape) {
      return Status::OK();
    }

    Shape new_reduce_shape = ShapeUtil::MakeShapeWithLayout(
        reduce_shape.element_type(), new_reduce_shape_data,
        new_reduce_shape_layout);
    HloInstruction *canonical_reduce_input = reduce->parent()->AddInstruction(
        HloInstruction::CreateBitcast(new_operand_shape, operand));
    canonical_reduce_input->set_metadata(reduce->metadata());

    VLOG(5) << "Reduction input: " << canonical_reduce_input->ToString();
    std::unique_ptr<HloInstruction> new_reduce = HloInstruction::CreateReduce(
        new_reduce_shape, canonical_reduce_input, reduce->mutable_operand(1),
        new_reduce_dimensions, reduce->to_apply());
    VLOG(5) << "Generated new reduction: " << new_reduce->ToString();

    if (new_reduce_shape != reduce_shape) {
      HloInstruction *wrapped_reduce =
          reduce->parent()->AddInstruction(std::move(new_reduce));
      new_reduce = HloInstruction::CreateBitcast(reduce_shape, wrapped_reduce);
    }

    VLOG(5) << "Generated output: " << new_reduce->ToString();
    return ReplaceWithNewInstruction(reduce, std::move(new_reduce));
  }
};

StatusOr<bool> ReductionLayoutNormalizer::Run(HloModule *module) {
  TF_ASSIGN_OR_RETURN(bool changed,
                      EnforceMinorToMajorReduceOpVisitor().RunOnModule(module));
  return changed;
}

}  // namespace gpu
}  // namespace xla


text:
use std::error::{FromError, Error};
use std::fmt;
use std::io::IoError;
use std::io::process::{ProcessOutput, ProcessExit, ExitStatus, ExitSignal};
use std::str;

use semver;
use rustc_serialize::json;

use curl;
use toml::Error as TomlError;
use url;
use git2;

pub type CargoResult<T> = Result<T, Box<CargoError>>;

// =============================================================================
// CargoError trait

pub trait CargoError: Error {
    fn is_human(&self) -> bool { false }
}

impl fmt::String for Box<CargoError> {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        try!(write!(f, "{}", self.description()));
        Ok(())
    }
}
impl fmt::Show for Box<CargoError> {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        fmt::String::fmt(self, f)
    }
}

impl Error for Box<CargoError> {
    fn description(&self) -> &str { (**self).description() }
    fn detail(&self) -> Option<String> { (**self).detail() }
    fn cause(&self) -> Option<&Error> { (**self).cause() }
}

impl CargoError for Box<CargoError> {
    fn is_human(&self) -> bool { (**self).is_human() }
}

// =============================================================================
// Chaining errors

pub trait ChainError<T> {
    fn chain_error<E, F>(self, callback: F) -> CargoResult<T>
                         where E: CargoError, F: FnOnce() -> E;
}

struct ChainedError<E> {
    error: E,
    cause: Box<Error>,
}

impl<'a, T, F> ChainError<T> for F where F: FnOnce() -> CargoResult<T> {
    fn chain_error<E, C>(self, callback: C) -> CargoResult<T>
                         where E: CargoError, C: FnOnce() -> E {
        self().chain_error(callback)
    }
}

impl<T, E: Error> ChainError<T> for Result<T, E> {
    fn chain_error<E2, C>(self, callback: C) -> CargoResult<T>
                         where E2: CargoError, C: FnOnce() -> E2 {
        self.map_err(move |err| {
            Box::new(ChainedError {
                error: callback(),
                cause: Box::new(err),
            }) as Box<CargoError>
        })
    }
}

impl<T> ChainError<T> for Option<T> {
    fn chain_error<E, C>(self, callback: C) -> CargoResult<T>
                         where E: CargoError, C: FnOnce() -> E {
        match self {
            Some(t) => Ok(t),
            None => Err(Box::new(callback()) as Box<CargoError>),
        }
    }
}

impl<E: Error> Error for ChainedError<E> {
    fn description(&self) -> &str { self.error.description() }
    fn detail(&self) -> Option<String> { self.error.detail() }
    fn cause(&self) -> Option<&Error> { Some(&*self.cause) }
}

impl<E: CargoError> CargoError for ChainedError<E> {
    fn is_human(&self) -> bool { self.error.is_human() }
}

// =============================================================================
// Process errors

pub struct ProcessError {
    pub desc: String,
    pub exit: Option<ProcessExit>,
    pub output: Option<ProcessOutput>,
    cause: Option<IoError>,
}

impl Error for ProcessError {
    fn description(&self) -> &str { self.desc.as_slice() }
    fn detail(&self) -> Option<String> { None }
    fn cause(&self) -> Option<&Error> {
        self.cause.as_ref().map(|s| s as &Error)
    }
}

impl fmt::String for ProcessError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        fmt::String::fmt(&self.desc, f)
    }
}
impl fmt::Show for ProcessError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        fmt::String::fmt(self, f)
    }
}

// =============================================================================
// Concrete errors

struct ConcreteCargoError {
    description: String,
    detail: Option<String>,
    cause: Option<Box<Error>>,
    is_human: bool,
}

impl fmt::String for ConcreteCargoError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description)
    }
}
impl fmt::Show for ConcreteCargoError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        fmt::String::fmt(self, f)
    }
}

impl Error for ConcreteCargoError {
    fn description(&self) -> &str { self.description.as_slice() }
    fn detail(&self) -> Option<String> { self.detail.clone() }
    fn cause(&self) -> Option<&Error> {
        self.cause.as_ref().map(|c| &**c)
    }
}

impl CargoError for ConcreteCargoError {
    fn is_human(&self) -> bool {
        self.is_human
    }
}

// =============================================================================
// Human errors

pub struct Human<E>(pub E);

impl<E: Error> Error for Human<E> {
    fn description(&self) -> &str { self.0.description() }
    fn detail(&self) -> Option<String> { self.0.detail() }
    fn cause(&self) -> Option<&Error> { self.0.cause() }
}

impl<E: Error> CargoError for Human<E> {
    fn is_human(&self) -> bool { true }
}

// =============================================================================
// CLI errors

pub type CliResult<T> = Result<T, CliError>;

#[derive(Show)]
pub struct CliError {
    pub error: Box<CargoError>,
    pub unknown: bool,
    pub exit_code: u32
}

impl Error for CliError {
    fn description(&self) -> &str { self.error.description() }
    fn detail(&self) -> Option<String> { self.error.detail() }
    fn cause(&self) -> Option<&Error> { self.error.cause() }
}

impl CliError {
    pub fn new<S: Str>(error: S, code: u32) -> CliError {
        let error = human(error.as_slice().to_string());
        CliError::from_boxed(error, code)
    }

    pub fn from_error<E: CargoError + 'static>(error: E, code: u32) -> CliError {
        let error = Box::new(error) as Box<CargoError>;
        CliError::from_boxed(error, code)
    }

    pub fn from_boxed(error: Box<CargoError>, code: u32) -> CliError {
        let human = error.is_human();
        CliError { error: error, exit_code: code, unknown: !human }
    }
}

// =============================================================================
// various impls

macro_rules! from_error {
    ($($p:ty,)*) => (
        $(impl FromError<$p> for Box<CargoError> {
            fn from_error(t: $p) -> Box<CargoError> { Box::new(t) }
        })*
    )
}

from_error! {
    semver::ReqParseError,
    IoError,
    ProcessError,
    git2::Error,
    json::DecoderError,
    curl::ErrCode,
    CliError,
    TomlError,
    url::ParseError,
}

impl<E: Error> FromError<Human<E>> for Box<CargoError> {
    fn from_error(t: Human<E>) -> Box<CargoError> { Box::new(t) }
}

impl CargoError for semver::ReqParseError {}
impl CargoError for IoError {}
impl CargoError for git2::Error {}
impl CargoError for json::DecoderError {}
impl CargoError for curl::ErrCode {}
impl CargoError for ProcessError {}
impl CargoError for CliError {}
impl CargoError for TomlError {}
impl CargoError for url::ParseError {}

// =============================================================================
// Construction helpers

pub fn process_error<S: Str>(msg: S,
                             cause: Option<IoError>,
                             status: Option<&ProcessExit>,
                             output: Option<&ProcessOutput>) -> ProcessError {
    let exit = match status {
        Some(&ExitStatus(i)) | Some(&ExitSignal(i)) => i.to_string(),
        None => "never executed".to_string(),
    };
    let mut desc = format!("{} (status={})", msg.as_slice(), exit);

    if let Some(out) = output {
        match str::from_utf8(out.output.as_slice()) {
            Ok(s) if s.trim().len() > 0 => {
                desc.push_str("\n--- stdout\n");
                desc.push_str(s);
            }
            Ok(..) | Err(..) => {}
        }
        match str::from_utf8(out.error.as_slice()) {
            Ok(s) if s.trim().len() > 0 => {
                desc.push_str("\n--- stderr\n");
                desc.push_str(s);
            }
            Ok(..) | Err(..) => {}
        }
    }

    ProcessError {
        desc: desc,
        exit: status.map(|a| a.clone()),
        output: output.map(|a| a.clone()),
        cause: cause,
    }
}

pub fn internal_error<S1: Str, S2: Str>(error: S1,
                                        detail: S2) -> Box<CargoError> {
    Box::new(ConcreteCargoError {
        description: error.as_slice().to_string(),
        detail: Some(detail.as_slice().to_string()),
        cause: None,
        is_human: false
    })
}

pub fn internal<S: fmt::String>(error: S) -> Box<CargoError> {
    Box::new(ConcreteCargoError {
        description: error.to_string(),
        detail: None,
        cause: None,
        is_human: false
    })
}

pub fn human<S: fmt::String>(error: S) -> Box<CargoError> {
    Box::new(ConcreteCargoError {
        description: error.to_string(),
        detail: None,
        cause: None,
        is_human: true
    })
}

pub fn caused_human<S: fmt::String, E: Error>(error: S, cause: E) -> Box<CargoError> {
    Box::new(ConcreteCargoError {
        description: error.to_string(),
        detail: None,
        cause: Some(Box::new(cause) as Box<Error>),
        is_human: true
    })
}


text:
class CreateDrugTypes < ActiveRecord::Migration[4.2]
  def change
    create_table :drug_types do |t|
      t.string :name, null: false
      t.string :code, null: false, unique: :index
      t.timestamps null: false
    end
  end
end


text:
Fork of neovim lua-client
==========

This is a Lua client for Neovim fork.


text:
using System;
using System.Linq;
using Microsoft.Crm.Services.Utility;
using Microsoft.Xrm.Sdk.Metadata;
using CrmSvcUtilExtensions.Config;
using System.Collections;
using System.Collections.Generic;
using CrmSvcUtilExtensions.Helpers;

namespace CrmSvcUtilExtensions
{
    /// <summary>
    /// Sample extension for the CrmSvcUtil.exe tool that generates early-bound
    /// classes for custom entities.
    /// </summary>
    public sealed class BasicFilteringService : ICodeWriterFilterService
    {
        CrmSvcUtilFiltersConfig _filterConfig;

        public BasicFilteringService(ICodeWriterFilterService defaultService)
        {
            this.DefaultService = defaultService;
            _filterConfig = (new FilterDataHelper()).LoadFilterData();
        }

        private ICodeWriterFilterService DefaultService { get; set; }

        bool ICodeWriterFilterService.GenerateAttribute(AttributeMetadata attributeMetadata, IServiceProvider services)
        {
            return this.DefaultService.GenerateAttribute(attributeMetadata, services);
        }

        bool ICodeWriterFilterService.GenerateEntity(EntityMetadata entityMetadata, IServiceProvider services)
        {
            if (!_filterConfig.Entities.Entity.Any(entity => string.Equals(entity, entityMetadata.LogicalName, StringComparison.InvariantCultureIgnoreCase)))
                return false;

            return this.DefaultService.GenerateEntity(entityMetadata, services);
        }

        bool ICodeWriterFilterService.GenerateOption(OptionMetadata optionMetadata, IServiceProvider services)
        {
            return this.DefaultService.GenerateOption(optionMetadata, services);
        }

        bool ICodeWriterFilterService.GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceProvider services)
        {
            return this.DefaultService.GenerateOptionSet(optionSetMetadata, services);
        }

        bool ICodeWriterFilterService.GenerateRelationship(RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata,
        IServiceProvider services)
        {
            return this.DefaultService.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services);
        }

        bool ICodeWriterFilterService.GenerateServiceContext(IServiceProvider services)
        {
            return this.DefaultService.GenerateServiceContext(services);
        }
    }
}


text:
module Virginia
  class Plugin < Adhearsion::Plugin

    init :virginia do
      logger.warn "Virginia has been loaded"
      Service.start
    end

    config :virginia do
      host "0.0.0.0", :desc => "IP to bind the listener to"
      port "8080", :desc => "The port to bind the listener to"
      handler Virginia::LoggingHandler, :desc => "The object that will be handling the requests.  Must be a Reel:App."
    end
  end
end


text:
"use strict";

var aFrom = require("es5-ext/array/from");

module.exports = function (t, a) {
	var el1, child1, child2;
	if (typeof document === "undefined") return;

	el1 = document.createElement("p");
	el1.setAttribute("foo", "bar");
	el1.setAttribute("id", "sdfs");
	el1.appendChild(child1 = document.createElement("span"));
	el1.appendChild(child2 = document.createElement("span"));

	a(el1.attributes.length, 2);
	a(t.call(el1), el1);
	a(el1.attributes.length, 0);
	a.deep(aFrom(el1.childNodes), [child1, child2], "Clear");
};


text:
module ArLists

	module ClassMethods

		module HasList

			# attr_name		: the attribute
			# uniq				: wether to act like a group (if true) or like an array (if false)
			# strict			: wether to throw an error when a Record cannot be found
			# polymorphic	: wether to type the elements (if true) or not (if false)
			# class_name	: the type to use when polymorphic is false
			def has_list(attr_name, options = {})

				do_uniq = false || options[:uniq]
				strict = false || options[:strict]
				is_typed = false || options[:polymorphic]

        unless is_typed
					class_name = options[:class_name].blank? ? attr_name.to_s.singularize.classify : options[:class_name]
					attr_accessible attr_name, "#{attr_name}_ids"
					define_method "#{attr_name}_ids=" do |values|
						val = [values].flatten.map{|v| v.to_s.split(',')}.flatten.reject{|v| v.blank?}
						val.uniq! if do_uniq
						write_attribute attr_name, val.join(',')
					end
					define_method "#{attr_name}_ids" do
						val = read_attribute attr_name
						val.blank? ? [] : val.split(',').map{|s| s.to_i}
					end
				end
        define_method "#{attr_name}_count" do
    			val = read_attribute attr_name
					val.blank? ? 0 : val.split(',').count
        end

				define_method "#{attr_name}=" do |records|
					val = records.map{|r|
						if is_typed
							"#{r.class}:#{r.id}"
						else
							"#{r.id}"
						end
					}
					val.uniq! if do_uniq
					write_attribute attr_name, val.join(',')
				end
				define_method "#{attr_name}" do
					val = read_attribute attr_name
					val.blank? ? [] : val.split(',').map{|r_code|
						begin
							if is_typed
								code = r_code.split(':')
								code[0].classify.constantize.find(code[1].to_i)
							else
								class_name.constantize.find(r_code)
							end
						rescue ActiveRecord::RecordNotFound
							throw "Unable to build list: RecordNotFound" if strict
							[]
						end
					}.flatten
				end
				if is_typed
					scope "with_#{attr_name}_containing", lambda {|record_or_records|
						records = record_or_records.is_a?(Array) ? record_or_records : [record_or_records]
						where(
							records.map{|r|
								"(#{attr_name} = '#{r.class}:#{r.id}') OR (#{attr_name} LIKE '#{r.class}:#{r.id},%') OR (#{attr_name} LIKE '%,#{r.class}:#{r.id},%') OR (#{attr_name} LIKE '%,#{r.class}:#{r.id}')"
							}.join(" OR ")
						)
					}
				else
					scope "with_#{attr_name}_containing", lambda {|record_or_records|
						records = record_or_records.is_a?(Array) ? record_or_records : [record_or_records]
						where(
							records.map{|r|
								"(#{attr_name} = '#{r.id}') OR (#{attr_name} LIKE '#{r.id},%') OR (#{attr_name} LIKE '%,#{r.id},%') OR (#{attr_name} LIKE '%,#{r.id}')"
							}.join(" OR ")
						)
					}
				end
			end

		end

	end

end


text:
import React from 'react';
import { Link } from 'react-router';

const PageNotFound = () => {
  return (

          {' '}
          Error 404 Page not Found

          Maybe you used bad link. You can back to <Link to="/">Homepage</Link>

  );
};

export default PageNotFound;


text:
function anAlert(msge) {
    alert("But can I change it? again?  This is a message: " + msge);

}

var Person = function(lastname,firstname,age) {
    anObj : "99" ;
    var lastname = lastname;
    var firstname =firstname;
    var age=age;
    var that = this ;

    this.Hello = function(){
        console.log('Hello, ' + firstname + ' ' + lastname );
        that.age = 21;
        console.log('Hello, are you sure you are only ' + that.age + '?' );
    };
};

var ObjPerson = {
    anObject : 23,
    aName : 'Ruddolph',

    myFunct : function(ao, an) {
        this.anObject = ao;
        this.aName = an ;
    }

};

window.onload = (function(){ alert('loaded'); document.getElementById('buttonx').onclick= function(){ alert('done it');}}) ;


text:
'use strict'

const { get } = require('rek')
const _ = require('lodash')
const isURL = require('validator/lib/isURL')
const oki = require('oki')
const Promise = require('bluebird')

const resolver = require('deep-equal-resolver')({
  moduleName: 'midwest-membership/strategies/social',
  validate: oki({
    'provider.mapToken': _.isFunction,
    'provider.mapProfile': _.isFunction,
    'provider.name': _.isString,
    'provider.urls.profile': isURL,
    'provider.urls.token': isURL,
    'findUserByToken': _.isFunction,
  }),
})

module.exports = _.memoize((state) => {
  return (req, res, next) => {
    const { code } = req.query

    get(`${state.provider.urls.token}${code}`).then((json) => Promise.all([
      json,
      state.findUserByToken({ token: json.access_token, provider: state.provider.name }),
    ])).then(([ token, user ]) => {
      if (user) {
        return user
      }

      return Promise.all([
        token,
        get(`${state.provider.urls.profile}&access_token=${token.access_token}`),
      ]).then(([ token, profile ]) => {
        // TODO validate profile
        if (!profile) {
          throw new Error('No profile found! Unable to begin social registration')
        }

        req.flash('social', {
          provider: state.provider.name,
          token: state.provider.mapToken(token),
          createdAt: new Date(),
          profile: state.provider.mapProfile(profile),
        })

        res.redirect('/register')
      })
    }).catch(next)
  }
}, resolver)


text:
namespace MvcApplication8.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class narudzbina2 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Narudzbinas",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        KorisnikId = c.String(maxLength: 128),
                        Naziv = c.String(),
                        Cena = c.Double(nullable: false),
                        Kolicina = c.Int(nullable: false),
                        Velicina = c.String(),
                        SlikaSrc = c.String(),
                        Datum = c.DateTime(nullable: false),
                        DatumIso = c.String(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Korisniks", t => t.KorisnikId)
                .Index(t => t.KorisnikId);

        }

        public override void Down()
        {
            DropIndex("dbo.Narudzbinas", new[] { "KorisnikId" });
            DropForeignKey("dbo.Narudzbinas", "KorisnikId", "dbo.Korisniks");
            DropTable("dbo.Narudzbinas");
        }
    }
}


text:
package com.bt.pi.api.service.testing;

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

import com.bt.pi.api.service.KeyPairsService;
import com.bt.pi.app.common.entities.KeyPair;

public class KeyPairsServiceIntegrationImpl implements KeyPairsService {

	public KeyPair createKeyPair(String ownerId, String keyName) {
		return new KeyPair(keyName, keyName + " fingerprint", keyName + " some key material");
	}

	public boolean deleteKeyPair(String ownerId, String keyName) {
		return true;
	}

	public List<KeyPair> describeKeyPairs(String string, List<String> keyNames) {
		List<KeyPair> keyPairs = new ArrayList<KeyPair>();
		for (String keyName : keyNames) {
			keyPairs.add(new KeyPair(keyName, keyName + " fingerprint", ""));
		}
		return keyPairs;
	}

}


text:
namespace mx
{
    namespace api
    {
        /// @brief TODO
        ///
        /// @detailed TODO
        ///
        class Version
        {
        public:
            static int getVersionMajor();
            static int getVersionMinor();
            static int getVersionPatch();
            static const std::string& getString();

        private:
            int myMajor;
            int myMinor;
            int myPatch;
            int myBuild;
            std::string myString;

        private:
            Version();
            static const Version& getInstance();
        };
    }
}


text:
<!doctype html>

    <meta charset="utf-8">

    <title>Simplify your life with Panels - MidCamp 2015</title>

    <meta name="description" content="A introductory presentation on Drupal's Panels suite of modules.">
    <meta name="author" content="Chris Hill">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

    <link rel="stylesheet" href="css/reveal.css">
    <link rel="stylesheet" href="css/theme/midcamp-color.css" id="theme">

    <link rel="stylesheet" href="lib/css/zenburn.css">

#MidCamp

Simplify your life with Panels  /

Chris Hill

Simplify your life with Panels

http://2015.midcamp.org/session-proposal/simplify-your-life-panels

MidCamp 2015

#MidCamp

Chris Hill

krisahil (drupal.org)

Bonnier Corporation

http://sandcastle.bonniercorp.com/

A platform for high-functioning media websites.

Not the Drupal-famous "Chris Hill" of Weather.com fame.

            Former colleagues worked closely with him and say he is an incredible technical talent and leader.

Good ways to build,

 and bad. :-(

Best practices is about learning from those who have succeeded.

Goals

Discuss block-placement strategies.

Convince you to do my our way.

Stay away from the weeds.

Who here is perfect?

We've all "architected" solutions we're not proud of.

Printed HTML in page TPL?

Programmatically rendered a block in a node's body?

Added inline CSS to node's body to achieve weird layout (like that's gonna be responsive)?

Added CSS or JS outside of drupal_add_css/js()?

Added SQL queries in template files instead of by preprocessing?

Doing site audits have showed me we're ALL to blame.

A better way

Plan your next site!

Research and decide modules before starting build. No fun, I know. :-)

Page layout

Header

Content

Sidebar

Footer

Big question: How to place blocks into those regions?

Core blocks administration

Deceptively simple

Each block can be placed into only one region.

Context module

Provides intricate control

It's not Panels. :-)

What is Panels?

Comprehensive suite to manage blocks across all regions.

Simplify your life with one toolset.

Drag-and-drop interface to place blocks.

Layouts: Avoid CSS for basic layouts!

Contexts: Blocks are always aware of what's available.

Panels tools

Why so many?! Their titles can be confusing.

Page manager

Mini panels

Panelizer

Panel nodes

Panels everywhere

We'll discuss in order logical to site-builder, not programmer.

Prereq 1: Layouts

Each section is a "region".

The "blocks" can be regular blocks, Views, menus, etc.

Layouts provided

Plugin method: Declares the regions, template, and CSS.

Can be stored in theme or modules.

Prereq 2: Contexts

What type of data is available on this page?

Only appropriate blocks are available for use.

Page manager

Replacement (mostly) for hook_menu() for custom pages.

Arguments in URL become contexts (e.g. node ID becomes full node).

Page manager: Variants

Selection rules determine which variant gets used.

Don't get too crazy with the rules.

Mini panels

Group blocks together as Panels layouts.

Can be used as blocks throughout site.

Panelizer

More checkboxes than you can shake a stick at!

Read tutorials before starting!

Remember, with great power comes... great complexity.

Panelizer: Why so great?

Allows editors to choose a Panels template per node.

Customize the Panel for one specific node. Powerful, and dangerous!

And both of these for each view mode for each node!

Panelizer: So many choices!

Panels is greedy.

What is Panels Everywhere?

Frees you from core's blocks and regions.

Control the header, sidebars, and footer in Panels interface.

Variants allow easy switching of page layout and blocks.

How to use?

Use a supported theme.

Try to use from start of project.

Next steps

Great modules to extend Panels:

Fieldable panel panes

Classy Panel Styles

Closing

Is Panels ecosystem perfect?

Mature project, with lots of supporting themes and modules.

Will tomorrow's you be happy?

Thank you!

Questions?

Resources

High-quality teaching by Johan Falk: http://nodeone.se/en/learn-page-manager

Drupalize.me training: https://drupalize.me/videos/introduction-building-websites-using-panels-module


text:
TODO: Write short description here and build.gradle file.

## Overview

* **Plugin type**: parser
* **Guess supported**: no

## Configuration

- **property1**: description (string, required)
- **property2**: description (integer, default: default-value)

## Example

```yaml
in:
  type: any file input plugin type
  parser:
    type: java_parser_sample
    property1: example1
    property2: example2
```

(If guess supported) you don't have to write `parser:` section in the configuration file. After writing `in:` section, you can let embulk guess `parser:` section using this command:

```
$ embulk install embulk-parser-java_parser_sample
$ embulk guess -g java_parser_sample config.yml -o guessed.yml
```

## Build

```
$ ./gradlew gem
```


text:
import { SkipForwardOutline32 } from "../../";

export = SkipForwardOutline32;


text:
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Union

from pyparsing import Combine
from pyparsing import Optional as ppOptional
from pyparsing import (
    ParseException,
    ParseResults,
    Suppress,
    Word,
    alphanums,
    alphas,
    infixNotation,
    nums,
    oneOf,
    opAssoc,
)

import great_expectations.exceptions as ge_exceptions
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.rule_based_profiler.config import ParameterBuilderConfig
from great_expectations.rule_based_profiler.domain import Domain
from great_expectations.rule_based_profiler.expectation_configuration_builder import (
    ExpectationConfigurationBuilder,
)
from great_expectations.rule_based_profiler.helpers.util import (
    get_parameter_value_and_validate_return_type,
)
from great_expectations.rule_based_profiler.parameter_container import (
    ParameterContainer,
)

if TYPE_CHECKING:
    from great_expectations.data_context.data_context.abstract_data_context import (
        AbstractDataContext,
    )

text = Suppress("'") + Word(alphas, alphanums) + Suppress("'")
integer = Word(nums).setParseAction(lambda t: int(t[0]))
var = Combine(Word("$" + alphas, alphanums + "_.") + ppOptional("[" + integer + "]"))
comparison_operator = oneOf(">= <= != > < ==")
binary_operator = oneOf("& |")
operand = text | integer | var

expr = infixNotation(
    operand,
    [
        (comparison_operator, 2, opAssoc.LEFT),
        (binary_operator, 2, opAssoc.LEFT),
    ],
)

class ExpectationConfigurationConditionParserError(
    ge_exceptions.GreatExpectationsError
):
    pass

class DefaultExpectationConfigurationBuilder(ExpectationConfigurationBuilder):
    """
    Class which creates ExpectationConfiguration out of a given Expectation type and
    parameter_name-to-parameter_fully_qualified_parameter_name map (name-value pairs supplied in the kwargs dictionary).

    ExpectationConfigurations can be optionally filtered if a supplied condition is met.
    """

    exclude_field_names: Set[
        str
    ] = ExpectationConfigurationBuilder.exclude_field_names | {
        "kwargs",
    }

    def __init__(
        self,
        expectation_type: str,
        meta: Optional[Dict[str, Any]] = None,
        condition: Optional[str] = None,
        validation_parameter_builder_configs: Optional[
            List[ParameterBuilderConfig]
        ] = None,
        data_context: Optional[AbstractDataContext] = None,
        **kwargs,
    ) -> None:
        """
        Args:
            expectation_type: the "expectation_type" argument of "ExpectationConfiguration" object to be emitted.
            meta: the "meta" argument of "ExpectationConfiguration" object to be emitted
            condition: Boolean statement (expressed as string and following specified grammar), which controls whether
            or not underlying logic should be executed and thus resulting "ExpectationConfiguration" emitted
            validation_parameter_builder_configs: ParameterBuilder configurations, having whose outputs available (as
            fully-qualified parameter names) is pre-requisite for present ExpectationConfigurationBuilder instance
            These "ParameterBuilder" configurations help build kwargs needed for this "ExpectationConfigurationBuilder"
            data_context: AbstractDataContext associated with this ExpectationConfigurationBuilder
            kwargs: additional arguments
        """

        super().__init__(
            expectation_type=expectation_type,
            validation_parameter_builder_configs=validation_parameter_builder_configs,
            data_context=data_context,
            **kwargs,
        )

        if meta is None:
            meta = {}

        self._meta = meta

        if not isinstance(meta, dict):
            raise ge_exceptions.ProfilerExecutionError(
                message=f"""Argument "{meta}" in "{self.__class__.__name__}" must be of type "dictionary" \
(value of type "{str(type(meta))}" was encountered).
"""
            )

        if condition and (not isinstance(condition, str)):
            raise ge_exceptions.ProfilerExecutionError(
                message=f"""Argument "{condition}" in "{self.__class__.__name__}" must be of type "string" \
(value of type "{str(type(condition))}" was encountered).
"""
            )

        self._condition = condition

        self._validation_parameter_builder_configs = (
            validation_parameter_builder_configs
        )

        self._kwargs = kwargs

    @property
    def expectation_type(self) -> str:
        return self._expectation_type

    @property
    def condition(self) -> Optional[str]:
        return self._condition

    @property
    def validation_parameter_builder_configs(
        self,
    ) -> Optional[List[ParameterBuilderConfig]]:
        return self._validation_parameter_builder_configs

    @property
    def kwargs(self) -> dict:
        return self._kwargs

    @property
    def meta(self) -> dict:
        return self._meta

    def _parse_condition(self) -> ParseResults:
        """
        Using the grammer defined by expr, provides the condition to the parser.

        Applicability: To be used as part of configuration (e.g., YAML-based files or text strings).
        Extendability: Readily extensible to include "slice" and other standard accessors (as long as no dynamic elements).
        """

        try:
            return expr.parseString(self._condition)
        except ParseException:
            raise ExpectationConfigurationConditionParserError(
                f'Unable to parse Expectation Configuration Condition: "{self._condition}".'
            )

    def _substitute_parameters_and_variables(
        self,
        term_list: Union[str, ParseResults],
        domain: Domain,
        variables: Optional[ParameterContainer] = None,
        parameters: Optional[Dict[str, ParameterContainer]] = None,
    ) -> ParseResults:
        """Recursively substitute all parameters and variables in term list

        Given a list of terms created by parsing a provided condition, recursively substitute all parameters and
        variables in the term list, regardless of depth of groupings.

        Example:
            condition: "($variables.max_user_id>0 & $variables.answer==42) | $parameter.my_min_user_id.value[0]<0" will
            return the following term list from self._parse_condition:
                parsed_condition = [[
                                      [
                                        ['$variables.max_user_id', '>', 0],
                                        '&',
                                        ['$variables.answer', '==', 42]
                                      ],
                                      '|',
                                      ['$parameter.my_min_user_id.value[0]', '<', 0]
                                   ]]

            This method will then take that term list and recursively search for parameters and variables that need to
            be substituted and return this ParseResults object:
                return [[
                          [
                             [999999999999, '>', 0],
                             '&',
                             [42, '==', 42]
                          ],
                          '|',
                          [397433, '<', 0]
                       ]]

        Args:
            term_list (Union[str, ParseResults): the ParseResults object returned from self._parse_condition
            domain (Domain): The domain of the ExpectationConfiguration
            variables (Optional[ParameterContainer]): The variables set for this ExpectationConfiguration
            parameters (Optional[Dict[str, ParameterContainer]]): The parameters set for this ExpectationConfiguration

        Returns:
            ParseResults: a ParseResults object identical to the one returned by self._parse_condition except with
                          substituted parameters and variables.
        """
        idx: int
        token: Union[str, ParseResults]
        for idx, token in enumerate(term_list):
            if isinstance(token, str) and token.startswith("$"):
                term_list[idx]: Dict[
                    str, Any
                ] = get_parameter_value_and_validate_return_type(
                    domain=domain,
                    parameter_reference=token,
                    expected_return_type=None,
                    variables=variables,
                    parameters=parameters,
                )
            elif isinstance(token, ParseResults):
                self._substitute_parameters_and_variables(
                    term_list=token,
                    domain=domain,
                    variables=variables,
                    parameters=parameters,
                )
        return term_list

    def _build_binary_list(
        self,
        substituted_term_list: Union[str, ParseResults],
    ) -> ParseResults:
        """Recursively build binary list from substituted terms

        Given a list of substituted terms created by parsing a provided condition and substituting parameters and
        variables, recursively build binary condition ParseResults object, regardless of depth of groupings.

        Example:
            substituted_term_list = [[
                                        [
                                            [999999999999, '>', 0],
                                            '&',
                                            [42, '==', 42]
                                        ],
                                        '|',
                                        [397433, '<', 0]
                                     ]]

            This method will then take that term list and recursively evaluate the terms between the top-level binary
            conditions and return this ParseResults object:
                return [True, '&' True]

        Args:
            substituted_term_list (Union[str, ParseResults]): the ParseResults object returned from
                                                              self._substitute_parameters_and_variables

        Returns:
            ParseResults: a ParseResults object with all terms evaluated except for binary operations.

        """
        idx: int
        token: Union[str, list]
        for idx, token in enumerate(substituted_term_list):
            if (not any([isinstance(t, ParseResults) for t in token])) and len(
                token
            ) > 1:
                substituted_term_list[idx] = eval("".join([str(t) for t in token]))
            elif isinstance(token, ParseResults):
                self._build_binary_list(substituted_term_list=token)

        return substituted_term_list

    def _build_boolean_result(
        self,
        binary_list: Union[ParseResults, List[Union[bool, str]]],
    ) -> bool:
        """Recursively build boolean result from binary list

        Given a list of binary terms created by parsing a provided condition, substituting parameters and
        variables, and building binary condition ParseResults object, recursively evaluate remaining conditions and
        return boolean result of condition.

        Example:
            binary_list = [True, '&' True]

            This method will then take that term list and recursively evaluate the remaining and return a boolean result
            for the provided condition:
                return True

        Args:
            binary_list (List[Union[bool, str]]): the ParseResults object returned from
                                                   self._substitute_parameters_and_variables

        Returns:
            bool: a boolean representing the evaluation of the entire provided condition.

        """
        idx: int
        token: Union[str, list]
        for idx, token in enumerate(binary_list):
            if (
                (not isinstance(token, bool))
                and (not any([isinstance(t, ParseResults) for t in token]))
                and (len(token) > 1)
            ):
                binary_list[idx] = eval("".join([str(t) for t in token]))
                return self._build_boolean_result(binary_list=binary_list)
            elif isinstance(token, ParseResults):
                return self._build_boolean_result(binary_list=token)

        return eval("".join([str(t) for t in binary_list]))

    def _evaluate_condition(
        self,
        parsed_condition: ParseResults,
        domain: Domain,
        variables: Optional[ParameterContainer] = None,
        parameters: Optional[Dict[str, ParameterContainer]] = None,
    ) -> bool:
        """Evaluates the parsed condition to True/False and returns the boolean result"""
        substituted_term_list: ParseResults = self._substitute_parameters_and_variables(
            term_list=parsed_condition,
            domain=domain,
            variables=variables,
            parameters=parameters,
        )

        binary_list: ParseResults = self._build_binary_list(
            substituted_term_list=substituted_term_list
        )
        boolean_result: bool = self._build_boolean_result(binary_list=binary_list)

        return boolean_result

    def _build_expectation_configuration(
        self,
        domain: Domain,
        variables: Optional[ParameterContainer] = None,
        parameters: Optional[Dict[str, ParameterContainer]] = None,
    ) -> Optional[ExpectationConfiguration]:
        """Returns either and ExpectationConfiguration object or None depending on evaluation of condition"""
        parameter_name: str
        fully_qualified_parameter_name: str
        expectation_kwargs: Dict[str, Any] = {
            parameter_name: get_parameter_value_and_validate_return_type(
                domain=domain,
                parameter_reference=fully_qualified_parameter_name,
                expected_return_type=None,
                variables=variables,
                parameters=parameters,
            )
            for parameter_name, fully_qualified_parameter_name in self.kwargs.items()
        }
        meta: Dict[str, Any] = get_parameter_value_and_validate_return_type(
            domain=domain,
            parameter_reference=self.meta,
            expected_return_type=dict,
            variables=variables,
            parameters=parameters,
        )

        if self._condition:
            parsed_condition: ParseResults = self._parse_condition()
            condition: bool = self._evaluate_condition(
                parsed_condition=parsed_condition,
                domain=domain,
                variables=variables,
                parameters=parameters,
            )

            if condition:
                return ExpectationConfiguration(
                    expectation_type=self._expectation_type,
                    kwargs=expectation_kwargs,
                    meta=meta,
                )
            else:
                return None
        else:
            return ExpectationConfiguration(
                expectation_type=self._expectation_type,
                kwargs=expectation_kwargs,
                meta=meta,
            )


text:
 /*
  * Authors:
  *   Keith Whitwell <keith@tungstengraphics.com>
  */

#include "pipe/p_state.h"

#include "util/u_math.h"

#include "brw_screen.h"
#include "brw_batchbuffer.h"
#include "brw_defines.h"
#include "brw_context.h"
#include "brw_eu.h"
#include "brw_state.h"
#include "brw_pipe_rast.h"
#include "brw_clip.h"

#define FRONT_UNFILLED_BIT  0x1
#define BACK_UNFILLED_BIT   0x2

static enum pipe_error
compile_clip_prog( struct brw_context *brw,
                   struct brw_clip_prog_key *key,
                   struct brw_winsys_buffer **bo_out )
{
   enum pipe_error ret;
   struct brw_clip_compile c;
   const GLuint *program;
   GLuint program_size;
   GLuint delta;

   memset(&c, 0, sizeof(c));

   /* Begin the compilation:
    */
   brw_init_compile(brw, &c.func);

   c.func.single_program_flow = 1;

   c.key = *key;

   /* Need to locate the two positions present in vertex + header.
    * These are currently hardcoded:
    */
   c.header_position_offset = ATTR_SIZE;

   if (brw->gen == 5)
       delta = 3 * REG_SIZE;
   else
       delta = REG_SIZE;

   c.offset_hpos = delta + c.key.output_hpos * ATTR_SIZE;

   if (c.key.output_color0 != BRW_OUTPUT_NOT_PRESENT)
      c.offset_color0 = delta + c.key.output_color0 * ATTR_SIZE;

   if (c.key.output_color1 != BRW_OUTPUT_NOT_PRESENT)
      c.offset_color1 = delta + c.key.output_color1 * ATTR_SIZE;

   if (c.key.output_bfc0 != BRW_OUTPUT_NOT_PRESENT)
      c.offset_bfc0 = delta + c.key.output_bfc0 * ATTR_SIZE;

   if (c.key.output_bfc1 != BRW_OUTPUT_NOT_PRESENT)
      c.offset_bfc1 = delta + c.key.output_bfc1 * ATTR_SIZE;

   if (c.key.output_edgeflag != BRW_OUTPUT_NOT_PRESENT)
      c.offset_edgeflag = delta + c.key.output_edgeflag * ATTR_SIZE;

   if (brw->gen == 5)
       c.nr_regs = (c.key.nr_attrs + 1) / 2 + 3;  /* are vertices packed, or reg-aligned? */
   else
       c.nr_regs = (c.key.nr_attrs + 1) / 2 + 1;  /* are vertices packed, or reg-aligned? */

   c.nr_bytes = c.nr_regs * REG_SIZE;

   c.prog_data.clip_mode = c.key.clip_mode; /* XXX */

   /* For some reason the thread is spawned with only 4 channels
    * unmasked.
    */
   brw_set_mask_control(&c.func, BRW_MASK_DISABLE);

   /* Would ideally have the option of producing a program which could
    * do all three:
    */
   switch (key->primitive) {
   case PIPE_PRIM_TRIANGLES:
      if (key->do_unfilled)
	 brw_emit_unfilled_clip( &c );
      else
	 brw_emit_tri_clip( &c );
      break;
   case PIPE_PRIM_LINES:
      brw_emit_line_clip( &c );
      break;
   case PIPE_PRIM_POINTS:
      brw_emit_point_clip( &c );
      break;
   default:
      assert(0);
      return PIPE_ERROR_BAD_INPUT;
   }

   /* get the program
    */
   ret = brw_get_program(&c.func, &program, &program_size);
   if (ret)
      return ret;

   /* Upload
    */
   ret = brw_upload_cache( &brw->cache,
                           BRW_CLIP_PROG,
                           &c.key, sizeof(c.key),
                           NULL, 0,
                           program, program_size,
                           &c.prog_data,
                           &brw->clip.prog_data,
                           bo_out );
   if (ret)
      return ret;

   return PIPE_OK;
}

/* Calculate interpolants for triangle and line rasterization.
 */
static enum pipe_error
upload_clip_prog(struct brw_context *brw)
{
   const struct brw_vertex_shader *vs = brw->curr.vertex_shader;
   struct brw_clip_prog_key key;
   enum pipe_error ret;

   /* Populate the key, starting from the almost-complete version from
    * the rast state.
    */

   /* PIPE_NEW_RAST */
   key = brw->curr.rast->clip_key;

   /* BRW_NEW_REDUCED_PRIMITIVE */
   key.primitive = brw->reduced_primitive;

   /* XXX: if edgeflag is moved to a proper TGSI vs output, can remove
    * dependency on CACHE_NEW_VS_PROG
    */
   /* CACHE_NEW_VS_PROG */
   key.nr_attrs        = brw->vs.prog_data->nr_outputs;

   /* PIPE_NEW_VS */
   key.output_hpos     = vs->output_hpos;
   key.output_color0   = vs->output_color0;
   key.output_color1   = vs->output_color1;
   key.output_bfc0     = vs->output_bfc0;
   key.output_bfc1     = vs->output_bfc1;
   key.output_edgeflag = vs->output_edgeflag;

   /* PIPE_NEW_CLIP */
   key.nr_userclip = brw->curr.ucp.nr;

   /* Already cached?
    */
   if (brw_search_cache(&brw->cache, BRW_CLIP_PROG,
                        &key, sizeof(key),
                        NULL, 0,
                        &brw->clip.prog_data,
                        &brw->clip.prog_bo))
      return PIPE_OK;

   /* Compile new program:
    */
   ret = compile_clip_prog( brw, &key, &brw->clip.prog_bo );
   if (ret)
      return ret;

   return PIPE_OK;
}

const struct brw_tracked_state brw_clip_prog = {
   .dirty = {
      .mesa  = (PIPE_NEW_RAST |
		PIPE_NEW_CLIP),
      .brw   = (BRW_NEW_REDUCED_PRIMITIVE),
      .cache = CACHE_NEW_VS_PROG
   },
   .prepare = upload_clip_prog
};


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

namespace LegacyOpenSsl.Interop
{
    public enum HandshakeState
    {
        Continue,
        Completed,
        Failed
    }
}


text:
import React from 'react';
import {StyleSheet, Text, View, TextInput, Button} from 'react-native';
import dismissKeyboard from 'dismissKeyboard';
import PropTypes from 'prop-types';

/**
 * Native login form.
 */
export default class Login extends React.Component {
  /**
   * Creates new instance of the native login form.
   */
  constructor() {
    super();
    this.state = {
      username: '',
      password: '',
    };
  }

  /**
 * @override
 */
  componentWillUnmount() {
    dismissKeyboard();
  }

  /**
 * @override
 */
  render() {
    const onLogin = () => {
      dismissKeyboard();
      this.props.finalizeLogin(this.state.username, this.state.password);
    };

    const onCreateAccount = () => {
      dismissKeyboard();
      this.props.createAccount();
    };

    const styles = StyleSheet.create({
      container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
      },
      fieldContainer: {
        margin: 5,
        flexDirection: 'row',
        alignItems: 'center',
      },
      inputField: {
        height: 40,
        width: 150,
      },
    });

    return (
      <View style={{flex: 1}}>
        <View style={styles.container}>
          <Text>Please log in to continue:</Text>
          <View style={styles.fieldContainer}>
            <Text>Username: </Text>
            <TextInput
              style={styles.inputField}
              onChangeText={(username) => this.setState({username})}
              value={this.state.username}
            />
          </View>
          <View style={styles.fieldContainer}>
            <Text>Password: </Text>
            <TextInput
              style={styles.inputField}
              onChangeText={(password) => this.setState({password})}
              value={this.state.password}
              secureTextEntry={true}
            />
          </View>
          <Button onPress={onLogin} title="Log In" color="#841584" />
          <Text
            style={{
              textDecorationStyle: 'solid',
              color: 'blue',
              marginTop: 25,
              textDecorationLine: 'underline',
            }}
            onPress={onCreateAccount}
          >
            Not registered yet? Create an account.
          </Text>
        </View>
      </View>
    );
  }
}

Login.propTypes = {
  authState: PropTypes.string,
  createAccount: PropTypes.func,
  finalizeLogin: PropTypes.func,
};