WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hopefully this is not a duplicate (couldn't find anything). Out of all the "less desirable" VS (and VS code as well) plugin behaviors I've found this to be the number one most disturbing:

TypeScript Version:

1.8.7 (VS 2015 Community, Update 1)

Screenshots

And after fixing the return type (only changed PromiseX.start<void> to PromiseX.start<any>):

Reduced test case

function func(f: () => number) {
}

func(() => {
let x = "HI"; // <-- Whole line highlighted in red
return x; // <-- Whole line highlighted in red
});

For comparison, when function is used instead, only the keyword "function" is highlighted:

function func(f: () => number) {
}

func(function() { // <-- only the "function" keyword is highlighted in red
let x = "HI";
return x;
});

Suggestion

No need to highlight the whole function body in this case. Highlighting only the arrow (i.e. =>) could also work (I tried to find a solution that would work with all variations of the arrow notation, e.g. including reduced notation like val => val * 2). This would be significantly less distracting and wouldn't mask other errors within the function scope.

On a more personal note, I would be super-thankful if this would be fixed! This happens very frequently when using callback or promise heavy code (I mean sometimes up to hundreds of times per day).

Issue 2:
As an example:

// Function 'F' takes function 'a'
// and returns a new function which has exactly the same set of args as function 'a'
interface F<A extends Function>{
(a:A):A;
}

// Is there a way to say:
var Foo:F;

// Or am I forced to do :
var HigherOrderFunction: <A extends Function>(a:A)=>A;

I don't think there is currently a way to say what I want to say beyond duplicating the interface definition inline.
Issue 1:
Would be neat if $on supported an array of events:

bus.$on(['CLICK_BODY', 'KEYUP_ESCAPE'], () => {
this.active = false
})

Without it we need duplication

bus.$on('CLICK_BODY', () => {
this.active = false
})
bus.$on('KEYUP_ESCAPE', () => {
this.active = false
})

// or

bus.$on('CLICK_BODY', deactivate)
bus.$on('KEYUP_ESCAPE', deactivate)

Issue 2:
Version

2.5.13

Reproduction link

https://jsfiddle.net/sohail85/d72g4jxt/

Steps to reproduce

Map collections are not reactive, even computed properties depending to Map collections does not changes when their dependency changed

What is expected?

Map collection like other data structure should be reactive

What is actually happening?

instance variable of type Map collection does not reflect its changes to UI
Issue 1:
Should the functions histogram2d and histogramdd have the keyword density added and normed deprecated, to match histogram?

Issue 2:
Sort order for NaT values got changed in numpy 1.18.0.

PyArray_CompareFunc of dtype datetime64 returns incorrect as per the updated sort order.

This is present with numpy 1.20.2 and 1.21 too.

This is reproducible via the following extension module.

compare_bug.c

#include <Python.h>
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

static PyObject*
reproduce_bug(PyObject* self, PyObject* args) {
PyObject *arr = NULL;
if (!PyArg_ParseTuple(args, "|O", &arr)) {
return Py_None;
}
PyArrayObject *numpy_arr = (PyArrayObject*) arr;
// We just compare 0th and 1st element and print out
// the returned value.
int x = numpy_arr->descr->f->compare(
PyArray_GETPTR1(numpy_arr, 0),
PyArray_GETPTR1(numpy_arr, 1),
numpy_arr
);
printf("DEBUG %d\n", x);
return Py_None;
}

static PyMethodDef bug_functions[] = {
{"bug", (PyCFunction)reproduce_bug, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL }
};

static struct PyModuleDef numpybugmodule = {
PyModuleDef_HEAD_INIT,
"numpy_bug",
NULL,
-1,
bug_functions
};

PyMODINIT_FUNC
PyInit_numpy_bug(void)
{
return PyModule_Create(&numpybugmodule);
}

setup.py

from distutils.core import setup, Extension, DEBUG
import numpy

extra_compile_args = ["-DNDEBUG", "-O3"]
sfc_module = Extension('numpy_bug', sources = ['compare_bug..c'],
include_dirs=[numpy.get_include()],
extra_compile_args=extra_compile_args)

setup(name = 'mtnumpy', version = '1.0',
description = 'Python Package with superfastcode C++ extension',
ext_modules = [sfc_module]
)

Running this after installing above:

In [1]: import numpy, numpy_bug

In [2]: numpy_bug.bug(numpy.array(['NaT', '2020-01-01'], dtype='datetime64[s]')) # should print 1 as per new sort order.
DEBUG -1
Issue 1:
Paste this snippet in the playground:

const result = [{ foo: 'hello' }]
.map(({ foo }) => foo)
.map(foo => foo);

If you hover over foo in the first map() call, you'll notice that its type is any (should be string).

The type of result is correctly inferred to be string[], though. It just seems that there is no type information for destructured function parameters.

Issue 2:
class GenericClass<T> {
payload: T;
}

var genericObject = new GenericClass<{greeting: string}>();

function genericFunction<T>(object: GenericClass<T>, callback: (payload: T) => void) {
callback(object.payload);
}

// Works
genericFunction(genericObject, (payload) => {
// Here TS understands that payload have a property greeting
// and that payload.greeting is a string.
});

// Fails to compile with "Type 'T' has no property 'greeting' and no index signature.".
// Type of greeting is any
genericFunction(genericObject, ({greeting}) => {

});
Issue 1:
Hello, I am trying to build a front end with web components using Materials UI as a UI library. I have the following deps.tsx:

import MatUI from "https://jspm.dev/@material-ui/core@4.11.0";

export {MatUI};

tsconfig.json:

{
"compilerOptions": {
"experimentalDecorators": true,
"noImplicitAny": false,
"skipLibCheck": true,
"lib": ["dom", "esnext", "deno.ns"],
"plugins": [
{
"name": "typescript-deno-plugin",
"enable": true
}
],
},
"include": [
"./src/**/*"
]
}

and app.ts:

import { MatUI } from "../src/deps.tsx"

const { Button } = MatUI as any;

I am getting many (7008) errors, but a common one looks like this:

TS2441 [ERROR]: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module. var exports = {}; ~~~~~~~ at https://jspm.dev/npm:tiny-warning@1.0.3!cjs:1:5

I am running deno bundle src/app.ts --config tsconfig.json src/app.js.

Does anyone know a way to configure out the name clashes?

Issue 2:
Receiving TS2531 [ERROR] when running the mjs/cjs after Deno 1.0.4.

save as "test.mjs"

import { exp } from "./test_mod.ts";
if (false) null.func();

save as "test_mod.ts"

export const exp = {};

and run

% deno run test.mjs
Compile file:/// ... /test.mjs
error: TS2531 [ERROR]: Object is possibly 'null'.
if (false) null.func();
~~~~
at file:/// ... /test.mjs:2:12

1.0.5 -- NG

1.0.4 -- NG

1.0.3 -- OK

without ts import -- OK

import mjs -- OK
Issue 1:
I have two textfields, both of them have a onChange func waiting to be called each time the func is called a validation occurs and if some error is found using setState update the errorText property where is need.

the problem is the webkit-autofil (on chrome) fills both fields the onChange event is trigger for the first one but not for the second one leaving the error on the second field and this last one have the focus

my business logic disable the submit button if there's errors. any advice how to sort this issue?

Issue 2:
Problem description

First github issue - be gentle. 😄

I may be doing this incorrectly.

I have a that opens a with a single <TextArea>. I look for an onKeyDown event == 13, then take the value of the textarea and send it off to space. When the dialog closes, however, there's a pulsing ripple on the Button that was clicked before the dialog opened. I can close it "manually" by looking at the event.keyCode==13, or use the built-ins "onEscapeKeyUp" or "onBackdropClick".

Steps to reproduce

Open a Dialog with setState in a handler from onTouchTap on a Button

Do some dialog-y stuff.

Close the dialog with setState in a handler from a variety of sources (onEscapeKeyUp; onBackgroupClick; onKeyDown in the TextField when event.keyCode==13, etc).

Relevant code:

handleClose = () => { this.setState({ open: false }); };

handleOpen = () => { this.setState({ open: true }); };

...

<Dialog onEscapeKeyUp={this.handleClose} onBackdropClick={this.handleClose} open={this.state.open}>

...

</Dialog>

...

<Button onClick={this.handleOpen}>

...

</Button>

Versions

Material-UI: beta 6

React: 15.6.1

Browser: Chrome Version 60.0.3112.113 (Official Build) (64-bit)
Issue 1:
Problem description

Clicking a button to trigger a dialog and then using the 'esc' key to dismiss the dialog puts the button into an active ripple state. Noticed in my own code, was able to reproduce it on the dialog docs examples.

Steps to reproduce

On https://material-ui-1dab0.firebaseapp.com/component-demos/dialogs click any of the buttons to bring up a dialog box.

Press the 'esc' key to dismiss the dialog.

Versions

Material-UI: 1.0.0-beta4

React: 15.6.1

Browser: Microsoft Edge 40.15063.0.0, Chrome 60.0.3112.90 (Official Build) (64-bit)

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When using a Button to open a Dialog, when the Dialog is closed with either the escape key or clicking outside of it, the Button should look like it did before the click.

Current Behavior

When using a Button to open a dialog, when the Dialog is closed with the escape key, the button displays a ripple effect similar to if it was clicked. This does not happen when the dialog is closed by clicking outside of it.

Steps to Reproduce (for bugs)

Using https://codesandbox.io/s/m48ywqxnkp from the documentation, click the Open Simple Dialog button

When the Dialog appears, press escape to close the dialog

The ripple effect is displayed in the button until something else is clicked

The alert dialog demo does not seem to have the same behavior: https://codesandbox.io/s/3vwx0l7kjq

Context

This does not impact usability, just an aesthetic issue.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.41

React
16.3.1

browser
Chrome 65.0.3325.181, Firefox 59.0.2

etc
Issue 1:
#service.yml
app.resource_upload_listener:
class: AppBundle\EventListener\ResourceUploadListener
arguments: ['@app.resource.service']
tags:
- {name: doctrine.event_listener, event: prePersist}
- {name: doctrine.event_listener, event: preUpdate}

#listener
private $uploader;

public function __construct(ResourceService $uploader)
{
$this->uploader = $uploader;
}

public function prePersist(LifecycleEventArgs $args){

$entity = $args->getEntity();
$this->uploadFile($entity);
}

public function preUpdate(PreUpdateEventArgs $args)
{
$entity = $args->getEntity();

$this->uploadFile($entity);
}

private function uploadFile($entity)
{
$file = $entity->getBrochure();

if(!$file instanceof UploadedFile){

return;
}

$fileName = $this->uploader->upload($file);

$entity->setBrochure($fileName);
}

I use the event listener to cooperate the upload file, But when start the web server , it thrown an error: Circular reference detected for service "doctrine.dbal.default_connection", path: "doctrine.dbal.default_connection".

Help

Issue 2:
Hello,

DoctrineBundle have made a change ir orm.xml (added lazy=true):

<service id="doctrine.orm.entity_manager.abstract" class="%doctrine.orm.entity_manager.class%" abstract="true" lazy="true" />

Now all my lazy services which are actually doctrine listeners stopped working (throws circular error).

After couple of hours of debugging I've found out a bug (hopefully) in PhpDumper.php hasReference method.

I've added a debugging echo lines in that method and saw these results:

hasReference: (doctrine.dbal.default_connection) , visited: doctrine.orm.default_listeners.attach_entity_listeners -> listener.event_logger -> doctrine.orm.default_entity_manager -> doctrine.orm.default_entity_manager.delegate (eq: false)
Service: doctrine.orm.default_entity_manager.delegate (lazy), has arguments: [ doctrine.dbal.default_connection, def: Doctrine\ORM\Configuration ]
hasReference: (doctrine.dbal.default_connection) , visited: doctrine.orm.default_listeners.attach_entity_listeners -> listener.event_logger -> doctrine.orm.default_entity_manager -> doctrine.orm.default_entity_manager.delegate -> doctrine.dbal.default_connection (eq: true)

It looks like hasReference also recursively looking up a lazy services arguments for reference search,

I've thought, is that really logically? Because lazy services is lazy and are instantiated indirectly so more logically would be skip reference search in lazy service definitions, isn't it?

more information:

doctrine/DoctrineBundle#559 (comment)
Issue 1:
🚀 Feature

The MKLDNN is enabled by default for linux based packages (both pip and conda). However, on windows it is disabled by default and we are instructed to compile it from source code.

Is there any technical reason behind this, that made it disabled by default under windows and not linux? or is it just an unintentional bug?

Motivation

MKLDNN has a profound affect on performance specially when used in CPU only mode. The inclusion of it by default in Windows based packages will then help a lot.

It may also be the reason behind the performance difference between the two platforms (Linux being much faster than its windows counter part)

Pitch

Enable MKLDNN by default for pip/conda packages under Windows just like Linux

Issue 2:
Bug

In MKLDNN cmake, MSVS build are disabled explicitly.

pytorch/cmake/Modules/FindMKLDNN.cmake

Lines 16 to 19
in
12e0ed5

IF(MSVC)

MESSAGE(STATUS "MKL-DNN needs omp 3+ which is not supported in MSVC so far")

RETURN()

ENDIF(MSVC)

I think this is no longer the case as we can build mkldnn directly with Visual Studio 2017 and MKLDNN's official cmake doesn't complain about that

https://github.com/intel/mkl-dnn/blob/4bdffc2cb1c3d47df9604d35d2c7e5e47a13f1a6/cmake/OpenMP.cmake#L78-L81

But, after commenting out the RETURN(), the issue I'm encountering is about ideep.

pytorch\third_party\ideep\include\ideep\allocators.hpp(151): error C2039: 'posix_memalign': is not a member of '`global namespace''
pytorch\third_party\ideep\include\ideep\allocators.hpp(151): error C3861: 'posix_memalign': identifier not found

Environment

PyTorch Version (e.g., 1.0): master

OS (e.g., Linux): Win10

How you installed PyTorch (conda, pip, source): source

Build command you used (if compiling from source): cmake + ninja

Python version: 3.7.2

CUDA/cuDNN version: 10.0/7

GPU models and configuration: 1080Ti
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.9

What operating system are you using?

Ubuntu

Operating System Version

20.04

What arch are you using?

x64

Last Known Working Electron version

Expected Behavior

Exit status of a process when killed by a signal should not be 0, example:

(sleep 5 ; killall nodejs ) & nodejs ; echo exitstatus: $?

[1]+ Done ( sleep 5; killall nodejs )

Terminated

exitstatus: 143

Actual Behavior

Exit status of many Electron versions when killed by a signal should is erroneously 0, example:

(sleep 5 ; killall electron ) & node_modules/electron/dist/electron ; echo exitstatus: $?

[1]+ Done ( sleep 5; killall electron )

exitstatus: 0

Testcase Gist URL

No response

Additional Information

I disagree with the following statement:

"I agree to follow the Code of Conduct that this project adheres to. *"

IMHO, forcing bug reporters to click this is discriminatory and unrealistic to abide to by non-lawyers.

I disagree with the following statement:

"I have searched the issue tracker for a feature request that matches the one I want to file, without success. *"

IMHO, forcing bug reporters to click this is counterproductive, issues can provide valuable information even if searches have not been performed or duplicate exists.

There is a previous issues for this bug report here, but it's closed: #19650

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

15.3.1

What operating system are you using?

Windows

Operating System Version

window 10

What arch are you using?

x64

Last Known Working Electron version

none

Expected Behavior

5 pages in total, print with pageRanges: [{from: 0, to: 2}], print first three pages.

Actual Behavior

it won't do print task. if i select Microsft Pdf Printer, the pdf file created is broken, can't be opend.

if i remove the pageRanges key from options, it works.

Testcase Gist URL

No response

Additional Information

No response
Issue 1:
Or just use LLVM to do this (if it has a mode that hash-conses to avoid duplicate constants). As per FIXME in trans::base::trans_const_expr.

Issue 2:
After examination, it doesn't appear that deriving raw pointers presents any kind of safety problem (no derivings dereference unsafe pointers). Most people seem to believe that the original justification presented in #13032 isn't sufficient.
Issue 1:
The Link and Title for this Exercise Is Missing on the Map page in the Basic Algorithm Scripting section. Missing title n link for an exercise on Map page, Basic Algorithm Scripting section.

Issue On URL (Map page, Basic Algorithm Scripting section):

https://beta.freecodecamp.com/en/map

Challenge Name

Issue Description

Browser Information

Browser Name, Version:

Operating System:

Mobile, Desktop, or Tablet:

Your Code

Screenshot

Issue 2:
Challenge Name

https://www.freecodecamp.com/challenges/manage-packages-with-npm

Issue Description

After running how-to-npm and selecting option 7, 'package niceties' I am given the following instructions:

So, we've created a package.json file, but it's missing a few things

that people usually expect. If you type npm install, you'll see

something like this:

npm WARN package.json project1@1.0.0 No description
npm WARN package.json project1@1.0.0 No repository field.
npm WARN package.json project1@1.0.0 No README data

Before we can share this work of art with the world, we need to make

it a bit more polished so that people know how to use it.

First, create a README.md file, with a bit of words in it.---- There is already a file by this name. Do we create a duplicate(this isn't allowed without deleting or renaming the existing file) or edit this file?

Then, add a "repository" field in your package.json file, with a url

where people can access the code.---- Where and how do I add the "repository" field? I have no prior education or training in backend development, so I don't even know where to begin. Also, what URL would we be using? This information is needed to complete the challenge, but it not included.

Browser Information

C9 workspace
Issue 1:
Issue originally made by Ryan Duffy (ryan.duffy)

Bug information

Babel version: 6.11.4

Options

es2015 preset

Input code

export default () => ({
x: ({x}) => {}
});

Description

With the above code, babel transpiles to a closure without module.exports. Seems to be unique to the combination of exporting an arrow function that returns an object containing a key whose value is an arrow function where the first arg is deconstructed with a key of the same name.

If the keys are different (x: ({y}) => {}) or the deconstructed key is renamed (e.g. x: ({x: y}) => {}), it doesn't reproduce.

If you use function in place of either arrow function, it doesn't reproduce.

If you store the closure into a local variable and then export that, it doesn't reproduce.

Reproducible via the babel repl as well

Issue 2:
Issue originally made by @jprichardson

Bug information

Babel version: 6.x

Node version: 5.3.0

npm version: 3.7.1

Input code

export default (onClick) => (<div onClick={ () => onClick(text) } ></div>);

Description

You'll notice an export at the bottom that didn't get transpiled.

Sorry, regarding Babel "version", wasn't sure which version to put since there are so many libraries. I'm using babel-plugin-transform-es2015-arrow-functions@6.5.2.
Issue 1:
Steps to Reproduce

Trying to compile Flutter application which uses FlutterViewController for iPhone5 (ARM 32 bit)

Logs

Run your application with flutter run and attach all the log output.

pawelurban@MacBook-Pro-4 ~/w/Flutter-Demo> ../flutter/bin/flutter run
Launching lib/main.dart on iPhone (Test) in debug mode...
2017-02-07 13:31:00.989 ios-deploy[84260:11111874] [ !! ] Error 0xe8000087: This application does not support this device's CPU type. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not install build/ios/Release-iphoneos/Runner.app on 116fe6f14b81cb490ebab9c2f150d45810a740ed.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcodeproj

Error launching application on iPhone (Test).

Flutter Doctor

pawelurban@MacBook-Pro-4 ~/w/Flutter-Demo> ../flutter/bin/flutter doctor
[✓] Flutter (on Mac OS, channel master)
• Flutter at /Users/pawelurban/workspace/flutter
• Framework revision 06f879b57e (6 hours ago), 2017-02-06 22:15:36
• Engine revision cbf49d0652
• Tools Dart version 1.22.0-dev.10.3

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /Users/pawelurban/Library/Android/sdk
• Platform android-25, build-tools 25.0.2
• Java(TM) SE Runtime Environment (build 1.8.0_77-b03)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.2.1, Build version 8C1002
• ios-deploy 1.9.0

[✓] IntelliJ IDEA Community Edition (version 2016.3.4)
• Dart plugin version 163.13137
• Flutter plugin version 0.1.9.1

[✓] Connected devices
• iPhone (Test) • 116fe6f14b81cb490ebab9c2f150d45810a740ed • ios • iOS 10.0.2 (14A456)

Issue 2:
@chinmaygarde says this should be very straightforward and is just about teaching our Mac bot to build the ARM32-bit variants of our engine, uploading them to the right place, and teaching our XCode project template to use them.

EDIT: Turns out it was not straight forward. Work is actively underway, @cbracken is driving the effort.