WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When I use vscode to browse the db_bench.cc in the source code of rocksdb, I found the syntax highlighting of C++ is incorrect. Illustrated below:

screenshot of syntax highlighting in vscode,

whereas, the same content displayed in atom

The colors used in atom editor is much richer, and it will not misinterpret keywords in strings such as if or for.

Environment:

ArchLinux 4.4.5 64bit

vscode 0.10.10

atom 1.5.3

Issue 2:
VSCode Version: 0.10.11

OS Version: Windows 7

Issue 1:

In the following code (using C++ syntax highlighting), the string literal(s) are not highlighted at all.

This issue is exclusive to C++ syntax highlighting and does not occur with C syntax highlighting.

Code:

int main()
{
printf("%s\n", "a string");
}

Result

Issue 2:

In custom tmLanguage based colorizers that reference source.c from within rules that begin with certain patterns, the inlined C highlighting is incorrect (this issue also applies to rules using source.c++ but does not occur in rules using source.js).

Code

(See https://github.com/SE2Dev/VSCode-BugExample)

Result
Issue 1:
Hi,

I want to know how to stop server by code?

Does it provide a function like stop ()?

Issue 2:
This was added in #36 as a way to shutdown local applications, environ["werkzeug.server.shutdown"](). However, the advice for quite some time has been to use a production server even when running local applications; the development server is only for development.

The issue and code comments both describe the implementation as "horrible". The implementation of it is in fact pretty weird, having to touch a double underscore "really private" variable, as well as jump through hoops to work with the HTTP server loop and handle reloader processes.

Additionally, users see this and then are confused why they can only shut down their application when using the development server. Or they want to be able to do more process management such as reloads, which is definitely out of scope.

Is the shutdown function really serving a useful purpose at this point? If we remove it, maybe it can be replaced with a page in the deploy docs about running a production server in a subprocess.
Issue 1:
Hello,

Could you please answer the following questions:

Is it possible to add multiple event listeners to React component?

Is it possible to programmatically assign listener?

Ideally i'm looking for something like addEventListener

It would be great if you could suggest something.

Thank you,

Andrei

Issue 2:
Hi,

I would like to use all the available es6 transforms, the jsx transform and the es6-module-jstransform for my JavaScript code.

What I'm using is this:

var transform = require('jstransform').transform;

var visitors = Array.prototype.concat.apply([], [
require('es6-module-jstransform').visitorList,
require('jstransform/visitors/es6-arrow-function-visitors').visitorList,
require('jstransform/visitors/es6-object-concise-method-visitors.js').visitorList,
require('jstransform/visitors/es6-class-visitors').visitorList,
require('jstransform/visitors/es6-object-short-notation-visitors').visitorList,
require('jstransform/visitors/es6-rest-param-visitors').visitorList,
require('jstransform/visitors/es6-template-visitors').visitorList,
require('./transforms/react').visitorList,
require('./transforms/reactDisplayName').visitorList
]);
var es5 = transform(visitors, sourcecode);

The problem is that it's difficult to use those jsx transforms without depending on the whole react-tools package which would essentially download a lot of dependencies (another jstransform, etc.) just for those two files, which is why I copied them into a transforms directory in my source tree, but that's obviously a bad solution. Wouldn't it be better to put those jsx-transforms into a separate npm package?

Also, I found a reference to something called typechecks in /vendor/fbtransform/syntax.js, but the appropriate visitor doesn't seem to be open source. In my above example I essentially skipped all the typecheck code that's in syntax.js. Could that be a problem in the future?

Awesome library, by the way!
Issue 1:
In TypeScript playground, the "New Features" option gives this code

type NameOrNameArray = string | string[];

function createName(name: NameOrNameArray) {
if (typeof name === "string") {
return name;
}
else {
return name.join(" ");
}
}

var greetingMessage = `Greetings, ${createName(["Sam", "Smith"]) }`;
alert(greetingMessage);

If I make a type such as

interface Guid {
toLowerCase:()=>string;
}

(since I'm using TypeLite to get some C# types in my TypeScript I have a Guid type but basically treat Guids as strings so toLowerCase() is enough to discriminate for my purposes).

Anyway, if I then modify the playground code to be

interface Guid {
toLowerCase:()=>string;
}
type GuidOrGuidArray = Guid | Guid[];

function createGuid(g: GuidOrGuidArray) {
if (g instanceof Array) {
//intellisense on g. should give me array things
var x = g[0]; //This SHOULD compile
}
else {
//intellisense on g. should give me toLowerCase() as my only option
var y = g.toLowerCase(); ///This SHOULD compile
}
}

Instead I get the type of x to be any and y fails to compile. In both cases, the popup hint in the playground (and in Visual Studio) gives the indication that the type of g within each branch of the if is still the union type.

You'll note that I switched the if block around so that I'm using instanceof Array rather than typeof === "string". That's because I've tried it the other way and wasn't surprised that it didn't work since my Guid interface doesn't extend string in any way and typeof [] gives object.

Should this work? At the moment I'm doing the kludge workarounds...

var x = <Guid[]>g[0];

and

var y = (<Guid>g).toLowerCase();

It'd be 💯 if instanceof Array worked to discriminate between the array and non-array in the union type.

Issue 2:
Hi,

this is and issue I had a few times upgrading aurelia packages during the preview time, but I think may a problem even in production, because looks like that frameworks like aurelia and angular 2 are going to add .d.ts files inside the packages.

the problem is that upgrading the standard set of aurelia packages, I can have another additional package that still references an older version of some standard packages, as aurelia-templating and so on.

At runtime I don't see any problem, because module loaders can handle multiple versions of the package, but there is the problem that inside the project you have two versions of the same .d.ts file almost identical.

How can I handle this?
Issue 1:
System info

Playwright Version: 1.32

Operating System: Mac

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

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

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
await page.getByRole('checkbox').check();
await expect(page.getByRole('checkbox')).toBeChecked();
});

Steps

npx playwright test --ui

close ui from the ui

Expected

Playwright should close all instances of browser once UI is closed

Actual

Stays open in your dock and the more you open the UI the more browser instances it stores

Issue 2:
System info

Playwright Version: [v1.35.1]

Operating System: [Windows 10]

Browser: [Chromium]

Source code

I am using playwright with javascript. In my framework I am passing the page instance to a method (lets call it frameHandler()) which is outside test method. In frameHandler() method when I am trying to perform keyboard press event I am getting an error saying TypeError: Cannot read properties of undefined (reading 'press')

Below is the source code
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1205 on 2009-08-20 by @stsci-sienkiew, assigned to @pierregm.

======================================================================
FAIL: test_testUfuncRegression (test_old_ma.TestUfuncs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/ra/pyssg/2.5.1/numpy/ma/tests/test_old_ma.py", line 689, in test_testUfuncRegression
self.failUnless(eqmask(ur.mask, mr.mask))
AssertionError

1.4.0.dev7284 (august 6)

1.4.0.dev7303 (august 19)

Python 2.5.1, Solaris 8, cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1174 on 2009-07-15 by @stsci-sienkiew, assigned to unknown.

======================================================================
FAIL: test_testUfuncRegression (test_old_ma.TestUfuncs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/ra/pyssg/2.5.1/numpy/ma/tests/test_old_ma.py", line 689, in test_testUfuncRegression
self.failUnless(eqmask(ur.mask, mr.mask))
AssertionError

----------------------------------------------------------------------

numpy 1.4.0.dev7132

solaris 8

python 2.5.1
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.

Now nacos is open sourced. I think it is time to develop registry to nacos

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.

Let consul registry support ACL
Issue 1:
rustc 0.13.0-dev (fac5a0767 2014-11-26 22:37:06 +0000)
binary: rustc
commit-hash: fac5a07679cac21a580badc84b755b8df0f975cf
commit-date: 2014-11-26 22:37:06 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-dev

On this build, I'm seeing cargo successfully compile such a plugin without any error message. Crates that attempt to load the plugin then fail with a confusing "undefined symbol" error, which provides little assistance in locating the root of the problem.

I suggest that such a plugin should not even compile.

Issue 2:
mod Foo { fn x() {} }

struct Foo;

impl Foo { fn y() {} }

fn main() {}

<anon>:5:1: 5:23 error: duplicate definition of module `Foo`
<anon>:5 impl Foo { fn y() {} }
^~~~~~~~~~~~~~~~~~~~~~
<anon>:3:1: 3:12 note: first definition of module `Foo` here
<anon>:3 struct Foo;
^~~~~~~~~~~
error: aborting due to previous error

The "first definition" error should be pointing to the mod Foo.
Issue 1:
I was notified that it seems we have no actual introduction about how to write a Deno plugin in the manual. Also the folder test_plugin/, while showing an example, is not mentioned anywhere in the manual, and is not easy to find (since the name does not indicate it also being an example)

IMO This could be a good first issue.

Issue 2:
The folder test_plugin/, while showing an example, is not mentioned anywhere in the manual, and is not easy to find (since the name does not indicate it also being an example)

This could be a good first issue.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Assuming I've assigned an instance of next to the variable app and called app.prepare(), calling app.close() should stop all middleware and allow the Node process to exit.

Current Behavior

In dev mode, the Node process keeps running with some middleware remaining active. If a page was recently accessed, the "Disposing active pages" message will eventually be logged after app.close() was called, indicating that something has not stopped. It will not stop after disposing pages either.

When not running in dev mode, the Node process will exit as expected.

Steps to Reproduce (for bugs)

Follow the basic setup instructions, then create the following server.js:

const path = require('path');

const { createServer } = require('http')
const { parse } = require('url')
const next = require('next')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev, dir: path.resolve(__dirname) })
const handle = app.getRequestHandler()

app.prepare().then(() => {
const http = createServer((req, res) => {
const { parsedUrl } = parse(req.url, true)
handle(req, res, parsedUrl)
.then(() => http.close())
.then(() => app.close())
})

http.listen(8080)
})

Build with npm run build

Run node server.js and point browser at app. The Node process will NOT exit after request is handled. Must Ctrl-C to exit.

Run NODE_ENV=production node server.js and point browser at app. The Node process will exit after request is handled.

Context

Came across this while working on a monitoring app to start/discover/stop instances of a Next app. Instances wouldn't exit when told to via a /stop http request.

Your Environment

Tech
Version

next
3.0.1-beta.13

node
7.10.0

OS
Ubuntu 14.04.5 LTS

browser
Chrome

Issue 2:
Hello everyone,

It seems @ types/next/router is missing an exported member called 'withRouter'. Is it a knowing issue?

Any workaround for this?

Thanks

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

Your Environment

Tech
Version

next
4.1.4

node
8.5.0

OS
Windows 10

@ types/next
2.4.5
Issue 1:
Issue Type:

Bug Report

Ansible Version:

$ ansible --version
ansible 1.8.1

Environment:

$ uname -a
Darwin 0x6D67 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64 i386 MacBookPro11,3 Darwin

Summary:

Since 1.8.1 update, one of my git commands hangs forever.

Steps To Reproduce:

- name: bar | Checkout project
sudo: yes
git: repo=git@github.com:foo/bar.git accept_hostkey=True
force=yes remote=origin version=master
dest=/srv/www/foo/bar

Expected Results:

It's working with ansible v1.7.2

Actual Results:

The task hangs, if I ssh and check the folder, it looks like it crashes on a submodule:

Submodule 'webroot/modules/col-stats' () registered for path 'webroot/modules/col-stats'
fatal: Needed a single revision
Unable to find current revision in submodule path 'webroot/modules/col-broadcast-viewer'

Can't reproduce it with the CLI:

git clone -o github git@github.com:foo/bar.git --recursive

Issue 2:
When executing the git command, with recursive: yes, the accept_hostkey: yes directive is ignored for submodules. If the submodule remote is a different server to the main git repo, the Ansible script hangs waiting for manual authentication of the remote.
Issue 1:
i try to import an Form Login to put in page, but when i import 'FormControl'

appears:

Unexpected token import
/../client-with-react/node_modules/material-ui/es/Form/FormControl.js:5
import React from 'react';

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Module._compile (/Users/acauapitta/client-with-react/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)

My Login Page:

<LayoutCenterBox>
<Grid item xs={4} justify='center' style={{ border: '1px red solid' }}>
<FormLogin/>
</Grid>

<Grid item xs={8} style={{ float: 'right' }}>
<PromoCover/>
</Grid>
</LayoutCenterBox>

My FormLogin Comp:

<div>
<h1>Welcome!</h1>

<Grid item>
<FormControl fullWidth>
<Input id="email" placeholder="E-mail" startAdornment={<InputAdornment position="start"><i className="mdi mdi-account"></i></InputAdornment>} />
<Input id="password" type="password" placeholder="Password" startAdornment={<InputAdornment position="start"><i className="mdi mdi-lock"></i></InputAdornment>} />
</FormControl>
</Grid>

.
.
.
</div>

The Code is a clone of nextjs example:

https://github.com/mui-org/material-ui/tree/v1-beta/examples/nextjs

It's funny, because if i don't reload the page by the browser (f5) but if i change the code and save, the 'React Reload' works and the form appears...

code base (it''s not working)

https://codesandbox.io/s/l9p6nllo79

Tech
Version

Material-UI
v0.30 beta

React
latest

browser
Chrome

**Next Js
4.2.3**

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

Expected Behavior

Expect that when I type into an autocomplete field, and receive a dropdown list of items to select from, on selecting an item that the autocomplete input field would retain its focus so tabbing would move to the next field.

Current Behavior

Currently, when you select an option from a dropdown, the focus is lost, and the tab order is broken.

Steps to Reproduce (for bugs)

http://www.material-ui.com/#/components/auto-complete

Start typing in a field - a dropdown autocomplete list will appear, select a value and then the input loses focus, and we lose the tab order.

Context

This ruins keyboard accessibility for impaired users, and greatly hinders workflow in a form environment.

Your Environment

Tech
Version

Material-UI
0.18.0

React
15.6.1

browser
Any

etc
Issue 1:
There were 5 causes:

java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)

java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)

java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)

java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)

java.io.FileNotFoundException(No content provider: url)

but the url'pic can be load by my pc

Issue 2:
Integration libraries:

using Glide version: 4.6.1

using com.github.bumptech.glide:okhttp3-integration:4.6.1

Device/Android Version:

Samsung S6

Android version 24

Issue details / Repro steps / Use case background:

I am trying to load an image from Internet into ImageView but it seems like Glide is trying to load from assets directory instead of Internet.

//this is the ApplicationContext
RequestManager requestManager = Glide.with(this)
.applyDefaultRequestOptions(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.NONE))
.applyDefaultRequestOptions(RequestOptions.placeholderOf(R.drawable.placeholder));
requestManager
.applyDefaultRequestOptions(RequestOptions.skipMemoryCacheOf(true));
}
requestManager.load("http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg")
.into(image);

Layout XML:

<ImageView
android:id="@+id/cam_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_gravity="center"
android:gravity="center"
android:scaleType="fitCenter"
/>

Stack trace / LogCat:

Root cause (1 of 1)
java.io.FileNotFoundException: No content provider: http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1049)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:904)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:831)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:266)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Issue 1:
Environment

Windows build number: [Version 10.0.19002.1002]
Windows Terminal version (if applicable): Version: 0.6.2951.0

Any other software?

Steps to reproduce

Use the dark theme of Windows Terminal

Expected behavior

No white line at the bottom of the window

Actual behavior

a small white line at the bottom of the window

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 0.2.1831.0

Any other software?

Steps to reproduce

Download the font

https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Iosevka/Regular/complete/Iosevka%20Nerd%20Font%20Complete%20Windows%20Compatible.ttf

Install into Windows

Edit profiles.json "fontFace" : "Iosevka NF"

Expected behavior

Able to render the font without crashing.

This font doesn't crash other software, tested Fluent Terminal, Hyper, ConEmu, cmder, VS code, IntelliJ IDEA

Actual behavior

App immediately exits without any error messages when tab with this font is opened. If it's the default profile, the app doesn't even start.

Same with other Iosevka nerd fonts (Iosevka Term, Iosevka Mono)
Issue 1:
❓ Questions & Help

For many students,who haven't large GPU,so they will use small model(eg albert),hence I hope you will support loading albert, Tkanks so much!

Issue 2:
🌟New model addition

Model description

ALBERT is "A Lite" version of BERT, a popular unsupervised language representation learning algorithm. ALBERT uses parameter-reduction techniques that allow for large-scale configurations, overcome previous memory limitations, and achieve better behavior with respect to model degradation.

For a technical description of the algorithm, see our paper:

ALBERT: A Lite BERT for Self-supervised Learning of Language Representations

Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut

Open Source status

the model implementation is available: https://github.com/google-research/google-research/tree/master/albert.

I just want to ask whether you guys have plan to add ALBERT in near future.
Issue 1:
Let's say I have 3 modules main.rs, a.rs and b.rs, and two external libraries libfoo.a and libbar.a, and that libbar depends on symbols defined in libfoo.

main.rs

mod a;
mod b;
fn main() {}

a.rs

#[link(name = "foo")]
extern {}

b.rs

#[link(name = "bar")]
#[link(name = "foo")]
extern {}

Because rustc de-dupes the list of external libraries, it will pass to linker only -lfoo -lbar. However gnu linker does not look for unresolved symbols in libraries it had already processed, so it will fail to resolve libbar's references to libfoo. The correct command line would have been -lfoo -lbar -lfoo.

Rustc should not de-duplicate the list of libraries. Furthermore, I think it should guarantee that libs will appear in the same order on the linker command line as they did in the source file.

Issue 2:
http://is.gd/zCNViG

const VV: Vec<&'static str> =
vec!("A" , "B").drain().map(|s| s).collect::<Vec<&'static str>>();

Obviously it is intended that this code produce a compiler error, but it also causes the compiler to panic with this message:

thread 'rustc' panicked at 'assertion failed: self.mode == Mode::Var',
/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/middle/check_const.rs:232