WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm using babel-plugin-inline-import to import built css files for antd components. I import the CSS as strings & insert it via tagged template literal into a styled-component. This is to avoid requiring the entire CSS file on every page.

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

Expected Behavior

When importing CSS as a string and passing it to a styled component, the imported styles should affect components in the proper scope.

Here's my .babelrc:

{
"presets": ["next/babel"],
"plugins": [
[
"styled-components",
{ "ssr": true, "displayName": true, "preprocess": false }
],
[
"inline-import",
{
"extensions": [".css"]
}
]
]
}

Current Behavior

When I wrap the component in the regular styled function from styled-components, the styles are injected into the <head> and the component is given the correct classnames. However, no styles are applied.

Such an implementation looks like this:

import Button from 'antd/lib/button';
import styled from 'styled-components';
import Styles from 'antd/lib/button/style/index.css';

export default styled(Button)`
${Styles};
`;

^^ Note that this implementation works in non-nextjs projects, at least in my experience.

Now, when I use styled-components injectGlobal, though, it works fine:

import Button from 'antd/lib/button';
import { injectGlobal } from 'styled-components';
import Styles from 'antd/lib/button/style/index.css';

injectGlobal`${Styles}`;
export default Button;

Using classnames to style descendants work fine in Styled Components/next in regular use cases, like this:

// index.js
const Wrapper = styled.div`
.potato {
background: brown;
height: 100px;
width: 100px;
}
`
export default props => <Wrapper><div className={'potato'}/></Wrapper>

It seems the only broken case is when I'm importing the css.

Steps to Reproduce (for bugs)

I setup a small example repo based on the with-styled-components example in next's repo:

https://github.com/brandonmp/styled-components-next-scope

Context

I'm trying to port over a project from Gatsby, and I'd rather not pollute global with all of antd's styles.

Your Environment

Tech
Version

next
latest

node
8.6.0

OS
Win10 via WSL Bash

browser
Chrome 62

etc
My favorite food is pickles

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

Is there any way to override Cache-Control header of /_next/webpack/chunks/:name' requests https://github.com/zeit/next.js/blob/canary/server/index.js#L153 . I want to add s-max-age to be more aggressively.
Issue 1:
Issue Type:

Bug report

Ansible Version:

ansible 1.7.0

Environment:

OSX Mavericks 10.9.4

Summary:

When running against an AWS RDS Postgresql instance, the postgres_user module can't set up new users.

Steps To Reproduce:

Run this task:

- name: Ensure user has access to the database
postgresql_user: login_host={{ db_host }}
port={{ db_port }}
login_user={{ db_admin_user }}
login_password={{ db_admin_password }}
db={{ db_name }}
name={{ db_user }}
password={{ db_password }}
priv=ALL
state=present

Expected Results:

ok: [...] => {"changed": true, "db": "database"}

Actual Results:

failed: [...] => {"failed": true, "parsed": false}
invalid output was: SUDO-SUCCESS-qwpjepgvenunnlewzwjddpnrbfjyptxo
Traceback (most recent call last):
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 1869, in <module>
main()
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 497, in main
changed = user_alter(cursor, module, user, password, role_attr_flags, encrypted, expires)
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 201, in user_alter
cursor.execute(select, {"user": user})
psycopg2.ProgrammingError: permission denied for relation pg_authid

Apparently the pg_authid relation is not available in RDS.

Possible workaround: if access denied for pg_authid, then always set the password.

Issue 2:
Issue Type:

Bug report

Ansible Version:

ansible 1.7.0

Environment:

OSX Mavericks 10.9.4

Summary:

When running against an AWS RDS Postgresql instance, the postgres_user module can't set up new users.

Steps To Reproduce:

Run this task:

- name: Ensure user has access to the database
postgresql_user: login_host={{ db_host }}
port={{ db_port }}
login_user={{ db_admin_user }}
login_password={{ db_admin_password }}
db={{ db_name }}
name={{ db_user }}
password={{ db_password }}
priv=ALL
state=present

Expected Results:

ok: [...] => {"changed": true, "db": "database"}

Actual Results:

failed: [...] => {"failed": true, "parsed": false}
invalid output was: SUDO-SUCCESS-qwpjepgvenunnlewzwjddpnrbfjyptxo
Traceback (most recent call last):
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 1869, in <module>
main()
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 497, in main
changed = user_alter(cursor, module, user, password, role_attr_flags, encrypted, expires)
File "/home/ubuntu/.ansible/tmp/ansible-tmp-1407775799.05-32923950289495/postgresql_user", line 201, in user_alter
cursor.execute(select, {"user": user})
psycopg2.ProgrammingError: permission denied for relation pg_authid

Apparently the pg_authid relation is not available in RDS.

Possible workaround: if access denied for pg_authid, then always set the password.
Issue 1:
The ancre link in nav does not work on Firefox and IE8-9-10. Ok on Chrome.

You can try directly on documentation pages.

Issue 2:
I am using FireFox 22.0 and Chrome 27.0.1453.110.

For example, in this page, http://twitter.github.io/bootstrap/getting-started/

If I hit "License FAQs" on the sidebar in Chrome, the page will directly scroll to the corresponding section for me, just like in the previous version of Bootstrap.

However if I do this in FireFox, the click on the menu has no effect and the page won't scroll to the "License FAQs" section.

Is this an issue of the documentation page only or the library itself?
Issue 1:
Hi,

There is a strange "if" in the RedirectResponse class.

https://github.com/symfony/http-foundation/blob/master/RedirectResponse.php#L45

if (301 == $status && !array_key_exists('cache-control', $headers)) { $this->headers->remove('cache-control'); }

The "not" array_key_exists" seems wrong, because why try to remove the header if the header is not present...

Am i missing something ?

Issue 2:
Hello, i just upgraded from Symfony 2.5 to Symfony 2.7 and i'm having this issue. On:

$tags = new ArrayCollection(
array_unique(array_merge($interests->toArray(), $skills->toArray()))
);

i get the error Error: Nesting level too deep - recursive dependency? every time i call the array_unique function for removing duplicates out of an array of objects.

I changed the xdebug.max_nesting_level from 100 to 2000, restarted the services and also disabled xdebug but i still get the same error.

Any idea?

Thanks
Issue 1:
I've come across an issue where it appeared that my EventEmitter wasn't triggering it's observers. The apparent symptom appeared to be somehow losing my observer of an EventEmitter.

As it turns out when an event is emitted from a synchronous EventEmitter, if any of the observers encounter an uncaught error, the error is silently swallowed and the observer appears to be unsubscribed.

To be clear, by "synchronous EventEmitter" I mean creating an EventEmitter like so:

@Output() toggleSync: EventEmitter<any> = new EventEmitter(false);

This behaviour is easily reproduced with this plunkr

I searched through the issues and couldn't see this mentioned so hopefully it's not a duplicate.

EDIT: using beta 0 version

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

If I extend a component (with some DI in the constructor) from another component that does not declares the exact same constructor, the DI on the latter component does not seem to work.

Have a look at the reproduction case.

Minimal reproduction of the problem with instructions

Service param is null here:

https://plnkr.co/edit/cxREj4x39ZsN8h7BySqe
Issue 1:
I know that this has been reported before, I've read all issues about this bug, but all of them are for 2.x and previous versions, and the newest bug reported is about 1 year's old.

However this bug is still present on bootstrap 3.0.1. I've made a test case to reproduce it, and a possible fix to it.

The issue

Here you can see the issue (screenshot)

https://www.dropbox.com/s/bns0wdl6cmzgmzr/Screenshot%20at%202013-11-04%2010%3A55%3A36.png

Here you can see the real test case:

https://dl.dropboxusercontent.com/u/1715488/bootstrap/btn-height-test.html

Bug fix proposal

I've removed vertical paddings. Instead, I've fixed button's height and line-height. It's been done inside of button-size(...) mixins, this is the result:

// Button sizes
// -------------------------
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
@line-height-computed: floor(@font-size * @line-height); // ~20px
// forzamos el height
@btn-height: @line-height-computed + 2 * @padding-vertical + 2;

padding: 0 @padding-horizontal;
font-size: @font-size;
line-height: @btn-height - 2;
height: @btn-height;
border-radius: @border-radius;
}

Screenshot:

https://www.dropbox.com/s/i8l0kj85xju315q/Screenshot%20at%202013-11-04%2011%3A07%3A09.png

Test case:

https://dl.dropboxusercontent.com/u/1715488/bootstrap/btn-height-fix.html

Notes

I've only tested in chrome, firefox and opera for linux, and only in desktops, but I've been using this method of "zero vertical paddings" for buttons since a few years with excelent results.

In fact I've been using bootstrap since 2.0 and I've always applied a patch to fix this (using this method) without any regressions or other issues, and I know that works ok in windows browsers, ios, and android browsers, but as I said I didn't make any serious test with them.

Issue 2:
<div class="col-lg-6">
<div class="input-group">
<input type="text" class="form-control input-large">
<span class="input-group-btn">
<button class="btn btn-default btn-large" type="button">Go!</button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->

Height of .input-large and .btn-large is different by 1px in Chrome. Giving height: 56px to .btn-large helps.
Issue 1:
Choose one: is this a bug report or feature request?

bug

Input Code

class X {
static a = 1;
static b = this.a;
}

console.log(X.b);

Babel/Babylon Configuration (.babelrc, package.json, cli command)

stage3,stage2

Expected Behavior

1

Current Behavior

undefined

Your Environment

REPL

Issue 2:
When using babel-plugin-transform-class-properties, it turns out that extending the https://babeljs.io/docs/plugins/transform-class-properties/ example to include a "boundStaticFunction" fails:

class Bork {
static staticProperty = "babeliscool";
static staticFunction = function() {
return Bork.staticProperty;
}
static boundStaticFunction = () => {
return this.staticProperty
}
}

//Static function exists on the class.
console.log(Bork.staticFunction()); // > "babelIsCool"

// BUG: static functions cannot be bound to class!
let fn = Bork.boundStaticFunction
console.log(fn())

Expected behavior

Calling (Bork.boundStaticFunction)() should behave the same way as Bork.boundStaticFunction().

Babel would emit code either like

Bork.boundStaticFunction = function () {
return this.staticProperty;
}.bind(Bork);

or:

Bork.boundStaticFunction = function () {
return Bork.staticProperty;
}

Actual results

Calling (Bork.boundStaticFunction)() results in an error:

Cannot read property 'staticProperty' of undefined

Babel has output this code (literally):

Bork.boundStaticFunction = function () {
return undefined.staticProperty;
};

Related behavior

Binding an instance property in a similar fashion does work as desired.
Issue 1:
The following example worked fine in 🦖 Deno 1.18, but fails in Deno 1.19

// example.ts
import Yargs from 'https://deno.land/x/yargs@v17.3.0-deno/deno.ts';
Yargs();

Compile:

deno compile -A --unstable example.ts

then run ./example

This fails with:

error: Module not found

This worked with Deno 1.18 and earlier.

Issue 2:
This was discussed over in denoland/deno_std#153 but was locked during the move.

While we still have concerns around the HTTP server, we should also consider supporting HTTP/2, HTTP/3 and QUIC.
Issue 1:
The project scope identifies that Deno aspires to be a "secure" runtime in the readme.

Lower on the page, an example is shown of loading code directly from a URL.

deno run https://deno.land/std/examples/welcome.ts

loading resources only using a URL is notoriously insecure. Best practice for loading code using a URL is to use sub-resource integrity. This is because loading a URL could produce any code that will be run on your computer. And furthermore, there is probably no logging by default in Deno, so a malicious actor will take over your machine while also maintaining plausible deniability, which is 🆖.

By default, please recommend that usage on the command line will require SRI. For example, that command could be.

deno run https://deno.land/std/examples/welcome.ts 7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31

Furthermore, running Deno in this mode should reject any recursive includes from that above URL unless they do similarly include some SRI hash of what they are expecting to include.

If Deno does not wish to handle the case that a URL hosting code could change (i.e. you don't want SRI), then please update the README to say above that example:

WARNING: This example will run whatever code is at that URL in your Deno runtime. And because URLs can host any content at any time, changing without warning, even automatically based on your user agent, this approach is insecure and you should not trust it.

Issue 2:
The project scope identifies that Deno aspires to be a "secure" runtime in the readme.

Immediately following, the first recommended install option is to use a shell code installer.

curl -fsSL https://deno.land/x/install/install.sh | sh

shell code installers are notoriously insecure.

In keeping with the "secure" project philosophy, please move this insecure installation option to below other options (indicating less preference) and add immediately above a note "shell code installers are less secure and this installation method is recommend only for continuous integration servers not having a concern for security".
Issue 1:
I was going to write a PR for FOSAdvancedEncoder for the new encoders (bcrypt, pbkdf2) and I noticed it's pretty much a duplicate of the core EncoderFactory. it seems a waste to maintain a separate bundle for this simple functionality.

My suggestion is to add this small feature to the core EncoderFactory.

Does anybody else think the same?

I need an idea how to build the new config so it won't have BC issues

Use case: different encoder (or bcrypt cost) for user/admin

Issue 2:
Take for instance you have a mod_rewrite in apache to redirect all requests through to index.php (common practice for "pretty" urls)

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

If you request for a url like: http://my-site.com/fruit/strawberry/index.php/blah the base url comes back as blah. I would expect the base to be / and segments to be fruit/strawberry/index.php/blah due to the mod_rewrite.

The issue is caused by the basename in the very top lines in prepareBaseUrl as below:

src/Symfony/Component/HttpFoundation/Request.php

/**
* Prepares the base URL.
*
* @return string
*/
protected function prepareBaseUrl()
{
$filename = basename($this->server->get('SCRIPT_FILENAME'));
if (basename($this->server->get('SCRIPT_NAME')) === $filename) {
$baseUrl = $this->server->get('SCRIPT_NAME');

My request looks as below:

REQUEST_URI = /fruit/test/index.php/blah
SCRIPT_FILENAME = E:/Sites/cc-new/public_html/index.php
SCRIPT_NAME = /index.php

Essentially what it's doing is getting the SCRIPT_FILENAME, doing a basename which turns it into simply index.php.

Then SCRIPT_NAME goes through basename too so it end's up doing index.php == index.php which is true then set's the base as the SCRIPT_NAME i.e. simply index.php

This is incorrect, it should set the base to / only. Something weird is going on with the use of basename....?
Issue 1:
I have ta simple ES6 module export and VS Code is seeing it as an error:

Parsing error: Illegal import declaration (undefined)

Yet that is valid, and works just fine.

Below is the entirety of the module:

export class ErrorEvent {
constructor(structuredError) {
this.structuredError = structuredError;
}
}

The "export" keyword get's a red squiggly line and an error is added to VS Error error list for it.

Can this please be fixed?

Issue 2:
From @nwehrle on February 9, 2016 21:17

I use eslint to lint my jsx files. Before I switched to salsa, the linting inside the editor worked fine. After switching to salsa the linting fails inside the editor.

Salsa is enabled:

Linting from the shell still works without any errors or warnings.

I expect vscode to not show any linting errors.

System:

OSX 10.11.2

vscode 0.10.8

db71ac615ddf9f33b133ff2536f5d33a77d4774e

jsconfig.json:

{
"compilerOptions": {
"target": "ES6",
"module": "system",
"experimentalDecorators": true
},

"exclude": [
"node_modules"
]
}

User settings:

{
"javascript.validate.enable": false,
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true,
// Migrated from previous "File | Auto Save" setting:
"files.autoSave": "onFocusChange"
}

Partial eslintrc:

"rules": {
"func-names": 0,
"no-unused-expressions": 0,
"id-length": 0,
"no-multi-spaces": 0,
"no-mixed-spaces-and-tabs": 2,

"no-unused-vars": [1, {"vars": "all", "args": "none"}],
"react/jsx-uses-react": 1,
"react/prop-types": 0,
"no-console": 0
},
"plugins": [
"react"
]

Copied from original issue: microsoft/vscode#2866
Issue 1:
Environment

Windows build number: [run "ver" at a command prompt]
PowerToys version: 0.19
PowerToy module for which you are reporting the bug (if applicable):

Steps to reproduce

press win + space

Expected behavior

show search

Actual behavior

nothing happend

Screenshots

Issue 2:
Environment

Windows build number: [run "ver" at a command prompt]
PowerToys version: 0.19
PowerToy module for which you are reporting the bug (if applicable): PT Run

Steps to reproduce

Remap key from alt-space to win-space

execute shortcut multiple times

Expected behavior

don't have start menu false positive executions

Actual behavior

Lots of start menu executions
Issue 1:
This bug is probably reported or even fixed already.

import torch, numpy as np
x = np.random.randint(0, 1, [20]).astype('bool')
x_ft = torch.FloatTensor(x) # corrupts data
assert all(x_ft.numpy() == x) # fails

Here's what x_ft looks like:

>>> x_ft

3.9404e-23
4.5744e-41
3.9404e-23
4.5744e-41
-7.6586e+00
...

My torch versions

>>> torch.__version__
'0.3.0.post4'
>>> np.__version__
'1.14.0'

OS: ubuntu 16

PyTorch installation: linux, conda, py3.5, for cpu

No cuda/GPU available

cmake version 3.5.1

Issue 2:
>>> torch.Tensor(numpy.ndarray(shape=(2,2),dtype="int8"))

0.6229 0.0000
0.0000 0.0000
[torch.FloatTensor of size 2x2]

>>> torch.from_numpy(numpy.ndarray(shape=(2,2),dtype="int8"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: can't convert a given np.ndarray to a tensor - it has an invalid type. The only supported types are: double, float, int64, int32, and uint8.

According to @colesbury, however, it does look like ndarray passed into Tensor is doing the correct codepath.

CC @aszlam
Issue 1:
When I was developing #16237, I noticed that the API for checking dtype is quite messy. We appear to have duplicate functionality, and the interface is not clear as to what we should accept.

I propose that for all such dtype checking functions, we should accept ANY array-like and ANY dtype OR type object and cast any list-like object to np.array.

Also, I added several TODO in that same file that I was hoping to get some feedback on. They stood out to me because they seemed either non-intuitive OR symptomatic of the API redundancy that I was referring to.

is_datetimetz seems like a duplicate of is_datetime64tz_dtype. Do we need it?

is_period seems like a duplicate of is_period_arraylike. Do we need it?

Should Period be an instance of PeriodDtype?

Should Interval be an instance of IntervalDtype?

Issue 2:
[in]

for cl in train.columns:
print cl, type(train.loc[0, cl])
print cl, type(train[cl][0])
break

[out]

record_ID <type 'numpy.float64'>
record_ID <type 'numpy.int64'>

Though I can solve it in many cases with train[cl].dtype, which gives the correct output:

[out]

record_ID int64

But if we work with string data types the output will be object instead of str as data type.

Something shortstop by me or what happens?

Thank you.
Issue 1:
The navbar-fixed-top class has a z-index of 1030 while the popover class has a z-index of 1010. As a result, popover that should appear above the fixed navbar appear underneath them.

http://jsfiddle.net/YF3yB/

Issue 2:
See image below

http://imageshack.us/photo/my-images/831/84855434.png/

Expected: should be on top of navbar
Issue 1:
There's an error when there is a Tabs component with no Tab children

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

Expected Behavior

It should not error.

Current Behavior

It errors

Steps to Reproduce (for bugs)

<Tabs
value={this.props.selectedTab}
onChange={this._handleTabChange}
scrollable
scrollButtons="auto"
>
</Tabs>

Context

Useful for dynamic tabs where you don't really need if there will be 10 tabs or none.

Your Environment

Tech
Version

Material-UI
latest next beta

React
15

browser
Chrome 60

etc

Issue 2:
For Apps focused on productivity that require balance across the screen, it is recommanded to use the Navigation drawer clipped under the app bar (https://material.io/guidelines/patterns/navigation-drawer.html#navigation-drawer-behavior)

if it can be build with the current components, it would be great to add an example

I have searched the issues of this repository and believe that this is not a duplicate.
Issue 1:
📝 Provide a description of the new feature

When resizing a custom fancyzones layout, display the dimensions of that zone (as a tool tip) as you're dragging the size (e.g. 2560x1440); and/or allow input of the vertical and horizontal size.

What is the expected behavior of the proposed feature? What is the scenario this would be used?

Allow the user to set specific size zones so that windows that snap in that zone can match common resolutions (e.g. 1920x1080, 2560x1440, etc..)

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
Summary of the new feature/enhancement

Sizing of custom zones in editor by dragging mouse is a little bit coarse (hit and miss) in terms of getting close to edges of screen symmetrically and allowing window edges of multiple zones to line up neatly. Some possible solutions are suggested for consideration.

Proposed technical implementation details (optional)

Perhaps have an option for the editor to snap to a grid of user specified n pixels.

Perhaps have optional ability to input window dimension and position directly in both absolute terms (n x n pixels) and in terms of percentage of screen width and height.