WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hey,

Recently I've been putting together a page that has a lot of data. I'd like to consolidate this more by adding a scrollable feature to my table, however, overflowing the table in y with a max height causes the header to scroll. I've tried several CSS tricks and looked all over the internet for a solution. Most people suggest turning tbody into a block element, however this messes up all of the column formatting.

Having the ability to do something similar to <table class="table table-bordered table-scroll table-fixed-header" .... would be awesome.

Issue 2:
Please consider adding a class named table-fixedheader that can be applied to a table so that the body scrolls under fixed headers.

See this JSFiddle for a working demo: http://jsfiddle.net/drueter/yqgB5/3/

All that is needed:

table.table-fixedheader>tbody {
display: block;
}

table.table-fixedheader>tbody {
overflow-y: auto;
height: 50px; /*placeholder: override as needed*/
}

table.table-fixedheader>thead>tr>th, table.table-fixedheader>tbody>tr>td {
float: left;
width: 100px; /*placeholder: override as needed*/
}

See comments in JSFiddle for usage notes. This seems to work well.
Issue 1:
This is a follow up to #12601. Basically, I'd like to find a way to have a flattened view of router params available to components so that each components need not know about how the router tree has been configured. See #12601 for an implementation idea.

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

[x] feature request

Current behavior

Components would need to manually traverse the tree in order to find parameters defined in router tree.

Expected behavior

Components can now be incognizant of the router configuration when finding parameter values.

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

This helps the components consuming ActivatedRoute finding all the parameters defined in the

route, decoupling them from the knowledge of how nested routers are configured.

Angular version: 2.0.X

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

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[x] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When using a parametrized route which targets a component, only this component can access those parameters.

Expected/desired behavior

It might be necessary to read the parameters in other components.

Reproduction of the problem

If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

Consider the following route configuration

export const routes: RouterConfig = [
{ path: 'confirmation/:hashID', component: ConfirmationComponent, canActivate: [AuthGuard] },
];

Consider the following code as part of the ConfirmationComponent

this.activatedRoute.params.subscribe(params => {
var hashID = params['hashID'];
},

If I use the above code in any other component, hashID won't be available. It is necessary to read location.path() and extract the hashID value.

What is the expected behavior?

Although I understand that the targeted component it the ConfirmationComponent, sometimes other components might need to have access to the parameters explicitly written in the URL.

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

Please tell us about your environment:

Angular version: 2.0.0-rc.4

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all | TypeScript 1.8 | ES6/7 | ES5]
Issue 1:
I tried using the @types/node and @types/react-native 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: @alloy @gyzerok

Both of the modules seem to define require and this results in some compliation trouble:

../node_modules/@types/node/index.d.ts(49,13): error TS2451: Cannot redeclare block-scoped variable 'global'.
../node_modules/@types/node/index.d.ts(73,13): error TS2300: Duplicate identifier 'require'.
../node_modules/@types/react-native/index.d.ts(8541,11): error TS2451: Cannot redeclare block-scoped variable 'global'.
../node_modules/@types/react-native/index.d.ts(8542,14): error TS2300: Duplicate identifier 'require'.

Any tips/workarounds?

Issue 2:
I am unable to get Type script definition through nuget & package mangers shows error message saying Unable to resolve dependencies. 'bootstrap 3.0.0' is not compatible with 'Twitter.Bootstrap 3.0.1.1 constraint: bootstrap (≥ 3.0.1)'.

At line:1 char:1

+ Install-Package office-js.TypeScript.DefinitelyTyped

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception

+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Issue 1:
Feature request: I would like an option to tell Text that it should never overflow its container (in either direction) or edge of the screen. If it does detect such an overflow, I would like it to replace as many characters as necessary with an ellipsis so that there is no overflow.

Issue 2:
This is a feature request to have text optionally end with ellipsis when overflowing its container. (regardless of multi-line or not)

@abarth
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate, although #8580 is certainly related and could be the same root cause.

Expected Behavior

Am able to use withTheme in my React 16 application

Current Behavior

When using withTheme from material-ui@1.0.0-beta.16 with React 16, React gives the following warning, which is fatal to the execution of my app.

Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.

Steps to Reproduce

Here is an example of how I am using withTheme:

const MyComponent = props => {

// use props.theme.palette.text.primary

};

export default withTheme(MyComponent);

Environment

Issue did not exist when using withTheme with React 15. Issue occurs post-upgrade of React.

Tech
Version

Material-UI
1.0.0-beta.16

React
react@16.0.0, react-dom@16.0.0

browser
Chrome Version 61.0.3163.100

Issue 2:
Adding an errorText dynamically makes all the following content jump unpleasantly.

Perhaps the space for the error text could be reserved in advance, or it could animate the vertical motion instead?
Issue 1:
After the 0.19.0 update, there is an issue with the alignment of FancyZones when there is a change in multiple monitor setup (either connecting/disconnecting my Surface Pro to/from the second monitor). My taskbar positioning is at the top and it seems like the FancyZones thinks that the Taskbar is at the bottom and disregards the area covered by the Taskbar at the top, which leads to this misalignment. It works fine if I restart PowerToys after every change (connect/disconnect) in multiple monitor setup.

Issue 2:
I think a big enhancement to FancyZones would be if it could remember the original Window size before being put into a Zone and when dragging the Window outside of the Zone it could restore the original Window Size.
Issue 1:
Assume we have a file main.rs which defines a module foo residing in foo.rs. When the package has previously been built, rustpkg build … only checks the timestamp of main.rs, but not that of foo.rs, ignoring changes done there.

This also applies to rustpkg test with test.rs.

Issue 2:
When I go to build something with rustpkg after modifying any file other than main.rs, despite main.rs having mod foo; where the file I'm editing is foo.rs, it doesn't check if that file has been updated when I build.

$ rustpkg --version
WARNING: The Rust package manager is experimental and may be unstable
rustpkg 0.8-pre (4c6bf48 2013-09-17 20:35:54 -0700)
host: x86_64-unknown-linux-gnu
Issue 1:
When enabling log scale for the bar plot, the bars are not plotted properly and the plot is empty.

See also this bug report #163 and the corresponding fix #2147.

Commit dda42ab changed the default value of nonpos parameter from clip to mask which introduced the issue. I cannot tell whether clip should be default behavior or mask doesn't work as intended.

import matplotlib.pyplot as plt
plt.bar(x=[1,2,3], height=[1000,2,3])
plt.yscale("log")
plt.show()

Result is an empty plot. Saving to an image file or PDF doesn't make a change.

Adding

plt.yscale("log", nonposy="clip")

fixes that issue.

Additional info:

Latest Miniconda

Various platforms (Ubuntu 16.04, Windows 10, macOS)

Matplotlib 2.1.0, Qt5Agg (from Anaconda)

Issue 2:
Bug report

Bug summary

Setting a logarithmic y-axis with ax.set_yscale('log') causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2.

Code for reproduction

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np

xs = np.random.normal(size=int(1e6))
fig, (ax1, ax2) = plt.subplots(1, 2)
ax1.hist(xs, range=(-5, 5), bins=100)
ax2.hist(xs, range=(-5, 5), bins=100)
ax2.set_ylim(ymin=1)
ax2.set_yscale('log')
fig.savefig('histogram.png')

Actual outcome

With 2.1.0:

Expected outcome

I expect to see a logarithm y-axis and the histogram, but I only see the former. With 2.0.2 I see this:
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When using useState() hook in a functional component, I get the following error:

Hooks can only be called inside the body of a function component

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

The functional component where the hook is being used:

const AuthForm = () => {
const [value, setValue] = useState(1);

return (
<Paper square>
<Tabs
value={value}
indicatorColor="primary"
textColor="primary"
onChange={() => setValue(value)}
>
<Tab label="Active" />
<Tab label="Active" />
</Tabs>
</Paper>
);
};

package.json:

{
"main": "index.js",
"scripts": {
"dev": "nodemon index.js --ignore client"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@material-ui/core": "^3.9.2",
"apollo-boost": "^0.1.27",
"axios": "^0.18.0",
"babel-loader": "^8.0.5",
"bcrypt-nodejs": "0.0.3",
"body-parser": "^1.16.0",
"connect-mongo": "^2.0.3",
"express": "^4.16.4",
"express-graphql": "^0.7.1",
"express-session": "^1.15.6",
"graphql": "^14.1.1",
"html-webpack-plugin": "^3.2.0",
"lodash": "^4.17.4",
"mongoose": "^5.4.11",
"passport": "^0.4.0",
"passport-local": "^1.0.0",
"react": "16.8.1",
"react-apollo": "^2.4.1",
"react-dom": "16.8.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"webpack": "^4.29.3",
"webpack-dev-middleware": "^3.5.2"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/plugin-transform-react-jsx": "^7.3.0"
}
}

What is the expected behavior?

App should run without any errors.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React: 16.8.1

ReactDOM: 16.8.1

Chrome: 71.0.3578.98

Issue 2:
Currently, createElement throws the warning:

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).

It would be more helpful if the warning actually said what value was passed, e.g.:

Warning: React.createElement: 5 is an invalid value for type. It should be a string (for DOM elements) or a ReactClass (for composite components).
Issue 1:
Electron version: 1.8.2

Operating system: OSX, Windows

Issue: Whenever gulp = require("gulp"); is invoked, Electron 1.8.2 application crashes with "DevTools was disconnected from the page" message.

Everything works fine with Electron 1.7.11.

Issue 2:
Electron version: Anything over 1.7.8, until the latest 1.8.2-beta.1

Node: 8.8.0

Operating system: high sierra

Going over 1.7.8 seems to break Electron for one of our projects. It's hard to track down what's going on but here's the output:

❯ yarn run electron
yarn run v1.2.1
$ electron .dev/electron.js
/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron[41928]: ../../vendor/node/src/async-wrap.cc:399:void node::SetupHooks(const FunctionCallbackInfo<v8::Value> &): Assertion `env->async_hooks_init_function().IsEmpty()' failed.
1: node::Abort() [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
2: node::Assert(char const* const (*) [4]) [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
3: node::AsyncWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>) [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
4: v8::internal::StrDup(char const*) [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
5: v8::internal::compiler::BranchElimination::ControlPathConditions::operator==(v8::internal::compiler::BranchElimination::ControlPathConditions const&) const [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
6: v8::internal::compiler::BranchElimination::ControlPathConditions::operator==(v8::internal::compiler::BranchElimination::ControlPathConditions const&) const [/Users/drcmda/dev/stepdoctor/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib]
7: 0x3eadf51843fd
8: 0x3eadf527777c
9: 0x3eadf523be1c
✨ Done in 0.40s.

It happens when we require a file that has async/await calls in it, but nothing's yet executed. But the moment we go back to 1.7.8 it starts working again.
Issue 1:
The following code should be disallowed in strict mode and ES5:

"\5";
"\05";
"\55";
"\055";

This is disallowed by Annex B.1.2 of the EcmaScript 5 spec.

Issue 2:
When setting up a default tsconfig.json file, we had initially put noEmit: true, so that people could run tsc to typecheck without generating a file (useful for some people's IDE configs and development styles).

It would be nice to be able to still use --out (or perhaps some other keyword if noEmit is meant to capture mistakes) so that we wouldn't need to modify our config to generate an output file, while not having people accidentally generate a bunch of files when calling without --out.

Current behavior is:

╰─$ tsc --out test.tsout
error TS5053: Option 'noEmit' cannot be specified with option 'out'.
Issue 1:
I'm trying to use Next.js to render part of my app, but I keep getting

ReferenceError: document is not defined
at Object.<anonymous> (/Users/patricklu/Q5/lunyr/Lunyr-Frontend/node_modules/domkit/builtinStyle.js:3:18)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/patricklu/Q5/lunyr/Lunyr-Frontend/node_modules/domkit/getVendorPropertyName.js:3:20)
at Module._compile (module.js:569:30)

There's no instance in my app where I reference domkit, but somehow it keeps showing up. I only have one page in my app, and I've gone so far as to change my render method to this:

render() {
return (
<div>
</div>
);
}
}

But it's still not rendering properly.

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

Expected Behavior

Renders fine.

Current Behavior

Render error

Your Environment

Tech
Version

next
5

node
8.1.2

OS
macOs

browser
Chrome

etc

Issue 2:
Hi there, I'm trying to find a way to know if i'm coming through browser history.

The page gets its initial data through custom routing, eventually fetching it on its own if the

variable is empty.

class Index extends Component {
static async getInitialProps ({ query, store }) {
const loc = store.getState().localization

let pageData = query.initialData

if (!pageData) {
const Fetch = new ApiGetHome(`${loc.region}/${loc.language}`)
const res = await Fetch.getData()
pageData = res.response[0]
}

// destructuring response data
const { title, slider, main, footer } = pageData

[...]

Navigating to an Internal URL, and then coming back from browser history, I think that getting a variable like isFromHistory or something similiar could be useful to prevent a new data fetch.

I have searched the issues of this repository and believe that this is not a duplicate.
Issue 1:
Steps to Reproduce

Create a TextField with onSubmitted function

Run app in Android simulator

Press enter on keyboard

onSubmitted is not called

Logs

Whenever you press Enter these come up in the error log:

W/IInputConnectionWrapper( 8999): getCursorCapsMode on inactive InputConnection
W/IInputConnectionWrapper( 8999): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 8999): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper( 8999): getTextAfterCursor on inactive InputConnection
W/IInputConnectionWrapper( 8999): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper( 8999): endBatchEdit on inactive InputConnection

[✓] Flutter (Channel master, v0.5.6-pre.121, on Mac OS X 10.13.5, locale en-US)
• Flutter version 0.5.6-pre.121 at /Users/droider/flutter
• Framework revision a4faa2e067 (85 minutes ago), 2018-07-02 16:35:43 -0700
• Engine revision 6fe748490d
• Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/droider/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.2

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5556 • android-x86 • Android P (API 27) (emulator)

Issue 2:
Enter key blurs the field, which is unexpected. It essentially maps to the "done" key on the android keyboard which hides the keyboard, but that seems wrong when using a physical keyboard. We should seek UX guidance on what the right behavior is here.
Issue 1:
Hi,

My masters thesis is on making neural nets use less memory. One technique I am looking at is memory checkpointing. I can solve for the optimal policy (including multiple recomputations), given the memory budget and per-operator compute/memory costs.

I am attempting to implement memory checkpointing as done in torch.utils.checkpoint, except allowing for multiple recomputations. However, there a couple things from the implementation that I'm not quite sure I understand. Apologies if anything is obvious, I have been using PyTorch for <2 days.

Why detach the inputs in the backward before recomputing the forward? Would you get something like the gradient of the forward being accumulated twice into the input's gradient? Also, does this detaching not duplicate the input resulting in higher than necessary memory cost?

I was trying to implement multiple recomputations by trivially building on the existing checkpoint function, for example by creating a module that performs 1 -> drop(2) -> 3, where the module 2 itself performs 2a -> drop(2b). drop is like a higher-order model whose forward simply performs checkpoint(child_model, x). Thus, running 2 should drop 2a and 2b in the forward pass; and in the backward pass, recompute 2a, recompute 2b and drop it, then recompute 2b a second time, this time actually saving it. Obviously, that's not so smart but its a simple example.

I believe the following chain of events will occur in practice:

1's forward is performed, whose output is propagated to drop(2)'s forward function.

drop(2)'s forward invokes CheckpointFunction's forward, which saves (checkpoints) the input, and performs 2's forward without tracking gradient. The intent is that both the outputs of 2a and 2b will be dropped at this stage.

2a performs its forward and the output is passed to drop(2b)'s forward.

a. If I set up this 'drop' wrapper to not detach its input before passing to the child model, the CheckpointFunction forward will throw an error about none of the inputs have requires_grad=True.

b. If I do detach the input, I suspect this will not work either: it will save the input to 2b thus checkpointing it, which, as mentioned in step 3, I do not want to happen!

On the other hand, maybe it will be freed because of how everything is set up and autograd's reference counting?

Maybe, as drop(2b) saves its input, and 2a was run with no grad, you get an unreachable cycle between them that will get garbage collected?

I really lack the autograd understanding to know (see the <2 days of PyTorch). I also do not know how to profile this to observe if it drops the tensor or not.

If my anaylsis is right, I will have to implement this drop operator from scratch such that it avoids this behaviour, correct?

Thank you for making it this far and sorry if the above explanations are not great, it would be easier with diagrams. Any help on this would be greatly appreciated.

Issue 2:
It looks like THPVariable_invert should be implemented in C++ to avoid duplicate work from a JIT team.

For more details, please, see PR comments.
Issue 1:
Debugging a Node program that uses util.inspect hangs the underlying node process.

I stumbled across this while working on an app that depends on the Azure Storage SDK for Node (it uses util.inspect). I don't have a workaround for debugging right now, but the app works fine when running directly from the command line.

I've created a repro of the problem here:

https://gist.github.com/benquarmby/36f6c00947ad04509212

Steps:

Create a script that invokes util.inspect on an object

Place a breakpoint in the script after the call util.inspect

Start debugging

Observe that the breakpoint is not hit

Environment:

VSCode 0.10.6

Windows 10 x64

Node 5.5 x64

Issue 2:
launch this snippet test.js:

var obj = {};
console.log(obj);
console.log(obj);

with node --debug-brk test.js and attach a debugger, e.g. node-inspector or VSCode.

The first step command works fine, the second step crashes node on all platforms.