WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When adding int 1 to a numpy {u}int array, usually a type conversion to int64 happens. This is normal. If, however, the type is uint64, the array gets converted to float64. I had not expected that. Perhaps it's correct though. Opinions?

MWE:

import numpy

a = numpy.array(0, dtype=int)
print((a + 1).dtype) # int64

a = numpy.array(0, dtype=numpy.uint16)
print((a + 1).dtype) # int64

a = numpy.array(0, dtype=numpy.uint32)
print((a + 1).dtype) # int64

a = numpy.array(0, dtype=numpy.uint64)
print((a + 1).dtype) # float64!

Issue 2:
Hi,

This is my first issue so I apologize if I have gotten something obviously wrong. Essentially, it appears that when using the polyfit function from numpy.polynomial.polynomial, the coefficients are returned with lowest order first; this is the opposite of what happens when the function numpy.polyfit is called. I believe that the documentation for both functions states that the highest order coefficient should be returned first. As an example, I've attached a screenshot of an IPython notebook with a minimal example along with the code. My version of numpy is 1.10.4 and I am on Debian 3.16.0-4.

from numpy.polynomial.polynomial import polyfit
import numpy as np
print np.version.version
print np.polyfit([1,2],[2,4],1)
print polyfit([1,2],[2,4],1)
Issue 1:
I'm attempting to create windows nightlies, inspired by @ihnorton's recent windows builds, and I'm running into the following error during the second bootstrap phase with both 32 and 64-bit builds:

...
meta.jl
i18n.jl
help.jl
sparse.jl
sparse/abstractsparse.jl
matrixmarket.jl
linalg.jl
broadcast.jl
fftw.jl
dsp.jl
rounding.jl
gmp.jl
mpfr.jl
constants.jl
quadgk.jl
deprecated.jl
git.jl
pkg.jl
graphics.jl
profile.jl
err:dbghelp_stabs:stabs_parse Unknown stab type 0x0a

abnormal program termination
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
make[1]: *** [/home/sabae/tmp/julia-packaging/win32/julia-master/usr/bin/sys.ji] Error 1
make: *** [release] Error 2

This is being done on a headless, 64-bit ubuntu 13.04 machine. I should point out that because of the headless part, when I run the make process, I get some warnings about not being able to open up an X window, so perhaps there is some kind of configuration I need to do?

Issue 2:
This used to work on Julia 0.6.2, but on master Missing is lost:

julia> f(::Type{T}) where {T<:Union{Integer, Missing}} = T
f (generic function with 1 method)

julia> f(Union{Missing, Int})
Int64
Issue 1:
Environment

Windows build number: Windows 10 Insider Preview Build 20152.1000
PowerToys version: v0.18.2

Steps to reproduce

Opened the PowerToys app and two Window appeared with different designs.

Screenshot

Issue 2:
Environment

Windows build number: 2004 (Microsoft Windows [Version 10.0.19041.329])
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): RUN

Steps to reproduce

Have Windows 10 v 2004.

Look in Settings...Run.

Expected behavior

Run no longer configurable because it thinks I have an old version of Windows.

Actual behavior

"This feature requires Windows 10 version 1903 or higher"
Issue 1:
Nick Williams opened SPR-7619 and commented

MappingJacksonJsonView is a very simple implementation of a JSON-rendering view. There are many cases where one might need to extend MappingJacksonJsonView to accomplish more complicated tasks. It would be nice if the "objectMapper," "encoding," "prefixJson" and "renderedAttributes" fields could be made protected instead of private to make extending MappingJacksonJsonView a little easier.

Thanks!

Affects: 3.0.1

Referenced from: commits f57bc1a

Issue 2:
Andrei Stefan opened SPR-3556 and commented

I made two tests:

one with AspectJ support;

one with Spring's AspectJ support.

The tests involve two interfaces: Base<T> and DerivedInterface<T> extends Base<T>.

A Before pointcut matching all methods from Base and DerivedInterface is defined: @Before("execution(* example.Base+.*(..))")

In AspectJ a test creating an instance of a class implementing DerivedInterface: DerivedInterface<String> obj = new DerivedString(); and then calling methods on both interfaces demonstrates advice being applied on both methods.

The same test in Spring getting a bean instance from ApplicationContext like DerivedInterface<String> bean = (DerivedInterface<String>) context.getBean("myBean"); and calling methods on both interfaces, the advice is not applied to methods receiving as parameter the generic type <T>.

Methods like method(<T>) don't get the advice applied, but method2() have the advice applied.

Affects: 2.0.5, 2.1 M3

Attachments:

SpringAspectJ.zip (1.86 kB)

Issue Links:

#8309 Spring AOP @Aspect pointcut ignores generic type params and matches to many join points ("is depended on by")

#8559 AspectJ pointcut expressions fail to match generically parameterized methods ("is duplicated by")
Issue 1:
Describe the bug

AxiosHeaders, AxiosError, CanceledError and Axios are "exported" in the type definitions index.d.ts, but not exported in the module.

To Reproduce

const { AxiosHeaders } = require('axios'); // Allowed by Typescript

const headers = new AxiosHeaders({ 'name': 'value' }); // <-- throws Error as AxiosHeaders is not actually exported

Expected behavior

Types are not exported, but only declared (declare class instead of export class).

Classes are exported and can be imported and used like so:

import { AxiosError, AxiosHeaders, Axios, CanceledError } from 'axios';

new AxiosError();
new AxiosHeaders();
new Axios();
new CanceledError();

Environment

Axios Version 1.1.0

Node.js Version 16.15.1

OS: OSX 12.5

Typescript 4.6.3 (any version)

React 17

Additional context/Screenshots

none

Issue 2:
Hello,

When I tried to update the axios to version 1.0.0, I get this error. It works fine with 0.27.2

In the bootstrap.js, I used it with:

window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

Please advise. Thank you.
Issue 1:
Describe the bug

yarn dev works fine, but yarn build && yarn start errors out

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

clone repo, cd examples/with-styletron, yarn install

yarn build

yarn start

Load http://localhost:3000

See error in shell:

> Ready on http://localhost:3000
TypeError: Cannot read property 'renderStyle' of undefined
at driver (/Users/s/workspace/next.js/examples/with-styletron/node_modules/styletron-standard/dist/index.js:16:20)
at Object.StyledElement.React.createElement [as children] (/Users/s/workspace/next.js/examples/with-styletron/node_modules/styletron-react/dist/index.js:284:32)
at a.render (/Users/s/workspace/next.js/examples/with-styletron/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:44:64)
at a.read (/Users/s/workspace/next.js/examples/with-styletron/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:58)
at renderToString (/Users/s/workspace/next.js/examples/with-styletron/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:53:83)
at render (/Users/s/workspace/next.js/examples/with-styletron/node_modules/next-server/dist/server/render.js:86:16)
at renderPage (/Users/s/workspace/next.js/examples/with-styletron/node_modules/next-server/dist/server/render.js:211:20)
at Function.getInitialProps (/Users/s/workspace/next.js/examples/with-styletron/.next/server/static/RUt_NNFZYVNClDESx18vF/pages/_document.js:398:18)
at Object.loadGetInitialProps (/Users/s/workspace/next.js/examples/with-styletron/node_modules/next-server/dist/lib/utils.js:42:35)
at Object.renderToHTML (/Users/s/workspace/next.js/examples/with-styletron/node_modules/next-server/dist/server/render.js:218:36)

Expected behavior

Page should render properly

Screenshots

If applicable, add screenshots to help explain your problem.

System information

OS: macOS

Browser (if applies) [e.g. chrome, safari]

Version of Next.js: latest

Additional context

Add any other context about the problem here.

Issue 2:
Bug report

Describe the bug

In Next.js 8.1.0 React Context.Consumer receives value of undefined

Only on server side

UPDATE: Only in production, not in npm run dev

To Reproduce

Reproduce repository - link

const MyContext = React.createContext();

function Home() {

return <MyContext.Provider value={{ x: "123" }}>
<MyContext.Consumer>
{value => value.x}
</MyContext.Consumer>
</MyContext.Provider>
}

export default Home;

Expected behavior

MyContext.Consumer value should receive object from MyContext.Provider

System information

Version of Next.js: 8.1.0

Additional context

Also an issue for many Antd components
Issue 1:
x = tf.zeros([10])
tf.gradients(tf.reduce_prod(x, 0), [x])

Gives

more traceback

/home/***/.local/lib/python2.7/site-packages/tensorflow/python/ops/math_grad.pyc in _ProdGrad(op, grad)
128 reduced = math_ops.cast(op.inputs[1], dtypes.int32)
129 idx = math_ops.range(0, array_ops.rank(op.inputs[0]))
--> 130 other, _ = array_ops.listdiff(idx, reduced)
131 perm = array_ops.concat(0, [reduced, other])
132 reduced_num = math_ops.reduce_prod(array_ops.gather(input_shape, reduced))

more traceback

In line 128, op.inputs[1] could be a scalar, which will cause a shape mismatch when passed to array_ops.listdiff in line 130.

TF version: master branch a week ago

Issue 2:
Installed TensorFlow using pip package for v0.10.0rc0 on Ubuntu with python 2.7

Pip package https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl

The same error appears in the GPU build.

The following minimal code example produces raise an exception at the definition of z

u = tf.placeholder(dtype=tf.float64, shape=(30,30))
v = tf.reduce_prod(u, reduction_indices=[0])
w = tf.gradients( v, u )

x = tf.placeholder(dtype=tf.float64, shape=(30,30))
y = tf.reduce_prod(x, reduction_indices=0)
z = tf.gradients( y, x )

z = tf.gradients( y, x )

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gradients.py", line 478, in gradients

in_grads = _AsList(grad_fn(op, *out_grads))

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/math_grad.py", line 130, in _ProdGrad

other, _ = array_ops.listdiff(idx, reduced)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1201, in list_diff

result = _op_def_lib.apply_op("ListDiff", x=x, y=y, name=name)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 703, in apply_op

op_def=op_def)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2312, in create_op

set_shapes_for_outputs(ret)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1704, in set_shapes_for_outputs

shapes = shape_func(op)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1981, in _ListDiffShape

op.inputs[1].get_shape().assert_has_rank(1)

File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 621, in assert_has_rank

raise ValueError("Shape %s must have rank %d" % (self, rank))

ValueError: Shape () must have rank 1

The top code for u,v and w does not raise an error but the similar code for x,y, and z does. It looks like the shape code for reduce_prod cannot cope with the case where the reduction_indices is a single integer rather than a list. If you replace reduce_prod with reduce_sum in the above snippet then it does not raise an error.
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When using the currency pipe to format a number specifying the valid ISO 4217 currency code for South Africa 'ZAR' and setting the SymbolDisplay to true the currency code is not replaced by the currency symbol, in this case 'R'.

Expected behavior

The expected behavior is for the projected property to display the currency symbol instead of the currency code when symbolDisplay is true and currencyCode is set to 'ZAR'.

Minimal reproduction of the problem with instructions

{{someamount | currency:'ZAR':true:'1.2-2'}}

What is the motivation / use case for changing the behavior?

We need to format currency with the South African currency symbol.

Please tell us about your environment:

macOS Sierra, webpack, ng serve (angular-cli: template used: 1.0.0-beta.11-webpack.9-4)

Angular version: 2.0.0-rc.7

Browser: all

Language: all

Node (for AoT issues): node --version =

Issue 2:
I'm using the currency pipe with beta.0, and with the following code inside ionic 2:

<ion-card-content>
Total: {{ total | currency:'COP':true }}
</ion-card-content>

The output should be Total: $ 110,000 but the actual output is this:
Issue 1:
by plnordahl:

Running Mavericks 10.9.2 and using the patch from
https://groups.google.com/forum/#!msg/golang-codereviews/it4yhth9fWM/TxcE1Yx6AUMJ (issue
7510) on release-branch.go1.2, I'm not seeing the variable names of int, string, float,
or map variables in a simple program. I do however see names for slices, arrays, and
struct/struct members in the output. Below is some code to reproduce the behavior.

One program, which will be loaded for it's DWARF data:

package main

import "fmt"

func main() {
myInt := 42
mySecondInt := 41
fmt.Println(myInt, mySecondInt)

myArray := [2]string{"hello", "world"}
fmt.Println(myArray)

myString := "foo"
fmt.Println(myString)

mySlice := []int{1, 2, 3}
fmt.Println(mySlice)

myFloat := 42.424242
fmt.Println(myFloat)

myMap := make(map[string]string)
fmt.Println(myMap)

myStruct := myStructType{"bleh", 999, "hm"}
fmt.Println(myStruct)
}

type myStructType struct {
Bleh string
Blerg int
Foo string
}

...and the second, which just loads the Mach-O binary and prints each entry's offset,
tag, children, and fields (pipe the output of this program into grep to see the behavior
I describe).

package main

import (
"debug/macho"
"fmt"
"log"
)

func main() {
m, err := macho.Open("<put the path to where your test binary is located>")
if err != nil {
log.Fatalf("Couldn't open MACH-O file: %s\n", err)
}

d, err := m.DWARF()
if err != nil {
log.Fatalf("Couldn't read DWARF info: %s\n", err)
}

r := d.Reader()

for {
entry, err := r.Next()
if err != nil {
log.Fatalf("Current offset is invalid or undecodable. %s", err)
}
if entry == nil {
fmt.Println("Reached the end of the entry stream.")
return
}

fmt.Println("Entry --- offset: ", entry.Offset,
" tag: ", entry.Tag, " children: ", entry.Children,
" field: ", entry.Field)
}

return
}

Issue 2:
by seanerussell:

What steps will reproduce the problem?
1. Compile the attached file (steps to compile listed below)
2. Execute on Windows
3. Watch the memory use with Resource Monitor

The application memory use increases at a rate of about 1KB every 5s until it exceeds
the stack (heap?) space and crashes.

I'm using Go 6d7136d74b65 weekly/weekly.2011-10-18 and am compiling on Linux,
cross-compiling for Windows using gb (go-gb.googlecode.com) via "GOOS=windows
gb"; 6g/l are the compilers being used.

The Linux machine is 2.6.32-32-generic #62-Ubuntu SMP, and the code is executing on
Windows Server 2008 R2 Standard, 6-core AMD Opteron 2425 HE 2.1GHz x 2, 32GB RAM, 64-bit.

I don't see similar behavior on Linux; the process memory use does grow very slowly for
a while, but appears to eventually plateau after a few minutes.

If this isn't a memory leak, but is explained by expected behavior, could I get a
pointer to a document describing the cause?

Attachments:

memconsumer.go (1308 bytes)
Issue 1:
It seems that document.hidden is not working once the browser is controlled by Playwright.

Given you open a browser tab (outside of playwright) and inject in the console the script :

setInterval(() => {console.log(`document.hidden = ${document.hidden}`)}, 1000)

When you open a new browser tab

And you wait a few seconds

And you come back to the previous tab

Then you have the following logs in the console:

When you do the same steps in a browser controlled by Playwright

Then you have the following logs in the console :

Unless I am wrong, document.hidden should be handled by Playwright.

This missing feature prevents to test the front stops specific activities (for example the front stops to poll a rest API endpoint) when the user switches from one browser tab to another, and vice-versa: the front should, for example, restart it's polling activity when the browser tab becomes actif again.

Regards

Issue 2:
Presently Playwright treats all tabs as active. This can become an issue when a tab we're not currently focusing on is running a lot of work.

I'll use the site MakeUseOf.com as an example. When this tab is active, it can consume 25-30% CPU time on my brand new MBPro. Under normal Chromium, when the tab is not the current tab Chromium will throttle timers (and whatever else it may do) and the site will settle around 2% CPU.

Under Playwright, this inactive tab will continue to use full resources (25-30% CPU).

I'd like to see a flag or an API call (page.goToBack() was suggested) that would allow inactive tabs to sleep.

Here's a link to the original discussion.

Thanks!
Issue 1:
When concatting two dataframes where there are a) there are duplicate columns in one of the dataframes, and b) there are non-overlapping column names in both, then you get a IndexError:

In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1'])
...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2'])

In [10]: pd.concat([df1, df2])

Traceback (most recent call last):
File "<ipython-input-10-f61a1ab4009e>", line 1, in <module>
pd.concat([df1, df2])
...
File "c:\users\vdbosscj\scipy\pandas-joris\pandas\core\index.py", line 765, in take
taken = self.view(np.ndarray).take(indexer)
IndexError: index 3 is out of bounds for axis 0 with size 3

I don't know if it should work (although I suppose it should, as with only the duplicate columns it does work), but at least the error message is not really helpfull.

Issue 2:
dti = pd.date_range('2016-09-23', periods=3, tz='US/Central')
df = pd.DataFrame(dti)

>>> df.T
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pandas/core/frame.py", line 1941, in transpose
return super(DataFrame, self).transpose(1, 0, **kwargs)
File "pandas/core/generic.py", line 616, in transpose
new_values = self.values.transpose(axes_numbers)
File "pandas/core/base.py", line 697, in transpose
nv.validate_transpose(args, kwargs)
File "pandas/compat/numpy/function.py", line 54, in __call__
self.defaults)
File "pandas/util/_validators.py", line 218, in validate_args_and_kwargs
validate_kwargs(fname, kwargs, compat_args)
File "pandas/util/_validators.py", line 157, in validate_kwargs
_check_for_default_values(fname, kwds, compat_args)
File "pandas/util/_validators.py", line 69, in _check_for_default_values
format(fname=fname, arg=key)))
ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose()

Looks like this is b/c df.values is a DatetimeIndex
Issue 1:
CSS Grid layout excels at dividing a page into major regions, or defining the relationship in terms of size, position, and layer, between parts of a control built from HTML primitives.

Watched a youtube about CSS Grids: https://youtu.be/txZq7Laz7_4

Nice concept that seems to play nice with component based development. Integration with Next.js may prove to solve CSS issues and the way we think about making apps.

Probably goes against providing options to the developer but could image a lean mean workflow.

Any thoughts?

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

Expected Behavior

Standard <style jsx> with built in support for grid layouts/fallback support.

Current Behavior

Currently CSS can be a mess and look quite ugly with multiple nested divs and leads to accessibility issues.

Steps to Reproduce (for bugs)

To many options for front end CSS frameworks that don't work well with component based workflow.

Heavy CSS frameworks in the global space.

Incomplete CSS react libraries like Semantic UI.

Doing things the old way.

Context

Providing a rich UX is one of the most complicating parts of developing an app and Next.js definitely makes things easier and is also lightning fast. I believe something like "CSS Grid" could make layouts of the components where you want them easy while increasing performance.

Links

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout

https://css-tricks.com/snippets/css/complete-guide-grid/

https://www.w3.org/TR/css-grid-1/

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

Expected Behavior

Calling Router.push({pathname: 'about'}) should work just as <Link href={{pathname: 'about'}}/> does, and as described here.

Current Behavior

Client side, it throws an error Route name should start with a "/", got "page" (thrown from https://github.com/zeit/next.js/blob/v3-beta/lib/page-loader.js#L22)

It then immediately falls back to the server side route, which then loads the page as usual.

Depending on how long the server page takes to load, you may or may not see the error above.

Note that absolute pathnames (/about) work as normal.

Steps to Reproduce (for bugs)

https://github.com/tmeasday/next-routing-bug - git clone https://github.com/tmeasday/next-routing-bug; cd next-routing bug; npm install; npm run dev

Click the "Link" or "Leading Slash" tags, notice normal behaviour.

Click the "No Leading Slash" tag, notice the error for 2 seconds (how long the "page" takes to load).

Inspect the server console and note that the "page" page loaded from the server.

Context

I think the issue here is that the Link calls url.resolve here, where as Router.push does not.

I suspect the resolve call should come somewhere deeper in the stack.

Your Environment

Tech
Version

next
2 + 3 betas

node
8.1.0

OS
macOS 10.12.5

browser
Chrome
Issue 1:
Summary

maxBodyLength is a option for follow-redirect which is default transport for axios in node.js environment.

so, can't upload file > 10M

Context

axios version: all version

Environment: node all version

Issue 2:
Summary

follow-redirects defaults to a maxBodyLength of 10mb. axios does not override this default, even when the config specifies a maxContentLength parameter greater than 10mb, thus capping axios at a maximum content length of 10mb no matter what is configured, and returning an error that does not make it obvious that follow-redirects is the cause.

axios should set the maxBodyLength option sent to follow-redirects to match the maxContentLength config property set on the AxiosOptions object.

Context

axios version: v0.17.1

Environment: Electron v1.4.3 or Node v6.5.0 with XHR polyfill, macOS v10.13.2

Status

Pull request: #1287
Issue 1:
function foo()
try
error("error in foo")
catch e
end
end

function bar()
try
error("error in bar")
catch e
foo()
rethrow(e)
end
end

bar()

produces the misleading

ERROR: error in bar
Stacktrace:
[1] foo() at ./REPL[1]:3
[2] bar() at ./REPL[2]:5

This just hit me in a really wicked situation: The stacktrace actually lead me to a line erroneously throwing the reported exception. I fixed it (to throw the correct exception), but the same error kept showing, leaving me completely puzzled for quite some time...

Issue 2:
\varepsilon is currently mapped to ɛ (U+025B latin small letter open e). This is wrong. The correct mapping is ε (U+03B5 greek small letter epsilon).