WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Sam Brannen opened SPR-7161 and commented

The reference manual should updated regarding PetClinic's new location (i.e., available in a separate subversion repository), etc.

See comments in the forums.

Affects: 3.0.2

Reference URL: http://forum.springsource.org/showthread.php?t=73291&page=2

Issue Links:

#11822 Link to location of Spring samples in reference documentation ("is duplicated by")

#10890 Update PetClinic tutorial, readme files, and DB scripts for Spring 3.0

Referenced from: commits 42cdfbc

Issue 2:
Bob Brady opened SPR-3616 and commented

I am using HibernateTemplate to load all persisted objects of a class that has a collection of enums. The problem is that for each enum in the collection, I get a copy of the parent object when calling HibernateTemplate's loadAll.

Say ExampleDomain is the parent class and it has a collection of Units like so:

[CODE]

@CollectionOfElements(fetch=FetchType.EAGER)

@JoinTable(joinColumns = @JoinColumn(name="MY_EXAMPLE_ID"))

@Column(nullable=true)

@Enumerated(value=EnumType.STRING)

public Set<Units> getChosenUnits()

{

return this.chosenUnits;

}

[/CODE]

Then If I add three Units to the an instance of ExampleDomain and persist it, HibernateTemplate will return three identical copies of the persisted object! Here's a snippet:

[CODE]

ExampleDomain ed = new ExampleDomain();

...

// Add 3 Units to collection

Set<Units> allUnits = new HashSet<Units>();

allUnits.add(units1);

allUnits.add(units2);

allUnits.add(units3);

ed.setChosenUnits(allUnits);

// We're, clean: this returns an empty list

List<ExampleDomain> domains = this.getHibernateTemplate().loadAll(ExampleDomain.class);

// Persist the newly created ExampleDomain object

this.getHibernateTemplate().saveOrUpdatel(ed);

// Now we get back three duplicate objects!

domains = this.getHibernateTemplate().loadAll(ExampleDomain.class);

[/CODE]

Myself and a co-worker have duplicated this behavior with different classes, but the same collection of enum elements format. Also, others have reported a similar issue in the Spring forums (Re: http://forum.springframework.org/showthread.php?p=128103&posted=1#post128103 ).

Our workaround is simple to use HQL instead of loadAll:

[CODE]

this.getHibernateTemplate().find("from ExampleDomain");

[/CODE]

Thank you,

Bob

Affects: 2.0.6
Issue 1:
Description of the new feature/enhancement

Hello everybody, I think it is a good idea to give the user the possibility to pick colors of the currently opened tabs. The use case is the following: I use command line git and I work on multiple projects in parallel. This means that I have multiple tabs, each for a different git repo.

I want to be able to differentiate at a quick glance which tab is for which folder/repo/project/whatever and a tab color (if I can set one) is very strong visual cue.

For example, Visual Studio Code has the Peacock extension, which gives you the possibility to color your editors differently, according to the project you are currently working on.

Visual Studio has similarly SolutionColor

Proposed technical implementation details (optional)

What I imagine is that, if the user does a right click on a tab, a menu is shown, with an element called 'Choose a color' or something similar. When the element is clicked, a simple color picker (ala OneNote) is displayed:

Then there are two possibilities:

the simple one is that the tabs are colored in the selected color and after the application is closed, this information is lost

the more complex one: the application takes note of the current working dir of the shell, belonging to the tab and as long as the shell remains in this folder or a subfolder, the tab is colored in the chosen color. If this is even possible, one can store the folder/chosen color list in the settings and restore the tab colors, after the application is restarted.

If this is interesting to you, I would like to try to implement it. What are your thoughts?

Regards

Issue 2:
Environment

OS - Windows 10

Windows build number: Version 10.0.18362.239]
Windows Terminal version (if applicable):0.2.1831.0

Any other software?

Steps to reproduce

Type a any command in the new terminal for example md new_folder_name

change directory to the new folder

Press the arrow up key

Causes the misaligned text in the terminal and duplication of the text randomly on the terminal window. See the below image
Issue 1:
Is your feature request related to a problem

Not a bug, just a problem with my CI system.

I want to be able to programmatically access the openapi schema and save it to a file without running the web server

The solution you would like

Ideally, I'd like to write a script that would output the openapi schema without running the webserver.

from myapp.api import api
json.dump(
get_schema_from_app(api),
open('openapi_schema.json', 'w')
)

Describe alternatives you've considered

I've considered running the app in my CICD workflow and requesting the schema via http, but that seems like a lot of overhead, and I'd bet the functions to do what I want are already in the code and just need to be invoked in the right order.

Additional context

Nothing to add, other than I'm gonna open a PR and see if I can figure it out.

Issue 2:
Is your feature request related to a problem

Is your feature request related to a problem?

In a common CI environment there are cases when automatically deploying an openapi.json to services like Github Pages can very useful. However, in order to access the openapi.json thats generated after fastapi instance is running and providing the docs endpoint is sub-optimal because it requires spinning up the service in CI just to curl that file.

The solution you would like

Add extra flags to fastapi that will allow to generate the openapi.json without running the service instance.

For example when invoking via uvicorn pass extra args that fastapi will somehow intercept and produce the openapi file to specified location:

uvicorn main:app --fastapi_generate_openapi --fastapi_openapi_output "{output_path_goes_here}"

If its not possible to intercept the args when invoked via uvicorn, then perhaps another alternative is to provide a simple fastapi cli, pre packaged with the python module and do something like:

fastapi --fastapi_generate_openapi --fastapi_openapi_output "{output_path_goes_here}"

Describe alternatives you've considered

As described in problem description, the working alternative is running the instance and curling the openapi.json from the docs endpoint.

Additional comments

If this feature is somehow already available and someone could provide a link to how to use/invoke it ill greatly appreciate it and close the GitHub issue :-)
Issue 1:
Migrated issue, originally created by Varialus (@varialus)

Flushing data to disk with SQLite locks the whole database until a commit has been performed. Because the autoflush setting is enabled by default, if a flush goes unnoticed, the database will stay locked, blocking all other threads. SQLite is commonly used while evaluating SQLAlchemy, so the your default settings should work seamlessly with it.

Risk Mitigation Ideas

If the autoflush value is manually specified while making a session, then if an SQLite engine is being used, autoflush should be set to False by default.

Add some bright warnings to your documentation.

Don't allow autoflush to be set while using SQLite.

Disable autoflush by default regardless of the database.

Change the behavior of SQLite to not lock the whole database while performing writes to disk. The optional support for write-ahead logging which was added in SQLite version 3.7.0 may be of interest.

Flush to a cache.

Demand that SQLite change their default behavior to suit SQLAlchemy.

Attachments: TestCaseAutoflushLocksSQLite.py

Issue 2:
Migrated issue, originally created by Andrew Paulo Robillo (@shimofuri)

I'd been copying this snippet from my old cookbook to add a surrogate key to a declarative table class:

class MixinIntKey(object):
@declared_attr
def key(cls):
return Column(
pg.INTEGER,
Sequence(f"sqk_{cls.__tablename__}", 1, 1),
nullable=False,
primary_key=True
)

This code was working before (some 3-4 years ago, I think around version 0.8 ): it generates the Sequence when I build the database objects through metadata.create_all(). The only change I made to the snippet was to update it to use format strings (Python 3.6).

After some googling around and testing (see attached file/link), the Sequence can be generated only if the metadata is passed during Sequence init:

Sequence(f"sqk_{cls.__tablename__}", 1, 1, metadata=metadata)

My environment: psycopg2==2.7.1, SQLAlchemy==1.1.8, Python 3.6 64bit on Windows 8.1 64bit, PostgreSQL 9.6 server

Attachments: sequence_bug.py
Issue 1:
Even if my code is working i get this error

Challenge Checkpoint: Stand in Line has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
// Your code here
arr.push(item);
item = arr.shift();
return item; // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));

Issue 2:
Challenge Bonfire: Stand in Line has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
arr.push(item);
return arr.shift(); // Change this line
}

The above version passes, since the three initially-supplied calls at the bottom to Console.log have been removed. Without the removal, submitting the code yields a stack overflow error.

In other Bonfires and Waypoints that I've done (a lot of them), there was no instance where the testing code (usually, just an illustrative function call) needed to be removed for a submittal to pass. Thus, this Bonfire does not conform to the normal pattern.

IMO, providing this testing code at the bottom for this Bonfire is overkill. By this time, if campers want to test in their own environment, they have figured out how to do so. Also, the calls to JSON.stringify are unnecessary - console.log can handle an array of integers without it.
Issue 1:
React version: 16.13.1

Steps To Reproduce

Create function with generic type parameter

Use that generic type parameter in useCallback, useEffect or useMemo

Example:

export function useDocument<TDocument>(path: string, defaultValue: TDocument | undefined = undefined): TDocument | undefined {
const [value, setValue] = useState<TDocument | undefined>(defaultValue);

const onNext = useCallback((snapshot: FirebaseFirestoreTypes.DocumentSnapshot<FirebaseFirestoreTypes.DocumentData>) => {
if (snapshot.exists) setValue(build<TDocument>(snapshot.data(), snapshot.id));
else setValue(undefined);
}, []);

useEffect(() => firestore().doc(path).onSnapshot(onNext), [onNext, path]);

return value;
}

The current behavior

Shows error React Hook useCallback has a missing dependency: 'TDocument'. Either include it or remove the dependency array.eslintreact-hooks/exhaustive-deps)

The expected behavior

Should not show any errors, because it isn't possible to add types to the dependencies array (types don't exist at runtime!)

Issue 2:
React version: 16.13.1 (although this is related to the eslint plugin).

Steps To Reproduce

Install eslint-plugin-react-hooks@4.1.0 with @typescript-eslint/parser@4.0.1 in a TypeScript project.

Within your hook define a type, or cast a value to a certain type`

const actions = useMemo(
() => bindActionCreators(MultishiftActions, dispatch) as Partial<Item>,
[dispatch],
);

eslint-plugin-react-hooks responds with this error React Hook useMemo has a missing dependency: Item. Either include it or remove the dependency array.

Link to code example: remirror/remirror/pull/619

Checkout the remirror codebase

git clone https://github.com/remirror/remirror
git checkout typedoc

Install the dependencies with pnpm. To setup pnpm run npm i -g pnpm.

Run the command pnpm run lint:es to lint the codebase.

The current behavior

Types are identified as missing dependencies within a hook and CI fails.

The expected behavior

Types shouldn't be identified as missing dependencies.
Issue 1:
Small, nickpicky-issue: a lot of applications, especially document-based apps offer a quick way to create a new document/window directly from the dock. Terminal.app is a great example of this:

It’d be useful if Atom could do the same thing, but the current options are:

Issue 2:
Please consider adding a "New Window" option on the dock context menu for Atom. This change would make working with many spaces much more pleasant.

Post-change:

Change to intended space for new window.

Click and hold (or Ctrl-click, or right/two-finger click) on the Atom icon.

Select "New Window".

Work.

Currently:

Change to intended space for new window.

Click and hold (or Ctrl-click, or right/two-finger click) on the Atom icon.

Curse because there's no "New Window" option, using an irreverent compound "swearword" with another swearword added (and presumably set off by hyphens) in the middle.

Click the Atom icon and watch transition to another space.

Press Shift-Cmd-N (or use the menu).

Use the Mission Control gesture (three finger upward swipe).

Drag the new window to the intended space.

Click the intended space.

Work.

I'm having a little bit of fun with the procedure above, but the change would be really helpful.

Examples of current behavior and the context menu option in Safari:
Issue 1:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0

Using a windows port of ncurses to work with a TUI application.

Steps to reproduce

Print key code received on key press to terminal. Specifically the issue is with key codes for arrow keys. In cmd and powershell these are in the range 258 to 261, while when using windows terminal is in the 450-456 range with each being an even number in that range, inclusive. Most other keys seem to retain the same key values.

Expected behavior

It would be nice to have the same key code for arrow keys so that TUI applications can work in windows terminal, if not, then is there documentation for the keycodes for each key and their differences with those found in cmd or powershell?

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 18945.1001]
Windows Terminal version (if applicable): commit id 3f62c8b

Steps to reproduce

from #2113

Open tab too fast and many of them.

Using shortcut key(default ctrl+shift+number) makes easy to open lots of tab at once

Which I was doing was holding shortcut key(crtl+shift+2 to open cmd) for few seconds.

(with tabTitle as cmd)

clicking on a tab and clicking in the console makes "only that" tab name to be shown like as normal.

Expected behavior

Title shows.

Actual behavior

newly fastly opend tab's title doesn't show before clicking a tab and clicking in the console.
Issue 1:
In the BS3 grid and form documentation, you show offsets with classes like

class="col-lg-10 col-lg-offset-2"

Couldn't get it to work, till I looked in the stylesheet and realized there is no style for col-lg-offset-whatever. There is only col-offset-whatever.

Is my stylesheet incomplete or is the documentation incorrect?

Issue 2:
Reproducible on iPhone and iPad. Visit http://twitter.github.com/bootstrap/javascript.html#tooltips

Tap on any of the tooltip examples to show a tooltip then tap away on empty space on the body, the tooltip does not close.
Issue 1:
Say I have two indexes, one with a field named "sortfield" and the other is missing a mapping for this field.

I'd like to run a query against both indexes and sort on sortfield. The index that does not contain this value would treat it as being missing and then use the logic defined in this feature to determine if they go at top or bottom:

#772

Let me know if there are any questions.

Thanks!

Issue 2:
This is a follow up to #772 that supports special sorting for 'null' values for numeric fields. The same would be very useful for (not analyzed) string fields as well. If feasible, special handling for empty and blank strings would be useful. The latter is however optional as it is possible to achieve uniform handling by filtering out blank values at indexing time.
Issue 1:
Found in variables.less (and, possibly in other files .less source files), comments that start with //* can trick some compilers or style highlighters as /* combination typically means start of a comment block. Add a space after the double-slash (e.g. // *) or use a different (and consistent) commenting style that does not create comment style clashes.

Issue 2:
I'm not sure why the comments in the variables.less got changed to this style //**, but it my opinion it was a brave move.

For me at least it prevents compilation when using the nodejs compiler lessc.

At also breaks the syntax highlighting in my IDE, Visual Studio 2013
Issue 1:
This is a follow-up to my comments in issue #7828.

All subscribers listening for a PRE_SET_DATA event will receive model data. This can be problematic since certain field types start to dictate a very specific format for data in the model. even with a data transformer in place.

For example, in my usecase I have model data which could work with the CollectionType, which registers a ResizeListener internally. My data needs transforming before hitting the ResizeListener, as it expects a certain format of data. Since the ResizeListener receives model data on PRE_SET_DATA, there is no mechanism to prepare the data for the listener. The end result is I have to modify the model data itself to get it through the ResizeListener.

Ultimately, a PRE_SET_DATA listener can introduce a specific data format requirement on the model, which can't be solved by simply adding a data transformer.

My thoughts are that if listeners (or at least the ResizeListener specifically) received normalised data, which a transformer can take care of, it wouldn't be possible to impose specific format requirements on the model.

Issue 2:
Starting on a PR regarding another issue and I hooked up on of my applications to 2.8 instead of 2.6. For me this was 2 seconds to figure out it was caused by the old way of defining a factory service + method, but the error message might cause a lot of confusion for others. The message is thrown in the Definition class rather than the place where you expect it (Yaml Loader in this case).

The fix for this is to change your service definition:

# old
app.layout.menu.beta:
class: Knp\Menu\MenuItem
factory_service: app.layout.menu_builder
factory_method: createBetaMenu
tags:
- { name: knp_menu.menu, alias: beta }

# new
app.layout.menu.beta:
class: Knp\Menu\MenuItem
factory: [@app.layout.menu_builder, createBetaMenu]
tags:
- { name: knp_menu.menu, alias: beta }

The thing is that the error message below does not clearly reflect that. I don't think it's desired to put this information in the message below, but maybe someone has a nice idea where to put it instead.

Deprecated: The Symfony\Component\DependencyInjection\Definition::setFactoryMethod method is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in /home/ivanderberg/projects/symfony/src/Symfony/Component/DependencyInjection/Definition.php on line 137
Issue 1:
I am aware of #6773, but I thought this should be a separate issue (the former being Ubuntu specific).

@seppestas maybe can tell if it's a duplicate ?

Consider the following simple app:

const {app, Menu, Tray} = require('electron')

app.on('ready', () => {
const appIcon = new Tray('/path/to/icon.png')
const contextMenu = Menu.buildFromTemplate([
{label: 'Item1', type: 'radio'},
{label: 'Item2', type: 'radio'}
])

appIcon.setContextMenu(contextMenu)
appIcon.on('click', () => console.log('click'))
})

click events are not fired when clicking the tray icon. As noted in #6773, this means menubar apps will not work.

macOS version: 10.12

Electron version: 1.4.6

Issue 2:
Electron version: 0.35.0

Operating system: OS X

Currently the click event on the tray doesn't trigger on OS X, it does so on Windows

tray = new Tray(path.join(__dirname, '/img/app.png'));
tray.on('click', function(){
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
});
Issue 1:
When trying to embed a Video you can use the HTML tag. For some reason if you put the muted attribute on it, it won't stick to the DOM, which doesn't allow videos to autoplay what makes it difficult with privacy settings of a couple of browsers like Safari on IOS. So here is a proof. I noticed it after a couple of tests on IOS. For me the muted tag wasn't important for playing videos on Chrome. On IOS the video just autoplays when the muted-tag is set.

-->

My research has shown that the bug has existed since 2016.

Fix just for now but not practically:

let’s use dangerouslySetInnerHtml to ensure the muted attribute is written to the DOM:

Issue 2:
React version: 16.12.0

Steps To Reproduce

Have a form with controlled input (i.e. value is set through onChange handler)

Type cheese into the input

Submit the form

Reload the page

Focus the input, type c

cheese is not suggested

https://codesandbox.io/s/ancient-currying-oqgt6

It works when a uncontrolled input is used (i.e. value is not set by react onChange handler)

Have a form with uncontrolled input

Type cheese into the input

Submit the form

Reload the page

Focus the input, type c

cheese is being suggested

https://codesandbox.io/s/naughty-dijkstra-p3n42

It's not about autofilling address data or passwords, but data previously filled in by the user.

We noticed this issue in Chrome, Firefox and Safari. Even though we could not get any autocompletion to work in Safari, even without React. (We could in Chrome and Firefox)

Thanks!
Issue 1:
Since TypeScript 1.4, using the Compile on Save feature, enum members are not being replaced with their literal values in the output js file.

The same operation via a full project build inserts the literal value as expected. This occurs for both regular and const enums.

In the linked example project, there is an enum file "Animals.ts" which is being AMD-imported into the class file "Farm.ts". If you make a minor edit to the Farm.ts file (e.g. insert a space and save), then line 4 of Farm.js shows:

this.animals = [Animals.Chicken, Animals.Cow, Animals.Sheep];

Whereas, if you do a project build, the line 4 of Farm.js shows the expected output:

this.animals = [3 /* Chicken */, 0 /* Cow */, 1 /* Sheep */];

Example project: https://www.dropbox.com/s/xc34f0q6rhc0amm/ExampleProject.zip?dl=0

I can confirm that this is happening in both VS2013 + TS1.4 and VS2015 CTP.

Issue 2:
Hi,

I installed Visual Studio Community 2013 and Typescript 1.4. When I changed all my enums to const enum (btw, very nice feature, thanks!) I noticed that compile-on-save feature doesn't handle this feature well.

When I use those const enums in other file than the one it was defined in then when I save file, they are not resolved to constant numbers.

For example I have file firstFile.ts:

const enum TestEnum {
Foo, Bar
}

var testFirstFile = TestEnum.Bar;

and when I save file (by pressing Ctrl+S) i get file firstFile.js:

var testFirstFile = 1 /* Bar */;
//# sourceMappingURL=firstFile.js.map

but When i have secondFile.ts file:

/// <reference path="firstfile.ts" />

var testInOtherFile = TestEnum.Bar;

and save file I get secondFile.js:

/// <reference path="firstfile.ts" />
var testInOtherFile = TestEnum.Bar;
//# sourceMappingURL=secondFile.js.map

only when I build project in Visual Studio I get proper secondFile.js file:

/// <reference path="firstfile.ts" />
var testInOtherFile = 1 /* Bar */;
//# sourceMappingURL=secondFile.js.map