WhereIsAI/github-issue-similarity huggingface dataset:
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.6-snapshot

files:

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

Line 359
in
a9a69ea

if (methods != null && methods.length > 0) {

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

Line 631
in
a9a69ea

if (portToBind == null || portToBind <= 0) {

This check is useless, always is non-null.

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

Java version: jdk1.8

Steps to reproduce this issue

consumer set retries 5

connection over executes on provider

provider throw RpcException

Expected Result

consumer will retry 5 times

Actual Result

when provider throw RpcException，FailoverClusterInvoker receive a AppReponse with a RpcException in it，and FailoverClusterInvoker can not catch the RpcException and do not retry；
Issue 1:
Very confusing to understand what is required to answer this question. The console.log statements should be removed or clarified what to do. When I commented out the console.log statements it worked. Very confusing

Issue 2:
Challenge Bonfire: Stand in Line has an issue.

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

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

My code:

// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
arr.push(item);
return arr.shift(); // Change this line
}

The above version passes, since the three initially-supplied calls at the bottom to Console.log have been removed. Without the removal, submitting the code yields a stack overflow error.

In other Bonfires and Waypoints that I've done (a lot of them), there was no instance where the testing code (usually, just an illustrative function call) needed to be removed for a submittal to pass. Thus, this Bonfire does not conform to the normal pattern.

IMO, providing this testing code at the bottom for this Bonfire is overkill. By this time, if campers want to test in their own environment, they have figured out how to do so. Also, the calls to JSON.stringify are unnecessary - console.log can handle an array of integers without it.
Issue 1:
What you have now is basically the equivalent of

0.1.0
0.2.0
0.3.0
0.4.0
0.5.0
0.6.0
...
0.71.0

in semver, but you're not taking advantage of the Major and Patch numbers to convey extra information about changes to the library. Check out semver for a basic explanation: http://semver.org/

Issue 2:
How I can clone o duplicate sound from THREE.Audio with THREE.AudioListener beacuse i can´t. Console log show: Uncaught (in promise) DOMException: Cannot decode detached ArrayBuffer.

three.js:36975 r88.

Any sound has 3-4 seconds, so I can´t play multiple sound after elapsed time.

I am using multiple options , last :

for(var _idx=0; _idx<3;_idx++){
this.loadSound();
}

// ......

loadSound: function(){
audioLoader.load( 'audio/ballo_pop.ogg', function( buffer ) {
var audio_listener = new THREE.AudioListener();
w_wgl.camera.add( audio_listener );
var _sound = new THREE.Audio( audio_listener );

_sound.setBuffer( buffer );
_sound.setLoop( false );
_sound.setVolume( 1 );
_sounds_ogg.push(_sound);

});
},
Issue 1:
Checklist

I have checked the issues list

for similar or identical feature requests.

I have checked the pull requests list

for existing proposed implementations of this feature.

I have checked the commit log

to find out if the if the same feature was already implemented in the

master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

I was trying to change config of Redis backend connections (not Kombu broker_transport_options).

This is not a problem for socket_timeout and socket_connect_timeout (I've set CELERY_REDIS_SOCKET_TIMEOUT and CELERY_REDIS_SOCKET_CONNECT_TIMEOUT), but problem to change socket_keepalive and retry_on_timeout.

I think this can be helpful - sometimes I catching TimeoutError from Beat on 'SUBSCRIBE' event.

Suggestions

I propose add socket_keepalive and retry_on_timeout to connparams of RedisBackend:

celery/celery/backends/redis.py

Lines 185 to 194
in
240ef1f

self.connparams = {

'host': _get('redis_host') or 'localhost',

'port': _get('redis_port') or 6379,

'db': _get('redis_db') or 0,

'password': _get('redis_password'),

'max_connections': self.max_connections,

'socket_timeout': socket_timeout and float(socket_timeout),

'socket_connect_timeout':

socket_connect_timeout and float(socket_connect_timeout),

}

Issue 2:
It looks like it would require boto3 1.4.2. And it has new required arguments for the send_message call.

I created a new queue but my worker wouldn't connect. I'm wondering if you just don't support it yet.

https://aws.amazon.com/blogs/aws/new-for-amazon-simple-queue-service-fifo-queues-with-exactly-once-delivery-deduplication/
Issue 1:
Apache Airflow version

2.5.0

What happened

While creating SFTP sensor I have tried to find a file under directory. But I was getting error as Time Out, not found.

So after debugging code found that there is a issue with poke function.

As after getting matched file we are trying to find last modified time of the file using self.hook.get_mod_time which take full path (path + filename) and we are giving only filename as arguments.

What you think should happen instead

I have solved that issue by adding path with filename and then calling self.hook.get_mod_time function.

Here is modified code,

def poke(self, context: Context) -> bool:
self.hook = SFTPHook(self.sftp_conn_id)
self.log.info("Poking for %s, with pattern %s", self.path, self.file_pattern)

if self.file_pattern:
file_from_pattern = self.hook.get_file_by_pattern(self.path, self.file_pattern)
if file_from_pattern:
'''actual_file_to_check = file_from_pattern'''
actual_file_to_check = self.path + file_from_pattern
else:
return False
else:
actual_file_to_check = self.path

try:
mod_time = self.hook.get_mod_time(actual_file_to_check)
self.log.info("Found File %s last modified: %s", str(actual_file_to_check), str(mod_time))
except OSError as e:
if e.errno != SFTP_NO_SUCH_FILE:
raise e
return False
self.hook.close_conn()
if self.newer_than:
_mod_time = convert_to_utc(datetime.strptime(mod_time, "%Y%m%d%H%M%S"))
_newer_than = convert_to_utc(self.newer_than)
return _newer_than <= _mod_time
else:
return True

How to reproduce

You can get same issue by creating a DAG as mentioned

with DAG(
dag_id='sftp_sensor_dag',
max_active_runs=1,
default_args=default_args,
) as dag:
file_sensing_task = SFTPSensor(
task_id='sensor_for_file',
path= "Weekly/11/",
file_pattern = "*pdf*,
sftp_conn_id='sftp_hook_conn',
poke_interval=30
)

Operating System

Microsoft Windows [Version 10.0.19044.2251]

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Body

issue is described in PR #25705

the author of the PR abandon it so anyone can try to submit a fix to the issue.

Committer

I acknowledge that I am a maintainer/committer of the Apache Airflow project.
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: Latest

Operating System version: win10

Java version: 1.8

Steps to reproduce this issue

private static <T> Invoker<T> buildInvokerChain(final Invoker<T> invoker, String key, String group) {
Invoker<T> last = invoker;
List<Filter> filters = ExtensionLoader.getExtensionLoader(Filter.class).getActivateExtension(invoker.getUrl(), key, group);
if (!filters.isEmpty()) {
for (int i = filters.size() - 1; i >= 0; i--) {
final Filter filter = filters.get(i);
final Invoker<T> next = last;
last = new Invoker<T>() {

...........
@Override
public Result invoke(Invocation invocation) throws RpcException {
return filter.invoke(next, invocation);
}
...........
};
}
}
return last;
}

it will creates the same number of the anonymous Invoker class as filters size when refer() or export(...) every time, it's a linked structure

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

Expected Result

use one anonymous Invoker class to instead of it

use one for call to instead of linked call

Actual Result

NONE

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.5.3

Operating System version: macOS Mojave

Java version: 1.8.0_201

Steps to reproduce this issue

register a script route to an interface

the script will get the applicationName by the args of context

function route(invokers, invocation, context) {
print(invokers);
print(invocation);
print(context);
print(context.getUrl());
print(context.getUrls());
print(context.getUrl().getParameter("application"));
return invokers;
}
route(invokers, invocation, context);

the url may be null sometimes。This is consumerSide，I think it shouldn't be null always。

the scriptRoute is executed before ConsumerContextFilter and I can't find other place that the RpcContext was inited。

Based on the above code, it should be null always。

I feel very puzzled. I need some help。
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Electron apps come bundled with chromium for the browser engine. That's fine, but when you have multiple electron apps (i. e. vscode + discord + teams) you are installing duplicates of chromium.

Proposed Solution

when you first launch an electron app, it will check a directory (say, /Users/username/Application\ Support/electron/chromium) for chromium. if it is not found, it will download and install it. if it is found, it will use that.

Alternatives Considered

you could also compile the webapp from javascript to the machine code and eliminate the need for a browser engine entirely, but that would be very hard.

Additional Information

n/a

Issue 2:
Currently developers using atom-shell have to ship the whole atom-shell binaries when distributing their apps, but since now we have asar as atom-shell's app format, we may add runtime mode to atom-shell like Adobe Air or Chrome Hosted Apps that developers only need to distribute packaged app in asar format as long as end users have the runtime mode of atom-shell installed.

The runtime mode can just be another app based on atom-shell (let's call it atom-runtime for now), and has deep platform integrations:

On Windows, we can provide installer and auto updater for atom-runtime, and register the .asar file type to be opened with it.

On Linux, we provide official software sources of atom-runtime for some popular distributions, and also register atom-runtime as handler of .asar files.

On Mac, we need to provide a tool to help users package their apps into Mac bundles. We can reference how Steam created bundles for downloaded games, or how Parallel created bundles for applications in hosted OS.

We can even provide a tool or service to help generating installers for developers' apps which can automatically download atom-runtime if it is not installed on user's machine, just like many .NET applications.
Issue 1:
I have completed the challenge, but no matter what network I am on, it gives me a bad gateway error and I am not able to continue with the next challenge. Since I am new to coding, I don't know what to do

Challenge http://beta.freecodecamp.com/challenges/waypoint-use-a-css-class-to-style-an-element has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Issue 2:
Challenge http://beta.freecodecamp.com/challenges/waypoint-use-a-css-class-to-style-an-element won't move on to next Waypoint. After changing the code as indicated and clicking the "Go to my next challenge" button, it goes to a 502 Bad Gateway page instead of going to the next Waypoint.

The Waypoint (Waypoint 10) is checked off on the map though, so it does know that the challenge has been completed, but it doesn't link to the next challenge.
Issue 1:
Hey @tiangolo! I've been wondering why FastAPI doesn't use the function's return -> signature instead of the response_model argument? I think it would be a bit more natural to express the return schema like this:

@router.post("/")
def create_worker(
params: CreateWorker, auth_token: str = Depends(shared.get_authorization)
) -> CreateWorkerResponse:
# code
return CreateWorkerResponse(...)

Issue 2:
Is your feature request related to a problem? Please describe.

Primarily for the sake of the generated OpenAPI spec (but also for security/validation reasons), I currently specify a response_model for nearly all of my endpoints, but for the vast majority of my endpoints, the response_model is the same as the type that the endpoint returns.

This means that I am frequently duplicating the response_model in the return annotation.

In order to reduce duplication/room for copying/refactoring mistakes, it would be great if it were possible to (optionally) infer the response_model from the endpoint signature.

It should still be possible to override the value, and it should be ignored if a raw Response class is returned, I would just want the default to be the annotated return type of the endpoint. Note: this implementation would also make it much easier to catch anywhere the response_model differed from the returned value's type while scanning through code.

To be clear, I don't think this needs to be the default behavior, I just would like the option to enable it.

I am currently using the following subclass of APIRouter in my code to enable this:

from typing import TYPE_CHECKING, Any, Callable, get_type_hints

from fastapi import APIRouter

class InferringRouter(APIRouter):
if not TYPE_CHECKING:

def add_api_route(self, path: str, endpoint: Callable[..., Any], **kwargs: Any) -> None:
if kwargs.get("response_model") is None:
kwargs["response_model"] = get_type_hints(endpoint).get("return")
return super().add_api_route(path, endpoint, **kwargs)

else: # pragma: no cover
pass

I think it would be nice if this capability was upstreamed though, both to ensure it is maintained, but also so others can benefit.

Describe the solution you'd like

Rather than using the above implementation (which has some problems -- for example, it isn't possible to specify None as the response_model with an annotated return type), I think it would be better if there were a boolean-valued keyword argument to the APIRouter initializer that, if enabled, would cause the default behavior to be to have the annotated return type used as the response_model by default.
Issue 1:
Migrated issue, originally created by Anonymous

Attached is a patch that fixes insertion of small decimal numbers in MSSQL

Attachments: test_decimal_notation_mssql.diff | ms.diff | decimal_support_mssql_dialect.diff

Issue 2:
Migrated issue, originally created by Pavel Brych

After upgrading to 1.0.2 resp. 1.0.3 SQLAlchemy, this error popped up. It happens when label() is used with attribute of aliased entity.

#!/usr/bin/python
# -*- coding: utf-8 -*-
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import aliased

Base = declarative_base()

class User(Base):
__tablename__ = 'users'

id = Column(Integer, primary_key=True)
username = Column(String(255))
realname = Column(String(255))

e = create_engine("postgresql://user:passwd@localhost/db_name", echo=True)
Base.metadata.create_all(e)

session = Session(e)

user = aliased(User,name="user")

q = session.query(user.username.label("username"))

print(q.column_descriptions)

Traceback (most recent call last):
File "/home/pavel/python/hores/src/sqlalchemytest.py", line 27, in <module>
print(q.column_descriptions)
File "/usr/lib64/python3.4/site-packages/sqlalchemy/orm/query.py", line 2583, in column_descriptions
for ent in self._entities
File "/usr/lib64/python3.4/site-packages/sqlalchemy/orm/query.py", line 2583, in <listcomp>
for ent in self._entities
File "/usr/lib64/python3.4/site-packages/sqlalchemy/orm/util.py", line 398, in __getattr__
raise AttributeError(key)
AttributeError: entity
Issue 1:
Current Behavior:

I have

+- main_project
| +-package.json
+- packages
+- package1
+-package.json

In package1 as cwd I do npm install express and then rm -rf node_modules and rm package-lock.json. Then, in main_project as cwd I do npm install. The express module does not get installed in package1 with npm 7.10. If I use npm 6.14.12 everything is fine and npm installs recursively and express and its dependencies show up in the node_modules subdirectory of package1.

Expected Behavior:

I expect npm 7.10 to behave the same way as npm 6.14.12

Steps To Reproduce:

See steps above and zip attached - pretty simple.

Environment:

OS: Ubuntu 20.04

Node: v14.16.1 with npm 7.10 and v12.22.1 with npm 6.14.12

npm: 7.10 / 6.14.12

npm_7.0-test.zip

Issue 2:
Current Behavior:

npm v7 does not install linked local packages dependencies.

Expected Behavior:

In npm v6 the dependencies of a local linked package are installed. This means that if app has my-local-pkg as a dependency, running npm install generates app/node_modules folder and also my-local-pkg/node_modules (with its dependencies).

In npm v7, however, only app/node_modules is generated.

Steps To Reproduce:

I created the following repository to illustrate it. The README.md has the instructions on how to reproduce it.

Simplified, the steps are:

Add the following folder structure: ./app and ./my-local-pkg, each with their own package.json

Include this in the ./app/package.json:

{
"name": "app",
"dependencies": {
"my-local-pkg": "file:../my-local-pkg",
"prettier": "^2.2.1"
}
}

Include this in the ./my-local-pkg/package.json:

{
"name": "my-local-pkg",
"dependencies": {
"typescript": "^4.1.3"
}
}

Go to ./app and run npm install.

npm version 6 produces:

node_modules
.bin
my-local-pkg
node_modules
typescript
prettier

while npm version 7 produces:

node_modules
.bin
my-local-pkg
prettier

Compare the two outputs, npm v7 does not install my-local-pkg dependencies, there is no ./my-local-pkg/node_modules folder generated.

Environment:

npm v7.1.2
Issue 1:
Migrated issue, originally created by Michael Bayer (@zzzeek)

I think it might be better to just get the array detection to do the right thing

from sqlalchemy import *
from sqlalchemy.dialects.postgresql import array
from sqlalchemy.dialects import postgresql

c1 = column('foo', Integer)

expr = array([c1])

print expr.compile(dialect=postgresql.dialect())

# fails
function = func.array_agg(expr)

# fails
function = func.array_agg(expr, type_=ARRAY(Integer))

Issue 2:
Describe the bug

Starting with mysql 8.0.20 we get a deprecated syntax warning from on_duplicate_key_update, and at some point this will break.

The cause and how to fix are explained in #5173 (comment). However I ran into this bug in the wild, and spent time tracking this down, so I'm putting it into the bug tracker with context for the next person who runs into this error.

Separate note. I tried to do the -Werror flag and that somehow got in the way of connecting to MySQL. That's not your bug, but is why I didn't give a stack backtrace as requested.

To Reproduce

from sqlalchemy.dialect.mysql import insert
from sqlalchemy import func
insert_stmt=insert(t).values(col1=1,col2=2)
upsert_stmt=insert_stmt.on_duplicate_key_update(col2=func.coalesce(insert_stmt.inserted.col2,t.c.col2))

Error

/opt/homebrew/lib/python3.9/site-packages/aiomysql/cursors.py:239: Warning: 'VALUES function' is deprecated and will be removed in a future release. Please use an alias (INSERT INTO ... VALUES (...) AS alias) and replace VALUES(col) in the ON DUPLICATE KEY UPDATE clause with alias.col instead

Versions

OS:

Python:

SQLAlchemy:

Database:

DBAPI (eg: psycopg, cx_oracle, mysqlclient):

Additional context

No response
Issue 1:
It would be great if I could map the Run Tool Shortcut to a double keypress instead of multiple keys pressed at the same time. For example, double spacebar or enter. This would make me use it a lot more as I can access it more quickly and easily.

Issue 2:
Such as press twice 'Alt' to open PowerToys Run, Alfred can do this, this is powerful, and will help people who want to migrate from MacOS just like me, thanks.
Issue 1:
For:

class Foo<T> {

}

let x = new Foo();

type Y = Foo<string>;

let y = new Y();

tsc complains:

test.ts(9,13): error TS2304: Cannot find name 'Y'.

I would expect the code to be valid. If it were not valid - for which ever reason - then it should be line 7 which it complains about.

Btw. Seems to make no difference, whether i assign T to a literal type like string, or another class.

Of course, as workaround this also works:

class Y extends Foo<string> {};

However, this generates unnecessary runtime code. (e.g. ES5):

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Foo = (function () {
function Foo() {
}
return Foo;
}());
var x = new Foo();
var Y = (function (_super) {
__extends(Y, _super);
function Y() {
_super.apply(this, arguments);
}
return Y;
}(Foo));
;
var y = new Y();

Not sure, whether it would be valid to treat empty subclasses like an alias instead of prototypic inheritance.

Also interesting the free floating semi-colon right at the end.

$ tsc -v
Version 1.8.2

Issue 2:
class A {}
type B = A;
var b = new B(); // <--- Cannot find name 'B'.