WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I've run into some unexpected behavior when using numpy.matmul. For shape (2,2) array ar1 and shape (2,N) array ar2, the function's behavior appears to change unexpectedly with the dimension N.

Reproducing code example:

import numpy as np
ar1 = np.array([[1,0.1],[-0.1,1]])
ar2 = np.vstack([np.ones(100),np.zeros(100)])

ans1 = np.matmul(ar1,ar2[:,:7])
ans2 = np.matmul(ar1,ar2[:,:8])

In the code above, ans1 gives the expected result of

array([[ 1. , 1. , 1. , 1. , 1. , 1. , 1. ],
[-0.1, -0.1, -0.1, -0.1, -0.1, -0.1, -0.1]])

Similarly, I get the expected result when slicing ar2 with ar2[:,:i] for any i < 8. However, ans2 is:

array([[1.1, 1.1, 1.1, 1.1, 0. , 0. , 0. , 0. ],
[0.9, 0.9, 0.9, 0.9, 0. , 0. , 0. , 0. ]])

for other values of i > 8, the behavior becomes stranger. E.g. i = 10 yields:

array([[ 1.1, 1.1, 1.1, 1.1, 0. , 0. , 0. , 0. , 1. , 1. ],
[ 0.9, 0.9, 0.9, 0.9, 0. , 0. , 0. , 0. , -0.1, -0.1]])

and i=20 yields:

array([[ 1.1, 1.1, 1.1, 1.1, 0. , 0. , 0. , 0. , 1.1, 1.1, 1.1,
1.1, 0. , 0. , 0. , 0. , 1. , 1. , 1. , 1. ],
[ 0.9, 0.9, 0.9, 0.9, 0. , 0. , 0. , 0. , 0.9, 0.9, 0.9,
0.9, 0. , 0. , 0. , 0. , -0.1, -0.1, -0.1, -0.1]])

Have I misunderstood the intended behavior here? This is definitely not reproducing standard matrix multiplication. Thanks for any help!

Ben

Numpy/Python version information:

1.16.4

3.7.3 (default, Mar 27 2019, 22:11:17)

[GCC 7.3.0]

Issue 2:
If I take an array and create a view using newbyteorder, the output from tostring is not byteswapped:

In [2]: import numpy as np

In [3]: x = np.array([1,2,3], dtype=np.int16)
...: y = x.byteswap(False)
...: z = x.newbyteorder('S')

In [4]: print(x.tostring())
b'\x01\x00\x02\x00\x03\x00'

In [5]: print(y.tostring())
b'\x00\x01\x00\x02\x00\x03'

In [6]: print(z.tostring())
b'\x01\x00\x02\x00\x03\x00'

I think z.tostring() should match y.tostring() instead?

I'm using Numpy 1.11.2 with Python 3.6

A related issue is that the data memoryview on z is also not byteswapped, i.e.:

import numpy as np
from io import BytesIO

x = np.array([1,2,3], dtype=np.int16)
y = x.byteswap(False)
z = x.newbyteorder('S')

for array in [x, y, z]:

b1 = BytesIO()
b1.write(array.data)
b1.seek(0)
print(b1.read())

gives:

b'\x01\x00\x02\x00\x03\x00'
b'\x00\x01\x00\x02\x00\x03'
b'\x01\x00\x02\x00\x03\x00'
Issue 1:
@ I'm running very simple server. But I have some errors. How I can solve this? I already updated to deno v1.2.1. But steel have this error.

error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.

Type 'URL' is not assignable to type 'string'.

return new URL(url).pathname

~~~

at https://deno.land/std@v0.50.0/path/win32.ts:911:18

TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.

Type 'URL' is not assignable to type 'string'.

return new URL(url).pathname;

~~~

at https://deno.land/std@v0.50.0/path/posix.ts:433:18

Issue 2:
For completeness, we should add Node's assert module.

We should also decide whether we want to include its legacy assertion mode, or if we expect that to be deprecated.
Issue 1:
When create a numpy array from a list of integers, if some integers are in range [2^63, 2^64) and some integers are in range [0, 2^63), we get a numpy array with dtype=np.float64 instead of dtype=np.uint64.

Reproducing code example:

import numpy as np
import sys

a = np.array([2**63, 2**63 + 1, 2**63 + 2**62])
print(a, a.dtype) # It's ok!

a = np.array([2**63, 2**63 + 1, 2**63 + 2**62, 123456])
print(a, a.dtype) # In this case, a.dtype == np.float64, but we expect np.uint64

a = np.array([2**63, 2**63 + 1, 2**63 + 2**62, 123456], dtype=np.uint64)
print(a, a.dtype) # It's ok!

print(np.__version__, sys.version)

NumPy/Python version information:

1.18.5 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]

Issue 2:
When np.array() or .asarray() is used to go from a list of integers, without specifying a dtype explicitly, it can pick default dtypes including int64 & uint64. But there's a strange corner case where it defaults to float64 and loses precision, even though all the values could be uint64. Specfically, this occurs when some but not all values can be int64:

In [11]: max_int64 = np.iinfo(np.int64).max

In [12]: np.array([max_int64]).dtype
Out[12]: dtype('int64')

In [13]: np.array([max_int64 + 1]).dtype
Out[13]: dtype('uint64')

In [14]: np.array([max_int64 + 1, max_int64]).dtype
Out[14]: dtype('float64')

It doesn't depend on the order they're in, and it's not a general consequence of having two values rather than one - two values above this threshold get uint64 as I'd expect.

Tested on Numpy 1.18.4, Python 3.8.2.

Sorry if this has already been discussed; it's a tricky thing to search for. This relates to an issue reported on h5py: h5py/h5py#1547 .
Issue 1:
I do understand that box-sizing: border-box; is perfect way to go for all box models but you guys are forgetting yourself or you are just asking Bootstrap users to drop it.

Instead of applying box-sizing: border-box; where you need it you went the other way around and just threw this in .

* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

You even utilize normalize.css where in fact they were very cautious where to use it.

https://raw.github.com/necolas/normalize.css/master/normalize.css

I am not sure if you are aware how many websites are using bootstrap in conjunction with other plugins and scripts, or just as an addon for stylish buttons and forms. With this you are braking layouts left and right.

On Stackoverflow many posts are coming up with this exact issue.

OK Paul Irish

http://www.paulirish.com/2012/box-sizing-border-box-ftw/

but this late in a game and as a wildcard is irresponsible. Paul suggested this as a perfect solution and it works for people who are building something from scratch. But majority of your users are implementing Bootstrap in existing web layouts.

You deliver a file that is over 6k lines , if you took some time and just lineup where exactly you need border-box that would be perfect way to go.

.row,

.form-group,

.form-control

.checkbox

and few others would save the headache for many people out-there..

http://stackoverflow.com/questions/19109470/twitter-bootstrap-box-sizing-ruined-my-layout

http://stackoverflow.com/questions/20478498/why-is-bootstrap-css-using-box-sizing-border-box

http://stackoverflow.com/questions/15405837/using-box-sizing-border-box-with-twitter-bootstrap-2-x-can-we-do-it-easily-wi

mleibman/SlickGrid#742

Now this one is funny,

http://responsivesharepoint.codeplex.com/discussions/456314

poor guy!

Sorry for my rant I hope you understand.

Issue 2:
The snippet below can be found in bootstrap.css:

*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

Using this global css reset is fine as long as someone uses Bootstrap exclusively. Once third party scripts come into play this global reset to border-box starts messing up layouts.

For example, a lot of bug reports I'm getting for my (lightbox and tooltip) scripts concerning layouts being off end up being caused by this practice in Bootstrap. I'd say it's not something that belongs in a framework, unless it's meant to be used without third party scripts.

Foundation used to have this problem. It was fixed very elegantly in 5.0 by using a mixin to add the box-sizing reset to just the components that need it. By not defining it on * third party scripts remain unaffected and work out of the box. They can rely on the default box-sizing content-box being in place without anyone having to make css adjustments to reset things back to default.

I'm hoping something similar can be done in Bootstrap.
Issue 1:
Problem

I want to some stable functions provided by std/fs/mod.ts without enabling unstable features, but it does not compile.

Proposal

Separate unstable part of standard libraries from stable part. For example: std/fs/mod.ts will only include stable functions, std/fs/unstable/mod.ts will include all functions.

Issue 2:
Parts of the standard library now require the --unstable option to function. I suggest we move all things that use unstable APIs into different files which are then re-exported by multiple entry points: mod.ts and unstable.ts. unstable.ts would re export mod.ts + all unstable features.
Issue 1:
This issue was raised at #20421 (comment). We should define clear rules regarding when it's OK to use @inbounds in Base code. Currently the code seems to be inconsistent.

@JeffBezanson mentioned this: "only use @inbounds when you can be certain, from local information, that all accesses are in bounds." In a strict interpretation, that would mean @inbounds for i in eachindex(a) is not correct when a::AbstractArray, since an incorrect array implementation could return invalid indices, which would crash Julia.

This strict interpretation is problematic since (as @stevengj noted) often a generic AbstractArray method is also used for Array: if we cannot use @inbounds there, performance suffers in the common case just to avoid possible crashes in rare cases. A mechanism to enable @inbounds only for trusted types could help, but it would still be too bad that custom array types wouldn't benefit from bounds checking removal even when they implemented everything correctly: that would defeat the goal of making user-defined type as efficient as Base types. So I would say we need to trust custom array types, or at least allow them to opt out of bounds checking by stating that they are safe. Cf. #15291.

Issue 2:
When one changes the language, it forces packages to choose between using a new feature and only working on new versions of Julia or not using the feature but supporting new and old versions. For non-syntactic changes, you can often work around this with fairly simple conditional definitions. For syntax changes (which are blessedly rare), this doesn't work. To allow code to gracefully handle new syntax while still parsing in older versions of Julia, we're going to introduce, ironically, a new syntax feature: pragmas. The first pragma will be the feature pragma, used as follows:

%if feature conditional_modules
# write code that uses the conditional_modules feature
%else
# fallback code that doesn't use the conditional_module feature
%end

A Julia parser will have a list of feature names. If the parser recognizes a feature name, it parses the file as if the source were the code between the %if and %else or if there is no %else until the %end. If the parser doesn't recognize the feature name, it parses the file as if the source were the code between the %else and the %end or as if the source were empty if there is no %else.

In general, %if pragmas nest:

%if A
%if B
# A and B
%else
# A but not B
%end
%else
# neither A nor B
%end

There should probably also be a %ifelse to handle the classic ambiguity here. Other pragmas, should we introduce them are single-line.
Issue 1:
When opening the run-inbox by pressing the key(ctrl+space in my case) opens the run-window. But it is always prefilled with my last input.

In the original wox-implementation there is a option to disable this. Please merge this into this variant.

Issue 2:
Instead of the normal search, open PowerToys Run when clicking on the icon on the taskbar.

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Issue 1:
Hi,

I like typesctipt a lot and recently I updated my compiler to version 1.6.

I have some classes that were "abstract" and now I want to use the new keywork abstract

My question is as follow:

In order to scope the ``this` variable I used the following type of methods when calling them from JQuary/Angular promise:

export class SomeClass {
public handleCallback = () => {
this.whatEver();
//...
}
}

This will make sure that if I use this callback for an async operation the this variable will be correct.

How do I the same with abstract classes since I can't specify an abstract property?

Issue 2:
TypeScript Version:

nightly (1.9.0-dev.20160604-1.0)

Code

let foo:number|null = 0;

switch(foo) {
case null:
break;
case 0:
console.log('bar');
}

Expected behavior:

Null check should be allowed

Actual behavior:

Compiler complains "TypeScript Type 'null' is not comparable to type 'number'. (TS2678)"

Note:

If I add an 'if' condition before the switch, the compiler does not complain about either the 'if' or the switch. For instance:

let foo:number|null = 0;

if (foo === null) { console.log('bar'); }

switch(foo) {
case null:
break;
case 0:
console.log('bar');
}
Issue 1:
I like to double click words to highlight them. I find if I'm too close to some punctuation (a period or parentheses, for instance), the highlight grabs that character too.

Issue 2:
In Sublime when I click on a word, it selects just that word, even if the cursor is on other words. This is useful when adding a new argument in a method and replacing some other text elsewhere (which I tried to show in the gif below).

Related to this, it seems like double click the word in the parents is including the preceding (, which is not right.
Issue 1:
MacOS supports multiple desktops. I show window when user taps on tray icon and hide it when user clicks somewhere else. Is there any way to show window on current desktop?

Using setVisibleOnAllWorkspaces makes window visible on all desktops but calls to window.show still cause switch to the desktop where the window was initially created/displayed.

I know I could re-create window each time, but that's slow. Would be awesome to have a method like BrowserWindow.showOnCurrentDesktop() or something like that. Not sure I can patch it externally without patching Electron/Atom.

Electron version: 1.6.0

Operating system: macOS Sierra

Issue 2:
All major platforms now support workspaces (virtual desktops), we should probably add a set of workspace related API, so it can:

get the workspace of window;

list available workspaces;

choose which workspace to put the new window;

move windows between workspaces.
Issue 1:
Description of the problem

UUID generation in Math.js produces strings stored as concatenated strings in Firefox and Chrome.

On Chrome 40bytes are used for each component of the final string, creating heap overhead. In my application with thousands of objects this adds up.

For example, Heap size using Chrome

r89 as is: 95MB

r89 with uuid flattened with String().toUpper(): 66MB.

I see similar results using Firefox.

Three.js version

Dev

[x ] r89

...

Browser

All of them

[x ] Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Issue 2:
Version r75 and onwards seems to have broken being able to render multiple point lights on android devices. I have tested this on a few different devices, with the primary one being my Nexus 5.

As you can see on the attached images only the red light will get rendered.

Android:

Desktop:

Three.js version

r75+

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

[] All of them

Windows

Linux

Android

IOS
Issue 1:
I wonder how this one slipped through all this time

When I hit "format code"...

<div>
</div>

becomes

<div>
</div>

Can be seen in #6281. Possibly related to #6271.

Issue 2:
create a new .tsx file with content

<div>
</div>

select all -> format document

Expected: formatting stays the same

Actual: closing tag is indented
Issue 1:
Examples bug report

Example name

with-ant-design-less

Describe the bug

Links doesn't work on production build when using Ant design in pages.

To Reproduce

Clone repo: https://github.com/watch-janick/next-with-ant-design-less-link-issue.git

Start a production build (npm run build && npm run start)

Go to localhost:3000

Click on 'login'

Nothing happens

Go to localhost:3000/login

Click on any link

It works

Expected behavior

Every links should work.

System information

Version of Next.js: 9.1.6

Version of Ant Design: 3.25.2

Issue 2:
This is bug report

Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:

https://github.com/standy/next-css-error

Bug appears in next@7.0.0 + next-css@1.0.1,

Older next@6.1.2 + next-css@0.2.0 works fine
Issue 1:
I have been using v1.6.1 for a while. Recently I tried to compile the nightly built and got errors as attached. This is obviously a Fedora problem, as the nightly built can be compiled on el7 and centos 7. But I post them here, hoping it can be solved on Julia side.

Many thanks.

/usr/bin/ld: ./codegen.o: in function `__gnu_cxx::new_allocator<llvm::Type*>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o:/usr/include/c++/11/ext/new_allocator.h:110: more undefined references to `std::__throw_bad_array_new_length()' follow

Issue 2:
git master fails to build on Fedora 34 (with GCC 11). This happens even with a fresh clone.

$ make
[...]
LINK usr/lib/libjulia-internal.so.1.7
/usr/bin/ld: ./codegen.o: in function `__gnu_cxx::new_allocator<llvm::Type*>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /usr/include/c++/11/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: ./llvm-late-gc-lowering.o:/usr/include/c++/11/ext/new_allocator.h:110: more undefined references to `std::__throw_bad_array_new_length()' follow
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:300: /home/milan/julia/usr/lib/libjulia-internal.so.1.7] Error 1
make: *** [Makefile:76: julia-src-release] Error 2
Issue 1:
I'm finding VS Code is fairly hard to use efficiently without an integrated terminal.

I have to type make repeatedly in a separate bash window (remembering to hit ctrl-s every time!), and from there, I can't double-click on compile errors to go to the line+file.

At a minimum, it would be good to have an integrated shell, and support clicking errors to go to the source.

Ideally, once integrated, a macro could: save all -> execute make, and productivity would increase substantially.

Issue 2:
It would be great if vscode has integrated terminal feature refer vim or atom https://atom.io/packages/term3

I saw this suggestion pending in uservoice(https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7752357-integrated-terminal) and repost here since it has specific repo
Issue 1:
Verified that version 4.2.0 works well, so a recent regression. Haven't tried to create a small example to reproduce, but since it's a recent bugfix version that should be fairly easy to pinpoint.

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Page load throws console error: Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.null

// Chrome console
6VM598:27 Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.null
window.console.error @ VM598:27
printWarning @ warning.js:36
warning @ warning.js:60
mountIndeterminateComponent @ react-dom.development.js:10488
beginWork @ react-dom.development.js:10647
performUnitOfWork @ react-dom.development.js:12621
workLoop @ react-dom.development.js:12730
callCallback @ react-dom.development.js:1319
invokeGuardedCallbackDev @ react-dom.development.js:1358
invokeGuardedCallback @ react-dom.development.js:1215
performWork @ react-dom.development.js:12848
batchedUpdates @ react-dom.development.js:13292
performFiberBatchedUpdates @ react-dom.development.js:1666
stackBatchedUpdates @ react-dom.development.js:1657
batchedUpdates @ react-dom.development.js:1671
batchedUpdatesWithControlledComponents @ react-dom.development.js:1684
dispatchEvent @ react-dom.development.js:1894

What is the expected behavior?

No console error. Or at least some way to trace which is the stateless component that is causing the issue.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

"react": "^16.0.0-rc.3",

Chrome Version 60.0.3112.113 (Official Build) (64-bit)

macOS Sierra 10.12.6

This error only started to appear after upgrading from React 15 -> 16.
Issue 1:
Thanks for #5185 🌹. Would be great if we could get autocomplete support for string literals

type Foo = "aReallyLong" | "bReallyLong";
let foo:Foo;
foo = "aReallyLong"; // allow me to autocomplete this

refs #5554 (comment)

Issue 2:
Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle browsing to particular URLs. TypeScript added specialized signatures in overloads as one means to help mitigate the pain associated with these types of APIs. Unfortunately for a number of patterns this is insufficient and not general enough. Rather than try to design a specific type system enhancement that could handle some or all of the many ways these frameworks use string literals we could try some simple tricks in Visual Studio to help out. Namely, when typing a string literal the editor should provide a completion list based on other string literals already used in your program. Some other tools already provide similar capabilities (ex Sublime Text).

Consider something like this in a Backbone View class:

class TodoView extends Backbone.View<TodoModel> {
initialize() {
this.listenTo(this.model, 'change', () => this.render());
this.listenTo(this.model, 'todoDescriptionChanged', () => this.render());
this.listenTo(this.model, 'destory', () => this.remove());
}

At another point I may attempt to manually trigger one of these events:

updateTodo() {
var desc = this.$input.val().trim();
var todo = this.model;
if (desc) {
todo.save({ title: desc });
// provide completion list inside this string literal showing
// todoDescriptionChanged to avoid hard to debug typos
// and speed up development
todo.trigger('todoDescriptionChanged');
}
}

This should be a relatively cheap solution to a common set of problems that we've always hoped TypeScript can improve on over JavaScript. If you did accidentally make a typo in one use of the literal this could also help you discover that when seeing 2 completion list items that are similar but slightly different.