WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I recently tried to define special presets in .babelrc only for test environment in with-jest example.

When importing a file for testing that uses React and/or StyledJSX and that does not manually import React and/or StyledJSX, the test will fail with following error message:

SyntaxError: Unexpected token import

This is because the automatically added imports of React/StyledJSX are always es2015 style module imports.

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

Expected Behavior

A simple .babelrc that only defines a special test env should be possible.

In my opinion it should be possible to use the following .babelrc:

{
"presets": "next/babel",
"env": {
"test": {
"presets": [
"env",
"next/babel"
]
}
}
}

I played with this issue on a separate branch. Currently you could work around this issue by importing React & StyledJSX manually:

import React from 'react'
import _JSXStyle from 'styled-jsx/style'

Current Behavior

Either you define development, production and test envs in .babelrc whereas development and production or you manually import React / StyledJSX. Otherwise tests with JEST will fail.

Steps to Reproduce (for bugs)

Goto examples/with-jest

Simplify your .babelrc as proposed

Run $ npm run test

Issue 2:
Bug report

Describe the bug

It is not possible to navigate to a page after it has been disposed by the server.

To Reproduce

https://github.com/alexanderte/next-dispose-issue

Steps to reproduce the behavior, please provide code snippets or a repository:

npm run dev

Go to http://localhost:3000/a

Navigate between pages A, B, and C – which does work

Go to another tab, do something else for about a minute

See server console message that one of the pages have been disposed

Navigate between pages A, B, and C – and one of the links doesn’t work anymore

Expected behavior

Even though a page has been disposed I would expect it to be re-created and to not break navigation.

System information

OS: Windows

Browser: Chrome, Firefox

Version of Next.js: 7.01
Issue 1:
Seems like a bug, such a comparison should definitely be allowed. Pandas Version 0.20.2, Ubuntu.

In [2]: import pandas as pd

In [3]: df = pd.DataFrame({"a" : [1,2], "b" : [2,3]})

In [4]: import numpy as np

In [5]: np.all(df["a"] == "")
/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py:798: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
result = getattr(x, name)(y)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-346e9f7bf435> in <module>()
----> 1 np.all(df["a"] == "")

/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in wrapper(self, other, axis)
859
860 with np.errstate(all='ignore'):
--> 861 res = na_op(values, other)
862 if is_scalar(res):
863 raise TypeError('Could not compare %s type with Series' %

/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/core/ops.py in na_op(x, y)
798 result = getattr(x, name)(y)
799 if result is NotImplemented:
--> 800 raise TypeError("invalid type comparison")
801 except AttributeError:
802 result = op(x, y)

TypeError: invalid type comparison

Issue 2:
Test case:

def test_datetimeindex__eq__():
"""Equality comparisons should never raise an exception"""
pd.DatetimeIndex(['01-Jan-2015']) == ()

In [115]: test_datetimeindex__eq__()
Traceback (most recent call last):

File "<ipython-input-115-9b7967ca9de2>", line 1, in <module>
test_datetimeindex__eq__()

File "<ipython-input-114-7ae5783187b8>", line 3, in test_datetimeindex__eq__
pd.DatetimeIndex(['01-Jan-2015']) == ()

File "C:\dev\bin\Anaconda\lib\site-packages\pandas\tseries\index.py", line 90, in wrapper
other = _ensure_datetime64(other)

File "C:\dev\bin\Anaconda\lib\site-packages\pandas\tseries\index.py", line 112, in _ensure_datetime64
raise TypeError('%s type object %s' % (type(other), str(other)))

TypeError: <type 'tuple'> type object ()
Issue 1:
Consider the following script:

import pandas as PD

df = PD.read_csv('sample.csv',

encoding='utf8')

print(df.columns[:5])

Issue 2:
I am using Pandas version 0.12.0 on a Mac.

I noticed that when there is a BOM utf-8 file, and if the header row is in the first line, the read_csv() method will leave a leading quotation mark in the first column's name. However, if the header row is further down the file and I use the "header=" option, then the whole header row gets parsed correctly.

Here is an example code:

bing_kw = pd.read_csv('../../data/sem/Bing-Keyword_daily.csv', header=9, thousands=',', encoding='utf-8')

Parses the header correctly.

bing_kw = pd.read_csv('../../data/sem/Bing-Keyword_daily.csv', thousands=',', encoding='utf-8')

Parses the first header column name incorrectly by leaving the leading quotation mark.
Issue 1:
System:

Gentoo linux

btrfs root filesystm

4.1.15-r1 kernel

docker version: 1.9.1

docker backend: btrfs

kubernetes version: 1.1.7 commit:e4e6878

Whenever I try to start a container which includes and emptyDir volume is gives the error

Unable to mount volumes for pod "watch-cwd1k_default": operation not supported

I have been, as of yet, unable to trouble shoot why this is occuring.

I have a different kubernetes install which spans two seperate machines running centos 7.

They also have a btrfs filesystem and utilise the btrfs driver, but they don't have this error.

one of the big changes is that on the development machine, I am running the hyperkube so kubernetes is running in a container. On the cluster it is running in the base os.

Issue 2:
I'm setting up a docker-multinode k8s. I'm trying to mount a volume (in this case, a secret). Originally, I was getting this issue:

Unable to mount volumes for pod "service-registry-eccye_default": exit status 32

I was on Slack yesterday, and @cjcullen pointed out that I should be running the kubelet with the --containerized flag. I have added it and restarted the server and now I'm having this error:

Unable to mount volumes for pod "service-registry-4b682_default": fork/exec /nsenter: no such file or directory

It looks like this issue was brought up in the past (#8734), but never resolved.
Issue 1:
When you click a button of a toggle-able button group (using: data-toggle="buttons"), the radio button's parent label gets the 'active' class.

But when you load a form that has a checked radio button, the respective label does NOT get that 'active' class. The button thus appears to be unclicked although its hidden radio button is checked.

<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active"> <=== This class is not added onload
<input type="radio" name="options" id="option1" checked="checked"> Option 1

Issue 2:
Example at: http://jsbin.com/UFoRIYex/244/edit?html,js,output
Issue 1:
One of the last steps in the release is to upload documentation to numpy.org/doc via the https://github.com/numpy/doc repo. This is new to 1.18.

It would be nice if someone else would work through the steps to make sure the directions are clear, but I can do it if desired.

Issue 2:
Floating point result will appear if using numpy array of type uint64. This leads to numerically incorrect result when number is sufficiently large.

Tested on Python 3.5.2, numpy 1.13.3, on Windows 10 Build 17046.1000 (Insider Preivew)

import numpy as np
a = np.array([2], np.uint64)
print(31328281838316189 % a[0]) # which gives 0.0, not 1 as expected
print(31328281838316189 // a[0]) # which gives 1.56641409192e+16, not 15664140919158094 as expected

This problem will not occur if I replace uint64 with int64.
Issue 1:
This is the master tracking item for launcher's incorrect search results issue -

Bug#
Title
PR #

#3746
Shows description of the app

#3459
handle PWAs better in results.
#4020

#3150
Launcher. Duplicate items on the list

#3964
Unable to search files on mapped network drives

Issue 2:
I use a 43" 4k monitor and I'm excited with the prospect of managing my windows with FancyZones. I'm a developer and like to have my main windows large. These main windows vary depending upon what I'm doing, but include IDE's, browsers, office apps, etc. Other windows are typically floating and are fine.

I created a 3 column layout with the middle column wider than the left and right ones - this gives the centre as my main focus. Unfortunately I had to be careful with the ORDER I created them as otherwise I couldn't select the edges of the columns obscured by the centre column.

Creating them Left, Right, Centre meant I couldn't grab all edges. I had to create them Left, Centre, Right.

The editor should allow me to pick any zone edge regardless of z-order.

Versions

PowerToys: v0.18.1

Windows 10 Enterprise 1903, build: 18362.778
Issue 1:
Browser Info:

Using IE9 on Windows 7 SP1.

Bootstrap version:

3.0.0

Steps to reproduce:

Visit http://getbootstrap.com/examples/theme/ using IE9 and click the dropdown link in either navbar example. The drop shadow should appear, but none of the content. All of the elements below are visible.

Temp Fix:

Commenting out the #gradient > .vertical line in theme.less for navbars solves the issue.

Issue 2:
With bootstrap-theme.css included, navbar dropdowns fail to work in IE 8. (You can see a one-pixel line appear indicating they're attempting to work, however.)

Test case:

http://jodytate.github.io/bootstrap-dropdown-test/

(Neither jsfiddle or jsbin worked reliably in IE 8 so the best way to test was a standalone site.)
Issue 1:
I'm submitting a ...

[x] bug report => search github for a similar issue or PR before submitting

Current behavior

When using ngModel and trackBy in <select> the initial value is not selected when it is an object.

Expected behavior

Initial value should be selected.

Minimal reproduction of the problem with instructions

HTML:

<select [(ngModel)]="selectedItem">
<option *ngFor="let item of items; trackBy:itemIdentity" [value]="item">
{{item.name}}
</option>
</select>

TS:

private items = [{id: 0, name: 'first'}, {id: 1, name: 'second'}];
private selectedItem = {id: 1, name: 'second'};

itemIdentity(index:number, item:any):any {
return item.id;
}

Angular version: 2.4.1

Browser: Chrome

Language: TypeScript X.X

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

[ ] bug report => search github for a similar issue or PR before submitting
[x] 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

Currently NgModel does object reference comparison. This is not very flexible.

Minimal reproduction of the problem with instructions

See example with two multi selects - first one doesn't use workaround to enforce usage of same instances. The second one does.

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

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

Objects do not always come from the same source. They typically come from some REST service. And they usually don't have the same instance.

Current behavior requires workaround for something I believe to be very (if not the most) common use case. I think those should be supported by framework without requiring any workarounds.

Suggested solution

I suggest creating comparator object (or callback) which would compare two objects and return true if they are equal. NgModel would then internally use this comparator to compare objects.

Resulting code could look like this:

<select multiple class="form-control"
name="selectedCountries"
[ngComparator]="countryComparator"
[(ngModel)]="selectedCountries">
<option *ngFor="let country of countries" [ngValue]="country">
{{country.name}}
</option>
</select>

Framework could also provide some default comparators - for example one, which would compare object attributes. That one would be sufficient for quite a lot of use cases.

If there already is some standard solution, please point me to it. I tried to search and I didn't find anything. I found just this stack overflow post describing the same problem, but not providing any solution.
Issue 1:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
no

RFC?
no

Symfony version
3.2.0

I am implementing LDAP authentication using form_ldap_bind which supports the search_dn configuration option to dynamically generate the DN to use for the ldap_bind() check.

However in my case the DN's differentiate on more than the username for different users:

uid=foo,ou=External,ou=Employees,dc=example,dc=com vs. uid=bar,ou=Internal,ou=Employees,dc=example,dc=com

The LdapUserProvider in turn supports searching for users but then requires a password attribute to validate the authentication which isn't available in my case. LdapBindAuthenticationProvider also does not support a filter parameter (which might be useful here, but I am not an LDAP expert).

I wonder if we need another auth provider which is more flexible to find the relevant DN from the LDAP server before attempting to validate the password via ldap_bind() along the lines of:

ldapsearch -d 1 -w 'XXX' -H ldaps://example.com:636 -D "uid=sys,ou=Accounts,dc=example,dc=com" -b 'dc=example,dc=com' '(uid=foo)' dn

Issue 2:
In implementing LDAP authentication in 2.8, we have found that authentication is limited to only users whose DNs fit the configured dn_string pattern. Let us consider this configuration:

security:
providers:
in_memory:
memory: ~
app_users:
ldap:
service: app.ldap
base_dn: %ldap.base_dn%
search_dn: null
search_password: null
filter: (uid={username})
default_roles: ROLE_USER
firewalls:
secure:
provider: app_users
stateless: true
pattern: ^/secure
http_basic_ldap:
service: app.ldap
dn_string: "uid={username},ou=people,dc=example,dc=com"
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: ~

In this case, a user with DN "uid=foo,ou=people,dc=example,dc=com" can authenticate but one with DN "uid=foo,ou=something,ou=people,dc=example,dc=com" cannot, even though both accounts are in the configured search base.

The immediate reason is that after discovering information from LDAP with a call to ->find() in the LdapUserProvider::loadUserByUsername() method, the DN is discarded when LdapUserProvider::loadUser() creates the User instance.

Because the DN is discarded, later LdapBindAuthenticationProvider::checkAuthentication() recombines the basic username with what is configured in dn_string:

$dn = str_replace('{username}', $username, $this->dnString);

It would seem if User were extended to store the DN (perhaps by creating LdapUser with a setDn() method), it would not be necessary to set dn_string, and users in various OU's could authenticate.
Issue 1:
I would expect this syntax to work without problems

import pandas as pd
d = [{'a':'1','b':'2'},{'a':'3','b':'4'}]
pd.DataFrame.from_dict(d, orient='columns', dtype={'a':int,'b':int})

Expected Output

Expected DataFrame:

a b
0 1 2
1 3 4

with dtypes:

a int64
b int64
dtype: object

Instead, the output is

/usr/lib/python2.7/dist-packages/numpy/core/_internal.pyc in _makenames_list(adict, align)
24 for fname in fnames:
25 obj = adict[fname]
---> 26 n = len(obj)
27 if not isinstance(obj, tuple) or n not in [2, 3]:
28 raise ValueError("entry not a 2- or 3- tuple")

TypeError: object of type 'type' has no len()

Output of pd.show_versions()

# Paste the output here pd.show_versions() here
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 3.19.0-68-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8

pandas: 0.18.1

nose: 1.3.4

pip: None

setuptools: 26.1.1

Cython: 0.24.1

numpy: 1.8.2

scipy: 0.14.1

statsmodels: None

xarray: None

IPython: 5.1.0

sphinx: None

patsy: None

dateutil: 2.2

pytz: 2015.7

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: 1.4.2

openpyxl: 2.3.5

xlrd: 1.0.0

xlwt: None

xlsxwriter: None

lxml: 3.4.2

bs4: 4.3.2

html5lib: 0.999

httplib2: 0.9.2

apiclient: 1.5.3

sqlalchemy: 0.9.8

pymysql: None

psycopg2: None

jinja2: 2.8

boto: 2.34.0

pandas_datareader: None

Issue 2:
Similar to #4746, trying to resample with an index containing NaT produces rather ambiguous error messages of the form:

ValueError: Shape of passed values is (2, 5), indices imply (2, 4)

Something like cannot resample from index containing Not-a-Time (NaT) would be more helpful to users.

MWE

import pandas as pd
import numpy as np

times = pd.DatetimeIndex(['20160428T110000',
'20160428T110001',
'20160428T110002',
'20160428T110003',
'20160428T110004',
pd.NaT,
'20160428T110001',
'20160428T110002',
'20160428T110003',
'20160428T110004'])

df = pd.DataFrame(np.random.randn(10,2),
index=times,
columns=['A', 'B'])
df.resample('3s')

This example index contains duplicate values, but results are the same w/ or w/o them.

output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.15.2
nose: 1.3.4
Cython: 0.21.1
numpy: 1.8.2
scipy: 0.14.0
statsmodels: 0.6.1
IPython: 2.3.1
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.3
pytz: 2014.10
bottleneck: None
tables: 3.1.1
numexpr: 2.4
matplotlib: 1.4.2
openpyxl: None
xlrd: 0.9.3
xlwt: None
xlsxwriter: 0.6.4
lxml: 3.4.1
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
rpy2: 2.5.2
sqlalchemy: 0.9.8
pymysql: None
psycopg2: None
Issue 1:
This proposal is based on C# spec for preprocessor directives. https://msdn.microsoft.com/en-us/library/aa691099(v=vs.71).aspx

Problem

Some JS applications are used in multiple platforms. I.e. Cordova/Phonegap for mobile platforms, isomorphic applications for server-side and client-side rendered applications. And those platforms are hosting different set of API:s. We use import statements to import and use a host's API. A developer must guard one platform's API from an another.

Before ES6 modules one could guard an import using if statements:

if (IOS_PLATFORM) {
var http = require('./http-ios');
}

ES6 modules prohibits conditional imports, because the import statements must be a file-level statement. So we can't do:

if (IOS_PLATFORM) {
import {something} from './something';
}

Solution

We can solve the above problem with preprocessor directives. And here is one example of the problem above solved with a preprocessor directives:

#if IOS_PLATFORM
import {http} from './http';
#endif

Proposed directives:

define directive

#define {VARIABLE} [{VALUE}]

The define directive defines a global flag or global variable. When a value is specified it is regarded as a preprocessor variable.

flow directives

#if
#elif
#else
#endif

It must exist at least one #if and at maximum one #else directive per control-flow statement. A directive must be closed with an #endif directive. You can also nest preprocessor control-flow statements in each other. In addition to hosting TS code, a control-flow statement's body can also host #define and #error directive that defines additional behaviour for the preprocessor.

Each control-flow branch is scoped from other sibling branches. So the below example will yield an access undefined error:

#if branch1
var test = "string";
#elif branch2
test.length; // error
#endif
test.length; // no error

preprocessor operators:

==
!=
&&
||

These should work as comparison operators in TS and JS along with parens ().

error directive

#error {MESSAGE}

The error directive is to help guiding developers to set right set of flags and values. In some cases two disjoint branches aren't supposed to be joined. An example is given below:

#if IOS_PLATFORM && ANDROID_PLATFORM
#error "Cannot set two platform flags"
#endif

Or when a preprocessor variable is set to an invalid value:

#if PLATFORM == windows
#error "Cannot set platform preprocessor variable to windows."
#endif

Issue 2:
On codeplex this was a popular feature request:

https://typescript.codeplex.com/workitem/111

https://typescript.codeplex.com/workitem/1926

Personally I think preprocessor directives like #if, #elif, #else #endif with possibility to specify symbol to compiler would be very useful.

And a way to mark function (or ambient function declaration) as Conditional (something like ConditionalAattribute in C#) would be great improvement too.

I have lot's of console.log like function calls that decrease performance of my application and ability to easily remove all calls to this function would be great.
Issue 1:
Migrated issue, originally created by Anonymous

I was running into a case where I wanted to support a polymorphic one to many relation, where the different related tables have primary keys of different types. The mapper was not allowing that. I provide a patch and a bit of example code which expresses a possible fix.

Attachments: test_multi_poly.py | orm_properties.diff | sql_util.py.diff | ticket_610_1348_unified.diff

Issue 2:
Migrated issue, originally created by Anonymous

Using a bound parameter more than once in a select fails when using a paramstyle of 'qmark'.

Attached is a test case. Also attached is a hack to the get_params method to retain the full list of parameters.

The real problem is sql.ClauseParameters doesn't allow duplicated keys. Maybe it should have an append method that

get_params() would use instead of set_parameter().

--Bill

Attachments: get_params.diff | test_bindparam.py
Issue 1:
Hi,

Is there a way to know in onResourceReady if the drawable was loaded from disk/cache/network ? just like picasso does.

This is very practical to only animate new drawable when coming from network (in listview).

Thanks

Issue 2:
There should be an optionally available way of displaying an indicator on the target which tells you any feasible combination of these:

it was downloaded from the network

it was loaded from disk cache

it was loaded from memory cache

it was just put into disk cache

it was just put into memory cache

it's a thumbnail

it's a placeholder