WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Should display correct string.

Current Behavior

Displays [Object object]

Steps to Reproduce (for bugs)

I am using react-int library for internalisation, it woks really well with material-ui and only fails at placeholders i.e

<TextField
label={<FormattedMessage id="index.email" />}
placeholder={<FormattedMessage id="index.emailExample" />}
fullWidth
margin="dense"
value={email}
onChange={({ target }) => this.setState({ email: target.value })}
/>

placeholder is displayed as [Object object], this works fine for label in same field and things like Tabs.

Context

Unable to internationalise placeholders properly.

Your Environment

Tech
Version

Material-UI
beta 33

React
16.2

browser
all

etc

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

Expected Behavior

Grid should be displayed as shown in image https://i.stack.imgur.com/jZBie.png

Here is the code:

<Grid container direction="column" spacing={0}>
<Grid item xs={12}>
<Grid container direction="row" spacing={0}>
<Grid item xs={6}>
Logo
</Grid>
<Grid item xs={6}>
FormControl
</Grid>
</Grid>
</Grid>
<Grid item xs={12}>
<Grid container direction="column" spacing={0}>
<Grid item xs={12}>
<Grid container direction="row" spacing={0}>
<Grid item xs={12}>
<TextField />
</Grid>
<Grid item xs={12}>
<TextField />
</Grid>
</Grid>
</Grid>
<Grid item xs={12}>
<Grid container direction="row" spacing={0}>
<Grid item xs={6}>
<TextField />
</Grid>
<Grid item xs={6}>
<TextField />
</Grid>
</Grid>
</Grid>
</Grid>
</Grid>
<Grid item xs={12}>
<Grid container direction="row" spacing={0}>
<Grid item xs={6}>
Label
</Grid>
<Grid item xs={6}>
Label
</Grid>
</Grid>
</Grid>
</Grid>

Current Behavior

It is working well in chrome and firefox but in IE 11, everything overlaps and messes up.

Environment

Tech
Version

Material-UI
1.0.0-beta.18

React
15.6.2

browser
IE 11, Chrome, Firefox
Issue 1:
my goal is to create a browser window, have it load multiple pages (e.g. clicking links, loading new page etc in same window) but having the ipc available from the window on each page it loads so I can send data back to the server process

I have a preload script that does global.ELECTRON_IPC = require('ipc') and I have node-integration: false to not expose anything else

When I create a browser window and call loadUrl, then wait for dom-ready, the ELECTRON_IPC variable is there

However, when I click on a link (causing the window to navigate to a new url), and wait for dom-ready again, the ELECTRON_IPC variable is not there this time.

I'm guessing this behavior is because preload only gets called when the browser window is created. Would it make sense to call it before each load? e.g. after will-navigate?

Another way to ask the question would be: how else could I only expose IPC communications from the renderer to the server (but nothing else) in a way that is available across loadUrl calls?

Issue 2:
Browser-Window node-integration breaks after POST. require / global are undefined in browser-window after a POST request. I've seen this behavior since I first used Electron - 0.26.0. Still happens in 0.28.1. Here is simple way to reproduce:

package.json

{
"name": "PostExample",
"version": "0.1.0",
"main": "main.js",
"description": "Post Loses Global"
}

main.js

var app = require('app')
var BrowserWindow = require('browser-window')

var mainWindow = null;

app.on('window-all-closed', function() {
app.quit()
});

app.on('ready', function() {

mainWindow = new BrowserWindow({
"node-integration": true,
});

mainWindow.loadUrl('file://' + __dirname + '/index.html')

mainWindow.openDevTools()

});

index.html

<html>
<script type="text/javascript">
console.log(typeof global)
try{
var fs = require("fs");
} catch(e){
console.warn("ERROR", e)
}
</script>
<body>
<h1>Posts to self</h1>
<form action="" method="post">
<input type="text" name="somevar" value="val" />
<button type="submit">Submit to see Error</button>
</form>
</body>
</html>
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.

Environment

Dubbo version: 2.7.6

Java version: 1.8

Steps to reproduce this issue

@reference(version = "xxx", group = "xxx") , group：xxx 有效

@reference(version = "xxx", group = "xxx1") , group：xxx1 不生效

异常信息：No provider available from registry

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.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

public void addListener(String key, String group, ConfigurationListener listener) {
String[] keyAndGroup = getKeyAndGroup(key);
if (keyAndGroup[1] != null) {
group = keyAndGroup[1];
}
String finalGroup = group;
NacosConfigListener nacosConfigListener = watchListenerMap.computeIfAbsent(generateKey(key, group), k -> createTargetListener(key, finalGroup));
String keyInNacos = rootPath + PROPERTIES_CHAR_SEPERATOR + key;
nacosConfigListener.addListener(listener);
try {
configService.addListener(keyInNacos, group, nacosConfigListener);
System.out.println("1");
} catch (NacosException e) {
logger.error(e.getMessage());
}
}

i think we should remove the code : group = keyAndGroup[1]

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
This code in the file module causes problems in the check mode:

if prev_state != 'absent' and state == 'absent':
try:
if prev_state == 'directory':
if os.path.islink(path):
if module.check_mode:
module.exit_json(changed=True)
os.unlink(path)
else:
try:
if module.check_mode:
module.exit_json(changed=True)
shutil.rmtree(path, ignore_errors=False)
except:
module.exit_json(msg="rmtree failed")
else:
if module.check_mode:
module.exit_json(changed=True)
os.unlink(path)
except Exception, e:
module.fail_json(path=path, msg=str(e))
module.exit_json(path=path, changed=True)

The line module.exit_json(changed=True) raises SystemExit, but there are two except lines that catch it and report it as error. However at that point, the first JSON was already printed, so there are two JSONs in the response.

I can send a patch to fix this if you want, but I think the best solution would be to remove the large and generic try/except.

Issue 2:
How to reproduce:

First create a directory on some random host:

$ ansible test-host -i ansible.hosts -m file -a 'path=/tmp/randompath state=directory'
mymachine.domain.se | success >> {
"changed": true,
"gid": 1007,
"group": "jens",
"mode": "0755",
"owner": "jens",
"path": "/tmp/randompath",
"size": 4096,
"state": "directory",
"uid": 1007
}

Then check if the directory would have been deleted (note --check):

$ ansible test-host -i ansible.hosts --check -m file -a 'path=/tmp/randompath state=absent'
mymachine.domain.se | FAILED => failed to parse: {"changed": true}
{"msg": "rmtree failed", "changed": false}

Expected output:

$ ansible test-host -i ansible.hosts --check -m file -a 'path=/tmp/randompath state=absent'

mymachine.domain.se | success >> {
"changed": true
}

I have pull request for this that I'll submit separately.
Issue 1:
System information (version)

OpenCV => git version till [Wed Nov 21 15:54:42 2018] b6a4477

Operating System / Platform => Ubuntu 18.04.1 LTS

Compiler => g++ (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010

Detailed description

compiled done, with "make install" command

the opencv.pc in ${prefix}/lib/pkgconfig/opencv.pc should update

for pkg-config --cflags output correctly

Steps to reproduce

make install

pkg-config --cflags opencv

Issue 2:
System information (version)

OpenCV => 4.0.0-rc

Operating System / Platform => Ubuntu 18.10

Compiler => gcc 8.2.0 / gcc 6

Detailed description

I did cmake ...Then make and then make install

and it does not generate opencv.pc file.

If I use same commands for version 3.4.3 then the file is created.

Another thing

if I link with pkgconfig then it links to librarys with no version numbers.

so installing 4.0.0-rc after 3.4.3 makes pkgconfig unusable.

it would be nice if there were multiple opencv.pc files like opencv3.4.pc opencv4.pc
Issue 1:
It's related to #14919. The code

abstract FitnessScheme{F}
immutable MinimizingScalarScheme <: FitnessScheme{Float64} end
is_better(x, y, fs::MinimizingScalarScheme) = x < y

Base.call{F}(fs::FitnessScheme{F}, x::F, y::F) = is_better(x, y, fs)

works in v0.4, but in v0.5 I get

WARNING: deprecated syntax "call(fs::FitnessScheme{F}, ...)".
Use "(fs::FitnessScheme{F})(...)" instead.
ERROR: cannot add methods to an abstract type
in eval(::Module, ::Any) at ./boot.jl:267

The alternative approach (works in v0.4)

Base.call{FS<:FitnessScheme,F}(fs::FS, x::F, y::F) = is_better(x, y, fs)

also fails with

WARNING: deprecated syntax "call(fs::FS, ...)".
Use "(fs::FS)(...)" instead.
ERROR: function type in method definition is not a type
in eval(::Module, ::Any) at ./boot.jl:267

The expected behaviour is that both definitions are valid.

Issue 2:
I'm updating ApproxFun and this caught me by surprise:

abstract Foo
julia> (f::Foo)(x)=x
ERROR: cannot add methods to an abstract type
in eval(::Module, ::Any) at ./boot.jl:267

Is this intentional? Is there a way to get around this other than define for each subtype:

julia> immutable CFoo <: Foo end
julia> (f::CFoo)(x)=x
Issue 1:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes (n/a)

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04 (All affected)

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): 1.4.0

Python version: 3.6

Bazel version (if compiling from source): n/a

GCC/Compiler version (if compiling from source): n/a

CUDA/cuDNN version: n/a

GPU model and memory: CPU

Exact command to reproduce: n/a

Describe the problem

tensorflow.layers.Conv3DTranspose doesn't work when the input dimensions are not specified and bias is added. This occurs because the layer output is reshaped from five dimensions to 4 by combining the depth and height dimensions: None * None throws an exception. The code for this is in tensorflow/python/layers/convolutional.py, line 1608.

It appears that this reshaping is done because nn.bias.add can't handle 5 dimensional inputs. This seems like it should be an easy fix since nn.bias.add just broadcasts across all but the channel dimension anyway. The *Transpose layers should really all use the same general _ConvTranspose style that the non-transposed convolution layers use, to avoid code duplication.

In the meantime, tensorflow.layers.Conv3D DOES work with unspecified input dimensions and channel-last ordering. It turns out that Conv3D and Conv3DTranspose use different code for adding the bias. In lieu of a nn.bias.add fix, this problem can be alleviated by using the Conv3D bias code for Conv3DTranspose.

Suggested fix (tested)

In tensorflow/python/layers/convolutional.py, replace lines 1609-1625 with (modified from lines 169-189):

if self.data_format == 'channels_first':
outputs_shape = outputs.shape.as_list()
outputs_4d = array_ops.reshape(outputs,
[outputs_shape[0], outputs_shape[1],
outputs_shape[2] * outputs_shape[3],
outputs_shape[4]])
outputs_4d = nn.bias_add(outputs_4d, self.bias, data_format='NCHW')
outputs = array_ops.reshape(outputs_4d, outputs_shape)
else:
outputs = nn.bias_add(outputs, self.bias, data_format='NHWC')

Issue 2:
The issue have beed submitted in #381, thanks all kind of you
Issue 1:
Bug report

What is the current behavior?

Installing webpack 4.8.1 in [dev] has an outdated dependency of deep-extend with this vulnerability https://snyk.io/vuln/npm:deep-extend:20180409

with the path:

webpack > watchpack > chokidar > fsevents > node-pre-gyp > rc > deep-extend

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Not to have security vulnerabilities in webpack

Other relevant information:

webpack version: 4.8.1

Node.js version: 9.7.1

Operating System: osx 10.13.3

Additional tools:

Issue 2:
Do you want to request a feature or report a bug?

bug

What is the current behavior?

While using webpack for server side packing of node.js apps I am unable to have an accurate value for __dirname when __dirname is called within a required module, regardless of what options.node.__dirname might be set to.

If the current behavior is a bug, please provide the steps to reproduce.

For example, assume the following:

directory structure

/my/app
other
file.js
entry.js
webpack.config.js

/my/app/entry.js

require('./other/file.js');
console.log(__dirname);

/my/app/other/file.js

console.log(__dirname);

/my/app/webpack.config.js

const path = require('path');
module.exports = {
target: "node",
entry: {
entry: './entry.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
node: {
__dirname: false
},
};

Steps to reproduce (assuming above files are in provided locations:

cd /my/app
webpack
cd dist
node entry.js

Expected Results:

/my/app/dist/other
/my/app/dist

Actual Results:

/my/app/dist
/my/app/dist

Results using the above files but based on various options.node.__dirname values within webpack.config.js:

value of options.node.__dirname
result

false
/my/app/dist
/my/app/dist

true
other
empty line

unset
/
/

What is the expected behavior?

I expect there to be an option to have __dirname's location be in relation to the directory of the current module that it was called from (before webpack) and not the directory name of the output file.

If this is a feature request, what is motivation or use case for changing the behavior?

N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Node 6.9.5 LTS

weback 2.2.1

Windows 10
Issue 1:
If only the enumeration type itself is imported but not its variants, a match expression reports unreachable pattern instead of unrecognised type:

pub mod inner {
pub enum E {
E1,
E2
}
}

pub mod foo {
use inner::E; // change this to use inner::{E, E1, E2} then all will be fine

pub fn bar(e: E) -> int {
match e {
E1 => 0,
E2 => 1 // error: unreachable pattern
}
}
}

pub fn main() {}

Is this something intentional? Or should we give it a more sensible error message?

Issue 2:
This code:

mod foo {
pub enum Bars {
BarFoo,
BarBar,
BarBaz
}
}

fn main() {
decide(foo::BarBar);
}

fn decide(bar: foo::Bars) -> int {
match bar {
BarFoo => 0,
BarBar => 42,
BarBaz => 128
}
}

should fail to compile because it can't resolve the enum variants in the match statement.

But currently it outputs this error message instead:

match_namespace.rs:16:8: 16:17 error: unreachable pattern
match_namespace.rs:16 BarBar => 42,
^~~~~~~~~
match_namespace.rs:17:8: 17:17 error: unreachable pattern
match_namespace.rs:17 BarBaz => 128
^~~~~~~~~

Which is curious because it doesn't complaint about the first item in the match statement, and because it somehow confuses 'Don't know what it is' with 'Can't reach it'.
Issue 1:
📝 Provide a description of the new feature

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

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

Issue 2:
Hello,

I'm having a counter-productivity problem with the Fancy Zones productivity tool.

I usually size my windows to their ideal dimensions, windows documents as well as folders. When I open these windows, they automatically find the last dimensions that I gave them.

However, Fancy Zones obviously resizes windows to be able to place them in the applied zones and ... when removed from these zones, they retain the dimensions given by Fancy Zones, rather than giving them the dimensions they had before to be placed in these zones.

I then find myself with windows having all the height of the screen, both the already opened windows that opened later, because Word, Excel, Windows Explorer, browser, etc. open new windows to the dimensions of other opened windows. So I have to manually resize them. It's tedious and frustrating. This produces the opposite effect of the one sought: productivity.

Is there a setting to fix this problem?

Otherwise, I think that would be a good idea.

Thank you for your attention.
Issue 1:
{"type":"Parse","message":"Syntax Error on line 1","index":0,"filename":"bootstrap.css","line":1,"column":0,"extract":[null,"",""]}

Issue 2:
A less error occured trying to build your bundle. Please paste the error below in an issue for us at http://github.com/twitter/bootstrap! thanks!

{"type":"Parse","message":"Syntax Error on line 1","index":0,"filename":"bootstrap.css","line":1,"column":0,"extract":[null,"",""]}
Issue 1:
This is using Go 1.6, but I don't think the behavior has changed recently.

go build (and probably other go commands) normally take Go package names (that is, relative to some GOPATH component) but, as special cases, also take relative and absolute directories.

go help packages says this:

An import path that is a rooted path or that begins with

a . or .. element is interpreted as a file system path and

denotes the package in that directory.

However, this does not fully describe the go tool's behavior when given relative paths such as . or ./hello. I haven't looked into the code, but it seems like the tool tries to resolve such paths relative to GOPATH and does different things depending on what it finds.

Here are two examples.

First, there is a very different error given depending on whether the given path is inside a GOPATH or not:

$ pwd
/tmp/build
$ ls
$ mkdir -p a/src b/src
$ cd a/src/
$ GOPATH=/asdf go build ./hello
can't load package: package ./hello: open /tmp/build/a/src/hello: no such file or directory
$ GOPATH=/tmp/build/a go build ./hello
can't load package: package hello: cannot find package "hello" in any of:
/home/caleb/apps/go/src/hello (from $GOROOT)
/tmp/build/a/src/hello (from $GOPATH)

There are actual behavior differences as well, though. For instance, you can build a package given a non-existent relative path if the resolved package name does exist in some other GOPATH component (or GOROOT, for that matter):

$ # continuing from above...
$ cd /tmp/build/b/src/
$ mkdir hello
$ cat > hello/hello.go
package main
func main() { println("hello") }
$ cd /tmp/build/a/src/
$ ls
$ GOPATH=/asdf go build ./hello
can't load package: package ./hello: open /tmp/build/a/src/hello: no such file or directory
$ GOPATH=/tmp/build/a:/tmp/build/b go build ./hello
$ ./hello
hello

That seems to directly contradict "interpreted as a file system path" in the go help packages output.

Issue 2:
f$ pwd
/usr/local/google/home/rsc/src/code.google.com/p/rsc
f$ go install ./jfmt
can't load package: package code.google.com/p/rsc/jfmt: cannot find package "code.google.com/p/rsc/jfmt" in any of:
/usr/local/google/home/rsc/go/src/code.google.com/p/rsc/jfmt (from $GOROOT)
/usr/local/google/home/rsc/src/code.google.com/p/rsc/jfmt (from $GOPATH)
f$

There is no ./jfmt directory in this example. That should be the end. It should not figure out that I am in $GOPATH/src/code.google.com/p/rsc and go looking for code.google.com/p/rsc/jfmt in other work spaces.
Issue 1:
For example, when I was originally searching for serialize (in the wrong place, I suppose), I got a bunch of internal results. Link to the search.

Issue 2:
For example: error: type mismatch: the type `[closure /home/ncameron/rust3/src/librustc_driver/lib.rs:107:36: 107:44]` implements the trait `for<'r> core::ops::Fn<(&'r rustc::session::Session,)>`, but the trait `for<'r,'r> core::ops::Fn<(&'r rustc::session::Session, &'r getopts::Matches)>` is required (expected a tuple with 2 elements, found one with 1 elements)

It should talk about arguments rather than tuples, it should also be multi-line. It probably doesn't need to talk about the Fn trait at all.
Issue 1:
Allow numeric pixel size control of zones.

currently, when setting a custom zone the only means is by a visual rectangle which I can resize and move around and the size of the border (16 pixels default).

I need to be able to set explicit size for a zone so I can fit fixed size windows either for streaming or for screen recording purposes.

Add 2 text boxes which will allow me to explicitly enter the zone's width and height in addition to mouse resize. The numeric text should also show the size of the current window when resizing with the mouse.

When I enter numeric height / width, the zone will resize accordingly.

When I resize the zone via mouse, the numeric indicators will show current size.

Issue 2:
Power Toys is very useful.

Thank you for making a good one!

I have a suggestion for Keyboard Manager.

I think it would be more useful if I can switch settings for each keyboard.

There are times when I use my laptop's keyboard and other times when I use an external keyboard, so it would be nice if switching was easy.

Please consider installing it in an update.
Issue 1:
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. http://play.golang.org/p/o20RjaRdtQ
2.
3.

What is the expected output?

It would be preferable to get
<RPCElementTarget><running/></RPCElementTarget>

What do you see instead?

There is no way to do self terminating elements. The best we can do is to do a start
and end element with no chardata. This does not work for my application. The closest
output is:
<RPCElementTarget><running></running></RPCElementTarget>

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
OS X 10.9

Which version are you using? (run 'go version')
go version go1.2 darwin/amd64

Please provide any additional information below.

Issue 2:
Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8.3 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"

GOBIN=""

GOEXE=""

GOHOSTARCH="amd64"

GOHOSTOS="darwin"

GOOS="darwin"

GOPATH="/Users/xxx/.go:/Users/xxx/workspace/goproject"

GORACE=""

GOROOT="/usr/local/Cellar/go/1.8.3/libexec"

GOTOOLDIR="/usr/local/Cellar/go/1.8.3/libexec/pkg/tool/darwin_amd64"

GCCGO="gccgo"

CC="clang"

GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/53/r61bh2fj1hg9n0w03fs__7kc0000gn/T/go-build440341166=/tmp/go-build -gno-record-gcc-switches -fno-common"

CXX="clang++"

CGO_ENABLED="1"

PKG_CONFIG="pkg-config"

CGO_CFLAGS="-g -O2"

CGO_CPPFLAGS=""

CGO_CXXFLAGS="-g -O2"

CGO_FFLAGS="-g -O2"

CGO_LDFLAGS="-g -O2"

What did you do?

I want to marshal a xml struct which has a self-closing tag field. After looking up in golang doc, there isn't an official support. In google group they use string.Replace, it's ugly. It seems we could write marshal func for the custom struct, by i'm willing to see an official support like

type Person struct {
XMLName xml.Name `xml:"person"`
Id int `xml:"id,attr"`
FirstName string `xml:"name>first"`
LastName string `xml:"name>last"`
Age int `xml:"age"`
Height float32 `xml:"height,omitempty"`
Married bool
Address
Comment string `xml:",comment"`
Balabala string `xml:"balabala,allowempty"` // i want something like this
}

In xml standard, a self-closing tag is permitted.

https://www.w3.org/TR/REC-xml/#dt-empty

And empty-element tag should be used, and should only be used, for elements which are declared EMPTY.

https://www.w3.org/TR/REC-xml/#d0e2480