WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
For example, a function takes any number of parameters and return the last one.

function GetLastOne<T>(...rest:any[], last:T)
{
return last;
}

and this: http://createjs.com/docs/easeljs/classes/Container.html#method_addChild

Issue 2:
Extracting this suggestion from this issue:

#1336

Currently the variable arguments list supports variable arguments only as the last argument to the function:

function foo(arg1: number, ...arg2: string[]) {
}

This compiles to the following javascript:

function foo(arg1) {
var arg2 = [];
for (var _i = 1; _i < arguments.length; _i++) {
arg2[_i - 1] = arguments[_i];
}
}

However, variable argument functions are limited to appearing only as the last argument and not the first argument. I propose support be added for having a variable argument appear first, followed by one or more fixed arguments:

function subscribe(...events: string[], callback: (message: string) => void) {
}

// the following would compile
subscribe(message => alert(message)); // gets all messages
subscribe('errorMessages', message => alert(message));
subscribe(
'errorMessages',
'customMessageTypeFoo123',
(message: string) => {
alert(message);
});

// the following would not compile
subscribe(); // supplied parameters do not match any signature of call target
subscribe('a1'); // argument of type 'string' does not match parameter of type '(message: string) => void'
subscribe('a1', 'a2'); // argument of type 'string' does not match parameter of type '(message: string) => void'

subscribe compiles to the following JavaScript:

function subscribe() {
var events= [];
var callback = arguments[arguments.length - 1];
for(var _i = 0; _i < arguments.length - 2; _i++) {
events[_i] = arguments[_i];
}
}

notes: it should be impossible for typescript code to call this function with zero arguments when typechecking. If JS or untyped TS code calls it without arguments, callback will be undefined. However, the same is true of fixed arguments at the beginning of the function.

edit: used a more realistic/motivating example for the fixed-last/variable-arguments-first function.
Issue 1:
Symfony version(s) affected: 4.2.5

Description

Issue is related to #30854

A Service defined in separate file (but not services_{env}.yaml) loose to autowiring in services.yaml

How to reproduce

# config/services/extra.yaml
services:
_defaults:
autowire: true
autoconfigure: true

App\Foo:
arguments:
$bar: 'string'

# config/services.yaml
imports:
- {resource: 'services/extra.yaml'}

services:
_defaults:
autowire: true
autoconfigure: true

App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']

Then I got a message Cannot resolve argument $foo of "App\Controller\DefaultController::index()": Cannot autowire service "App\Foo": argument "$bar" of method "__construct()" is type-hinted "string", you should configure its value explicitly

Additional context

In same time moving services/extra.yaml to services_dev.yaml will solve the problem. @nicolas-grekas said it depends on definition order but I would really expect autowiring has less priority than services defined by hands.

Issue 2:
Symfony version(s) affected: 4.2.4 (not tested on previous versions)

Description

Services declared in a separate file imported in services.yaml are not initialized correctly.

It looks like the autowire: false is not taken into account? 🤔

How to reproduce

See relevant commit in this dedicated repository:

odolbeau/symfony_dic_bug@97d7106

I have the following error:

Circular reference detected for service "App\Storage\CacheStorage", path: "App\Storage\CacheStorage -> App\Storage\CacheStorage".

If you move the configuration from custom_services.yaml to services.yaml & remove the imports at the beginning of the file, it works as expected.

If you remove the imports at the beginning of the services.yaml and include custom_services.yaml from the Kernel (method: configureContainer) it works as expected as well.
Issue 1:
In the go.tools repo, godoc/vfs/vfs.go defines a very useful FileSystem type:

type FileSystem interface {
Opener
Lstat(path string) (os.FileInfo, error)
Stat(path string) (os.FileInfo, error)
ReadDir(path string) ([]os.FileInfo, error)
String() string
}

type Opener interface {
Open(name string) (ReadSeekCloser, error)
}

type ReadSeekCloser interface {
io.Reader
io.Seeker
io.Closer
}

There are other useful packages in go.tools (and elsewhere on GitHub) that make use of
FileSystem interface implementations.

But the fact that ReadSeekCloser is a named type makes it impossible (as best I can
tell) to implement vfs.FileSystem in an external package without importing vfs (and thus
pulling down the whole go.tools repo). This goes against the spirit of implicit
satisfaction of interfaces.

For example, I created a package (https://sourcegraph.com/sourcegraph/go-vcs) that
implements an almost identical interface to vfs.FileSystem, but to avoid adding go.tools
as a dependency, I copied the 3 above types to my package. Now people want to use my
package's VCS FileSystem implementation with other godoc/vfs/... packages, and they
can't (see sourcegraph/go-vcs#11.

I believe that vfs.FileSystem is an extremely useful building block, and it would make
it much easier if people could build interchangeable implementations of it without
importing go.tools. (As an aside, we use it in multiple places at Sourcegraph, and
Jeremy Saenz mentioned it on stage at dotGo as a "hidden gem".)

Would you consider any of the following solutions?

1) Changing godoc/vfs's (Opener).Open method to return
(interface{io.Reader;io.Seeker;io.Closer},error) instead of creating a separate named
ReadSeekCloser type (external packages could satisfy the interface by simply using the
anonymous interface type)
2) Adding ReadSeekCloser to the stdlib as io.ReadSeekCloser

Issue 2:
by ibit.zee:

go version go1.2.1 windows/386

command line is : go run _test1.go
error is : no buildable Go source files in C:\APL\!PROGRAMMING\GO

the problem is the underscore (_) in the file name, causes the file to not be found...

ZEE ;-)
Issue 1:
Version Info

julia> versioninfo()
Julia Version 1.1.1
Platform Info:
OS: Linux (x86_64-conda_cos6-linux-gnu)
CPU: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, ivybridge)

Julia Console

julia> global_vote = zeros(1)
1-element Array{Float64,1}:
0.0
julia> for i in 1:1
global_vote = global_vote .+ 1
end
ERROR: UndefVarError: global_vote not defined
Stacktrace:
[1] top-level scope at ./REPL[2]:2 [inlined]
[2] top-level scope at ./none:0

Jupyter Kernel

global_vote = zeros(1)
for i in 1:1
global_vote = global_vote .+ 1
end
print(global_vote)
[1.0]

Work Around in Julia Console

for i in 1:1
global global_vote = global_vote .+ 1
end

Issue 2:
Example 1

This came up with a student who upgraded from 0.6 to 1.0 directly, so never even got a chance to see a deprecation warning, let alone find an explanation for new behavior:

julia> beforefor = true
true

julia> for i in 1:2
beforefor = false
end

julia> beforefor # this is surprising bit
true

julia> beforeif = true
true

julia> if 1 == 1
beforeif = false
end
false

julia> beforeif # Another surprise!
false

julia> function foo()
infunc = true
for i in 1:10
infunc = false
end
@show infunc
end
foo (generic function with 1 method)

julia> foo() # "I don't get this"
infunc = false

Example 2

julia> total_lines = 0
0

julia> list_of_files = ["a", "b", "c"]
3-element Array{String,1}:
"a"
"b"
"c"

julia> for file in list_of_files
# fake read file
lines_in_file = 5
total_lines += lines_in_file
end
ERROR: UndefVarError: total_lines not defined
Stacktrace:
[1] top-level scope at ./REPL[3]:4 [inlined]
[2] top-level scope at ./none:0

julia> total_lines # This crushs the students willingness to learn
0

I "get" why this happens in the sense that I think I can explain, with sufficient reference to the arcana in the manual about what introduces scopes and what doesn't, but I think that this is problematic for interactive use.

In example one, you get a silent failure. In example two, you get an error message that is very there-is-no-spoon. Thats roughly comparable to some Python code I wrote in a notebook at work today.

I'm not sure what the rules are in Python, but I do know that generally you can't assign to things at the global scope without invoking global. But at the REPL it does work, presumably because at the REPL the rules are different or the same logic as if they were all are in the scope of function is applied.

I can't language-lawyer the rules enough to propose the concrete change I would like, and based on Slack this isn't even necessarily perceived as an issue by some people, so I don't know where to go with this except to flag it.

Cross-refs:

#19324

https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514

https://stackoverflow.com/questions/51930537/scope-of-variables-in-julia
Issue 1:
Observed behavior

When creating a histplot with a legend, duplicate labels show up in the legend. It seems to be creating entries in the legend for more than one BarContainer artist.

Expected behavior

A single entry in the legend for the histogram. In my use case, this histogram is part of a collection of overlaid plots on the same axes, and the legend is required so that the various plot artists are clearly labeled.

Minimal example

import numpy as np
import seaborn as sns

rng = np.random.default_rng(43)
data = rng.random(1000)
ax = sns.histplot(data, label="Random Data", stat="density")
ax.legend()

# Multiple artists are shown here
ax.get_legend_handles_labels()

Outputs from minimal example

([<BarContainer object of 1 artists>, <BarContainer object of 11 artists>],
['Random Data', 'Random Data'])

Version

Version where behavior is observed: 0.12.1

This behavior was not present in 0.11.2.

Issue 2:
Using joinplot( type = 'hex' ) to make hexbin plot.

The function call hangs (never comes back, with 100% CPU usage) when I tried to do it with my data (variables a and b)

The same plot works for randomly generated data (variables x and y)

This Jupyter notebook provides data for both working and buggy behavior. https://github.com/odoublewen/seaborn_bug/blob/master/seaborn_test.ipynb

Cheers
Issue 1:
This question came out when I tried to validate some proxies.

If proxy-scheme is uppercase as follows, it will return 200. (The host of proxy is not a true one.)

import requests

proxy = {

'HTTP': 'HTTP://111.1.11.1:8000'

}

r = requests.get('http://www.sina.com',proxies = proxy)

print (r.status_code)

However, if changing 'HTTP' to 'http', it will raise an error about httpconnectionerror.

So, it is confused me that proxy-scheme is case sensitivity or not? Or something went wrong about my code ?

Hoping to receive your instruction.

Issue 2:
Hi there,

First off, Requests is awesome. Thank you for the great library!

I'm writing a script that places a series of requests and manually follows some redirects, and one of the redirects is to a URL that starts with "HTTPS" (that is, the protocol is uppercase, like HTTPS://www.example.com instead of https://www.example.com). It would seem that Requests generates the wrong request when the following three conditions are met:

The protocol is HTTPS.

The protocol contains one or more uppercase letters. (e.g. "HTTPS", "httpS", "hTTps", "Https", etc.)

Proxies are being used.

I wrote a test script that uses a Session to GET www.example.com with variations in case for both http and https protocols, and here are the results:

proto
proxies
result

http
no
[OK]

htTp
no
[OK]

HTTP
no
[OK]

https
no
[OK]

HTTPS
no
[OK]

htTps
no
[OK]

httpS
no
[OK]

Https
no
[OK]

http
YES
[OK]

htTp
YES
[OK]

HTTP
YES
[OK]

https
YES
[OK]

HTTPS
YES
[ERROR]

htTps
YES
[ERROR]

httpS
YES
[ERROR]

Https
YES
[ERROR]

In the ERROR case, my proxy (Burp) was generating the following error:

Error

Invalid client request received: First line of request did not contain an absolute URL - try enabling invisible proxy support.

GET / HTTP/1.1

Host: localhost:8080

Connection: keep-alive

Accept-Encoding: gzip, deflate

Accept: /

User-Agent: python-requests/2.9.1

The issue can be replicated with the following couple lines of code:

import requests

requests.request('GET', 'HTTPS://www.example.com/test', proxies=dict(http='localhost:8080', https='localhost:8080'))

What happens will depend on your proxy. With Burp, when errors are given back as valid HTTP responses, the above will result in a 200 OK response object, and when you inspect the content of the response, you'll see Burp's error. However, if you suppress Burp errors, then Burp returns an empty response, causing requests to raise a ConnectionError exception:

requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

Thank you for your time!

Best Regards,

-Justin
Issue 1:
Migrated issue, originally created by Michael Bayer (@zzzeek)

apparently its all possible now. might as well make a new syntax bonanza out of it:

WITH upsert AS (
UPDATE metric k SET k.count = k.count + 5
WHERE event = "foo" AND interval = "D" and date = "whatever"
RETURNING k.*
)
INSERT INTO metric (event, interval, date, count)
SELECT ("foo", "D", "whatever", 5)
WHERE NOT EXISTS (
SELECT 1 FROM upsert
);

http://www.postgresql.org/docs/9.1/static/sql-insert.html

Attachments: ticket_2551.patch | CTE.sqlalchemy

Issue 2:
Migrated issue, originally created by Oleg Talalov (@olegtalalov)

Customer's database contains BINARY_FLOAT_INFINITY value in one column in few rows.

During requsting rows in fetch, function _detect_decimal called with value '' and raise exception:

ValueError: invalid literal for int() with base 10: ''

I use cx_orcale 5.3 and 6.0

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
Issue 1:
This is nitpick and not high priority, but it would be nice if the navigation items on the left nav could uses <a> tags somehow. That way you can right click and open in a new tab.

Issue 2:
While browsing the Material UI doc website, it is not possible to do right click on a component-link and open it in a new tab.

For example, it is not posible to browse the list of components and open a new browser window/tab for each of them. Instead I am forced to manually copy the url and paste it into a new window.

Is there any shortcut to avoid this? Or is it a problem considered in the roadmap?
Issue 1:
This behaviour might be related to these two bugs

https://github.com/numpy/numpy/issues/5745

https://github.com/numpy/numpy/issues/7126

but regards int and not uint. I'm running the following code in both python2 and python3 with Numpy v.1.8.2 and v1.10.4.

The issue comes up when running the following code:

import numpy as np
a = 9223372036854775808
type(a)
b = np.int64(0)
type(b)
type(b*a)

The result being (in Python3):

builtins.int
numpy.int64
numpy.float64

Note that if I change it to:

a = 9223372036854775807
type(b*a)

I get the correct casting:

numpy.int64

If I change the example to:

a = 92233720368547758100
type(b*a)

I get again the expected (correct) casting:

builtins.int

I came by this error while working with indices which should always be integer, so this casting to float64 was a very unexpected behaviour.

Issue 2:
Is this behavior expected?

>>> print type(np.uint32(0) + int(0))
<type 'numpy.int64'>
>>> print type(np.uint64(0) + int(0))
<type 'numpy.float64'>

The latter took me by surprise!
Issue 1:
Hello.

Working on a scheduler (calendar week view w/ side-by-side events by time) and am considering using a DataTable to display the activities.

Is it possible to span multiple rows in a TableCell?

See Scheduler

Is there a better approach to this?

Issue 2:
Hi,

How can I have a colspan in the Table Widget ?

Mean:

|--------|--------|

|..col1..|..col2.|

|--------|--------|

|.........col3........|

|--------|--------|

Thank you.
Issue 1:
I have typescript version 1.4.1.0 and have noticed that if I have a return statement that looks something like this in my TS file

return

"This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";

after it has been transpiled into the JS file the code ends up looking like this

return;

"This is a really long so I had to put it in on it's own line to avoid horizontal scrolling.";

This is obviously problematic because the intended return statement will never execute properly now that a semicolon has been added right after the return keyword treating any line after it as if it wasn't part of the return statement to begin with.

If this has already been reported somewhere I apologize for the duplicate posting but the search terms I used to find it didn't seem to bring up any result that referenced this problem.

Issue 2:
TypeScript Version: 1.8.4

Code

type stringType1 = "foo" | "bar";
type stringType2 = "baz" | "bar";

interface Temp1 {
getValue(name: stringType1);
}

interface Temp2 {
getValue(name: stringType2);
}

function test(t: Temp1 | Temp2) {
var z = t.getValue("bar"); // Error here
}

Expected behavior:

I was hoping everything would go fine (which is the case when I only use one interface in the function test

Actual behavior:

I get an error: "Cannot invoke an expression whose type lacks a call signature". Is this by design?
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gke-staging-parallel/530/

Failed: [k8s.io] Services should be able to create a functioning NodePort service {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:406
Oct 4 10:45:12.299: Failed waiting for pods to be running: Timeout waiting for 1 pods to be ready

Previous issues for this test: #28064

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10679/

Failed: [k8s.io] Services should be able to create a functioning NodePort service {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:403
Jul 6 19:51:55.035: expected node port 31810 to be in use, stdout: . err: Error running &{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.155.147.88 --kubeconfig=/workspace/.kube/config exec --namespace=e2e-tests-services-57c5g hostexec -- /bin/sh -c for i in $(seq 1 300); do if ss -ant46 'sport = :31810' | grep ^LISTEN; then exit 0; fi; sleep 1; done; exit 1] [] <nil> error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
[] <nil> 0xc8209224e0 exit status 1 <nil> true [0xc8201642d8 0xc820164398 0xc820164470] [0xc8201642d8 0xc820164398 0xc820164470] [0xc820164368 0xc820164448] [0xa9c260 0xa9c260] 0xc8215b3680}:
Command stdout:

stderr:
error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

error:
exit status 1

Previous issues for this test: #28064
Issue 1:
Sunny Ip opened SPR-3522 and commented

I have two aspects that run one right after the other. Aspect 1 has an around advice that passes in a different argument to the proceed method than the original method call had. In Aspect 2's before advice, the getArgs returns the original argument passed into the target method instead of the one Aspect 1 passed into the proceed. Aspect 2's around advice works fine, getArgs returning the new argument. I noticed this is working in 2.0-rc4.

Affects: 2.0.4, 2.0.5

Attachments:

test.zip (144.74 kB)

Issue 2:
Greg Wiley opened SPR-3519 and commented

Using the AspectJ annotation configuration method.

If two advice apply to the same join point and the lower-priority advice has (non JP) parameters, those parameters will not be bound.

This occurs in Spring 2.0.5 but not in Spring 2.0.2.

Only jars on the CP are those in the -with-dependencies Spring distribution.

\spring-framework-2.0.5\lib\aspectj\aspectjrt.jar

\spring-framework-2.0.5\lib\aspectj\aspectjweaver.jar

\spring-framework-2.0.5\lib\asm\asm-2.2.3.jar

\spring-framework-2.0.5\dist\spring-aspects.jar

\spring-framework-2.0.5\dist\spring.jar

\spring-framework-2.0.5\lib\jakarta-commons\commons-logging.jar

\spring-framework-2.0.5\lib\asm\asm-commons-2.2.3.jar

\spring-framework-2.0.5\lib\asm\asm-util-2.2.3.jar

Demonstration spike attached.

Note that in the demonstration, the exception can be eliminated by either:

removing one of the advice classes from the configuration

re-ordering the advice (so that the non-arg advice is lower priority)

switching to Spring 2.0.2

This problem has been documented by others in the Spring forums.

-dub

Affects: 2.0.5

Attachments:

eg.zip (2.04 kB)

Issue Links:

#8155 Bad interactions betwen advice when one binds the original method parameters and one does not. ("duplicates")
Issue 1:
System info

Playwright Version: 1.36

Operating System: macOS 13.4.1

Browser: Chromium

I've looked into #15819 & #15349 but didn't find a solution for my problem.

Bug description

I have a monorepo that utilizes yarn workspaces, in this project, I have a package for the Playwright framework and another project that uses this package as a local dependency.

Both package and the test project have their own @playwright/test dependency inside the package.json and both have playwright.config.ts.

The test project imports files from the framework package, such as fixtures and other utilities. The test project holds the tests and the POMs to serve the tests.

When running tests from the test project I'm getting the following error:

Error: Requiring @playwright/test second time,
First:
Error:

Issue 2:
System info

Playwright Version: 1.28.1

Operating System: Ubuntu 20

Browser: All

Other info:

Steps

Run playwright on a system where multiple users have been using it

Actual

Running 651 tests using 2 workers

Error: EACCES: permission denied, open '/tmp/playwright-transform-cache/3f/connectionFailurespec_3fcb2d59d7f1ac9abe23f187eeeed5065482bbfa.map'

651 skipped
1 error was not a part of any test, see above for details

The permissions on /tmp/playwright-transform-cache:

drwxrwxrwx 162 BrentBaccala BrentBaccala 4096 Mar 21 23:28 /tmp/playwright-transform-cache/

BrentBaccala is one of the users on the system. Permissions on some subdirectories:

drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 3e
drwxr-xr-x 2 MaximKhlobystov MaximKhlobystov 4096 Mar 1 13:44 3f
drwxrwxrwx 2 BrentBaccala BrentBaccala 4096 Feb 21 12:04 42

MaximKhlobystov is also a user on the system, and I'm running this test (that's trying to access 3f) as user baccala, so obviously there's a problem.

It looks like Maxim is also running Playwright 1.28.1.

What explanation is there for how this directory 3f was created with these restrictive permissions? It surely happened on a previous playwright run, and I really don't know what the exact test configuration was that caused this. The directory is dated March 1, and today is March 21, so reproducing exactly what caused this might be problematic (if it isn't obvious to somebody).
Issue 1:
http://getbootstrap.com/examples/non-responsive/

In the above example page, the three right side links of navbar get hiding while resizing the browser window.

the above is full size page

when we resize the navbar links get disappears.

Thanks

Issue 2:
To reproduce this issue:

1.) Open Firefox 24 and go to http://getbootstrap.com/examples/non-responsive/

2.) Double click the title bar of the window and scale the window so that part of the Navbar is obscured.

3.) Scroll the window horizontally and the page with scroll, but the Navbar stays where it is and will not allow access to the buttons on the right side of the bar.

This could be a potential issue with smaller devices that put the Navbar off the page when loaded. (Do to shutting off the responsive features)