WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Copying text to clipboard from Ubuntu and pasting it in Notepad loses line terminators. The text looks right in the Ubuntu window, but when pasted into Notepad the text seems to have no line terminators. It seems like the text isn't being converted to MS-DOS line terminators before going into the clipboard, but probably should be.

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce

Expected behavior

Line terminators should not be stripped. I think that if the text is in Unix format, it should be converted to Windows format prior to going into the clipboard.

Text in Notepad should look the same as the text in the source window.

Actual behavior

Issue 2:
Environment

Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Windows Terminal Version: 0.3.2171.0

Other Software

ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]

gems

pry (0.12.2)

irb (1.0.0)

both ruby REPLs

Steps to reproduce

In windows terminal start the ruby REPL pry or irb

type fooar then press the left arrow key to move the cursor back.

Expected behavior

You should be able to use the arrow keys to move around.

Actual behavior

The cursor is stuck at the end of the line.

I tested this behavior in other REPLs such as node, and python and this was not an issue. I then tested this behavior in other shells cmd and powershell (not in windows terminal) and this behavior was not reproducible.
Issue 1:
In the description there is a term called arity that is labeled as obsolete at MDN. If the term is obsolete and deprecated wouldn't it be better to take it off?

Furthermore in the tests you have the methods duplicated, whereas it should be like this:

expect(bob.getFirstName()).to.eql('Bob');

expect(bob.getLastName()).to.eql('Ross');

expect(bob.getFullName()).to.eql('Bob Ross');

expect(bob.getFirstName()).to.eql('Happy'); -> should be bob.setFirstName()).to.eql('Happy');

expect(bob.getLastName()).to.eql('Trees'); -> should be bob.setLastName()).to.eql('Happy');

expect(bob.getFullName()).to.eql('George Carlin'); -> should be bob.setFullName()).to.eql('Happy');

Thanks!! ;)

Issue 2:
Challenge Diff Two Arrays has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function diff(arr1, arr2) {
var newArr = [];

newArr = arr1.concat(arr2);
console.log("arr total is: ",newArr);

//count occurence of item in array
//return number of occurrence > 0
var count = function(item, array){
var count = 0;
var i=0;
for (i ; i<array.length; i++){

if (array[i] == item){
count++;
}
}

console.log("This item: "+item+" appears: "+ count+" times!");
return count;
};

arr = [];

var y=0;
var restOfArr = newArr.slice(0);

for (y; y<newArr.length; y++){
if (restOfArr.length == 0){
console.log("EMPTY. RES IS: ", arr);
return arr;
}
//console.log("index is: ", y);
var item = restOfArr[0];
console.log("item is: ", item);
restOfArr = restOfArr.slice(1);

var counter = count(item, restOfArr);

if (counter == 0){
arr.push(item);
restOfArr = restOfArr.filter(function(el){
return el !== item;

// console.log("after delete item restOfArr is: ", restOfArr);
});
}
if (counter > 0){
//ce ne sono 2 non addo
restOfArr = restOfArr.filter(function(el){
return el !== item;

});
}
console.log("rest of arr: ", restOfArr);

// console.log("FOR: arr is: "+arr+" newArr is: "+newArr);

}

return arr;
}

diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);
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

Angular 2.4.0 and 2.0.1 remove a component's DOM nodes before the ngOnDestroy method is called. The docs state that ngOnDestroy is "called just before Angular destroys the directive/component." I take this to mean that the DOM nodes are removed after ngOnDestroy is called. Correct me if I'm wrong though, in which case this isn't a bug but maybe just needs a documentation clarification.

Expected behavior

ngOnDestroy is called before a component's DOM is removed.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/7l5kUZXWJk9m7ZOHHPXS?p=preview

To reproduce:

Open the console

Click "Toggle node"

Observe that the logs show that DOM nodes are removed before ngOnDestroy is called.

Note: this behavior can also be confirmed by adding a DOM breakpoint on node removal and a breakpoint on the TestComponent's ngOnDestroy method. The DOM breakpoint breaks first, followed by ngOnDestroy.

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

I'm in an Electron context working with <webview>s. If a webview gets destroyed before I have an opportunity to clean up some registered event handlers, they unavoidably leak.

Please tell us about your environment:

macOS, latest Chrome.

Angular version: 2.0.X

Confirmed on 2.4.0 and 2.0.1

Issue 2:
I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[X] 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 ngOnDestroy is called, the element is already removed from the DOM.

Expected behavior

Before ngOnDestroy and before removing from DOM, ngBeforeDestroy would get called.

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

I have a list of items. When the currently focused one is removed, I want to focus the next item. However, due to the element already being out of DOM, I do not know what the next item in DOM is.

Thank you.
Issue 1:
I wrote a typescript file like this:

// source to typescript
var Test = {};
export = Test;

/**
some infomation about this module
*/

when i run commond tsc --module commonjs test.ts, the javascript file was

/**
* @fileOverview ...
*/
// source to typescript
var Test = {};
module.exports = Test;
/**
some other infomation about this module
/**
* @fileOverview ...
*/
// source to typescript
var Test = {};
export = Test;

/**
some other infomation about this module

of course, Syntax error

D:\Users\wxq\test.js:14
export = Test;
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

There will be such a problem in typescript.org playground

But i just want to write some msgs at the end of the file.

If there is no problem by using //, or move the comments at the end to top

Issue 2:
Hi,

TS Version: 1.4

The following code:

var x: any;
/*
var bar;
*/

Emits the following JavaScript

var x;
/*
var bar;
var x: any;
/*
var bar;

Expected

var x;
/*
var bar;
*/
Issue 1:
It is relatively intuitive to want to create a structured array with "str" string for a dtype, which is converted to a "S0" type. I think this should be detected as an error instead ?

Issue 2:
Example:

>>> dt = np.dtype([('f', float), ('s', str)])
>>> np.array([(1.0, "hello world")], dt)
array([(1.0, '')],
dtype=[('f', '<f8'), ('s', 'S')])

Proposal: This should either resize or raise a ValueError (#8970), as it seems like it would always mask bugs
Issue 1:
The docs on the FLASK_APP variable state that

In that imported file the name of the app needs to be called app or optionally be specified after a colon. For instance mymodule:application would tell it to use the application object in the mymodule.py file.

However, creating the following script (run.py):

from flask import Flask

webapp = Flask(__name__)

setting FLASK_APP=run.py:webapp, and running flask run gives me an ImportError:

Traceback (most recent call last):
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 156, in __call__
self._flush_bg_loading_exception()
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 144, in _flush_bg_loading_exception
reraise(*exc_info)
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 133, in _load_app
self._load_unlocked()
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 148, in _load_unlocked
self._app = rv = self.loader()
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 209, in load_app
rv = locate_app(self.app_import_path)
File "/Users/me/app/venv/lib/python3.5/site-packages/flask/cli.py", line 89, in locate_app
__import__(module)
ImportError: No module named 'run'

Interestingly, using FLASK_APP=run.py actually works even with the app named "webapp". So while I'm not sure how much of this is error on my part vs. error on flask's, the docs are wrong in saying that the Flask object needs to be named "app".

Issue 2:
Example project that shows issue is available here: https://github.com/sean-lynch/flask-cli-issue . I'm not sure if this is a flask cli issue or an issue with documentation. Happy to correct the docs if it's the latter.

I'm attempting to use the large app structure seen in the Flask Larger Applications documentation

First, set up a virutal environment and install flask 0.11 into that environment (requirements.txt

has all that for you).

Can successfully launch app using old app.run() mechanism found in run.py and old_launch.sh

$ python run.py

But can't seem to get to work with flask-cli. You can see both of the methods in new_launch.sh.

This throws ImportError - No module named server:

$ FLASK_APP=server FLASK_DEBUG=1 flask run

This loads, but doesn't register any of the views even though the Loading views... print output makes it to the console.

$ FLASK_APP=server/__init__.py FLASK_DEBUG=1 flask run

How should I be loading a module with flask-cli? Or alternatively, how should I be changing the module structure to support it properly?
Issue 1:
In Deno 1.10.1 returning an error from an Op causes an error in Deno.

thread '<unnamed>' panicked at 'Error '`my_error` err: Generic("Some error.")' contains boxed error of unknown type:
CustomError { class: "Error", message: "`my_error` err: Generic(\"Some error.\")" }', cli\errors.rs:35:7

This is fixable by manually configuring the error resolving callback as:

fn op_name(
state: &mut deno_core::OpState,
args: (),
_zero_copy: Option<deno_core::ZeroCopyBuf>,
)
......
state.get_error_class_fn = &my_error_class_name

Expecting that the error class resolving callback should be set by default.

Issue 2:
Hi, from what I read the issue with OAK is supposed to be fixed. I download the latest version or Deno (1.6.3) and I tried to compile my app again.

Now the "There is no middleware to process requests" is gone, seems to be fixed. But now I've got this error.

"

error: ReferenceError: DenoStdInternalError is not defined

at assert2 (file://$deno$/bundle.js:7476:9)

at getLogger (file://$deno$/bundle.js:7601:9)

at file://$deno$/bundle.js:7614:16

"

App is working fine from deno console. the getLogger function is a function from https://deno.land/std@0.83.0/log

function getLogger(name3) {
if (!name3) {
const d = state1.loggers.get("default");
assert2(d != null, `"default" logger must be set for getting logger without name`);
return d;
}
const result = state1.loggers.get(name3);
if (!result) {
const logger = new Logger(name3, "NOTSET", {
handlers: []
});
state1.loggers.set(name3, logger);
return logger;
}
return result;
}
const logger = getLogger();
Issue 1:
Bug report

when running sample project I get the following error.

./node_modules/next/dist/client/next-dev.js 36:6
Module parse failed: Unexpected token (36:6)
You may need an appropriate loader to handle this file type.
|
|
> import('./noop'); // Support EventSource on Internet Explorer 11
|
| if (!window.EventSource) {
> Ready on http://localhost:3000

Server obviously can't open anything. And subsequent log spits this out:

TypeError: Cannot read property 'issuer' of null
at findEntryModule (/Users/max/Documents/Developer/React/nextExpressFirebase/with-firebase-authentication-app/node_modules/next/dist/server/hot-reloader.js:60:16)
at erroredPages (/Users/max/Documents/Developer/React/nextExpressFirebase/with-firebase-authentication-app/node_modules/next/dist/server/hot-reloader.js:68:29)
at HotReloader.getCompilationErrors (/Users/max/Documents/Developer/React/nextExpressFirebase/with-firebase-authentication-app/node_modules/next/dist/server/hot-reloader.js:310:33)
at <anonymous>

Issue 2:
Bug report

Just upgraded to 8.0.0 and I'm really excited! I've run into an issue though that is preventing my project from compiling

Describe the bug

So when I run dev I am getting the following issue

You may need an appropriate loader to handle this file type.
|
|
> import('./noop');
| var _window = window,
| assetPrefix = _window.__NEXT_DATA__.assetPrefix;

It seems to be coming from webpack 4.29.0 (see here).

It looks like the issue was fixed with this which declared acorn": "^6.0.5 as a dependency but the change doesn't seem to be present on master

Maybe I upgraded too soon?
Issue 1:
Challenge Check for Palindromes has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function palindrome(str) {

//HAHA cheating worked!
if (str == 'not a palindrome' || str == 'nope' || str =='almostomla' || str == '1 eye for of 1 eye.' || str == 'five|\_/|four')
{return false;}
else {
return true;
}
// Good luck!
}

palindrome("eye");

Issue 2:
Challenge Check for Palindromes has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function palindrome(str) {
if(str === 'not a palindrome' || str === 'nope' || str === 'almostomla' || str === '1 eye for of 1 eye.') {
return false;
}
return true;
}

palindrome("eye");
Issue 1:
[SIP-83] Proposal for copying virtual datasets

Motivation

There is currently no way for users to copy datasets in superset. Even though they can copy the SQL of a dataset, any changes we make to the field types (e.g. in cases where we turn long, complex types into JSON, or advanced types as described in #17852), to column labels, etc. cannot be easily copied.

Proposed Change

Add a duplicate action to virtual datasets within the dataset list:

When clicked, it will open a modal which will allow the user to choose a name for the new dataset:

When OK is clicked, a duplicate of the dataset is created with the chosen name.

Here it is in action:

2022-06-01.15-40-22.mp4

See this pull request for a working demo.

New dependencies

None.

Migration Plan and Compatibility

No migration needed.

Rejected Alternatives

No alternatives have been considered at this time.

Issue 2:
A clear and concise description of what the bug is.

Expected results

User able to access/view dashboard

Actual results

Keep having error with "You don't have access to this dashboard."

Screenshots

Tried duplicate admin role and assigned to user but still facing the same error.

How to reproduce the bug

Go to 'Role' then 'Admin' and copy As 'Admin copy'

Assigned user to 'Admin copy'

Log in using user's credential

Try to click on dashboard

Keep having error message: "You don't have access to this dashboard"

Repeat assigned user with different role but result still same

Environment

superset version: v1.1.0

python version: Python 3.8.9

node.js version: v14.17.1

Checklist

[ x] I have checked the superset logs for python stacktraces and included it here as text if there are any.

[ x] I have reproduced the issue with at least the latest released version of superset.

[ x] I have checked the issue tracker for the same issue and I haven't found one similar.
Issue 1:
The fccss and fcces keywords which stand for <script> and </script> are not being replaced properly. A quick search on the codebase revealed that it is public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js who should be doing this but the code is commented out:

***
codeStorage.updateStorage();
};
/*
var challengeSeed = challengeSeed || null;
var allSeeds = '';
(function() {
challengeSeed.forEach(function(elem) {
allSeeds += elem.replace(/fccss/g, '<script>').replace(/fcces/g,'</script>') + '\n';
});
editor.setValue(allSeeds);
(function() {
setTimeout(function() {
editor.refresh();
}, 200);
})();
})();
*/

This results in challenges looking like this and not working properly, although manually inserting script tags allows the user to continue.

Issue #2242 describes the same problem.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine has an issue.

The four Javascript slot machine exercises all display the JS section of the code incorrectly. Presumably fccss is supposed to be <script>, and likewise fcces is supposed to be </script>.
Issue 1:
Hi all,

There's an issue with right aligned navbar elements placed inside a static navbar.

See an example here : http://jsfiddle.net/A6QUB/

The navbar-right element has a negative margin which causes it to overflow beyond the window's width.

I've found this rule in navbar.less on line 254 which applies a negative margin :

.navbar-nav {
&.navbar-right:last-child {
margin-right: -@navbar-padding-horizontal;
}
}

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:
Failed: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-verify-master/5745/

Run so broken it didn't make JUnit output!

Issue 2:
Failed: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-verify-master/5744/

Run so broken it didn't make JUnit output!
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Hi, I started to do the exercise, only I could write $($) and the page freeze, then if i reload the page still be freezing. After a while, the computer start to work hard and then the page show broke it

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

after typing "$($", chrome crashes.
Issue 1:
now for spmd, pmap can only support run parallel running in one process multi devices ,like one worker for multiple gpu/cpu devices, just like MirroredStrategy do

I know that for pmap, it'll translated into ops in hlo like kAllReduce.

so any plan or any possibility to support pmap in multi process and using collective ops like allreduce to parallelize model running , like MultiWorkerMirroredStrategy distributed strategy ,using grpc or nccl for collective communication

It anyone can give me some tips, I can also implement this poc myself

Issue 2:
Hi! I am looking to do fast multi-machine allreduce and broadcast operations when using JAX and MPI.

Here is a script that should be similar to my workload which I ran on 8 GCE instances with 8 V100 GPUs each and a 32 Gbit network:

https://gist.github.com/christopherhesse/b5d141a59d9648caab191d9ff6333117

I ran it using mpich:

mpiexec -f <hosts file> python <path to script>

The output looks like this:

num_params 1
compute : min_elapsed 0.000424 avg_elapsed 0.026451 max_elapsed 0.259608
device_to_host : min_elapsed 0.000070 avg_elapsed 0.000106 max_elapsed 0.000298
allreduce : min_elapsed 0.000209 avg_elapsed 0.002230 max_elapsed 0.018252
num_params 16000000
compute : min_elapsed 0.006838 avg_elapsed 0.023782 max_elapsed 0.155499
device_to_host : min_elapsed 0.123953 avg_elapsed 0.135843 max_elapsed 0.163817
allreduce : min_elapsed 0.505218 avg_elapsed 0.592024 max_elapsed 0.640469

So about 600 ms per allreduce for 16M float32s.

If I use nccl-tests with MPI support (make MPI=1):

mpiexec -f <hosts file> ./nccl-tests/build/all_reduce_perf -b 1M -e 64M -f 2 -g 1 -c 0

The output looks like this:

[0] # out-of-place in-place
[0] # size count type redop time algbw busbw error time algbw busbw error
[0] # (B) (elements) (us) (GB/s) (GB/s) (us) (GB/s) (GB/s)
[0] 1048576 262144 float sum[0] 5328.1 0.20 0.39 N/A[0] 3856.1 0.27 0.54 N/A
[0] 2097152 524288 float sum[0] 6751.2 0.31 0.61 N/A[0] 6132.7 0.34 0.67 N/A
[0] 4194304 1048576 float sum[0] 11100 0.38 0.74 N/A[0] 10899 0.38 0.76 N/A
[0] 8388608 2097152 float sum[0] 9818.9 0.85 1.68 N/A[0] 9351.1 0.90 1.77 N/A
[0] 16777216 4194304 float sum[0] 17219 0.97 1.92 N/A[0] 17121 0.98 1.93 N/A
[0] 33554432 8388608 float sum[0] 35836 0.94 1.84 N/A[0] 36609 0.92 1.80 N/A
[0] 67108864 16777216 float sum[0] 73365 0.91 1.80 N/A[0] 78911 0.85 1.67 N/A

Which looks like 80 ms for 16M float32s.

For my particular training setup, I am seeing ~600 ms spent doing the allreduce, out of ~800 ms total per training loop, so improving this could improve the runtime of my script substantially.

The two ways that seem most promising to me would be:

Use XLA's existing NCCL support or extend it to do this call through XLA

Use pointers to GPU memory to call NCCL from Python (not sure if this would encounter weird issues with XLA also using CUDA)

What do you guys think?
Issue 1:
My laptop runs Ubuntu Linux and uses a Samsung Exynos processor (an ARM chip). Is Atom available for me?

Thanks in advance

Issue 2:
While building the editor according to the instructions for ubuntu 14.04 on armhf, I get this error:

Node: v0.10.32
npm: v1.4.28
Installing build modules...
Installing apm...
npm WARN package.json github-url-from-git@1.1.1 No repository field.

events.js:72
throw er; // Unhandled 'error' event
^
Error: incorrect header check
at Zlib._binding.onerror (zlib.js:295:17)

npm ERR! atom-package-manager@0.101.0 install: `node ./script/download-node.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the atom-package-manager@0.101.0 install script.
npm ERR! This is most likely a problem with the atom-package-manager package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./script/download-node.js
npm ERR! You can get their info via:
npm ERR! npm owner ls atom-package-manager
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.0.31-1759357
npm ERR! command "node" "/root/git/atom2/atom/build/node_modules/.bin/npm" "--userconfig=/root/git/atom2/atom/.npmrc" "install" "--quiet"
npm ERR! cwd /root/git/atom2/atom/apm
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

I am running all commands as root.'What am I missing?