WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Spec 3.4 says:

Union types are reduced to the smallest possible set of constituent types using these rules

But in compiler they are not reduced in case of inferring type parameters in function invocations. For example:

var o = {};

// According to spec, type of p should be reduced to {}
function f<T>(p: T | typeof o): T
{
var t: T;
var temp = t || o; // here union type is reduced, and it is really {}
return null;
}

// Another function where type of p is really {}. According to spec, it should be equal to f, shouldn't it?
function f2<T>(p: typeof o): T
{
return null;
}

// But really they are different
var e = f(5); // number
var e2 = f2(5); // {}

Could you please clarify, when union type are really reduced and when they are not.

Issue 2:
TypeScript Version: 1.8.10

So when I use the --declaration cli flag on tsc, or its corollary in tsconfig.json, I found that the definitions it produces have the public keyword stripped out. I couldn't find anything about why this might be on google, but did see that when there is no modifier present, public is assumed. Looking around at some popular type definitions, they also seem to lack the keyword. So, obviously its not needed. But, if I write it in my source, why not carry that over to the definition? It doesn't seem to affect the inference engines of the editors I quickly tested. So even if this is negligible, why not let it through? I like my code to be statically brutally-typed. I think it makes my intentions clearer as to what I would intend be exposed as an API to consuming developers. I see some potential for how this could be used by an IDE to rank symbols during autocomplete, and even more importantly, for auto generating documentation.

Is there some reason behind this? pragmatically/legacy/or otherwise? It seems like it would be a trivial fix. Interested to hear everyone's thoughts!

Code

file: Foo.ts

class Foo {
public memberPublic: string;
public methodPublic(): number {
// ...
}
private memberPrivate: string;
private methodPrivate(): number {
// ...
}
protected memberProtected: string;
protected methodProtected(): number {
// ...
}
}
export default Foo;

file: tsconfig.json

{
"compilerOptions": { /* same result when I use */
"target": "es2015", /* es5 */
"module": "es2015", /* commonjs */
"moduleResolution": "node",
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"noLib": false,
"outDir": "lib",
"allowSyntheticDefaultImports": true,
"removeComments": false,
},
"exclude": [
"typings/browser.d.ts",
"typings/browser",
"node_modules",
"lib"
]
}

Expected behavior:

file: Foo.d.ts

declare class Foo {
public memberPublic: string;
public methodPublic(): number;

private memberPrivate: string;
private methodPrivate(): number;

protected memberProtected: string;
protected methodProtected(): number;
}
export default Foo;

Actual behavior:

file: Foo.d.ts

declare class Foo {
memberPublic: string;
methodPublic(): number;

private memberPrivate: string;
private methodPrivate(): number;

protected memberProtected: string;
protected methodProtected(): number;
}
export default Foo;
Issue 1:
I get this:

Uncaught TypeError: undefined is not a function /Applications/Atom.app/Contents/Resources/app/node_modules/styleguide/lib/space-pen-extensions.js:74

Issue 2:
I tried upgrading it but it didn't need an upgrade. The problem is there in safe mode also. Going back to 122 fixed it.

styleguide/lib/space-pen-extensions.coffee:74

I'm on windows 8.0 and atom 0.123.0
Issue 1:
Issue Type:

Bug Report

Documentation Report

Ansible Version:

ansible 1.6.3

Environment:

Fedora 16-19

Summary:

Bug Report:

There's no " Edit on GitHub" link on any of the module pages on docs.ansible.com, nor can I find that erroneous phrase in github.com/ansible on the release and devel branches I've searched.

Documentation Report:

The copy module docs erroneously state that state=file means "the file will NOT be created...see the copy module..."

Steps To Reproduce:

https://github.com/ansible/ansible/tree/devel/docsite/rst/modules is empty

"Search this repo" on github/ansible for "file will NOT be created" comes up empty

Expected Results:

.rst files for each of the modules in docsite/rst/modules?

DOCUMENTATION = ''' within libraries/files/copy.py containing the phrase "NOT be created"

Actual Results:

Can't find orPR the docs for any core module.

Issue 2:
ISSUE TYPE

Documentation Report

COMPONENT NAME

Github Issues Template

ANSIBLE VERSION

N/A

CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

Issues template says to create issues in modules repositories, but issues get closed there due to repo merge.

STEPS TO REPRODUCE

Post issue in ansible/ansible-modules-extra and wait for @ansibot to close it

ansible/ansible-modules-extras#3677

EXPECTED RESULTS

That my issue should have been asked there. Based on this issue's template:

Please do not report issues/requests related to Ansible modules here !!

Report them to the appropriate modules-core or modules-extras project:
- https://github.com/ansible/ansible-modules-core/issues
- https://github.com/ansible/ansible-modules-extras/issues

Also verify first that your issue/request is not already reported in GitHub

ACTUAL RESULTS

The issue was closed

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide.
Issue 1:
When I hold down the Windows key, it's nice that it lists almost all the keys that you can use with it.

Why is "." missing (use emoij)

Is it because it's not in all versions of Windows 10 yet?

[Copy paste from similar question asked by user about Win key +V by user ByteHead]

Issue 2:
#6634

📝 Provide a description of the new feature

What is the expected behavior of the proposed feature? What is the scenario this would be used?

Depending on what I have to open, I'd love Fancy Zones to allow me the flexibility to toggle between my two different zone layouts. I tried overlapping zones to make it somewhat flexible - but it' would be far more convenient if it could let us have a couple of preset zone layouts defined. #6634

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Issue 1:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

#
# @router.get("/api/test")
# def ....

# #then write bootom
# @router.get("/api/test", response_model=test_model)
# def ....
# return {} # <- there just static correct placeholder which equal response model

Description

in this case execute first def, but in swagger will be second params list and response model

how prevent same router?

maybe need detect this cases?

Operating System

Windows

Operating System Details

No response

FastAPI Version

0.63.0

Python Version

3.9

Additional Context

No response

Issue 2:
First check

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

Description

The logouts print by fastapi are not saved to a log file.

how can i print the logouts to a file?

how can i config the log format using fastapi?
Issue 1:
When following the tutorial first test was failing because it does not find init_db()

Searching I found this question that fixed it, so the rest should be modified

from

import flaskr

to

from flaskr import flaskr

I can not push a branch with the change (I suppose I have no permission)

Issue 2:
commit rev: 470112d

python: 3.6.2

in the docs directory, just execute make latexpdf, there are issues with \maketitle and an unicode char.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
! Undefined control sequence.
\maketitle ...tnoterule \relax \ifsphinxpdfoutput
\begingroup \def \\{, } \p...
l.66 \maketitle

?

! Package inputenc Error: Unicode char 🎉 (U+1F389)
(inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...

l.20767 Celebrate 🎉

?

Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to 'Flask.log' for details
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
make[1]: *** [Makefile:33: Flask.pdf] Error 12
make[1] : on quitte le répertoire « /home/stephane/src/github.com/pallets/flask/docs/_build/latex »
make: *** [Makefile:101: latexpdf] Error 2
Issue 1:
Elasticsearch version:

# elasticsearch --version
Version: 2.2.0, Build: 8ff36d1/2016-01-27T13:32:39Z, JVM: 1.8.0_72-internal

JVM version:

# java -version
openjdk version "1.8.0_72-internal"
OpenJDK Runtime Environment (build 1.8.0_72-internal-b15)
OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)

OS version: Debian Jessie on kernel 4.1.3.

Description of the problem including expected versus actual behavior:

Elasticsearch reports fielddata memory for doc_values only index:

index fm fcm sm
raytracer-2016.03.31 6.5gb 2.5gb 4.6gb

Index mapping declares everything to be doc_values (and it should be default in 2.2 anyway):

{
"template": "raytracer-*",
"settings": {
"number_of_shards": 50,
"number_of_replicas": 1,
"index.refresh_interval": "30s",
"index.query.default_field": "id"
},
"mappings": {
"_default_": {
"_all": {
"enabled": false
},
"dynamic_templates": [
{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed",
"ignore_above": 256,
"doc_values": true
}
}
},
{
"long_fields": {
"match": "*",
"match_mapping_type": "long",
"mapping": {
"type": "long",
"doc_values": true
}
}
},
{
"double_fields": {
"match": "*",
"match_mapping_type": "double",
"mapping": {
"type": "double",
"doc_values": true
}
}
},
{
"date_fields": {
"match": "*",
"match_mapping_type": "date",
"mapping": {
"type": "date",
"doc_values": true
}
}
}
]
}
}
}

Issue 2:
Relates to #23101

In that issue, we documented eager_global_ordinals and we loosely document the purpose global ordinals. However, do not document when global ordinals actually gets used, which makes it more predictable for people to understand why their memory usage may go up for doc value fields.

Examples that may surprise users are implied by the existing documentation, but calling them out would be helpful.

Using any keyword fields with doc_values enabled (default) and text fields with fielddata enabled (not default).

Sorting

Aggregating

Scripting

Having the caveats of global ordinals documented should lead to a little better understanding, and it may hopefully help us to reduce their usage overall.
Issue 1:
In Python 3, round(_float_) returns an integer, but round(_np.float64_) returns a float:

>>> np.float64(1).__round__()
1.0
>>> 1.0.__round__()
1

The result is that if a np.float64 seeps into my data, the stock round produces unexpected results: round(x) can be an integer or a float depending on whether x is a regular float or a np.float64.

>>> [type(round(t(1))).__name__ for t in [float, np.float16, np.float32, np.float64, np.float128]]
['int', 'float16', 'float32', 'float64', 'float128']

The distinction does matter, e.g., np.partition raises TypeError: Partition index must be integer.

PS. Python 3.7.0, numpy 1.14.5

Issue 2:
Unlike Python2, Python3's (builtin) round function is documented to return an integer when called with a single argument. However, numpy float dtypes do not satisfy this, returning a float instead.
Issue 1:
The insecureHTTPParser property that was added in #2930 never got added to the TypeScript typings.

@fabiel-leon @jasonsaayman Please be aware of this for future PRs 😃.

Issue 2:
Describe the issue

Currently the AxiosResponse interface may have two parameters: T and D which by default are set as any.

export interface AxiosResponse<T = any, D = any> {
data: T;
status: number;
statusText: string;
headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
config: InternalAxiosRequestConfig<D>;
request?: any;
}

As we are able to see from just this snippet. The data will receive the T type, and config will receive the InternalAxiosRequestConfig<D> type, following this InternalAxiosRequestConfig interface:

export interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
...
}

We head then to AxiosRequestConfig that receives the D type:

export interface AxiosRequestConfig<D = any> {
url?: string;
method?: Method | string;
baseURL?: string;
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
params?: any;
paramsSerializer?: ParamsSerializerOptions;
data?: D;
timeout?: Milliseconds;
timeoutErrorMessage?: string;
withCredentials?: boolean;
adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
responseEncoding?: responseEncoding | string;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
maxContentLength?: number;
validateStatus?: ((status: number) => boolean) | null;
maxBodyLength?: number;
maxRedirects?: number;
maxRate?: number | [MaxUploadRate, MaxDownloadRate];
beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>}) => void;
socketPath?: string | null;
httpAgent?: any;
httpsAgent?: any;
proxy?: AxiosProxyConfig | false;
cancelToken?: CancelToken;
decompress?: boolean;
transitional?: TransitionalOptions;
signal?: GenericAbortSignal;
insecureHTTPParser?: boolean;
env?: {
FormData?: new (...args: any[]) => object;
};
formSerializer?: FormSerializerOptions;
}

That we can see it is set as the data property type...

Is this intended? What should be the differences from T and D in this scope?

Example Code

No response

Expected behavior

Currently I need to type my requests as axios.get<IExample, IExample>(...) to not have the default any typing...

If there was only one template type it would be a bit cleaner as axios.get<IExample>(...)

Axios Version

^1.3.0

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

"@chakra-ui/react": "^2.4.9",
"axios": "^1.3.0",
"formik": "^2.2.9",
"js-cookie": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-query": "^3.39.3",
"react-router-dom": "^6.7.0",
"yup": "^0.32.11"

Additional context/Screenshots

No response
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.1

Operating System version: windows10

Java version: java8

Steps to reproduce this issue

I run the code by follow steps:

docker run -p 8400:8400 -p 8500:8500 -p 8600:8600 -d consul

run provider

run consumer

Actual Result

provider runs ok

consumer fail with no provider available

So I trace the register and subscribe process:

provider register result show below

and we can see it use url.getServiceInterface() as service name (this example is dubbo.DubboService)

dubbo/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java

Lines 255 to 265
in
6f3a05c

private NewService buildService(URL url) {

NewService service = new NewService();

service.setAddress(url.getHost());

service.setPort(url.getPort());

service.setId(buildId(url));

service.setName(url.getServiceInterface());

service.setCheck(buildCheck(url));

service.setTags(buildTags(url));

service.setMeta(Collections.singletonMap(URL_META_KEY, url.toFullString()));

return service;

}

however if we add group and version info, consumer will use url.getServiceKey() to find service (this example is dubbo-x/dubbo.DubboService:0.0.1), which doesn't equal the service name

dubbo/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java

Lines 141 to 144
in
6f3a05c

String service = url.getServiceKey();

Response<List<HealthService>> response = getHealthServices(service, -1, buildWatchTimeout(url));

index = response.getConsulIndex();

urls = convert(response.getValue());

So consumer will not find the service if we add group and version info. Is my configuration wrong?

Issue 2:
Replace existing hard coded values for dubbo-config below classes

dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java

dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java

dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java

dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java

dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java

dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConsumerConfig.java

Along with hard coded value replacement have done small refactoring to use java stream and lambda.

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: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

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:
Finding a Remainder in JavaScript

https://www.freecodecamp.com/challenges/finding-a-remainder-in-javascript

Issue Description

As the directions clearly state, the correct answer to the exercise will be: [the chosen variable] set equal to 11 % 3.

The problem is that the exercise only accepts var remainder = 11 % 3 as the correct answer, when the variable remainder is already declared in the line above and does not need to be declared again.

Browser Information

Error encountered in Chrome 51.0.2704.79 on Mac 10.11.5.

Code Entered When Issue Encountered

var remainder;
remainder = 11 % 3;

Screenshot

Issue 2:
Finding a Remainder in JavaScript

https://www.freecodecamp.com/challenges/finding-a-remainder-in-javascript

Issue Description

As the directions clearly state, the correct answer to the exercise will be: [the chosen variable] set equal to 11 % 3.

The problem is that the exercise only accepts var remainder = 11 % 3 as the correct answer, when the variable remainder is already declared in the line above and does not need to be declared again.

Browser Information

Error encountered in Chrome 51.0.2704.79 on Mac 10.11.5.

Code Entered When Issue Encountered

var remainder;
remainder = 11 % 3;

Screenshot
Issue 1:
Stéphane Landelle opened SPR-8766 and commented

Bean property 'statusCodes' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

indeed :

public void setStatusCodes(Properties statusCodes)

Map<String, Integer> getStatusCodes()

Probably a regression due to #13098. Works with 3.1.0.M2. Maybe works on jdk7 as Introspector was modified.

Why not make statusCodes a Map instead of Properties?

Affects: 3.1 RC1

Issue Links:

#13402 SimpleMappingExceptionResolver: setStatusCodes getter return not same as setter. Makes override impossible ("duplicates")

Issue 2:
marc schipperheyn opened SPR-8759 and commented

The getter return type (Map) is not the same as setter (Properties). Since Spring 3.1, this is a problem. I get

org.springframework.beans.NotWritablePropertyException: Invalid property 'statusCodes' of bean class [nl.project.interceptor.MySimpleExceptionResolver]: Bean property 'statusCodes' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1057)

at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:920)

This makes it impossible to configure properties for 'statusCodes' in dispatcher-servlet.xml

Affects: 3.1 RC1

Issue Links:

#13409 Impossible to set SimpleMappingExceptionResolver.statusCodes ("is duplicated by")

Referenced from: commits 5d42a62

1 votes, 1 watchers
Issue 1:
Multiplying a np.float64, np.float32 or np.float16 by a string gives an empty string, but doing the same with a np.float or a np.float128 raises an error:

Python 3.4.4 |Anaconda 2.3.0 (x86_64)| (default, Jan 9 2016, 17:30:09)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.float64(0.5) * 'hello'
''
>>> np.float16(0.5) * 'hello'
''
>>> np.float32(0.5) * 'hello'
''
>>> np.float128(0.5) * 'hello'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'numpy.float128'
>>> np.float(0.5) * 'hello'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'float'

I would expect these to all give the same result - and, personally, I would expect that result to be raising an exception.

(For context: I was bitten by this when I had a nasty bug in some of my own code. The bug was - of course - entirely my own fault, but a np.float64 not raising an exception when multiplied by a string made the bug quite hard to track down)

Issue 2:
This illustrates the issue:

>>> import numpy as np
>>> print 'x'*np.float64(3.5)

The same construction using a regular python float raises a TypeError, as I would expect:

>>> 'x'*3.5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'float'

I haven't looked very closely at the implementation of the numpy float class. Please feel free to close this issue if this is working as expected.

This is on numpy 1.9.2 and python 2.7.9
Issue 1:
Specifically, I would like to hide an element on extra small (xs) and small (sm) resolutions. I cannot combine .hidden-xs and .hidden-sm as each class applies visibility to all other resolutions and uses !important.

Is this intentional behavior? I think it would be a common use case to want to hide or show elements greater than or less than a given screen size vs. having to choose one.

Issue 2:
In 3.0.0-rc1 having an element with the hidden-sm hidden-md classes will only hide it for medium devices and not for small ones as well.