WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
System info

Playwright Version: v1.32.3

Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.] All

Browser: [All, Chromium, Firefox, WebKit] All

Source code

I provided exact source code that allows reproducing the issue locally.

This is applicable in any project. Here's the specific line that I'm discussing in this project though: https://github.com/epicweb-dev/rocket-rental/blob/373d10b51186fe9bfdfe6ff3d98ec252e17d9e89/tests/e2e/onboarding.test.ts#L70

It's for this UI:

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`
<div class="flex gap-2">
<button
type="button"
role="checkbox"
aria-checked="false"
aria-required="true"
data-state="unchecked"
value="on"
id="field-agreeToTermsOfServiceAndPrivacyPolicy"
></button>
<input
type="checkbox"
aria-hidden="true"
name="agreeToTermsOfServiceAndPrivacyPolicy"
required=""
tabindex="-1"
value="on"
style="
transform: translateX(-100%);
position: absolute;
pointer-events: none;
opacity: 0;
margin: 0px;
width: 23.8594px;
height: 24px;
"
/>
<label
for="field-agreeToTermsOfServiceAndPrivacyPolicy"
class="text-body-xs text-night-200"
>
Do you agree to our Terms of Service and Privacy Policy?
</label>
</div>
`);

await expect(page.getByRole('checkbox', { name: /terms/i })).toBeVisible();
});

Steps

Run the test

Notice it fails to find the terms checkbox button

Expected

I expect the button to be found.

Actual

The button is not found.

Issue 2:
I got this label and button. I do expect myself to target this combobox using the locator below but for some reason playwright can't find it. When I open the inspect window and record myself clicking on the element it gives me a locator like so:

locator("#floating-ui-2335").

I can even see the accesibility pane in Chrome that the name of the element is ABC and that it comes from the associcated label.

<label for="floating-ui-2335">ABC</label>
<button
id="floating-ui-2335"
type="button"
aria-expanded="false"
aria-haspopup="listbox"
aria-controls="floating-ui-2340"
role="combobox"
aria-invalid="false"
value=""
name="organizationalUnits"
>...</button>

// test
await page.locator('role=combobox[name="ABC"]').click();

References:

dequelabs/axe-core#3353

w3c/html-aria#396
Issue 1:
Say I have an interface

interface Applicative<T> {}

Now I want to define a function f that:

takes a Function and takes a type U extending an Applicative wrapping any

returns an U wrapping Function

My naive attempts were

function f<U extends Applicative>(fn: Function, a: U<any>): U<Function>

and

function f<T, U<T> extends Applicative<T>>(fn: Function, a: U<any>): U<Function>

but none is valid

Can we have a Generic extend a type with a generic ?

Issue 2:
This is a proposal for allowing generics as type parameters. It's currently possible to write specific examples of monads, but in order to write the interface that all monads satisfy, I propose writing

interface Monad<T<~>> {
map<A, B>(f: (a: A) => B): T<A> => T<B>;
lift<A>(a: A): T<A>;
join<A>(tta: T<T<A>>): T<A>;
}

Similarly, it's possible to write specific examples of cartesian functors, but in order to write the interface that all cartesian functors satisfy, I propose writing

interface Cartesian<T<~>> {
all<A>(a: Array<T<A>>): T<Array<A>>;
}

Parametric type parameters can take any number of arguments:

interface Foo<T<~,~>> {
bar<A, B>(f: (a: A) => B): T<A, B>;
}

That is, when a type parameter is followed by a tilde and a natural arity, the type parameter should be allowed to be used as a generic type with the given arity in the rest of the declaration.

Just as is the case now, when implementing such an interface, the generic type parameters should be filled in:

class ArrayMonad<A> implements Monad<Array> {
map<A, B>(f: (a:A) => B): Array<A> => Array<B> {
return (arr: Array<A>) => arr.map(f);
}
lift<A>(a: A): Array<A> { return [a]; }
join<A>(tta: Array<Array<A>>): Array<A> {
return tta.reduce((prev, cur) => prev.concat(cur));
}
}

In addition to directly allowing compositions of generic types in the arguments, I propose that typedefs also support defining generics in this way (see issue 308):

typedef Maybe<Array<~>> Composite<~> ;
class Foo implements Monad<Composite<~>> { ... }

The arities of the definition and the alias must match for the typedef to be valid.
Issue 1:
I'm submitting a ... (check one with "x")

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

Current behavior

After upgrading to 2.4.8, route resolution is starting at the same time as APP_INITIALIZER. I understand that bootstrap should not be completed before the route resolution, but shouldn't the APP_INITIALIZER finish first before starting the route resolution? Our application depends on APP_INITIALIZER provider to load settings first. These settings are used in the the route resolves. After 2.4.8, this is broken.

Expected behavior

APP_INITIALIZER Promise should be resolved before starting the route resolutions.

Minimal reproduction of the problem with instructions

export const ConfigServiceProvider: FactoryProvider = {

provide: APP_INITIALIZER,

useFactory: (config: ConfigService) => () => config.load(),

deps: [ConfigService],

multi: true

}

@Injectable()

export class ConfigService {

public load(): Promise {

return new Promise((resolve: (value?: any | PromiseLike) => void, reject) => {

this.http.get("public/appsettings.json").map(res => res.json())

.subscribe(data => {

//populate configuration class that stores language url.

resolve(true);

});

}

}

}

@Injectable()

export class LanguageServiceResolve implements Resolve<{ [key: string]: string }> {

resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<{ [key: string]: string }> | { [key: string]: string } {

return this.http.get("(url set above)").toPromise().then((x: { [key: string]: string }) => {

//etc...

}

//breaks above because url has not been set yet.

}

}

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

Be able to load app settings that can be used in route resolution.

Please tell us about your environment:

Webpack

Angular version: 2.4.8

Browser: [all ]

Language: [TypeScript 2.0.10| ES5]

Node (for AoT issues): node --version =

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

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

Current behavior

After update angular my application shows the loader and that's it, nothing happens.

On version 2.4.7 the site works just fine.

I have no errors on console. I have no clue what's causing this issue except the version change

Expected behavior

The site should work just like it 2.4.7

Minimal reproduction of the problem with instructions

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

Updating angular from 2.4.7 to 2.4.8

Please tell us about your environment:

Windows 10,

Webstorm 2016.3.3

Angular version: 2.0.8

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 ]

Chrome 56.0.2924.87 (Only one that was tested)

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

TypeScript 2.1.6
Issue 1:
When including the generated gomobile iOS framework into another iOS framework, calling gomobile generated method from the wrapper framework causes linker failure with message "ld: illegal text-relocation to 'type..eq.[0]string'"

Issue 2:
by momchil.dev:

What does 'go version' print?

go version go1.4rc2 darwin/amd64

What happened?

I am compiling a shared library for android/arm. I then use this library from a
Java-based android application.

When I run the application on a Nexus 5 device with Lollipop, I get a
"libexample.so has text relocations. This is wasting memory and prevents security
hardening. Please fix."

If I run the same application on an old Kitkat Asus Transformer Pad TF301T, I don't get
any errors at all and everything works as expected.

Please provide any additional information below.

I don't have much experience in developing native libraries but the fact that it works
on one device and not the other seems strange.

You can find the code for the library here:
https://github.com/momchil-atanasov/go-android-lib
You can find the code for the android app here:
https://github.com/momchil-atanasov/go-android-app

Hope this helps! Can't wait for the official release of 1.4.
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.2.0

What operating system are you using?

Windows

Operating System Version

windows 10 version 1809

What arch are you using?

x64

Last Known Working Electron version

none

Expected Behavior

window.open a pdf url, call window.print() and select the option of print to pdf, then save pdf to local disk and window can work normally instead of blocked.

Actual Behavior

the pdf can save to local disk normally, but current pdf window blocked, other tabs work normally.

Testcase Gist URL

No response

Additional Information

No response

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

All versions in electron-fiddle

What operating system are you using?

Ubuntu

Operating System Version

21.10

What arch are you using?

x64

Last Known Working Electron version

I think it worked in version 11, but it is not in fiddle anymore...

Expected Behavior

Electron should not be a crashing simulator.

Actual Behavior

Electron is a crashing simulator.

Testcase Gist URL

https://gist.github.com/63fa86785e3638ae1a7c673c4bed7c7d

Additional Information

Does not crash if baseURLForDataURL is not set.

baseURLForDataURL: `file://${__dirname}/`
Issue 1:
Challenge Waypoint: Use appendTo to Move Elements with jQuery has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36.

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

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("target2").appendTo("#right-well");
});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
A bug seems to be present: Chrome 46.0.2490.86 m; Windows 8.1 with respect to appendTo() function.

$("#target2").appendTo($("#right-well")); does work, but not the $("#target2").appendTo("#right-well");, the latter being suggested in the tutorial.

Hard reload and cache clearing did not seem to solve the problem.
Issue 1:
Just noticed that the CSS being delivered for the documentation is nothing even close to the 3.0.0 release offered from the Customizer.

Run a diff on them both. You'll notice things are out of order. Maybe some needed changes, but this is causing a few issues.

Modal overlays (.modal-backdrop) are set to 1.0 for opacity in my code, yet in the documentation, it's set to 0.5 (computed) based upon how that class and .fade.in is ordered.

Not exactly sure how to create an issue for this as this touches on multiple things.

Issue 2:
Hi!

I just generated a customized version and the modal background is totally black (I also generated a version without any change to be sure it wasn't me that caused that):

The download link on the home page does have transparency:
Issue 1:
[980/980] LINK atom
FAILED: /usr/bin/clang++ -rpath \$ORIGIN -rdynamic -pthread -Wl,--no-keep-memory -o atom -Wl,--start-group obj/atom/app/atom.atom_main.o obj/libatom_lib.a obj/vendor/brightray/libbrightray.a obj/vendor/node/libnode_lib.a obj/vendor/node/deps/openssl/libopenssl.a obj/vendor/node/deps/zlib/libchrome_zlib.a obj/vendor/node/deps/http_parser/libhttp_parser.a obj/vendor/node/deps/cares/libcares.a obj/vendor/node/deps/uv/libuv.a obj/vendor/breakpad/libbreakpad_client.a -Wl,--end-group /home/corne/atom-shell/vendor/brightray/vendor/download/libchromiumcontent/Release/libchromiumcontent.so /home/corne/atom-shell/vendor/brightray/vendor/download/libchromiumcontent/Release/libchromiumviews.a -lpthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfontconfig -lfreetype -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -ldl -lrt
/usr/bin/ld: /home/corne/atom-shell/vendor/brightray/vendor/download/libchromiumcontent/Release/libchromiumcontent.so: undefined reference to symbol 'XConvertSelection'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
ninja: Entering directory `out/Debug'

http://paste.corne.info/raw/qana

I've tried compiling it on Debian Jessie & Ubuntu 14.04 (clean install) and get the error on both systems.

Issue 2:
We should provide a script to build libchromiumcontent and atom-shell from source code, and make use of OpenSUSE Build Service to compile and provide Linux packages.
Issue 1:
Today I had to create a command to export all translation messages to file in JSON format. The easiest way would be to get the catalogues from the translator service. But that was not possible as there is no getter.

I had to work around this by doing:

$translator = $this->getContainer()->get('translator');
/* @var $translator \Symfony\Bundle\FrameworkBundle\Translation\Translator */
foreach ($locales as $locale) {
$translator->setLocale($locale);
$translator->trans(''); // this is needed to load the translation catalogue
}

// workaround to get the catalogues
$reflProp = new \ReflectionProperty(get_class($translator), 'catalogues');
$reflProp->setAccessible(true);
$catalogues = $reflProp->getValue($translator);

Doing this with reflection is of course very hacky, but it is the easiest way to get all translations.

It would be great if the translator service could provide a getCatalogue($locale) method, returning the message catalogue with all available messages.

Thanks in advance.

Issue 2:
When using a submit button (nearly all the forms on the internet) and you use the getErrorsAsString() method on your form you will get:

Error: Call to undefined method Symfony\Component\Form\SubmitButton::getErrorsAsString
Issue 1:
We use request to run regression tests on restful services.

I upgraded to 2.0.1 now I get a Keyword error , wherever cookies are passed as keyword arguments.

Simple stacktrace:

self.result = requests.get(url, params=params, headers={'content-type':'application/json'}, cookies=self.cookies)

KeyError("name=Cookie(version=0, name='qa_session_id', value='e32393932842fba755d57f359ac1b0ae', port=None, port_specified=False, domain='.workshare.com', domain_specified=True, domain_initial_dot=True, path='/', path_specified=True, secure=True, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), domain=None, path=None",)

Error in C:\Users\automation\FeatureTest\libraries\ApiAutomation.py on line 177

Error in C:\Users\automation\FeatureTest\libraries\RequestsSupport.py on line 44

Error in C:\PYTHON27\lib\site-packages\requests\api.py on line 55

Error in C:\PYTHON27\lib\site-packages\requests\api.py on line 44

Error in C:\PYTHON27\lib\site-packages\requests\sessions.py on line 327

Error in C:\PYTHON27\lib\site-packages\requests\cookies.py on line 410

Error in C:\PYTHON27\lib\site-packages\requests\cookies.py on line 256

Error in C:\PYTHON27\lib\site-packages\requests\cookies.py on line 311

Issue 2:
Could not find an issue raised for this, not sure if this was an expected change either. This is reproducible on master.

Existing code fails on update to requests-2.0.1. The cause seems to be triggered by the change at kennethreitz@012f033#diff-28e67177469c0d36b068d68d9f6043bfR326

The parameter cookies expects either Dict or CookieJar. Treating MozillaCookieJar as a dict triggers the error in this instance.

The following code highlights the issue:

import sys
import requests
from os.path import expanduser

if sys.version_info.major >= 3:
from http.cookiejar import MozillaCookieJar
else:
from cookielib import MozillaCookieJar

URL = 'https://bugzilla.redhat.com'
COOKIE_FILE = expanduser('~/.bugzillacookies')

cookiejar = MozillaCookieJar(COOKIE_FILE)
cookiejar.load()

requests.get(URL, cookies=cookiejar)

The following AttributeError is thrown:

Traceback (most recent call last):
File "rtest.py", line 16, in <module>
requests.get(URL, cookies=cookiejar)
File "/tmp/rtestenv/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/tmp/rtestenv/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/tmp/rtestenv/lib/python2.7/site-packages/requests/sessions.py", line 327, in request
self.cookies = cookiejar_from_dict(cookies, cookiejar=self.cookies, overwrite=False)
File "/tmp/rtestenv/lib/python2.7/site-packages/requests/cookies.py", line 410, in cookiejar_from_dict
cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))
AttributeError: MozillaCookieJar instance has no attribute '__getitem__'
Issue 1:
Babel behaves weirdly when there are parameters containing parentheses:

@doCoolThings( (banana) )
class What {

render() {
return blah;
}
}

...Compiles to:

// ...

var What = (function () {
function What() { /* ... */ }

What.prototype.render = function render() {
return blah;
};

// ???
return What;
})();

Note that there is no invocation of the decorator function inserted into the final code.

Removing the parentheses around the banana parameter in the decorator, however, fixes this:

@doCoolThings( banana )
class What {

render() {
return blah;
}
}

...Compiles to:

// ...

var What = (function () {
function What() { /* ... */ }

What.prototype.render = function render() {
return blah;
};

// Hooray, call of decorator!
var _What = What;
What = doCoolThings(banana)(What) || What;
return What;
})();

If using an arrow function (like (banana) => 55), the effect is pretty much the same when the parentheses are present vs. non-present.

Issue 2:
Steps to reproduce :

Declare an import import xxx from 'xxx'

Declare an ES6 class

Declare a method with an argument shadowing the import and having a default value : foo(xxx = 'default') { ... }

Declare a second method using the import

Input Code

import bar from './bar'

class Foo {
foo(bar = 'Default bar') {}

logImportedBar() {
console.log(bar)
}
}

const foo = new Foo()
foo.logImportedBar()

Also see my repo with a simple example reproducing the issue.

Babel Configuration

.babelrc :

{
"presets": ["env"]
}

Expected Behavior

The second method should access the imported value correctly as it is not shadowed in its scope.

Current Behavior

The second method yields a ReferenceError on the imported value :

ReferenceError: bar is not defined
at Foo.logImportedBar

Possible Solution

In the generated code, the second method should contain console.log(_bar2.default) instead of console.log(bar).

Your Environment

software
version(s)

Babel
v6.24.1

node
v8.1.3

yarn
v0.27.5

Operating System
Linux 4.11.9-1-ARCH x86_64
Issue 1:
Right now read_gbq runs a query and retrieves the results into a data_frame. If one wants to also save it into a dataset table, one then has to call to_gbq which would stream the results back.

The bq command line tool has an option to pass a destination dataset table immediately on query to store the results.

cat queries/sample.sql | bq query --format csv
--destination_table=collection.table_name > output.csv

Ideally read_gbq would have an additional option like destination_table that could store the results immediately.

Issue 2:
gbq.py currently returns an error if the result of a query is what Google considers to be 'Large'. The google api allows jobs to be sent with a flag to allow large results. It would be very beneficial to provide this as an option in the BigQuery connector.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Using the code from the example for styled-components should not remove the support of SSR of styled-jsx.

Current Behavior

When using the code from the example SSR of styled-jsx stop working.

Steps to Reproduce (for bugs)

Use _document.js from the example.

Write a page that uses styled-jsx styles.

Fetch the page source from NextJS server - there is no style tags from styled-jsx.

Context

Application that uses both styled-components and styled-jsx (weird use case, but we did this because styled-components didn't work for us in one situation...).

Root cause

flush() method from styled-jsx/server is not called in getInitialProps method in _document.js

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

Been trying to figure out if this is possible. I following try this repo setup >> https://github.com/ooade/next-react-toolbox. Seem okay until i try the next export then I run into following error >>>

(function (exports, require, module, __filename, __dirname) { :root {
^
SyntaxError: Unexpected token :
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (../../../../../../index.js:20:14)```

Tried `[next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css)`

## Your Environment
|---------|---------|
| next | 5.1 |
| node | v8.10.0 |

any helper is helpful.