WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
This code fails to compile:

fn main() {
let x = vec![1i, 2, 3];
let _x = x;
println!("{}", x);
}

Error:

<anon>:4:20: 4:21 error: use of moved value: `x`
<anon>:4 println!("{}", x);
^
note: in expansion of format_args!
<std macros>:2:23: 2:77 note: expansion site
<std macros>:1:1: 3:2 note: in expansion of println!
<anon>:4:5: 4:23 note: expansion site
<anon>:3:9: 3:11 note: `x` moved here because it has type `collections::vec::Vec<int>`, which is moved by default (use `ref` to override)
<anon>:3 let _x = x;
^~

Where as this compiles with no error:

fn main() {
let x = vec![1i, 2, 3];
let _ = x;
println!("{}", x);
}

Output:

[1, 2, 3]

Issue 2:
(Using rustc 1.0.0-nightly (1d00c54 2015-01-30 19:56:34 +0000))

Program using an external crate which uses "regex!" builds normally, but upon execution:

"target/rss_client: error while loading shared libraries: libregex_macros-fdf5a2d7af19fd78.so: cannot open shared object file: No such file or directory"

The desired .so file is in target/deps, and the executable doesn't look there unless I set LD_LIBRARY_PATH. Then the program runs.

But why is "regex" in a .so file? Here's my target/deps directory:

libchrono-2760812556f7a811.rlib
libcookie-4a08a2c06bb5c4fc.rlib
libgcc-3361713823cacea0.rlib
libhyper-9e6a74d72671a096.rlib
liblibc-6b537f2898b2a028.rlib
liblog-b7487854e865255d.rlib
libmatches-68db25b520030534.rlib
libmime-115ca8125c42dc12.rlib
libmucell-178e4fc583386697.rlib
libopenssl-ff2380beb920b0db.rlib
libopenssl-sys-1d498ee6f4e8d500.rlib
libpkg-config-be6313c85913bcf0.rlib
libregex-50925f1e98b93309.rlib
libregex_macros-fdf5a2d7af19fd78.so <---- How did that get in there?
librustc-serialize-181d5959361aa206.rlib
libtime-2215e3ac75eaa2c7.rlib
libunicase-88de2458e97b894d.rlib
libunsafe-any-3f018797a3613438.rlib
liburl-4c384fb33b0bde93.rlib
libxml-25cb934bf93db2fd.rlib

Everything else is statically linked, and normally nothing in the "deps" directory is needed for execution. Why did "cargo build" generate a ".so" file? Did someone build "regex" as a dynamic library by mistake? I've been looking at the relevant .toml files for something that would cause this, but I'm not finding it.

Where is static vs. dynamic library generation under Cargo control documented, anyway? Not finding anything in "http://doc.crates.io/guide.html". Obviously there's something somewhere which says "make this a shared library". But where?

Again, the program works if LD_LIBRARY_PATH includes the directory with that .so file.
Issue 1:
Just saw this, haven't looked yet

test
pass
skip
xfail

Interval
551
640
0

Period
472
0
1

Both
789
829
1

commands:

pytest pandas/tests/indexes/period/

pytest pandas/tests/indexes/period/

pytest pandas/tests/indexes/interval/ pandas/tests/indexes/period/

Issue 2:
Incorrect dt.weekofyear calculation? I was expecting weekofyear/week for 20050101 would be 0

In [1442]: df
Out[1442]:
A B
0 1 20050121
1 2 20050111
2 3 20050205
3 4 20050101

In [1443]: pd.to_datetime(df.B, format='%Y%m%d').dt.week
Out[1443]:
0 3
1 2
2 5
3 53
Name: B, dtype: int64

In [1444]: pd.to_datetime(df.B, format='%Y%m%d').dt.weekofyear
Out[1444]:
0 3
1 2
2 5
3 53
Name: B, dtype: int64

In [1445]: pd.to_datetime(df.B, format='%Y%m%d').dt.strftime('%W')
Out[1445]:
0 03
1 02
2 05
3 00
Name: B, dtype: object

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.12.final.0

python-bits: 64

OS: Windows

OS-release: 7

machine: AMD64

processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.21.0.dev+397.g234b042

pytest: 3.2.0

pip: 9.0.1

setuptools: 36.2.7

Cython: 0.24.1

numpy: 1.12.1

scipy: 0.19.1

pyarrow: None

xarray: None

IPython: 5.1.0

sphinx: 1.4.6

patsy: 0.4.1

dateutil: 2.5.3

pytz: 2017.2

blosc: None

bottleneck: 1.2.0

tables: 3.2.2

numexpr: 2.6.2

feather: None

matplotlib: 2.0.2

openpyxl: 2.3.2

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.3

lxml: 3.6.4

bs4: 4.5.1

html5lib: 0.999999999

sqlalchemy: 1.0.13

pymysql: 0.7.9.None

psycopg2: None

jinja2: 2.8

s3fs: None

fastparquet: None

pandas_gbq: None

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

Expected Behavior

A link using prefetch and pointing to a non-existent url should show the standard 404 page.:

<Link prefetch href="/bad-url" />

Current Behavior

The browser does not navigate anywhere, and so it looks like the link is unresponsive.

Steps to Reproduce (for bugs)

Add

<Link prefetch href="/bad-url" />

to a page

Click on it, notice the browser does nothing.

Context

Because this has to do with prefetch, this is production-only. Not sure if it matters, but this is a client-side only app hosted on Netlify.

Your Environment

Tech
Version

next
4.2.3

node
N/A, client-side only

OS
OS X 10.13.4

browser
Chrome

etc

Issue 2:
// next.config.js
module.exports = {distDir: 'build/local/prod'}

Run this. Note that the distDir is being taken from the config.

import config from './next.config.js'
const {distDir} = config

nextBuild(distDir, config)
.then(o => {
console.log('finished', o)
})
.catch(e => {
console.log('build error', e)
})

$ npm start

> Could not find a valid build in the 'build/local/prod' directory! Try building your app with 'next build' before starting the server.

In replace.js, await replaceCurrentBuild(dir, buildDir), all the variables are as follows:

{ dir: 'build/local/prod',
buildDir: '/var/folders/kp/06ys69nn6hq9k23cv0xxn19m0000gn/T/a224b0f3-c8ea-43f5-a6dd-c6cfb73843bd',
dist: '.next',
_dir: 'build/local/prod/.next',
_buildDir: '/var/folders/kp/06ys69nn6hq9k23cv0xxn19m0000gn/T/a224b0f3-c8ea-43f5-a6dd-c6cfb73843bd/.next',
oldDir: '/var/folders/kp/06ys69nn6hq9k23cv0xxn19m0000gn/T/a224b0f3-c8ea-43f5-a6dd-c6cfb73843bd/.next.old' }

.next is being appended to the dir. But when we try to run it it, we are not looking for the .next dir because we changed our dist dir.

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

Your Environment

Tech
Version

next
4.1.3

node
8.1.2

OS
macOS

browser

etc
Issue 1:
Feature request: The sequence_length parameter in rnn.rnn() is a convenient way to support variable length sequences. The great thing about it is that it propagates the state at an example's sequence length to the final state output. However, it doesn't similarly propagate the output at an example's sequence length. This is the feature being requested here.

If one is interested in the last output only, reading outputs[-1] returns zeros for all the examples that are shorter than the max sequence length. It would simplify things considerably if there was a way to get the output value at the example's sequence length.

Issue 2:
So I'm trying to figure out why my resnets are running out of memory, and it seems that there's a memory leak in Tile and zeros_like operations.

Those ops have memory allocated during each session run but there's no __LOG_MEMORY__ deallocation messages corresponding to them. The sum of missing deallocations matches the amount of memory leaked as reported by allocator as max_bytes_in_use (accessed through tf.contrib.memory_stats.MaxBytesInUse op)

Here's a simplified repro, at each sess.run, the memory grows by 1.15 GB until it crashes with OOM

https://github.com/yaroslavvb/stuff/blob/master/resnet_leak_report2.py

When I run it, I see

Run 0, GBs in use 2.30
Run 1, GBs in use 3.60
Run 2, GBs in use 4.75
Run 3, GBs in use 5.90
2017-09-21 14:56:31.994302: W tensorflow/core/common_runtime/bfc_allocator.cc:273] Allocator (GPU_0_bfc) ran out of memory trying to allocate 137.33MiB. Current allocation summary follows....

Offending ops:

gradients/leaky_relu_grad/zeros_like 576MB
gradients/Sum_grad/Tile 576MB

Version:

Ubuntu 16:04

official TensorFlow Linux GPU Python 3.5 nightly wheel from today

version: 1.4.0-dev20170921
__git_version__: v1.3.0-rc1-2408-ge9d5ee1
Commit https://github.com/tensorflow/tensorflow/commit/e9d5ee1
Issue 1:
A keyboard shortcut to hide/show Title Bars of windows snapped into their zones, allowing window's content to fill the entire zone.

Currently, when stacking windows vertically, their Title Bars:

1 - occupy significant vertical space

2 - add visual clutter to the layout

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.17763.737]
PowerToys version: 0.13.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Define custom Layout for virtual desktop 1

Place windows into zones

Switch to virtual desktop 2 which has a different layout

Switch back to virtual desktop 1

Windows are placed into zones of virtual desktop 2 and not in those of desktop 1

Expected behavior

Correct placement of windows

Did work correctly in prior version (I remember 0.12.0, but cannot check now)

Actual behavior

Wrong placement of windows into layout of other virtual desktop

Screenshots
Issue 1:
I have 3 application bundles (3 entrypoints) and also a bunch of vendor files. I'd like to create a bundle that has all the common code from the 3 entrypoints as well as the bundle of vendor files (or put the common code also in the vendor bundle).

plugins = [
new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.bundle.js"),
new webpack.NormalModuleReplacementPlugin(appModuleRegex, function(result) {
result.request = result.request.replace(appModuleRegex, "/web/app/$1/src/$2");
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.optimize.LimitChunkCountPlugin({maxChunks: 1}),
new webpack.optimize.OccurenceOrderPlugin(true)
];

entrypoints = {
framework: 'framework/app',
operations: 'operations/app',
platform: 'platform/app',
vendor:
['babel-core',
'crypto-js',
'classnames',
'd3',
'fetch',
'lodash',
'moment',
'moment-timezone',
'react',
'react-router',
'react-select',
'zxcvbn2']
};

Currently I'm seeing a lot of code duplicated across the app bundles. I also need to keep maxChunks at 1.

Issue 2:
Bug report

What is the current behavior?

When using externals while building an UMD library, each external generate a wrapper module using CommonJS, which bails out from optimization.

The output file looks like this:

(function webpackUniversalModuleDefinition(root, factory) {
// REDACTED
})(this, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__) {
return /******/ (function(modules) { // webpackBootstrap
// REDACTED
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__0__;

/***/ }),
/* 1 */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__1__;

/***/ }),
/***/ (function(module, __webpack_exports__, __webpack_require__) {
// REDACTED (code of the library, all concatenated together)
/***/ })
/******/ ]);
});

What is the expected behavior?

Given that the generated external modules are simply re-exporting the __WEBPACK_EXTERNAL_MODULE__*__ variables (which are defined based on UMD dependencies in the external wrapper), I see no benefit for them over referencing this variable directly.

Maybe the ExternalModule could be generated as an ES module for that case instead (exporting the __WEBPACK_EXTERNAL_MODULE__0__ variable as its export) and letting the concatenation plugin optimize it, in case this is simpler to handle than removing the wrapper.

Note that I'm mostly interested in cases where the library source code is written entirely in ES modules, and the output uses UMD (until we get support for the ESM output in the future)

Other relevant information:

webpack version: 4.41.2

Node.js version: 12.13.0

Operating System: Ubuntu 18.04

Additional tools:
Issue 1:
System info

Playwright Version: v1.32.3

Operating System: macOS 13.3.1

Browser: Chromium

Source code

I provided exact source code that allows reproducing the issue locally

Link to the GitHub repository with the repro

https://github.com/silvenon/repro at 379b04a1bf5111d99caf8f86e404100d77d086aa

Test file (self-contained)

test('has title', async ({ page }) => {
test.fail()
await page.goto('https://playwright.dev/');
await expect(page).toHaveTitle(/Cypress/);
});

Everything is as installed by Playwright itself, no changes to the configuration.

Steps

run npx playwright test --ui

run the test

Expected

Even though the test fails, it should be marked as successful.

Actual

It's marked as failed. All other forms of running Playwright tests consider this test successful:

clicking on the test using VS Code extension

running npx playwright test

even using the debug mode

But UI doesn't seem to recognize the test.fail() in any way (might be the same with test.skip() and others, I didn't try).

I'm aware that UI it's experimental, I just really like the test.fail() feature. 🥰

Issue 2:
System info

Playwright Version: [v1.31.1]

Operating System: [macOS 13.2.1]

Other info: UI Mode

Source code

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

Test file (self-contained)

test('Should be marked as passed', async ({}) => {
test.fail();
expect(1).toEqual(2);
});

Steps

Run the test using UI Mode

Expected

Test should end with pass, because test.fail() was used.

Actual

Test ends with fail. The same test executed using VS Code extension ends with pass.
Issue 1:
Context:

GOOD Playwright Version: 1.15.0

BAD Playwright Version: 1.16.0

Operating System: macOS

Extra: Node.js v16.15.0

Code Snippet

import { expect, test } from '@playwright/test';

test('toHaveJSProperty', async ({ page }) => {
await page.setContent('<video muted />');

const video = page.locator('video');

await expect(video).toHaveJSProperty('muted', true); // ✅ passed
await video.evaluate<unknown, HTMLVideoElement>((node) => (node.muted = false));
await expect(video).toHaveJSProperty('muted', false); // ❌ failed
});

Describe the bug

The second assertion shows "expect.toHaveJSProperty: expectedValue: expected object, got boolean".

But if I change it to expect(video).toHaveJSProperty('muted', {}),

the error became:

Error: expect(received).toHaveJSProperty(expected) // deep equality

Expected: {}
Received: false

Issue 2:
Context:

Playwright Version: 1.21.1 And playwright-internal@1.22.0-next

Operating System: Mac

Node.js version: v16.15.0

Browser: All

Extra: -

When pass false as expected value of toHaveJSProperty,

Playwright throws expect.toHaveJSProperty: expectedValue: expected object, got boolean error.

Code Snippet

// This test is pass
test('pass true to toHaveJSProperty', async ({ page }) => {
await page.setContent('<div></div>');
await page.$eval('div', e => e.foo = true);
const locator = page.locator('div');

// Pass true as expected value
await expect(locator).toHaveJSProperty('foo', true);
});

// But this test is failed
test('pass false to toHaveJSProperty', async ({ page }) => {
await page.setContent('<div></div>');
await page.$eval('div', e => e.foo = false);
const locator = page.locator('div');

// Pass false as expected value
await expect(locator).toHaveJSProperty('foo', false);
});

I got below error when run "pass false to toHaveJSProperty" test.

1) [playwright-test] › playwright.expect.misc.spec.ts:187:1 › pass boolean as false ==============

expect.toHaveJSProperty: expectedValue: expected object, got boolean

189 | await page.$eval('div', e => e.foo = false);
190 | const locator = page.locator('div');
> 191 | await expect(locator).toHaveJSProperty('foo', false);
| ^
192 | });
Issue 1:
See detailed build log at: http://ci.tensorflow.org/view/Experimental/job/experimental-cais-tensorflow-mac-python3-copt_pip_install-test/1/consoleFull

In file included from tensorflow/core/kernels/conv_ops.cc:22:

In file included from ./tensorflow/core/framework/numeric_op.h:19:

In file included from ./tensorflow/core/framework/op_kernel.h:22:

In file included from ./tensorflow/core/framework/allocator.h:25:

In file included from ./tensorflow/core/framework/type_traits.h:22:

In file included from ./tensorflow/core/framework/types.h:23:

In file included from third_party/eigen3/unsupported/Eigen/CXX11/Tensor:2:

In file included from external/eigen_archive/eigen-eigen-8cd7c2c6e9e1/unsupported/Eigen/CXX11/Tensor:92:

external/eigen_archive/eigen-eigen-8cd7c2c6e9e1/unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h:29:31: error: no type named 'Scalar' in 'Eigen::internal::TensorContractionInputMapper<float, long, 0, Eigen::TensorEvaluator<const Eigen::TensorReshapingOp<const Eigen::DSizes<long, 2>, const Eigen::TensorImagePatchOp<-1, -1, const Eigen::TensorMap<Eigen::Tensor<const float, 4, 1, long>, 16> > >, Eigen::ThreadPoolDevice>, Eigen::array<long, 1>, Eigen::array<long, 1>, 4, false, false, 0>'

typedef typename RhsMapper::Scalar RhsScalar;

~~~~~~~~~~~~~~~~~~~~^~~~~~

This error doesn't occur if Python2 is used on Mac.

Issue 2:
There are some errors while handling exception tf.errors.OutOfRangeError:

On python2 no issues with handling tf.errors.OutOfRangeError.

During handling of the above exception, another exception occurred.

log:

Traceback (most recent call last):
File "fully_connected_preloaded.py", line 158, in <module>
tf.app.run()
File "/Users/home/tensorflow_python3/lib/python3.5/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "fully_connected_preloaded.py", line 154, in main
run_training()
File "fully_connected_preloaded.py", line 120, in run_training
_, loss_value = sess.run([train_op, loss])
File "/Users/home/tensorflow_python3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 368, in run
results = self._do_run(target_list, unique_fetch_targets, feed_dict_string)
File "/Users/home/tensorflow_python3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 428, in _do_run
target_list)
SystemError: <built-in function delete_Status> returned a result with an error set
Issue 1:
Hi,

is there currently a way or is it planned for the future that we can access the electron shell API from VS-Code extensions ?

I would like to implement an extension using the BrowserWindow API of electron (more specifically the BrowserWindow.getAllWindows() API), but I can't find any way to get access to that from the scope of an extension.

Thanks

Issue 2:
It's changed to horizontal and now consumes 40% of my editor space automatically every time I run my program. Extremely annoying, and impossible to get rid of: closing it just reopens it the moment something logs to the console.

How can I get the previous "vertical" debugger? Or better yet, how can I pull the debug console out into its own window?
Issue 1:
Dave Syer opened SPR-2804 and commented

Here are some docos I wrote for an implementation that I was considering for springmodules. It seems more like a core feature, when I think about it, so I thought I'd see what people think here...

1.2. Target Chains

Use the factory bean to create a composite service that delegates to a chain of existing services, all with the same interface. The chain is terminated according to some simple rules depending on the return type of the method being called. Thus:

* If the method returns Void, then all targets are executed.
* If the method returns Boolean (or boolean), then execution stops with the first target that returns true.
* If the method returns Object, then execution stops with the first target that returns not null.

Once the chain has finished executing the composite method returns the object returned by the last executed target. A Target Chain can itself take part in a chain as a target, and the behaviour remains the same.

If any part of the chain throws an exception the chain terminates and the exception is re-thrown by the composite. No clean up is attempted.

1.2.1. Example of Target Chain

To configure a Target Chain all that is needed is a chain of targets (a List), and an object type (which must be an Interface).

<bean id="compositeResourceLocator"

class="org.springmodules.aop.framework.TargetChainProxyFactoryBean">

<property name="objectType" value="com.mycompany.ResourceLocator"/>

<property name="target">
<list>
<ref bean="localResourceLocator"/>
<ref bean="remoteResourceLocator"/>
</list>
</property>

</bean>

This exposes a bean called compositeResourceLocator which implements the interface com.mycompany.ResourceLocator. Calls to (e.g.) a method URL locate(String) will be delegated first to the localResourceLocator, and if nothing is found (null returned), it will move on to the remoteResourceLocator.

Issue Links:

#6382 ChainOfResponsibilityFactoryBean; factoryBean which creates a proxy that acts as a COR over a list of objects ("duplicates")

Issue 2:
Colin Yates opened SPR-1684 and commented

http://forum.springframework.org/showthread.php?t=21986

I keep writing a number of implementations of a single interface and then needing to wrap all those implementations so they are all called.

For example, I might have an ErrorHandler interface and a Log4J implementation, then a Mailing implementation etc. and I want them all to fire when invoked. I would then write a Composite implementation which traversed them all. This was tiresome so I decided to write a FactoryBean which would do the same thing.

Attached is the source code. It may be helpful to others, it might not :)

Attachments:

Copy of spring-utils.zip (2.55 MB)

cor.zip (2.27 MB)

Issue Links:

#7491 Target Chains: factory bean for a proxy that builds up a composite service from a list of targets ("is duplicated by")

4 votes, 3 watchers
Issue 1:
Version

2.6.11

Reproduction link

https://jsfiddle.net/mqr85hg2/

Steps to reproduce

Open the link and view the console output.

What is expected?

"message"

What is actually happening?

""

If you change Vue to a development environment, such as https://jsfiddle.net/072nxuzt/, it is normal.

I have such a usage scenario. Register a universal watcher with vm$.watcher in mixins. Non-universal watchers will be written directly to the watcher in the *.vue file. So when I register watchers with vm$.watcher in mixins logic, I need to exclude watchers in *.vue files to avoid duplication of registration. I found that I can use watcher.expression to judge. But after my actual test, this is no problem in the development environment, but all the watcher.expression in the production environment are empty strings.

Issue 2:
Vue.js version

Latest dist

Reproduction Link

http://jsfiddle.net/up5prrnp/

Steps to reproduce

Have a component rendered conditionally with v-if directive, and in the ready hook appended elsewhere with this.$appendTo().

What is Expected?

The element to be removed when condition is no longer met; basically the same behavior when this.$appendTo() or any of the other similar methods isn't used.

What is actually happening?

Element persists and can potentially cause duplicates. The fiddle isn't the greatest example as I know that it's preferable to use v-show in that case, but in a nested component structure, a child component's moved element will not be removed even if the parent component is removed.
Issue 1:
Summary of the new feature/enhancement

In Preview build, I can maximize terminal window by double clicking on title bar area (white colored tittle bar area) next to minimize button. As you can see in below image if I double click on the highlighted area it doesn't maximize the window.

It doesn't feel natural as I need to go all the way to the right almost near to the maximize button to double click to toggle size of window. If I need to go all the way to the right then I can click maximize button instead. It ultimately reduce the usability of toggling the window using double click.

It would be really great if I can double click on blank area anywhere on the title bar to toggle the window.

Issue 2:
I think its really nice that you can put the terminal-tabs in your titlebar but I got an issue there.

You can't move the window around klicking on the blank space in the the-bar to move the window around (highlighted in the screenshot).

Since people are moving their terminal quite often it would be nice to offer this space, so you can drag your terminal around.