WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Post request works but response (on code 200) is not returned.

axios

.post(url, JSON.stringify(data))

.then((resp) => {

console.log("resp: ", resp.data.body);

console.log("result: ", resp.data.result);

alert(Success ${JSON.stringify(resp.data.result)});

})

.catch((err) => {

console.error("Problem with Add: ", err);

alert(Problem with Add: ${err});

});

};

when running the same request in postman i get the response with custom error:

{

"statusCode": 200,

"headers": {

"Content-Type": "application/json",

"Access-Control-Allow-Headers": "",

"Access-Control-Allow-Origin": "",

"Access-Control-Allow-Methods": "*",

"Access-Control-Allow-Credentials": true

},

"body": ""Success"",

"result": [

{

"@full_error": "ERROR 1062 (23000): Duplicate entry '501151' for key 'PRIMARY'"

}

]

}

Please advise

Issue 2:
Describe the bug

axios.post randomly sends duplicate POST request and ignores the first response.

The code is below:

class SomeClass extends React.PureComponent
isReady = true
submitCounter = 0
lastSent = null

// ...

submit() {
this.submitCounter++;

if (!this.isReady) {
return;
}

this.isReady = false;

this.setState({
isReady: false
});

const formData = new FormData();

formData.append("ts", Date.now());
formData.append("um", Math.random().toString(36).substr(2));
formData.append("ctop", this.submitCounter);
formData.append("lastSent", this.lastSent);

axios
.post(`https://someurl.here`, formData)
.then(({data}) => {
this.lastSent = dayjs().format("YYYY-MM-DD HH:mm:ss");
this.isReady = true;
this.submitCounter = 0

if (data.status === false) {
return;
}

this.setState({
isReady: true
});
})
.catch(err => {
console.log(error);
});
}

// ...
}

The submit function above is only called once, while the axios.post() is called twice. I know it when I check the ts, um, ctop, and lastSent parameter are same with the previous record. Also, CPanel visitor record show that the request sent twice in short timespan.

Is it because the connection issues, or there are some configurations I missed? I already read the documentation, search Google and Stack Overflow, but still no clues about it.

To Reproduce

I don't know how to reproduce it since it's randomly occurred.

Expected behavior

The request is only sent once.

Environment:

Axios Version: 0.18.0

OS: Windows 7

Browser: Chrome

Browser Version: 75.0.3770.90

Additional Library Versions: React 16.6.3

Server: Laravel 5.7

Database: MySQL 5.7
Issue 1:
In an extension, I tried to register an event listener for onDidSaveTextDocument() which would activate the format function, and save the file afterwards.

Using the code:

commands.executeCommands('editor.action.format').then(() => {
commands.executeCommands('workbench.action.files.save');
});

The problem is that the file gets saved, then formatted, but not saved afterwards. Using a timer for a 500ms delay after the format, before the next save, gives the wanted result.

The function inside of ".then((){ }" should not be called before the file is actually formatted, unless there is something else I don't understand.

Issue 2:
The use case is to call the workbench.action.closeAllEditors function and then assert that the number of visible editors is 0. Currently when doing the check after calling the function, window.visibleTextEditors is still 1.

I think this is a timing issue where executing a built in command does not wait for any changes to be propagated to the PH side.

Test case showing the issue (commented out atm): https://github.com/Microsoft/vscode/blob/master/extensions/vscode-api-tests/src/commands.test.ts#L19
Issue 1:
I like the tabs in the title bar. However, the area where I can move the window is too small:

Compare this with Edge/Chrome where the entire area not used for tabs can be used to move the window around:

Issue 2:
I think its really nice that you can put the terminal-tabs in your titlebar but I got an issue there.

You can't move the window around klicking on the blank space in the the-bar to move the window around (highlighted in the screenshot).

Since people are moving their terminal quite often it would be nice to offer this space, so you can drag your terminal around.
Issue 1:
I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support request

Current behavior

When a route with a specified outlet has children, the activated child is put into the main router outlet, along side the route component that is already active inside this outlet, rather than in the named outlet.

Expected/desired behavior

Routes whose (componentless) parents have a specified outlet, should go into said outlet.

Reproduction of the problem

The relevant route:

{
path: 'session',
outlet: 'dialog',
children: [
{
path: 'login',
component: LoginComponent,
},
{
path: 'register',
component: RegisterComponent,
}
]
}

Plunkr reproducing the issue:

http://plnkr.co/edit/W4t6c2hFWW3x9Sf2pn8S?p=preview

Click the three different links and you can see the login and register routes are put into the main outlet alongside the already activated home route, whereas the confirmation route is correctly placed in the named outlet.

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

I believe this to be a bug and the use case is demonstrated in the plunkr

Please tell us about your environment:

Angular version: 2.0.0-rc.5

Browser: all

Language: TypeScript 2.0.0

Issue 2:
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

Navigating to the dynamic-component documentation and trying to refer to the live example plunker at the link does not execute the code but throws errors

Expected behavior

Example should be seen

Minimal reproduction of the problem with instructions

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

Please tell us about your environment:

Angular version: 2.0.X

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all | TypeScript X.X | ES6/7 | ES5]

Node (for AoT issues): node --version = 7.2
Issue 1:
It'd be really useful if there was a single endpoint that could be called that gathers all the config from nodes in the cluster as well as any cluster level config, this includes the local elasticsearch.yml from all nodes.

Issue 2:
Currently there is no way of seeing all settings that are enforced. For instance, defaults are not available and settings from the config/elasticsearch.yml are not available.

Any setting which is different from the default should be returned by these APIs:

GET /{index}/_settings
GET /_cluster/settings

Both should also support the include_defaults query string parameter, which would return all settings, including the defaults.

Also, deleting a setting should reset the setting to the default.

Setting an unknown setting, or a setting that can't be changed should throw an error.

Relates to #5018, #3670, #2738, #2730, #3572, #2628, #3671, #5019, #6309
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.3.0

What operating system are you using?

Windows

Operating System Version

Windows 7 SP1

What arch are you using?

ia32

Last Known Working Electron version

9.3.5

Expected Behavior

webview can be loaded successfully

Actual Behavior

random webview crashed in windows

Testcase Gist URL

No response

This is the crash report

report.zip

Issue 2:
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.2.1,12.0.0

What operating system are you using?

Windows

Operating System Version

Windows 7

What arch are you using?

ia32

Last Known Working Electron version

don't know

Expected Behavior

run correctly

Actual Behavior

When open window. this bug appread frequently

Testcase Gist URL

No response

Exception thrown during bootstrapping
Error installing extension 'extensions::SafeBuiltins'.
[15296:0329/160109.446:FATAL:v8_initializer.cc(96)]
Issue 1:
If using trackBy/ngForTrackBy to track the addition/removal of an element to the array being iterated in ngFor, it appears the elements are actually redrawn rather than re-ordered. I'm using 2.0.0-beta.14.

Issue can be seen here using the network/Docs tab in chrome console: http://plnkr.co/edit/qZf6yv?p=preview

Open the Network tab and then remove one of the Heroes near the top of the list. Every hero item below that one will be redrawn, as seen by the iframe being reloaded. This behavior can be repoduced without an iframe present, but this makes it easier to see the behavior.

It's possible that I misunderstood the functionality of trackBy, but it was my understanding that it would leave elements in place if they retained the same reference property from the custom track-by function.

EDIT: I previously thought that the iframes were triggered by a reflow and this somehow caused their content to refresh, but that's apparently not always the case. This plunker recreates the functionality of adding a node with an iframe child, but the other iframes don't reload their content. It appears that ngTrackBy may not fully be working in 2.0.0-beta.14.

Issue 2:
Type: bug (or possibly non-optimal behavior)

Plunkr: http://plnkr.co/edit/WHJs6F4lfkDZNyrQHYbQ?p=preview

Version (UPDATED): Angular 2 beta 11

The current combined behavior for DefaultIterableDiffer/ngFor currently exposes this bad behavior:

remove the head item in an array

On check, the DefaultIterableDiffer will now produce a "removed" record for the first item and "moved" records for the rest

This leads ngFor to remove all items, and then add back the non-removed items, thereby leading to a lot of unnecessary DOM removals and adds, losing DOM state (such as focused elements/selection etc.) ( see

angular/modules/angular2/src/common/directives/ng_for.ts

Line 106
in
f9fb72f

changes.forEachMovedItem((movedRecord: CollectionChangeRecord) =>

)

On a related note, the current diff structure doesn't impose any necessary order between removals, moves, and adds (each having an independent forEach method). (There's just a todo by rado on improving this.) Which means that it's unclear (aside from any documentation notes) in which order they should be applied for indices to be valid. To me it seems much more logical that the DefaultIterableDiffer deduces an array of operations to perform on the previous data structure to reach the current state. If you accept that notion, the moves are extraneous and can be removed. Which is something I'd like to propose. Thus, a head removal would just translate to something like:

[{type: 'removed', item: 'A', previousIndex=0, ... }]

...rather than (the currently implicit through different forEachXXX)

{
removed: [{type: 'removed', item: 'A', previousIndex=0, ... }],
moved: [
{type: 'moved', item: 'B', previousIndex=1, currentIndex=0, ... },
{type: 'moved', item: 'C', previousIndex=2, currentIndex=1, ... },
]
}
Issue 1:
I have a few files for making HTTP requests. I want to extend those to allow easier access to our API. Here is some sample code:

http.ts

export type HTTPParameters = { [key: string]: string };
export type HTTPHeaders = { [key: string]: string };
export enum HTTPMethod { Get, Head, Post, Put, ... };

api.ts (->Arrows<- point out where the errors are.)

import { HTTPParameters, HTTPHeaders, HTTPMethod } from './http.ts';

export type ApiParameters = HTTPParameters;
export type ApiHeaders = HTTPHeaders;

/* Try one */
export type ApiMethod = HTTPMethod;

export class Foo {
constructor(public method: ApiRequestMethod = ->ApiRequestMethod<-.Get) {}
// Cannot find name 'ApiRequestMethod'
}

/* Try two */
export var ApiMethod = HTTPMethod;

export class Foo {
constructor(public method: ->ApiRequestMethod<- = ApiRequestMethod.Get) {}
// Cannot find name 'ApiRequestMethod'
}

/* Try three */
export enum ApiRequestMethod ->=<- HTTPRequestMethod;
// Expected '{'

/* Try four */
export enum ApiRequestMethod ->HTTPRequestMethod<-;
// Expected '{'

The actual working solution looks like this:

import { SomeEnum as MyEnum } from './http.ts';

export { MyEnum };

export class Foo {
constructor(public method: MyEnum = MyEnum.Get) {}
}

I might be missing something here, but if this is really the only solution, then it's pretty ugly and it would be nice to have something better.

Issue 2:
It seems to me, it's very inconvenient, that import declaration can't have none qualified symbol as target. By the reason I have to use next way to do this:

class S {}

export type SS = S;
export var SS = S;

Maybe, removing the qualified name restriction will be more convenient than combination of type alias and var alias.
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.6.3-release

Operating System version: windows 10

Java version: JDK 1.8

Step to reproduce this issue

mvn clean install -e

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

Expected Result

What do you expected from the above steps？

UT pass

Actual Result

What is actually happen?

dubbo-common IOUtilsTest#testWriteLines assert error

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

expect "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\r"
actually "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\r\n"

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

Operating System version: CentOS 6.7

Java version: 1.8

Steps to reproduce this issue

@Getter
@Setter
public class BaseResponse {
@JSONField(name = "order_id")
private int orderId;
}

Expected Result

BaseResponse {

private int order_id;

}

Actual Result

BaseResponse {

private int orderId;

}
Issue 1:
Summary of the new feature/enhancement

To avoid constant serializing and function duplication and improve handling of work areas, introduce WorkAreaUniqueId struct instead of using serialized string

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.900]
PowerToys version: v0.19.1
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

For example set PT Run hotkey to default Alt + Space

Sometimes this hotkey triggers window menu instead of opening PT Run (check #4922)

Expected behavior

PT Run launches

Actual behavior

Sometimes window menu opens. I tried different hotkeys (eg: Win + Space) the same thing happened sometimes. This time sometimes keyboard layout selector opened instead of PT Run.

Screenshots
Issue 1:
If you have a navbar with navbar-fixed-top, and items in a navbar-right, the last item hangs over the container by 15px. You can see this with the example on the getbootstrap site: http://getbootstrap.com/examples/navbar-fixed-top/

Issue 2:
Issue in: Navbar component

.navbar-nav.navbar-right:last-child {
margin-right: -15px;
}

That's the CSS style applied on the right-floating menu items' container. It does its intended job only as long as there's only one <element class=" ... navbar-right"> in the Navbar. Add another and it messes the spacing of the last container ("last" not in HTML but in the order of appearance in browser, considering it's float: right;).

The Dashboard example template has the necessary items to reproduce the issue. Take a look at the snapshots, they should be self-explanatory.

I am not saying margin-right: -15px; is wrong. It's needed, but doesn't suit all cases like I clearly explained. Manually adding a class like .last-child on the element itself is probably the way to go, but what do I know!
Issue 1:
Issue originally made by @Lapixx

Bug information

Babel version: 6.7.7

Node version: 5.3.0

npm version: 3.3.12

Options

ES2015 and Stage 0 preset.

Input code

// modified from kadirahq/graphql-errors

const modifyResolver = (field, handler) => {

const originalResolve = field.resolve;

field.resolve = async (...args) => { // Workaround 1: use `async function(...args) {`

try {
// const b = args; // Workaround 2: Access args -- even when unused.
const res = originalResolve(...args); // Problem: arguments is undefined here
return await Promise.resolve(res);
}
catch (err) {
throw handler(err);
}
};
};

Description

Basically, when I try to define a function like so:

const myFunc = async (...args) => {
otherFunc(...args);
};

The arguments are undefined. When you look at the output you can clearly see that arguments gets assigned outside of the function scope. I'm not sure why that happens. Removing async fixes the problem, using the function keyword fixes the problem, and (my favourite), assigning args to a value (or otherwise accessing it) also fixes the problem.

[[ https://babeljs.io/repl/#?evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-0&experimental=true&loose=false&spec=false&code=%2F%2F%20modified%20from%20kadirahq%2Fgraphql-errors%0A%0Aconst%20modifyResolver%20%3D%20(field%2C%20handler)%20%3D%3E%20%7B%0A%20%20%0A%20%20const%20originalResolve%20%3D%20field.resolve%3B%0A%20%20%0A%20%20field.resolve%20%3D%20async%20(...args)%20%3D%3E%20%7B%20%2F%2F%20Workaround%201%3A%20use%20%60async%20function(...args)%20%7B%60%0A%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%2F%2F%20const%20b%20%3D%20args%3B%20%2F%2F%20Workaround%202%3A%20Access%20args%20--%20even%20when%20unused.%0A%20%20%20%20%20%20const%20res%20%3D%20originalResolve(...args)%3B%20%2F%2F%20Problem%3A%20arguments%20is%20undefined%20here%0A%20%20%20%20%20%20return%20await%20Promise.resolve(res)%3B%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(err)%20%7B%0A%20%20%20%20%20%20throw%20handler(err)%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%7D%3B | REPL with sample code ]]

Issue 2:
Issue originally made by @spudly

Options

preset-es2015, preset-stage-3

Input code

const callTest = async (...args) => {
await test(...args);
};

const test = (arg) => console.log(arg);

callTest('yo');

Description

This is similar to: T2776: Generators and async functions with default args place _this and _arguments incorrectly.

When you use an async arrow function that uses a rest arg and then spread the resulting array into another function call without first accessing the variable, the _arguments variable is placed outside of the function, causing it to send the wrong arguments.

Simply accessing the variable fixes this issue. All I have to do is add "args;" as the first line in the callTest() function and it starts working.

Tested with the REPL at babeljs.io, version 6.7.4.
Issue 1:
Using .table-reponsive only works on the smallest screen size.

Solution 1: Use @grid-float-breakpoint so it becomes responsive when the navbar does (currently what we do in projects)

Solution 2: Use another variable that defaults to @screen-sm-max that can be overwritten in another less file

Issue 2:
I have a panel with a table inside and the table has a few columns making it rather wide. If you view the panel table on a mobile device the table is wider than the panel making it look bad.

This only occurs on tables that are quite wide. I've tried using table-responsive and the issue still occurs. This occurs when the word is too long to \n to the next line. Simple fix would be to just make the panel width move with the table width.

Tested on Chrome and Firefox for Mac with the latest versions.

http://jsbin.com/bixetifi/1

Image:
Issue 1:
If I take away the minWidth from a select control, I expect the width to adjust to the currently selected option. This works perfectly on Chrome on my Mac. However it shows truncated text with ellipses on Safari as well as on mobile browsers.

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

Expected Behavior

Here's the expected behavior which is what I get on Chrome. This is after removing minWidth: 120 from the Select example:

Current Behavior

Here's the current behavior in Safari and several mobile browsers:

Steps to Reproduce (for bugs)

In the SimpleSelect example, remove minWidth:

formControl: {
margin: theme.spacing.unit,
// minWidth: 120,
},

Change some of the options to be super long to exaggerate the problem:

<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Three Hundred and twenty</MenuItem>

Context

I am trying to pack 3 select controls in a mobile app horizontally. Having them autosize makes the best use of space and shows all the selected options without ellipses. If I have to specify minWidths, it will not make the best use of the available space.

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.18

React
16.0.0

browser
Chrome and Safari on Mac + Mobile

etc

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

Expected Behavior

Using create-react-app-with-typescript should work when I attempt to install it

Current Behavior

I've tried to install create-react-app-with-typescript about a dozen different ways, and every single time I try to run it, I get the error:

(project_dir)/node_modules/material-ui/styles/MuiThemeProvider.d.ts
(8,10): Type 'StyleSheet' is not generic.

Steps to Reproduce (for bugs)

Download create-react-app-with-typescript

npm install --save

yarn start

Context

So far, I've been trying to install this so I can build a web frontend, and it's not worked at all.

Your Environment

Mac OS, using brew to install. All settings identical to those in create-react-app-with-typescript. Using Google Chrome with the Fish terminal, but I'm fairly certain neither of those affect the issue.
Issue 1:
Challenge Taste the Bootstrap Button Color Rainbow has an issue.

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0.

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

My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<div class="container-fluid">
<h2 class="red-text text-center">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>

<img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera. ">
<button class="btn btn-block">Like</button> **# I could not type,click past the btn-b <-----

**
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>

Issue 2:
Please tell us in detail here how we can make this challenge better. Padding-right should say 20px in directions on the bottom, it says 40px.