WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
The compiler requires an index signature parameter to be "string" or "number" specifically, and doesn't allow type aliases.

type CustomId = string;

interface Works {
[customId: string]: string;
}
interface DoesNotWork {
[customId: CustomId]: string;
}
// An index signature parameter type must be 'string' or 'number'.

Shouldn't CustomId be allowed there?

Issue 2:
According to #5185, string literal types are assignable to plain strings. Given the following type definition:

type NodeType = "IfStatement"
| "WhileStatement"
| "ForStatement";

Both these assignments are valid:

const nodeType1: NodeType = "IfStatement";
const nodeType2: string = nodeType1;

However, string literal types currently can't be used as index signature parameter types. Therefore, the compiler complains about the following code:

let keywords: { [index: NodeType]: string } = {
"IfStatement": "if",
"WhileStatement": "while",
"ForStatement": "for"
};

// error TS1023: An index signature parameter type must be 'string' or 'number'.

Shouldn't that scenario be supported, given that string literal types are assignable to strings?

/cc @DanielRosenwasser
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Spinner should looks like in chrome

Current Behavior

Spinners looks like whole circle

Steps to Reproduce

MacOS 10.13

Open Safari 11.0

Go to the official documentation (https://material-ui-1dab0.firebaseapp.com/demos/progress/#circular)

Check circular progress animation

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.12

React
15.6+

browser
Safari 11.0

etc
MacOS 10.13

Issue 2:
Circular progress doesn't work on safari, it looks full.

Open next docs in safari.

Versions

Material-UI: Next branch

Browser: Safari 9.1.3, 10.1; Firefox 45.8.0
Issue 1:
I need to implement object permission in my application. I can handle this in each endpoint but it will lead to a lot of duplicated code.

For example:

@router.get(...)
def read_item(..., item_id: int, ...):
item = service.get_item(id=item_id)

if item.owner_id != current_user.id:
raise NotOwnerException

...

This is a simple scenario.

Is there a way to handle object permission without having to repeat code, maybe using dependencies injection?

I will need in some way to pass item_id to the dependency but I think that it's not possibile.

Has anyone found a viable solution?

I could also create a function like this:

def check_permission(item: Item, current_user: User)
...

and call this function in each endpoint, but it doesn't seem a very elegant solution.

What do you think?

Issue 2:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

# An example based very roughly on https://github.com/grpc/grpc/blob/master/examples/python/helloworld/async_greeter_client.py
from fastapi import FastAPI, Depends

app = FastAPI()

import grpc
import helloworld_pb2
import helloworld_pb2_grpc

async def get_stub():
async with grpc.aio.insecure_channel('localhost:50051') as channel:
stub = helloworld_pb2_grpc.GreeterStub(channel)
yield stub

@app.get("/")
async def my_endpoint_with_a_grpc_stub(stub = Depends(get_stub)):
response = await stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
return f"Greeter client received: {response.message}"

Description

I am looking for advice on how to correctly use FastAPIs dependency injection the GRPC aio library (I need to use this to make requests to a dependent service)

The examples all seem to open a channel and use it but then the docs for the sync bits imply that I should multiplex over a single channel https://github.com/grpc/grpc/tree/master/examples/python/multiplex while the AIO docs warn of thread safety and other things (https://grpc.github.io/grpc/python/grpc_asyncio.html) .

Unlike the sync lib I cannot init the channel when the file is imported because there is no event loop when that occurs. Should I be doing it in a startup event ?

Has anyone used the grpc.aio lib with fast api?

Operating System

Linux

Operating System Details

Debian / Ubuntu containers

FastAPI Version

0.85.0

Python Version

3.10

Additional Context

No response
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-build-web-apps-with-expressjs has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Run expressworks and no listing in the menu for Session and Cookie.

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-build-web-apps-with-expressjs has an issue.

Session and Cookie is no longer in expressworks. the two that seem to be the replacement for this are called PARAM PAM PAM and WHAT'S IN QUERY. Also, after Hello World, expressworks has a Static step that helps with the Stylish CSS step done right before the PARAM PAM PAM step. I can create a pull request with the new suggested setup if you guys want. Or if there is something that I am not seeing or the page needs to be setup in a different way please let me know.
Issue 1:
If I want to write | (pipe), I press AltGr + ´ or in keycodes 17+18+192. Possible you could omit 17.

What happens is that the code block collapse. Since I'm writing javascript, I need to write | on a daily basis.

I couldn't find anything about AltGr on https://atom.io/docs/latest/customizing-atom#customizing-key-bindings

Issue 2:
Original issue: atom/atom#1625

Use https://atom.io/packages/keyboard-localization until this issue gets fixed (should be in the Blink upstream).
Issue 1:
I install matplotlib on OS X using a Gentoo prefix install. Everything seems to work ok. The only problem I've encountered so far is that when I try to save something to a file, I can't change the filename on the dialog box, because the keyboard strokes go to the terminal where I am running python. I don't know if this is a matplotlib issue or a issue in tkinter from Python, but matplotlib is the only place where I have this problem.

Issue 2:
I'm using OS X Lion, Python 2.7.2 built by Homebrew with llvm-gcc, and matplotlib installed via pip install git+git://github.com/matplotlib/matplotlib.git. There are no errors or other alarms during installation.

When I make an interactive figure with the Mac OSX backend the keyboard focus does not go to the plot window, it stays in the terminal. Mouse focus does go to the window. Clicking on the save button brings up the save dialog and I can click on things there, but typing just sends text to the terminal, making it impossible to specify a file name.

This seems to be the same as an issue reported on the ipython repo last year: ipython/ipython#1188 (I am not using ipython, though.)

If I switch to the Tkagg backend things work fine.
Issue 1:
ℹ Computer information

PowerToys version: v0.22.0

PowerToy Utility: FancyZones

Running PowerToys as Admin: Yes

Windows build number: 19041.508

📝 Provide detailed reproduction steps (if any)

Set Fancy Zones Layout

Click app and hold shift

Translucent zones should appear and drag the window to preferred zone to have the app "snap" to the area

✔️ Expected result

Translucent zones should appear and an app should snap to that zone when placed within

❌ Actual result

The translucent zones do not appear when dragging windows and holding shift and apps do not snap

I have it set so windows become translucent when shift is pressed within power toys so I know that power toys is active. The zones are not appearing though, and windows are not snapping within any potential zones.

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form

Issue 2:
ℹ Computer information

PowerToys version: 0.21.1

PowerToy Utility: FancyZones

Running PowerToys as Admin: No

Windows build number: [run "winver"] 20H2

Monitor setup: 1 x 5120x1440 Samsung CRG9 49" Ultrawide, DisplayPort connected

📝 Provide detailed reproduction steps (if any)

Launch Power Toys, Enable FancyZones

"Allow Zones to span across monitors" NOT ticked (single monitor setup)

Launch Zones Editor - comes up with "Focus" mode

Select any other zone layout, or try and edit to create your own, click apply

Zone Editor appears to crash, and the selected zones are not retained - open Zone Editor and you are back at "Focus" layout

No zone layout is actually active - shift and drag, no highlight, no zones to activate, and while dragging the window around to find the zone Explorer silently crashes (Fault Module Name: ucrtbase.dll).

FZ is definitely "active" at least in part as the dragged window reacts to "Make dragged window transparent" setting in FZ.

✔️ Expected result

What is the expected result of the above steps?

Zone Editor retaining setup, and usable zones.

❌ Actual result

What is the actual result of the above steps? See repro steps above - no usable FZ, and Explorer crashes.

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
Issue 1:
There are two copes of Biobuf in the compiler, cmd/internal/obj/util.go and cmd/internal/ld/util.go. Both are in various stages of decomposition, for example 05d5316 was applied to the latter, but not the former. The former has sort of had 05d5316 applied accidentally, and now Bungetc is inconsistent, some methods check the unget buffer, others do not.

If there must be a wrapper around bufio.Buffer, then there should be at most one in the compiler.

Preferably we should be using bufio.Buffer directly everywhere.

@rsc @robpike thoughts ?

Issue 2:
by james.fang.cn:

What does 'go version' print?
go version go1.2.1 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
see attachment program.

What happened?
1)length of buffer is 2 instead of 1
2)binary.Read panic with
panic: reflect: reflect.Value.SetInt using value obtained using unexported field

What should have happened instead?
skip lower-case field of struct, encoded buffer length is 1,
no panic when decode.

Please provide any additional information below.
maybe the following conditions in binary.go not quite right?

if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" {

v.CanSet will be false for lower-case field, but name is not "_", so it's not
skipped.

Attachments:

encoding_binary_bug.go (326 bytes)
Issue 1:
Using tooltips on buttons inside a btn-group will make the buttons to the right of the mouse-over move slightly to the right.

Mouse over "First" & "Second" and see the buttons shift over a little.

http://jsfiddle.net/MgcDU/2749/

Issue 2:
http://jsfiddle.net/JEBdk/5/

tooltip or popover on btn-group. the btn-group is not display correctly!

the last btn have not round corners and between the btn's is a space.

my suggestion, by generating the tip or popover on the end of document .
Issue 1:
https://app.circleci.com/jobs/github/pytorch/pytorch/3958244

https://app.circleci.com/jobs/github/pytorch/pytorch/3958086

cc @ezyang @gchanan @zou3519

Issue 2:
https://app.circleci.com/jobs/github/pytorch/pytorch/3876399

https://app.circleci.com/jobs/github/pytorch/pytorch/3865899

https://app.circleci.com/jobs/github/pytorch/pytorch/3872182

cc @ezyang @gchanan @zou3519 @vincentqb @vishwakftw @jianyuh @nikitaved @pearu @mruberry
Issue 1:
System info

Playwright Version: v1.34.1

Operating System: Windows 11

Browser: -

Other info:

VS Code: 1.78.2

Playwright Test for VSCode: 1.0.11

Source code

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

Link to the GitHub repository with the repro

https://github.com/rothsandro/repro.playwright-vscode

Steps

Create a new folder and run npm init -y

Run npm init playwright@latest and accept all default values

Open the folder in VS Code

Install Playwright Test for VSCode extension

Open the Playwright panel to see all tests

Expected

The extension should show the example test.

Actual

No tests are shown

A toast "Please install Playwright Test ..." is shown

The problem only occurs with the latest version 1.34.1 of Playwright.

It works when installing the previous version 1.34.0

Issue 2:
System info

Playwright Version: v1.32.3

Operating System: macOS 12.6.5

Browser: WebKit

Other info:

The problem was also happening on Windows (with WebKit) with version 1.31.0 of Playwright. This seems to have been fixed in the latest version of Playwright.

Here is another issue similar to this one: #9466

Source code

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

Link to the GitHub repository with the repro

https://github.com/divdavem/kassette-playground

Steps

Clone repository:

git clone https://github.com/divdavem/kassette-playground
cd kassette-playground

Install dependencies

npm install

Run tests with proxy

npm run test:proxy

The proxy used in this scenario is kassette. It plays the role of a man-in-the-middle, it provides a certificate generated on the fly that is not signed by a recognized certificate authority. However, as the test uses ignoreHTTPSErrors, this https error should be ignored.

Expected

Tests succeed in all browsers on all platforms.

Actual

Tests only fail with Webkit on MacOS, cf the logs on GitHub CI

In the trace viewer, it is possible to see the following message: An SSL error has occurred and a secure connection to the server cannot be made.
Issue 1:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
no

Documentation request?
yes

Symfony version
3.4+

In last weeks I noticed that default logger behavior is confusing.

Test kernel setup results in additional (usually unwanted) console output with phpunit, etc.

Questions about it are pretty common on symfony slack channel, usually there is someone "who knows", but it shouldn't be like that.

And it's not easy to find out how to change it. Currently, the best description I found is @dunglas comment under a blogpost.

Console component docs was improved in #8896, but we still miss (I think so) documentation for minimalistic logger and something in testing section that could tell the others how it behaves and how to change it. Some recommendations here would be great.

I would love to help, but first: how do you see it?

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
yes

RFC?
no

Symfony version
3.4

When using a kernel, booting it and fully running it, logging is now on by default and outputting everything on your console. This means that in every kernel I define, I'll have to add the following line of configuration:

$container->register(NullLogger::class)->setDecoratedService('logger');

This issue is quite annoying as it garbles up the entire phpunit output, even when tests succeed. While I can understand that it might be nice for console apps to display this by default, I'm not interested in output like this when running tests (and nothing goes wrong).
Issue 1:
Issue: Cannot start elevated Windows Terminal using the "WT" shortcut

Environment

Windows [Version 10.0.18363.449]

WT Version: 0.6.2951.0

Steps to reproduce

open start menu

type "wt" (without quotes)

on the search results, right-click and select Run as administrator

Expected behavior

Start Windows Terminal elevated

Actual behavior

The following error appears:

[Window Title]

C:\Users\user\AppData\Local\Microsoft\WindowsApps\wt.exe

[Content]

C:\Users\user\AppData\Local\Microsoft\WindowsApps\wt.exe

The file cannot be accessed by the system.

[OK]

Issue 2:
Description of the new feature/enhancement

Currently, when using the mouse wheel, WT scrolls the fixed terminal output window regardless of the shell context. In an editor context like vi, or when viewing output from an interactive cli tool such as less, this doesn't make sense. Instead, the mouse wheel could act like the cursor up/down keys in these contexts. This is how ConEmu behaves by default, for example with vi:

Windows Terminal behavior in vi with mousewheel:

ConEmu behaviour in vi with mousewheel:

Proposed technical implementation details (optional)

Mouse Wheel should conditionally behave as cursor up/cursor down keys, depending on shell context. (I don't know enough about how one might determine the correct context to say what this should be; perhaps it's a simple as any context other than the command line itself, as in when any interactive process is running?)
Issue 1:
Tracking issue, base on a idea of @htcfreek from pull request #6975:

📝 Provide a description of the new feature

It would be nice to see the name of a color direct in the color picker

Show the color name in the color picker window

Add a option to copy the color name instead of the color presentation (when there is a color name)

(optional) When there is no color name, show a color name that is in the near (like a diff of 2% or so)

Issue 2:
Provide integration with Wox plugins

If integration is not possible then provide functionality of below plugins

Everything (https://www.voidtools.com/)

Wox.Plugin.Runner (http://www.wox.one/plugin/36) - Create simple command shortcuts
Issue 1:
All hypothesis tests should get a keyword alternative where applicable, with naming {'two-sided', 'less', 'greater'}. Tests that do have them now are:

kstest, added in 3e3e8ea, 7cf6643

fisher_exact, added in gh-1919

There are open issues to add alternative to:

ks_2samp, gh-2290

binom_test, gh-2417 (with code to copy)

mannwhitney, gh-2118 (more extensive issue, but includes link to a commit from @josef-pkt that adds the keyword).

Other functions where the keyword could be added:

chi2_contingency (R func: http://rpackages.ianhowson.com/rforge/corpora/man/chisq.html)

zscore (R func: http://rpackages.ianhowson.com/rforge/corpora/man/z_score_pval.html)

the various ttests (now only two-sided; R: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/t.test.html)

what else?

Issue 2:
I wouldn't normally post this here but the docs.scipy.org and mail.scipy.org domains are down and have been for almost 3 days, so the docs and mailing lists aren't working (so I can post to the mailing list itself). Feel free to close if this is already being looked into.

cc @pv @rgommers
Issue 1:
When edit markdown docs, if Toggle Soft Wrap is active, get no problem with English input, it will auto change to new line. But if input Chinese, it can't auto change to new line when reach right edge of editor, it will be longer line than it can display.

I found it seems problem with number of characters. For example, Atom display 100 English characters in one line, it will display 100 characters of Chinese in one line too. But one Chinese character will take twice room to display than English character.So it should change to new line when characters reach 50.

Hope someone can fix it. --Ubuntu 64bit

Issue 2:
Reported in Halp:

support/b47caffcaba511e3903bfcd96bef4da2

If I have a paragraph in CJK characters and toggle soft wrap, the wrapping point (should be the right edge of current window) is far away than the current edge and some characters are displayed out of window which is not visible.

I think this may because of the wrong processing of character wide. A latin letter has a width "one character width", but usually a CJK character has a width twice as a latin letter, it's "two character width". Hope this information may help you.

The debug info auto attached should include the test text I open now. It's include (from up to down): Chinese, Japanese, Korean, English. Actully they tell the same thing:)

I can reproduce this in Atom 0.75.0. (notice how CJK characters are not wrapped correctly at the right edge of the app)
Issue 1:
Challenge Name

Responsive Design with Bootstrap

https://www.freecodecamp.com/challenges/responsively-style-checkboxes

Issue Description

When a new challange starts, I always have first to "Reset" the challange, if not, I'm not able to place the cursor where I would like to code, or, when clicked into the coding part, the cursor "jumps" to another part and my code is entered there.

Browser Information

Chrom, Version 50.0.2661.94 m

Windows 10:

Desktop

Your Code

not relevant

Screenshot

not possible

regards

opel22

PS: in the jQuery-Part it is working again as expected.

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
This covers btree_range and collections_bound. Both try to address the combinatorics over inclusive/exclusive/none bounds on ordered queries. I am significantly unsatisfied with the current solution, which is btree.range(Bound(&K), Bound(&K)). This pushes all the combinatorics into a nasty calling convention. Instead, I believe we would be better served by a build pattern:

for x in btree.range().ge(&min).lt(&max) { .. }

This allows you to avoid importing and dispatching on enum. It also has the advantage of making simpler queries simpler. Compare:

// today (assuming you've totally imported the bound variants)
for x in btree.range(Unbounded, Inclusive(&max)) {

// tomorrow?
for x in btree.range().le(&max) { .. }

This also could potentially address rust-lang/rfcs#1195

let pred = btree.range().le(&max).get();

And can be extended to support drain or remove similarly;

for x in btree.range_mut().gt(&min).drain() { .. }

ler pred = btree.range_mut().le(&max).remove();

Which if desirable can be sugarred to direct methods on btree in the future.

Issue 2:
This compiles:

mod Foo {}
struct Foo;

fn main() {}

but this doesn't:

mod Foo {}
struct Bar;
type Foo = Bar;

fn main() {}

<anon>:3:1: 3:16 error: duplicate definition of type or module `Foo`
<anon>:3 type Foo = Bar;
^~~~~~~~~~~~~~~
<anon>:1:1: 1:11 note: first definition of type or module `Foo` here
<anon>:1 mod Foo {}
^~~~~~~~~~

I'd have expected both to either succeed or fail.
Issue 1:
While upgrading to 0.18.1 a new process killer popped up. I had three processes to kill: Alienware Command Center, nVidia Overlay and Microsoft Store. Having to manually kill these processes is a bit of a pain, especially when one, nVidia Overlay, is not killable.

In that popup, add an option for the installation process to kill those processes like Ccleaner does when the Cookies Options tab is accessed.

Issue 2:
Windows build number: 10.0.19041.264
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug: auto update

The update program requires to disable the Microsoft Store, Microsoft Text Input Application, Mail which are run at background. I can manually kill the process for Microsoft Store and Mail but Microsoft Text Input Application. However, I can just ignore this to continue. Just unsure does this effect anything.