WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When merging your files into one file, the --module amd flag makes no difference.

There needs to be a way that if all the files listed define the same root namespace, then it should compile into an amd module. Am I missing something here?

I did not write "export = " in any of these files. Not much documentation about how to fix this.

Issue 2:
I'm in the process of updating a language service client and re-provider (provides access to language services from the commandline, for editor plugins) from codeplex to github versions of typescript, and once again I'm struggling with the sparse documentation.

The variety of interfaces is confusing. One the one hand, there are the compiler vs language service differences, eg, CompilerHost vs ServiceHost, Program vs DocumentRegistry, on the other hand, there seem to be way too many ways of storing sets of file (with associated information).

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API helps a little bit, but inline docs and a concept map would be helpful, explaining why each of those is necessary and how they relate to each other.

It would be great to have a place to discuss language services API design and usage.

My first concrete question is about import/reference resolution: how do I integrate that with a language service client, without duplicating code?

There used to be a Resolver in the compiler sources that could be used to do nothing but close a set of filenames under import, reference, and filename normalization. That was easy to use.

Now, that functionality seems to be hidden in createProgram. createLanguageService internally uses createProgram, without exposing the Program, but it seems to have no less than four sources of truth about files in the project: the documentRegistry, which seems to be an externally visible copy of the internal sourceFilesByName, in addition to which there are host and hostCache (and program, which is read-only-connected to sourceFilesByName via its compilerHost).

That leaves me with two problems:

after createProgram, program.getSourceFiles might have more files than sourceFilesByName (added through import/reference resolution) and I don't see how this information is propagated?

if I get this right, synchronizeHostData should nearly always do unnecessary work, and will not bring program.getSourceFiles in sync with sourceFilesByName; the language service API functions then use program.getSourceFiles, which is a superset of sourceFilesByName, which should be correct if possibly inefficient (since each of them calls synchronizeHostData)

once I have a language service, how do I modify its set of files, taking import/reference resolution into account, without recreating the whole thing from scratch?
Issue 1:
Best shown with a simple reproducer [link].

Issue 2:
See #5509. Things like this work:

import jax

jax.vmap(lambda x: lax.psum(1, 'i'), axis_name='i')(jnp.arange(3))
jax.jit(jax.vmap(lambda x: lax.psum(1, 'i'), axis_name='i')(jnp.arange(3))

But not this:

jax.vmap(lambda x: lax.pmin(1, 'i'), axis_name='i')(jnp.arange(3))
jax.jit(jax.vmap(lambda x: lax.pmin(1, 'i'), axis_name='i')(jnp.arange(3))

The first line doesn't work because pmin doesn't have an impl rule, and even if it did the second line wouldn't work because the vmap trace would miss it and then the axis would be unbound when we do the jit lowering.

We solve the second issue for psum with a special bind rule. We should do that more generally for collectives.
Issue 1:
Would it be possible for an app when placed in full screen to be "forced/restricted" to enter full screen but only within the allocated zone?

For example a YouTube video playing in full screen mode but instead of occupying the full screen, it is full screen within its zone.

Issue 2:
Summary of the new feature/enhancement

Maybe it is already there and I didn't find it but it would be very helpful to have a shortcut to bring all zones (with the zoned application windows) to front at once. If you are using a lot of applications, full screen ones, zoned ones and so on at the same time, it would be neat to bring the zoned to front by pressing a shortcut. Optionally minimize all other windows automatically in before.

I think that might be possible because the window to zone assignment is already be stored somewhere to make the Move newly created windows to their last known zone feature possible.

Proposed technical implementation details (optional)

Pressing win+z: brings the zoned windows to front.

Optionally: Automatically minimize (win+m) all other windows and then show all zoned windows

If there are multiple windows in one zone, take the last one to be shown

Thanks! ❤️
Issue 1:
The Go 1.5. vendoring feature means that a package importer is now logically a function of two variables: the import path, and additionally the directory in which the import declaration appears.

The go/types TestStdlib test currently fails because the default importer does not support vendoring (and cannot without an API change).

Issue 2:
Investigate.

$ go test -run Stdlib
--- FAIL: TestStdlib (5.75s)
stdlib_test.go:196: /Users/gri/go/src/net/http/h2_bundle.go:3304:2: invalid operation: sc.hpackDecoder (variable of type *golang.org/x/net/http2/hpack.Decoder) has no field or method SetEmitFunc
stdlib_test.go:196: /Users/gri/go/src/net/http/h2_bundle.go:3377:2: invalid operation: sc.hpackDecoder (variable of type *golang.org/x/net/http2/hpack.Decoder) has no field or method SetEmitFunc
stdlib_test.go:196: /Users/gri/go/src/net/http/h2_bundle.go:4908:3: invalid operation: rl.hdec (variable of type *golang.org/x/net/http2/hpack.Decoder) has no field or method SetEmitFunc
stdlib_test.go:196: /Users/gri/go/src/net/http/h2_bundle.go:4910:3: invalid operation: rl.hdec (variable of type *golang.org/x/net/http2/hpack.Decoder) has no field or method SetEmitFunc
FAIL
exit status 1

May be as simple as providing build.AllowVendor when calling build.Import in go/internal/gcimporter/gcimporter.go.
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.

PROBLEM

Most of the setXxxx and addParameter* in URL such as org.apache.dubbo.common.URL#addParameter and setXxxx will return a new URL object for chaining calls, and most of the "middle objects" are useless and unnecessary, example below:

class org.apache.dubbo.config.spring.SimpleRegistryExporter

public static Exporter<RegistryService> export(int port, RegistryService registryService) {
return protocol.export(proxyFactory.getInvoker(registryService, RegistryService.class,
// HERE
new URL("dubbo", NetUtils.getLocalHost(), port, RegistryService.class.getName())
.setPath(RegistryService.class.getName()) // useless
.addParameter(Constants.INTERFACE_KEY, RegistryService.class.getName()) // useless
.addParameter(Constants.CLUSTER_STICKY_KEY, "true") // useless
.addParameter(Constants.CALLBACK_INSTANCES_LIMIT_KEY, "1000") // useless
.addParameter("ondisconnect", "disconnect") // useless
.addParameter("subscribe.1.callback", "true") // useless
.addParameter("unsubscribe.1.callback", "false")));
}

class org.apache.dubbo.config.ServiceConfig

@SuppressWarnings({"unchecked", "rawtypes"})
private void exportLocal(URL url) {
if (!Constants.LOCAL_PROTOCOL.equalsIgnoreCase(url.getProtocol())) {
// HERE
URL local = URL.valueOf(url.toFullString())
.setProtocol(Constants.LOCAL_PROTOCOL) // useless
.setHost(LOCALHOST_VALUE) // useless
.setPort(0);
Exporter<?> exporter = protocol.export(
proxyFactory.getInvoker(ref, (Class) interfaceClass, local));
exporters.add(exporter);
logger.info("Export dubbo service " + interfaceClass.getName() + " to local registry");
}
}

SOLUTION

And I suggest refactoring the URL with Builder Pattern. And the possible usage may be:

URL url = ...;
URL newURL = new URLBuilder(url)
.addParameter(k, v)
.addParameter(k2, v2)
.setPath(yourPath)
.build();

Though we cannot remove the original addXXX and setXxxx methods due to compability, we can mark them as deprecated and guide users to use the new URLBuilder.

I'd like to try refactoring this if it's good to the comunity :)

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.

Environment

Dubbo version: 2.7.1

Operating System version: liunx7

Java version: 1.8

zookeeper version: 3.4.13

Steps to reproduce this issue

when I make two service providers : hello.server

then http request the method

then two service providers all receiverd method transfer

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
np.random.choice requires the upper limit a > 0:

>>> np.random.choice(0, size=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 1120, in mtrand.RandomState.choice
ValueError: a must be greater than 0

This is necessary if size > 0, but if size == 0 we could permit this special case. Allowing the valid special case would simplify certain code, and in particular would make np.random.choice(limit, size=min(n, limit) always work. The same goes for np.random.randint:

>>> np.random.randint(0, size=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 993, in mtrand.RandomState.randint
ValueError: low >= high

Issue 2:
This piece of code:

np.random.choice([],size=0)

Generates this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 1397, in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:15499)
ValueError: a must be non-empty

This error makes sense when size>0, but when size=0, random.choice could simply return []. This would be useful when the a and size parameters are variable. Right now this situation requires an additional check:

if size > 0:
result = np.random.choice(a,size)
else:
result = np.array([])

Would it be a good idea to simply return an empty array when size=0? This is my first issue so I hope this is the right way to address this.

I created a simple patch that implements this: 57ab0728d4cf73c1f4b3af2450fe603bf8670b75

I'm using Python 3.5.2 with numpy 1.11.2.

Edit: My implementation returns an empty slice from the original array. My thinking was that this would assign the correct base to the resulting array, but on second thought this is not what happens with random.choice normally, so I think returning np.array([]) would be better.
Issue 1:
Version

2.6.6

Reproduction link

https://codepen.io/karmiy/pen/pMWVOX

Steps to reproduce

例如：

父组件app，它有data如text，在template的随便一个地方<input type='text' v-model='text'>{{text}}

子组件test是:

Vue.component('logger', {

created() {

console.log('created');

},

render(createElement) {

console.log(9);

return createElement('h1', '1');

}

});

这时我们在app这个组件里，使用这个组件，在项目中会在控制台看到打印了9，没什么问题。

当尝试去改变input的值来驱动text这个data改变时，控制台也没有任何输出，没有重新去渲染render，很好。

但是接下来一个改变问题就来了：

将改成333

再尝试去改变input的值来驱动text这个data，奇怪的事情发生了，控制台随着text改变，也一直输出9，意味着不断在重新渲染！！(可是text改变和它毫不相关，即不是它的插槽内容，也不是它的props)

没有传任何props，slot位置也只是个普通字符串333，没有改变，却因为毫不相关的text导致一直重新渲染

这在高频率text变化时，造成了很严重的性能问题。

这是在我用Vue开发Markdown编辑器，文本不断变化时发现的问题，组件里与文本无关的如普通按钮这种中间有slot内容的不断在重复渲染，在编辑器快速触发改变文本时任何带有slot内容的组件都在不断重新渲染导致页面性能问题非常严重

一直找不到合适的解决方案，因为在用antd的组件库，改组件是用jsx形式去写vue组件库的，学习了代码后发现有的组件render部分有的逻辑比较复杂，这样高频率的触发render对性能影响太大。。。。求指教，非常感谢！

What is expected?

如何使333不随毫不相关的data去重复render

What is actually happening?

毫不相关的data改变，使得拥有slot插槽内容的组件不断重复渲染

Issue 2:
What problem does this feature solve?

The original v-slot implementation was not available in this.$slots, but that was added in 2.6.4. Scoped slots reduce unnecessary re-renders with nested slots, so this change would hopefully provide a performance improvement for component libraries.

What does the proposed API look like?

<foo>default slot</foo>

should output

_c('foo',{scopedSlots:_u([{key:"default",fn:function(){return [_v("default slot")]},proxy:true}])})

Equivalent to <foo v-slot>default slot</foo>

Note #9580 could be a problem if lots of people rely on that behaviour.
Issue 1:
I have encountered a situation similar to #927.

I am creating a new request with an explicit Authorization header, e.g.

posted = post('…', headers={'Authorization': '…'}, data=…)

Requests is finding and using an entry from a .netrc file I didn’t know existed; it appears to have been generated by the Heroku toolbelt. This overrides the Authorization header supplied in the headers dictionary.

Can the default behavior instead allow environmental factors to be overridden?

Also, can requests make this behavior in some way easier to discover? I am unable to find a way to retrieve the request headers actually sent; they would have provided a valuable clue about the mystery username & password.

Issue 2:
Hi,

And thanks for maintaining requests. When I set an Authorization header in a request, I do not expect it to be overwritten. I set up default credentials in my .netrc file (for automatizing the cadaver command line tool), and suddenly I could not authenticate to my service any longer.

Please check if an Authorization header does already exist in your default authorization handler, instead of overwriting it. I see that you documented this behaviour in the authentication section, but since I never used this form of authentication it took quite some time to find the problem. Also, overwriting a header that the user set does not seem to be a sensible implementation.

Thanks,

Joe
Issue 1:
Notifications appears, but at sometime, the function dont work again,

For example: those notifications appears just for the first minute. Later dont work

Issue 2:
Electron version: after 1.1.2

Operating system: Windows

It works well up to version 1.1.1.

Since version 1.1.2 displayBalloon does not work well. Especially when multiple asynchronous operations are made at the same time displayBalloon often ignored.

setInterval(function(){
tray.displayBalloon({
title:'hello',
content:'world'
});
},3000);
Issue 1:
Atom seem to copy this very annoying behaviour from recent builds of Sublime Text 3 where it was in fact fixed in the latest build.

I propose Cmd+Shift+W to close all tabs but not the window. It is really annoying to close all tabs one by one before starting a new feature.

And even then Cmd+Shift+W in fact just closes window so when you reopen the project – all tabs stay and you have to close them one by one anyway.

Suggestion:

Cmd+W - Close tab

Cmd+Shift+W - Close all tabs but not the window

Cmd+W - Close window if there are no tabs left

Issue 2:
thomaslindstrom/color-picker#38

Here's a video of the issue:

http://cl.ly/3n3j0T0q0Y3T
Issue 1:
I'm not sure if this is a numpy issue or not, but the segfault occurs on a line of code

M = 20 * numpy.log10(M)

M is a numpy ndarray with shape (927, 166) of dtype 'float64'. The reason I'm not convinced that this is numpy's fault is that the following code works just fine:

import numpy as np
M = np.random.rand(927, 116)
M = 20 * np.log10(M)

Furthermore, I exported M to a text file, fired up a new python kernel, loaded the text file, and did the same math operation on it without issue.

Looking at past discussions involving segfaults, I fired up gdb and got the following output

Starting program: /home/ogi/miniconda3/envs/timeview/bin/python example_api_usage.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff438d700 (LWP 490)]
[New Thread 0x7ffff3b8c700 (LWP 491)]
[New Thread 0x7fffef38b700 (LWP 492)]
[New Thread 0x7fffcd832700 (LWP 493)]
[New Thread 0x7fffccdea700 (LWP 494)]

... (my own logging for my application)

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff7de48e8 in _dl_relocate_object () from /lib64/ld-linux-x86-64.so.2

In case it helps, I'm using the conda distribution of Python (3.6.2) and Numpy 1.13.1.

Issue 2:
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 5d664e3..3c8b101 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -2606,7 +2606,7 @@ def true_intent_list(var):
ret = []
for intent in lst:
try:
- exec('c = isintent_%s(var)' % intent)
+ exec('c = isintent_%s(var)' % intent, locals())
except NameError:
c = 0
if c:
Issue 1:
Steps to reproduce

For the example code:

import { serve } from "https://deno.land/std@0.50.0/http/server.ts";

const server = serve({ port: 8000 });

console.log("Started");

for await (const req of server) {
const peerHost: string = req.conn.remoteAddr.hostname;

console.log(`Host ${peerHost} connected`);

req.respond({});
}

I get:

error: TS2339 [ERROR]: Property 'hostname' does not exist on type 'Addr'.
Property 'hostname' does not exist on type 'UnixAddr'.
const peerHost: string = req.conn.remoteAddr.hostname;

When I replace req.conn.remoteAddr.hostname with (req.conn.remoteAddr as Deno.NetAddr).hostname everything works as expected:

Started
Host 127.0.0.1 connected

The full remoteAddr looks similar to { hostname: "127.0.0.1", port: 64859, transport: "tcp" }

Version

$ deno --version
deno 1.0.0
v8 8.4.300
typescript 3.9.2

Issue 2:
Ctrl+Z stopped Deno run

but I don't know why, after another deno run the port of the server (was 8080) were still in use.

so I tried to use a random free port with the 0.

after a console.warn(server), I got:

Server {
listener: ListenerImpl { rid: 5, addr: { hostname: "127.0.0.1", port: 34263, transport: "tcp" } },
closing: false,
connections: []
}

but when I tried to access to the port with server.listener.addr.port, I had this message:

error TS2339: Property 'port' does not exist on type 'Addr'.
Property 'port' does not exist on type 'UnixAddr'.

it doesn't make sense. it seems like port is not defined on type Addr (obvious but confusing)
Issue 1:
If you know how to fix the issue, make a pull request instead.

I tried using the @types/mongoose-paginate-v2 package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @linusbrolin @simonxca @woutgg @oktapodia @chazepps @gamsterx

If you do not mention the authors the issue will be ignored.

> tsc

node_modules/@types/mongoose-paginate-v2/index.d.ts:70:9 - error TS2411: Property 'nextPage' of type 'number | null | undefined' is not assignable to string index type 'number | boolean | T[] | undefined'.

70 nextPage?: number | null;
~~~~~~~~

node_modules/@types/mongoose-paginate-v2/index.d.ts:71:9 - error TS2411: Property 'prevPage' of type 'number | null | undefined' is not assignable to string index type 'number | boolean | T[] | undefined'.

71 prevPage?: number | null;
~~~~~~~~

Issue 2:
@linusbrolin

@simonxca

@woutgg

@oktapodia

@chazepps

@gamsterx

Mongoose-pagination-v2 compilation fails.

In the definitions file you can see there is a problem of assigning a type to some string type. This will make it so that any project that uses those definitions fails to compile.

I'm using typescript 3.8.3
Issue 1:
Challenge Name

Issue Description

This has been happening to me since I began using the built in code camp code editor during the exercises.

When I try to click on a particular line of code, I am unable to click on half of that line. Also, when I try to highlight any code, it sometimes won't allow me to. And sometimes when I click on the area I wish to enter code, the cursor will end up two lines down. I have been able to work around this by hitting the browser resize button (on chrome) with every new exercise. However, it gets a bit tiresome.

I tried using the site in Firefox, with the same problem.

Browser Information

Browser Name, Version: Chrome Version 50.0.2661.102 (64-bit)

Operating System: Mac OS X 10.11.3 (15D21)

Mobile, Desktop, or Tablet: Desktop

Your Code

// If relevant, paste all of your challenge code in here

Screenshot

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
I'm calculating a per-class accuracy in my model. It currently outputs, a little bit like this.

acc: xxx, acc_1: xxx, acc_2: xxx

Is there a way to make this output names like this?

accuracy/class_0: xxx, accuracy/class_1: xxx, accuracy/class_2: xxx

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

Check that your version of TensorFlow is up-to-date. The installation instructions can be found here.

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

Issue 2:
I am trying to implement the model specified by eqn. 7,8,9 in this paper. The idea is to encode a sequence (say x) with an LSTM having return sequences=True (call it x-encoder), then let its final hidden output initialized another LSTM which encodes another sequence y. Also, use all the sequences returned by the x-encoder in a attention model.

I think I will need to share the output of the x-encoder into two nodes (one for initializing the y-decoder, and another for the attention model). Is this possible?
Issue 1:
I wasn't doing anything too fancy:

Ran a really quick profile

Clicked on the ranked tab

Please do not remove the text below this line

DevTools version: 4.2.1-3816ae7c3

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108
at Map.forEach (<anonymous>)
at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)
at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)
at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)
at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)
at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107381)
at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)
at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)
at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)

Component stack: in vl
in div
in div
in div
in wo
in Unknown
in n
in Unknown
in div
in div
in Li
in $e
in dn
in Ca
in Pc

Issue 2:
Describe what you were doing when the bug occurred:

Recording with the Profiler

Clicking on the "Ranked Chart"

Please do not remove the text below this line

DevTools version: 4.2.1-3816ae7c3

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)

at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)

at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)

at el (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:68139)

at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:108547)

at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)

at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)

Component stack: in vl

in div

in div

in div

in wo

in Unknown

in n

in Unknown

in div

in div

in Li

in $e

in dn

in Ca

in Pc