WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
💻

Would you like to work on a fix?

How are you using Babel?

@babel/cli

Input code

// не строгий режим
function mixArgs(first, second = "b") {
var __es_vNaN = Array.prototype.sort.call("{}".split("writable", 10000));

console.log(arguments.length);
Number.parseFloat("+0");
console.log(first === arguments[0]);
console.log(second === arguments[1]);
first = "c";
second = "d";
console.log(first === arguments[0]);
console.log(second === arguments[1]);
}

mixArgs("a");

Here is the REPL

Configuration file name

babel.config.json

Configuration

{
"sourceType": "unambiguous",
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-transform-runtime"
]
}

Current and expected behavior

The origin code run by node print

1
true
false
false
false

But the transpiled code run by node print

1
true
false
true
false

Environment

babel

├── @babel/cli@7.17.0=6

├── @babel/generator@7.17.3

├── @babel/plugin-transform-runtime@7.17.0

├── @babel/preset-env@7.16.11

Node: [v17.3.0]

npm version [8.5.2]

os [ubuntu 20.04]

Possible solution

No response

Additional context

No response

Issue 2:
Issue originally made by Joe Lencioni (lencioni)

Bug information

Babel version: 6.6.5 (babel-core 6.7.0)

Node version: 5.8.0

npm version: 3.7.3

Options

{
"plugins": [
"babel-plugin-transform-es2015-destructuring",
"babel-plugin-transform-es2015-modules-commonjs",
"babel-plugin-transform-es3-property-literals",
]
}

Input code

import foo from 'foo';
const [x] = bar;

Description

I have created a repro case for this issue at https://github.com/lencioni/babel-es3-issue-repro

This repo contains a repro case for a possible bug in Babel involving

babel-plugin-transform-es2015-destructuring,

babel-plugin-transform-es2015-modules-commonjs, and

babel-plugin-transform-es3-property-literals.

The es3-property-literals plugin normally converts keys that are like default

to be quoted, which provides better compatibility for browsers that do not

support ES5 (e.g. IE8). This seems to work when the source code contains the

property that needs to be quoted, but when used in conjunction with these other

two plugins in some situations the property is not quoted.

In src/okay.js we have the following code:

import foo from 'foo';
const bar = [1, 2, 3];
const [x] = bar;

Part of which gets transpiled to the following line in build/okay.js:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

In src/bad.js we have the following code:

import foo from 'foo';
const [x] = bar;

Part of which gets transpiled to the following line in build/bad.js (note the

missing quotes around default:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Issue 1:
Hey guys, I'm from the Angular team and we are currently trying to use the TypeScript compiler to compile the project to system.register format. In the process, I noticed a bug with the output. I've cloned your branch release1.5 to make sure that it wasn't just a bug on our end.

Here is a small example that I have composed independent of the Angular project.

Export file with super class:

/// foo.ts
export class Foo {
a: string;
}

Import file with sub class:

/// bar.ts
import {Foo} from './foo';

export class Bar extends Foo {
b: string;
}

System.register format output:

/// bar.js
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};System.register(['./foo'], function(exports_1) {
var foo_1;
var Bar;
return {
setters:[
function (_foo_1) {
foo_1 = _foo_1;
}],
execute: function() {
Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
_super.apply(this, arguments);
}
return Bar;
})(foo_1.Foo);
exports_1("Bar", Bar);
}
}
});

The __extends function is being defined outside of the context of System.register. Systemjs uses a number of regex expressions to determine the format of the file that it is reading. It won't recognize this output.

I would suggest modifying the output as so:

System.register(['./foo'], function(exports_1) {
var __extends = (window && window.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var foo_1;
var Bar;
return {
setters:[
function (_foo_1) {
foo_1 = _foo_1;
}],
execute: function() {
Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
_super.apply(this, arguments);
}
return Bar;
})(foo_1.Foo);
exports_1("Bar", Bar);
}
}
});

My systemjs module is version @0.18.1

Issue 2:
TypeScript Version: 1.8.x

The tsconfig.json can list compileOnSave which is nicely supported in VS. To make that work on VS Code as well the necessary support should come from the tsserver. We could either send the tsserver and event when a file is saved or the tsserver could make use of its file eventing to detect the case.
Issue 1:
Consider enabling tabs inlined in the title bar by default, and also showing a single visible tab for the starting shell (e.g. always show tabs, even if there's only one process.)

This might reduce the every other day issue or comment asking why terminal "doesn't work" because they don't know to press ctrl+T (understandably)

Issue 2:
Followup to #430. Here's what I'm thinking.

alwaysShowTabs -> true

experimental_showTabsInTitlebar -> true

always include Windows Powershell (background: #012456)

include PowerShell Core separately (background: unset)

drop Courier New for powershell
Issue 1:
Feature request

next creates a webpack config and it'd be nice to have access to that.

Is your feature request related to a problem? Please describe.

Certain other tools, such as react-styleguidist, need to know how webpack is configured to work. But next abstracts this away and doesn't put it together until it spins up, so just require'ing a static file won't work. So, styleguidist can't share the webpack config that next uses.

Describe the solution you'd like

Ideally, it'd be something like the existing next/whatever imports.

const getWebpackConfig = require('next/webpack');
const webpackConfig = getWebpackConfig({ /* Some information on which one to get (client, server, build, dev) */ });

Describe alternatives you've considered

It's entirely possible to make an alternative webpack.config.js, but there's no guarantee that it'll stay in sync between versions or with add-on's, and it requires knowledge of what next is doing behind the scenes.

Another idea was to have next.config.js write the config to a file on require, but that can't copy over the functions and class instances in the config, since they are not serializable.

Since it's not bundled, stuff from next can be selectively required to kinda get the config

const loadConfig = require('next-server/next-config');
const getBaseWebpackConfig = require('next/dist/build/webpack-config').default;

const config = loadConfig(__dirname);
getBaseWebpackConfig(__dirname, {config, entrypoints: {}}).then(webpackConfig =>
console.log('Config GET!', webpackConfig),
);

but that's messy, incomplete, depends on internals, asynchronous, and can entirely break for any number of reasons.

Additional context

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

Expected Behavior

I expected the promise returned from Router.push('/myurl') would only resolve after the new page had been navigated to. This is useful for triggering UI events after the transition like: Router.push('/myurl').then(() => showModal('Hello'));

Current Behavior

Currently, the promise often resolves before that page transition is completed. This is especially easy to see in development mode, since the transition often takes considerable time while the next page is building.

Steps to Reproduce (for bugs)

Put some code like Router.push('/myurl').then(() => window.alert('Premature Alert?')) to be triggered by a button click.

Add something that will take some time to getInitialProps for myurl.js

Click the button, and, see if the alert arrives before the new page is rendered.

Context

In particular, I'm trying to put together a login flow where the app shows a "loading..." message while the page is being navigated to the next destination, and then disappears after the new page is loaded.

Your Environment

Tech
Version

next
4.1.4

node
8.8.1

OS
OSX

browser
Chrome

etc
Issue 1:
Selecting certain columns from certain SQL queries frequently returns the following error: Unknown exception: Cannot coerce[java.util.ArrayList] to VARCHAR

Which columns/queries that are affected seems to be non-deterministic, though I can always make a given query work by excluding particular columns. Eg. for one query, I cannot select column X without having an error returned, but for a different query I cannot select column Y. Sometimes a query can work for some time, and then start failing, despite pulling in the exact same set of data. In the case of this error, the columns in question seem to be always empty (determined by cross-referencing the column/query in question over the JSON query API).

Doing a select * very frequently returns this error for me.

Issue 2:
Druid SQL doesn't support multi-value columns right now. They kind of work sometimes but not always.

They are reported as VARCHAR which does not give the user a hint that they are multi-value.

If you select one without aggregation then you get an error (#4637) as the runtime tries to cast them to string but cannot. Fixed by #6462.

If you group on one you get the standard Druid multi-value grouping behavior, which is surprising in the context of SQL.

Since Druid SQL thinks they're VARCHARs, you write filters on them as if you were filtering on a string column. But the planner may do some inappropriate optimizations (like optimize a = 'x' AND a = 'y' to FALSE even though a multi-value column could have both values).

I'm not sure what happens when a multi-value column is involved in a semi-join but I'm sure it's not anything good.

I'm not sure how to best express multi-value columns in SQL. Ideas are welcome. See also a calcite dev thread: https://www.mail-archive.com/dev@calcite.apache.org/msg02846.html
Issue 1:
When I am using DropDownMenu and as menuStyle I am setting transparency but it is being set for a div whose role is menu but a "div" above that is actually controlling the transparency.

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

Expected Behavior

Make the Menu transparent

Current Behavior

The menu is not becoming transparent.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/o544j10l39

Context

Your Environment

Tech
Version

Material-UI
0.20

React
16.2.0

browser
chrome

etc

Issue 2:
Hi,

I was wondering if it is possible to use keyboard (tab / arrow key) navigation inside a modal dialog and not have it "bubble up" beyond the dialog.

Currently when I open a dialog with modal set it true, and attempt to use the tab key to navigate between elements, it still gives focus to elements outside of the dialog. Is this something I need to add handlers for specifically on any dialog I have?

Thanks,

Matt
Issue 1:
Describe the bug

Unable to bundle TS code that uses the DOM.

To Reproduce

Create a test.ts file with contents:

document.getElementById("comments-container");

Create tsconfig.json with contents:

{
"compilerOptions": {
"target": "ES2016",
"module": "commonjs",
"lib": ["DOM", "ESNext"],
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}

Run the deno bundle command:

deno bundle --unstable -c tsconfig.json test.ts dist/test.js

This will fail with the following error:

Bundle file:///Users/renato/programming/projects/static-website-reddit-comments/test.ts
Check file:///Users/renato/programming/projects/static-website-reddit-comments/test.ts
error: AssertionError: "data" is unexpectedly null for "asset:///lib.dom.d.ts".
at assert (deno:cli/tsc/99_main_compiler.js:53:13)
at Object.getSourceFile (deno:cli/tsc/99_main_compiler.js:377:9)
at findSourceFile (deno:cli/tsc/00_typescript.js:104355:29)
at deno:cli/tsc/00_typescript.js:104232:85
at getSourceFileFromReferenceWorker (deno:cli/tsc/00_typescript.js:104199:34)
at processSourceFile (deno:cli/tsc/00_typescript.js:104232:13)
at processRootFile (deno:cli/tsc/00_typescript.js:104055:13)
at deno:cli/tsc/00_typescript.js:103004:25
at Object.forEach (deno:cli/tsc/00_typescript.js:382:30)
at Object.createProgram (deno:cli/tsc/00_typescript.js:103003:24)

Expected behavior

The Deno bundle command should succeed.

It worked before I upgraded to 1.5.0.

Versions

▶ deno --version
deno 1.5.0
v8 8.7.220.3
typescript 4.0.3

Issue 2:
getting this error

AssertionError: "data" is unexpectedly null for "asset:///lib.dom.d.ts".
at assert (deno:cli/tsc/99_main_compiler.js:53:13)
at Object.getSourceFile (deno:cli/tsc/99_main_compiler.js:377:9)
at findSourceFile (deno:cli/tsc/00_typescript.js:104355:29)
at deno:cli/tsc/00_typescript.js:104232:85
at getSourceFileFromReferenceWorker (deno:cli/tsc/00_typescript.js:104199:34)
at processSourceFile (deno:cli/tsc/00_typescript.js:104232:13)
at processRootFile (deno:cli/tsc/00_typescript.js:104055:13)
at deno:cli/tsc/00_typescript.js:104630:21
at Object.forEach (deno:cli/tsc/00_typescript.js:382:30)
at processLibReferenceDirectives (deno:cli/tsc/00_typescript.js:104625:16)

to reproduce

create A.ts with writeTextFileSync
insert tripple slash reference with lib=dom
import dynamically A.ts
Issue 1:
Environment

Windows build number: 1903 for cmd
Windows Terminal version (if applicable): latest from the Microsoft store

Any other software? N/A

Steps to reproduce

Copy any text using keyboard shortcut ctrl + C and try to paste it using ctrl + V shortcut.

Expected behavior

This should paste the copied text in the command line.

Actual behavior

After typing Ctrl + V only ^v is showing.

Issue 2:
Environment

Windows build number: [Version 10.0.19008.1000]
Windows Terminal version (if applicable): 0.6.2951.0

Any other software?
Ubuntu 18.04.3 LTS through WSL v2 / Windows Build 19008

Steps to reproduce

Use ssh to connect to a linux server through the Terminal App running Ubuntu with WSL v2.

Start tmux on the linux server you are connected to through SSH

Run find /

Wait a few seconds (5-10)

Attempt to CTRL+C

Expected behavior

I expect that immediately, or after a few seconds at most, the CTRL+C command interupts the command and scrolling output from the find command in the terminal.

Actual behavior

It seems that the terminal is unable to handle the fast/large amount of text output from the find command. Looking at the time that tmux shows in the bottom-right of the screen, it can be minutes "behind" in rendering the text output.

Other notes:

Running in tmux locally, without going through SSH, it takes ~2 seconds for a CTRL+C to come through

Running without tmux locally, without going through SSH, CTRL+C is immediate

Running without tmux but with SSH, executing a find on a remote linux server, it takes about 5-7 seconds for the CTRL+C to come through.

So it seems only the combination of being connected to another server through SSH, running a tmux there, and then having a lot of text output causes the issue where the terminal is very far (minutes) behind with rendering the text output.
Issue 1:
Code to reproduce -

from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
import numpy as np

dtc = DecisionTreeClassifier().fit(np.random.random_sample((20, 2)), np.zeros((20, 1)))
export_graphviz(dtc, filled=True)

This is because the max_impurity and min_impurity are the same for a single node tree (colors['bounds'][0] == colors['bounds'][1]).

We should set the color in this case to a single value directly.

Issue 2:
Example:

from sklearn import tree

clf = tree.DecisionTreeClassifier()

clf.fit([[0]],[1])

tree.export_graphviz(clf, filled=True)

We'll get error in line 160 of sklearn/tree/export.py:

alpha = int(np.round(255 * ((value - colors['bounds'][0]) / (colors['bounds'][1] - colors['bounds'][0])), 0))

ValueError: cannot convert float NaN to integer

Basically we will get zero division, because colors['bounds'][0] equals colors['bounds'][1].
Issue 1:
Describe the issue:

np.abs(np.int64(-9223372036854775808)) -> -9223372036854775808

Reproduce the code example:

np.abs(np.int64(-9223372036854775808)) # -> -9223372036854775808

Error message:

No response

NumPy/Python version information:

1.23.0 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:03:09) [Clang 13.0.1 ]

Context for the issue:

No response

Issue 2:
Python:

In [117]: abs(-2147483646)
Out[117]: 2147483646

In [118]: abs(-2147483647)
Out[118]: 2147483647

In [119]: abs(-2147483648)
Out[119]: 2147483648L

In [120]: abs(-2147483649)
Out[120]: 2147483649L

In [121]: abs(-2147483650)
Out[121]: 2147483650L

NumPy:

In [93]: absolute(array([-2147483646]))
Out[93]: array([2147483646])

In [94]: absolute(array([-2147483647]))
Out[94]: array([2147483647])

In [95]: absolute(array([-2147483648]))
Out[95]: array([-2147483648])

In [96]: absolute(array([-2147483649]))
Out[96]: array([2147483649], dtype=int64)

In [97]: absolute(array([-2147483650]))
Out[97]: array([2147483650], dtype=int64)

In C this is undefined because abs() returns an int and there's no +2147483648, but NumPy should convert to int64? and then absolute(array(-2**63)) should convert to object array with longs instead of returning -9223372036854775808?

Related to #593?
Issue 1:
Bug report

Normally, systemwide configuration files at not completely ignored just because a local/user configuration file exists. But MPL will ignore default configuration values in /etc/matplotlibrc if a user matplotlibrc is found.

The documentation states that user configuration files are searched first, which, if you think about it, only makes sense if the configuration files are all mutually exclusive. But, this is not stated or acknowledged in the documentation, elsewhere. Since mutual exclusivity is abnormal behavior for configuration files, can you please, at least, make this more clear in the documentation?

Is it possible to implement more conventional behavior where the system-wide defaults are always read, if they exist, and the user-specific or local configurations override them?

Issue 2:
Only one matplotlibrc file is loaded instead of loading them in order of decreasing scope. So when I added a matplotlibrc file in my home directory it unexpectedly changed the backend that was being set in INSTALL/matplotlib/mpl-data/matplotlibrc because that file was no longer being loaded. I expected matplotlib to load the global (install) config and then apply my config on top of that.
Issue 1:
http://typescript.codeplex.com/workitem/488

"use strict";
class SomeClass {
public get someProperty(): string {
return "some value";
}
}
var someInstance = new SomeClass();
someInstance.someProperty = "another value"; //Run-time error. ECMAScript 5.1 - 11.13.1

Issue 2:
Some properties in JavaScript are actually read-only, i.e. writes to them either fail silently or cause an exception. These should be modelable in TypeScript.

Previous attempts to design this have run into problems. A brief exploration:

interface Point {
x: number;
y: number;
}
interface ImmutablePoint {
readonly x: number;
readonly y: number;
}
var pt: ImmutablePoint = { x: 4, y: 5 }; // OK, can convert mutable to non-mutable
pt.x = 5; // Error, 'pt.x' is not a valid target of assignment

var pt2: Point = pt; // Error, cannot convert readonly 'x' to mutable 'x'

// Possibly bad behavior
var pt3: Point = { x: 1, y: 1 };
var pt4: ImmutablePoint = pt3; // OK
pt3.x = 5; // pt4.x is also changed?

// Really bad behavior
/** This function was written in TypeScript 1.0 **/
function magnitudeSquared(v: { x: number; y: number }) {
return v.x * v.x + v.y * v.y;
}
// Now try to use it with ImmutablePoint
console.log(magnitudeSquared(pt)); // Error, cannot use readonly object in non-readonly call

Possible solutions?

Allow bivariance of mutability: this is very unsound

Something else clever? C++ did not do well with const contamination
Issue 1:
When you hover over the buttons, they shift and the right button loses the rounded corners.

http://jsfiddle.net/BA4zM/147/

I have confirmed using v2.0.4 of bootstrap.js this issue does not happen.

Issue 2:
http://jsfiddle.net/JEBdk/5/

tooltip or popover on btn-group. the btn-group is not display correctly!

the last btn have not round corners and between the btn's is a space.

my suggestion, by generating the tip or popover on the end of document .
Issue 1:
$ env | grep GO
GOARCH=amd64
GOROOT=/home/nigeltao/go
GOOS=linux
$ cat main.go
package main
import "net"
func main() {
net.Dial("unix", "", "/tmp/.X11-unix/X0")
}
$ 6g main.go && 6l main.6
$ 6prof ./6.out
ptrace waitpid: unexpected new tid 8827 status 0x137f

Issue 2:
What steps will reproduce the problem?

1. Cross-compile for linux/arm5.
2. Make a network request. My test harness for this bug was
http://play.golang.org/p/drwd1JwnTd

What is the expected output?

Success or failure

What do you see instead?

Hang

Which compiler are you using (5g, 6g, 8g, gccgo)?

5g

Which operating system are you using?

OS X 10.8.4

Which version are you using? (run 'go version')

go version devel +f31759c38a32 Mon Sep 23 13:19:08 2013 -0400 darwin/amd64

hg bisect shows that this bug was introduced by
https://code.google.com/p/go/source/detail?r=7afd81b7fe122e743f0db88f538eb3b4004be650

Please provide any additional information below.

I don't know whether cross-compilation or linux/arm5 is necessary; it is just how I
reproduced it here. There may also be something else unusual about my setup here.

Compiling for host (OS X) does not reproduce the problem, including with CGO disabled.

Let me know what other info I can provide.
Issue 1:
Description of the new feature/enhancement

Terminal should support ZModem upload/download. ZModem is a friction-free way to transfer files up to 4GB in size in a terminal session without using other tools.

Proposed technical implementation details (optional)

Add support for ZModem

Issue 2:
Summary of the new feature/enhancement

For terminals which support zmodem protocol (like Xshell), one can use lrzsz to upload and download files from remote server directly through ther terminal, or even drag and drop files to upload. It will be great if Windows Terminal can support this protocol.

Proposed technical implementation details (optional)

Unfortunately I cannot provide technical details. But I'd like to say thants for your great work.
Issue 1:
Describe the bug

import error in version 128

Code

export default class LoadLib {
constructor() {
const _base = 'https://cdn.jsdelivr.net/npm/three@0.128.0/'
this.url = _base + 'build/three.module.js'

this._base = _base + 'examples/jsm/'
this._obj = {
BufferGeometryUtils: this._base + 'utils/BufferGeometryUtils.js',
CopyShader: this._base + "shaders/CopyShader.js",
EffectComposer: this._base + "postprocessing/EffectComposer.js",
RenderPass: this._base + "postprocessing/RenderPass.js",
ShaderPass: this._base + "postprocessing/ShaderPass.js",
VignetteShader: this._base + "shaders/VignetteShader.js",
UnrealBloomPass: this._base + "postprocessing/UnrealBloomPass.js",
}

this.start().then()
}

async start() {
const THREE = await import(this.url)

const T3 = {}
for (let i in THREE) {
T3[i] = THREE[i]
}
window.THREE = T3

for (let i in this._obj) {
const f = await import(this._obj[i])
window.THREE = { ...window.THREE, ...f }
}
}

it runs very good until ver: 0.128

the error shows

it is the import script error, in version 0.128

in ver 0.127 it works correctly

Issue 2:
With version 128, the following code:

<script type="module">
import * as THREE from 'https://unpkg.com/three@0.128.0/build/three.module.js';
import { OrbitControls } from 'https://unpkg.com/three@0.128.0/examples/jsm/controls/OrbitControls.js';
</script>

causes the following error:

Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../".

It worked fine in 127 though.