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

I'm using TypeScript with named parameters massively like this.

class User {
public firstName: string;
public lastName: string;
constructor({firstName, lastName}: {firstName: string, lastName: string}) {
this.firstName = firstName;
this.lastName = lastName;
}
}

new User({firstName: 'Foo', lastName: 'BAR'});

And I would love to be able to generate the properties automatically like this.

class User {
constructor({public firstName, public lastName}: {firstName: string, lastName: string}) {}
}

new User({firstName: 'Foo', lastName: 'BAR'});

I think that this feature can be really interesting and would encourage more developers to use named parameters which I think is one of the most important best practices in TypeScript and any other language by the way.

Thank you in advance.

Issue 2:
Today, we can take advantage of parameter properties to reduce the boilerplate, e.g:

class Person {
constructor(public firstName: string, public lastName: number, public age: number) {

}
}

Since 1.5, we can also use destructuring, e.g:

class Person {
firstName: string;
lastName: string;
age: number;

constructor({ firstName, lastName, age } : { firstName: string, lastName: string, age: number }) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
}
}

I've tried in many ways to combine both features, but had no success. So:

Is it possible to combine them nowadays, and if yes, how?

If not, could it be an improvement to a future TypeScript version? E.g:

class Person {
constructor(public { firstName, lastName, age } : { firstName: string, lastName: string, age: number }) {

}
}

// the code above would possibly transpile to:
var Person = (function () {
function Person(_a) {
var firstName = _a.firstName, lastName = _a.lastName, age = _a.age;
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
}
return Person;
})();
Issue 1:
When I run in android studio it showing following error :

Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:163)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Command: C:\Users\Arvind\AndroidStudioProjects\my_flutter_app\android\gradlew.bat -v

Issue 2:
Right now there isn't single source of truth for the clang version used, which is causing formatting mismatches across environments.
Issue 1:
Hi guys,

I have been trying to solve this issue for 64 hours and nothing. I am a bit tired. Could you help me please?

Here is the project: https://github.com/slamby/slamby-website

Right now I do not use the aot compilation for production, everything is ready to start it, but I have the same issue, generating ngFactory fiels: there are no ngFactory files generated, just js files.

My tsconfig.aot.json

{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"outDir": "./aot",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [ "./node_modules/@types" ],
"types": [
"node"
]
},
"files": [
"./src/app/app.module.ts"
],
"angularCompilerOptions": {
"genDir": "./aot",
"skipMetadataEmit" : true
}
}

Command to execute ngc:

node_modules/.bin/ngc -p tsconfig.aot.json

Output files print screen:

Angular pacakages:

"@angular/common": "~2.3.0",
"@angular/compiler": "~2.3.0",
"@angular/compiler-cli": "^2.3.0",
"@angular/core": "~2.3.0",
"@angular/forms": "~2.3.0",
"@angular/http": "~2.3.0",
"@angular/platform-browser": "~2.3.0",
"@angular/platform-browser-dynamic": "~2.3.0",
"@angular/platform-server": "^2.3.0",
"@angular/router": "~3.3.0",

Typescript:

"typescript": "^2.0.2",

Could you please help me?

Issue 2:
Hey guys,

I just updated to angular/compiler 2.2.4 and my ngc is no longer creating my application ngFactory files in the specified outGen folder. The last working version of angular/compiler on my stack was 2.1.2. I'm currently on node 6.9.1 and angular 2.2.4. You can check out my stack here and follow the instructions below to reproduce the process

Thanks in advance!

JT

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

initial angular/compiler compilation; app.module.ngFactory file not being created

Expected behavior

app.module.ngFactory file would be created along with component factories

Minimal reproduction of the problem with instructions

clone https://github.com/projectSHAI/GOAT-stack

run commands

npm install

gulp prod

ngc-aot folder should have node_module factories and app factories

app factories missing!!

What is the motivation / use case for changing the behavior?

cannot compile AoT

Please tell us about your environment:

MEAN stack

Angular version: 2.2.4

Browser: [all]

(not a dom issue)

Language: [TypeScript 2.1.1]

Node (for AoT issues): node --version = 6.9.1
Issue 1:
If a modal is defined with 'backdrop': false, hidding it will throw an error :

Uncaught TypeError: Cannot call method 'remove' of undefined

changing :

, removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop = null
}

by :

, removeBackdrop: function () {
if (this.$backdrop) {
this.$backdrop.remove()
this.$backdrop = null
}
}

Fixes it

Issue 2:
With options { backdrop: false }, this.$backdrop.remove() is still being called which results in an exception as this.$backdrop is null.

hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}

removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop = null
}
Issue 1:
Do you want to request a feature or report a bug?

feature

What is the current behavior?

The style prop must always be an object.

What is the expected behavior?

The style prop could optionally accept a CSS string which would be set under the hood via element.style.cssText = styleStr

Issue 2:
Based on the discussion in: #5030 (comment)

Currently, we diff css properties and imperatively set individual properties for each value that differs from the previous render. We've long claimed that "performance" was the reason, but the benchmarks don't seem to support this claim. For instance, consider Ben's perf test (http://jsperf.com/style-vs-csstext-vs-setattribute/8 (from #929). Realistically, there are cases where one technique is faster than the other, and vice versa. It's probably a wash.

But using cssText has several advantages over our current approach. Most notably, it solves correctness issues related to the various css shorthand properties (as noted in #5030). It also cleanly solves vendor prefixing, and a variety of other edge cases. Plus, as an added bonus, it means that the React core is doing less work and is therefore simpler/cleaner/moreMaintainable.
Issue 1:
What steps will reproduce the problem?

Create a file with these contents and run `go test -race`:

package main
import _ "testing"

What is the expected output?

PASS

What do you see instead?

# testmain
/var/folders/gs/mznx8_ps7299rqztvxhggq7c0000gn/T/go-build422539209/_/Users/titanous/projects/go-tests/regexp-import/_test/_testmain.go:5:
can't find import: "regexp"
FAIL

Which version are you using?

go version devel +9c91baff43a1 Wed Sep 25 18:15:29 2013 +1000 darwin/amd64

Please provide any additional information below.

This is a regression since go1.1.2. `hg bisect` indicates that this issue is caused by:

changeset: 17191:70a7a4257467
user: Russ Cox <rsc@golang.org>
date: Thu Jun 27 17:04:39 2013 -0400
summary: cmd/go: add -coverpkg
https://code.google.com/p/go/source/detail?r=70a7a4257467dffb3ec7aa0ec6c1838e9143366a

Issue 2:
by kevin.dankwardt:

1. What is a short input program that triggers the error?

A short program doesn't seem to trigger the error.

The program, called crazylib1.go, that does trigger the error starts with:

package crazylib1
func Crazy1() int {
s = "bbbbbbbbbbbb"+
"aaaaaaaaaaaaaaaaaaaaaaaaa"+
"aaaaaaaaaaaaaaaaaaaaaaaaa"+

and then has about 10,000 subsequent lines that makes the string longer and longer. All
duplicating that "aaaaaaaaaaaaaaaaaaaa"+ line.
and then is followed by:

"aaaaaaaaaaaaaaaaaaaaaaaaa"+
"aaaaaaaaaaaaaaaaaaaaaaaaa"
return len(s);
}

func Crazy2() int {
return 2;
}

2. What is the full compiler output?
go build crazylib1: signal: segmentation fault (core dumped)

3. What version of the compiler are you using? (Run it with the -V flag.)
The command "go version" prints: go version go1.3.3 linux/amd64

Attachments:

crazylib1.go (290171 bytes)
Issue 1:
Reproducing code example:

import numpy as np

integer_list = [18446744073709551615]
arr = np.array(integer_list)
arr.dtype

# Returns: dtype('uint64')

# So far, so good... But:

# Same list as above, with with a smaller number at the first index
integer_list = [
9223372036854775807,
18446744073709551615
]
arr = np.array(integer_list)
arr.dtype
# Returns: dtype('float64')

It looks like Numpy only looks at the first element in the object when deciding what dtype the array should have. I think (although I'm not sure) that this behaviour causes unpredictable behaviour in Pandas down the line.

import pandas as pd

integer_list = [
9223372036854775807,
18446744073709551615
]

df = pd.DataFrame(integer_list)
df[0].dtype
# Returns: dtype('uint64')

df[0].to_numpy(int)
# Returns (on Windows*): array([-1, -1])
# Returns (on Debian): array([9223372036854775807, -1])

When using to_numpy(), Pandas calls np.asarray() under the hood and passes the values of the Series. So I don't think anything is wrong on the Pandas side. Numpy seems to get confused and makes some wrong decisions about the appropriate length and signedness of the integer it should use.

NumPy/Python version information:

Windows

Numpy version: 1.19.2

Python version: 3.8.8 (default, Feb 24 2021, 15:54:32) [MSC v.1928 64 bit (AMD64)]

Debian

Numpy version: 1.20.2 3.7.3

Python version: Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]

And, to maybe save someone some time:

On Windows, a c_long object is always 32 bit, regardless of the OS being 64 bit (as opposed to Unix). See: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types

Issue 2:
When np.array() or .asarray() is used to go from a list of integers, without specifying a dtype explicitly, it can pick default dtypes including int64 & uint64. But there's a strange corner case where it defaults to float64 and loses precision, even though all the values could be uint64. Specfically, this occurs when some but not all values can be int64:

In [11]: max_int64 = np.iinfo(np.int64).max

In [12]: np.array([max_int64]).dtype
Out[12]: dtype('int64')

In [13]: np.array([max_int64 + 1]).dtype
Out[13]: dtype('uint64')

In [14]: np.array([max_int64 + 1, max_int64]).dtype
Out[14]: dtype('float64')

It doesn't depend on the order they're in, and it's not a general consequence of having two values rather than one - two values above this threshold get uint64 as I'd expect.

Tested on Numpy 1.18.4, Python 3.8.2.

Sorry if this has already been discussed; it's a tricky thing to search for. This relates to an issue reported on h5py: h5py/h5py#1547 .
Issue 1:
Here my work for webpack4 (i just did tested on browser only )

A little boilerplate using no babelified code of source nextJs inside with feature like hot-reload completely working with css,css and js

I changed a bit the core of nextjs to make all works .. i wait for any questions

https://github.com/simonjoom/NextJs4Reloaded

Please read

https://github.com/simonjoom/NextJs4Reloaded#feature-tested

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

Context

We ❤️next.js! I made the (possibly) poor decision of migrating our (nteract's) monorepo to Webpack 4 only to notice that next.js is on webpack 3. How far off is a migration to webpack 4? My primary reason for asking is to know if I should switch us back to webpack 3 or just wait on the next next version. 😄

We have a few non-next.js apps (some loaded by a python server, one by electron) and we want to make the webpack similar using the universal webpack configurator plugins crafted for next 4. I don't want to break our next apps, so I kept those a bit separate.
Issue 1:
Elasticsearch version: 2.2.0

JVM version: 1.8.0_74

OS version: 3.13.0-74-generic #118-Ubuntu SMP (Ubuntu Server 14.04 LTS)

Elasticsearch Client: elasticsearch-py

Description of the problem including expected versus actual behavior:

I am trying to add aliases with filters to some indexes. Basically I have write and read aliases on an index, with filter and routing specified. Based on some criteria, I need to modify the aliases to point to a new index, at which time, I remove the write alias from the existing index, move it to the newly created index and at the same add the same read alias to the newly created index. I am using update_aliases api in the python client to perform all three operations atomically.

Expected behaviour: The write alias should be removed from the old index and start pointing to the new index, while containing the filter and routing specified.

Observed behaviour: The write alias is removed from the old index, added to the new index but doesnt contain the specified filter. Attaching code snippets in steps to reproduce.

Steps to reproduce:

Apply alias actions:

actions = {}
actions['actions'] = [{'remove': {'index': u'goibibo_201612', 'alias': u'w_goibibo-serviceresponsesuccess_201612'}}, {'add': {'filter': {'term': {'primaryName': u'goibibo-serviceresponsesuccess'}}, 'index': u'goibibo-serviceresponsesuccess_201612', 'alias': u'w_goibibo-serviceresponsesuccess_201612'}}, {'add': {'filter': {'term': {'primaryName': u'goibibo-serviceresponsesuccess'}}, 'index': u'goibibo-serviceresponsesuccess_201612', 'alias': u'r_goibibo-serviceresponsesuccess_201612'}}]
es.indices.update_aliases(body=actions)

Fetch alias (should contain the filter, but doesnt)

es.indices.get_alias(name='w_goibibo-serviceresponsesuccess_201612')

{u'goibibo-serviceresponsesuccess_201612': {u'aliases': {u'w_goibibo-serviceresponsesuccess_201612': {}}}}

Provide logs (if relevant):

Didn't see any error logs in master node

Issue 2:
This started to occur in ES v2.2.0. Easy steps to repro:

Crete and index

Put an alias

Display the alias

Check that the filter is not presented

PUT test_index
{
"mappings": {
"document_type": {
"properties": {
"tags": {
"type": "string",
"index": "not_analyzed",
"fields": {
"analyzed": {
"type": "string"
}
},
"ignore_above": 256
}
}
}
}
}

POST /_aliases
{
"actions": [
{
"add": {
"index": "test_in*", <----- with wildcards
"alias": "test_index_filter",
"filter": {
"term": {
"tags": "customerconsent"
}
}
}
}
]
}

OR

POST /_aliases
{
"actions": [
{
"add": {
"index": "test_index", <------ without wildcards
"alias": "test_index_filter",
"filter": {
"term": {
"tags": "customerconsent"
}
}
}
}
]
}

GET _aliases

Result

{
"test_index": {
"aliases": {
"test_index_filter": {}
}
}
}
Issue 1:
Environment

Windows 10 - PowerToys 0.18.2

Steps to reproduce

Select a few files in explorer, and launch PoweerRenamer

enter (.*) in the "Search for:" field

enter "$1.txt" in the "Replace with:" field.

Expected behavior

The new file names should be the original filename plus ".txt"

Actual behavior

The new filename is "$1.txt" If I click on "Rename", the file is renamed $1.txt

I've also tried with "\1.txt" instead of "$1.txt"

Screenshots

Issue 2:
due to #980 and #881, it may be helpful to inform user that they may need to enable 'match all' if we detect pattern matching like $1, $2 in the replace text box
Issue 1:
Which version of ShardingSphere did you use?

5.0.0-RC1-SNAPSHOT

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

shardingsphere-jdbc

Reason analyze (If you can)

#8605 (comment)

I think bug maybe at

->org.apache.shardingsphere.infra.metadata.schema.builder.SchemaBuilder#appendRemainTables line 70

shardingsphere must be load remain table MetaData when System start.

Issue 2:
refer to: #13554

Which version of ShardingSphere did you use?

master

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

start up success.

Actual behavior

Caused by: java.lang.IllegalArgumentException: aes-key-value can not be null.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:217) ~[guava-29.0-jre.jar:na]
at org.apache.shardingsphere.encrypt.algorithm.AESEncryptAlgorithm.createSecretKey(AESEncryptAlgorithm.java:57) ~[shardingsphere-encrypt-core-5.0.0-RC1-SNAPSHOT.jar:5.0.0-RC1-SNAPSHOT]
at org.apache.shardingsphere.encrypt.algorithm.AESEncryptAlgorithm.init(AESEncryptAlgorithm.java:53) ~[shardingsphere-encrypt-core-5.0.0-RC1-SNAPSHOT.jar:5.0.0-RC1-SNAPSHOT]
at org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.postProcessAfterInitialization(AbstractAlgorithmProvidedBeanRegistry.java:98) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-RC1-SNAPSHOT.jar:5.0.0-RC1-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:437) ~[spring-beans-5.3.7.jar:5.3.7]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790) ~[spring-beans-5.3.7.jar:5.3.7]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.7.jar:5.3.7]
... 123 common frames omitted

Reason analyze (If you can)

spring.shardingsphere.rules.encrypt.tables.t_address.columns.address_name.encryptor-name value not contain _

such as : encryptor_aes
Issue 1:
I have a component the has the following in the template:

Last bid: {{newBid?.amount | number:'1.1-2'}}

Bid time: {{newBid?.bidTime | date: 'medium'}}

This code works fine in Chrome and Firefox. But in Safari 9 I got an error "Can't find variable: Intl" and then my date pipe. Removed the date pipe and got the same error for my number pipe. Removed both pipes and the code started working fine.

I believe this error has the same cause as #6009

I use Angular 2.0.0-beta.1 on MAC OS.

Issue 2:
Hello,

Found an issue in AsyncRoutes. It looks like RouteData is not preserved unlike with SyncRoutes.

Please check the following plunker: http://plnkr.co/edit/uc26p2QEMHZgiEYwqeK6?p=preview

Line 21 works, while 22 does not work.

Btw, I also have a question, how can we retrieve the name of the current route? For instance when routerOnActivate is called, I'm able to get the url path but what about the name? I need it to inject in a RouterLink.
Issue 1:
This is another one that needs #796 before it can be changed and may or may not be related to #797.

See the line with "OpenConsoleFullPDB.pdb" on it.

execute dir.

pick a line you like. Resize the window so that the line completely fills the width of the buffer, with no spaces on the right.

execute the same dir command. That line you picked should exactly fill one line.

Increase the width of the window. See that the line below the line you picked has now wrapped up to the previous line.

Repros with both dir and ls -lA, so it's not WSL/VT specific.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.418]
Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 0.5.2762.0

Any other software?

Steps to reproduce

Connect SSH session to application server. use '-l' switch

Type in password, accept EULA, and accept session SSH host Key.

Enter in 'CRS' at terminal to load custom application.

(On a Putty Terminal Emulator, the custom application would load without issue)

Expected behavior

Customer Application should load, presenting user with splash screen. From here, user can navigate Linux based application.

Actual behavior

<--

-bash-4.2$ crs

Can't find termcap entry for this terminal

Can't Run crs

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

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:
现在的dubbo与当当的dubbox兼容吗？一直用dubbox，想升级一下。

（虽然知道兼容的可能性几乎没有，碰碰运气问一下。）

dubbox修改了dubbo的序列化协议。

\dubbo\rpc\protocol\dubbo\DubboCodec.java 对比：
Issue 1:
Hi. Today, I tried to work on making test codes for my plugin and I can't make the call to plugin methods in test code. Is there any guideline make test code for plugins?

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_sound/flutter_sound.dart';

import 'package:flutter_sound_example/main.dart';

void main() {
test('startRecorder', () async {
FlutterSound flutterSound = new FlutterSound();
String path = await flutterSound.startRecorder(null);
print('path: $path');
});
}

Error code below.

Exception: MissingPluginException(No implementation found for method startRecorder on channel flutter_sound)
package:flutter_sound/flutter_sound.dart 100:7 FlutterSound.startRecorder
===== asynchronous gap ===========================
dart:async _AsyncAwaitCompleter.completeError
package:flutter_sound/flutter_sound.dart FlutterSound.startRecorder
===== asynchronous gap ===========================
dart:async _asyncErrorWrapperHelper
package:flutter_sound/flutter_sound.dart FlutterSound.startRecorder
test/widget_test.dart 28:38 main.<fn>

flutter doctor.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v0.5.7, on Mac OS X 10.13.6 17G65, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
[!] VS Code (version 1.26.1)
[✓] Connected devices (1 available)

! Doctor found issues in 1 category.

Issue 2:
Currently our plugin template and plugin docs have no recommendation for how to test a plugin. We should probably figure out what to do here.