WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi there,

The first, sorry for my English.

Examples bug report

In pages/index.js:

import React from 'react';
import Link from 'next/link';

class Index extends React.Component {
render() {
return(
<div>
<Link href='/about'>
<a href=""> Go to about </a>
</Link>
</div>
)
}
}
export default Index;

===================================

In pages/about.js

import React from 'react';
import Link from 'next/link';
import Head from 'next/head';

class About extends React.Component {
render() {
return(
<div>
<Head>
<script async src='/static/xxx.js'></script>
</Head>
<Link href='/'>
<a className='example' href=""> go back </a>
</Link>

<button id='button' type='button'>Click me</button>
</div>
)
}
}
export default About;

=============================================

In pages/about.js, i'm embed <script async src='/static/xxx.js'></script> within component of Nextjs.

xxx.js content:

console.log('xxx');
document.getElementById('button').addEventListener('click', function () {
console.log('clicked');
})

=============================================

Describe the bug

after that, in browser enter url localhost:port/about and then enable console i seen 'xxx' in console but is duplicated. So, when click to button element, console show two times 'clicked'.

When embeb xxx.js, if don't have async attribute, this does not happen but document.getElementById('button') is not found coz js loaded before element rendered.

I don't understand about async attribute in nextjs. If have "async" attribute, in Web Console -> Network tab, xxx.js loaded two times, else xxx.js loaded one time.

Please tell me why this bug appeared

Many thanks!

To Reproduce

Go to Browser

Enter url: localhost:port/about and hit Enter

Click in to "Click me" button

F12 find console tab

See error: duplicated text "clicked"

Expected behavior

Just have one text: "clicked" in Console tab when click to button.

System information

OS: macOS

Browser: safari

Version of Next.js: "^7.0.2"

Issue 2:
Based on the guide in the wiki I assumed it would be safe to override the build id by changing that file. However, any use of dynamic imports import('.../....') will still use the old build id, which is hardcoded in the generated webpack bundle.

This results in a 404.

One solution might be to allow overriding the buildId at build time instead of afterwards:

https://github.com/zeit/next.js/blob/52ccc14059673508803f96ef1c74eecdf27fe096/server/build/index.js#L10-L31

I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

Tech
Version

next
3.0.6

node
7.10

OS
Mac OS X

browser
All
Issue 1:
see importKey, in its constructKey HMAC call the value extractable argument is hardcoded to true, disregarding the value of the argument passed in.

https://github.com/denoland/deno/blob/v1.13.0/extensions/crypto/00_crypto.js#L519-L525

refs #11481

Issue 2:
Before some we can do this we need confirmation from spec authors for the following statements:

Non extractable keys are not meant to be a security primitive. They are purely meant for obfuscation.

It is expected that a compromise of the render process, or in process timing side channel attacks (Spectre) can extract "non extractable" keys.

If either of these statements are not correct we do not have any technical way to implement non extractable keys securely.

Knowing more about how web crypto is implemented in browsers (Chrome, Safari, and Firefox) would help here:

Is underlying key material stored in the render process, or in a separate process that communicates with the render process via IPC for any cryptographic operations?
Issue 1:
React version: 16.14.0, 18.2.0

Steps To Reproduce

Create group of radio input element in a controlled way using the checked prop

Click on an unselected element

The clicked/selected element is now selected for the user

The checked prop is still on the original radio input element

Link to code example:

https://codesandbox.io/s/funny-rui-tphkuc?file=/src/App.js:188-191

The current behavior

For a group of type="radio", the checked prop stays on the initially selected radio button

If the selected radio button changes, the state update correctly visually but the checked isn't add as a property in the DOM of the now selected radio button (and the previous selected radio button still have the checked property)

The expected behavior

For a group of type="radio", when changing the selected radio button, the checked property should be removed from the previously selected radio button and be added to the new one

Issue 2:
React version:

Steps To Reproduce

Go to React's code pen example you can find the link in the documentation here

Inspect " is going " checkbox element

uncheck the checkbox

Link to code example: https://codepen.io/gaearon/pen/wgedvV?editors=0010

The current behavior

dom does not update, the checked attribute stays no matter what.

same goes if the initial state is set to false, the checked attribute never appears on the input element.

The expected behavior

The checked attribute should be removed if not checked.
Issue 1:
Given directories like:

my-project

node-modules

my-library

where node-modules is a VCS ignored path

I cannot easily create a workspace with my-project and my-library as root folders.

Here's what works:

I can open my-library in a window and then add another root folder: my-project

Here's what doesn't work:

I can't open my-project in a window and then add another root folder: my-library (because this just does nothing)

Atom: 0.187.0

Issue 2:
Now that we can add root folders to the tree-view (#63) it would be great if we could make a small adjustment to make it function even more like alternative editors do.

Currently I can add additional root folders to a project to allow for a more organized tree view, but I cannot add a root folder if it is a child of an existing root folder.

Use Case: Working on a project with a library or vendor folder that goes multiple folders deep. I would like to be able to organize the tree view better to make it easier to navigate these folders.
Issue 1:
Whenever I launch the zones editor and pick a layout, it doesn't save my choice. It always goes back to Focus and doesn't let me snap my windows into any layout.

Issue 2:
ℹ Computer information

PowerToys version: v0.21.1

PowerToy Utility: FancyZones

Running PowerToys as Admin: No

Windows build number: Windows 10 Version 2004: 19041.450

📝 Provide detailed reproduction steps (if any)

Check the Allow zones to span across monitors checkbox

Configure a zone which uses multiple monitors via the Launch zones editor and Apply

Attempt to snap window to zones, or use Shift key to highlight zones while dragging

✔️ Expected result

A window should snap to a zone

Zone highlighting ought to be functional

The Allow zones to span across monitors setting should persist even when closing settings

If there are errors "Activating" the zones, these should be raised to the user

❌ Actual result

A window will not snap to a zone when the Allow zones to span across monitors is configured

Window zone highlighting is also not functional

When FancyZones settings is closed and re-opened, the Allow zones to span across monitors checkbox is unchecked

When Allow zones to span across monitors is toggled to checked, then unchecked, zone highlighting and snapping functions, though obviously not with the multi-monitor zones

📝 Other Notes

There is a difference in framerate/refresh rate between the two monitors--could that be an issue?

System is a SurfaceBook 2 in a Surface Dock which drives a 2560 x 1440 monitor at 60 fps and a 2560 x 1440 monitor at 30 fps

The fps cannot be made the same as far as I can tell. Likely a hardware limitation.

Display is an LG 49 ultra-wide ( 5120 x 1440)

📷 Screenshots

FancyZones Settings:

Zone Editor spanning monitors:

Monitor configuration:
Issue 1:
Problem: in the current state of affairs although convenient to certain audiences the bivariance is a gaping hole in the type system

Solution:

allow optional but explicit in and out modifiers like in C# for those who wants to take advantage of stricter typechecking

keep bivariant typechecking for anyone who doesn't care:

Array<a> {
map: <b>(map: (value: a) => b) => b[];
)

declare var animals: Array<Animal>;
declare var copyCat: (cat: Cat) => Cat

animals.map(copyCat); // expected not to typecheck, currently allowed no problem

// but if we go

Array<in a> {
map: <b>(map: (value: a) => b) => b[];
)

// then

animals.map(copyCat); // doesn't typecheck anymore as expected

#6102 spinoff

Issue 2:
Hi,

I have this line wich i took from a javascript code but forgot to add "=" when converting.

public require: "ngModel";

It compiles ok. Im pretty sure it should not because the line is not in the corresponding .js!

Tryed to search for duplicate but its a bit hard to find the right search terms.

Is it normal?

Thanks.

TypeScript Version:

1.8.9

Expected behavior:

Compilation error. (I wish)

Actual behavior:

Compiles with no errors, but the code is not inside the generated .js
Issue 1:
Is there a way to allow exporting the interfaces in this package?

I expected to be able to write the following:

import {Maybe, Just} from "sanctuary";

const x: Maybe<number> = Just(1); // TS2304: Cannot find name 'Maybe'.

but anything that is an interface doesn't register as a value on the exported namespace. I actually thought I might be able to import the whole namespace as a workaround, but I'm getting a different error:

import * as S from "sanctuary"; // TS2503: Cannot find namespace 'S'.

const x: S.Maybe<number> = S.Just(1);

Tested with typescript v2 and v3.

I tried using the @types/sanctuary package and had problems.

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

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

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

Authors: @davidchambers @cortopy @piq9117

Issue 2:
I tried using the @types/react-native package and had problems.

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

Mention the authors

Authors: @alloy @zusinShinpei @Esemesek @jeremybarbet @akrger

Since migrating to react-native 0.62 I get the following error for Animated.View and all the Animated.Components or components created using createAnimatedComponent():

Property 'ref' does not exist on type 'IntrinsicAttributes & AnimatedProps<ViewProps> & { children?: ReactNode; }'

Example :

<>
{/*Working*/}}
<View ref={(ref) => console.log('Ref', ref)} />

{/*Throwing error */}
<Animated.View ref={(ref) => console.log('RefAnimated', ref)} />
</>

This happens with a bare project using : https://github.com/react-native-community/react-native-template-typescript

My relevant dependencies :

"react": "16.11.0",
"react-native": "0.62.0"
"@types/react-native": "^0.62.0",
"typescript": "^3.8.3"

Probably relevant React-Native commit : facebook/react-native@66e72bb
Issue 1:
Discussed in #21866

Originally posted by monajalal December 2, 2021

Hello,

Could you please take a look at these two issues and answer whichever possible?

#21863

DanilZherebtsov/verstack#11

Specifically, using verstack package, I was able to get the stratified train and test based on y variable below, however, I do not know how to mix it with sklearn in order to do 5-fold cross validation.

from verstack.stratified_continuous_split import scsplit
x_train, x_val, y_train, y_val = scsplit(x, y, stratify = y, test_size=0.3, random_state=42)
train = [x_train, y_train]
```</div>

Issue 2:
It is important to stratify the samples according to y for cross-validation in regression models; otherwise, you might possibly get totally different ranges of y in training and validation sets. However, current StratifiedKFold doesn't allow float:

$ x=sklearn.cross_validation.StratifiedKFold(np.random.random(9), 2)
/anaconda/envs/py3/lib/python3.4/site-packages/sklearn/cross_validation.py:417: Warning: The least populated class in y has only 1 members, which is too few. The minimum number of labels for any class cannot be less than n_folds=2.
% (min_labels, self.n_folds)), Warning)

$ list(x)
[(array([], dtype=int64), array([0, 1, 2, 3, 4, 5, 6, 7, 8])),
(array([0, 1, 2, 3, 4, 5, 6, 7, 8]), array([], dtype=int64))]

In case I may miss something, is there any reason why StratifiedKFold does not work properly for float?
Issue 1:
similar to guestbook intended for v1, v3 also needs example json for all entity types

Issue 2:
We should start creating PRs to flip to v1beta3, so that we can start testing and merge when ready:

enable v1beta3 by default in apiserver (#6098, will be in 0.15)

change to v1beta3 by default in kubectl (#6377)

ping all getting-started-guide maintainers to rebase onto 0.15, and change their examples to use v1beta3

Update docs and examples (#6584)

delete all getting-started-guides which are not rebased onto 0.15, and remove any from gh-pages too.

kubelet to use v1beta3 on apiserver

kubelet to expose v1beta3

kubelet to use v1beta3 for local pods

kube-proxy to use v1beta3 on apiserver

replication controller controller to use v1beta3

node controller to use v1beta3

endpoint controller to use v1beta3

use v1beta3 for etcd storage (#6377, --storage_version=v1beta3)

test v1beta3 in unit and integration tests (#1473)

port e2e to v1beta3

provide a v1beta1->v1beta3 storage translation tool (#6583)

ref. #1519

cc @smarterclayton @lavalamp
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: 2.7.0

Java version: 1.8

Steps to reproduce this issue

Here is demo: Here is demo: https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-mock

change consumer configuraton: <dubbo:reference id="demoService" check="false" interface="com.alibaba.dubbo.samples.mock.api.DemoService" mock="force”/>

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

Expected Result

force mock should be trigged.

Actual Result

start failed.

I have checked code(MockClusterInvoker) :

@Override
public Result invoke(Invocation invocation) throws RpcException {
// ….
else if (value.startsWith("force")) {
if (logger.isWarnEnabled()) {
logger.info("force-mock: " + invocation.getMethodName() + " force-mock enabled , url : " + directory.getUrl());
}
//force:direct mock
result = doMockInvoke(invocation, 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.3

Operating System version: Windows 10

Java version: 1.8

Steps to reproduce this issue

Here is my execution code

CompletableFuture<xxxxResponse> rpcFuture = RpcContext.getContext().asyncCall(() -> invokeRpc());

rpcFuture.whenComplete((rpcResult, throwable) -> {
xxx;
});

When asyncCall throw RpcException, it will return a instance of CompletableFuture, but not completed, and so the code of the following process cannot be executed, it is blocked

RpcContext asyncCall return new CompletableFuture code

/**
* Async invocation. Timeout will be handled even if <code>Future.get()</code> is not called.
*
* @param callable
* @return get the return result from <code>future.get()</code>
*/
@SuppressWarnings("unchecked")
public <T> CompletableFuture<T> asyncCall(Callable<T> callable) {
try {
hide code snippet....
} catch (final RpcException e) {
return new CompletableFuture<T>() {
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
return false;
}

@Override
public boolean isCancelled() {
return false;
}

@Override
public boolean isDone() {
return true;
}

@Override
public T get() throws InterruptedException, ExecutionException {
throw new ExecutionException(e.getCause());
}

@Override
public T get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException,
TimeoutException {
return get();
}
};
}
return ((CompletableFuture<T>) getContext().getFuture());
}

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

Expected Result

Return a completed completableFuture instance, so the code of the following process can be executed.

Actual Result

return a not completed completableFuture instance.

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

Just put your stack trace here!
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

Steps to reproduce this issue

Assume that there is an interface below：

package com.youzan.nova.service;

import java.util.Set;

public interface OverrideService {

void invoke(Integer id, Set<String> orderNumbers);

void invoke(Long id, Set<String> orderNumbers);

}

package com.youzan.nova.service;

import java.util.Set;

public class OverrideServiceImpl implements OverrideService {
@Override
public void invoke(Integer id, Set<String> orderNumbers) {
System.out.println(id);
}

@Override
public void invoke(Long id, Set<String> orderNumbers) {
System.out.println(id);
}
}

Start telnet call service：

invoke com.youzan.nova.service.OverrideService.invoke("13", Set["1"])
invoke com.youzan.nova.service.OverrideService.invoke("13L", Set["1"])

Always only call the method invoke(Long id, Set<String> orderNumbers).

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

Operating System version: MacOS 10.12.6

Java version: Java 1.8

Steps to reproduce this issue

Build a provider demo, add RpcContext.getServerContext().setAttachment("key","value");

Build a consumer demo. Call provider service by generic.

RpcContext.getServerContext().getAttachment("key");

What do you expected from the above steps？

Get the value which provider set in the RpcContext.getServerContext() attachment

What actually happens?

Null. Can't get the value which provider set in the RpcContext.getServerContext() attachment

Cause:

GenericFilter return a new RpcResult without setting setAttachments

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

Just put your stack trace here!
Issue 1:
It seems that String.prototype.localeCompare does not correctly take into account the numeric option when sorting.

Example snippet:

const items = ['1', '2', '1a', '10b', '10a', '10'];
const sortedItems = items.sort((a, b) => a.localeCompare(b, 'en', {numeric: true}));
console.log(sortedItems);

Node and the browser log out [ '1', '1a', '2', '10', '10a', '10b' ].

Whereas Deno logs out [ "1", "10", "10a", "10b", "1a", "2" ].

Deno Repl

Node Repl

Issue 2:
As seen in #1952 / #1636 ICU needs to be added in Deno build.

Switching this flag to true maybe: https://github.com/denoland/deno/blob/master/.gn#L50 ?

ref: https://v8.dev/docs/i18n
Issue 1:
by vincent@callanan.ie:

What steps will reproduce the problem?

See my post on forum.
Please read down to end as my initial post was confusing.

https://groups.google.com/forum/#!topic/golang-nuts/8hDGgu31iHE

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Windows 7 Pro SP1 64-bit

Which version are you using?
go1.1.2 windows/amd64

Please provide any additional information below.

Ian was unable to reproduce problem.
Is this perhaps a platform-specific issue (Windows/AMD64)?

Issue 2:
What steps will reproduce the problem?

Cross compiling from amd64 -> 386 on a darwin/amd64 10.7.4 machine produces

odessa(~/go/src) % GOARCH=386 ./make.bash 2>&1 | tail
os/user
testing
testing/iotest
testing/quick
# cmd/go
/Users/dfc/go/pkg/darwin_386/crypto/x509.a(_all.o): malformed mach-o file: unsupported
scattered relocation 2/1
/Users/dfc/go/pkg/darwin_386/runtime/cgo.a(_all.o): malformed mach-o file: unsupported
scattered relocation 2/1
# cmd/godoc
/Users/dfc/go/pkg/darwin_386/crypto/x509.a(_all.o): malformed mach-o file: unsupported
scattered relocation 2/1
/Users/dfc/go/pkg/darwin_386/runtime/cgo.a(_all.o): malformed mach-o file: unsupported
scattered relocation 2/1

Please use labels and text to provide additional information.

% xcodebuild -version
Xcode 4.2.1
Build version 4D502

% uname -a
Darwin odessa.fritz.box 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT
2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

yes, the command line tools are installed, in this version of Xcode they are not an
optional extra.
Issue 1:
Code like

let i : i64 = 0;

will fail to compile on 32-bit machines, because the type int is 32-bits, but succeed on 64-bit builds because there int and i64 are the same. It'd be nice if the compiler could report cases where we're assuming particular sizes for int or uint so we don't get bit by cross-platform build failures later.

Issue 2:
Right now i64 unifies with int on 64-bit platforms, etc, and it's a source of errors like in d65df5d. I believe they should be different types.
Issue 1:
v0.4 change julia c api, so embedding application need know which version julia. so add version define in julia.h will help user who use C api. maybe we can define version like R:

version_major : Major version number.

version_minor: Minor version number.

version_patch : Patch number

so master branch define as 0.4.0

Issue 2:
See https://groups.google.com/d/msg/julia-users/50ooFpWGoMs/IBAH_MtvUX4J

I myself don't have access to a Windows machine. Will be great if somebody can confirm/add more details w.r.t. this issue.