WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Challenge Target the same element with multiple jQuery Selectors has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36.

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

My code:

<script>
$(document).ready(function() {

$("button").addclass("animated");
$(".btn").addclass("shake");
$ ("#target1").addclass("animated‚ shake btn-primary");
});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
Challenge Target the same element with multiple jQuery Selectors has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36.

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

My code:

<script>
$(document).ready(function() {

$("button") .addclass("animated");
$(".btn").addclass("shake");

$("#target1").addclass("animated shake btn-primery") ;

});

</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
Issue 1:
Issue Details

Electron Version:

v5.0.1

Operating System:

Linux Mint 19.1, using the Cinnamon desktop environment

Expected Behavior

When creating a tray and setting a click event (but no context menu) it was expected that the event would trigger when clicking directly on the tray icon.

Actual Behavior

Instead the tray displays a context menu with a normal menu item that uses as label the tray tooltip (or the project name if no tooltip has been set). The click event is triggered when clicking on the menu item, not on the tray icon.

Also since the tooltip is used to create a menu item, none appears when hovering the tray icon.

To Reproduce

Here's the repo for my project : git@github.com:chrisalexandrepena/googledrive_linux.git

The index.js only creates a tray with click event that opens a window.

All that is needed to run the code is:

$ git clone git@github.com:chrisalexandrepena/googledrive_linux.git

$ npm install

$ npm start

Issue 2:
Output of node_modules/.bin/electron --version: v3.0.2 and v4.0.0

Operating System (Platform and Version): Linux bitang 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): v2

Expected Behavior

I used the toggle show/hide of the window on the tray click and in v2 it was working.

Actual behavior

When I click now on the tray, it opens the context menu - which was working on right click only.

To Reproduce

If you provide a URL, please list the commands required to clone/setup/run your repo e.g.

$ git clone https://github.com/patrikx3/onenote
$ npm install
$ ./bin/p3x-onenote.js

Screenshots

not applicable

Additional Information

i suppose it is informative.
Issue 1:
I know that the new IO is being worked on, but I could see this being a sneaky thing that gets lost.

#![feature(io)]
use std::io::Write;
fn main() {
write!(&mut std::io::stdout(), "Hello world").unwrap();
}

This code prints nothing. If we use stderr instead, there is output.

rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)

Issue 2:
The final step of runtime removal changes the threading/process model so that the process shuts down when the main thread exits. But several shared resources, like the helper thread for timeouts, are shut down when the main thread exits (but before the process ends), and they are not prepared to be used after shut down, but other threads may try to access them during the shutdown sequence of the main thread.

As an interim solution, the at_exit cleanup routine is simply skipped.

Ultimately, these resources should be made to safely handle asynchronous shutdown, usually by panicking if called from a detached thread when the main thread is ending.
Issue 1:
scikit-learn/scikit-learn#4014

a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam', 'spam',
'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'eggs', 'eggs',
'eggs', 'eggs', 'eggs', 'spam'],
dtype='|S4')

b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam', 'spam',
'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'spam',
'eggs', 'spam', 'spam', 'eggs'],
dtype='|S4')

print(a == b)
print(np.equal(a, b))

[ True True True True False True True True True False True True
False False False False True False False False]
NotImplemented

Issue 2:
>>> import numpy as np
>>> x = np.array('abc', 'c')
>>> x == x
array([ True, True, True], dtype=bool)
>>> np.equal(x, x)
NotImplemented
Issue 1:
🚀 Feature

label smoothing addition to standard cross entropy?

Motivation

Pitch

Alternatives

Additional context

Issue 2:
Currently our cross entropy loss (i.e., nn.CrossEntropyLoss) only supports a hard target class, i.e., wanting to maximize the output (log) probability of a particular class. But in many times training w.r.t. a soft target distribution (i.e., wanting the output to match a particular distribution) is quite useful too, e.g., preventing overfitting.

Math

Cross entropy loss operates on logits after softmax.

Denote the input vector as x. Log softmax computes a vector y of same length as x, where y_i = x_i - log( \sum_j exp(x_j) ), representing the log likelihood of each class.

In the hard target case, if the target clss is c, the loss is simply negative log likelihood loss -y_c.

In the soft target case, let the target distribution vector be p (i.e., p_i is the target probability for predicting class i). The loss is the KL divergence

D( softmax(x) || p) = \sum_i p_i (log p_i / softmax(x)_i) = -\sum_i p_i y_i + constant

The constant is independent of x and thus discarded. Our loss formula is just -\sum_i p_i y_i.

When p_c = 1 for some class c, this simplifies to the hard target class.

The formula for gradient computation can be easily derived from this:

d l / d y_i = -p_i

d y_i / d x_i = 1 - exp(x_i) / \sum_j exp(x_j) = 1 - exp(y_i)

# suppose k != i
d y_k / d_x_i = -exp(x_i) / \sum_j exp(x_j) = - exp(y_i)

# so
d l / d x_i = exp(y_i) (\sum p) - p_i = exp (y_i) - p_i (= softmax(x) - p_i).

Possible Implementation

Currently our cross entropy loss implementation takes in batched x of shape (N, C) and floating point dtype (N is the batch size and C is the number of classes), and a batched target class indices vector target of shape (N), where target[i] is the index of the desired output class, and dtype long (an integral type).

Since we want it to also take in soft target distribution as target, we can allow it to also take in target as a target batched distribution of shape (N, C), and detect whether we want soft target or hard target basing on shape and dtype.

cc @gchanan
Issue 1:
Description of the new feature/enhancement

It would be good to show a shortcut tooltip (alt+1, etc) when hovering on an unselected tab.

Users might know the shortcut only if they read Settings.

Proposed technical implementation details (optional)

N/A

Issue 2:
Environment

Windows build number: 10.0.18362.0

Steps to reproduce

Set-PSReadLineOption -Colors @{
"Command" = [ConsoleColor]::Yellow
}

in scheme change color for powershell / pwsh .exe

"brightYellow": "#F9F1A5",

Expected behavior

yellow should change the [ConsoleColor]::Yellow color but does not
Issue 1:
Set alphamap will make transparent material behind invisible

In the screenshot, an aphamap is applied on the pink patch and set the transparent = true. The blue patch also set transparent = true. It can be seen that the part of the blue patch that behind the pink patch is invisible. If the transparent = false (like purple patch), everything is fine.

Screenshots

Platform:

Device: [Desktop]

OS: [Windows]

Browser: [Chrome]

Three.js version: [dev]

Issue 2:
Description of the problem

We (@Jozain and myself) are currently implementing out-of-order transparency for ThreeJS for a project of ours. We'd like to contribute it back. We are implementing the method of Morgan Mcguire, Weighted-Blended Order Independent Transparency: http://casual-effects.blogspot.ca/2014/03/weighted-blended-order-independent.html

We are helped a lot by @arose's example OIT code on which our stuff will be partially based, just our stuff will be designed into the core of Three.JS: #4814

Here is an proposed example of how to enable this mode:

var renderer = new THREE.WebGLRendererer( .... );

// add new "transparency" variable to renderer to select the transparency rendering mode
//renderer.transparency = THREE.PaintersTransparency; // the current ThreeJS method, the painter's algorithm
renderer.transparency = THREE.OrderIndependentTransperancy; // the new OIT method

This mode will be implemented by a new WebGLOrderIndependentTransparency class that will be responsible for managing the buffers. It will create two additional RenderTargets that will track the size of the current render buffer. The first will be the accumulation buffer which we will render all transparency objects to and then we will render the objects as well to some alpha product buffers - thus two separate renders. This will be followed by a "resolve" stage that renders the transparent objects over top of the existing beauty render of the opaque objects.

This workflow will work with base WebGL and work with multi-sample buffers as well. It can obviously be speed up using multiple render targets, but this shouldn't be that slow for non-huge numbers of transparent objects.

We are going to implement this now, just wanted to give a heads up as to our design so that if you have feedback on it, we can incorporate it now.

/ping @WestLangley @arose @spidersharma03
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: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

nacos registry serviceName may conflict when we have two provider with same service but one config version as A and left group empty and

one config group as A and left version empty

the two provider would get registered with same key provdier:serviceName:A.

the cause of this issue is we ignore empty value when we construct the key, relative code is

private String getServiceName(URL url) {
String category = url.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY);
return getServiceName(url, category);
}

private String getServiceName(URL url, String category) {
StringBuilder serviceNameBuilder = new StringBuilder(category);
append(serviceNameBuilder, url, INTERFACE_KEY);
append(serviceNameBuilder, url, VERSION_KEY);
append(serviceNameBuilder, url, GROUP_KEY);
return serviceNameBuilder.toString();
}

private void append(StringBuilder target, URL url, String parameterName) {
target.append(SERVICE_NAME_SEPARATOR);
String parameterValue = url.getParameter(parameterName);
if (!StringUtils.isBlank(parameterValue)) {
target.append(parameterValue);
}
}

i think we should just keep a SEPARATOR as placeholder for empty value.

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

General Description

I noticed that there are many test to production inheritance structure in test code. Maybe it is not the best practice for test design. I suggest that we can use existing mock framework to refactor these structures.

Refactor Goal

Increase the readability for test code and decrease the coupling between test and production code.

The child test class that inherit production class will be removed after refactoring, relevant dependencies will be replaced by mocking framework.
Issue 1:
On testing #2994

In the following snippet place the caret on 'hello' and perform a 'Fold' operation:

class xyz {
foo() {
if (a == b) {
hello
} else {
world
}
}
}

Observe: 'foo()' get collapsed but I would expect that the 'if' gets collapsed.

Issue 2:
Testing #2994

When my cursor is at line 266 and run the Fold action, the folding block that starts at line 263 gets folded. I expected that the block that starts at line 265 to be folded instead.

When the cursor is at line 265, behaviour is as expected, by the way.
Issue 1:
This is from julia-users. The example is:

function g(a)
if a
f() = 2
else
f() = 3
end
return f
end
f = g(true)
f() # Returns 3

What's also interesting is that g(false) in another REPL session gives an error: "f not defined". So in this setup you either get the second function (if you ask for the first one), or you get nothing! This is on Commit 59d1539 (4 days old master).

Issue 2:
I have been trying to determine why a program that I am running reports a 4x difference in the amount of resident memory that Linux says Julia is requesting versus the output of Base.summarysize(). I am unclear if this is a bug or just my naivete:

Declare a new structure with a single Dict child:

struct Container{K, V}
child::Dict{K, V}
end

Create two examples, each with 1000 byte random data:

container_1 = Container(Dict(:test => rand(UInt8, 1000)))
container_2 = Container(Dict(:test => rand(UInt8, 1000)))

Asking for their size yield 1504 and 1504 for container_1 and container_2. However,

Base.summarysize([container_1, container_2])

returns 56 bytes rather than a value greater than 1504 + 1504.

Note that using standard Dicts works fine:

dict_1 = Dict(:test => rand(UInt8, 1000))
dict_2 = Dict(:test => rand(UInt8, 1000))
println(Base.summarysize(dict_1))
println(Base.summarysize(dict_2))
println(Base.summarysize([dict_1, dict_2]))

Returns, as expected: dict_1 => 1496 bytes, dict_2 => 1496 bytes, and [dict_1, dict_2] => 3048 bytes.

Version info:

Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, haswell)
Environment:
JULIA_NUM_THREADS = 3
Issue 1:
[Enter steps to reproduce below:]

...

...

Atom Version: 0.165.0

System: linux 3.17.0-031700-generic

Thrown From: Atom Core

Stack Trace

Uncaught Error: EACCES, open '/home/joao/.atom/compile-cache/cson/5af7724b023a6274b520f79f04fb798a67319ca7.json'

At fs.js:75

Error: EACCES, open '/home/joao/.atom/compile-cache/cson/5af7724b023a6274b520f79f04fb798a67319ca7.json'
at Error (native)

Commands

Config

{
"core": {
"disabledPackages": [
"metrics"
]
}
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Issue 2:
Just a moment ago I stumbled upon a similar issue to #3056. As a background: I do like atom so much, that I started it to use it as a drop-in replacement for gedit. Even to edit system configuration files. In this scenario it's quite common to invoke editors via sudo.

Atom will start in a broken state if you it was previously launched i.e with something like sudo atom /etc/hosts, because in this case $HOME still points the original user directory, though the process is started under root privileges. This seems to be a distribution specific default behavior of sudo.

As result any file created in this Atom session will become unwriteable for the original user and will lead to application errors inside Atom:

[30615:0724/202223:INFO:CONSOLE(29)] "Error: EACCES, permission denied '/home/ben/.atom/compile-cache/less/62b7a669af25a948e0632eac5cb2bf860f9c0e6e/imports.json'

To be honest: You are able run into similar issues on other programs too, but most of them tend not to create new files unless triggered. I'm not aware which actions trigger Atom to create new files under $HOME after the initial first launch for a user.

Steps to reproduce

Start atom and exit

rm -r ~/.atom/compile-cache/less to provoke Atom creating new files

sudo atom and exit

atom

This will be the case on all plattforms, where sudo keeps the original $HOME setting which can be tested i.e. by calling sudo sh -c 'echo $HOME'
Issue 1:
Is your feature request related to a problem? Please describe.

This is a feature request for Normal-inverse-gamma distribution support at scipy.stats subpackage.

I will implement and open a pull request if approved.

Describe the solution you'd like

Normal-inverse-gamma distribution distribution is the conjugate prior of a Normal distribution with unknown mean and variance [1], which is is commonly used in Bayesian statistics.

[1] Murphy, Kevin. (2007). Conjugate Bayesian analysis of the Gaussian distribution.

Describe alternatives you've considered

Additional context (e.g. screenshots)

Issue 2:
Right now the Normal-inverse-gamma distribution is missing in scipy.stats. I think it qualifies as useful addition since it is the conjugate prior of the normal distribution in case mean and variance are unknown. Therefore the Normal-inverse-gamma distribution is important for Bayesian inference which has been for years and still is a trending topic in the domain of data science.
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubelet-serial-gce-e2e-ci/279/

Failed: [k8s.io] Resource-usage [Serial] [Slow] regular resource usage tracking [Benchmark] resource tracking for 10 pods per node {E2eNode Suite}

/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e_node/resource_usage_test.go:57
Expected error:
<*errors.errorString | 0xc82050ea50>: {
s: "pod ran to completion",
}
pod ran to completion
not to have occurred
/var/lib/jenkins/workspace/kubelet-serial-gce-e2e-ci/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/pods.go:57

Issue 2:
We need an issue to track this.

Recently we added the memory eviction test #28693.

Currently, it is running in the serial test job. However, after adding it all test running after it could not start pod.

They all failed with the reason Evicted: The node was low on compute resources..

Currently, we are not sure that:

Is this because the memory is not reclaimed?

Is this because cadvisor probe interval is too long?

Is this because there is any bug in current memory eviction implementation?

Anyhow, currently all serial node e2e builds are red, we should fix this or disable the test.

@derekwaynecarr @vishh @mtaufen

/cc @kubernetes/sig-node
Issue 1:
Maybe this is actually an issue with Visual Studio, but when I create a typescript project and provoke a build error, I'll get the error message twice in the Error List - one time from IntelliSense and one time from the compiler.

And it looks like - when doing something similar in C# - the error messages are merged when they are identical. I do not know, if that is actually how it works, but it would explain the behavior, because the message from the TypeScript compiler is prefixed with "Build: " and for some strange reason the error code does not show up in the the list either, so the messages are not identical.

If that's not the case, the question remains: why are errors shown twice for TypeScript, but not for C#? :)

Issue 2:
Hi gyus,

I could not find duplicate so I am posting here.

TypeScript Version: 1.8.9

Target: es5

Code:

var myMap = new Map();
myMap.set(0, "zero");
myMap.set(1, "one");
for (var [key, value] of myMap) {
console.log(key + " = " + value);
}

Actual emit:

var myMap = new Map();
myMap.set(0, "zero");
myMap.set(1, "one");
for (var _i = 0, myMap_1 = myMap; _i < myMap_1.length; _i++) {
var _a = myMap_1[_i], key = _a[0], value = _a[1];
console.log(key + " = " + value);
}

The problem is that Map(and Set too) instance does not have length property, instead it has size property. As result loop does not traverse

Playground
Issue 1:
This issue is only ocuring in [Iphone 12].

System info

Playwright Version: [v131.1]

Operating System: Ubuntu

Browser: DEVICE_TYPE=iPhone12

Other info:

it("renders the component", async () => {
await page.click("text=Go to page");
await expect(page).toHaveSelector(`.gotopage`);
});

Steps

[Describe actual behavior]

locator resolved to ...

attempting click action

waiting for element to be visible, enabled and stable

element is visible, enabled and stable

scrolling into view if needed

done scrolling

element is outside of the viewport

Issue 2:
System info

Playwright Version: [v1.33.0]

Operating System: [Windows 11, macOS 13.2]

Browser: [Chromium]

Other info:

Source code

import { test } from "@playwright/test";

test("test", async ({ page }) => {
await page.goto("https://letcode.in/table");

// This does not locate the first row
page.getByRole("row").nth(0);

// Only this locates the first row
page.getByRole("row").first();
});

Expected

page.getByRole("row").nth(0); shoud locate the first row.

Actual

page.getByRole("row").nth(0); does not locate the first row. Only page.getByRole("row").first(); locates the first row.
Issue 1:
The following code is miscompiled on my OS X laptop:

use std;

native "cdecl" mod libc = "" {
fn printf(s: *u8, a: int); /* A tenuous definition, indeed. Herp, derp. */
}

fn main() {
let b = std::str::bytes("%d\n");
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
libc::printf(b8, 4);
let a = bind libc::printf(b8, 5);
a(); /* core dump */
}

I also reproed on my Linux machine, in which I captured this GDB session:

(gdb) break printf
Breakpoint 1 at 0x8048b78
(gdb) run
Starting program: /storage/homes/joshua/rust/build/bindbad
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xf7917b70 (LWP 15444)]
[Switching to Thread 0xf7917b70 (LWP 15444)]

Breakpoint 1, __printf (format=0x804ca68 "%d\n") at printf.c:29
29 printf.c: No such file or directory.
in printf.c
(gdb) c
Continuing.
4

Breakpoint 1, __printf (format=0x10 <Address 0x10 out of bounds>) at printf.c:29
29 in printf.c
(gdb)

Issue 2:
this test (src/test/run-pass/c-stack-as-value.rs) yields a LLVM compilation error:

// xfail-test

native "c-stack-cdecl" mod rustrt {
fn unsupervise();
}

fn main() {
let _foo = rustrt::unsupervise;
}