WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
From @ikourfaln on May 18, 2016 11:4

VSCode Version: 1.1.1

OS Version: Windows 10

Steps to Reproduce:

if we have two or more functions with the same name, there is no syntax highlighting error !!

is this feature not yet available in the language services or I miss samething here ?

Copied from original issue: microsoft/vscode#6479

Issue 2:
Hi,

The following valid js code compile with TS2362 error

let start = new Date();
let elapsed = new Date() - start;

index.ts(9,22): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
index.ts(9,37): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.

To avoid the error i need to explicitely cast opreands wit <any>.
Issue 1:
Take the following examples:

async function doRequest() {
const res = await fetch("http://localhost:4545/cli/tests/fixture.json");

const someCondition = true;
if (someCondition) throw new Error();

const body = await res.json();

return body;
}

doRequest().catch(console.error);

setInterval(() => {
console.log(Deno.resources());
}, 2000);

await fetch("http://localhost:4545/cli/tests/fixture.json");
// I don't care about the body

Since fetch response resource id is only closed after the body is consumed, in the examples above the resource handle for both requests are never closed. Easily reproducible in a test.

Deno.test('leak', async() => {
await fetch("http://localhost:4545/cli/tests/fixture.json");
// I don't care about the body
});

AssertionError: Test case is leaking resources.
Before: {
"0": "stdin",
"1": "stdout",
"2": "stderr"
}
After: {
"0": "stdin",
"1": "stdout",
"2": "stderr",
"3": "httpBody"
}

Currently, there's no way in Deno to close the resource handle without consuming the body.

Fetch specification does not mention anything about a default read timeout, where we could close the handle after the timeout is reached.

Fortunately, it provides a way to abort the request & consumption of the body using AbortController, and signal option (not supported in Deno).

const abort = new AbortController();
const res = await fetch("http://localhost:4545/cli/tests/fixture.json", {
signal: abort.signal,
});
assert(res.ok);
// Discard body
abort.abort();

Until the above is supported fetch response body must always be consumed.

const res = await fetch("http://localhost:4545/cli/tests/fixture.json");
await res.text(); // consume body

Issue 2:
Hi 👋

I believe I have found an issue where the fetch-api leaks resources if the

body is not resolved, e.g. with .text()/.json().

Given the following test:

import { assertEquals } from "https://deno.land/std/testing/asserts.ts";

Deno.test("fetching TODOs", async () => {

const response = await fetch("https://jsonplaceholder.typicode.com/todos/");
//await response.json(); //NOTE: adding this line removes the issue (or .text()/similar)
assertEquals(200, response.status);
});

Produces the following output:

running 1 tests
test fetching TODOs ... FAILED (94ms)

failures:

fetching TODOs
Error: Test case is leaking resources.
Before: {
"0": "stdin",
"1": "stdout",
"2": "stderr"
}
After: {
"0": "stdin",
"1": "stdout",
"2": "stderr",
"3": "httpBody"
}
at Object.assert ($deno$/util.ts:25:11)
at Object.resourceSanitizer [as fn] ($deno$/testing.ts:75:5)
at async TestApi.[Symbol.asyncIterator] ($deno$/testing.ts:259:11)
at async Object.runTests ($deno$/testing.ts:341:20)

failures:

fetching TODOs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out (95ms)

The issue is only present from v0.37.0.
Issue 1:
Challenge Escape Sequences in Strings has an issue.

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

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

My code:

var myStr; // Change this line

myStr = "FirstLine\n\\SecondLine\\\rThirdLine";

FirstLinenewlinebackslashSecondLinebackslashcarriage-returnThirdLine

It made me very confused!

I just can't understand this, and why not directly show off the result effect of pic?

just like this!

Issue 2:
Challenge Escape Sequences in Strings has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; 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:

var myStr="FirstLine\n\\SecondLine\\\rThirdLine"; // Change this line
Issue 1:
The following example explodes in memory usage when calling the jitted functions. The culprit seems to be the dynamic_slice. It happens calling with or without the GPU.

Incidentally, it is also rather slow (twice slower than the plain Python version), so I welcome comments if there is a jax-friendlier way to rewrite it, but perhaps that is what jit should do?

My system:

Fedora 29, 31 GB RAM

jax 0.1.36

jaxlib 0.1.16, installed from the googleapis wheel.

CUDA 10.0

Nvidia driver 430.14.

Issue 2:
Please:

Check for duplicate issues.

Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:

from jax import tree_util
leaves, td = tree_util.tree_flatten( (1, (2, 3), [4], {'a': 42}, 99) )
td.num_leaves, td.num_nodes
# (6, 10)
td2 = tree_util.treedef_tuple(td.children())
td2.num_leaves, td2.num_nodes
# (0, 10)

Notice td.num_leaves is 6, but td2.num_leaves is 0.
Issue 1:
Challenge Bonfire: Truncate a string has an issue.

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

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

My code:

function truncate(str, num) {
if (str.length <= 3) {
str = str.slice(0,num).concat("..");
}
if (str.length > num) {
str = str.slice(0,num-3).concat("...");
}
// Clear out that junk in your trunk
return str;
}

truncate("A-1", 2);

Hi! This code passes when it shouldn't. The challenge asks for users to truncate if str.length is longer than num.length, but this configuration truncates str as long as it is shorter than 3 characters, regardless of the length of num. This could be resolved by making another test parameter truncate("A-", 2) which does not truncate.

Issue 2:
Challenge change-the-color-of-text has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0.

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

<h2 style="color: red">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Issue 1:
Challenge use-a-google-font has an issue.

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

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

<style>
body {
font-family: "Open Sans";
}
h4 {
text-align: center;
background-color: rgba(45, 45, 45, 0.1);
padding: 10px;
font-size: 27px;
text-transform: uppercase;
}
p {
text-align: justify;
}
.links {
text-align: left;
color: black;
opacity: 0.7;
}
#thumbnail:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.fullCard {
width: 245px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px 5px;
padding: 4px;
}
.cardContent {
padding: 10px;
}
.cardText {
margin-bottom: 30px;
}
</style>
<div class="fullCard" id="thumbnail">
<div class="cardContent">
<div class="cardText">
<strong><h4>Alphabet</h4></strong>
<hr>
<em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p></em>
</div>
<div class="cardLinks">
<u>
<a href="https://en.wikipedia.org/wiki/Larry_Page" class="links">Larry Page</a><br><br>
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" class="links">Sergey Brin</a>
</u>
</div>
</div>
</div>

```

Issue 2:
Challenge http://beta.freecodecamp.com/challenges/waypoint-label-bootstrap-wells has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

I have the following code, but the the first challenge "Add an h4 element to each of your

elements." is not correctly validated (see screenshot below).

<div class='container-fluid'>
<h3 class='text-primary text-center'>jQuery Playground</h3>
<div class='row'>
<div class='col-xs-6'>
<h4>#left-well</h4>
<div class='well' id='left-well'>
<button class='btn btn-default target'></button>
<button class='btn btn-default target'></button>
<button class='btn btn-default target'></button>
</div>
</div>
<div class='col-xs-6'>
<h4>#right-well</h4>
<div class='well' id='right-well'>
<button class='btn btn-default target'></button>
<button class='btn btn-default target'></button>
<button class='btn btn-default target'></button>
</div>
</div>
</div>
</div>
Issue 1:
I just initiating with sklearn it is a great library and the best, the documentation is awesome.

But, not for the first time, a cannot access any links in SourceForge:

The sourceforge.net website is temporarily in static offline mode.

Only a very limited set of project pages are available until the main website returns to service.

I urge you to move the documentation to elsewhere possibly to GitHub Wiki or GitHub pages.

Issue 2:
As you have observed, sourceforge.net is not a very reliable host. Furthermore it would be simpler to update the documentation if we used the github.io / github pages system.

There are some limitations though:

it's apparently not possible to setup HTTP 301 / 302 redirects for instance from / to /stable for the home page.

I am not sure github.io will allow us enough space to host all the old versions of the website (would need to check the size limits and measure the size of the total folder on sourceforge).

For the first issue, I have made some tests with HTML meta refresh to implement a redirection at the HTML level.

See:

https://github.com/ogrisel/test-gh-pages/blob/gh-pages/index.html

and the result:

http://ogrisel.github.io/test-gh-pages/

This causes some flickering but I think it's ok. What do other people think?
Issue 1:
The code passes all tests, but no message displays confirming that the bonfire is completed/the bonfire is not checked off on the map. Screenshots attached of both the Sum of All Odd Fibonacci Numbers and the Binary Agents bonfire with the same issue. Only present on some bonfires, others are working fine.

Happening on both OSX and Linux Mint operating systems using Firefox

Issue 2:
Although I have done all Bonfires, my profile page only shows 34 of them (not counting duplicates).

http://www.freecodecamp.com/akiralaine
Issue 1:
hi, when I run webpack, I get a warning message like:

WARNING in node_modules/express/lib/view.js

Critical dependencies:

78:29-56 the request of a dependency is an expression

@ node_modules/express/lib/view.js 78:29-56

I'm not clear what I should do to resolve this. thanks.

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Un-referenced code is included in bundle (no tree shaking).

If the current behavior is a bug, please provide the steps to reproduce.

Minimal example: https://github.com/GordonSmith/tmp

What is the expected behavior?

unitTest function to be excluded from the bundle

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Issue 1:
This doesn't work. It's not a huge deal, but a bit inconvenient.

begin
"A test function"
test_function(a) = "testing"
end

@doc test_function

Issue 2:
e.g. the following does not currently attach a docstring

begin
"""
abc
"""
f(x) = 1
end

It's a one-line change in the parser, but I wanted to check whether there was any intention behind this first. cc @JeffBezanson
Issue 1:
https://github.com/JuliaLang/julia/tree/master/contrib/install.sh has a line that depends on output coming from cp.

In Ubuntu, if the locale is set to en_US.UTF-8 then cp -va outputs fancy Unicode quote symbols that are not accounted for by the rest of the script causing make install to fail:

$ cp -va file1 file2
‘file1’ -> ‘file2’

Issue 2:
It looks like it's the chmod command that's returning status 1. This is with commit ac7ac0b.

I added an echo to see what command it's actually running at the end, and it looks like somehow there's some weird characters showing up at the beginning and end.

chmod 755 ��/home/sfr/local/src/julia/julia-ac7ac0b5fd/bin/julia�� 2>/dev/null
chmod 755 ��/home/sfr/local/src/julia/julia-ac7ac0b5fd/bin/julia-debug�� 2>/dev/null
Issue 1:
What problem does this feature solve?

One guy finded, that computed getter may use with arrow function and destructed variables/methods.

I went ahead, and appended this case to set(), but failed, because setter not called component.

Later, i tried use arguments: (locale => arguments[1].a.methods.updateLocale(locale)), but vuex can't use dispatch to this, because undefined.

I think this API looks nice and will reduce many new lines :D

What does the proposed API look like?

export default {
computed: {
...mapGetters(['global']),
locale: {
get: ({ global }) => global.locale,
set: (locale, { updateLocale }) => updateLocale(locale)
}
},
methods: {
...mapActions(['updateLocale'])
}
}

Issue 2:
What problem does this feature solve?

Easy two-way binding between v-model and vuex state / mutations.

What does the proposed API look like?

For example I want to bind the state of the global menu to a vuex state.

Meanwhile I use this manual workaround in my component:

computed: {
nav: {
get () { return this.$store.state.nav },
set (v) { this.$store.commit('SET_NAV', v) }
}
}

It would be helpful to have an easy function like mapGetters to do this.
Issue 1:
I think it would be great if this sort of thing worked:

trait Shizzle {
static fn shizzle();
}

trait Shozzle : Shizzle {
static fn shizzle() {
io::println(~"shizzle! " + shozzle::<self>());
}
static fn shozzle() -> ~str;
}

impl int : Shozzle {
static fn shozzle() -> ~str { ~"i'm an int!" }
}

fn main() {
shizzle::<int>();
}

Currently it fails with this error:

test-trait-inheritance.rs:12:4: 12:23 error: duplicate definition of value shizzle
test-trait-inheritance.rs:12 static fn shizzle() {
^~~~~~~~~~~~~~~~~~~
test-trait-inheritance.rs:5:4: 5:23 note: first definition of value shizzle here:
test-trait-inheritance.rs:5 static fn shizzle();
^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error

Issue 2:
When generating a public fn with impl code, the pub keyword is ignored, and the resulting function is private (and raises a dead_code warning).

It is also not possible to move the pub keyword into the macro, as it then causes an error:

expected one of `extern`, `fn`, or `unsafe`, found `pub`

Related issues: #4621, #11403

The workaround suggested in #4621 (generating multiple impl blocks) is unsatisfactory for public impl functions, as it does not allow for documenting the function, and produces doc output with repeated impl Type headers for each function.

The use case for this is generating code for library bindings.

The following code reproduces the issue:

macro_rules! defn {
($n:ident) => (
fn $n (&self) -> i32 { 1 } )
}

#[derive(Copy)]
pub struct S;

impl S {
pub defn!(f);
}

#[cfg(test)]
mod tests {
use super::S;

#[test]
fn test_f() {
let s=S;
assert_eq!(1, s.f());
}
}
Issue 1:
matplotlib's pyplot.hist and pyplot.hist2d functions fill the supplied data into histogram bins and plot them, but very often users will have already done the first step (sorting data into bins) in their own code and are merely interested in presenting their results in a "style" that is evocative of histograms (most commonly: bar chart with no separation for 1D data, colored grid for 2D data).

Right now they can do this by using the pyplot.bar and pyplot.imshow functions for 1D and 2D data, respectively, but they have to fill in a bunch of arguments to make it look like something produced by pyplot.hist or pyplot.hist2d and they have to find out that those two are the right functions for the job in the first place (not very intuitive).

Hence I think it would be good if there were separate functions or maybe just special arguments to pyplot.hist/hist2d that allow you to plot bin values (as opposed to data that is yet to be binned) as histograms that look exactly as if they had been produced by pyplot.hist/hist2d.

Issue 2:
The following script and the image it produces illustrates the issue:

import numpy as np

from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable

fig, ax = plt.subplots()

imax = ax.imshow(np.random.random((200, 200)), extent=[0, 100, 0, 1], aspect=100)

divider = make_axes_locatable(ax)

cax = divider.append_axes("right", size="5%", pad="2%")

cb = fig.colorbar(imax, cax=cax)

As a workaround, I can produce the plot I'm looking for using ImageGrid:

import numpy as np

from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid

fig = plt.figure(1, (8, 4))

grid = ImageGrid(fig, 111, nrows_ncols = (1, 1), axes_pad=0.1, cbar_mode='single')

imax = grid[0].imshow(np.random.random((200, 200)), extent=[0, 100, 0, 1], aspect=100)

cax = grid.cbar_axes[0]

cb = fig.colorbar(imax, cax=cax)

I think this might be related to #3286. Not sure if it's an out and out duplicate or just another symptom of the same basic issue with make_axes_locatable.

Some version info:

numpy 1.9.2

matplotlib 1.4.3

python 2.7.9
Issue 1:
Electron version:

1.2.1

Operating system:

windows 10

I am developing an app with electron on win 10 and the frame header (where you find functions like close the window 'x' ) is white which is not the color I want.

Is there any way I can customize the color?

Thx!

Issue 2:
We're currently working on switching Brackets over to Electron (fork, Google Groups thread).

It's making steady progress, Electron is great and fits our needs very well, but one issue we face is that, while our old shell featured a dark UI (see screenshots: Mac, Win), we cannot implement that in Electron without creating a fork.

Thus, I'd like to ask if it would be possible to make Chrome Themes work in Electron, which could be (we're not sure yet) an easy solution to our problem?

cc @zaggino @ryanstewart
Issue 1:
I'm submitting a ...

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

Current behavior

The parent component generates a component based on the supplied component metadata. The lifecycle hooks of the generated component which in turn the generated child component also generates another component is not fired/called.

Expected behavior

The lifecycle hooks defined in the nested generated components should be fired.

Minimal reproduction of the problem with instructions

Reproduction Link: http://plnkr.co/edit/wRfKN5wynVC3LZKDVw1s?p=preview

The output should be:

Hello Angular2

Parent
Child
Foo

The current behavior is:

Hello Angular2

Parent
Child

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

I have different kinds of modals (chart, alert, pdf viewer). One of them is a modal that displays any kind of chart like line chart, bar chart etc. So basically the parent acts as a modal component factory, the child is the chart modal which in turn dynamically creates charts based on the supplied component metadata.

Please tell us about your environment:

Operating System: macOS 10.12.2

Package Manager: Yarn 0.18.1

Angular CLI: 1.0.0-beta.26

Angular version: 2.4.4

Browser: Chrome 55.0.2883.95, Firefox 50.1.0. Haven't tested on others

Language: TypeScript 2.0.10

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

Issue 2:
components loaded with the dynamic component loader are not having their lifecycle events called. this was a attempted workaround where these same events were not called using a route. both of these situations involve angular 2 running inside of an electron application. we need the lifecycle hooks, especially ngOnInit. here is a plunker which reproduces the dcl behaviour

http://plnkr.co/edit/XXLWqxwywGoFZaX1w99I?p=preview
Issue 1:
Bug report

Describe the bug

I am not sure about this bug is due to antd or nextjs.

it cannot use Link or Router.push to a page that contains antd component from a page not contains any antd component

if there are three pages:

page A: contain antd component

page B and C: not contain antd component

page B -> page C : Success

page A -> page B : Success

page A -> page C : Success

page B -> page A : Failure

page C -> page A : Failure

To Reproduce

Clone the example project

npx create-next-app --example with-ant-design-less with-ant-design-app

Create a page without any antd component

// pages/test.js

import Link from 'next/link';
import { useRouter } from 'next/router';

const TestPage = props => {
const Router = useRouter();
const goToIndexPage = e => {
e.preventDefault();
Router.push('/');
};
return (
<div>
<a href="/" onClick={goToIndexPage}>
Router push Test
</a>
<br />
<Link href="/">
<a>Link Test</a>
</Link>
</div>
);
};

export default TestPage;

Start project and enter to localhost:3000/test and try

Expected behavior

Link and Router.push should work

System information

OS: [e.g. macOS, Windows]

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

Version of Next.js: 9 / 8

Additional context

it can reproduce in next@8 and antd@3.9 too

I built the project also, but it is the same behaviour

Issue 2:
This is bug report

Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:

https://github.com/standy/next-css-error

Bug appears in next@7.0.0 + next-css@1.0.1,

Older next@6.1.2 + next-css@0.2.0 works fine
Issue 1:
Describe the bug

When I try to copy the example from README with an options argument in my typescript project I get an error saying "Expected 0-2 arguments, but got 3".

To Reproduce

Here's a reproduction of the issue on codesandbox: https://codesandbox.io/s/epic-kapitsa-cwxeo?file=/src/App.tsx

This part is directly copied from the README:

axios.interceptors.request.use(function (config) {
config.headers.test = 'I am only a header!';
return config;
}, null, { synchronous: true });

Expected behavior

Expected types to expect an options argument

Environment

Axios Version - 0.21.1

Adapter - irrelevant

Browser - irrelevant

Browser Version - irrelevant

Node.js Version - irrelevant

OS - irrelevant

Typescript version - 4.1.3

Additional context/Screenshots

Also I found the options param missing here: https://github.com/axios/axios/blob/master/lib/core/InterceptorManager.js#L12

The function clearly takes three arguments, while only two are described. Is this what's causing the issue?

Issue 2:
Describe the bug

The type declared for InterceptorManager.use does not include the third parameter (options), so typescript projects show an error when supplying it.

To Reproduce

Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. If your problem is not reproducible, please file under Support or Usage Question

axios.interceptors.request.use(config => config, null, { synchronous: true });
// ^ red squiggle here

Expected behavior

The type includes the optional third parameter, an object with a boolean synchronous property, and a runWhen property that takes an AxiosRequestConfig and returns a boolean;

Environment

Axios Version [e.g. 0.18.0]

Adapter [e.g. XHR/HTTP]

Browser [e.g. Chrome, Safari]

Browser Version [e.g. 22]

Node.js Version [e.g. 13.0.1]

OS: [e.g. iOS 12.1.0, OSX 10.13.4]

Additional Library Versions [e.g. React 16.7, React Native 0.58.0]

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.