sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Some SVG types would benefit from stricter appendChild() overloads
Labels: Suggestion,Help Wanted,Domain: lib.d.ts

``` typescript
interface SVGFEComponentTransferElement {
    appendChild(newChild: SVGFEFuncAElement): SVGFEFuncAElement;
    appendChild(newChild: SVGFEFuncBElement): SVGFEFuncBElement;
    appendChild(newChild: SVGFEFuncGElement): SVGFEFuncGElement;
    appendChild(newChild: SVGFEFuncRElement): SVGFEFuncRElement;
    appendChild(newChild: Comment): Comment;
}

interface SVGFEMergeElement {
    appendChild(newChild: SVGFEMergeNodeElement): SVGFEMergeNodeElement;
    appendChild(newChild: Comment): Comment;
}

...
```

to override the generic appendChild(Node) inherited from Node, and so on. This would make it an error to append a `<g>` to a `<feMerge>` for example.
Repository: opencv
Issue: opencv_test_gpu is failing
Labels: bug,priority: normal,affected: 2.4,category: gpu/cuda (contrib)

Based on the following topic http://answers.opencv.org/question/67953/opencv-2411-gpu-features I decided to do some tests with the GPU test suite.

System: Linux Ubuntu 14.04 x64 bit with CUDA7.0 support and OpenCV2.4 latest branch --> which built perfectly fine.

Configured the opencv_extra repo by
- cloning the repository into a folder
- performed a `git checkout 2.4`
- adding a system environment variable export `OPENCV_TEST_DATA_PATH=/home/spu/Documents/github/opencv_extra/`

Then I ran the sample by executing `./opencv_test_gpu` and it starts running just fine. Here and there a test fails due to it not being to able to find a specific image --> but less then before configuring opencv_extra repo.

Finally it crashes down on the following line

<pre>
[       OK ] GPU_ImgProc/CvtColor.Luv2LRGBA/22 (2 ms)
[ RUN      ] GPU_ImgProc/CvtColor.Luv2LRGBA/23
[       OK ] GPU_ImgProc/CvtColor.Luv2LRGBA/23 (2 ms)
[ RUN      ] GPU_ImgProc/CvtColor.RGBA2mRGBA/0
[       OK ] GPU_ImgProc/CvtColor.RGBA2mRGBA/0 (293 ms)
[ RUN      ] GPU_ImgProc/CvtColor.RGBA2mRGBA/1
Segmentation fault (core dumped)
</pre>


As you can see, no error, no warning, just a simple core dump ... anyone has a clue what could be wrong?
Repository: youtube-dl
Issue: Use description info to automatically divide output
Labels: request

In some large videos, the uploader usually marks in the description the parts of the video, putting the minutes and seconds of the beginning of a part. Something like this:

TITLE VIDEO

blablablablablabla...
00:00 Intro
05:00 First Part
10:00 Second Part
etc. etc. etc.

It could be an option what read a description like that (if exists, if not exists it do nothing different) and divide the output file using every line with a time consecutively. In the example case: Making some output videos like "Title Video 1 Intro" (00:00-05:00), "Title Video 2 First Part" (05:00-10:00), "Title Video 3 Second Part" (10:00-End Video) of the whole video "Title Video". It could ignore the rest of the lines of the description without a time, use the rest of the line with the time as name of the file (normally it usually is in the beginning of the line, but it could be detected in any position with a proper RegExp, erasing the time and copying the rest of the line) and add a number of the consecutively files outputs order. Of course, need some postprocessing after download.

It was useful to have the parts of the video, like i was my case, i have to download the whole video and edit to cut the parts i need, and with this i can have the parts already prepared. It can be useful too for that EPs and LPs uploaded entire in one video, and it can be downloaded in separate tracks directly. And it can be useful not only in Youtube.
Repository: TypeScript
Issue: Negated types
Labels: Suggestion,In Discussion

Sometimes it is desired to forbid certain types from being considered.

Example: `JSON.stringify(function() {});` doesn't make sense and the chance is high it's written like this by mistake. With negated types we could eliminate a chance of it.

``` typescript
type Serializable = any ~ Function; // or simply ~ Function
declare interface JSON {
   stringify(value: Serializable): string;
}
```

Another example

``` typescript

export NonIdentifierExpression = ts.Expression ~ ts.Identifier

```
Repository: opencv
Issue: OpenCV + Python multiprocessing breaks on OSX
Labels: bug,priority: normal,category: python bindings,category: core,affected: 3.4

I'm trying to use OpenCV with Python's multiprocessing module, but it breaks on me even with very simple code. Here is an example:

``` php
import cv2
import multiprocessing
import glob
import numpy

def job(path):

    image = cv2.imread(path)
    image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

    return path

if __name__ == "__main__":

    main_image = cv2.imread("./image.png")
    main_image = cv2.cvtColor( main_image, cv2.COLOR_BGR2GRAY)

    paths = glob.glob("./data/*")
    pool = multiprocessing.Pool()
    result = pool.map(job, paths)

    print 'Finished'

    for value in result:
        print value
```

If I remove `main_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)` script works, but with it in there it doesn't, even though that line shouldn't affect jobs processed by the pool.
All image paths lead to simple images, about ~20 of them in total.
Funny enough code works fine if I create images in memory with `numpy` instead of reading them with `imread()`.
I'm guessing OpenCV uses some shared variables behind the scene that aren't protected from race conditions.

My environment: Mac OS X 10.10, OpenCV 3.0.0, Python 2.7. 
The last few lines of stack trace are:

```
Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.root.default-qos
0   libdispatch.dylib               0x00007fff8668913f dispatch_apply_f + 769
1   libopencv_core.3.0.dylib        0x000000010ccebd14 cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) + 152
2   libopencv_imgproc.3.0.dylib     0x000000010c8b782e void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) + 134
3   libopencv_imgproc.3.0.dylib     0x000000010c8b1fd4 cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) + 23756
4   cv2.so                          0x000000010c0ed439 pyopencv_cv_cvtColor(_object*, _object*, _object*) + 687
5   org.python.python               0x000000010bc64968 PyEval_EvalFrameEx + 19480
6   org.python.python               0x000000010bc5fa42 PyEval_EvalCodeEx + 1538\
```

BTW - I got other OpenCV functions to crash when used with Python multiprocessing too, above is just the smallest example I could produce that reflects the problem.

Also, I got above algorithm (and much more complicated ones) to work in multithreaded C++ programs, using same OpenCV build on same machine, so I guess the issue lies on Python bindings side.
Repository: TypeScript
Issue: TypeChecker#getConstantValue(node) doesn't properly resolve values
Labels: Bug,Help Wanted,API

Courtesy of @ivogabe from [here](https://gitter.im/Microsoft/TypeScript?at=55c4bdfdcdd8bb455f2f8c7e).

> I'm working with the compiler api and I noticed that `TypeChecker#getConstantValue(node)` only returns a value if I first call `TypeChecker#getSymbolAtLocation(node)`. `node` is an ElementAccessExpression or a PropertyAccessExpression. Is that a bug or by design?
Repository: go
Issue: runtime: check for no preemption during write barrier
Labels: compiler/runtime

Check that write barrier routines cannot be preempted.

Go1.5Maybe because we may have time to add the checks to a local copy
and at least verify that there aren't any missing go:nosplits that are needed
(or add the ones that are needed) in the release branch.
Repository: rust
Issue: Inference fails when a type using a default also implements Deref.
Labels: A-type-system,T-compiler,A-inference,C-bug,T-types

The current code fails compilation:

``` rust
#![feature(default_type_parameter_fallback)]
#![allow(unused_variables)]

use std::ops::Deref;

#[derive(Clone, Debug)]
pub struct Foo<T: Clone + Default = ()> {
    bar: T,
}

impl<T: Clone + Default> Foo<T> {
    #[inline(always)]
    pub fn new() -> Self {
        Foo {
            bar: Default::default(),
        }
    }

    #[inline(always)]
    pub fn with<U: Clone + Default>(self, value: U) -> Foo<U> {
        Foo {
            bar: value,
        }
    }
}

impl<T: Clone + Default> Deref for Foo<T> {
    type Target = T;

    #[inline(always)]
    fn deref(&self) -> &T {
        &self.bar
    }
}

fn main() {
    Foo::new().with(0u8);
}
```

With:

```
test.rs:37:13: 37:22 error: the type of this value must be known in this context
test.rs:37      Foo::new().with(0u8);
                           ^~~~~~~~~
```

/cc @bluss @jroesch
Repository: neovim
Issue: Alternate file lost when using :terminal
Labels: bug,terminal,has:repro

Hello.
If I open a terminal with `:terminal` and get out of it, the alternate file is lost.
I get the error `E23: No alternate file` when trying to access it.
Thanks to fix this issue.
Repository: opencv
Issue: License compiler
Labels: priority: normal,feature,category: infrastructure

Due to the many flags for third party libraries, it is hard to scrape all licenses together. It would be neat to have cmake generating a compiled license file based on the used flags.

E.g. the new third party repository could have standardized parseable license files
Repository: go
Issue: x/tools/cmd/goyacc: add API to convert between state numbers and strings
Labels: FeatureRequest,Tools

I'd like to have an API to convert between state numbers (as defined by the external "lexer" constant) and  their string representation.

There is an internal function that sort of do it - yyTokname but there is a magical offset  between what the yacc internal code call state number, and the defined constant. And the magical constant differ between 1.4 and 1.5. For the other direction one have to go the yyToknames table itself, again with (a slightly different) magic offset that differ between version.

So the request is for simple API to do this conversion (an alternative is to give some type to the constant and then we can use the stringer tool).
Repository: opencv
Issue: imagestorage.cpp NegReader function has code that does not make sense
Labels: bug,priority: low,category: apps

Looking at the grabbing of the following image by the NegImage reader, which can be found [here](https://github.com/Itseez/opencv/blob/master/apps/traincascade/imagestorage.cpp#L50), we can find the following code snippet

<pre>
round += last / count;
round = round % (winSize.width * winSize.height);
last %= count;

_offset.x = std::min( (int)round % winSize.width, src.cols - winSize.width );
_offset.y = std::min( (int)round / winSize.width, src.rows - winSize.height );
</pre>


We can see in the header file that last is defined as integer, and count is defined as size_t, and is the amount of negative files available. This will result in the fact that `last/count` always equals 0, resulting in round always being 0. this means that `_offset.x and _offset.y` are also always 0 and thus this code seems actually to do nothing.

@mdim since you implemented this code, could you explain the reason behind this?
@vpisarev are we correct to state that removing these calculations would have no influence at all?

Somewhere it seems logical that for each image you always start at `x=0 and y=0` because else you simple ignore information of the negative sample windows.
Repository: youtube-dl
Issue: Support PBS Kids
Labels: site-support-request

Would it be possible to support pbskids.org shows?  For instance, http://pbskids.org/catinthehat/video/index.html
Repository: react
Issue: Include DevTools as Public API
Labels: Type: Big Picture,React Core Team

The idea is to have a multi-version extension that allow you to attach a "debugger" to a running React instance. This debugger protocol injects intercepted functions into a particular version of React which exposes development hooks.

Effectively this: https://github.com/facebook/react-devtools/tree/devtools-next/backend/integration

This is not intended to expose stateful reflection APIs in production use since it will negatively affect performance.
Repository: react
Issue: Hibernating State (Not Necessarily Serialized)
Labels: Type: Big Picture,React Core Team

Relay and others currently abuses some internals to get some persistent identity of a component. This effectively is used to restore the state of a component after it has been temporarily unmounted. It is also common to abuse Flux stores for this use case. Basically, since this capability doesn't currently exists, you're encouraged to use Flux for everything just in case you need this capability later on.

The purpose of this issue is to discuss a public API for hibernating the state of a component and then restoring it once the component remounts.

The use cases can be broken down into three scenarios:
- **List Item Out of View**:  E.g. Infinite scrolling (such as "table views") where one row eventually needs to be reclaimed to save the memory used by the tree that is out of view.
- **Detail View**: In a master-detail view, clicking one item in the list switches the state of the detail view. When you click on the original view again.
- **Back/Forward Button**: You want to save a snapshot of the state when you navigate. The new view can then change the state and when you hit the back button to return to a previous state, you want to restore the original state of the subtree.

We would like to support this at least in a non-serialized form. You could imagine having an API that serializes this to JSON or some other data structure too but that's a potential follow up and not necessarily part of this.

One potential API:

``` js
class View {
  state = { stateKeys: [{}, {}, {}] }
  render() {
    return <ChildView key={this.state.stateKeys[this.props.index]} />;
  }
}
```

Basically, an object is used as a key. Unlike the normal key semantics, the state of the subtree is kept in memory indefinitely. We use a WeakMap to keep the state. If the object ever goes away, the GC will collect the state of that subtree. This solves all three use cases.
Repository: TypeScript
Issue: Getting completions when writing out a dot in a parameter should suggest the splat operator
Labels: Suggestion,Help Wanted

At present the completions returned seem arbitrary. Example:

``` ts
function(arg: string, ./**/): any {
}
```

Getting completions at the marker yields the typical alphabetical list of global things - worse yet, in VSCode, pressing `.` again auto-completes the first one (`.AbstractWorker.` isn't really a valid argument name)! Very frustrating.
Repository: react
Issue: Externalize the State Tree (or alternatives)
Labels: Type: Big Picture,React Core Team

React provides the notion of implicitly allowing a child component to store state (using the `setState` functionality). However, it is not just used for business logic state. It is also used to remember DOM state, or tiny ephemeral state such as scroll position, text selection etc. It is also used for temporary state such as memoization.

This is kind of a magic black box in React and the implementation details are largely hidden. People tend to reinvent the wheel because of it, and invent their own state management systems. E.g. using Flux.

There is still plenty of use cases for Flux, but not all state belongs in Flux stores.

Manually managing the adding/removing of state nodes for all of this becomes a huge burden. So, regardless you're not going to keep doing this manually, you'll end up with your own system that does something similar. We need a convenient and standard way to handle this across components. This is not something that should be 100% in user space because then components won't be able to integrate well with each other. Even if you think you're not using it, because you're not calling setState, you still are relying on the capability being there.

It undermines the ecosystem and eventually everyone will reconverge on a single external state library anyway. We should just make sure that gets baked into React.

We designed the state tree so that the state tree data structure would be opaque so that we can optimize the internals in clever ways. It blocks many anti-patterns where external users breaks through the encapsulation boundaries to touch someone else's state. That's exactly the problem React's programming model tries to address.

However, unfortunately this state tree is opaque to end users. This means that there are a bunch of legitimate use cases are not available to external libraries. E.g. undo/redo, reclaiming memory, restoring state between sessions, debugging tools, hot reloading, moving state from server to the client and more.

We could provide a standard externalized state-tree. E.g. using an immutable-js data structure. However, that might make clever optimizations and future features more difficult to adopt. It also isn't capable of fully encapsulating the true state of the tree which may include DOM state, it may be ok to treat this state differently as a heuristic but the API need to account for it. It also doesn't allow us to enforce a certain level of encapsulation between components.

Another approach is to try to add support for more use cases to React, one-by-one until the external state tree doesn't become useful anymore. I've created separate issues for the ones we we're already planning on supporting:
#4593 Debugger Hooks as Public API
#4594 Hibernating State (not the serialized form)

What else do we need?

Pinging some stake holders:

@leebyron @swannodette @gaearon @yungsters @ryanflorence
Repository: java-design-patterns
Issue: External Configuration Store Pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The External Configuration Store design pattern involves storing configuration settings outside of the application, which allows for the modification of these settings without the need to redeploy the application. This pattern is particularly useful for cloud-based applications where environments can change dynamically, and configurations need to be updated frequently.

**Main elements of External Configuration Store pattern:**
1. **Configuration Source:** A centralized external source where configurations are stored. This can be a database, a cloud-based service, or a configuration server.
2. **Configuration Retrieval:** Mechanism to fetch the configuration from the external store. This can be done at application startup and periodically at runtime to ensure the latest configuration is always applied.
3. **Configuration Management:** Tools and interfaces to manage, update, and monitor the configurations in the external store.
4. **Fallback Mechanism:** In case the external configuration source is unavailable, the application should have a fallback mechanism, such as default settings or cached configurations.

**References:**
- [External Configuration Store - Microsoft Docs](https://docs.microsoft.com/en-us/azure/architecture/patterns/external-configuration-store)
- [12 Factor App - Store config in the environment](https://12factor.net/config)
- [GitHub Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement a mechanism to retrieve configurations from an external store (e.g., AWS SSM, Consul, etc.) and apply them to the application at startup and during runtime.
2. Create a configuration management interface to allow for easy updates and monitoring of configuration settings.
3. Ensure a fallback mechanism is in place to handle scenarios where the external configuration store is unreachable. This should include default settings or cached configurations.
Repository: go
Issue: net/rpc: lose cached Request on EOF
Labels: NeedsInvestigation

It looks like a (performance) bug at https://github.com/golang/go/blob/master/src/net/rpc/server.go#L578 - I think before `req = nil` this should be added:

``` go
server.freeRequest(req)
```
Repository: opencv
Issue: More details on supported platform
Labels: bug,priority: low,category: documentation,category: ocl

I was trying to force opencl to use my nvidia gpu since the default was always using the intel version.

I found page http://docs.opencv.org/modules/ocl/doc/introduction.html which explained that I should set the environment variable OPENCV_OPENCL_DEVICE but after reading this, I wasn't exactly sure of the string that I should write. I guessed "NVIDIA" but I wasn't sure if it was supposed to be in lower case, upper case, whether it mattered.

Maybe showing the common options might help the next reader
Repository: java-design-patterns
Issue: Finite State Machine pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Finite State Machine (FSM) design pattern is a behavioral design pattern used to model the behavior of a system that can be in one of a finite number of states. The system transitions from one state to another in response to external events or internal actions. This pattern is useful in scenarios where an object’s behavior is dependent on its state, and the state can change in response to events.

**Main elements of Finite State Machine pattern:**
1. **States:** Define the possible states the system can be in.
2. **Transitions:** Define the rules or conditions that trigger a change from one state to another.
3. **Events:** Actions or occurrences that cause state transitions.
4. **Context:** Maintains the current state of the system and facilitates state transitions.
5. **State Interface:** Defines the behavior associated with each state. Each state implements this interface to define its specific behavior.

**References:**
- [State Design Pattern - Refactoring Guru](https://refactoring.guru/design-patterns/state)
- [State Machines - Martin Fowler](https://martinfowler.com/articles/state-machines.html)
- [GitHub Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement the FSM pattern with at least three distinct states and the transitions between them.
2. Create a context class that maintains the current state and handles state transitions based on events.
3. Provide example scenarios demonstrating the FSM pattern, including state definitions, transitions, and event handling.
Repository: opencv
Issue: videostab: motion-inpainting option crashes
Labels: bug,priority: normal,affected: 3.4,category: gpu/cuda (contrib),category: videostab

When using the videostab's motion-inpaint option like in [this example](https://github.com/Itseez/opencv/blob/09b9b0fb9e9c9dd8c9e0d65705f8f19aa4c27f8a/samples/cpp/videostab.cpp#L509-L514), it crashes with an Error::StsNotImplemented "DensePyrLkOptFlowEstimatorGpu doesn't support errors calculation".

The callstack is as follows:

> [optical_flow.cpp#L134](https://github.com/Itseez/opencv/blob/09b9b0fb9e9c9dd8c9e0d65705f8f19aa4c27f8a/modules/videostab/src/optical_flow.cpp#L134)
> [inpainting.cpp#L401](https://github.com/Itseez/opencv/blob/09b9b0fb9e9c9dd8c9e0d65705f8f19aa4c27f8a/modules/videostab/src/inpainting.cpp#L401)
> [inpainting.cpp#L107](https://github.com/Itseez/opencv/blob/09b9b0fb9e9c9dd8c9e0d65705f8f19aa4c27f8a/modules/videostab/src/inpainting.cpp#L107)
> [stabilizer.cpp#L231-L232](https://github.com/Itseez/opencv/blob/09b9b0fb9e9c9dd8c9e0d65705f8f19aa4c27f8a/modules/videostab/src/stabilizer.cpp#L231-L232)
> ....

The problem seems to be that the OutputArray `flowMask_` is given but the `DensePyrLkOptFlowEstimatorGpu` rejects it. In general, the field `flowMask_` does not seem to be used.

**Steps to reproduce**:
Run the videostab with the following options

> videostab test.avi --motion-inpaint=yes --est-trim=no

(you can also leave the --est-trim option - but the above command reaches the crashing statement much faster)