WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Whenever i run: deno test --fail-fast --coverage=x && deno coverage x

then i get almost 100% code coverage.

the issue is with the last empty trailing line...

cover file:///path/quality.js ... 98.148% (53/54)
54 |

This should be accounted for

deno 1.15.3 (release, x86_64-apple-darwin)

v8 9.5.172.19

typescript 4.4.2

Issue 2:
If I call the WebSocketImpl::send twice, synchronously, four message frames will be delivered:

ws.send("aaa");
ws.send("bbb");
// other party will receive aaa, bbb, aaa, bbb

Is this intentional? I know that send is async, but does this imply I have to await each send operation before sending more?
Issue 1:
Currently, the result of deno lintis output to stderr as follows

$ deno lint --unstable 1>/dev/null
(no-explicit-any) `any` type is not allowed
let a: any = 1;
~~~
at /home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts:1:7

Found 1 problem

ESLint, on the other hand, outputs a result to stdout. You can see

$ npx eslint tmp.ts 2>/dev/null

/home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts
1:5 error 'a' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars
1:5 error 'a' is never reassigned. Use 'const' instead prefer-const
1:8 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

✖ 3 problems (2 errors, 1 warning)
1 error and 0 warnings potentially fixable with the `--fix` option.

I think ESLint's way is preferable and deno lint also should output its result to stdout.

Is there any specific reason outputting to stderr, which I haven't noticed?

Issue 2:
Issue 1:
From julia-users, ref https://groups.google.com/d/msg/julia-users/IsRlOLGeEs8/RRwrs3u2AQAJ

Shortened version:

julia> @which pi*pi
*(x::Irrational, y::Irrational) at irrationals.jl:88

julia> module Erratic2
typealias DummyUnion Union{Irrational,AbstractFloat}
abstract DummyReal <: Real
import Base.*
*(x::DummyUnion, y::DummyReal) = "wow"
end
Erratic2

julia> pi*pi
------------------------------------------------------------------------------------------
ErrorException Stacktrace (most recent call last)
[#1] — *(::Irrational{:π}, ::Irrational{:π})
⌙ at promotion.jl:256

* not defined for Irrational{:π}

julia> @which pi*pi
*{T<:Number}(x::T, y::T) at promotion.jl:256

This arises because of the following reordering of "old" methods (highlighting from kdiff3):

Note that the method at promotion.jl:256 is now above the method at irrationals.jl:88.

Issue 2:
Hi all,

The following code seems to allocate a lot of memory:

function test!(arr::Array{(Int, Int)})
for i = 1:10_000_000
arr[1] = arr[2]
end
end

a = [(1, 1), (2, 2)]
test!(a)

Here are the results of @time test!(a) (using HEAD on the master branch, commit ce29d78) :

elapsed time: 0.439144953 seconds (320013808 bytes allocated, 40.35% gc time)

On the other hand, using a composite type works as expected:

immutable Pair{T1, T2}
a::T1
b::T2
end

function test!(arr::Array{Pair{Int, Int}})
for i = 1:10_000_000
arr[1] = arr[2]
end
end

a = [Pair(1, 1), Pair(2, 2)]
test!(a)

Here @time test!(a) yields

elapsed time: 0.022649237 seconds (80 bytes allocated)

Am I missing something obvious? It seems that each assignment triggers an allocation in the case of tuples (adding @time before the assignment suggests a 32 bytes allocation). Why is that? Is this documented somewhere?

(I ran into this problem when trying to use a heap to extract the top n elements from a list of tuples without sorting it first, as done in Python's heapq.nlargest method)
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.0

Operating System version: mac

Java version: 1.8

Why this method org.apache.dubbo.qos.protocol.QosProtocolWrapper#stopServer not invoked?

My understanding is that when the service stops, the http service should stop.

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

Operating System version: Linux 3.10.0-957.5.1.el7.x86_64

Java version: 1.8

Steps to reproduce this issue

Data length too large

Expected Result

Locate the exception method based on the log

Actual Result

java.io.IOException: Data length too large: 18463787, max payload: 8388608, channel: NettyChannel [channel=[id: 0x57203c57, /127.0.0.1:43554 => /127.0.0.1:20890]]
Issue 1:
I was tracking down an issue in my Emacs-based Julia REPL, which uses Emacs's ansi-term. The issue was that Base.Terminals.cmove_col emits \E[$(n)G, which ansi-term did not know how to deal with. Apparently this concrete issue will be fixed with the next Emacs release, but strictly speaking ansi-term was behaving correctly, because its terminfo entry did not report supporting CHA (Cursor Horizontal Absolute), so the Julia REPL should not have used it.

I don't know what the right approach would be to replace hardcoded sequences. For a fully general solution, one could parse terminfo, and then emit escape sequences accordingly, emulating missing ones, but that involves a lot of tedious work duplicated in eg ncurses, OTOH that using the latter would be overkill.

Issue 2:
I'm using llvmcall to hook-up certain intrinsics to Julia, but ran into the issue that intrinsics need to be declared, and this is currently not supported (for example, see this thread). I have two possible solutions for this problem, but I'd like some feedback before cleaning it up and sending a PR.

My first idea was to do as @Keno proposed, automatically adding declarations for intrinsics. This proved messy, because I could not find a way to use the existing LLVM parsing machinery because of the missing declarations immediately aborting the parser/lexer. Duplicating this functionality seems hopeless, especially for complex declarations (addrspace annotations, function pointers, ...). Anyway, for very simple declarations it looked like this:

// Parse identifiers in the assembly
llvm::StringRef irstring(jl_string_data(ir));
llvm::SmallVector<StringRef, 2> Matches;
llvm::Regex re("[a-zA-Z_0-9]+ @[a-zA-Z$._][a-zA-Z$._0-9]*");
if (re.match(irstring, &Matches)) {
for (llvm::SmallVector<StringRef, 2>::const_iterator MI =
Matches.begin(), ME = Matches.end(); MI != ME; ++MI) {
std::pair<llvm::StringRef, llvm::StringRef> Identifier =
MI->split(' ');
llvm::Type *T =
llvm::StringSwitch<llvm::Type*>(Identifier.first)
.Case("i32", Type::getInt32Ty(getGlobalContext()))
.Case("float", Type::getFloatTy(getGlobalContext()))
.Case("double", Type::getDoubleTy(getGlobalContext()))
.Default(NULL);
if (T == NULL)
jl_error("Unknown type in LLVM assembly");
parent_Module->getOrInsertFunction(
Identifier.second.substr(1), T, NULL);
}
}

What seemed like a more flexible solution, is to extend llvmcall such that the user can pass arbitrary declarations, which get pasted before the function definition when called for the first time. By allowing the ir argument to be a tuple of (decls, ir), this is backwards compatible. Disadvantage: the addition of global state, to check whether a certain (arbitrary) declaration has been added already (because redeclaring identifiers is invalid, and trips the parser). I haven't found another way of checking whether certain declarations have been added to the module already (or we'd need to parse the declarations). This allows using llvmcall as follows:

sync_threads() = Base.llvmcall(
("""declare void @llvm.nvvm.barrier0()""",
"""call void @llvm.nvvm.barrier0()
ret void"""),
Void, ())

Any comments?
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.3

Operating System version: macOS

Java version: 11

Steps to reproduce this issue

Customize ProxyFactory extension in provider project.

Use zookeeper registry.

Start consumer project to call provider's interface.

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

Expected Result

Consumer projects use default extension rather than the one configured by provider.

Actual Result

Consumer project throws "java.lang.IllegalStateException: No such extension org.apache.dubbo.rpc.ProxyFactory by name ..." because the custom ProxyFactory extension did not exist in consumer project.

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

Exception in thread "main" java.lang.IllegalStateException: No such extension org.apache.dubbo.rpc.ProxyFactory by name mh
at org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:520)
at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:527)
at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:351)
at org.apache.dubbo.rpc.ProxyFactory$Adaptive.getProxy(ProxyFactory$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:433)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250)

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.

Our common logger is a logging facade just like SLF4J.

We can enhance it to support parametrized logging

We have many places like this:

if (logger.isInfoEnabled()) {
logger.info("aaa" + "bbb" + "ccc");
}

We are using logging guard to avoid unnecessary string concatenate.

With the support of parametrized logging, this can be simplified just like:

logger.debug("Hello world {} {} and {}", a, b, c);

Similar feature discribed in SLF4j:

https://www.slf4j.org/faq.html#logging_performance

Question: Any other points can be enhanced?
Issue 1:
Description of the problem

I'm trying to render only the edges of the geometry below but I am getting unwanted edges specifically the ones in violet line. The green lines represent the ones generated by an EdgesGeometry with threshold 1 and the faded grey lines are generated by a WireframeGeometry for examination of the whole geometry of the object.

Green lines:

const edgesGeometry = new EdgesGeometry(geometry, 1); const edges = new THREE.LineSegments(edgesGeometry, this._brickEdgesMaterial);

Grey lines:

const wireframeGeometry = new WireframeGeometry(geometry); const wireframe = new THREE.LineSegments(wireframeGeometry, this._brickWireframeMaterial);

*Violet lines were edited in

Also. Here's the geometry in json format generated through Geometry.toJSON(). File is in txt format because github does not allow json file uploads.

geometry.txt

Three.js version

Dev

r91

r89

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Issue 2:
Description of the problem

The EdgesGeometry takes all the cords shared between faces and if the faces are not coplanar (or their "dot" is less than the thresholdDot) then it shows them as edges.

The problem is that in some cases a cord is the sum of two other cords in two different faces. In this case the cord is shown as edge even if its's not.

This is the wireframe:

and this is with the EdgesGeometry:

I'm thinking we should, for each cord, check if there is a vertex in it, and if so, split the face in two using that vertex.

Any idea on how we could do it?

Three.js version

Dev

r82

...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

Linux

Android

IOS
Issue 1:
I like the design of the new Deno.serveHttp API. I think a similar design would work well for WebSockets, too.

Example API:

async function acceptWebSocket(
conn: Deno.Conn,
httpConn: Deno.RequestEvent
): Promise<WebSocket> {}

Example usage:

for await (const conn of Deno.listen({ port: 80 })) {
handleConn(conn);
}

async function handleConn(conn: Deno.Conn) {
for await (const httpConn of Deno.serveHttp(conn)) {
handleHttpConn(conn, httpConn);
}
}

async function handleHttpConn(conn: Deno.Conn, httpConn: Deno.RequestEvent) {
try {
const ws = await Deno.acceptWebSocket(conn, httpConn);
ws.onopen = todo;
ws.onmessage = todo;
ws.onerror = todo;
ws.onclose = todo;
} catch {
httpConn.respondWith(new Response("Failed to accept WebSocket", { status: 400 }));
}
}

function todo() {}

Issue 2:
Probably looks like this:

let { respondWith, request } = await httpConn.nextRequest();
let { ws, response } = Deno.serveWebsocket(request);
respondWith(response);
// use web standard ws

Should use tungstenite

Probably this should proceed #10210
Issue 1:
Problem description

I would like to subset the data frame with a indexer. When using MultiIndex, the results are not following requested order.

Code Sample, a copy-pastable example if possible

This works as expected when index is a simple Index: the returned entries are ordered as requested:

df = pd.DataFrame(
{"i1":[1,1,1,1,2,4,4,2,3,3,3,3],
"i2":[1,3,2,2,1,1,2,2,1,1,3,2],
"d1":['a','b','c','d','e','f','g','h','i','j','k','l']}
)
df.set_index(['d1',], inplace=True)
df.loc[["a","c","b"],:]

returns

# i1 i2
# d1
# a 1 1
# c 1 2 <-- 'c' precedes 'b' as requested in query
# b 1 3

However, when querying a data frame with a MultiIndex the behaviour is inconsistent:

df = pd.DataFrame(
{"i1":[1,1,1,1,2,4,4,2,3,3,3,3],
"i2":[1,3,2,2,1,1,2,2,1,1,3,2],
"d1":['a','b','c','d','e','f','g','h','i','j','k','l']}
)
df.set_index(['d1',"i1"], inplace=True)
df.loc[["a","c","b"],:]

returns

# i2
# d1 i1
# a 1 1
# b 1 3
# c 1 2 <-- 'c' follows 'b' unlike in query

Expected Output

# i2
# d1 i1
# a 1 1
# c 1 2
# b 1 3

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 34.4.1

Cython: 0.24

numpy: 1.12.1

scipy: 0.19.0

statsmodels: 0.6.1

xarray: None

IPython: 5.3.0

sphinx: 1.4.5

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: None

tables: 3.2.2

numexpr: 2.6.0

matplotlib: 2.0.0

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.5.3

html5lib: 0.999999999

httplib2: 0.9.2

apiclient: 1.5.1

sqlalchemy: 1.0.14

pymysql: None

psycopg2: None

jinja2: 2.9.6

boto: 2.42.0

pandas_datareader: None

Issue 2:
In [40]: cols = pd.MultiIndex.from_product([['A', 'B', 'C'],[1,2]])

In [41]: df = pd.DataFrame(np.random.randn(5,6), columns=cols)

In [42]: df.loc[:, ['B', 'A']]
Out[42]:
A B
1 2 1 2
0 -0.990868 1.577803 1.023247 -0.423165
1 -1.180170 1.236143 -1.484085 0.044929
2 1.665502 -0.711081 0.227827 0.651859
3 -0.659154 0.154327 -1.548650 -0.070550
4 -0.232819 0.100959 -0.102296 0.260816
Issue 1:
julia> corrupt_stacktrace() = error("destroy stacktrace")

julia> f() = error("expected")
f (generic function with 1 method)

julia> try
f()
finally
try; corrupt_stacktrace(); end
end
ERROR:
Stacktrace:
[1] error at ./error.jl:33 [inlined]
[2] corrupt_stacktrace at ./REPL[8]:1 [inlined] # should have been f!
[3] macro expansion at ./REPL[14]:4 [inlined]
[4] top-level scope at ./<missing>:0

Issue 2:
function foo()
try
error("error in foo")
catch e
end
end

function bar()
try
error("error in bar")
catch e
foo()
rethrow(e)
end
end

bar()

produces the misleading

ERROR: error in bar
Stacktrace:
[1] foo() at ./REPL[1]:3
[2] bar() at ./REPL[2]:5

This just hit me in a really wicked situation: The stacktrace actually lead me to a line erroneously throwing the reported exception. I fixed it (to throw the correct exception), but the same error kept showing, leaving me completely puzzled for quite some time...
Issue 1:
Issue Type:

Feature Request

Ansible Version:

ansible 1.6.5

Environment:

My situation is that I have a Mac OS X 10.9 machine which I am running Ansible from. I want to manage Ubuntu 12.04 hosts.

Summary:

Forgive me if this is a duplicate (I find it hard to imagine I'm the first to encounter this) but I have spent a lot of time searching for an answer.

My situation is that I have a Mac OS X 10.9 machine which I am running Ansible from. I want to manage Ubuntu hosts, ergo they require apt. I'm unable to find out how to install the python-apt or aptitude modules on my Mac, which of course means I cannot do rudimentary package management on the remote Ubuntu hosts, which ultimately means I'm unable to use Ansible to provision my systems.

Steps To Reproduce:

N/A - Self explanatory.

Expected Results:

Expected to be able to use apt: related modules in playbooks.

Actual Results:

Apparently unable to use apt module from a Mac OS X machine when managing Ubuntu machines.

Issue 2:
Issue Type:

Bug Report

Ansible Version:

ansible 1.6.1

Environment:

Mac OSX

Summary:

If we have a hosts file:

[service1]
www.host1.com

[service2]
www.host1.com

and we have these group_vars:

group_vars/service1:
database_host: "www.database.com"
database_port: 3306

group_vars/service2:
database_host: "www.differentdatabase.com"
database_port: 3306

and we are running this playbook:

- hosts: service1
remote_user: root

the variables from group_vars/service1 and group_vars/service2 overwrite each other if we're deploying to the same server. This means service1 will get service2 groups variables and get the incorrect database host and port.

to get around these, we've added DNS entries (aliases to www.host1-service.com) so our host looks like:

[service1]
www.host1-service1.com

[service2]
www.host1-service2.com

but this is highly error prone and is not ideal. What are some different methods to getting around this issue? (or misunderstanding of group_vars)

The way I'm doing multi environmental deployments is like this:

inventory/stage/hosts
inventory/stage/group_vars/
inventory/stage/group_vars/service1
inventory/stage/group_vars/service2

inventory/live/hosts
inventory/live/group_vars/
inventory/live/group_vars/service1
inventory/live/group_vars/service2

Steps To Reproduce:

Summary describes how to reproduce this.

Expected Results:

group_vars should not be overwritten by another group when sharing the same host

Actual Results:

group_vars are overwritten by another group when sharing the same host
Issue 1:
Hi,

In the commit 7e87eb1, which is fixing the request format when duplicating a Request object, you forcefully set the request format if the parent is already null.

The thing is, when forwarding in a controller to another controller (or maybe something, I haven't tested for another case yet), you may need to let the request format be null and unbiased.

Currently (brought by the commit 7e87eb1), if the request format is null, then it is set to an arbitrary default which is html... Which renders useless any attempt to get the "correct" request format in the forwarded controller, and the possibility to set a default.

This is easily manageable by doing a little hack before the forward :

<?php
use Syfmony\FrameworkBundle\Controller\Controller;

class MyController extends Controller
{
public function myAction()
{
// ... stuff

// little hack because of symfony/symfony's commit 7e87eb1fdf
$request->getRequestFormat('json'); // json example. could be whatever except null

$this->forward('Bundle:Action', ['param']);
}
}

But still, I don't think this is what should be expected from the framework ; the request format, which is in my case handled by a view listener should be left as is and unbiased, even if it has a null value per default.

So, maybe this commit was made from a need, but still, I think this could be a possible regression.

Cheers.

Issue 2:
After my first typo since updating dependencies, I noticed fatal errors were displayed in a symfony layout, unfortunately I'm getting displaying issues.

The first issue occurs because I don't have xdebug installed, apparently it has only been tought for xdebug (http://easycaptures.com/fs/uploaded/737/5939488074.png).

The second issue occurs because the register method of the ErrorHandler is called twice, I can't investigate on why now (but I don't touch it myself and don't have that many third party bundles installed, fostwitterbundle and genemubundle only), which causes the shutdown function being registered twice.

A quick fix for the first issue could be to set display_errors to false on debug mode, as apparently all kind of errors would now be displayed by symfony anyway.
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.

Electron Version

11.4.4

What operating system are you using?

Windows

Operating System Version

W10P 20h2 19042.985

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

There should be an option to not enable fullpath but only name (like on chromium).

Actual Behavior

The fullpath seems to be always available whatever the flags sandbox or node_integration is set.

Testcase Gist URL

No response

Additional Information

No response

Issue 2:
The function to detect whether the current window is maximized is invalid

mainWindow = new BrowserWindow({
height: 670,
useContentSize: true,
width: 1022,
minWidth: 1022,
frame: false,
resizable: false,
icon: path.resolve(__dirname, '../renderer/assets/icon.png')
})

ipcMain.on('max', e => {
if (mainWindow.isMaximized()) {
mainWindow.unmaximize()
// mainWindow.setFullScreen(false)
} else {
// mainWindow.setFullScreen(true)
mainWindow.maximize()
}
})

mainWindow.isMaximized() always returns false
Issue 1:
Migrated issue, originally created by David Lord (@davidism)

as_declarative has been removed from the top level module between 0.9.8 and 0.9.9. This no longer works:

from sqlalchemy.ext.declarative import as_declarative

Instead, this is required:

from sqlalchemy.ext.declarative.api import as_declarative

This seems to be an unintended change, as there's no reason for it to have been removed, and there's no mention in the changelog.

Discovered while answering this Stack Overflow question.

Issue 2:
Migrated issue, originally created by Eben Freeman (@emfree)

Hi,

Looks like sqlalchemy.ext.declarative.__init__.py no longer imports as_declarative in 0.9.9. Not a major problem for us, but seems likely to be a typo in the release, rather than an intentional change?