text:
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.restriction;

import com.intellij.codeInspection.dataFlow.JavaMethodContractUtil;
import com.intellij.psi.*;
import com.intellij.psi.util.PropertyUtilBase;
import com.intellij.psi.util.PsiUtil;
import com.intellij.util.ObjectUtils;
import com.intellij.util.containers.ContainerUtil;
import com.siyeh.ig.psiutils.TypeUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.uast.*;
import org.jetbrains.uast.util.UastExpressionUtils;

public class StringFlowUtil {

  /**
   * Extracts return value without qualifier from getter-like method.
   */
  @Nullable
  public static UExpression getReturnValue(@NotNull UCallExpression call) {
    PsiMethod psiMethod = call.resolve();
    UExpression returnValue = UastContextKt.toUElement(PropertyUtilBase.getGetterReturnExpression(psiMethod), UExpression.class);
    if (returnValue instanceof UQualifiedReferenceExpression) {
      returnValue = ((UQualifiedReferenceExpression)returnValue).getSelector();
    }
    return returnValue;
  }

  /**
   * Traverses tree up starting from expression while current expression result may depend on starting expression result.
   *
   * @param expression starting expression
   * @param allowStringTransformation true if transformations like concatenation are allowed
   * @param factory restriction info factory. used to check if we can go up through some method calls
   *               (e.g. if this method return value is marked with some restriction or not)
   * @return last expression that we can go through
   */
  public static @NotNull UExpression goUp(@NotNull UExpression expression,
                                          boolean allowStringTransformation,
                                          @NotNull RestrictionInfoFactory<?> factory) {
    UExpression parent = expression;
    while (true) {
      UElement parentElement = parent.getUastParent();
      if (parentElement instanceof ULocalVariable && parentElement.getUastParent() instanceof UDeclarationsExpression) {
        // Kotlin has strange hierarchy for elvis operator
        UExpressionList elvis = ObjectUtils.tryCast(parentElement.getUastParent().getUastParent(), UExpressionList.class);
        if (elvis != null) {
          parentElement = elvis;
        }
      }
      if (parentElement instanceof UExpressionList) {
        UExpression lastExpression = ContainerUtil.getLastItem(((UExpressionList)parentElement).getExpressions());
        if (lastExpression != null && AnnotationContext.expressionsAreEquivalent(parent, lastExpression)) {
          // Result of expression list is the last expression in the list in Kotlin
          parentElement = parentElement.getUastParent();
        }
      }
      UExpression next = ObjectUtils.tryCast(parentElement, UExpression.class);
      if (next == null || next instanceof UNamedExpression) return parent;
      if (next instanceof USwitchClauseExpression) {
        if (((USwitchClauseExpression)next).getCaseValues().contains(AnnotationContext.normalize(parent))) return parent;
        UExpressionList switchBody = ObjectUtils.tryCast(next.getUastParent(), UExpressionList.class);
        if (switchBody == null) return parent;
        USwitchExpression switchExpression = ObjectUtils.tryCast(switchBody.getUastParent(), USwitchExpression.class);
        if (switchExpression == null) return parent;
        next = switchExpression;
      }
      ULambdaExpression lambda = ObjectUtils.tryCast(next, ULambdaExpression.class);
      if (next instanceof UReturnExpression) {
        lambda = ObjectUtils.tryCast(((UReturnExpression)next).getJumpTarget(), ULambdaExpression.class);
        if (lambda == null) return parent;
      }
      if (lambda != null) {
        UCallExpression uastParent = ObjectUtils.tryCast(lambda.getUastParent(), UCallExpression.class);
        if (uastParent == null) return parent;
        PsiMethod method = uastParent.resolve();
        if (method == null || !isPassthroughMethod(method, uastParent, lambda, factory)) return parent;
        next = uastParent;
      }
      if (next instanceof UQualifiedReferenceExpression && !TypeUtils.isJavaLangString(next.getExpressionType())
          && !TypeUtils.typeEquals(CommonClassNames.JAVA_LANG_CHAR_SEQUENCE, next.getExpressionType())) {
        return parent;
      }
      if (next instanceof UPolyadicExpression &&
          (!allowStringTransformation || ((UPolyadicExpression)next).getOperator() != UastBinaryOperator.PLUS)) {
        return parent;
      }
      if (next instanceof UCallExpression) {
        if (!UastExpressionUtils.isArrayInitializer(next) && !UastExpressionUtils.isNewArrayWithInitializer(next)) {
          PsiMethod method = ((UCallExpression)next).resolve();
          boolean shouldGoThroughCall =
            TypeUtils.isJavaLangString(next.getExpressionType()) &&
            (allowStringTransformation && isStringProcessingMethod(method, factory) ||
             isPassthroughMethod(method, (UCallExpression)next, parent, factory));
          if (!shouldGoThroughCall) return parent;
        }
      }
      if (next instanceof UIfExpression && AnnotationContext.expressionsAreEquivalent(parent, ((UIfExpression)next).getCondition())) {
        return parent;
      }
      if (next instanceof USwitchExpression) {
        final UExpression condExpression = ((USwitchExpression)next).getExpression();
        if (condExpression != null && AnnotationContext.expressionsAreEquivalent(parent, condExpression)) {
          return parent;
        }
      }
      parent = next;
    }
  }

  /**
   * Checks if the method is detected to be a string-processing method. A string processing method is a method that:
   *

   *
Pure (either explicitly marked or inferred)

   *
Accepts parameters

   *
No parameters are marked with restriction info

   *
Return value is not marked with restriction info

   *

   *
   * @param method method to check
   * @return true if method is detected to be a string-processing method
   */
  public static boolean isStringProcessingMethod(@Nullable PsiMethod method,
                                                 @NotNull RestrictionInfoFactory<?> factory) {
    if (method == null) return false;
    if (factory.fromModifierListOwner(method).getKind() == RestrictionInfo.RestrictionInfoKind.KNOWN) return false;
    if (!JavaMethodContractUtil.isPure(method)) return false;
    PsiParameter[] parameters = method.getParameterList().getParameters();
    if (parameters.length == 0) return false;
    for (PsiParameter parameter : parameters) {
      if (factory.fromModifierListOwner(parameter).getKind() == RestrictionInfo.RestrictionInfoKind.KNOWN) return false;
    }
    return true;
  }

  /**
   * Checks if method is passthrough.
   *

   * Method is passthrough if:
   *

   *
it doesn't have a type parameter with extends list as return type and it is kotlin passthrough method {@see StringFlowUtil.isKotlinPassthroughMethod}

   *
it has parameter bounded to arg and this parameter type can be resolved to non-parameterized type

   *
there's no method call or argument and one of method parameters can be resolved to non-parameterized type

   *

   *
   * @param method  method to check
   * @param call    this method call
   * @param arg     argument which is passed
   * @param factory restriction factory to check if there's any restrictions related to method
   */
  public static boolean isPassthroughMethod(@Nullable PsiMethod method,
                                            @Nullable UCallExpression call,
                                            @Nullable UExpression arg,
                                            @NotNull RestrictionInfoFactory<?> factory) {
    if (method == null) return false;
    PsiType type = method.getReturnType();
    PsiTypeParameter typeParameter = ObjectUtils.tryCast(PsiUtil.resolveClassInClassTypeOnly(type), PsiTypeParameter.class);
    if (typeParameter != null && typeParameter.getExtendsList().getReferencedTypes().length == 0) {
      PsiParameter[] parameters;
      if (arg == null || call == null) {
        parameters = method.getParameterList().getParameters();
      }
      else {
        PsiParameter parameter = AnnotationContext.getParameter(method, call, arg);
        if (parameter == null) return false;
        PsiType parameterType = parameter.getType();
        PsiElement psi = call.getSourcePsi();
        if (psi instanceof PsiMethodCallExpression) {
          PsiSubstitutor substitutor = ((PsiMethodCallExpression)psi).getMethodExpression().advancedResolve(false).getSubstitutor();
          parameterType = substitutor.substitute(parameterType);
        }
        RestrictionInfo info = factory.fromAnnotationOwner(parameterType);
        if (info.getKind() != RestrictionInfo.RestrictionInfoKind.UNKNOWN) {
          return false;
        }
        parameters = new PsiParameter[]{parameter};
      }
      for (PsiParameter parameter : parameters) {
        PsiType parameterType = parameter.getType();
        if (type.equals(GenericsUtil.getVariableTypeByExpressionType(parameterType))) return true;
        PsiType returnType = GenericsUtil.getVariableTypeByExpressionType(LambdaUtil.getFunctionalInterfaceReturnType(parameterType));
        if (type.equals(returnType)) return true;
      }
    }
    return isKotlinPassthroughMethod(method);
  }

  /**
   * Checks if method is kotlin passthrough.
   *

   * Method is kotlin passthrough if:
   *

   *
it is let or run inline call

   *
it is joinToString method call

   *
it is any static method without parameters from StringsKt__Strings

   *

   */
  private static boolean isKotlinPassthroughMethod(PsiMethod method) {
    if ((method.getName().equals("let") || method.getName().equals("run")) &&
        method.getModifierList().textMatches("public inline")) {
      PsiParameter[] parameters = method.getParameterList().getParameters();
      if (parameters.length == 2 && isReceiver(method, parameters[0]) && parameters[1].getName().equals("block")) {
        return true;
      }
    }
    if (method.getName().equals("joinToString")) {
      PsiClass aClass = method.getContainingClass();
      return aClass != null && "kotlin.collections.CollectionsKt___CollectionsKt".equals(aClass.getQualifiedName());
    }
    if (method.hasModifierProperty(PsiModifier.STATIC)) {
      PsiParameter parameter = method.getParameterList().getParameter(0);
      if (parameter != null && isReceiver(method, parameter)) {
        PsiClass aClass = method.getContainingClass();
        return aClass != null &&
               aClass.getQualifiedName() != null &&
               aClass.getQualifiedName().startsWith("kotlin.text.StringsKt__Strings");
      }
    }
    return false;
  }

  private static boolean isReceiver(PsiMethod method, PsiParameter param) {
    return param.getName().equals("$receiver") || param.getName().equals("$this$" + method.getName());
  }
}


text:
package org.hillview.test.dataset;

import org.hillview.dataset.LocalDataSet;
import org.hillview.sketches.BasicColStatSketch;
import org.hillview.sketches.HistogramSketch;
import org.hillview.sketches.results.BasicColStats;
import org.hillview.sketches.results.DoubleHistogramBuckets;
import org.hillview.sketches.results.HLogLog;
import org.hillview.sketches.results.IHistogramBuckets;
import org.hillview.table.SmallTable;
import org.hillview.table.api.ITable;
import org.hillview.test.BaseTest;
import org.hillview.test.TestUtil;
import org.hillview.utils.JsonList;
import org.hillview.utils.Pair;
import org.junit.Assert;
import org.junit.Test;

import static org.hillview.utils.TestTables.getIntTable;

/**
 * Test class for performance profiling of histograms
 */
public class HistPerfTest extends BaseTest {
    private final BasicColStats colStat;
    private final LocalDataSet<ITable> dataSet;
    private final String colName;

    public HistPerfTest() {
        final int bigSize = 30000000;
        final int numCols = 1;
        final SmallTable bigTable = getIntTable(bigSize, numCols);
        this.colName = bigTable.getSchema().getColumnNames().get(0);
        this.dataSet = new LocalDataSet<ITable>(bigTable);
        JsonList<Pair<BasicColStats, HLogLog>> r = this.dataSet.blockingSketch(
                new BasicColStatSketch(this.colName, 0, 0));
        Assert.assertNotNull(r);
        this.colStat = r.get(0).first;
    }

    /*
    private void prepareHist(int width, int height, int barWidth, boolean useSampling) {
        int bucketNum = width / barWidth;
        IHistogramBuckets bDec  =
                new DoubleHistogramBuckets(this.colName, this.colStat.getMin(), this.colStat.getMax(), bucketNum);
        // approximately what is needed to have error smaller than a single pixel
        double sampleSize  =  2 * height * height * bucketNum;
        double rate = sampleSize / this.colStat.getPresentCount();
        if ((rate > 0.1) || (!useSampling))
            rate = 1.0; // no use in sampling
        this.dataSet.blockingSketch(
                new HistogramSketch(bDec, rate, 0, null));
    }
    */

    private void prepareHistNew(int width, int height, int barWidth, boolean useSampling) {
        int bucketNum = width / barWidth;
        IHistogramBuckets bDec =
                new DoubleHistogramBuckets(this.colName, this.colStat.getMin(), this.colStat.getMax(), bucketNum);
        // approximately what is needed to have error smaller than a single pixel
        double sampleSize = 2 * height * height * bucketNum;
        double rate = sampleSize / this.colStat.getPresentCount();
        if ((rate > 0.1) || (!useSampling))
            rate = 1.0; // no use in sampling
        this.dataSet.blockingSketch(
                new HistogramSketch(bDec).sampled(rate, 0));
    }

    @Test
    public void HistE2E() {
        HistPerfTest cdftest = new HistPerfTest();
        /*
        TestUtil.runPerfTest("Running time of hist with sampling: ",
                k -> prepareHist(1000, 100, 10, true), 2);
        TestUtil.runPerfTest("Running time of hist without sampling: ",
                k -> cdftest.prepareHist(1000, 100, 10, false), 2);
         */
        TestUtil.runPerfTest("Running time of hist1 with sampling: ",
                k -> prepareHistNew(1000, 100, 10, true), 2);
        TestUtil.runPerfTest("Running time of hist1 without sampling: ",
                k -> cdftest.prepareHistNew(1000, 100, 10, false), 2);
    }
}

redpajama_set_name: RedPajamaGithub


text:
Installs activemq and sets up a service using the init script that comes with it.

# REQUIREMENTS:

Platform:

Tested on Ubuntu 10.04 and CentOS 5.5. Should work on any Debian or Red Hat family distributions.

Opscode cookbooks:

* java

# ATTRIBUTES:

* `activemq[:mirror]` - download URL up to the activemq/apache-activemq directory.
* `activemq[:version]` - version to install.
* `activemq[:deploy]` - directory to deploy to (/opt by default)

# USAGE:

Simply add `recipe[activemq]` to a run list.

This cookbook doesn't use any custom configuration for activemq.

# LICENSE AND AUTHOR:

Author:: Joshua Timberman (<joshua@opscode.com>)

Copyright:: 2009-2011, Opscode, 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.


text:
from django.shortcuts import render
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.http import HttpResponse
from django.http import Http404

from core.keyvalue.utils import get_aa, get_docstrings

import simplejson as json

from core.network.models import Network
from core.range.models import Range
from core.site.models import Site
from mozdns.soa.models import SOA
from core.interface.static_intr.models import StaticInterface
from core.vlan.models import Vlan

kv_users = {
    'network': Network,
    'range': Range,
    'site': Site,
    'soa': SOA,
    'interface': StaticInterface,
    'vlan': Vlan,
}

def process_kv(kv, obj, KVClass):
    existing_kvs = []
    delete_kvs = []
    new_kvs = []
    for k, v in kv:
        if k.startswith('existing_delete_'):
            try:
                delete_kv = KVClass.objects.get(
                    pk=k.strip('existing_delete_v_')
                )
            except KVClass.DoesNotExist:
                continue  # It was deleted
            delete_kvs.append(delete_kv)
        elif k.startswith('existing_v_'):
            try:
                existing_kv = KVClass.objects.get(pk=k.strip('existing_v_'))
            except KVClass.DoesNotExist:
                continue  # It was deleted
            if existing_kv in delete_kvs:
                continue
            existing_kv.value = v
            existing_kvs.append(existing_kv)
        elif k.startswith('attr_new_key_'):
            k_num = k.strip('attr_new_key_')
            value_k_name = 'attr_new_value_' + k_num
            for ki, vi in kv:
                if ki == value_k_name:
                    new_kv = KVClass(key=v, value=vi, obj=obj)
                    new_kvs.append(new_kv)
    return_attrs = []
    for kv in existing_kvs + new_kvs:
        try:
            kv.clean()
            kv.save()
            return_attrs.append((kv, None))
        except ValidationError, e:
            return_attrs.append((kv, str(e)))
    for kv in delete_kvs:
        kv.delete()

def validate_keyvalue_ajax(request):
    kv_class = request.POST.get('kv_class', None)
    obj_pk = request.POST.get('obj_pk', None)
    key = request.POST.get('key', None)
    value = request.POST.get('value', None)
    key_pk = request.POST.get('key_pk', None)
    delete_key = request.POST.get('delete_key', None)
    print "{0} {1} {2} {3} {4}".format(kv_class, key, value, key_pk,
                                       delete_key)

    if not (kv_class and bool(delete_key)):
        return HttpResponse(
            json.dumps({'success': False, 'message': 'missing class'})
        )
    if not key:
        return HttpResponse(
            json.dumps({'success': False, 'message': 'Missing key'})
        )
    if not value:
        return HttpResponse(
            json.dumps({'success': False, 'message': 'Missing value'})
        )

    try:
        obj, Klass = resolve_obj(kv_class, obj_pk)
    except ObjectDoesNotExist:
        return HttpResponse(
            json.dumps(
                {'success': False, 'message': 'Missing valid class info'}
            )
        )

    if key_pk:
        try:
            kv = obj.keyvalue_set.get(pk=key_pk)
        except Klass.DoesNotExist:
            return HttpResponse(
                json.dumps(
                    {'success': False,
                     'message': "Can't find that Key Value pair."}
                )
            )

        if delete_key != 'true':
            kv.value = value
    else:
        kv = Klass(key=key, value=value, obj=obj)

    try:
        kv.validate_unique()
        kv.clean()
    except ValidationError, e:
        return HttpResponse(
            json.dumps({'success': False, 'message': e.messages[0]})
        )

    return HttpResponse(json.dumps({'success': True}))

def resolve_obj(obj_class, obj_pk):
    if obj_class not in kv_users:
        raise Http404("Can't find this kv object")
    Klass = kv_users[obj_class]
    try:
        obj = Klass.objects.get(pk=obj_pk)
    except Klass.DoesNotExist:
        raise Http404()
    return obj, obj.keyvalue_set.model

def keyvalue(request, obj_class, obj_pk):
    obj, KVKlass = resolve_obj(obj_class, obj_pk)
    if request.method == 'POST':
        process_kv(request.POST.items(), obj, KVKlass)
    attrs = obj.keyvalue_set.all()
    aa_options = get_aa(obj.keyvalue_set.model)
    docs = get_docstrings(KVKlass)
    return render(request, 'keyvalue/keyvalue.html', {
        'kv_class': obj_class,
        'obj_pk': obj.pk,
        'attrs': attrs,
        'object': obj,
        'aa_options': aa_options,
        'existing_keyvalue': attrs,
        'docs': docs,
    })


text:
<?php

namespace App\Providers;

use App\Repositories\AccountRepository;
use App\Services\User as UserService;
use Illuminate\Support\ServiceProvider;

class WillChatServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     */
    public function boot()
    {
        $this->app->singleton('easywechat', function () {
            $accountId = \Request::header('AccountId');

            $accountRepository = app(AccountRepository::class);

            $account = $accountRepository->find($accountId);

            return new \EasyWeChat\Foundation\Application([
                'debug'  => env('APP_DEBUG', false),
                'app_id' => $account->app_id,
                'secret' => $account->app_secret,
                'token'  => $account->token,
                'log'    => [
                    'level' => \Monolog\Logger::DEBUG,
                    'file'  => storage_path('logs/easywechat.log'),
                ],
            ]);
        });
    }

    /**
     * Register the application services.
     */
    public function register()
    {
        //        $this->registerUserService();
    }

    /**
     * 注册用户服务提供者.
     */
    protected function registerUserService()
    {
        $this->app->singleton('willchat.user_service', function () {
            $user = app('App\User');

            return new UserService($user);
        });
    }

    /**
     * 提供的服务.
     *
     * @return array
     */
    public function provides()
    {
        return ['easywechat' => 'EasyWechat\\Foundation\\Application'];
    }
}


text:
using System;
using Com.Aspose.OCR.Api;
using Com.Aspose.OCR.Model;
using Com.Aspose.Storage.Api;

namespace CSharp.ExtractingManagingOCR.CloudStorage
{
    class ExtractOCRorHOCRTextFromSpecificBlockImage
    {
        public static void Run()
        {

            // ExStart:1
            // Instantiate Aspose Storage Cloud API SDK
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Instantiate Aspose OCR Cloud API SDK
            OcrApi ocrApi = new OcrApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            // Set the image file name
            String name = "Sampleocr.bmp";

            // Set the language of the document.
            String language = "English";

            // Set X and Y coordinate to recognize text inside..
            int? rectX = 150;
            int? rectY = 100;

            // Set Width and Height to recognize text inside.
            int? rectWidth = 1000;
            int? rectHeight = 300;

            // Set the spelling correction is used.
            bool? useDefaultDictionaries = true;

            // Set 3rd party cloud storage server (if any)
            String storage = "";
            String folder = "";

            try
            {
                // Upload source file to aspose cloud storage
                storageApi.PutCreate(name, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + name));

                // Invoke Aspose.OCR Cloud SDK API to extract text and partsinfo from an image
                OCRResponse apiResponse = ocrApi.GetRecognizeDocument(name, language, rectX, rectY, rectWidth, rectHeight, useDefaultDictionaries, storage, folder);

                if (apiResponse != null)
                {
                    Console.WriteLine("Codetext: " + apiResponse.Text+ "\n");

                    Console.WriteLine("Extract OCR or HOCR Text from a specific Block, Done!");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
    }
}


text:
 0">

		<collapsible-widget widget-title="{{category.name}}">

						{{forum.name}}

						{{forum.description}}

						childboards:

							{{subforum.name}}

						{{forum.totalThreadsCount}} threads

						Latest post by

						in

		</collapsible-widget>


text:
/** Automatically generated file. DO NOT MODIFY */
package yuku.ambilwarna;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}


text:
Test Data

Click here to access a folder with test data. The table below lists data that are currently available.

Test data and descriptions

File name

Waterbody type

Parameter(s)

Sensor type

Data description

Hunting_AWTemp

Stream

Water and air temperature

Onset HOBO U22 (Pro v2)

Air and water temperature were collected with separate sensors but brought together into one file in HOBOware

QB283_AWTempWaterLevel

Stream

Water and air temperature, water and air pressure, water level

Onset HOBO U20

Data from two non vented pressure transducers (one on land, one in the water) were brought together in HOBOware Pro to generate water level

RUSS_WTempMultiDepth

Lake

Water temperature

Onset HOBO U22 (Pro v2)

Temperature sensors were deployed throughout the water column (at 1-m intervals). This dataset include temperature data for multiple depths

RUSS_DO

Lake

Dissolved oxygen

Onset HOBO U26

DO sensor data for a single depth

You'll see two sets of folders:

TestData

These files are ready for you to run through the Shiny app or R package. Start with the CSV files in the Data0_Original folder.

If you want to try using HOBOware, you can find HOBOware data files in the 'HOBOware files' folder. If you don't have access to HOBOware and are working with temperature data alone, you can try downloading the free version of HOBOware and it might work (https://www.onsetcomp.com/hoboware-free-download/). Otherwise you'll need to purchase HOBOware Pro.

CompletedRuns

This folder has the complete set of outputs for each of the Test datasets. Outputs are in the Data1_RAW through Data4_SumStats folders. We included these outputs for people who want to see examples of the QC reports and other outputs without having to run the data through the tool themselves. If you try using the R tool with the test data, you might want to reference these files to verify that the outputs you generated during your test run(s) were complete.

We'll post more test files as they become available. So far our focus has been on the temperature and hydrologic data being collected at Regional Monitoring Networks (RMNs) sites, along with the dissolved oxygen data being collected in lakes. You may also notice that a lot of our test data are from Onset HOBO sensors. This is not an endorsement of HOBO sensors. Rather it's a reflection of the fact that many of our partners are using HOBO sensors. We're happy to add test data for other parameters (like conductivity and pH) and other sensor types to the test data folder. Please send your files to Jen Stamp (Jen.Stamp@tetratech.com).

This video provides an overview of the workflow you'll follow when you do the test runs: will send link later


text:
package org.skycrawl.nosqlshowcase.client.gwtmanagers;

import com.google.gwt.storage.client.Storage;

/**
 * Manages client's HTML5 storage and provides some routines over it. HTML5 client storage
 * is a way to store various data on the client, offline. It can be used to, for instance,
 * cache some large data and speed up page loading. Properties:
 *

 *
 Maximum amount of data is 5MB.
 *
 The data is saved into browser cache which is NOT secure. Avoid storing any
 *
 Requires GWT >= 2.3.
 * sensitive information.
 *

 *
 * Comparison with cookies:
 *

 *
 Cookies have a global scope - they are accessible by all browser windows and tabs.
 *
 Cookies have a limited size of 4KB, up to 20 maximum cookies per domain.
 *
 Cookies are sent with every request automatically which slows down both client and
 * server.
 *
 HTML5 storage provides both "session" (single window or tab) and "local" (cross window
 * and tab) scope. Both scopes can only store strings in key/value pairs.
 *
 HTML5 session storage doesn't have a size limit. Local storage up to 5MB per domain.
 *

 *
 *
HTML5 specification also defines storage events for subscribers and although it is already
 * implemented by GWT, it is not yet implemented by most browsers.

 *
 * @author SkyCrawl
 */
public class GWTHTML5Storage
{
	public static boolean isSupported()
	{
		return isLocalStorageSupported() && isSessionStorageSupported();
	}

	public static boolean isSessionStorageSupported()
	{
		return Storage.getSessionStorageIfSupported() != null;
	}

	public static boolean isLocalStorageSupported()
	{
		return Storage.getLocalStorageIfSupported() != null;
	}

	public static Storage getLocalStorage()
	{
		return Storage.getLocalStorageIfSupported();
	}

	public static Storage getSessionStorage()
	{
		return Storage.getSessionStorageIfSupported();
	}
}


text:
import sys
CS_ROOT = "../../.."
sys.path.append("{}/Tools/Scripts/".format(CS_ROOT))
import subprocess
import os
from ninja_syntax import Writer
from file_system_utils import delete_directory

COMPILER_FLAGS_DEFAULT_CPP = "-c -std=c++11 -fsigned-char -pthread -fexceptions -frtti -DCS_TARGETPLATFORM_RPI"
COMPILER_FLAGS_DEFAULT_C = "-c -fsigned-char -pthread -fexceptions -DCS_TARGETPLATFORM_RPI"
COMPILER_FLAGS_TARGET_MAP = { "debug":"-g -DDEBUG -DCS_ENABLE_DEBUG",  	"release":"-O3 -DNDEBUG" }
SOURCE_PATHS = ["Source"]
INCLUDE_PATHS = "-IPlatformSource/RPi -I{}".format(" ".join(SOURCE_PATHS))

# Write build commands to the given ninja file for all source files that have the given extension in the given directories
#
# @param ninja_file
#	File to write commands to
# @param dirs
#	List of directories to search for source files
# @param exts
# 	The list source file extension to look for in the format "a,b,c"
# @param compile_rule
# 	Name of the compile rule to compile this type of source file
# @param dep_rule
# 	Name of the rule to generate depencencies for this type of source file
# @param build_dir
# 	Location to output compiled files to
#
# @return List of output file paths
#
def _write_build_command(ninja_file, dirs, exts, compile_rule, dep_rule, build_dir):

	get_files_script = os.path.normpath("{}/Tools/Scripts/get_file_paths_with_extensions.py".format(CS_ROOT))
	source_files = []
	for d in dirs:
		source_files += subprocess.check_output(['python', get_files_script, '--directory', d, '--extensions', exts], universal_newlines=True).split(" ")

	source_files = list(filter(lambda x: len(x) > 0, source_files))
	source_files = list(filter(lambda x: len(x) > 0, source_files))
	# Convert the source files extensions from .c/cpp etc. to .o
	output_files = map(lambda x: os.path.splitext(x)[0]+'.o', source_files)
	# Make the file paths relative to the build dir
	output_files = map(lambda x: os.path.join(build_dir, x), output_files)
	# Convert from windows separators to unix ones as Ninja has a bug where it doesn't escape windows properly
	output_files = list(map(lambda x: x.replace('\\', '/'), output_files))

	for source_file, output_file in zip(source_files, output_files):
		ninja_file.build(rule=compile_rule, inputs=source_file, outputs=output_file)
		ninja_file.build(rule=dep_rule, inputs=source_file, outputs=output_file+".d")

	return output_files

# Generate a ninja "makefile"
#
# @param cpp_compiler_path
# 	Path to the g++ compiler
# @param c_compiler_path
# 	Path to the gcc compiler
# @param archiver_path
# 	Path to the gcc archiver for making static libs
# @param target_scheme
# 	Used to apply compiler flags
# @param build_dir
# 	Location to output temp build files to
# @param lib_path
#	path to temporary lib directory
#
def _generate_ninja_file(cpp_compiler_path, c_compiler_path, archiver_path, target_scheme, build_dir, lib_path):

	with open(os.path.join(build_dir, "Application.ninja"), "w") as build_file:
		ninja_file = Writer(build_file)

		ninja_file.variable(key="builddir", value=build_dir)

		cpp_compiler_flags = COMPILER_FLAGS_DEFAULT_CPP + " " + COMPILER_FLAGS_TARGET_MAP[target_scheme] + " " + INCLUDE_PATHS
		c_compiler_flags = COMPILER_FLAGS_DEFAULT_C + " " + COMPILER_FLAGS_TARGET_MAP[target_scheme] + " " + INCLUDE_PATHS

		# Write the compiler rule for c, cpp and cc
		ninja_file.rule("compile_cpp", command="{} {} -o $out $in".format(cpp_compiler_path, cpp_compiler_flags), description="Compiling C++ source: $in", depfile="$out.o.d", deps="gcc")
		ninja_file.rule("compile_c", command="{} {} -o $out $in".format(c_compiler_path, c_compiler_flags), description="Compiling C source: $in", depfile="$out.o.d", deps="gcc")

		# Write the rule that generates the dependencies
		ninja_file.rule("dependencies_cpp", command="{} {} -MM -MG -MF $out $in".format(cpp_compiler_path, cpp_compiler_flags), description="Generating C++ dependency: $in")
		ninja_file.rule("dependencies_c", command="{} {} -MM -MG -MF $out $in".format(c_compiler_path, c_compiler_flags), description="Generating C dependency: $in")

		# Write the rule to build the static library. Note we use response files as on Windows the command is too long for CreateProcess
		ninja_file.rule("archive", command="{} rcs $out @$out.rsp".format(archiver_path), description="Building static library: $out", rspfile="$out.rsp", rspfile_content="$in")

		# Write the compile command for all source files.
		output_files = _write_build_command(ninja_file, SOURCE_PATHS, 'cpp', 'compile_cpp', 'dependencies_cpp', build_dir)
		output_files += _write_build_command(ninja_file, SOURCE_PATHS, 'c,cc', 'compile_c', 'dependencies_c', build_dir)

		# Write the command to generate the static library for ChilliSource and the application
		ninja_file.build(rule="archive", inputs=output_files, outputs=lib_path)

# Generates the ninja "makefile", builds the application and copies
# the assets to the output folder
#
# @param target_scheme
# 	Used to apply compiler flags
# @param num_jobs
# 	Used to restrict the number of concurrent build jobs. If None then unrestricted
# @param cpp_compiler_path
# 	Path to the g++ compiler
# @param c_compiler_path
# 	Path to the gcc compiler
# @param archiver_path
# 	Path to the gcc archiver for making static libs
# @param build_dir
# 	Location to output temp build files to
# @param lib_path
#	path to temporary lib directory
#
def _build(target_scheme, num_jobs, cpp_compiler_path, c_compiler_path, archiver_path, build_dir, lib_path):

	try:
		os.makedirs(build_dir)
	except OSError:
		print("Build directory already exists")

	# Remove the old libraries and exes but not the compiled files
	_clean(None, lib_path)

	# Generate the ninja "makefile" based on the target scheme and platform
	_generate_ninja_file(cpp_compiler_path, c_compiler_path, archiver_path, target_scheme, build_dir, lib_path)

	# Build the exe using ninja
	if num_jobs == "None":
		subprocess.call(['ninja', '-f', os.path.join(build_dir, 'Application.ninja')])
	else:
		subprocess.call(['ninja', '-f', os.path.join(build_dir, 'Application.ninja'), '-j', str(num_jobs)])

# Cleans the output, build and libs. Passing None
# will prevent them from being cleaned
#
# @param build_dir
#	Location for temporary build files
# @param lib_path
#	path to temporary lib directory
#
def _clean(build_dir, lib_path):

	if lib_path != None and os.path.isfile(lib_path):
		os.remove(lib_path)
	if build_dir != None and os.path.isdir(build_dir):
		delete_directory(build_dir)

# Begin building for Raspberry Pi
#
# @param args
#	The list of arguments - Should have an additional argument "debug" or "release" optionally followed by "clean" then numjobs, c++ compiler path, c compiler path and archiver path e.g "debug clean 2 g++ gcc ar"
#
def run(args):

	if len(args) < 4 and len(args) != 2:
		print("Too few args {}. Usage: debug|release [clean] <numjobs> <cpp_compiler> <c_compiler> <archiver>".format(len(args)))
		return

	target_scheme = args[0].lower()

	if target_scheme not in ['debug', 'release']:
		print("Incorrect target scheme {}. Usage: debug|release [clean] <numjobs> <cpp_compiler> <c_compiler> <archiver>".format(target_scheme))
		return

	build_dir = os.path.normpath("build/RPi/{}".format(target_scheme))
	lib_path = os.path.normpath("{}/libCSBase.a".format(build_dir))

	if len(args) > 1 and args[1].lower() == "clean":
		# Remove all libraries, exes and compiled files
		_clean(build_dir, lib_path)
	else:
		_build(target_scheme, args[1], args[2], args[3], args[4], build_dir, lib_path)

if __name__ == "__main__":
	run(sys.argv[1:])


text:
const EventeStrings = require('./EventeStrings');

/**
 * Evente Model class
 */
class EventeModel {
    /**
     * @param {Node} node DOM Node
     * @param {Object} data Initial model data
     */
    constructor(node, data) {
        /**
         * @private
         * @type {Object}
         */
        this.shadow = { ...data, strings: EventeStrings.strings };
        /**
         * @private
         * @type {Object.<string, Object.<string, Set<Function>>>}
         */
        this.listeners = { get: {}, set: {}, delete: {} };
        /**
         * @private
         * @type {Object.<string, Set<Node>>}
         * */
        this.links = {};
        /**
         * @type {Proxy}
         */
        this.proxy = null;
        node.addEventListener('input', EventeModel.eventHander, true);
    }

    /**
     * Get model data
     * @returns {Object}
     */
    get data() {
        return this.proxy;
    }

    /**
     * Set model data
     * @param {Object} value
     */
    set data(value) {
        value.strings = EventeStrings.strings;
        this.shadow = value;
    }

    /**
     * Get model field by path
     * @param {string} property Model path
     */
    get(property) {
        return this.proxy.getField(property);
    }

    /**
     * Set model field by path
     * @param {string} property Model path
     * @param {*} value New value
     */
    set(property, value) {
        this.proxy.setField(property, value);
    }

    /**
     * Add listener of model change events
     * @param {string} event Listening evente - get, set or delete
     * @param {string} property Path in model data
     * @param {Function} listener Listener function
     */
    addListener(event, property, listener) {
        if ( !this.listeners[event] )
            return;
        if ( !this.listeners[event][property] )
            this.listeners[event][property] = new Set();
        this.listeners[event][property].add(listener);
    }

    /**
     * Add listener of model change events
     * @param {string} event Listening evente - get, set or delete
     * @param {string} property Path in model data
     * @param {Function} listener Listener function
     */
    removeListener(event, property, listener) {
        if ( this.listeners[event] && this.listeners[event][property] ) {
            this.listeners[event][property].delete(listener);
            if ( !this.listeners[event][property].size )
                delete this.listeners[event][property];
        }
    }

    /**
     * Get DOM nodes which dependent of link
     * @param {string} path Path in model data hierarchy
     * @returns {Set<Node>}
     */
    getNodes(path) {
        let i, node, nodes = new Set();
        for ( i in this.links ) {
            if ( !i.startsWith(path + '.') )
                continue;
            for ( node of this.links[i] )
                nodes.add(node);
        }
        while ( path != '' ) {
            if ( this.links[path] !== undefined ) {
                for ( node of this.links[path] )
                    nodes.add(node);
            }
            path = path.split('.').slice(0, -1).join('.');
        }
        return nodes;
    }

    /**
     * Apply node attributes values
     * @param {Node} node DOM node
     */
    applyAttributes(node) {
        if ( node.e_attributes === undefined )
            return;
        if ( node instanceof Text ) {
            // TODO
            let value = node.e_attributes[''].eval(this);
            value = value !== undefined ? value.toString() : '';
            if ( node.nodeValue !== value )
                node.nodeValue = value;
            return;
        }
        let name, attribute;
        for ( name in node.e_attributes )
            this.applyAttribute(node, name);
    }

    /**
     * Apply node attribute value
     * @param {Node} node DOM node
     * @param {string} name Atribute name
     */
    applyAttribute(node, name) {
        if ( node.e_attributes === undefined || node.e_attributes[name] === undefined )
            return;
        node.e_attributes[name].apply();
    }

    /**
     * Update dependencies of DOMnode
     * @param {Node} node DOM node
     */
    updateLinks(node) {
        var i, j, tmp,
            set = new Set();
        for ( i in node.e_attributes ) {
            tmp = node.e_attributes[i].getLinks();
            for ( j in tmp )
                set.add(tmp[j]);
        }
        tmp = node.e_links || new Set();
        for ( i of tmp ) {
            if ( !set.has(i) )
                this.unlink(node, i)
        }
        for ( i of set ) {
            if ( !tmp.has(i) )
                this.link(node, i);
        }
    }

    /**
     * Add dependency of DOM node
     * @param {Node} node DOM node
     * @param {string} property Path in model data
     */
    link(node, property) {
        if ( this.links[property] === undefined )
            this.links[property] = new Set();
        this.links[property].add(node);
        if ( node.e_links === undefined )
            node.e_links = new Set();
        node.e_links.add(property);
    }

    /**
     * Remove dependency of DOM node
     * @param {Node} node DOM node
     * @param {string} [property] Path in model data
     */
    unlink(node, property) {
        if ( property === undefined ) {
            if ( node.e_links !== undefined ) {
                for ( let link of node.e_links )
                    this.unlink(node, link);
            }
            let i, nodes = node.childNodes;
            for ( i = 0; i < nodes.length; i++ )
                this.unlink(nodes[i]);
        } else {
            if ( this.links[property] !== undefined ) {
                this.links[property].delete(node);
                if ( this.links[property].size === 0 )
                    delete this.links[property];
            }
            if ( node.e_links !== undefined ) {
                node.e_links.delete(property);
                if ( node.e_links.size === 0 )
                    delete node.e_links;
            }
        }
    }

    /**
     * Handle model data changes via DOM elements
     * @param {Event} event Event object
     */
    static eventHander(event) {
        if (
            !(event.target instanceof HTMLInputElement) &&
            !(event.target instanceof HTMLButtonElement ) &&
            !(event.target instanceof HTMLTextAreaElement) &&
            !(event.target instanceof HTMLSelectElement)
        )
            return;
        if ( event.target.e_attributes === undefined || event.target.e_attributes['e-model'] === undefined )
            return;
        let model = event.target.e_attributes['e-model'],
            value_old = model.get(),
            value_new = event.target.value;
        if ( value_old === value_new )
            return;
        model.set(value_new);
    }

}

module.exports = EventeModel;


text:
package jnn.functions.nlp.words.features;

public class LowercasedWordFeatureExtractor implements FeatureExtractor{
	@Override
	public String extract(String word) {
		return word.toLowerCase();
	}
}


text:
class TemplateBundle < Template
  #will:
  # has_many :versions,
  #          foreign_key: "template_id",
  #          class_name: "TemplateBundleVersions"
end


text:
Info 0    [00:00:43.000] Provided types map file "/a/lib/typesMap.json" doesn't exist
Info 1    [00:00:44.000] request:
    {
      "seq": 0,
      "type": "request",
      "command": "open",
      "arguments": {
        "file": "/user/username/projects/myproject/packages/A/src/index.ts"
      }
    }
Before request
//// [/a/lib/lib.d.ts]
/// <reference no-default-lib="true"/>
interface Boolean {}
interface Function {}
interface CallableFunction {}
interface NewableFunction {}
interface IArguments {}
interface Number { toExponential: any; }
interface Object {}
interface RegExp {}
interface String { charAt: any; }
interface Array<T> { length: number; [n: number]: T; }

//// [/user/username/projects/myproject/packages/B/package.json]
{"main":"lib/index.js","types":"lib/index.d.ts"}

//// [/user/username/projects/myproject/packages/A/tsconfig.json]
{"compilerOptions":{"outDir":"lib","rootDir":"src","composite":true},"include":["src"],"references":[{"path":"../B"}]}

//// [/user/username/projects/myproject/packages/B/tsconfig.json]
{"compilerOptions":{"outDir":"lib","rootDir":"src","composite":true},"include":["src"]}

//// [/user/username/projects/myproject/packages/A/src/index.ts]
import { foo } from 'b';
import { bar } from 'b/lib/bar';
foo();
bar();

//// [/user/username/projects/myproject/packages/B/src/index.ts]
export function foo() { }

//// [/user/username/projects/myproject/packages/B/src/bar.ts]
export function bar() { }

//// [/user/username/projects/myproject/node_modules/b] symlink(/user/username/projects/myproject/packages/B)

PolledWatches::

FsWatches::

FsWatchesRecursive::

Info 2    [00:00:45.000] Search path: /user/username/projects/myproject/packages/A/src
Info 3    [00:00:46.000] For info: /user/username/projects/myproject/packages/A/src/index.ts :: Config file name: /user/username/projects/myproject/packages/A/tsconfig.json
Info 4    [00:00:47.000] Creating configuration project /user/username/projects/myproject/packages/A/tsconfig.json
Info 5    [00:00:48.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Config file
Info 6    [00:00:49.000] event:
    {"seq":0,"type":"event","event":"projectLoadingStart","body":{"projectName":"/user/username/projects/myproject/packages/A/tsconfig.json","reason":"Creating possible configured project for /user/username/projects/myproject/packages/A/src/index.ts to open"}}
Info 7    [00:00:50.000] Config: /user/username/projects/myproject/packages/A/tsconfig.json : {
 "rootNames": [
  "/user/username/projects/myproject/packages/A/src/index.ts"
 ],
 "options": {
  "outDir": "/user/username/projects/myproject/packages/A/lib",
  "rootDir": "/user/username/projects/myproject/packages/A/src",
  "composite": true,
  "configFilePath": "/user/username/projects/myproject/packages/A/tsconfig.json"
 },
 "projectReferences": [
  {
   "path": "/user/username/projects/myproject/packages/B",
   "originalPath": "../B"
  }
 ]
}
Info 8    [00:00:51.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/a/src 1 undefined Config: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Wild card directory
Info 9    [00:00:52.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/a/src 1 undefined Config: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Wild card directory
Info 10   [00:00:53.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/packages/A/tsconfig.json
Info 11   [00:00:54.000] Config: /user/username/projects/myproject/packages/B/tsconfig.json : {
 "rootNames": [
  "/user/username/projects/myproject/packages/B/src/bar.ts",
  "/user/username/projects/myproject/packages/B/src/index.ts"
 ],
 "options": {
  "outDir": "/user/username/projects/myproject/packages/B/lib",
  "rootDir": "/user/username/projects/myproject/packages/B/src",
  "composite": true,
  "configFilePath": "/user/username/projects/myproject/packages/B/tsconfig.json"
 }
}
Info 12   [00:00:55.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/B/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Config file
Info 13   [00:00:56.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/b/src 1 undefined Config: /user/username/projects/myproject/packages/B/tsconfig.json WatchType: Wild card directory
Info 14   [00:00:57.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/b/src 1 undefined Config: /user/username/projects/myproject/packages/B/tsconfig.json WatchType: Wild card directory
Info 15   [00:00:58.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/B/src/index.ts 500 undefined WatchType: Closed Script info
Info 16   [00:00:59.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/B/src/bar.ts 500 undefined WatchType: Closed Script info
Info 17   [00:01:00.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info
Info 18   [00:01:01.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/src 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 19   [00:01:02.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/src 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 20   [00:01:03.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 21   [00:01:04.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 22   [00:01:05.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 23   [00:01:06.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 24   [00:01:07.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 25   [00:01:08.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Failed Lookup Locations
Info 26   [00:01:09.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/B/package.json 2000 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: File location affecting resolution
Info 27   [00:01:10.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 28   [00:01:11.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/A/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 29   [00:01:12.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 30   [00:01:13.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/packages/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 31   [00:01:14.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 32   [00:01:15.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/packages/A/tsconfig.json WatchType: Type roots
Info 33   [00:01:16.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/packages/A/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
Info 34   [00:01:17.000] Project '/user/username/projects/myproject/packages/A/tsconfig.json' (Configured)
Info 35   [00:01:18.000] 	Files (4)
	/a/lib/lib.d.ts
	/user/username/projects/myproject/packages/B/src/index.ts
	/user/username/projects/myproject/packages/B/src/bar.ts
	/user/username/projects/myproject/packages/A/src/index.ts

	../../../../../../a/lib/lib.d.ts
	  Default library for target 'es3'
	../B/src/index.ts
	  Imported via 'b' from file 'src/index.ts'
	../B/src/bar.ts
	  Imported via 'b/lib/bar' from file 'src/index.ts'
	src/index.ts
	  Matched by include pattern 'src' in 'tsconfig.json'

Info 36   [00:01:19.000] -----------------------------------------------
Info 37   [00:01:20.000] event:
    {"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"/user/username/projects/myproject/packages/A/tsconfig.json"}}
Info 38   [00:01:21.000] event:
    {"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"8c5cfb88fb6a6125ddaca4c198af63d261c8feb2786e348cbf3223fcf8461e16","fileStats":{"js":0,"jsSize":0,"jsx":0,"jsxSize":0,"ts":3,"tsSize":122,"tsx":0,"tsxSize":0,"dts":1,"dtsSize":334,"deferred":0,"deferredSize":0},"compilerOptions":{"outDir":"","rootDir":"","composite":true},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":false,"files":false,"include":true,"exclude":false,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":true,"version":"FakeVersion"}}}
Info 39   [00:01:22.000] event:
    {"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"/user/username/projects/myproject/packages/A/src/index.ts","configFile":"/user/username/projects/myproject/packages/A/tsconfig.json","diagnostics":[]}}
Info 40   [00:01:23.000] Search path: /user/username/projects/myproject/packages/A
Info 41   [00:01:24.000] For info: /user/username/projects/myproject/packages/A/tsconfig.json :: No config files found.
Info 42   [00:01:25.000] Project '/user/username/projects/myproject/packages/A/tsconfig.json' (Configured)
Info 42   [00:01:26.000] 	Files (4)

Info 42   [00:01:27.000] -----------------------------------------------
Info 42   [00:01:28.000] Open files:
Info 42   [00:01:29.000] 	FileName: /user/username/projects/myproject/packages/A/src/index.ts ProjectRootPath: undefined
Info 42   [00:01:30.000] 		Projects: /user/username/projects/myproject/packages/A/tsconfig.json
After request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 42   [00:01:31.000] response:
    {
      "responseRequired": false
    }
Info 43   [00:01:32.000] request:
    {
      "command": "geterr",
      "arguments": {
        "delay": 0,
        "files": [
          "/user/username/projects/myproject/packages/A/src/index.ts"
        ]
      },
      "seq": 1,
      "type": "request"
    }
Before request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

After request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 44   [00:01:33.000] response:
    {
      "responseRequired": false
    }
Before checking timeout queue length (1) and running

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 45   [00:01:34.000] event:
    {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
After checking timeout queue length (1) and running

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 46   [00:01:35.000] event:
    {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 47   [00:01:36.000] event:
    {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
Info 48   [00:01:37.000] event:
    {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":1}}
Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 49   [00:01:38.000] request:
    {
      "command": "updateOpen",
      "arguments": {
        "changedFiles": [
          {
            "fileName": "/user/username/projects/myproject/packages/A/src/index.ts",
            "textChanges": [
              {
                "newText": "\n",
                "start": {
                  "line": 5,
                  "offset": 1
                },
                "end": {
                  "line": 5,
                  "offset": 1
                }
              }
            ]
          }
        ]
      },
      "seq": 2,
      "type": "request"
    }
Before request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

After request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 50   [00:01:39.000] response:
    {
      "response": true,
      "responseRequired": true
    }
Info 51   [00:01:40.000] request:
    {
      "command": "geterr",
      "arguments": {
        "delay": 0,
        "files": [
          "/user/username/projects/myproject/packages/A/src/index.ts"
        ]
      },
      "seq": 3,
      "type": "request"
    }
Before request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

After request

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 52   [00:01:41.000] response:
    {
      "responseRequired": false
    }
Before checking timeout queue length (1) and running

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 53   [00:01:42.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/packages/A/tsconfig.json
Info 54   [00:01:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/packages/A/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
Info 55   [00:01:44.000] Different program with same set of files
Info 56   [00:01:45.000] event:
    {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
After checking timeout queue length (1) and running

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 57   [00:01:46.000] event:
    {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}

Info 58   [00:01:47.000] event:
    {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/packages/A/src/index.ts","diagnostics":[]}}
Info 59   [00:01:48.000] event:
    {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":3}}
Before running immediate callbacks and checking length (1)

PolledWatches::
/user/username/projects/myproject/packages/a/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/a/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/packages/node_modules/@types:
  {"pollingInterval":500}
/user/username/projects/myproject/node_modules/@types:
  {"pollingInterval":500}

FsWatches::
/user/username/projects/myproject/packages/a/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/tsconfig.json:
  {}
/user/username/projects/myproject/packages/b/src/index.ts:
  {}
/user/username/projects/myproject/packages/b/src/bar.ts:
  {}
/a/lib/lib.d.ts:
  {}
/user/username/projects/myproject/packages/b/package.json:
  {}

FsWatchesRecursive::
/user/username/projects/myproject/packages/a/src:
  {}
/user/username/projects/myproject/packages/b/src:
  {}
/user/username/projects/myproject/node_modules:
  {}


text:
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';

/**
 * An iterable and observable live list of components in the DOM.
 *
 * A QueryList contains a live list of child directives in the DOM of a directive.
 * The directives are kept in depth-first pre-order traversal of the DOM.
 *
 * The `QueryList` is iterable, therefore it can be used in both javascript code with `for..of` loop
 * as well as in template with `*ng-for="of"` directive.
 *
 * QueryList is updated as part of the change-detection cycle of a directive. Since change detection
 * happens after construction of a directive, QueryList will always be empty when observed in the
 * constructor.
 *
 *
 * NOTE: In the future this class will implement an `Observable` interface. For now it uses a plain
 * list of observable callbacks.
 *
 * # Example:
 *
 * Assume that `<tabs>` component would like to get a list its children which are `<pane>`
 * components as shown in this example:
 *
 * ```html
 * <tabs>
 *   <pane title="Overview">...</pane>
 *   <pane *ng-for="#o of objects" [title]="o.title">{{o.text}}</pane>
 * </tabs>
 * ```
 *
 * In the above example the list of `<tabs>` elements needs to get a list of `<pane>` elements so
 * that it could render tabs with the correct titles and in the correct order.
 *
 * A possible solution would be for a `<pane>` to inject `<tabs>` component and then register itself
 * with `<tabs>` component's on `hydrate` and deregister on `dehydrate` event. While a reasonable
 * approach, this would only work partially since `*ng-for` could rearrange the list of `<pane>`
 * components which would not be reported to `<tabs>` component and thus the list of `<pane>`
 * components would be out of sync with respect to the list of `<pane>` elements.
 *
 * A preferred solution is to inject a `QueryList` which is a live list of directives in the
 * component`s light DOM.
 *
 * ```javascript
 * @Component({
 *   selector: 'tabs'
 * })
 * @View({
 *  template: `
 *    <ul>
 *      <li *ng-for="#pane of panes">{{pane.title}}</li>
 *    </ul>
 *    <content></content>
 *  `
 * })
 * class Tabs {
 *   panes: QueryList<Pane>
 *
 *   constructor(@Query(Pane) panes:QueryList<Pane>) {
 *     this.panes = panes;
 *   }
 * }
 *
 * @Component({
 *   selector: 'pane',
 *   properties: ['title']
 * })
 * @View(...)
 * class Pane {
 *   title:string;
 * }
 * ```
 */
export class QueryList<T> {
  protected _results: Array < T >= [];
  protected _callbacks: Array < () => void >= [];
  protected _dirty: boolean = false;

  reset(newList: T[]): void {
    this._results = newList;
    this._dirty = true;
  }

  add(obj: T): void {
    this._results.push(obj);
    this._dirty = true;
  }

  onChange(callback: () => void): void { this._callbacks.push(callback); }

  removeCallback(callback: () => void): void { ListWrapper.remove(this._callbacks, callback); }

  removeAllCallbacks(): void { this._callbacks = []; }

  toString(): string { return this._results.toString(); }

  get length(): number { return this._results.length; }
  get first(): T { return ListWrapper.first(this._results); }
  get last(): T { return ListWrapper.last(this._results); }

  map<U>(fn: (item: T) => U): U[] { return this._results.map(fn); }

  [Symbol.iterator](): any { return this._results[Symbol.iterator](); }

  // Internal to the framework.
  fireCallbacks(): void {
    if (this._dirty) {
      ListWrapper.forEach(this._callbacks, (c) => c());
      this._dirty = false;
    }
  }
}


text:
package panther

import (
	"io"

	"ultimatesoftware.com/accountstore/models"
	"ultimatesoftware.com/accountstore/utils"
)

type Clawable interface {
	Hardness() int
	Puncture(strength int)
}

type Scenario interface {
	TwoTogether(i, j int) (a, b bool)
	TwoSeparate(i, j int) (a bool, b bool)
}

type ExternalEmbedded interface {
	io.ReadWriter
}

type WithMap interface {
	TakeGiveMap(theMap map[string]io.Reader) map[int]string
}

type WithChannel interface {
	TakeGiveChannel(theChannel chan int) chan string
}

type WithEllipsis interface {
	TakeEllipsis(several ...int) int
}

type WithStars interface {
	GetAccounts(tenantId string, opts *utils.QueryOpts) ([]models.AccountSummary, error)
	GetTenants(tenantId string, filters *utils.QueryOpts, recursive bool) ([]models.TenantSummary, error)
}

type Type interface {
	Align() int

	FieldAlign() int

	Method(int) Method

	MethodByName(string) (Method, bool)

	NumMethod() int

	Name() string

	PkgPath() string

	Size() uintptr

	String() string

	Kind() Kind

	Implements(u Type) bool

	AssignableTo(u Type) bool

	ConvertibleTo(u Type) bool

	Comparable() bool

	Bits() int

	ChanDir() ChanDir

	IsVariadic() bool

	Elem() Type

	Field(i int) StructField

	FieldByIndex(index []int) StructField

	FieldByName(name string) (StructField, bool)

	FieldByNameFunc(match func(string) bool) (StructField, bool)

	In(i int) Type

	Key() Type

	Len() int

	NumField() int

	NumIn() int

	NumOut() int

	Out(i int) Type
}


text:
package org.apache.ignite.internal.util;

import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.logger.java.JavaLogger;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.After;
import org.junit.Test;

import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME;
import static org.apache.ignite.internal.util.IgniteUtils.nullifyHomeDirectory;

/**
 * Checks that node can be started without operations with undefined IGNITE_HOME.
 * <p>
 * Notes:
 * 1. The test is intentionally made  independent from {@link GridCommonAbstractTest} stuff.
 * 2. Do not replace native Java asserts with JUnit ones - test won't fall on TeamCity.
 */
public class GridStartupWithUndefinedIgniteHomeSelfTest {
    /** */
    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);

    /** */
    private static final int GRID_COUNT = 2;

    /** {@inheritDoc} */
    @After
    public void tearDown() {
        // Next grid in the same VM shouldn't use cached values produced by these tests.
        nullifyHomeDirectory();

        U.getIgniteHome();
    }

    /** */
    @Test
    public void testStartStopWithUndefinedIgniteHome() {
        IgniteUtils.nullifyHomeDirectory();

        // We can't use U.getIgniteHome() here because
        // it will initialize cached value which is forbidden to override.
        String igniteHome = IgniteSystemProperties.getString(IGNITE_HOME);

        assert igniteHome != null;

        U.setIgniteHome(null);

        String igniteHome0 = U.getIgniteHome();

        assert igniteHome0 == null;

        IgniteLogger log = new JavaLogger();

        log.info(">>> Test started: start-stop");
        log.info("Grid start-stop test count: " + GRID_COUNT);

        for (int i = 0; i < GRID_COUNT; i++) {
            TcpDiscoverySpi disc = new TcpDiscoverySpi();

            disc.setIpFinder(IP_FINDER);

            IgniteConfiguration cfg = new IgniteConfiguration();

            // Default console logger is used
            cfg.setGridLogger(log);
            cfg.setDiscoverySpi(disc);
            cfg.setConnectorConfiguration(null);

            try (Ignite ignite = G.start(cfg)) {
                assert ignite != null;

                igniteHome0 = U.getIgniteHome();

                assert igniteHome0 == null;

                X.println("Stopping grid " + ignite.cluster().localNode().id());
            }
        }
    }
}


text:
package com.nshirley.engine3d.window;

import org.lwjgl.glfw.GLFWCursorPosCallback;

public class Mouse extends GLFWCursorPosCallback {

	public static double VX, VY;
	public static double X, Y;
	@Override
	public void invoke(long window, double xpos, double ypos) {
		VX = xpos - X;
		VY = ypos - Y;
		X = xpos;
		Y = ypos;
	}

}


text:
from flask import Flask, render_template,session, request
app = Flask(__name__)
app.secret_key = 'my_secret_key'

@app.route('/')
def myfirstfunction():
    if not 'title' in session:
        session['title'] = 'hello world'
    return render_template('index.html', name="Mike")

@app.route('/do_something', methods =["POST"])
def mysecondfunction():
    print request.form
    session['title'] = request.form['title']
    name = "Fred"
    return render_template('index.html',name=name)

if __name__ == '__main__':
  app.run(debug = True)


text:
import EventEmitter from 'events';
import fs from 'fs';
import ModulesGraph from './modules-graph';
import NODE_MODULES from '../../utils/node-modules-folder-name';
import toPosixPath from '../../utils/to-posix-path';

const WATCH_LOCKED_TIMEOUT = 700;

let instance = null;

const BABEL_PRESET_STAGE_2_MODULE_PATH = 'lib/compiler/babel/preset-stage-2.js';

export default class FileWatcher extends EventEmitter {
    constructor () {
        super();

        if (!instance) {
            this.watchers         = {};
            this.lockedFiles      = {};
            this.modulesGraph     = null;
            this.lastChangedFiles = [];

            instance = this;
        }

        return instance;
    }

    _onChanged (controller, file) {
        const cache = require.cache;

        if (!this.modulesGraph) {
            this.modulesGraph = new ModulesGraph();
            this.modulesGraph.build(cache, Object.keys(this.watchers));
        }
        else {
            this.lastChangedFiles.forEach(changedFile => this.modulesGraph.rebuildNode(cache, changedFile));
            this.lastChangedFiles = [];
        }

        this.lastChangedFiles.push(file);
        this.modulesGraph.clearParentsCache(cache, file);

        controller.runTests(true);
    }

    _watch (controller, file) {
        if (this.lockedFiles[file])
            return;

        this.lockedFiles[file] = setTimeout(() => {
            this._onChanged(controller, file);

            delete this.lockedFiles[file];
        }, WATCH_LOCKED_TIMEOUT);
    }

    stop () {
        Object.values(this.watchers).forEach(watcher => {
            watcher.close();
        });
    }

    addFile (controller, file) {
        if (this.watchers[file] || !FileWatcher.shouldWatchFile(file))
            return;

        if (this.modulesGraph) {
            this.lastChangedFiles.push(file);
            this.modulesGraph.addNode(file, require.cache);
        }

        this.watchers[file] = fs.watch(file, () => this._watch(controller, file));
    }

    static shouldWatchFile (file) {
        return !file.includes(NODE_MODULES) &&
            !toPosixPath(file).includes(BABEL_PRESET_STAGE_2_MODULE_PATH);
    }
}


text:
#ifndef cmComputeLinkInformation_h
#define cmComputeLinkInformation_h

#include "cmStandardIncludes.h"

#include <cmsys/RegularExpression.hxx>

class cmake;
class cmGlobalGenerator;
class cmLocalGenerator;
class cmMakefile;
class cmTarget;
class cmOrderDirectories;

/** \class cmComputeLinkInformation
 * \brief Compute link information for a target in one configuration.
 */
class cmComputeLinkInformation
{
public:
  cmComputeLinkInformation(cmTarget const* target, const char* config,
                           cmTarget const* headTarget);
  ~cmComputeLinkInformation();
  bool Compute();

  struct Item
  {
    Item(): Value(), IsPath(true), Target(0) {}
    Item(Item const& item):
      Value(item.Value), IsPath(item.IsPath), Target(item.Target) {}
    Item(std::string const& v, bool p, cmTarget const* target = 0):
      Value(v), IsPath(p), Target(target) {}
    std::string Value;
    bool IsPath;
    cmTarget const* Target;
  };
  typedef std::vector<Item> ItemVector;
  ItemVector const& GetItems();
  std::vector<std::string> const& GetDirectories();
  std::vector<std::string> const& GetDepends();
  std::vector<std::string> const& GetFrameworkPaths();
  const char* GetLinkLanguage() const { return this->LinkLanguage; }
  std::vector<std::string> const& GetRuntimeSearchPath();
  std::string const& GetRuntimeFlag() const { return this->RuntimeFlag; }
  std::string const& GetRuntimeSep() const { return this->RuntimeSep; }
  void GetRPath(std::vector<std::string>& runtimeDirs, bool for_install);
  std::string GetRPathString(bool for_install);
  std::string GetChrpathString();
  std::set<cmTarget const*> const& GetSharedLibrariesLinked();

  std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; }
  std::string GetRPathLinkString();
private:
  void AddItem(std::string const& item, cmTarget const* tgt);
  void AddSharedDepItem(std::string const& item, cmTarget const* tgt);

  // Output information.
  ItemVector Items;
  std::vector<std::string> Directories;
  std::vector<std::string> Depends;
  std::vector<std::string> FrameworkPaths;
  std::vector<std::string> RuntimeSearchPath;
  std::set<cmTarget const*> SharedLibrariesLinked;

  // Context information.
  cmTarget const* Target;
  cmTarget const* HeadTarget;
  cmMakefile* Makefile;
  cmLocalGenerator* LocalGenerator;
  cmGlobalGenerator* GlobalGenerator;
  cmake* CMakeInstance;

  // Configuration information.
  const char* Config;
  const char* LinkLanguage;
  bool LinkDependsNoShared;

  // Modes for dealing with dependent shared libraries.
  enum SharedDepMode
  {
    SharedDepModeNone,   // Drop
    SharedDepModeDir,    // List dir in -rpath-link flag
    SharedDepModeLibDir, // List dir in linker search path
    SharedDepModeLink    // List file on link line
  };

  // System info.
  bool UseImportLibrary;
  const char* LoaderFlag;
  std::string LibLinkFlag;
  std::string LibLinkFileFlag;
  std::string LibLinkSuffix;
  std::string RuntimeFlag;
  std::string RuntimeSep;
  std::string RuntimeAlways;
  bool RuntimeUseChrpath;
  bool NoSONameUsesPath;
  bool LinkWithRuntimePath;
  std::string RPathLinkFlag;
  SharedDepMode SharedDependencyMode;

  // Link type adjustment.
  void ComputeLinkTypeInfo();
  enum LinkType { LinkUnknown, LinkStatic, LinkShared };
  LinkType StartLinkType;
  LinkType CurrentLinkType;
  std::string StaticLinkTypeFlag;
  std::string SharedLinkTypeFlag;
  bool LinkTypeEnabled;
  void SetCurrentLinkType(LinkType lt);
  bool ArchivesMayBeShared;

  // Link item parsing.
  void ComputeItemParserInfo();
  std::vector<std::string> StaticLinkExtensions;
  std::vector<std::string> SharedLinkExtensions;
  std::vector<std::string> LinkExtensions;
  std::set<cmStdString> LinkPrefixes;
  cmsys::RegularExpression ExtractStaticLibraryName;
  cmsys::RegularExpression ExtractSharedLibraryName;
  cmsys::RegularExpression ExtractAnyLibraryName;
  std::string SharedRegexString;
  bool OpenBSD;
  void AddLinkPrefix(const char* p);
  void AddLinkExtension(const char* e, LinkType type);
  std::string CreateExtensionRegex(std::vector<std::string> const& exts,
                                   LinkType type);
  std::string NoCaseExpression(const char* str);

  // Handling of link items.
  void AddTargetItem(std::string const& item, cmTarget const* target);
  void AddFullItem(std::string const& item);
  bool CheckImplicitDirItem(std::string const& item);
  void AddUserItem(std::string const& item, bool pathNotKnown);
  void AddDirectoryItem(std::string const& item);
  void AddFrameworkItem(std::string const& item);
  void DropDirectoryItem(std::string const& item);
  bool CheckSharedLibNoSOName(std::string const& item);
  void AddSharedLibNoSOName(std::string const& item);
  void HandleBadFullItem(std::string const& item, std::string const& file);

  // Framework info.
  void ComputeFrameworkInfo();
  void AddFrameworkPath(std::string const& p);
  std::set<cmStdString> FrameworkPathsEmmitted;
  cmsys::RegularExpression SplitFramework;

  // Linker search path computation.
  cmOrderDirectories* OrderLinkerSearchPath;
  bool FinishLinkerSearchDirectories();
  void PrintLinkPolicyDiagnosis(std::ostream&);

  // Implicit link libraries and directories for linker language.
  void LoadImplicitLinkInfo();
  void AddImplicitLinkInfo();
  void AddImplicitLinkInfo(std::string const& lang);
  std::set<cmStdString> ImplicitLinkDirs;
  std::set<cmStdString> ImplicitLinkLibs;

  // Additional paths configured by the runtime linker
  std::vector<std::string> RuntimeLinkDirs;

  // Linker search path compatibility mode.
  std::set<cmStdString> OldLinkDirMask;
  std::vector<std::string> OldLinkDirItems;
  std::vector<std::string> OldUserFlagItems;
  bool OldLinkDirMode;

  // Runtime path computation.
  cmOrderDirectories* OrderRuntimeSearchPath;
  void AddLibraryRuntimeInfo(std::string const& fullPath,
                             cmTarget const* target);
  void AddLibraryRuntimeInfo(std::string const& fullPath);

  // Dependent library path computation.
  cmOrderDirectories* OrderDependentRPath;
};

#endif