---
id: concurrent-mode-intro
title: Introducción al Modo concurrente (experimental)
permalink: docs/concurrent-mode-intro.html
next: concurrent-mode-suspense.html
---

<style>
.scary > blockquote {
  background-color: rgba(237, 51, 21, 0.2);
  border-left-color: #ed3315;
}
</style>

<div class="scary">

> Advertencia:
>
> Esta página describe **funcionalidades experimentales que [aún no están disponibles](/docs/concurrent-mode-adoption.html) en una versión estable**. No dependas de compilados experimentales de React en aplicaciones en producción. Estas funcionalidades pueden cambiar significativamente y sin advertencia antes de formar parte de React.
>
> Esta documentación está dirigida a usuarios pioneros y personas que sienten curiosidad. **Si te estás iniciando en React, no te preocupes por estas funcionalidades,** no necesitas aprenderlas inmediatamente.

</div>

Esta página proporciona un resumen teórico del Modo concurrente. *Para tener una introducción más práctica, quizá te interese revisar las próximas secciones:*

* [Suspense para la carga de datos](/docs/concurrent-mode-suspense.html) describe un nuevo mecanismo para la obtención de datos en componentes de React.
* [Patrones concurrentes en interfaces de usuario](/docs/concurrent-mode-patterns.html) muestra algunos patrones de interfaces de usuario vueltos realidad gracias al Modo concurrente y Suspense.
* [Adopción del Modo concurrente](/docs/concurrent-mode-adoption.html) explica como puedes probar el Modo concurrente en tu proyecto.
* [Referencia de la API del Modo concurrente](/docs/concurrent-mode-reference.html) documenta las nuevas API disponibles en los compilados experimentales.

## ¿Qué es el Modo concurrente? {#what-is-concurrent-mode}

El Modo concurrente es un conjunto de nuevas funcionalidades que ayudan a que las aplicaciones de React permanezcan responsivas y se ajusten de forma natural a las capacidades del dispositivo del usuario y la velocidad de la red.

Estas funcionalidades aún son experimentales y sujetas a cambios. Todavía no son parte de una versión estable de React, pero puedes probarlas en un compilado experimental.

## Bloqueo vs. renderizado interrumpible {#blocking-vs-interruptible-rendering}

**Para explicar el Modo concurrente, usaremos el control de versiones como una metáfora.** Si trabajas en un equipo, probablemente usas un sistema de control de versiones como Git y trabajas en ramas. Cuando una rama está lista, puedes mezclar tu trabajo en *master* de manera tal que otras personas puedan obtenerlos.

Antes de que existiera el control de versiones, el flujo de desarrollo era muy diferente. No había concepto de ramas. Si querías editar algunos archivos, tenías que decirle a todo el mundo que no tocara esos archivos hasta que terminaras tu trabajo. Ni siquiera podías comenzar a trabajar en esos archivos concurrentemente con esa persona, literalmente estabas *bloqueado* por ellos.

Esto ilustra como las bibliotecas de interfaces de usuario, como React, funcionan hoy en día. Una vez que inician el renderizado de una actualización, incluida la creación de nuevos nodos del DOM y ejecutar el código dentro de componentes, no pueden interrumpir su trabajo. A este comportamiento lo llamamos "renderizado con bloqueo".

En el Modo concurrente, el renderizado no bloquea, se puede interrumpir. Esto mejora la experiencia de usuario. También hace posibles nuevas funcionalidades que antes no eran posibles. Antes de que veamos ejemplos concretos en los [próximos](/docs/concurrent-mode-suspense.html) [capítulos](/docs/concurrent-mode-patterns.html), haremos un resumen de alto nivel de las nuevas funcionalidades.

### Renderizado interrumpible {#interruptible-rendering}

Pensemos en una lista filtrable de productos. ¿Alguna vez has escrito en un filtro de una lista y sentido que se traba con cada tecla presionada? Parte del trabajo utilizado en actualizar la lista de productos puede ser absolutamente necesario, como crear nuevos nodos del DOM, o el maquetado que debe hacer el navegador. Sin embargo, *cuándo* y *cómo* hacemos ese trabajo son cuestiones inmensamente importantes.

Una forma común de prevenir esta experiencia con trabas es "detener" la entrada (en inglés *debouncing*). Cuando se hace *debouncing* solo actualizamos la lista *después* de que el usuario para de escribir. Sin embargo, puede resultar frustrante que la interfaz no se actualice mientras escribimos. Como alternativa, podemos "regular" la entrada (en inglés *throttling*), y actualizar con cierta frecuencia máxima. Pero en dispositivos con pocas prestaciones aún terminaríamos con la experiencia de las trabas. Tanto *debouncing* como *throttling* crean una experiencia de usuario subóptima.

La razón de las trabas es simple: una vez que comienza el renderizado, no se puede interrumpir. De esta forma el navegador no puede actualizar la entrada de texto justo después de que se presiona la tecla. Sin importar cuán buena una biblioteca de interfaces de usuario (como React) luzca en una métrica, si utiliza renderizado con bloqueo, cierta carga de trabajo en tus componentes causarán siempre trabas. Y a menudo, no hay una forma fácil de solucionarlo.

**El Modo concurrente soluciona esta limitación fundamental al hacer el renderizado interrumpible.** Esto significa que cuando el usuario presiona otra tecla, React no necesita bloquear al navegador impidiéndole actualizar la entrada de texto. En cambio, puede permitirle al navegador pintar una actualización a la entrada de texto y luego continuar renderizando la lista actualizada *en memoria*. Cuando el renderizado termina, React actualiza el DOM, y los cambios se reflejan en la pantalla.

Conceptualmente, puedes pensar en esto como que React prepara cada actualización "en una rama". Al igual que puedes dejar trabajo en ramas o cambiarte entre ellas, React en Modo concurrente puede interrumpir una actualización en curso para hacer algo más importante, y luego volver a lo que estaba haciendo anteriormente. Esta técnica podría también recordarte al [*buffering* doble](https://wiki.osdev.org/Double_Buffering) utilizado en videojuegos.

Las técnicas del Modo concurrente reducen la necesidad de *debounce* y *throttle* en interfaces de usuario. Dado que el renderizado se puede interrumpir, React no necesita *ralentizar* artificialmente el trabajo para evitar trabas. Puede comenzar a renderizar inmediatamente, pero aún interrumpir este trabajo cuando sea necesario para mantener la aplicación responsiva.

### Secuencias de carga intencionales {#intentional-loading-sequences}

Anteriormente hemos mencionado que el Modo concurrente es similar a React trabajando "en una rama". Las ramas son útiles no solo para arreglos a corto plazo, sino también para funcionalidades que requieren tiempo. En ocasiones te puedes encontrar trabajando en una funcionalidad, pero puede tardar semanas antes de que esté en un "estado lo suficientemente bueno" como para mezclarlo en *master*. Esta parte de nuestra metáfora del control de versiones también se aplica al renderizado.

Imagina que estamos navegando entre dos pantallas de una aplicación. A veces, no tenemos suficiente código y datos cargados para mostrar al usuario un estado de carga lo "suficientemente bueno" en la nueva pantalla. La transición hacia una pantalla en blanco o un gran *spinner* puede resultar una experiencia disonante. Sin embargo, también es común que no tome mucho tiempo cargar el código y los datos necesarios. **¿No sería mucho mejor si React pudiera permanecer en la pantalla anterior por un poco de tiempo más y "saltarse" el "estado de carga malo" antes de mostrar la nueva pantalla?**

Si bien es posible hacerlo hoy, puede ser difícil hacer la coordinación para que suceda. En el Modo concurrente, esta funcionalidad está incluida. React comienza a preparar primero la nueva pantalla en memoria, o siguiendo nuestra metáfora, "en una rama diferente". Así React puede esperar a actualizar el DOM para que se cargue más contenido. En Modo concurrente, podemos decirle a React que siga mostrando la pantalla antigua, completamente interactiva, con un indicador de carga en línea. Y cuando la nueva pantalla esté lista, React nos puede llevar a ella.

### Concurrencia {#concurrency}

Recapitulemos los dos ejemplos anteriores y veamos como el Modo concurrente los unifica. **En Modo concurrente*, React puede trabajar en varias actualizaciones de estado *concurrentemente***, exactamente igual a como las ramas permiten que varios miembros de un equipo trabajen independientemente:

* Para actualizaciones ligadas a la CPU (como la creación de nodos del DOM y la ejecución de código de componentes), concurrencia se traduce en que una actualización más urgente puede "interrumpir" un renderizado que ya se ha iniciado.
* Para actualizaciones ligadas a la entrada-salida (como la carga de código o datos desde la red), concurrencia se traduce en que React puede comenzar a renderizar en memoria incluso antes de que todos los datos lleguen, y evitar mostrar los estados de carga vacíos que resulten discordantes.

Es importante notar que, la forma en que *utilizas* React es la misma. Conceptos como componentes, props y estado funcionan fundamentalmente de la misma forma. Cuando quieras actualizar la pantalla, estableces el estado.

React usa una heurística para decidir cuán "urgente" es una actualización, y te permite ajustarla con unas pocas líneas de código, de forma tal que puedas lograr la experiencia de usuario deseada para cada interacción.

## Poner la investigación en producción {#putting-research-into-production}

Existe un tema común alrededor de las funcionalidades del Modo concurrente. **Su misión es ayudar a integrar los descubrimientos de las investigaciones sobre la interacción humano-computadora en interfaces de usuario reales.**

Por ejemplo, las investigaciones muestran que mostrar muchos estados de carga intermedios cuando se hace una transición entre pantallas hace que esta se sienta *más lenta*. Es por ello que el Modo concurrente muestra nuevos indicadores de estado en una "planificación" fija para evitar estados discordantes y demasiadas actualizaciones.

De forma similar, conocemos por investigaciones que las interacciones como el *hover* y la entrada de texto necesitan ser manejadas en un muy corto periodo de tiempo, mientras que los clics y las transiciones de páginas pueden esperar un poco más sin que se sientan lentas. Las diferentes "prioridades"  que el Modo concurrente utiliza internamente se corresponden aproximadamente a las categorías de interacción en las investigaciones de la percepción humana.

Equipos con un claro enfoque en la experiencia de usuario en ocasiones se enfrentan a problemas similares con soluciones *ad-hoc*. Sin embargo esas soluciones raramente sobreviven por mucho tiempo, dado que son difíciles de mantener. Con el Modo concurrente nuestro objetivo es incluir los resultados de las investigaciones en interfaces de usuario dentro de la abstracción misma y proporcionar formas idiomáticas de usarlos. Como una biblioteca de interfaces de usuario, React está bien posicionada para hacerlo.

## Próximos pasos {#next-steps}

¡Ahora sabes de qué se trata el Modo concurrente!

En las próximas páginas, aprenderás más detalles sobre temas específicos:

* [Suspense para la obtención de datos](/docs/concurrent-mode-suspense.html) describe un nuevo mecanismo para la obtención de datos en componentes de React.
* [Patrones concurrentes en interfaces de usuario](/docs/concurrent-mode-patterns.html) muestra algunos patrones de interfaces de usuario, hechos realidad gracias al Modo concurrente y a Suspense.
* [Adopción del Modo concurrente](/docs/concurrent-mode-adoption.html) explica como puedes probar el Modo concurrente en tu proyecto.
* [Referencia de la API del Modo concurrente](/docs/concurrent-mode-reference.html) documenta las nuevas API disponibles en compilados experimentales.

{'repo_name': 'reactjs/es.reactjs.org', 'stars': '184', 'repo_language': 'JavaScript', 'file_name': 'index.js', 'mime_type': 'text/plain', 'hash': -3366331917091457183, 'source_dataset': 'data'}


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.ObjectModel;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.IdentityModel.Tokens;
using System.ServiceModel;

namespace System.IdentityModel.Selectors
{
    public class X509SecurityTokenAuthenticator : SecurityTokenAuthenticator
    {
        private X509CertificateValidator _validator;
        private bool _mapToWindows;
        private bool _includeWindowsGroups;
        private bool _cloneHandle;

        public X509SecurityTokenAuthenticator()
            : this(X509CertificateValidator.ChainTrust)
        {
        }

        public X509SecurityTokenAuthenticator(X509CertificateValidator validator)
            : this(validator, false)
        {
        }

        public X509SecurityTokenAuthenticator(X509CertificateValidator validator, bool mapToWindows)
            : this(validator, mapToWindows, /* WindowsClaimSet.DefaultIncludeWindowsGroups */ true)
        {
        }

        public X509SecurityTokenAuthenticator(X509CertificateValidator validator, bool mapToWindows, bool includeWindowsGroups)
            : this(validator, mapToWindows, includeWindowsGroups, true)
        {
        }

        internal X509SecurityTokenAuthenticator(X509CertificateValidator validator, bool mapToWindows, bool includeWindowsGroups, bool cloneHandle)
        {
            if (validator == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("validator");
            }

            _validator = validator;
            _mapToWindows = mapToWindows;
            _includeWindowsGroups = includeWindowsGroups;
            _cloneHandle = cloneHandle;
        }

        protected override bool CanValidateTokenCore(SecurityToken token)
        {
            return token is X509SecurityToken;
        }

        protected override ReadOnlyCollection<IAuthorizationPolicy> ValidateTokenCore(SecurityToken token)
        {
            X509SecurityToken x509Token = (X509SecurityToken)token;
            _validator.Validate(x509Token.Certificate);

            X509CertificateClaimSet x509ClaimSet = new X509CertificateClaimSet(x509Token.Certificate, _cloneHandle);
            if (!_mapToWindows)
            {
                return SecurityUtils.CreateAuthorizationPolicies(x509ClaimSet, x509Token.ValidTo);
            }
            else
            {
                throw ExceptionHelper.PlatformNotSupported("Mapping to Windows identity not supported.");
            }
        }
    }
}

{'repo_name': 'dotnet/wcf', 'stars': '1378', 'repo_language': 'C#', 'file_name': 'packages.config', 'mime_type': 'text/xml', 'hash': 4369494524574722110, 'source_dataset': 'data'}


//#if ENABLE_VSTU
//using System;
//using System.IO;
//using System.Linq;
//using System.Text;
//using System.Xml.Linq;

//using UnityEngine;
//using UnityEditor;

//using SyntaxTree.VisualStudio.Unity.Bridge;

//[InitializeOnLoad]
//public class ProjectFileHook
//{
//    // necessary for XLinq to save the xml project file in utf8
//    class Utf8StringWriter : StringWriter
//    {
//        public override Encoding Encoding
//        {
//            get { return Encoding.UTF8; }
//        }
//    }

//    static ProjectFileHook()
//    {
//        ProjectFilesGenerator.ProjectFileGeneration += (string name, string content) =>
//        {
//            // parse the document and make some changes
//            var document = XDocument.Parse(content);

//            var assemblyName = Path.GetFileNameWithoutExtension(name);
//            var rootNamespace = document.Descendants().First(x => x.Name.LocalName == "RootNamespace");

//            if (assemblyName == "ProceduralLevelGenerator.Unity")
//            {
//                rootNamespace.Value = "ProceduralLevelGenerator.Unity";
//            }

//            if (assemblyName == "ProceduralLevelGenerator.Unity.Editor")
//            {
//                rootNamespace.Value = "ProceduralLevelGenerator.Unity";
//            }

//            if (assemblyName == "ProceduralLevelGenerator.Unity.Examples")
//            {
//                rootNamespace.Value = "ProceduralLevelGenerator.Unity";
//            }

//            if (assemblyName == "ProceduralLevelGenerator.Unity.Tests")
//            {
//                rootNamespace.Value = "ProceduralLevelGenerator.Unity";
//            }

//            document.Root.Add(new XComment($"{assemblyName},{name}"));

//            // save the changes using the Utf8StringWriter
//            var str = new Utf8StringWriter();
//            document.Save(str);

//            return str.ToString();
//        };
//    }
//}
//#endif

{'repo_name': 'OndrejNepozitek/Edgar-Unity', 'stars': '126', 'repo_language': 'C#', 'file_name': 'ExampleTestsBase.cs', 'mime_type': 'text/plain', 'hash': 6542363773261191128, 'source_dataset': 'data'}


{'repo_name': 'iPlug2/iPlug2', 'stars': '604', 'repo_language': 'C', 'file_name': 'README.md', 'mime_type': 'text/plain', 'hash': -4682318644633586384, 'source_dataset': 'data'}


/* See license.txt for terms of usage */

define([
    "firebug/lib/trace",
    "firebug/lib/object",
    "firebug/lib/string",
    "firebug/lib/locale",
    "firebug/debugger/clients/objectClient",
],
function (FBTrace, Obj, Str, Locale, ObjectClient) {

"use strict";

// ********************************************************************************************* //
// Constants

var Trace = FBTrace.to("DBG_SCOPECLIENT");

// ********************************************************************************************* //
// Scope

function ScopeClient(grip, cache)
{
    this.grip = grip;
    this.cache = cache;
    this.properties = null;
    this.error = null;

    // It should never be possible to edit the scope object in the Watch/DOM panels.
    this.readOnly = true;
}

ScopeClient.prototype = Obj.descend(ObjectClient.prototype,
{
    getName: function()
    {
        if (this.name)
            return this.name;

        // Construct the scope name.
        var name = Str.capitalize(this.grip.type);

        // If there is no parent the scope is global.
        if (!this.grip.parent)
            name = Locale.$STR("scopes.Global Scope");

        var label = name;//Locale.STRF$("scopeLabel", [name]);
        switch (this.grip.type)
        {
            case "with":
            case "object":
                label += " [" + this.grip.object["class"] + "]";
            break;

            case "function":
            if (this.grip.functionName)
                label += " [" + this.grip.functionName + "]";
            break;
        }

        return label;
    },

    getValue: function()
    {
        // xxxHonza: needs refactoring (e.g. we need WindowGrip object)
        // Global scope is usually a window, which is displayed with href.

        if (this.value)
            return this.value;

        var object;
        switch (this.grip.type)
        {
            case "with":
            case "object":
                object = this.cache.getObject(this.grip["object"]);
            break;

            case "function":
                object = this.cache.getObject(this.grip["function"]);
            break;
        }

        if (object)
        {
            this.value = object.getValue();
            return this.value;
        }

        return ObjectClient.prototype.getValue.apply(this, arguments);
    },

    hasProperties: function()
    {
        // If properties are loaded, but there are none return false.
        if (this.properties && !this.properties.length)
            return false;

        // xxxHonza: hack, the scope could be empty (= no children).
        return true;
    },

    getProperties: function()
    {
        if (this.properties)
            return this.properties;

        switch (this.grip.type)
        {
            case "with":
            case "object":
                var actor = this.grip.object.actor;
                return ObjectClient.prototype.getPrototypeAndProperties.call(this, actor);

            case "block":
            case "function":
                var ps = this.properties = [];
                ps.push.apply(ps, this.parseArguments(this.grip.bindings.arguments));
                ps.push.apply(ps, this.parseProperties(this.grip.bindings.variables));
                break;
        }

        return this.properties;
    },

    parseArguments: function(args)
    {
        var result = [];

        if (!args)
            return result;

        for (var i=0; i<args.length; i++)
        {
            var arg = args[i];
            for (var name in arg)
                result.push(this.createProperty(name, arg[name], this.cache));
        }

        Trace.sysout("scopeClient.parseArguments; ", {
            grip: this.grip,
            result: result,
        });

        return result;
    }
});

// ********************************************************************************************* //
// Registration

return ScopeClient;

// ********************************************************************************************* //
});

{'repo_name': 'firebug/firebug', 'stars': '1265', 'repo_language': 'JavaScript', 'file_name': 'prefs.js', 'mime_type': 'text/plain', 'hash': -2717811845303956956, 'source_dataset': 'data'}


/*
© Copyright IBM Corporation 2017, 2020

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 command contains code to run external commands
package command

import (
	"fmt"
	"os/exec"
)

// Run runs an OS command.  On Linux it waits for the command to
// complete and returns the exit status (return code).
// Do not use this function to run shell built-ins (like "cd"), because
// the error handling works differently
func Run(name string, arg ...string) (string, int, error) {
	// Run the command and wait for completion
	// #nosec G204
	cmd := exec.Command(name, arg...)
	out, err := cmd.CombinedOutput()
	rc := cmd.ProcessState.ExitCode()
	if err != nil {
		return string(out), rc, fmt.Errorf("%v: %v", cmd.Path, err)
	}
	return string(out), rc, nil
}

{'repo_name': 'ibm-messaging/mq-container', 'stars': '114', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -4248260495733348537, 'source_dataset': 'data'}


using System.Timers;
using Artemis.Core.Modules;
using Humanizer;
using Stylet;

namespace Artemis.UI.Screens.Modules.Tabs
{
    public class ActivationRequirementViewModel : Screen
    {
        private readonly IModuleActivationRequirement _activationRequirement;
        private readonly Timer _updateTimer;
        private string _requirementDescription;
        private bool _requirementMet;

        public ActivationRequirementViewModel(IModuleActivationRequirement activationRequirement)
        {
            _activationRequirement = activationRequirement;
            _updateTimer = new Timer(500);

            RequirementName = activationRequirement.GetType().Name.Humanize();
            RequirementDescription = activationRequirement.GetUserFriendlyDescription();

            _updateTimer.Elapsed += UpdateTimerOnElapsed;
        }

        public string RequirementName { get; }

        public string RequirementDescription
        {
            get => _requirementDescription;
            set => SetAndNotify(ref _requirementDescription, value);
        }

        public bool RequirementMet
        {
            get => _requirementMet;
            set => SetAndNotify(ref _requirementMet, value);
        }

        protected override void OnActivate()
        {
            Update();
            _updateTimer.Start();
            base.OnActivate();
        }

        protected override void OnDeactivate()
        {
            _updateTimer.Stop();
            base.OnDeactivate();
        }

        private void UpdateTimerOnElapsed(object sender, ElapsedEventArgs e)
        {
            Update();
        }

        private void Update()
        {
            RequirementDescription = _activationRequirement.GetUserFriendlyDescription();
            RequirementMet = _activationRequirement.Evaluate();
        }
    }
}

{'repo_name': 'SpoinkyNL/Artemis', 'stars': '300', 'repo_language': 'C#', 'file_name': 'OverlayModule.cs', 'mime_type': 'text/plain', 'hash': -7500939223635621928, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <artifactId>kooby</artifactId>
  <groupId>com.techempower</groupId>
  <version>2.0</version>

  <name>kooby: jooby+kotlin</name>

  <properties>
    <jooby.version>2.8.10</jooby.version>
    <postgresql.version>42.2.13</postgresql.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- Startup class -->
    <application.class>kooby.AppKt</application.class>
    <kotlin.version>1.3.72</kotlin.version>
  </properties>

  <dependencies>
    <!-- jackson -->
    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-jackson</artifactId>
    </dependency>

    <!-- jdbc -->
    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-hikari</artifactId>
    </dependency>

    <!-- rocker -->
    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-rocker</artifactId>
    </dependency>

    <!-- mySQL -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
    </dependency>

    <!-- postgresql -->
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>${postgresql.version}</version>
    </dependency>

    <!-- logging -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-utow</artifactId>
      <version>${jooby.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
      <version>${kotlin.version}</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>kooby</finalName>
    <sourceDirectory>src/main/kotlin</sourceDirectory>

    <plugins>
      <plugin>
        <groupId>com.fizzed</groupId>
        <artifactId>rocker-maven-plugin</artifactId>
        <version>1.3.0</version>
        <executions>
          <execution>
            <id>generate-rocker-templates</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <templateDirectory>public</templateDirectory>
              <touchFile>/dev/null</touchFile>
              <optimize>true</optimize>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>kotlin-maven-plugin</artifactId>
        <version>${kotlin.version}</version>
        <configuration>
          <jvmTarget>1.8</jvmTarget>
        </configuration>
        <groupId>org.jetbrains.kotlin</groupId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <source>target/generated-sources/rocker</source>
                <source>src/main/kotlin</source>
              </sourceDirs>
            </configuration>
          </execution>

          <execution>
            <id>test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>test-compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <executions>
          <!-- Replacing default-compile as it is treated specially by maven -->
          <execution>
            <id>default-compile</id>
            <phase>none</phase>
          </execution>
          <!-- Replacing default-testCompile as it is treated specially by maven -->
          <execution>
            <id>default-testCompile</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>java-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>java-test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Build fat jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <id>uber-jar</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <transformers>
                <transformer
                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                <transformer
                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>${application.class}</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.jooby</groupId>
        <artifactId>jooby-bom</artifactId>
        <version>${jooby.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>

{'repo_name': 'TechEmpower/FrameworkBenchmarks', 'stars': '5262', 'repo_language': 'Java', 'file_name': 'app.vala', 'mime_type': 'text/plain', 'hash': -909287822249919669, 'source_dataset': 'data'}


/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * 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.android.launcher3.model;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotSame;
import static junit.framework.Assert.assertTrue;

import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;

import android.content.ContentValues;
import android.content.Context;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.android.launcher3.LauncherProvider;
import com.android.launcher3.LauncherProvider.DatabaseHelper;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.R;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;

import java.io.File;

/**
 * Tests for {@link DbDowngradeHelper}
 */
@RunWith(RobolectricTestRunner.class)
public class DbDowngradeHelperTest {

    private static final String SCHEMA_FILE = "test_schema.json";
    private static final String DB_FILE = "test.db";

    private Context mContext;
    private File mSchemaFile;
    private File mDbFile;

    @Before
    public void setup() {
        mContext = RuntimeEnvironment.application;
        mSchemaFile = mContext.getFileStreamPath(SCHEMA_FILE);
        mDbFile = mContext.getDatabasePath(DB_FILE);
    }

    @Test
    public void testDowngradeSchemaMatchesVersion() throws Exception {
        mSchemaFile.delete();
        assertFalse(mSchemaFile.exists());
        DbDowngradeHelper.updateSchemaFile(mSchemaFile, 0, mContext);
        assertEquals(LauncherProvider.SCHEMA_VERSION, DbDowngradeHelper.parse(mSchemaFile).version);
    }

    @Test
    public void testUpdateSchemaFile() throws Exception {
        // Setup mock resources
        Resources res = spy(mContext.getResources());
        doAnswer(i ->this.getClass().getResourceAsStream("/db_schema_v10.json"))
                .when(res).openRawResource(eq(R.raw.downgrade_schema));
        Context context = spy(mContext);
        when(context.getResources()).thenReturn(res);

        mSchemaFile.delete();
        assertFalse(mSchemaFile.exists());

        DbDowngradeHelper.updateSchemaFile(mSchemaFile, 10, context);
        assertTrue(mSchemaFile.exists());
        assertEquals(10, DbDowngradeHelper.parse(mSchemaFile).version);

        // Schema is updated on version upgrade
        assertTrue(mSchemaFile.setLastModified(0));
        DbDowngradeHelper.updateSchemaFile(mSchemaFile, 11, context);
        assertNotSame(0, mSchemaFile.lastModified());

        // Schema is not updated when version is same
        assertTrue(mSchemaFile.setLastModified(0));
        DbDowngradeHelper.updateSchemaFile(mSchemaFile, 10, context);
        assertEquals(0, mSchemaFile.lastModified());

        // Schema is not updated on version downgrade
        DbDowngradeHelper.updateSchemaFile(mSchemaFile, 3, context);
        assertEquals(0, mSchemaFile.lastModified());
    }

    @Test
    public void testDowngrade_success_v24() throws Exception {
        setupTestDb();

        TestOpenHelper helper = new TestOpenHelper(24);
        assertEquals(24, helper.getReadableDatabase().getVersion());
        helper.close();
    }

    @Test
    public void testDowngrade_success_v22() throws Exception {
        setupTestDb();

        SQLiteOpenHelper helper = new TestOpenHelper(22);
        assertEquals(22, helper.getWritableDatabase().getVersion());

        // Check column does not exist
        try (Cursor c = helper.getWritableDatabase().query(Favorites.TABLE_NAME,
                null, null, null, null, null, null)) {
            assertEquals(-1, c.getColumnIndex(Favorites.OPTIONS));

            // Check data is present
            assertEquals(10, c.getCount());
        }
        helper.close();

        helper = new DatabaseHelper(mContext, null, DB_FILE) {
            @Override
            public void onOpen(SQLiteDatabase db) { }
        };
        assertEquals(LauncherProvider.SCHEMA_VERSION, helper.getWritableDatabase().getVersion());

        try (Cursor c = helper.getWritableDatabase().query(Favorites.TABLE_NAME,
                null, null, null, null, null, null)) {
            // Check column exists
            assertNotSame(-1, c.getColumnIndex(Favorites.OPTIONS));

            // Check data is present
            assertEquals(10, c.getCount());
        }
        helper.close();
    }

    @Test(expected = DowngradeFailException.class)
    public void testDowngrade_fail_v20() throws Exception {
        setupTestDb();

        TestOpenHelper helper = new TestOpenHelper(20);
        helper.getReadableDatabase().getVersion();
    }

    private void setupTestDb() throws Exception {
        mSchemaFile.delete();
        mDbFile.delete();

        DbDowngradeHelper.updateSchemaFile(mSchemaFile, LauncherProvider.SCHEMA_VERSION, mContext);

        DatabaseHelper dbHelper = new DatabaseHelper(mContext, null, DB_FILE) {
            @Override
            public void onOpen(SQLiteDatabase db) { }
        };
        // Insert dummy data
        for (int i = 0; i < 10; i++) {
            ContentValues values = new ContentValues();
            values.put(Favorites._ID, i);
            values.put(Favorites.TITLE, "title " + i);
            dbHelper.getWritableDatabase().insert(Favorites.TABLE_NAME, null, values);
        }
        dbHelper.close();
    }

    private class TestOpenHelper extends SQLiteOpenHelper {

        public TestOpenHelper(int version) {
            super(mContext, DB_FILE, null, version);
        }

        @Override
        public void onCreate(SQLiteDatabase sqLiteDatabase) {
            throw new RuntimeException("DB should already be created");
        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
            throw new RuntimeException("Only downgrade supported");
        }

        @Override
        public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
            try {
                DbDowngradeHelper.parse(mSchemaFile).onDowngrade(db, oldVersion, newVersion);
            } catch (Exception e) {
                throw new DowngradeFailException(e);
            }
        }
    }

    private static class DowngradeFailException extends RuntimeException {
        public DowngradeFailException(Exception e) {
            super(e);
        }
    }
}

{'repo_name': 'yuchuangu85/Launcher3_mx', 'stars': '356', 'repo_language': 'Java', 'file_name': 'DeepShortcutManager.java', 'mime_type': 'text/x-java', 'hash': 3129083294685017903, 'source_dataset': 'data'}


Fix build with OpenSSL 1.1.x

Extracted vtun-openssl.patch from
http://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/source/tree/Packages/v/vtun-3.0.4-4.fc27.src.rpm

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

diff -NarU5 a/lfd_encrypt.c b/lfd_encrypt.c
--- a/lfd_encrypt.c	2016-10-01 17:27:51.000000000 -0400
+++ b/lfd_encrypt.c	2017-03-20 08:43:48.013308435 -0400
@@ -93,15 +93,15 @@
 static int dec_init_first_time;
 static unsigned long sequence_num;
 static char * pkey;
 static char * iv_buf;

-static EVP_CIPHER_CTX ctx_enc;	/* encrypt */
-static EVP_CIPHER_CTX ctx_dec;	/* decrypt */
+static EVP_CIPHER_CTX *ctx_enc;	/* encrypt */
+static EVP_CIPHER_CTX *ctx_dec;	/* decrypt */

-static EVP_CIPHER_CTX ctx_enc_ecb;	/* sideband ecb encrypt */
-static EVP_CIPHER_CTX ctx_dec_ecb;	/* sideband ecb decrypt */
+static EVP_CIPHER_CTX *ctx_enc_ecb;	/* sideband ecb encrypt */
+static EVP_CIPHER_CTX *ctx_dec_ecb;	/* sideband ecb decrypt */

 static int send_msg(int len, char *in, char **out);
 static int recv_msg(int len, char *in, char **out);
 static int send_ib_mesg(int *len, char **in);
 static int recv_ib_mesg(int *len, char **in);
@@ -180,37 +180,37 @@
       case VTUN_ENC_AES256CBC:
          blocksize = 16;
          keysize = 32;
          sb_init = 1;
          cipher_type = EVP_aes_256_ecb();
-         pctx_enc = &ctx_enc_ecb;
-         pctx_dec = &ctx_dec_ecb;
+         pctx_enc = ctx_enc_ecb;
+         pctx_dec = ctx_dec_ecb;
       break;

       case VTUN_ENC_AES256ECB:
          blocksize = 16;
          keysize = 32;
-         pctx_enc = &ctx_enc;
-         pctx_dec = &ctx_dec;
+         pctx_enc = ctx_enc;
+         pctx_dec = ctx_dec;
          cipher_type = EVP_aes_256_ecb();
          strcpy(cipher_name,"AES-256-ECB");
       break;
       case VTUN_ENC_AES128OFB:
       case VTUN_ENC_AES128CFB:
       case VTUN_ENC_AES128CBC:
          blocksize = 16;
          keysize = 16;
          sb_init=1;
          cipher_type = EVP_aes_128_ecb();
-         pctx_enc = &ctx_enc_ecb;
-         pctx_dec = &ctx_dec_ecb;
+         pctx_enc = ctx_enc_ecb;
+         pctx_dec = ctx_dec_ecb;
       break;
       case VTUN_ENC_AES128ECB:
          blocksize = 16;
          keysize = 16;
-         pctx_enc = &ctx_enc;
-         pctx_dec = &ctx_dec;
+         pctx_enc = ctx_enc;
+         pctx_dec = ctx_dec;
          cipher_type = EVP_aes_128_ecb();
          strcpy(cipher_name,"AES-128-ECB");
       break;

       case VTUN_ENC_BF256OFB:
@@ -219,20 +219,20 @@
          blocksize = 8;
          keysize = 32;
          var_key = 1;
          sb_init = 1;
          cipher_type = EVP_bf_ecb();
-         pctx_enc = &ctx_enc_ecb;
-         pctx_dec = &ctx_dec_ecb;
+         pctx_enc = ctx_enc_ecb;
+         pctx_dec = ctx_dec_ecb;
       break;

       case VTUN_ENC_BF256ECB:
          blocksize = 8;
          keysize = 32;
          var_key = 1;
-         pctx_enc = &ctx_enc;
-         pctx_dec = &ctx_dec;
+         pctx_enc = ctx_enc;
+         pctx_dec = ctx_dec;
          cipher_type = EVP_bf_ecb();
          strcpy(cipher_name,"Blowfish-256-ECB");
       break;

       case VTUN_ENC_BF128OFB:
@@ -241,26 +241,28 @@
          blocksize = 8;
          keysize = 16;
          var_key = 1;
          sb_init = 1;
          cipher_type = EVP_bf_ecb();
-         pctx_enc = &ctx_enc_ecb;
-         pctx_dec = &ctx_dec_ecb;
+         pctx_enc = ctx_enc_ecb;
+         pctx_dec = ctx_dec_ecb;
       break;
       case VTUN_ENC_BF128ECB: /* blowfish 128 ecb is the default */
       default:
          blocksize = 8;
          keysize = 16;
          var_key = 1;
-         pctx_enc = &ctx_enc;
-         pctx_dec = &ctx_dec;
+         pctx_enc = ctx_enc;
+         pctx_dec = ctx_dec;
          cipher_type = EVP_bf_ecb();
          strcpy(cipher_name,"Blowfish-128-ECB");
       break;
    } /* switch(host->cipher) */

    if (prep_key(&pkey, keysize, host) != 0) return -1;
+   pctx_enc = EVP_CIPHER_CTX_new();
+   pctx_dec = EVP_CIPHER_CTX_new();
    EVP_CIPHER_CTX_init(pctx_enc);
    EVP_CIPHER_CTX_init(pctx_dec);
    EVP_EncryptInit_ex(pctx_enc, cipher_type, NULL, NULL, NULL);
    EVP_DecryptInit_ex(pctx_dec, cipher_type, NULL, NULL, NULL);
    if (var_key)
@@ -292,14 +294,14 @@
    free_key(pkey); pkey = NULL;

    lfd_free(enc_buf); enc_buf = NULL;
    lfd_free(dec_buf); dec_buf = NULL;

-   EVP_CIPHER_CTX_cleanup(&ctx_enc);
-   EVP_CIPHER_CTX_cleanup(&ctx_dec);
-   EVP_CIPHER_CTX_cleanup(&ctx_enc_ecb);
-   EVP_CIPHER_CTX_cleanup(&ctx_dec_ecb);
+   EVP_CIPHER_CTX_free(ctx_enc);
+   EVP_CIPHER_CTX_free(ctx_dec);
+   EVP_CIPHER_CTX_free(ctx_enc_ecb);
+   EVP_CIPHER_CTX_free(ctx_dec_ecb);

    return 0;
 }

 static int encrypt_buf(int len, char *in, char **out)
@@ -321,11 +323,11 @@

    memset(in_ptr+len, pad, pad);
    outlen=len+pad;
    if (pad == blocksize)
       RAND_bytes(in_ptr+len, blocksize-1);
-   EVP_EncryptUpdate(&ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
+   EVP_EncryptUpdate(ctx_enc, out_ptr, &outlen, in_ptr, len+pad);
    *out = enc_buf;

    sequence_num++;

    return outlen+msg_len;
@@ -341,11 +343,11 @@
    in = *out;
    in_ptr = in;

    outlen=len;
    if (!len) return 0;
-   EVP_DecryptUpdate(&ctx_dec, out_ptr, &outlen, in_ptr, len);
+   EVP_DecryptUpdate(ctx_dec, out_ptr, &outlen, in_ptr, len);
    recv_ib_mesg(&outlen, &out_ptr);
    if (!outlen) return 0;
    tmp_ptr = out_ptr + outlen; tmp_ptr--;
    pad = *tmp_ptr;
    if (pad < 1 || pad > blocksize) {
@@ -429,17 +431,18 @@
       /* if we're here, something weird's going on */
          return -1;
       break;
    } /* switch(cipher) */

-   EVP_CIPHER_CTX_init(&ctx_enc);
-   EVP_EncryptInit_ex(&ctx_enc, cipher_type, NULL, NULL, NULL);
+   ctx_enc = EVP_CIPHER_CTX_new();
+   EVP_CIPHER_CTX_init(ctx_enc);
+   EVP_EncryptInit_ex(ctx_enc, cipher_type, NULL, NULL, NULL);
    if (var_key)
-      EVP_CIPHER_CTX_set_key_length(&ctx_enc, keysize);
-   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, pkey, NULL);
-   EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, NULL, iv);
-   EVP_CIPHER_CTX_set_padding(&ctx_enc, 0);
+      EVP_CIPHER_CTX_set_key_length(ctx_enc, keysize);
+   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, pkey, NULL);
+   EVP_EncryptInit_ex(ctx_enc, NULL, NULL, NULL, iv);
+   EVP_CIPHER_CTX_set_padding(ctx_enc, 0);
    if (enc_init_first_time)
    {
       sprintf(tmpstr,"%s encryption initialized", cipher_name);
       vtun_syslog(LOG_INFO, tmpstr);
       enc_init_first_time = 0;
@@ -519,17 +522,18 @@
       /* if we're here, something weird's going on */
          return -1;
       break;
    } /* switch(cipher) */

-   EVP_CIPHER_CTX_init(&ctx_dec);
-   EVP_DecryptInit_ex(&ctx_dec, cipher_type, NULL, NULL, NULL);
+   ctx_dec = EVP_CIPHER_CTX_new();
+   EVP_CIPHER_CTX_init(ctx_dec);
+   EVP_DecryptInit_ex(ctx_dec, cipher_type, NULL, NULL, NULL);
    if (var_key)
-      EVP_CIPHER_CTX_set_key_length(&ctx_dec, keysize);
-   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, pkey, NULL);
-   EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, NULL, iv);
-   EVP_CIPHER_CTX_set_padding(&ctx_dec, 0);
+      EVP_CIPHER_CTX_set_key_length(ctx_dec, keysize);
+   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, pkey, NULL);
+   EVP_DecryptInit_ex(ctx_dec, NULL, NULL, NULL, iv);
+   EVP_CIPHER_CTX_set_padding(ctx_dec, 0);
    if (dec_init_first_time)
    {
       sprintf(tmpstr,"%s decryption initialized", cipher_name);
       vtun_syslog(LOG_INFO, tmpstr);
       dec_init_first_time = 0;
@@ -557,11 +561,11 @@
          memset(iv,0,blocksize); free(iv); iv = NULL;
          RAND_bytes(in_ptr, in - in_ptr);

          in_ptr = in - blocksize*2;
          outlen = blocksize*2;
-         EVP_EncryptUpdate(&ctx_enc_ecb, in_ptr,
+         EVP_EncryptUpdate(ctx_enc_ecb, in_ptr,
             &outlen, in_ptr, blocksize*2);
          *out = in_ptr;
          len = outlen;
          cipher_enc_state = CIPHER_SEQUENCE;
       break;
@@ -584,11 +588,11 @@
    {
       case CIPHER_INIT:
          in_ptr = in;
          iv = malloc(blocksize);
          outlen = blocksize*2;
-         EVP_DecryptUpdate(&ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);
+         EVP_DecryptUpdate(ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2);

          if ( !strncmp(in_ptr, "ivec", 4) )
          {
             memcpy(iv, in_ptr+4, blocksize);
             cipher_dec_init(iv);
@@ -627,11 +631,11 @@
                   "Max. gibberish threshold reached");
 #endif
                if (cipher_enc_state != CIPHER_INIT)
                {
                   cipher_enc_state = CIPHER_INIT;
-                  EVP_CIPHER_CTX_cleanup(&ctx_enc);
+                  EVP_CIPHER_CTX_free(ctx_enc);
 #ifdef LFD_ENCRYPT_DEBUG
                   vtun_syslog(LOG_INFO,
                      "Forcing local encryptor re-init");
 #endif
                }
@@ -708,11 +712,11 @@
          *len -= blocksize;

          if (cipher_enc_state != CIPHER_INIT)
          {
             cipher_enc_state = CIPHER_INIT;
-            EVP_CIPHER_CTX_cleanup(&ctx_enc);
+            EVP_CIPHER_CTX_free(ctx_enc);
          }
 #ifdef LFD_ENCRYPT_DEBUG
          vtun_syslog(LOG_INFO, "Remote requests encryptor re-init");
 #endif
       }
@@ -722,11 +726,11 @@

          if (cipher_dec_state != CIPHER_INIT &&
              cipher_enc_state != CIPHER_REQ_INIT &&
              cipher_enc_state != CIPHER_INIT)
          {
-            EVP_CIPHER_CTX_cleanup (&ctx_dec);
+            EVP_CIPHER_CTX_free (ctx_dec);
             cipher_dec_state = CIPHER_INIT;
             cipher_enc_state = CIPHER_REQ_INIT;
          }
 #ifdef LFD_ENCRYPT_DEBUG
          vtun_syslog(LOG_INFO, "Local decryptor out of sync");

{'repo_name': 'ccrisan/thingos', 'stars': '116', 'repo_language': 'Makefile', 'file_name': 'linux-ext-aufs.mk', 'mime_type': 'text/plain', 'hash': -3791481820497530713, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 0f12840f38c3ed74cb4b258bb1a158a0
TextScriptImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'jarjin/FinalFramework', 'stars': '359', 'repo_language': 'C#', 'file_name': 'addressbook.proto', 'mime_type': 'text/plain', 'hash': 1913950188925602168, 'source_dataset': 'data'}


# Bad manifest. Invalid Url
Id: microsoft.msixsdk
Name: MSIX SDK
Version: 1.7.32
Publisher: Microsoft
InstallerType: Zip
License: Test
Installers:
  - Arch: x86
    Url: NotAUrl
    Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD
ManifestVersion: 0.1.0

{'repo_name': 'microsoft/winget-cli', 'stars': '7550', 'repo_language': 'C++', 'file_name': 'spec-template.md', 'mime_type': 'text/plain', 'hash': -8980853705503171930, 'source_dataset': 'data'}


<!--
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
-->
<Page
    x:Class="BluetoothAdvertisement.Scenario1_Watcher"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SDKTemplate"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid x:Name="RootGrid" Margin="12,20,12,12">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Margin="0,0,0,10">
                <TextBlock Style="{StaticResource ScenarioDescriptionTextStyle}" TextWrapping="Wrap">
                    Scanning for a particular LE advertisement containing a matching manufacturer data section and
                    above a certain RSSI threshold. This scenario requires Scenario 2 or 4 to run on another Windows platform
                    in close proximity of this one. Press Run button to begin scanning. Received advertisements are shown below.
                </TextBlock>
            </StackPanel>

            <ScrollViewer Grid.Row="1" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto">
                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Button x:Name="RunButton" Grid.Row="0" Grid.Column="0" Content="Run" Margin="5,10,10,0" Click="RunButton_Click"/>
                        <Button x:Name="StopButton" Grid.Row="0" Grid.Column="1" Content="Stop" Margin="5,10,10,0" Click="StopButton_Click"/>
                        <ListBox
                            x:Name="ReceivedAdvertisementListBox"
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Top"
                            Height="300"
                            Margin="0,10,0,0"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.HorizontalScrollMode="Auto"/>
                    </Grid>
                </StackPanel>
            </ScrollViewer>

            <!-- Status Block for providing messages to the user.  Use the
             NotifyUser() method to populate the message -->
            <Border x:Name="ErrorBorder" Background="Red" Grid.Row="2"/>
            <TextBlock x:Name="StatusBlock" Grid.Row="2" Margin="12, 10, 12, 10" Visibility="Collapsed"/>
        </Grid>
    </Grid>
</Page>

{'repo_name': 'microsoft/Windows-universal-samples', 'stars': '7694', 'repo_language': 'JavaScript', 'file_name': 'scenario1_DataEvents.js', 'mime_type': 'text/plain', 'hash': -2968678927482680516, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:background="@drawable/ic_launcher_background_red"
                app:layout_collapseMode="parallax" />

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                app:layout_collapseMode="pin"
                app:title="测试嵌套联动" />

        </com.google.android.material.appbar.CollapsingToolbarLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nsv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <cn.mtjsoft.www.gridviewpager_recycleview.GridViewPager
                android:id="@+id/gridviewpager2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:background_color="@color/colorPrimary"
                app:column_count="4"
                app:img_height="50dp"
                app:img_width="50dp"
                app:imgtext_margin="5dp"
                app:pager_MarginBottom="0dp"
                app:pager_MarginTop="10dp"
                app:point_height="2dp"
                app:point_is_circle="false"
                app:point_is_show="true"
                app:point_margin="2dp"
                app:point_margin_bottom="10dp"
                app:point_margin_page="10dp"
                app:point_normal_color="@color/white"
                app:point_select_color="#f00"
                app:point_width="15dp"
                app:row_count="3"
                app:text_color="@color/white"
                app:text_size="12sp"
                app:verticalSpacing="10dp" />

            <androidx.viewpager2.widget.ViewPager2
                android:id="@+id/viewPager"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:layout_marginTop="@dimen/dp_10"
                android:layout_marginBottom="@dimen/dp_10"
                android:background="@color/white" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:layout_marginBottom="1dp"
                android:background="@color/white"
                android:padding="10dp"
                android:text="@string/app_name"
                android:textColor="#000"
                android:textSize="20sp" />
        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

{'repo_name': 'mtjsoft/GridPager', 'stars': '195', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/html', 'hash': 7942154664527796991, 'source_dataset': 'data'}


cmake_minimum_required(VERSION 3.0)

set(libBasename JKQTFastPlotter)
set(libIncludeSubdir jkqtfastplotter)

if(JKQtPlotter_BUILD_SHARED_LIBS)
    set(libsh_name ${libBasename}SharedLib)
    set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
    set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated}  CACHE STRING "name of static library for ${libBasename}" FORCE)
    message( STATUS "-- Building ${libsh_name}" )
endif(JKQtPlotter_BUILD_SHARED_LIBS)

if(JKQtPlotter_BUILD_STATIC_LIBS)
    set(lib_name ${libBasename}Lib)
    set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
    set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated}  CACHE STRING "name of static library for ${libBasename}" FORCE)
    message( STATUS "-- Building ${lib_name}" )
endif(JKQtPlotter_BUILD_STATIC_LIBS)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# Set up source files
set(SOURCES
  jkqtfastplotter.cpp
)

set(HEADERS
  jkqtfastplotter.h
  jkqtfastplotter_imexport.h
)

include(CMakePackageConfigHelpers)

if(JKQtPlotter_BUILD_SHARED_LIBS)
    add_library(${libsh_name} SHARED  ${SOURCES} ${HEADERS} ${RESOURCES})
    set_property(TARGET ${libsh_name} PROPERTY VERSION "${PROJECT_VERSION}")
    set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME  "${libsh_name_decorated}")
    target_link_libraries(${libsh_name} PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonSharedLib)
    target_compile_definitions(${libsh_name} PUBLIC JKQTFASTPLOTTER_LIB_IN_DLL)
    set_property(TARGET ${libsh_name} PROPERTY CXX_STANDARD 11)
    set_property(TARGET ${libsh_name} PROPERTY CXX_STANDARD_REQUIRED TRUE)
    target_compile_features(${libsh_name} PUBLIC cxx_std_11)
    if(MINGW)
      # COMPILER-SETTINGS FOR MINGW
      target_compile_options(${libsh_name} PUBLIC -fexceptions)
    elseif(MSVC)
      # COMPILER-SETTINGS FOR MS VISUAL C++
      target_compile_options(${libsh_name} PUBLIC /EHsc)
      target_compile_definitions(${libsh_name} PUBLIC NOMINMAX)
    endif()
    target_compile_definitions(${libsh_name} PRIVATE JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY)
	target_include_directories(${libsh_name} PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
    )
    set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
    write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
                                     VERSION ${PROJECT_VERSION}
                                     COMPATIBILITY AnyNewerVersion )
endif()

if(JKQtPlotter_BUILD_STATIC_LIBS)
    add_library(${lib_name} STATIC  ${SOURCES} ${HEADERS} ${RESOURCES})
    set_property(TARGET ${lib_name} PROPERTY VERSION "${PROJECT_VERSION}")
    set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME  "${lib_name_decorated}")
    set_property(TARGET ${lib_name} PROPERTY CXX_STANDARD 11)
    set_property(TARGET ${lib_name} PROPERTY CXX_STANDARD_REQUIRED TRUE)
    if(MINGW)
      # COMPILER-SETTINGS FOR MINGW
      target_compile_options(${lib_name} PUBLIC -fexceptions)
    elseif(MSVC)
      # COMPILER-SETTINGS FOR MS VISUAL C++
      target_compile_options(${lib_name} PUBLIC /EHsc)
      target_compile_definitions(${lib_name} PUBLIC NOMINMAX)
    endif()
    target_compile_features(${lib_name} PUBLIC cxx_std_11)
    target_link_libraries(${lib_name} PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonLib)
	target_include_directories(${lib_name} PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
    )
    write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
                                     VERSION ${PROJECT_VERSION}
                                     COMPATIBILITY AnyNewerVersion )
endif()

# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
    install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
            LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
            INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
    )
    set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
    set(JKQTP_CURRENT_TARGET_SHAREDPART "Shared")
    configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
    install(EXPORT ${libsh_name}_TARGETS
        FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
        DESTINATION lib/cmake
    )

    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
                    DESTINATION lib/cmake  )
    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
                                DESTINATION lib/cmake  )
endif(JKQtPlotter_BUILD_SHARED_LIBS)

if(JKQtPlotter_BUILD_STATIC_LIBS)
    install(TARGETS ${lib_name} EXPORT ${lib_name}_TARGETS
            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
            LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
            INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
    )
    set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
    set(JKQTP_CURRENT_TARGET_SHAREDPART "")
    configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
    install(EXPORT ${lib_name}_TARGETS
        FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
        DESTINATION lib/cmake
    )

    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
                    DESTINATION lib/cmake  )
    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
                                DESTINATION lib/cmake  )
endif(JKQtPlotter_BUILD_STATIC_LIBS)

install(FILES ${HEADERS}
		DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
		COMPONENT Headers)

configure_file(${CMAKE_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt" DESTINATION doc/JKQtPlotter )
install(FILES "${CMAKE_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${lib_name}_LICENSE.txt" )

{'repo_name': 'jkriege2/JKQtPlotter', 'stars': '154', 'repo_language': 'C++', 'file_name': 'jkqtplotter_dumpallvariables.cmake', 'mime_type': 'text/plain', 'hash': -7969299573846219245, 'source_dataset': 'data'}


<component name="libraryTable">
  <library name="Dart Packages" type="DartPackagesLibraryType">
    <properties>
      <option name="packageNameToDirsMap">
        <entry key="analyzer">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="args">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
            </list>
          </value>
        </entry>
        <entry key="async">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
            </list>
          </value>
        </entry>
        <entry key="boolean_selector">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="charcode">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="collection">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
            </list>
          </value>
        </entry>
        <entry key="convert">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="crypto">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
            </list>
          </value>
        </entry>
        <entry key="csslib">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib" />
            </list>
          </value>
        </entry>
        <entry key="cupertino_icons">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="flutter">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/packages/flutter/lib" />
            </list>
          </value>
        </entry>
        <entry key="flutter_test">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/packages/flutter_test/lib" />
            </list>
          </value>
        </entry>
        <entry key="front_end">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="glob">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
            </list>
          </value>
        </entry>
        <entry key="html">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
            </list>
          </value>
        </entry>
        <entry key="http">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
            </list>
          </value>
        </entry>
        <entry key="http_multi_server">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
            </list>
          </value>
        </entry>
        <entry key="http_parser">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
            </list>
          </value>
        </entry>
        <entry key="io">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
            </list>
          </value>
        </entry>
        <entry key="js">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
            </list>
          </value>
        </entry>
        <entry key="json_rpc_2">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
            </list>
          </value>
        </entry>
        <entry key="kernel">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="logging">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
            </list>
          </value>
        </entry>
        <entry key="matcher">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
            </list>
          </value>
        </entry>
        <entry key="meta">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
            </list>
          </value>
        </entry>
        <entry key="mime">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
            </list>
          </value>
        </entry>
        <entry key="multi_server_socket">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="node_preamble">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="package_config">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
            </list>
          </value>
        </entry>
        <entry key="package_resolver">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="path">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="plugin">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
            </list>
          </value>
        </entry>
        <entry key="pool">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
            </list>
          </value>
        </entry>
        <entry key="pub_semver">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
            </list>
          </value>
        </entry>
        <entry key="quiver">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib" />
            </list>
          </value>
        </entry>
        <entry key="shelf">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
            </list>
          </value>
        </entry>
        <entry key="shelf_packages_handler">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="shelf_static">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
            </list>
          </value>
        </entry>
        <entry key="shelf_web_socket">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
            </list>
          </value>
        </entry>
        <entry key="sky_engine">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/bin/cache/pkg/sky_engine/lib" />
            </list>
          </value>
        </entry>
        <entry key="source_map_stack_trace">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
            </list>
          </value>
        </entry>
        <entry key="source_maps">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
            </list>
          </value>
        </entry>
        <entry key="source_span">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
            </list>
          </value>
        </entry>
        <entry key="stack_trace">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
            </list>
          </value>
        </entry>
        <entry key="stream_channel">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
            </list>
          </value>
        </entry>
        <entry key="string_scanner">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
            </list>
          </value>
        </entry>
        <entry key="term_glyph">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
            </list>
          </value>
        </entry>
        <entry key="test">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
            </list>
          </value>
        </entry>
        <entry key="typed_data">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
            </list>
          </value>
        </entry>
        <entry key="utf">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
            </list>
          </value>
        </entry>
        <entry key="vector_math">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib" />
            </list>
          </value>
        </entry>
        <entry key="vm_service_client">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
            </list>
          </value>
        </entry>
        <entry key="watcher">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
            </list>
          </value>
        </entry>
        <entry key="web_socket_channel">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
            </list>
          </value>
        </entry>
        <entry key="yaml">
          <value>
            <list>
              <option value="$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
            </list>
          </value>
        </entry>
      </option>
    </properties>
    <CLASSES>
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/bin/cache/pkg/sky_engine/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/packages/flutter/lib" />
      <root url="file://$USER_HOME$/HOME/src/flutter/packages/flutter_test/lib" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>

{'repo_name': 'OpenFlutter/Flutter-Notebook', 'stars': '5845', 'repo_language': 'Dart', 'file_name': 'Project.xml', 'mime_type': 'text/plain', 'hash': -6730831390292634999, 'source_dataset': 'data'}


// Copyright (c) 2018 The Khronos Group Inc.
// Copyright (c) 2018 Valve Corporation
// Copyright (c) 2018 LunarG Inc.
//
// 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.

#ifndef INCLUDE_SPIRV_TOOLS_INSTRUMENT_HPP_
#define INCLUDE_SPIRV_TOOLS_INSTRUMENT_HPP_

// Shader Instrumentation Interface
//
// This file provides an external interface for applications that wish to
// communicate with shaders instrumented by passes created by:
//
//   CreateInstBindlessCheckPass
//   CreateInstBuffAddrCheckPass
//
// More detailed documentation of these routines can be found in optimizer.hpp

namespace spvtools {

// Stream Output Buffer Offsets
//
// The following values provide offsets into the output buffer struct
// generated by InstrumentPass::GenDebugStreamWrite. This method is utilized
// by InstBindlessCheckPass.
//
// The first member of the debug output buffer contains the next available word
// in the data stream to be written. Shaders will atomically read and update
// this value so as not to overwrite each others records. This value must be
// initialized to zero
static const int kDebugOutputSizeOffset = 0;

// The second member of the output buffer is the start of the stream of records
// written by the instrumented shaders. Each record represents a validation
// error. The format of the records is documented below.
static const int kDebugOutputDataOffset = 1;

// Common Stream Record Offsets
//
// The following are offsets to fields which are common to all records written
// to the output stream.
//
// Each record first contains the size of the record in 32-bit words, including
// the size word.
static const int kInstCommonOutSize = 0;

// This is the shader id passed by the layer when the instrumentation pass is
// created.
static const int kInstCommonOutShaderId = 1;

// This is the ordinal position of the instruction within the SPIR-V shader
// which generated the validation error.
static const int kInstCommonOutInstructionIdx = 2;

// This is the stage which generated the validation error. This word is used
// to determine the contents of the next two words in the record.
// 0:Vert, 1:TessCtrl, 2:TessEval, 3:Geom, 4:Frag, 5:Compute
static const int kInstCommonOutStageIdx = 3;
static const int kInstCommonOutCnt = 4;

// Stage-specific Stream Record Offsets
//
// Each stage will contain different values in the next set of words of the
// record used to identify which instantiation of the shader generated the
// validation error.
//
// Vertex Shader Output Record Offsets
static const int kInstVertOutVertexIndex = kInstCommonOutCnt;
static const int kInstVertOutInstanceIndex = kInstCommonOutCnt + 1;
static const int kInstVertOutUnused = kInstCommonOutCnt + 2;

// Frag Shader Output Record Offsets
static const int kInstFragOutFragCoordX = kInstCommonOutCnt;
static const int kInstFragOutFragCoordY = kInstCommonOutCnt + 1;
static const int kInstFragOutUnused = kInstCommonOutCnt + 2;

// Compute Shader Output Record Offsets
static const int kInstCompOutGlobalInvocationIdX = kInstCommonOutCnt;
static const int kInstCompOutGlobalInvocationIdY = kInstCommonOutCnt + 1;
static const int kInstCompOutGlobalInvocationIdZ = kInstCommonOutCnt + 2;

// Tessellation Control Shader Output Record Offsets
static const int kInstTessCtlOutInvocationId = kInstCommonOutCnt;
static const int kInstTessCtlOutPrimitiveId = kInstCommonOutCnt + 1;
static const int kInstTessCtlOutUnused = kInstCommonOutCnt + 2;

// Tessellation Eval Shader Output Record Offsets
static const int kInstTessEvalOutPrimitiveId = kInstCommonOutCnt;
static const int kInstTessEvalOutTessCoordU = kInstCommonOutCnt + 1;
static const int kInstTessEvalOutTessCoordV = kInstCommonOutCnt + 2;

// Geometry Shader Output Record Offsets
static const int kInstGeomOutPrimitiveId = kInstCommonOutCnt;
static const int kInstGeomOutInvocationId = kInstCommonOutCnt + 1;
static const int kInstGeomOutUnused = kInstCommonOutCnt + 2;

// Ray Tracing Shader Output Record Offsets
static const int kInstRayTracingOutLaunchIdX = kInstCommonOutCnt;
static const int kInstRayTracingOutLaunchIdY = kInstCommonOutCnt + 1;
static const int kInstRayTracingOutLaunchIdZ = kInstCommonOutCnt + 2;

// Mesh Shader Output Record Offsets
static const int kInstMeshOutGlobalInvocationIdX = kInstCommonOutCnt;
static const int kInstMeshOutGlobalInvocationIdY = kInstCommonOutCnt + 1;
static const int kInstMeshOutGlobalInvocationIdZ = kInstCommonOutCnt + 2;

// Task Shader Output Record Offsets
static const int kInstTaskOutGlobalInvocationIdX = kInstCommonOutCnt;
static const int kInstTaskOutGlobalInvocationIdY = kInstCommonOutCnt + 1;
static const int kInstTaskOutGlobalInvocationIdZ = kInstCommonOutCnt + 2;

// Size of Common and Stage-specific Members
static const int kInstStageOutCnt = kInstCommonOutCnt + 3;

// Validation Error Code Offset
//
// This identifies the validation error. It also helps to identify
// how many words follow in the record and their meaning.
static const int kInstValidationOutError = kInstStageOutCnt;

// Validation-specific Output Record Offsets
//
// Each different validation will generate a potentially different
// number of words at the end of the record giving more specifics
// about the validation error.
//
// A bindless bounds error will output the index and the bound.
static const int kInstBindlessBoundsOutDescIndex = kInstStageOutCnt + 1;
static const int kInstBindlessBoundsOutDescBound = kInstStageOutCnt + 2;
static const int kInstBindlessBoundsOutCnt = kInstStageOutCnt + 3;

// A bindless uninitialized error will output the index.
static const int kInstBindlessUninitOutDescIndex = kInstStageOutCnt + 1;
static const int kInstBindlessUninitOutUnused = kInstStageOutCnt + 2;
static const int kInstBindlessUninitOutCnt = kInstStageOutCnt + 3;

// A buffer address unalloc error will output the 64-bit pointer in
// two 32-bit pieces, lower bits first.
static const int kInstBuffAddrUnallocOutDescPtrLo = kInstStageOutCnt + 1;
static const int kInstBuffAddrUnallocOutDescPtrHi = kInstStageOutCnt + 2;
static const int kInstBuffAddrUnallocOutCnt = kInstStageOutCnt + 3;

// Maximum Output Record Member Count
static const int kInstMaxOutCnt = kInstStageOutCnt + 3;

// Validation Error Codes
//
// These are the possible validation error codes.
static const int kInstErrorBindlessBounds = 0;
static const int kInstErrorBindlessUninit = 1;
static const int kInstErrorBuffAddrUnallocRef = 2;

// Direct Input Buffer Offsets
//
// The following values provide member offsets into the input buffers
// consumed by InstrumentPass::GenDebugDirectRead(). This method is utilized
// by InstBindlessCheckPass.
//
// The only object in an input buffer is a runtime array of unsigned
// integers. Each validation will have its own formatting of this array.
static const int kDebugInputDataOffset = 0;

// Debug Buffer Bindings
//
// These are the bindings for the different buffers which are
// read or written by the instrumentation passes.
//
// This is the output buffer written by InstBindlessCheckPass,
// InstBuffAddrCheckPass, and possibly other future validations.
static const int kDebugOutputBindingStream = 0;

// The binding for the input buffer read by InstBindlessCheckPass.
static const int kDebugInputBindingBindless = 1;

// The binding for the input buffer read by InstBuffAddrCheckPass.
static const int kDebugInputBindingBuffAddr = 2;

// This is the output buffer written by InstDebugPrintfPass.
static const int kDebugOutputPrintfStream = 3;

// Bindless Validation Input Buffer Format
//
// An input buffer for bindless validation consists of a single array of
// unsigned integers we will call Data[]. This array is formatted as follows.
//
// At offset kDebugInputBindlessInitOffset in Data[] is a single uint which
// gives an offset to the start of the bindless initialization data. More
// specifically, if the following value is zero, we know that the descriptor at
// (set = s, binding = b, index = i) is not initialized:
// Data[ i + Data[ b + Data[ s + Data[ kDebugInputBindlessInitOffset ] ] ] ]
static const int kDebugInputBindlessInitOffset = 0;

// At offset kDebugInputBindlessOffsetLengths is some number of uints which
// provide the bindless length data. More specifically, the number of
// descriptors at (set=s, binding=b) is:
// Data[ Data[ s + kDebugInputBindlessOffsetLengths ] + b ]
static const int kDebugInputBindlessOffsetLengths = 1;

// Buffer Device Address Input Buffer Format
//
// An input buffer for buffer device address validation consists of a single
// array of unsigned 64-bit integers we will call Data[]. This array is
// formatted as follows:
//
// At offset kDebugInputBuffAddrPtrOffset is a list of sorted valid buffer
// addresses. The list is terminated with the address 0xffffffffffffffff.
// If 0x0 is not a valid buffer address, this address is inserted at the
// start of the list.
//
static const int kDebugInputBuffAddrPtrOffset = 1;
//
// At offset kDebugInputBuffAddrLengthOffset in Data[] is a single uint64 which
// gives an offset to the start of the buffer length data. More
// specifically, for a buffer whose pointer is located at input buffer offset
// i, the length is located at:
//
// Data[ i - kDebugInputBuffAddrPtrOffset
//         + Data[ kDebugInputBuffAddrLengthOffset ] ]
//
// The length associated with the 0xffffffffffffffff address is zero. If
// not a valid buffer, the length associated with the 0x0 address is zero.
static const int kDebugInputBuffAddrLengthOffset = 0;

}  // namespace spvtools

#endif  // INCLUDE_SPIRV_TOOLS_INSTRUMENT_HPP_

{'repo_name': 'dbartolini/crown', 'stars': '1197', 'repo_language': 'C', 'file_name': 'nfd.h', 'mime_type': 'text/x-c', 'hash': -3867337644565687585, 'source_dataset': 'data'}


/*******************************************************************************
 * Copyright 2017 Capital One Services, LLC and Bitwise, Inc.
 *  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 hydrograph.engine.spark.components

import hydrograph.engine.core.component.entity.RunFileTransferEntity
import hydrograph.engine.core.component.entity.base.AssemblyEntityBase
import java.io.Serializable

import hydrograph.engine.spark.components.base.CommandComponentSparkFlow
import hydrograph.engine.spark.datasource.utils.SFTPUtil
import org.apache.log4j.Logger
import org.slf4j.LoggerFactory

/**
  * Created for  SFTPComponent on 9/27/2017.
  */
class SFTPComponent (assemblyEntityBase: AssemblyEntityBase) extends CommandComponentSparkFlow with Serializable {
  val log = LoggerFactory.getLogger(classOf[SFTPComponent])
  var runFileTransferEntity: RunFileTransferEntity = assemblyEntityBase.asInstanceOf[RunFileTransferEntity]
  override def execute() = {
    log.debug("Start executing SFTPComponent")
    val sftpUtil:SFTPUtil = new SFTPUtil()
    if (runFileTransferEntity.getFileOperation().equals("upload")) {
      sftpUtil.upload(runFileTransferEntity)
    } else {
      sftpUtil.download(runFileTransferEntity)
    }
    log.debug("Finished executing SFTPComponent")

  }
}

{'repo_name': 'BitwiseInc/Hydrograph', 'stars': '139', 'repo_language': 'Java', 'file_name': 'MANIFEST.MF', 'mime_type': 'text/plain', 'hash': 2428585984655742649, 'source_dataset': 'data'}


package edu.cs.scu.dao.factory;

import edu.cs.scu.dao.*;
import edu.cs.scu.dao.impl.*;

/**
 * Created by Wang Han on 2017/6/24 19:57.
 * E-mail address is wanghan0501@vip.qq.com.
 * Copyright © 2017 Wang Han. SCU. All Rights Reserved.
 */
public class DaoFactory {

    public static PropertyDao getPropertyDao() {
        return new PropertyDaoImpl();
    }

    public static ShopDao getShopDao() {
        return new ShopDaoImpl();
    }

    public static TaskDao getTaskDao() {
        return new TaskDaoImpl();
    }

    public static UserDaoImpl getUserDao() {
        return new UserDaoImpl();
    }

    public static UserVisitDaoImpl getUserVisitDao() {
        return new UserVisitDaoImpl();
    }

    public static UserVisitTimeDaoImpl getUserVisitTimeDao() {
        return new UserVisitTimeDaoImpl();
    }

    public static VendorMacDao getVendorMacDao() {
        return new VendorMacDaoImpl();
    }
}

{'repo_name': 'wanghan0501/WiFiProbeAnalysis', 'stars': '195', 'repo_language': 'Java', 'file_name': 'store.jsx', 'mime_type': 'text/x-java', 'hash': 6547502727358049259, 'source_dataset': 'data'}