WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
To me Typescript seems to be a better choice for writing code where the code base is huge and requires more consistency.

But the examples and experiences i find around the internet are more on client side , may be coz of the Angular2.0 decision to use AtScript/Typescript.

Though Typescript adds a lot of power to Javascript , there is something that keeps on pissing me off is how to manage codebase with duplicate files. According to my understanding i can have 2 ways to do it.

1st Way

Use a build tool like gulp/grunt , watch for changes and compile Typescript to Javascript in the same folder. which may look something like this.

├── models/
│ ├── User.ts
│ ├── User.js
│ ├── Likes.ts
│ ├── Likes.js

2nd Way

Another way will be the same but of instead of outputting Javascript into the same folder , i can clone the entire workspace.

├── typescript
│ ├── models/
│ │ ├── User.ts
│ │ ├── Likes.ts
├── javascript
│ ├── models/
│ │ ├── User.js
│ │ ├── Likes.js

Where both are not the best solution for me , is there any other way to manage codebase for nodejs. For client it is simple as we have only one output file.

Issue 2:
Hi all,

We currently have a AST model for TypeScript which is useful for compilers, editors, and linters.

However, it would be extremely useful to have a type model, a la Java's reflective model. There are a huge number of use-cases supporting this, but I will list a few here:

I have a REST interface and I define a data model for it as a TypeScript interface. I use this interface for the function definition of the REST implementation, but then use the type model to validate the input at runtime.

I have a service model that abstracts an interface for some system (database, or application, etc.). I define this as a TypeScript interface (maybe with some decorators as meta-data), and have a generator library that extracts this information to either generate code - or create a runtime implementation - that actually implements the service.

I have an injection (DI) system. I use injection decorators on class properties/constructor parameters, and use the type model to reflectively wire the correct instance.

A good example of what could be achieved with this, is something like the Spring platform for Java where our applications are built as decorated components and most of the boilerplate code is abstracted away by the platform thanks to reflection and decorators.

I have a "first stab" at implementing such a thing: typescript-schema. It's not feature complete and the design isn't finished either. But hopefully it gives a feel for what a reflective model could look like.

Is this something the TypeScript team would be interested in having as a first class citizen?
Issue 1:
I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @vladev @arusakov

When using the current type definitions:

declare var SockJS: {
new(url: string, _reserved?: any, options?: Options): SockJSClass;
(url: string, _reserved?: any, options?: Options): SockJSClass;

The constructor returns an instance of SockJSClass, but you cannot do something like this (as it is not exported):

import * as SockJS from 'sockjs-client';

let socket: SockJSClass = new SockJS('http://foo.com');

Issue 2:
I tried using the @types/xxxx package and had problems.

Authors: @sergey-buturlakin @ngbrown @rokoroku

file: DOMUtils.d.ts

error TS2304: Cannot find name 'EventListenerOrEventListenerObject'.

fixed locally by type EventListenerOrEventListenerObject = any; but i rather to have official fix ....
Issue 1:
🐛 Bug

To Reproduce

Steps to reproduce the behavior:

make[1]: Leaving directory '/media/gauravroy/pytorch/build'

Makefile:143: recipe for target 'all' failed

make: *** [all] Error 2

Traceback (most recent call last):

File "setup.py", line 744, in

build_deps()

File "setup.py", line 309, in build_deps

build_dir='build')

File "/media/gauravroy/pytorch/tools/build_pytorch_libs.py", line 309, in build_caffe2

check_call(['make', '-j', str(max_jobs), 'install'], cwd=build_dir, env=my_env)

File "/usr/lib/python2.7/subprocess.py", line 190, in check_call

raise CalledProcessError(retcode, cmd)

Expected behavior

Environment

Please copy and paste the output from our

environment collection script

(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

PyTorch Version (e.g., 1.0):

OS (e.g., Linux):

How you installed PyTorch (conda, pip, source):

Build command you used (if compiling from source):

Python version:

CUDA/cuDNN version:

GPU models and configuration:

Any other relevant information:

Additional context

Issue 2:
❓ Questions and Help

make[1]: Leaving directory '/media/gauravroy/pytorch/build'

Makefile:143: recipe for target 'all' failed

make: *** [all] Error 2

Traceback (most recent call last):

File "setup.py", line 744, in

build_deps()

File "setup.py", line 309, in build_deps

build_dir='build')

File "/media/gauravroy/pytorch/tools/build_pytorch_libs.py", line 309, in build_caffe2

check_call(['make', '-j', str(max_jobs), 'install'], cwd=build_dir, env=my_env)

File "/usr/lib/python2.7/subprocess.py", line 190, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['make', '-j', '4', 'install']' returned non-zero exit status 2

Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of listed resources available on the website. Our primary means of support is our discussion forum:

Discussion Forum
Issue 1:
Vue.js version

2.1.4

Reproduction Link

https://jsfiddle.net/JounQin/s5b79kqc/

Steps to reproduce

Just look at the output HTML

What is Expected?

Child comp should has className abc def

What is actually happening?

The className is abc abc def

Is that by design?

Issue 2:
I understand that it's possible to communicate between parent and child components via events but it would be very convenient if vue.js supported what I'm calling callback attributes. This would allow you to write HTML something like this:

<parent-component>
<child-component on-callback="doSomething">
</child-component>
</parent-component>

With Javascript code like this:

var parent = {
methods: {
doSomething: function (args) {
// Do something
}
}
}

var child = {
cbAttributes: ['on-callback'],

ready: function () {
this.onCallback(/* Args */);
}
}

$(function () {
new Vue({
el: 'body',

components: {
'parent-component': parent,
'child-component': child,
}
}
})

Currently, I can fake this using paramAttributes by passing the function name as a string and then calling the function from the child like this:

this.$parent[this.onCallback](/* args */);

but it would be much nicer if this was explicitly supported.

I've tried passing callbacks as paramAttributes like this:

<parent-component>
<child-component on-callback="{{doSomething}}">
</child-component>
</parent-component>

but it does not seem to work.

Also, I want to point out that this does not couple the parent and child.

I searched for similar issues but did not find one. I apologize in advance if this is a duplicate.
Issue 1:
Code Sample, a copy-pastable example if possible

pd.DataFrame({"col1": ["NA"], "col2": ["NA"]}).to_csv("test.csv", index=False, header=None)

output = pd.read_csv("test.csv", header=None, names=["iso2", "region"], index_col="iso2", na_filter=False)
print(output)

Problem description

Reading the file, "test.csv", with na_filter set to false, causes a "NA" to be read as a nan when that column is converted into the index. Reading the file without index_col and then converting works.

Expected Output

The index should contain the string "NA", not the float nan.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.2.final.0

python-bits: 64

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.20.3

pytest: 3.2.3

pip: 9.0.1

setuptools: 36.5.0

Cython: None

numpy: 1.13.1

scipy: 1.0.0b1

xarray: None

IPython: None

sphinx: None

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 2.0.2

openpyxl: 2.4.8

xlrd: 1.1.0

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.6.0

html5lib: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: None

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
Given the following CSV file:

u1,u2,u3,d1,d2,d3,d4
Good Things,C,,1,1,1,1
Good Things,R,,1,1,1,1
Bad Things,C,,1,1,1,1
Bad Things,T,,1,1,1,1
Okay Things,N,B,1,1,1,1
Okay Things,N,D,1,1,1,1
Okay Things,B,,1,1,1,1
Okay Things,D,,1,1,1,1

First I parse with na_filter=True:

In [13]: pd.read_csv("/home/alex/nan_issue.csv", na_filter=True)
Out[13]:
u1 u2 u3 d1 d2 d3 d4
0 Good Things C NaN 1 1 1 1
1 Good Things R NaN 1 1 1 1
2 Bad Things C NaN 1 1 1 1
3 Bad Things T NaN 1 1 1 1
4 Okay Things N B 1 1 1 1
5 Okay Things N D 1 1 1 1
6 Okay Things B NaN 1 1 1 1
7 Okay Things D NaN 1 1 1 1

then I parse with na_filter=False:

In [12]: pd.read_csv("/home/alex/nan_issue.csv", na_filter=False)
Out[12]:
u1 u2 u3 d1 d2 d3 d4
0 Good Things C 1 1 1 1
1 Good Things R 1 1 1 1
2 Bad Things C 1 1 1 1
3 Bad Things T 1 1 1 1
4 Okay Things N B 1 1 1 1
5 Okay Things N D 1 1 1 1
6 Okay Things B 1 1 1 1
7 Okay Things D 1 1 1 1

then index_cols set:

In [11]: pd.read_csv("/home/alex/nan_issue.csv", na_filter=False,index_col=[0,1,2],)
Out[11]:
d1 d2 d3 d4
u1 u2 u3
Good Things C NaN 1 1 1 1
R NaN 1 1 1 1
Bad Things C NaN 1 1 1 1
T NaN 1 1 1 1
Okay Things N B 1 1 1 1
D 1 1 1 1
B NaN 1 1 1 1
D NaN 1 1 1 1

Finally setting na_values=[], keep_default_na=False seems to fix the issue:

In [14]: pd.read_csv("/home/alex/nan_issue.csv", na_filter=False,index_col=[0,1,2],na_values=[], keep_default_na=False)
Out[14]:
d1 d2 d3 d4
u1 u2 u3
Good Things C 1 1 1 1
R 1 1 1 1
Bad Things C 1 1 1 1
T 1 1 1 1
Okay Things N B 1 1 1 1
D 1 1 1 1
B 1 1 1 1
D 1 1 1 1
Issue 1:
Let us know what functionality you'd like to see in Playwright and what is your use case.

In my typescript config, I'm using path aliases. Like the following:

// tsconfig.json

{
"compilerOptions": {
// other options
"paths": {
"@my-alias/*": ["./*"]
},
}
}

That means my typescript types show up just fine in VS Code, but playwright/test yells at me if I try to use them:

Error: Error while reading /Users/me/code/playwright-project/very/nested/folder/some-test.spec.ts:
Cannot find module '@my-alias/fixtures'

It'd be nice to have an option like Jest's moduleNameMapper, so I can use path aliases. An example of what that looks like for jest is:

// jest.config.json

"moduleNameMapper": {
"^@my-alias/(.*)$": "<rootDir>/playwright-project/$1"
},

Do you think others might benefit from this as well?

Yes. Path aliases are a common setting in typescript projects, and a nice way to avoid many nested layers of ../.. when using import statements.

Issue 2:
The Typescript monorepo project I'm currently adopting Playwright to has very specific needs in terms of resolving the modules. The simplified structure is as follows:

.
└── packages
├── @test-utils
| └── src
└── e2e
└── src
├── pageObjects
└── specs

Even though I can setup the e2e-specific tsconfig.json that resolves the paths within the editor, the tests obviously fail because the runner can't resolve the modules like:

// specs/my-test.spec.ts
import { MyPage } from 'src/pageObjects'; // absolute import within e2e package

// pageObjects/My.page.ts
import { TestId } from '@test-utils'; // import from another package inside monorepo

This is possible to do within the Jest by providing following configuration in jest.config.js:

// jest.config.js
module.exports = {
moduleNameMapper: {
'src/(.*)': '<rootDir>/src/$1',
'@test-utils': '<rootDir>/../@test-utils/src',
},
}

Would love to see something similar in the @playwright/test 😃
Issue 1:
Apologies for noise if this has been asked/discussed before—I can't seem to find it.

The manual explains permissions. Some of them have list options, but it doesn't appear that --allow-env currently allows for a list. Is there a reason for this? It seems desirable to be able to restrict access to environment variables while allowing access to specific values.

Issue 2:
Currently --allow-env gives program unlimited permission to access any environment variable. It's much strong privilege and there should be more limited permission control for them.

Like --allow-net=:9999, how about these? --allow-env=DEBUG, --allow-env=DENO_DIR,DENO_INSTALL

Deno.env() should also be re-designed to get permitted variables.

I think even if full access to envars given to the process, It's dangerous to return key-value pair of all environment variables because malicious attackers are able to know some secret informations if they don't know envar's name. So how about re-design Deno.env to immutable map-like object?

Deno.env.get("DENO_DIR")
Deno.env.set("DEBUG", "*")
Deno.env.has("PORT")
Issue 1:
I don't know whether ansible is not YAML standard compliant, but a valid yaml configuration like:

---
- name: ensure timezone is set in apache2 php.ini
lineinfile: dest=/etc/php5/apache2/php.ini
regexp='date.timezone ='
line='date.timezone = {{ server.timezone }}'

is not accepted as valid. This makes http://insight.sensiolabs.com complains and declaring many critical violations.

I tested this with www.yamllint.com and there are no issues.

Issue 2:
The YAML specification has the following example for a multi line message in double quotes:

quoted: "So does this
quoted scalar.\n"

Write that in a MultilineDoubleQuotedMessage.yml and try to Yaml::parse('MultilineDoubleQuotedMessage.yml') - Symfony will throw an exception like this:

Malformed inline YAML string ("So does this) in .../MultilineDoubleQuotedMessage.yml at line 1 (near "quoted: "So does this").

in .../symfony/symfony/src/Symfony/Component/Yaml/Inline.php at line 244

...

I tried that in Symfony 2.2.0 and 2.4.6, but the underlying issue seems to be the reg exp in https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L246 , which lives on in Symfony 2.5.0.

A unit test in Symfony\Component\Yaml\Tests\YamlTest could look something like this:

public function testParseAcceptsMultilineDoubleQuotedMessage()
{
$filename = __DIR__ . '/Fixtures/MultilineDoubleQuotedMessage.yml';
$this->setExpectedException(null);
Yaml::parse($filename);
}
Issue 1:
Version

2.6.10

Reproduction link

https://jsfiddle.net/txnamgy8/1/

Steps to reproduce

Click the button

What is expected?

Clicking the button should swap out "button" button with a "submit" button.

The button should change to "Submit" button which will submit form when clicked.

What is actually happening?

The form submit is triggered when "button" is pressed.

Suspect it is a focus issue.

Method worked before updating to Vue v2.6.10.

Form works as expected when using new v-slots

Issue 2:
Version

2.6.10

Reproduction link

https://codesandbox.io/s/7j9o6o4310?fontsize=14

Steps to reproduce

Use a component that defines a scoped slot like this

<MyComponent>
<template v-if="scope.foo" #myslotname="scope">...</template>
</MyComponent>

What is expected?

The template should evaluate the slot directive first, v-if second. Just as it is done with v-for first, v-if second.

What is actually happening?

The template evaluates the v-if first, resulting in an error (unknown component property)

This functionality was present in the deprecated slot syntax, i stumbled upon it while refactoring to the new one.

It is possible to workaround this with a nested template with the respected v-if

I'm using latest Vue, TypeScript, SFC
Issue 1:
related #2802

It seems that str[1] is significantly slower than .apply(lambda x: x[1])

See this So answer http://stackoverflow.com/a/18473330/1240268

Issue 2:
Code Sample, a copy-pastable example if possible

# Your code here
df = data_index[data_index['ntorsions'] == 2]

Problem description

When slicing a dataframe, the index is not reset by default. This becomes an issue if you want to output that dataframe, combine that dataframe with other dataframes (good luck with that), or output the dataframe without two index columns.

Fixing this will not break code in the wild.

Expected Output

Index being correct - without the need to manually call reset_index over and over again. This is much more intuitive to end users.

-> At end of slice, call reset_index(drop = True) on the returned dataframe or current dataframe if you are slicing in-place.

Output of pd.show_versions()

loaded rc file /Users/jadolfbr/.matplotlib/matplotlibrc

matplotlib version 1.5.1

verbose.level helpful

interactive is False

platform is darwin

INSTALLED VERSIONS

commit: None

python: 2.7.10.final.0

python-bits: 64

OS: Darwin

OS-release: 14.5.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

pandas: 0.18.1

nose: 1.3.7

pip: 9.0.1

setuptools: 20.3.1

Cython: None

numpy: 1.11.1

scipy: 0.13.0b1

statsmodels: 0.6.1

xarray: None

IPython: 4.1.2

sphinx: None

patsy: 0.4.0

dateutil: 2.5.3

pytz: 2016.4

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: 1.5.1

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.8

boto: None

pandas_datareader: None
Issue 1:
is it possible to connect to ws and execute the test in parallel against different browsers ?

Issue 2:
I'm trying to follow up https://www.browserstack.com/docs/automate/playwright, is there a way to setup wsEndpoint as a configuration in config file or in fixtures?

Edit: from the Playwright Team:

import base, { chromium } from '@playwright/test';

// caps is copied from browserstack guide
const caps = {
browser: 'chrome',
os: 'osx',
os_version: 'catalina',
name: 'My first playwright test',
build: 'playwright-build-1',
'browserstack.username': process.env.BROWSERSTACK_USERNAME
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
'client.playwrightVersion': '1.13.1',
};

export const visitorTestFixture = base.extend<{}>({
browser: async ({ browser }, use, workerInfo) => {
const vBrowser = await chromium.connect({
wsEndpoint:
`wss://cdp.browserstack.com/playwright?caps=` +
`${encodeURIComponent(JSON.stringify(caps))}`,
});
await use(vBrowser);
await vBrowser.close();
},
});
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When using the open prop, the Select's Menu should be positioned in the same place as if it were not a controlled component and was opened via a click.

Current Behavior

The Select's Menu is positioned in the top-left corner, or elsewhere depending on how the rest of the page is constructed.

Looking at the code, it seems that the anchorEl for the Menu is passed only from handleClick and handleKeyDown (anchorEl: event.currentTarget). When the Select is opened using the open prop, these functions are not called, therefor anchorEl is null.

Steps to Reproduce (for bugs)

CodeSandbox example : https://codesandbox.io/s/r7nvmz31nq

Context

I have a button that reveals a Select component and opens it for the user to pick an item.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.32

React
16.2.0

browser
Chrome 63

etc

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

Expected Behavior

floatingLabelText should always be visible

Current Behavior

If TextFields are set inside an div with column-width set and overflow: auto;, not all floatingLabelText are shown on Chrome. Generally it seems that only the labels of the first column are shown though I have seen cases where the labels disappear somewhere partly down the second column.

Sometimes (in my app) the labels appear partly while scrolling. And they all appear for a short moment when focusing a TextField.

In Firefox all labels are shown.

Steps to Reproduce (for bugs)

Open this sandbox https://codesandbox.io/s/5yln48v5qn in Chrome to see the bug

Click in a field to see labels appear for a short moment

Open in Firefox to see it working fine

Context

I am trying to show dozens of TextField's efficiently on large screens.

Your Environment

Tech
Version

Material-UI
0.19.4

React
16.2.0
Issue 1:
Hi,

We're using deployments on Kubernetes version 1.2.1.

In order to update deployments we update the corresponding deployment.yml file and the run

kubectl apply -f deployment.yml

Everything works well most of the time except for the case in which we add an environment variable to one of the containers on the deployment.yml.

In that case we see that a new replica set is not created and the old pods keep on running.

Issue 2:
Deployment is defined in a json file with several environment varibles. Deployment is deployed using "kubectl apply -f deployment.json". Pods get most of the environment variables defined, but not all.

Specifically, the variables defined in the deployment.json are named:

{ "name": "DB_HOSTS", "value": "10.0.0.1" }, { "name": "SLACK_ENDPOINT", "value": "ERRORNOT" }, { "name": "LACK_ENDPOINT", "value": "ERRORNOT" }, { "name": "SLACK", "value": "ERRORNOT" }, { "name": "CK_ENDPOINT", "value": "ERRORNOT" }, { "name": "ACK_ENDPOINT", "value": "ERRORNOT" }, { "name": "K_ENDPOINT", "value": "ERRORNOT" }, { "name": "CASSANDRA_LOGGING_LEVEL", "value": "ERROR" }, { "name": "ENABLE_GETIP", "value": "https://www.url.com" }

the environment variables that appear in a pod are:

`

ENABLE_GETIP

CASSANDRA_LOGGING_LEVEL

K_ENDPOINT

ACK_ENDPOINT

CK_ENDPOINT

DB_HOSTS

`

That is, ENV variables named "SLACK_ENDPOINT", "LACK_ENDPOINT" and "SLACK" never get passed on to the pods.
Issue 1:
I know that keeping entities outside bundles is not considered a good practice, but still there are few rare cases when we might face such a situation.

It would be nice to have the possibility of manually specifying the path of the entity and the target bundle for the generated CRUD.

This should give an idea about the possible solution to this:

http://stackoverflow.com/questions/31689469/doctrinegeneratecrud-for-entites-outside-a-bundle

Issue 2:
We do have the form types text and textarea and in Doctrine the field types text and string.

If you use a string/text you usually expect some data but not special characters like a line feed.

This is no problem if you use the form component since you cannot enter a line feed in the input field.

If you however develop an API then you might get such unwanted characters in e.g. the name or

the street.

Should we add a validation constraint Text? It could have some defaults to disallow some special characters and options to customize that behavior?

With this we can support the developer to have a more consistent database without the hassle of adding an Regex validator.

I think at least double spaces and line breaks should be invalidated. I was using for this /(\s\s)|(\n)/ so far.

What do you think - Does this make sense? What should be invalidated?
Issue 1:
Atom should definitely have an option to open file with user-chosen encoding. Currently as I can see there is only a UTF-8 support.

Encoding selection when opening and saving a file is an absolutely must-have. And features such as an automatic encoding detection may be currently postponed for future releases.

Issue 2:
We've received a few user requests about this, so decided to make an issue to track this:

support/c1efbd22aac011e3824485c02873dc32#C3

support/6026ed1eb23511e39be96d50cc8424ad

support/4ab67e5aaf6411e388d6c56073fdae1e

The editor can only reads UTF-8 files. It will be very handy to be able to support multiple encodings.

...

I need to change the encode of my code, but I cant find where I could change from UTF-8 for Windows 1252 for example.