WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
The figure background color is not respected by savefig(). MWE:

import matplotlib.pyplot as plt

fig = plt.figure()
plt.plot([1, 2, 3], [1, 2, 3])

plt.gca().set_facecolor('#2d2d2d')
plt.gcf().patch.set_facecolor('#2d2d2d')

# plt.show()
plt.savefig("out.png")

show():

savefig():

Issue 2:
I find the current handling of background colors very non-intuitive:

figure facecolor is not applied for savefig() by default

figure facecolor is not applied setting frameon=False

axis_bgcolor is not applied when hiding axis lines/ticks via axis('off')

So using a white plain surface to draw objects needs the following code:

fig = figure(..., facecolor='w', edgecolor='None')
ax.axis('equal') # equal scale
ax.axis('off') # do not show axis
ax.axis([-1, 1, -1, 1]) # scale to unit lengths
show()
fig.savefig(..., facecolor=fig.get_facecolor(), edgecolor='None', transparent=True)

My suggestion

apply same colors to savefig() by default

mention in the docs of axis_bgcolor and axis('off') that this setting is ignored

mention in the docs of facecolor and frameon that this setting is ignored
Issue 1:
API server with etcd v2 supports creating a large object (n*100 KB) , but not updating it. The cause is:

k8s storage layer sets both PrevValue (the original value of the object as we know) and PrevIndex in the update request sent to etcd v2. They are set as query paratemeters. etcd v2.2.1 server drops the connection if the parameter size is larger than 1052KB. Hence, the update request fails if the object is large. However, because a creation request doesn't set the query parameters, it will succeed.

The problem does not exist in the etcd v3 storage, because it only compare the previous revision, not the value. code.

Action items:

To fix the issue with v2 etcd, we can set only the PrevIndex, but not the PrevValue here. I think PrevIndex is enough to prevent race.

API server should gate the size of the objects. If the backend is etcd, the threshold should be < 1MB, according to this comment. Not sure what's the threshold for etcd3.

@kubernetes/sig-api-machinery @lavalamp @hongchaodeng @xiang90

Issue 2:
Today in @kubernetes/sig-testing we discussed the idea of improving the examples over time with a new policy, based on.

a few, domain driven examples that are artfully curated by developers, i.e., less than 4.

covering all features in the examples : rather than duplicating the core features using non idiomatic kube techniques.

converting the existing examples which don't actually "tell a story" into a blueprints/ directory which might be put into contrib.

That way, if the mongodb community wants to curate their recipes upstream, they can easily do so, without us having to support then in the e2es.

I think this should be done slowly. For now, I think its great for us to keep maintaining the examples/, as many people continue to use them. We can work with the @kubernetes/sig-big-data @kubernetes/sig-api-machinery and @kubernetes/sig-auth and other sigs to make sure the pedagogical elements are all addressed.
Issue 1:
Documentation Link

https://matplotlib.org/devdocs/gallery/index.html#examples

Problem

Folks often go to the gallery looking for an overview of plotting methods, which are in the plot types gallery

Suggested improvement

Add a sentence to the top of the example gallery page (which is galleries/examples/README.txt) pointing to the plot types gallery, something like

For an overview of the plotting methods we provide, see :ref:plot_types

This issue is aimed at getting someone comfortable with our doc build and pr process.

Issue 2:
Issue

In #9324 I refactored the docstrings for legend.Legend.__init__, figure.Figure.legend and axes.Axes.legend. In particular, all three have the same kwargs because the two artist versions passthrough kwargs to legend. All three had different and contradictory/incomplete docstrings.

To solve this, I used string interpolation. The developer docs say:

Since matplotlib uses a lot of pass-through kwargs, e.g., in every function that creates
a line (plot(), semilogx(), semilogy(), etc…), it can be difficult for the new user to know which
kwargs are supported. Matplotlib uses a docstring interpolation scheme to support
documentation of every function that takes a **kwargs.

and the code has numerous places where this is used. I used a simple form of this that hard-coded the kwarg doc string and then invoked it in the three docstrings:

'''
Parameters
-----------

%(_legend_kw_doc)s
'''

Reviewers didn't like this (@NelleV, @anntzer, @tacaswell ) because apparently this sort of interpolation is fragile and has caused issues with the docs in the past:

#7095, or http://matplotlib.org/2.0.0/api/_as_gen/matplotlib.axes.Axes.semilogy.html#matplotlib.axes.Axes.semilogy, are example of issues caused by uncontrolled interpolation.

For #9324 it was decided that we should just cut-and-paste the kwarg docs into the three docstrings. I also implemented a test in test_legend.py that insured that the docstrings were the same to stop future drift of the docstrings.

Proper solution?

So, what is the proper solution to the documentation problem of repeating passthrough kwargs? I didn't see that the substitution decorator was so bad, but I've not seen all the problems.

Cut-and-paste:

perhaps with unit tests to make sure the docstrings don't drift.

Structure to hold docstrings:

@anntzer suggested:

I think we should either use a proper ("structured") interpolation machinery or none at all.

i.e., he suggested a "structured" docstring whereby each section is an OrderedDict entry, and each kwarg is an OrderedDict entry. This allows referencing of this information in other docstrings. See below.

Functions to hold docstrings:

@efiring suggested what is also essentially suggested in MEP10 which is that specialized documentation functions be used that have the repeated kwargs, and then the main method's documentation references this.

Documentation issue

I think the developer docs should make the deprecation of the interpolation machinery explicit if it truly is deprecated.

Affected functions:

figure.legend = axes.legend = legend.Legend

colorbar?

text properties
Issue 1:
Forking this from issue #3610.

My experiments show that net.Dial has two modes of operation when connecting to a
dual-stack hostname:

1. By default, it prefers IPv4 :(
2. When using a net.Dialer{DualStack: true}, IPv4 and IPv6 SYNs are sent simultaneously,
and the resulting address family is unpredictable.

The latter violates a "MUST" in the Happy Eyeballs RFC:
http://tools.ietf.org/html/rfc6555#section-4.1

This is harmful for two reasons:
- It increases server load in the common case, by always sending two SYNs.
- Dual-stack clients cannot reliably use IPv6 to route around NATs. The primary
incentive for a network operator to deploy IPv6 is to reduce NAT load (and therefore
save money), but this sort of client behavior invalidates that incentive.

Issue 2:
The following program fails with gc but succeeds with 'ssadump -run', because gc is
computing the initialization order incorrectly.

---------------

package main

// The package-level var initialization dependency graph contains the
// following edges:
// order -> makeOrder
// makeOrder -> b
// makeOrder -> a
// Since a and b are incomparable in this partial order, we initialize
// them in lexical order, a before b. The total order of
// initialization is thus: [a, b, order].
//
// ssadump -run succeeds but go run fails.
//
// Interestingly, reversing the order of {b, a} in makeOrder (and {1,
// 0} in the assertion) causes it to succeed with both tools, meaning
// that gc uses the lexical order of the references within makeOrder,
// not the lexical order of the declarations of a and b, to resolve
// incomparability.

var counter int

func next() int {
c := counter
counter++
return c
}

func makeOrder() [2]int {
return [2]int{b, a}
}

var order = makeOrder()

func main() {
if order != [2]int{1, 0} {
panic(order) // gc panics (got {0, 1})
}
}

var a, b = next(), next() // 0, 1

---------------

(Again I feel a vague sense of deja vu, but couldn't find a duplicate report.)
Issue 1:
VSCode Version: 1.1.1

OS Version: Windows 7 Professional x64

Steps to Reproduce:

Create a document with multiple lines

Search for \n, \r or \r\n in regex mode.

What happens: When I try to search a multi-line text for \n, \r or \r\n in regex mode it doesn't find any results. However when I try to search for the same thing in Atom or Sublime, it finds results.

Atom

Sublime Text 3

VS Code

Issue 2:
The Find dialog (Ctrl+F) does not allow multi-line finds using the \n character as it currently considers each line individually. See TextModel._doFindMatches

Created out of a discussion in #278
Issue 1:
I'm developing a computationally intensive application using electron. I came to notice that when I drag the browser around, SOMETIMES the main Node.js thread is blocked, and it blocks the main thread for a while, or even completely by change.

I first thought it might be the communication between IPCMain and IPCRender so I disconnect all of them in my code, but it doesn't help. This is like a reverse case of #3363, however as far as I know I can't workaround it not touching code in electron.

To make a simple illustration, I use the electron quick start application and 15 lines additional code.

Electron version: 1.4.15

Operating system: Windows 10 Pro Version 10.0.14393 (Also reproduce-able on Ubuntu )

How to reproduce

Download electron-quick-start

https://github.com/electron/electron-quick-start

In main.js add

var lastDate = new Date();

function printTime () {
var d = new Date();
var delta = d - lastDate;
if(delta > 20) {
console.log(delta);
}
lastDate = d;
}

and modity app on ready

app.on('ready', () => {
createWindow();

setInterval(printTime, 10);
})

Run the app, and drag the title bar of the browser window around

Expected behavior

If the main thread keeps running, the interval calls printTime every 10ms and the threshold for the console.log is 20ms, so there should be no print out in the console.

Actual behavior

I get random numbers like

96
34
33
601
118
32

Issue 2:
Electron version: 1.3.5

Operating system: OS X

This is going to sound ridiculous, but setTimeout is not working for me in the main process. Consider this trivial application, no windows or anything:

var Electron = require( 'electron' );
var app = Electron.app; // Module to control application life.

// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {

var x = 0;
var timeout_tester = function run_again(){

console.log( x, x, x );
x += 1;
setTimeout( run_again, 30 );
};

timeout_tester();
});

When I run this, I see the counter increment on the console until ~900. From then on it very sporadically fires. I cannot tell you how long it took me to track an issue I was having down to this, and even then I did not believe it. Please tell me someone can reproduce this or point out the wildly stupid thing I am doing.

Thanks in advance
Issue 1:
Proposal to implement forced and optional unwrapping in Typescript to avoid boilerplate null checking code.This is a feature in Apple's swift language and very helpful in following clean code practices.

Reference -https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_Programming_Language/OptionalChaining.html

Issue 2:
Current Status

The TC39 proposal is now at stage 3 (🎉🎉🎉🎉🎉)

Implementation is in progress

You can expect this feature in TypeScript 3.7

We'll update here when it's available in a nightly build

Holding off on Optional Call until its semantics are clarified at committee

Open questions

What special-casing, if any, should document.all get?

C# and other languages have syntax sugar for accessing property chains where null (or in our case, undefined) might be encountered at any point in the object hierarchy.

var x = { y: { z: null, q: undefined } };
console.log(x?.y?.z?.foo); // Should print 'null'
console.log(x?.baz); // Still an error
console.log(x.y.q?.bar); // Should print 'undefined'

Need proposal on what exactly we should codegen, keeping in mind side effects of accessors.

Edit by @DanielRosenwasser February 27, 2018: This proposal is also called the "null propagation" operator.
Issue 1:
trait Thing {
fn hello(&self) -> uint;
}

struct Thing1 { name: String }
impl Thing for Thing1 {
fn hello(&self) -> uint { 1 }
}

struct Thing2 { name: String }
impl Thing for Thing2 {
fn hello(&self) -> uint { 2 }
}

fn main() {
let t: Box<Thing> = match true {
true => box Thing1 { name: "hello".to_string() },
_ => box Thing2 { name: "hello".to_string() },
};
println!("{}", t.hello());
}

Running this code yields various failures (SIGSEGV, "Illegal instruction: 4"):

$ rustc s.rs
# Warnings snipped
$ ./s
Illegal instruction: 4

LLDB has this to say:

(lldb) bt
* thread #1: tid = 0x821935, 0x0000000100003358 s`Box$LT$Thing$GT$::glue_drop.1635::ha5cee14c6e595b4f + 72, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
* frame #0: 0x0000000100003358 s`Box$LT$Thing$GT$::glue_drop.1635::ha5cee14c6e595b4f + 72
frame #1: 0x00000001000011f8 s`main::hb72fec937d964a29Zaa + 680
frame #2: 0x000000010000f2d9 s`rust_try_inner + 9
frame #3: 0x000000010000f2c6 s`rust_try + 6
frame #4: 0x000000010000e1df s`rt::lang_start::h270935babb5b337fRCz + 831
frame #5: 0x00000001000013bf s`main + 79
frame #6: 0x00007fff92d9b5c9 libdyld.dylib`start + 1

and I'm reasonably up-to-date:

$ rustc --version=verbose
rustc 0.13.0-dev (1c2df5cc3 2014-12-20 01:12:19 +0000)
binary: rustc
commit-hash: 1c2df5cc3cfc0c9e80adf9fa6504d55056741c5a
commit-date: 2014-12-20 01:12:19 +0000
host: x86_64-apple-darwin
release: 0.13.0-dev

Issue 2:
Spawned off of #20055 (and PR #21692 )

I thought I fixed this and wrote a test for it in PR #21692, but I was wrong -- the test for Box<Trait> was erroneous/incomplete at best.

Test case:

trait Boo { }

impl Boo for [i8; 1] { }
impl Boo for [i8; 2] { }
impl Boo for [i8; 3] { }
impl Boo for [i8; 4] { }

pub fn foo(box_1: fn () -> Box<[i8; 1]>,
box_2: fn () -> Box<[i8; 2]>,
box_3: fn () -> Box<[i8; 3]>,
box_4: fn () -> Box<[i8; 4]>,
) {
let _b: Box<Boo> = match 3 {
1 => box_1(),
2 => box_2(),
3 => box_3(),
_ => box_4(),
};
}

pub fn main() {
fn box_1() -> Box<[i8; 1]> { Box::new( [1i8; 1] ) }
fn box_2() -> Box<[i8; 2]> { Box::new( [1i8; 2] ) }
fn box_3() -> Box<[i8; 3]> { Box::new( [1i8; 3] ) }
fn box_4() -> Box<[i8; 4]> { Box::new( [1i8; 4] ) }

println!("Hello World 1");
foo(box_1, box_2, box_3, box_4);
println!("Hello World 2");

}

In the playpen, this currently prints:

Hello World 1
playpen: application terminated abnormally with signal 4 (Illegal instruction)
Issue 1:
I'm using django-celery to send emails. In development, I set EMAIL_BACKEND to django.core.mail.backends.console.EmailBackend so the email output will go straight to the celeryd console. When the content of the email contains a unicode character, celery.log barfs on line 56:

[2013-05-02 12:54:15,353: WARNING/PoolWorker-2] <Unrepresentable <type 'unicode'>: UnicodeDecodeError('ascii', '\x1b[1;33mContent-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nSubject: TulsaWebDevs was edited by groovezilla\nFrom: notifications@support.mozilla.com\nTo: luke.crouch@gmail.com\nDate: Thu, 02 May 2013 19:54:15 -0000\nMessage-ID: <20130502195415.5969.22584@developer-local.allizom.org>\n\ngroovezilla created a new revision to the document TulsaWebDevs.\n\nTo view this document\'s history, click the following link, or paste it into your browser\'s location bar:\n\nhttps://developer.mozilla.org/en-US/docs/TulsaWebDevs$history\n\n--\nChanges:\n--- [en-US] TulsaWebDevs #27\n\n+++ [en-US] TulsaWebDevs #28\n\n@@ -11,7 +11,7 @@\n\n Meets every 3rd Monday of each month at the i2E Tulsa office for web technology presentations.\n </p>\n <p>\n- Meets every Friday at Fab Lab Tulsa for coworking, which is not quit\xc3\xa9\xc3\xa9 good enough.\n+ Meets every Friday at Fab Lab Tulsa for coworking, which is not quit\xc3\xa9 good enough.\n </p>\n <h2 id="History">\n History\n\n--\nUnsubscribe from these emails:\nhttps://developer.mozilla.org/unsubscribe/1?s=KWnEcxVsDx\x1b[0m', 842, 843, 'ordinal not in range(128)')>
Traceback (most recent call last):
File "/vagrant/vendor/packages/celery/celery/log.py", line 56, in format
record.msg = safe_str(str_t(color(record.msg)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 842: ordinal not in range(128)

Issue 2:
Colored celery console logger fails to display unicode strings containing non-ascii letters (e.g. django's sql query log with non-ascii data):

UnicodeEncodeError: 'ascii' codec can't encode characters in position 91-95: ordinal not in range(128)
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 776, in emit
msg = self.format(record)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 654, in format
return fmt.format(record)
File "/Users/kmike/envs/zina/lib/python2.6/site-packages/celery/log.py", line 56, in format
t = logging.Formatter.format(self, record)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 439, in format
s = self._fmt % record.__dict__
File "/Users/kmike/envs/zina/lib/python2.6/site-packages/celery/utils/term.py", line 62, in __str__
return prefix + str(reduce(self._add, self.s)) + suffix

As a workaround I set CELERYD_HIJACK_ROOT_LOGGER = False and then add 'logging.StreamHandler' to 'celery' logger (it handles non-ascii data).
Issue 1:
struct Foo {
bar: u32,
}

fn main() {
let mut foo = Foo { bar: 10 };
let foo2 = foo; // <-- moved here

foo.bar = 20; // <-- but still works!

println!("{}", foo.bar); // <- failed because `foo` has been moved
}

Issue 2:
Here is some sample code:

#[derive(Show)]
struct Pair { lft: u8, rgt: u8, }

fn main() {
let mut p = Pair { lft: 1, rgt: 2 };
let mut f = move |&mut:| { p.lft = 3; p.rgt };
p.rgt = 4;
println!("f: {:?}", f());
p.lft = 5;
// println!("p: {:?}", p);
}

This compiles without an error; running it prints f: 2u8.

If you uncomment the last line, you get an error saying "error: use of moved value: p". Likewise if you just attempt to print individual fields.

While I do see the logic being used here ("we are not overwriting the value within the closure itself; we are writing into the uninitialized memory that resulted from moving p into the closure"), it seems potentially confusing.

Is there any reason that we allowing these writes, which cannot be subsequently read? It seems like a situation analogous to moving into a moved-away array (see rust-lang/rfcs#533 )
Issue 1:
http://oi40.tinypic.com/wirl29.jpg

It would be nice to have the above as a feature for documentation pages.

Issue 2:
Tried to search and didn't find a duplicate issue.

I've added tooltip as helpers and instructions on a form that is placed inside a navbar. Because of the div with "input-prepend" class the tooltip is cut off.

A jsfiddle showing the problem (Hover over the input)

A screenshot of the issue

Haven't tested anything more then Safari 6.0.2 yet.

The problem is because the tooltip is placed after the and the input-prepend div cuts it off.

It looks correct if I use the web inspector to move it down to outside that div.

Not sure how this could be fixed though. Placing all tooltips with an id as a first child to body instead might work. Tricky thing. Hopefully someone here will have a good idea. :)
Issue 1:
Challenge use-a-css-class-to-style-an-element has an issue.

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

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

<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">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 2:
Challenge use-a-css-class-to-style-an-element has an issue.

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0.

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

<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">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:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.8

Operating System version: centos6.9

Java version: 1.8

org.apache.dubbo.registry.nacos.NacosRegistry.getServiceNames0，line271

This method returns two serviceNames in order to be compatible with the old subscription serviceName. If the compatible service name cannot be found on the Nacos server, it will go to the Nacos server every other second (normally 10 seconds). Because the frequency is too high, the CPU of the Nacos server will remain high.

This is the detailed process of my feedback in the Nacos community

https://github.com/alibaba/nacos/issues/3806

Expected Result

Remove compatible code？

thank you !

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

As discussed in https://lists.apache.org/thread.html/e3112c832415850779af2fe04aa7325d8d776144f3939cc63f5eab08@%3Cdev.dubbo.apache.org%3E

In order to make sure all dependencies license is suitable for dubbo, we need a quick way (such as a convenient script) to check dependencies license.
Issue 1:
Version

2.6.11

Reproduction link

https://codesandbox.io/s/focused-paper-3cqr1?file=/src/App.vue

Steps to reproduce

Write the Vue code as below.

<template>
<div id="app">
<template v-for="item in array">
<p :key="item" ref="test">{{ item }}</p>
</template>
<button type="button" @click="log">Log</button>
<button type="button" @click="reorder">Reorder</button>
</div>
</template>

<script>
export default {
name: "App",
data() {
return { array: [1, 2, 3] };
},
methods: {
log() {
console.log(this.$refs.test.map((el) => el.getBoundingClientRect().top));
},
reorder() {
this.array = [2, 1, 3];
},
},
};
</script>

Call the reorder() method.

Call the log() method after re-rendering.

What is expected?

An array is logged whose elements are in the order in which the corresponding elements appear in the document.

What is actually happening?

The logged array keeps the original order.

Issue 2:
What problem does this feature solve?

in vue.js 2.0 ,we can return more then one VNode in render fucntion,but it's not support in template,even if we use "functional" in :

for examples:

<script>
export default {
functional: true,
render(createElement, context) {
const arr = context.scopedSlots.default()
const suffix = createElement('span', 123)
arr.push(suffix)
return arr
}
}
</script>

this is OK!

<template functional>
<slot></slot>
<span>123</span>
</template>
<script>
export default {

}
</script>

but this is not OK!

should be consistent with render function if "functional" is an attr in

What does the proposed API look like?

<template functional>
<slot></slot>
<span>123</span>
</template>