WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I was testing different methods trying to grasp the objective. When I decided run my next solution, I got a bunch of code right under the "run bar". What you see here is only just a part of it. It's fairly long.

I have had a few problems with some of my challenges were not getting validated until the next day when I logged back in. I still have one level that won't pass, unless I'm' missing something simple.

Issue 2:
When users make syntax errors they will no longer get the usual error message.

For example:

Old output

New output
Issue 1:
The light and dark themes have recently been in the center of attention due to colors being added and removed again.

More colors became visible due to the update of tokenizers in November. In December we decided to remove these again, to stay in sync with the classic Visual Studio Dark and Light themes.

From reactions in #1270 and #1470 and other issues, we learned that we have fans of both the classic Visual Studio dark and light themes as well as the more colorful version, e.g., from comment

The Dark and Light default themes were very nice in 0.10.3, I'm already missing them.

So we decided to bring the colors back in new themes, 'Dark+' and 'Light+'.

You can currently try these out by installing the extension 'Colorful Default Themes'. The plan is to add them to the built-in themes in the January build.

In addition to 4 major colors in the Visual Studio themes (comments, strings, numbers and keywords) we now have again colors for

control flow keywords

type names

function names

parameter names

When trying the new themes out, you will still find some keywords like 'import', 'module' nor correctly highlighted. These are issues in the tokenizer that we are working on. Please post your findings here, if possible add a code snippet and don't forget to mention for what language it is :-)

Issue 2:
Didn't see another issue filed for this already so forgive me if I missed it:

In VS Code December release, we've noticed that when you hover over variable names while the debugger is stopped, it works the first time but then it doesn't work again until you resume debugging and it hits a new breakpoint. Sometimes I see it stop working entirely even across debugging sessions. I don't see any requests being made to my debug adapter on hover, so I'm guessing this is happening client-side.
Issue 1:
function Component({reportType}) {
let Report = Reports[reportType];
let child = useMemo(() => {
return <Report />;
}, [Report]);

says that Report is an unnecessary dependency. It's not.

This is because eslint scope .references does not include JSX. I suspect if you pull in

https://github.com/yannickcr/eslint-plugin-react/blob/master/lib/rules/jsx-uses-vars.js

to your app's config then this won't happen. But maybe we should do something in the Hooks plugin itself too (since the others aren't officially recommended by the React team anyway).

Issue 2:
Current behavior:

I have some @mycomponents in another place from project which depends on react and react-dom. For this components i use react hooks. After editing any of component i use npm link, and in project i use npm link @mycomponents/core and project crushes with this error:

Uncaught Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component.

I was trying to publish @mycomponents in my repository and after publishing i run npm install and all works correct from node_modules.

Probably problem with npm link

Expected behavior

npm link works correctly with hooks

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

react: v16.8.6

react-dom: v16.8.6

browser: Google chrome Version 73.0.3683.103 (Official Build) (64-bit)
Issue 1:
See the following Plunker for repro: http://plnkr.co/edit/MrCUDP8qwGPj7ler4ySW

The code [class.selected]="toggleSvc.isActive | async" where toggleSvc.isActive is a BehaviorSubject results in the following error message:

EXCEPTION: Expression 'toggleSvc.isActive | async in AppComponent@1:7' has changed after it was checked. Previous value: 'true'. Current value: 'true' in [toggleSvc.isActive | async in AppComponent@1:7]

I don't see how the value is changed after change detection - ng2 even says that it stayed the same in this error message (true -> true).

Don't exactly know if this is related only to class property bindings or to all kinds, because this is currently the main thing that I'm observing.

Replacing the line with [class.selected]="toggleSvc._isActive" makes it run correctly.

The binding in the content (Active: {{toggleSvc.isActive | async}}) works without issues.

Issue 2:
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 both a route and it's parent have an asynchronous canActivate guard, and the child is navigated to directly, both guards are run at same time.

Expected behavior

The parent's canActivate guard should run before the child's guard. If the parent's guard is unsuccessful the child guard should not be run. If a route defines multiple canActivate guards, those can/should be run in parallel.

Minimal reproduction of the problem with instructions

http://plnkr.co/edit/s4R0INS7qjuFnRpyD8eF?p=preview

Plunker has a nested route /parent/child. Both have guards that simply wait and then return true. Each guard logs its start/end as well as a tick once per second to a logging service that is displayed in the root component.

Click 'Go to Child` to trigger both the Parent Guard and the Child guard at the same time, and observe that they process simultaneously in the log.

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

In my athepp, ParentGuard checks to see if the user is authenticated and redirects accordingly, and ChildGuard loads protected data. Right now, my child guard cannot assume the user is logged in, so I have to duplicate logic from the authorization guard to wait for the user to be loaded. When I have a grandchild route, that has to duplicate logic from two parent guards. I would like to be able to separate concerns more rather than duplicate auth logic in all my guards.

Please tell us about your environment:

Angular version: 4.0.1
Issue 1:
Back a couple weeks ago, I had a program with this code here:

for ch in msg.chars() {
if !ch.is_alphabetic() { continue; }
let s = caesar_shift(ch, key);
e.push(s);
}

This code compiled just fine, where msg is an &str parameter to the function in question.

Now, having duplicated the same code with the same variable as:

for ch in msg.chars() {
if !ch.is_alphabetic() { continue; }
let p = ch.to_digit(36).unwrap() - 10; // Need to shift down by 10 for range of 0-25
let c = alpha.chars().nth(p as usize).unwrap();
e.push(c);
}

the compiler presents this error:

src/lib/classical.rs:163:9: 168:10 error: mismatched types:
expected `collections::string::String`,
found `()`
(expected struct `collections::string::String`,
found ()) [E0308]
src/lib/classical.rs:163 for ch in msg.chars() {
src/lib/classical.rs:164 if !ch.is_alphabetic() { continue; }
src/lib/classical.rs:165 let p = ch.to_digit(36).unwrap() - 10; // Need to shift down by 10 for range of 0-25
src/lib/classical.rs:166 let c = alpha.chars().nth(p as usize).unwrap();
src/lib/classical.rs:167 e.push(c);
src/lib/classical.rs:168 }
note: in expansion of for loop expansion
src/lib/classical.rs:163:9: 168:10 note: expansion site
src/lib/classical.rs:163:9: 168:10 help: run `rustc --explain E0308` to see a detailed explanation

This was using the nightly build in both cases:

Now: rustc 1.4.0-nightly (f3f23bf9c 2015-08-30)

Then: rustc 1.4.0-nightly (ab450ef22 2015-08-14)

Strangely, the old code does not cause the compiler to error out, but I see literally no difference in the new code to speak of that would cause it to not understand what type msg is.

Issue 2:
Here's an example of where this gets really painful:

use std::rt::io;

fn foo(a: &mut io::Stream) {
write!(a, "test");
}
fn main() {
}

yields

foo.rs:4:11: 4:12 error: mismatched types: expected `&mut std::rt::io::Writer<no-bounds>` but found `&mut std::rt::io::Stream<no-bounds>` (expected trait std::rt::io::Writer but found trait std::rt::io::Stream)
foo.rs:4 write!(a, "test");
^
note: in expansion of format_args!
<std-macros>:225:8: 225:72 note: expansion site
<std-macros>:224:4: 226:6 note: in expansion of write!
foo.rs:4:4: 4:22 note: expansion site
error: aborting due to previous error

Nominating for production-ready (and possibly priority)
Issue 1:
🌟 New model addition

MobileBERT

Model description

MobileBERT is a thin version of BERT_LARGE, while equipped with bottleneck structures and a carefully designed balance between self-attentions and feed-forward networks.

Open source status

the model implementation is available: (give details)

https://github.com/google-research/google-research/tree/master/mobilebert

the model weights are available: (give details)

https://storage.googleapis.com/cloud-tpu-checkpoints/mobilebert/uncased_L-24_H-128_B-512_A-4_F-4_OPT.tar.gz

who are the authors: (mention them, if possible by @gh-username)

Google LLC

Xiaodan Song

Zhiqing Sun

Hongkun Yu

Denny Zou

Issue 2:
🐛 Bug

Information

Model I am using (Bert, XLNet ...): No specified

Language I am using the model on (English, Chinese ...): English

The problem arises when using:

the official example scripts: (give details below)

my own modified scripts: (give details below)

The tasks I am working on is:

an official GLUE/SQUaD task: (give the name)

my own task or dataset: (give details below)

To reproduce

Steps to reproduce the behavior:

I have tried using pipeline on my own purpose, but I realized it will cause errors if I input long sentence on some tasks, it should do truncation automatically, but it does not. And the pipeline function does not take extra argument so we cannot add something like truncation=True. Here is an example on sentiment-analysis task:

from transformers import pipeline
nlp = pipeline('sentiment-analysis')
text = "This is an example"*300
nlp(text)

The error message is below:

---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-31-0a8ce849cc29> in <module>()
2 nlp = pipeline('sentiment-analysis')
3 text = "This is an example"*300
----> 4 nlp(text)

11 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in embedding(input, weight, padding_idx, max_norm, norm_type, scale_grad_by_freq, sparse)
1722 # remove once script supports set_grad_enabled
1723 _no_grad_embedding_renorm_(weight, input, max_norm, norm_type)
-> 1724 return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
1725
1726

IndexError: index out of range in self

same error on NER task, maybe some other task as well.

Expected behavior

Environment info

transformers version: 3.0.2

Platform: Google Colab

Python version: Python 3.6.9

PyTorch version (GPU?):1.5.1+cu101, no GPU

Tensorflow version (GPU?): no

Using GPU in script?: no

Using distributed or parallel set-up in script?: no
Issue 1:
Not sure if this is a bug, but the following incorrect code:

class C {
get foo() { return '' }
get foo() { return '' }
}

produces the output:

var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "foo", {
get: function () {
return '';
},
enumerable: true,
configurable: true
});
return C;
})();

The source code is a duplicate identifier error, but I would think we'd still emit the getter twice.

Issue 2:
It should be possible to ignore errors in d.ts,

it's pretty annoying to have hundert of errors just because of some definition files of a third party library and it makes it hard to identify your own errors.

So I would recommend a flag in the tsconfig-file to prevent those errors to be mentioned.
Issue 1:
Version

2.6.10

Reproduction link

https://codepen.io/xiangyuecn/pen/eYmmPNP

Steps to reproduce

Look at the test code running interface. OnceMsg area should have been static, but it is not!

Look at the Test 3 part of the test code. It's exactly the same as the Test 2 part, but their performance is not the same.

Similar to this kind of code, they are the same, but the results are different:

<div>
<template v-once>[{{ getTime() }}] {{ name }}</template>
<span v-once>[{{ getTime() }}] {{ name }}</span>
</div>

<div v-for="obj,idx in logs" :key="idx">
<div>
<template v-once>[{{ getTime() }}] {{ obj.msg }}</template>
<span v-once>[{{ getTime() }}] {{ obj.msg }}</span>
</div>
</div>

Use <template v-once> because I don't want to use more than one span, which will damage the DOM structure.

What is expected?

<template v-once> in v-for should be consistent with <template v-once> not in v-for, OnceMsg area should have been static.

What is actually happening?

<template v-once> in v-for and <template v-once> not in v-for are inconsistent, The leftmost time of OnceMsg area will change with the cycle.

Issue 2:
Version

2.5.16

Reproduction link

https://jsfiddle.net/hL0rrbs9/6/

Steps to reproduce

Run code, and watch.

What is expected?

"Yay Yay ;)" values should not change to "hell naw!" in 3 seconds.

What is actually happening?

"Yay Yay ;)" values are changing in to "hell naw!" in 3 seconds.

Wait 3 seconds. Behavior is not consistent. "component" tag in v-for should not change.

{{comp}}

{{comp}}

<script>
var z = new Vue({
el: "#app",
data: {
comp:	"comp1",
items: [{id:1}, {id:2}]
},
components: {
"comp1": {
template: "

yay yay ;)

"
},
"comp2": {
template: "

hell naw!

"
}
}
});

setTimeout(function() {

z.comp = "comp2"

}, 3000);

</script>
Issue 1:
In my installation (seaborn 0.6.0, matplotlib 1.5.1 with Qt2 back end under Linux Mint, Python 3.5), the annotation feature of heatmaps doesn't work. When I run the "Annotated heatmap" example from the project website, only the cell in the lower left corner has an annotation (in a wrong color):

The same issue also occurs with other data sets:

sns.heatmap(
pd.DataFrame({
'wanna': {'ACAD': 53, 'MAG': 490, 'NEWS': 249},
'gonna': {'ACAD': 202, 'MAG': 1974, 'NEWS': 1207}}),
annot=True)

Issue 2:
Issue

Seaborn fails to generate histograms on data frames with certain indexes (duplicated).

This is wrong because the histogram is a function of a 1-D column and most not depend on frame indexes (and btw, nonunique indexes are legitimate and appear in data science tasks).

Reproduce

Under seaborn== 0.11.2 and pandas==1.4.3 do:

import seaborn as sns
import pandas as pd

df = pd.DataFrame({'id':[1,1,2,2],'values':[1.0,1.0,2.0,3.0]})
df.set_index('id',inplace=True) # NOTE: this line is causing problems
sns.histplot(data=df,x='values')

This generates the following error

ValueError: cannot reindex on an axis with duplicate labels
Issue 1:
Have a single go implementation of the "List then Watch" pattern. Use this everywhere.

This is about hiding the details of calling list and watch and restarting watches.

This is about apiserver watches. Etcd use cases going away, so don't worry about them.

The Reflector object in pkg/client/cache is trying to be this.

Reconcile duplicated implementations in pkg/proxy/config and pkg/client/cache (the latter used by scheduler, and by kubelet after #3385 is merged. differences include:

Jittering in pkg/proxy/config/api.go,

resource-specific ServicesWatcher interface in pkg/proxy/config vs generic ListerWatcher interface in pkg/client/cache.

one writes complete state to a Store and the other writes deltas to a channel.

differences in error handling in the watch implementations: make sure we keep best from each.

Issue 2:
If I follow the docker getting started guide from here https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md

It instructs me to start the kubelet with the following command

docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/dev:/dev \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged=true \
-d \
gcr.io/google_containers/hyperkube:v1.1.2 \
/hyperkube kubelet --containerized --hostname-override="127.0.0.1" --address="0.0.0.0" --api-servers=http://localhost:8080 --config=/etc/kubernetes/manifests

When I do this I'm no longer able to create any terminals. I'm running Ubuntu 15.04.

The error I get when starting terminal is:

There was an error creating the child process for this terminal
getpt failed: Permission denied

I can collect additional diags if someone can guide me on what to collect...
Issue 1:
Tokenizer.Raw is intended to provide the unmodified text of the current token --
http://godoc.org/code.google.com/p/go.net/html#Tokenizer.Raw

But, when a tokenization error occurs, the raw text may be duplicated. For example:

z := NewTokenizer(strings.NewReader("foo bar"))
tt := z.Next()
fmt.Printf("%v: %q\n", tt, string(z.Raw()))
tt = z.Next()
fmt.Printf("%v: %q\n", tt, string(z.Raw()))

duplicates "foo bar" in both a text and error token:

Text: "foo bar"
Error: "foo bar"

The concatenated results of z.Raw() should reproduce the original input without
duplication.

The fix is adjust the way Next updates the raw and data spans. I'll send a change for
this shortly.

Issue 2:
by xapwing:

go version = 1.0.2

windows 7

gopath=c:\dir1;c:\dir2

directory structure:
c:\dir1\src\
hello\
hello.go
c:\dir1\bin
c:\dir2\src\
hello\
hello.go
c:\dir2\bin

Trigger of the problem:
I run "go install" in either of the "hello" directories

What is the expected output?
a generated hello.exe in the "bin" directory related to the base dir where the src dir is in

What do you see instead?
hello.exe is generated in the same "hello" directory as the source hello.go is

Conclusion so far:
if the same project name occurs in more than one subpaths of a gopath, go install will behave differently and put the .exe file not in the bin but in the src directory

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

Which operating system are you using?

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

Please provide any additional information below.
Issue 1:
We only permit &mut pointees to be mutated if the &mut is in a unique location (i.e., another &mut, a local variable, etc). Based on this, it is safe to conclude that the memory referenced by an &mut pointer found in an aliasable location is frozen. But the borrow checker considers such memory to be unsafe for use. This is overly conservative and prevents important compositional patterns.

In particular, I should be able to define a type BorrowedMap that looks like this:

struct BorrowedMap<'m,K,V> {
map: &'m mut HashMap<K,V>
}

and now I should be able to implement the Map<K,V> trait for BorrowedMap:

impl<'m,K,V> Map<K,V> for BorrowedMap<'m,K,V> {
fn insert(&mut self, key: K, value: V) { self.map.insert(key, value); }
fn find<'a>(&'a self, key: &K) -> Option<'a V> {
self.map.find(key) // ERROR
}
}

However I can't because I get an error at the marked line. This is because self.map is an &mut found inside of an aliasable location (self) and hence it cannot be considered frozen. But why not? Nobody can mutate it, after all.

Note that the maximum lifetime of a freeze would be 'a (which is sufficient for this case).

Nominating.

Issue 2:
Now that the swap operator has been removed, I do not believe the

restriction against mutating LV is needed, and in fact it prevents

some useful patterns. For example, the following function will

fail to compile:

fn mut_shift_ref<'a,T>(x: &mut &'a mut [T]) -> &'a mut T {
// `mut_split` will restrict mutation against *x:
let (head, tail) = (*x).mut_split(1);

// Hence mutating `*x` yields an error here:
*x = tail;
&mut head[0]
}

Note that this function -- which adjusts the slice *x in place so

that it no longer contains the head element and then returns a

pointer to that element separately -- is perfectly valid. It is

currently implemented using unsafe code. I believe that now that

the swap operator is removed from the language, we could liberalize

the rules and make this function be accepted normally. The idea

would be to have the assignment to *x kill the loans of *x and

its subpaths -- after all, those subpaths are no longer accessible

through *x, since it has been overwritten with a new value. Thus

those subpaths are only accessible through prior existing borrows

of *x, if any. The danger of the swap operator was that it

allowed *x to be mutated without making the subpaths of *x

inaccessible: worse, they became accessible through a new path (I

suppose that we could have supported a swap operator, too, if needed, by moving the loans over to the new path).
Issue 1:
form-group inputs render normal. input-groups render too small. The use of glyphicons doesn't make any difference. Different behavior between prepend and append aswell.

jsBin: http://jsbin.com/uTumeWE/1/edit

Issue 2:
<div class="form-group input-group has-success"> <label class="control-label" for="inputSuccess">Input with success</label> <span class="input-group-addon"><i class="icon-envelope"></i></span> <input type="text" class="form-control" id="inputSuccess"> </div>

Images: http://vvcap.net/db/gUxKjP35dh1Dv3_19Qk8.htp

<div class="form-group input-group has-success"> <span class="input-group-addon"><i class="icon-envelope"></i></span> <input type="text" class="form-control" id="inputSuccess"> <label class="control-label" for="inputSuccess">Input with success</label> </div>

http://vvcap.net/db/wU5PelKNhqbCSmDVkLCM.htp
Issue 1:

Issue 2:
Been looking at this (and I apologize if this issue was already addressed) - and took this site I'm working on (mcgarrybair.com) right out of the BS3 RC2 examples. Resizing the window from -lg to -md wraps the nav-bar into multiple lines. You can see this on the law firm site I just published at http://mcgarrybair.com - this causes the site to render unaccaptably in an iPad (tablet view). I think the navbar should not wrap - but go immediately from one-line of menus to collapse? Wrapping the navbar that is a navbar-fixed-top into multiple lines of li items causes it to overlap the content of the site.
Issue 1:
Current Behavior:

If you have a package with something in peerDependencies and then install that something in the same package as a devDependency, the peerDependencies field is changed and the dependency is added to package.json, but it inherits the semver string that the peer dependency had.

Expected Behavior:

Installing a dev dependency should do the same change to the package.json, whether that dependency is already in peerDependencies or not.

Steps To Reproduce:

echo '{ "peerDependencies": { "typescript": "*" } }' > package.json
npm i -D typescript
cat package.json

{"peerDependencies":{"typescript":"^4.2.4"},"devDependencies":{"typescript":"*"}}

Environment:

OS: macOS

Node: 15.14.0

npm: 7.10.0

Issue 2:
Current Behavior:

package that has:

"peerDependencies: {
"webpack": ">=1.11.0"
},
"devDependencies": {
"webpack": "^4"
},

run npm install --save-dev webpack@3

see package.json updated to:

"peerDependencies: {
"webpack": "^3.12.0"
},
"devDependencies": {
"webpack": "^3"
},

Expected Behavior:

The package.json should become:

"peerDependencies: {
"webpack": ">=1.11.0"
},
"devDependencies": {
"webpack": "^3"
},

or:

"peerDependencies: {
"webpack": ">=1.11.0"
},
"devDependencies": {
"webpack": "^3.12.0"
},

but since i didn't use --save-peer (or --save by itself, even), the peer dep must not be touched.

Separately, this is an entirely unexpected breaking change in my package, since some potential valid peer versions are now invalid, so this could be quite dangerous.

Steps To Reproduce:

see "current behavior"

Environment:

Node: 15.8.0

npm: 7.5.3