WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
TypeScript Version:

1.8.0-beta

TypeScript for Visual Studio 1.8.4

Expected behavior:

Clicking the "Debug" button, particularly when set to "Internet Explorer", should launch Internet Explorer and enable breakpoints from Visual Studio.

Actual behavior:

Though Internet Explorer opens the website and Visual Studio enters debugging mode, the "No symbols have been loaded for this document" error appears over empty circle breakpoints.

If set to Google Chrome mode, the debugging mode immediately exits with no message.

Install Logs

dd_TypeScript_Dev14_20160301093256

dd_TypeScript_Dev14_20160301093256_000_TypeScript_SDK.msi

dd_TypeScript_Dev14_20160301093256_001_TypeScript_Dev14.msi

Issue 2:
// tmp.ts
import {Secret} from './baz';

export class Foo {
private bar(s: string): Secret { return null; }
}

// baz.ts
export class Secret {}

$ tsc tmp.ts baz.ts --declaration -m commonjs

// tmp.d.ts
export declare class Foo {
private bar(s);
}

I don't really want users of my library to know about bar, even though the type-checker will give them the red squiggle underline.

OTOH, it's really nice that you hide the type information for the parameter and the return type of bar, so my Secret isn't exposed to users, as @mhevery and I had thought might happen.

(Sorry there is probably a duplicate of this already but I didn't find it)
Issue 1:
@app.on_event("startup")
async def startup_event(background_tasks: BackgroundTasks):
send_notification(background_tasks)

2021-05-12 15:31:40,350 - MainThread - ERROR - Traceback (most recent call last):
File "F:\douyin_spider_fast_api\venv\lib\site-packages\starlette\routing.py", line 540, in lifespan
async for item in self.lifespan_context(app):
File "F:\douyin_spider_fast_api\venv\lib\site-packages\starlette\routing.py", line 481, in default_lifespan
await self.startup()
File "F:\douyin_spider_fast_api\venv\lib\site-packages\starlette\routing.py", line 516, in startup
await handler()
TypeError: startup_event() missing 1 required positional argument: 'background_tasks'

Issue 2:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

from typing import Union
from fastapi import FastAPI

app = FastAPI(openapi_tags=[{'name': 'items', 'description': 'items1'}, {'name': 'items', 'description': 'items2'}])

@app.get("/items", tags=["items"])
def read_item(q: Union[str, None] = None):
return {"q": q}

Description

The OpenAPI specification states that "Each tag name in the list MUST be unique." for the OpenAPI object.

$ curl -s http://localhost:8000/openapi.json | jq .tags
[
{
"name": "items",
"description": "items1"
},
{
"name": "items",
"description": "items2"
}
]

Also Swagger shows the items operation to be with items1 tag, while ReDoc shows items2.

Operating System

macOS

Operating System Details

No response

FastAPI Version

0.85.1

Python Version

Python 3.10.8

Additional Context

No response
Issue 1:
mac 10.12

cuda 9

Issue 2:
torch/csrc/autograd/generated/VariableType.cpp:381:22: error: call to 'recordTrace' is ambiguous
jit::Node *n = jit::tracer::recordTrace( "fill_", { self }, self );
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/hangzhang/pytorch/torch/csrc/jit/tracer.h:262:14: note: candidate function
inline Node* recordTrace(std::string op, std::initializer_list<Variable> inputs, const Variable& output) {
^
/Users/hangzhang/pytorch/torch/csrc/jit/tracer.h:265:14: note: candidate function
inline Node* recordTrace(std::string op, std::initializer_list<Variable> inputs, const std::tuple<Variable, Variable>& outputs) {
^
/Users/hangzhang/pytorch/torch/csrc/jit/tracer.h:268:14: note: candidate function
inline Node* recordTrace(std::string op, std::initializer_list<Variable> inputs, const std::tuple<Variable, Variable, Variable>& outputs) {
^
/Users/hangzhang/pytorch/torch/csrc/jit/tracer.h:271:14: note: candidate function
inline Node* recordTrace(std::string op, at::TensorList inputs, const Variable& output) {

when executing:

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/anaconda/include -arch x86_64 -I/anaconda/include -arch x86_64 -I/usr/local/cuda/include -I/Users/hangzhang/pytorch -I/Users/hangzhang/pytorch/torch/csrc -I/Users/hangzhang/pytorch/torch/lib/pybind11/include -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/TH -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/THPP -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/THNN -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/ATen -I/anaconda/lib/python3.6/site-packages/numpy/core/include -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/THD -I/usr/local/cuda/include -I/Users/hangzhang/pytorch/torch/lib/tmp_install/include/THCUNN -I/anaconda/include/python3.6m -c torch/csrc/autograd/generated/python_nn_functions.cpp -o build/temp.macosx-10.7-x86_64-3.6/torch/csrc/autograd/generated/python_nn_functions.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -Wno-missing-braces -DWITH_NUMPY -DWITH_DISTRIBUTED -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
Issue 1:
Here are the method of fit and fit_generator:

def fit(self,
x=None,
y=None,
batch_size=None,
epochs=1,
verbose=1,
callbacks=None,
validation_split=0.,
validation_data=None,
shuffle=True,
class_weight=None,
sample_weight=None,
initial_epoch=0,
steps_per_epoch=None,
validation_steps=None,
**kwargs):

def fit_generator(self,
generator,
steps_per_epoch=None,
epochs=1,
verbose=1,
callbacks=None,
validation_data=None,
validation_steps=None,
class_weight=None,
max_queue_size=10,
workers=1,
use_multiprocessing=False,
shuffle=True,
initial_epoch=0):

The interface is almost the same while they are totally implemented separately, why not wrap fit with fit_generator + IndexArrayGenerator? Similarly, there are also evaluate_generator, etc.

Issue 2:
I'm using Keras to train a model with regularization.

On each epoch, the loss is printed but it's the sum of both the loss and regularization term. How can I get it to print those separately instead of their sum?
Issue 1:
Description of the problem

I'm trying to update the wrapping and filtering of the texture in a WebGLRenderTarget object,

however when updating the properties and setting needsUpdate of the texture to true, it throws the error:

THREE.WebGLState: TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided

I made a fiddle to test it here: https://jsfiddle.net/7bdLa8of/10/

I looked around the code and found that since image is not undefined here (it's { width, height }) it gets treated as an HTMLElement here and fails.

I tried simply guarding it with a isRenderTarget and skipping the previous line and also this, however that left me with a black texture.

Three.js version

Dev

r115

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Issue 2:
Sometimes, when we want to save some memory, it happens that we have to reuse a render target, by just changing some possible parameters on the fly. I am talking about wrapping and filtering, obviously not format and type. Changing these parameters is (generally) fast enough (depending on the drivers).

However, it is not currently possible to do that, because of this part of the code:

https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLTextures.js#L225-L244

As a WebGLRenderTarget has obviously no image attribute.

Maybe I am missing something, but it looks like the data uploading and the parameters and couple together. Am I the only one looking for a change on this side?

It would be nice to separate the data uploading from the parameters.

Three.js version

All of them

Browser

All of them

OS

All of them
Issue 1:
I just updated today and I noticed that my dropdown in my navbar that floats right got moved to the edge. It looks really bad. It used to look like this

And now looks like this.

There are two things I have found that fixes it but I don;t think they are the correct ways.

In this piece of css if i turn off the padding-right, it is fixed.

.navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse {
padding-left: 0;
padding-right: 0; }

Or in this piece if i turn off the margin-right.

.navbar-nav.navbar-right:last-child {
margin-right: -15px; }

So what's the deal? Should there be another selector like .navbar-nav.navbar-right:last-child.dropdown{margin-right:0}? Because I know that if the last right child isn't a dropdown it needs that.

Or why does everything in a fixed-top collapsable navbar inherit padding-right:0?

Issue 2:
The navbar right padding is broken when using navbar-fixed-top with Bootstrap 3.0.3.

Was working fine with Bootstrap 3.0.2.

navbar-static-top and navbar-fixed-bottom are probably impacted too.

Live example: http://plnkr.co/edit/zn1Pc0?p=preview

With navbar-fixed-top:

Without navbar-fixed-top:

The issue is most probably related to this commit: 5a03655

Version 3.0.3 contains the following code:

// Undo the collapse side padding for navbars with containers to ensure
// alignment of right-aligned contents.
.navbar-fixed-top &,
.navbar-static-top &,
.navbar-fixed-bottom & {
padding-left: 0;
padding-right: 0;
}

3.0.2 does not.
Issue 1:
Describe the bug

Function isValidXss works incorrectly.

To Reproduce

// I just copy & paste the function declaration
function isValidXss(requestURL) {
var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
return xssRegex.test(requestURL);
};

// Calling this will result in `true`
isValidXss('https://www.somedomain.com?only=true')

Expected behavior

I expect the previous function call to result in false. I see no XSS attack in there.

Environment:

Axios Version 0.19.1

Issue 2:
It seems that axios v0.19.1 introduced a new bug.

The bug comes from #2464

All urls containing javascriptkeyword is throwing XSS error. So, all following urls cannot be used in axios any more:

https://www.javascript.com

https://stackoverflow.com/questions/tagged/javascript

https://www.google.com/search?q=javascript

Here is a link to regexp: https://regexr.com/4rsst

Expected behavior: axios should accept javascript in urls
Issue 1:
To help us understand and resolve your issue please check that you have provided

the information below.

Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

1.5.2rc2, python 2.7.11 and python 3.5.1, Fedora rawhide.

How did you install Matplotlib and Python (pip, anaconda, from source ...)

From source, I'm building a new version of the Fedora package.

If possible please supply a Short, Self Contained, Correct, Example

that demonstrates the issue i.e a small piece of code which reproduces the issue

and can be run with out any other (or as few as possible) external dependencies.

In Fedora, we're patching the lib/matplotlib/__init__.py to use /usr/share/matplotlib/mpl-data as the path for data files. cbook.py seems to have its own reimplementation of the data files path code, so the path needs to be patched in two locations. It would be nice if we could specify the desired data files location path at build time, by the way. Shall I open a separate issue for that?

Trivial patch:

--- a/lib/matplotlib/cbook.py 2016-05-20 14:14:52.000000000 +0200
+++ b/lib/matplotlib/cbook.py 2016-05-20 19:28:57.373601582 +0200
@@ -823,8 +823,7 @@ def get_sample_data(fname, asfileobj=Tru
if matplotlib.rcParams['examples.directory']:
root = matplotlib.rcParams['examples.directory']
else:
- root = os.path.join(os.path.dirname(__file__),
- "mpl-data", "sample_data")
+ root = os.path.join(matplotlib._get_data_path(), 'sample_data')
path = os.path.join(root, fname)

if asfileobj:

Issue 2:
The documentation pages at https://matplotlib.org/gallery/axes_grid1/simple_anchored_artists.html and https://matplotlib.org/gallery/misc/anchored_artists.html appear to be nearly duplicates of each other. However, the first one is much more complete, and demonstrates a much less complicated way of achieving he same thing.

The first linked page has a if 1: "guard" while the second one has if __name__ == '__main__':. Given the overall trend in the examples, neither seems necessary.

An even simpler example, that is fully covered by the other ones, is given in https://matplotlib.org/gallery/userdemo/anchored_box01.html

My personal take on this is:

Keep the content of https://matplotlib.org/gallery/axes_grid1/simple_anchored_artists.html. The other version asks the user to write their own version of the anchored artist classes, even though matplotlib already provides them, and is generally less complete.

Move it to https://matplotlib.org/gallery/misc/anchored_artists.html since it has nothing to do with axis grids and I'm not even sure how it ended up there.

Removing the unnecessary import guard.

Remove https://matplotlib.org/gallery/userdemo/anchored_box01.html entirely.

I'll be happy to submit a PR if a couple of senior folks approve.

P.S. The reason for all this is in the comment section of https://stackoverflow.com/a/49933937/2988730, when I realized I was giving somebody incomplete, or possibly outright bad advice.
Issue 1:
I came across a rather weird issue which seems to be some kind of race condition on indexing a property and I'd appreciate if you could first confirm if you can reproduce it, and then fix it and/or recommend a workaround.

Neo4j version: 3.0.1

Operating system: Windows 8.1

API/Driver: embedded GraphDatabaseService, but this happens also with in-memory instance used for tests

Steps to reproduce

please find the following code snippet that shows the problem (at least on my machine it fails virtually every time)

https://gist.github.com/lilianaziolek/81b1adcdb2c9b3f1c0812952da51cfa9

The problem goes away if I either remove index (which results in a label-scan on search so obviously not a great idea) or introduce a sleep before the reading step. I tried adding the "await for indexes" as you can see, but that doesn't seem to help either.-It seems that after adding the nodes the index isn't updated on time but instead it's updated with an unknown (quite significant) delay.

Expected/actual behavior

I would expect correct result of 3 nodes - either by using index or, in the worst case, a slower result from a scan. Instead I get back all the nodes unless I introduce a sleep.

If I missed some step that would enforce the update of the index please let me know - but I tried looking in the documentation and haven't found anything that would imply that anything special needs to be done for index to be updated within the writing transaction.

Issue 2:
Hello,

I've been finding that using a regex in where clause for matching is initially matching every node.

So for the a database with nodes with a label property, something like:

MATCH (n) WHERE n.label =~ '(?i)cat' RETURN n

Returns every node. It's been consistently working once a database has been up and running, but usually the first couple of runs of such a query will return all nodes. I'm not sure what changes eventually to make the same query work.

It looks like regex clauses for other properties besides label are working just fine, so maybe that's the issue?

Neo4j Version: 3.0.0

Operating System: Windows 10, but also found on Travis CI (Ubuntu 12.04)

Steps to reproduce

Start with a fresh database

Populate with some nodes with various label properties

Run regex matching query on node's label property

Expected behavior

Only nodes that match the regex should be returned

Actual behavior

All nodes are returned for the first few queries, but eventually (sometimes) the expected behavior happens
Issue 1:
We recently merged a change to cross-validation generators that allows, e.g. KFold to be performed within the training of an outer KFold operation. This should be illustrated with an example. Be creative!

Issue 2:
To track the issue, even though @rvraghav93 said he'll work on it ;)

Nested cross-validation was possible before, but not when providing a custom cv object and either stratification or the number of samples not being divisible by the number of folds.

Maybe StratifiedShuffleSplit would be a good example.
Issue 1:
I tried to stream a template for a change but had Problem with the Session.

I best show a little example:

public function someAction (Request $request) {
$request->getSession()->start(); // ensure the session is started
return $this->stream('template.html.twig');
}

<html>
<head>
<title>Title</title>
</head>
{% flush %}
<body>
{{ app.session.flashBag.all|length }}{# accessing the session now fails #}
</body>
</html>

This results into a RuntimeException:

[1/2] RuntimeException: Failed to start the session because headers have already been sent by "" at line 0. -

I'm using Symfony 2.7.9 with PHP 7.0.2-4+deb.sury.org~trusty+1.

Issue 2:
UPDATE: This issue has 2 parts. The first one is explained in this post. The second one is explained in this comment.

I noticed the website I am developing was sending a cookie in the response, even for anonymous requests (ie: not logged in, and deleted all cookies).

After trying everything and failing to find the problem, I created a "hello world" with a fresh install, and there was no cookie.

But as soon as I added this, the cookie came back:

{% for flashMessage in app.session.flashbag.get('success') %}
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ flashMessage }}
</div>
{% endfor %}

So apparently app.session.flashbag.get() creates the session. I'm sure many other parts of my website are unintentionally creating a session, and that's why I couldn't find the culprit.

Is there a reason for this? Isn't it adding overhead that could have been avoided? I imagine this won't affect sites that are login-only, as they will need the session anyway for most of the visits. But sites that can be used anonymously might suffer a bit.
Issue 1:
I'm submitting a ...

[ ] bug report
[x] feature request
[ ] support request

Current behavior

The ngFor directive iterates over each value of iterable objects, akin to the "for...of" statement.

If one wants to iterate over the enumerable properties of an object, an array of those properties needs to be created first and passed to ngFor.

Expected behavior

Being able to use ngFor in a similar manner to the "for...in" statement:

Model:

this.things = {
hello: 42,
world: true
};

Template:

<div *ngFor="let name in things"> {{ name }} </div>

Output:

<div> hello </div>
<div> world </div>

Minimal reproduction of the problem with instructions

I have a sample implementation over here.

This would ideally be part of the NgFor class itself rather than extending it, but this is just a demo. Proper thought would need to go into an actual implementation to make sure all edge cases are covered.

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

While it is currently possible to achieve the desired behavior, it involves several extra steps like using the directive linked above, implementing a similar behavior as a pipe, or manually extracting and storing the enumerable properties in the model.

Having this as part of the framework would greatly simplify its usage when needed.

Please tell us about your environment:

Angular version: 2.X, 4.0.X

Browser: all

Language: all

Issue 2:
I am trying to iterate over Map values with the built in ng-for, but I can see that for some reason it is not working.

In the specs, you can iterate over a Map iterable with:

let map = new Map();
let values = map.values();
for (let item of values) {
console.log(item);
}

And none of the ES5 standard for (...)/for (... in ...) will work with that.

Does the built in ng-for actually support iterating over maps?
Issue 1:
Kenny MacLeod opened SPR-7788 and commented

Chapter 7.2.1 (Enabling @AspectJ Support) says:

"These libraries are available in the 'lib' directory of an AspectJ installation (version 1.5.1 or later required), or in the 'lib/aspectj' directory of the Spring-with-dependencies distribution."

This needs to be updated to refer to the current distribution names.

Issue Links:

#11241 Add Gradle task for building zip with dependencies ("depends on")

#13537 Documentation update regarding aspectjrt and aspectjweaver jars usage ("is duplicated by")

Referenced from: commits 5fe0804

Issue 2:
Ales Justin opened SPR-705 and commented

When using iBatis with TransactionAwareDataSourceProxy (TADS), DataSource resource gets registered twice (different instances - same underlying datasource).

First with SqlMapClientTemplat on actual TADSP and then yet again with TADSP's getConnection() method.

So when it is cleaning up the transaction on APTransactionManager's triggerBeforeCompletion method, it gets already closed connection.

My fix (currently is working ok :-):

from SqlMapClientTemplate.java

public Object execute(SqlMapClientCallback action) throws DataAccessException {
Assert.notNull(getSqlMapClient(), "No SqlMapClient specified");
SqlMapSession session = this.getSqlMapClient().openSession();
try {
DataSource dataSource = getDataSource();
if (dataSource instanceof TransactionAwareDataSourceProxy) {
dataSource = ((TransactionAwareDataSourceProxy)dataSource).getTargetDataSource();
}
Connection con = DataSourceUtils.getConnection(dataSource);
try {
session.setUserConnection(con);
return action.doInSqlMapClient(session);
}
catch (SQLException ex) {
throw getExceptionTranslator().translate("SqlMapClient operation", null, ex);
}
finally {
DataSourceUtils.closeConnectionIfNecessary(con, dataSource);
}
}
finally {
session.close();
}
}

Affects: 1.1.4
Issue 1:
See screenshot, only happens after the ${num} stuff

Running VS 2013

Because I didn't have an ending */ the whole file is now shown as a comment

Issue 2:
I'm playing with the new support for template strings in release-1.4 and seeing potential issues with syntax highlighting.

In a single-line template string it looks like the string is classified as a keyword.

In a multi-line template string like this:

var template = `/hello/
/world/`;

It looks like the "/hello/" is classified as a keyword and the "/world/" as a regexp.

Sorry if this is just not implemented yet. I looked for an issue first but didn't see one.
Issue 1:
📝 Provide a description of the new feature

It's simple : I checked there's no able to zoom picking color screen when using Touchpad.

Pinch gesture would be great for it!

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

Issue 2:
📝 Provide a description of the new feature

It's not possible to use two finger gesture on touchpad to zoom in colour picker.

Please add this feature.

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