sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Strange .cloned() error message mentioning iterators
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,D-confusing,D-papercut,D-newcomer-roadblock

I'm unsure why the error message for this code mentions iterators; there aren't any, I thought.

```rust
fn main() {
    Some(1).cloned();
}
```

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5de4c57cd625e8482d579c226cb0c74e))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error[E0599]: no method named `cloned` found for enum `std::option::Option<{integer}>` in the current scope
   --> src/main.rs:2:13
    |
2   |   Some(1).cloned();
    |           ^^^^^^ method not found in `std::option::Option<{integer}>`
    |
    = note: the method `cloned` exists but the following trait bounds were not satisfied:
            `std::option::Option<{integer}>: std::iter::Iterator`
            which is required by `&mut std::option::Option<{integer}>: std::iter::Iterator`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

```
Repository: PowerToys
Issue: Photoshop Documents (PSD, PSB, AI, etc) Preview on Explorer Add-ons
Labels: Help Wanted,Product-File Explorer

# Summary of the new feature/enhancement

Add support to preview of PSD too. Generally, this is a request to support more file types.

I want to be able to preview PSDs like a photo.
Repository: flutter
Issue: iOS archived version problem after releasing to TestFlight using XCode 11.4/11.5
Labels: platform-ios,tool,P2,team-ios,triaged-ios

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Install XCode 11.4 or 11.5.
2. Upload an iOS app using embedded Flutter module  and calling native C++ code through dart::ffi to TestFlight.
3. Try showing the view which calls native library lookup method. <!-- describe how to reproduce the problem -->

**Expected results:** <!-- what did you want to see? -->

I have a native iOS app written in Objective-C which also uses some native C++ code. I've integrated a Flutter module into the app and used dart::ffi to call C++ within the Flutter module. Everything was working fine until I've update XCode to version 11.4. Now the native dart::ffi calls work only if I upload the app to the device using XCode, but they stop working when I archive the app, upload it to the AppStore and download it using TestFlight.

**Actual results:** <!-- what did you see? -->

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->


<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale pl-PL)
    • Flutter version 1.17.5
    • Framework revision 8af6b2f038 (7 days ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.8.4

</details>
Repository: pytorch
Issue: Cannot define v_dim in MultiheadAttention
Labels: module: nn,triaged

## 🐛 Bug

I am trying to define the dimensions of features of the values in the multiheaded attention operation. However, when I set this value it raises an AssertionError.

## To Reproduce

```
emb_dim = 10
num_heads = 1
v_dim = 4
multihead_attn = nn.MultiheadAttention(emb_dim, num_heads=num_heads, vdim=v_dim)

query = torch.rand(10, 2, emb_dim)
key = torch.rand(10, 2, emb_dim)
values = torch.rand(10, 2, emb_dim)

multihead_attn(query, key, values)
```

This raises the AssertionError

```
v_proj_weight_non_opt = torch.jit._unwrap_optional(v_proj_weight)
len1, len2 = v_proj_weight_non_opt.size()
assert len1 == embed_dim and len2 == value.size(-1)
```

## Expected behavior

I would expect this to run without raising any issues, as defining the dimensionality of features in the values should be a valid operation.

## Environment

 - PyTorch Version (e.g., 1.0): 1.5.1
 - OS (e.g., Linux): macOS Mojave
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source): -
 - Python version: 3.7.7
 - CUDA/cuDNN version: -
 - GPU models and configuration: -
 - Any other relevant information: -

## Additional context

Perhaps this is not a bug and I am misinterpreting something, but in this case the error messaged could better defined.


cc @albanD @mruberry
Repository: flutter
Issue: Camera retuning this error Error waiting to drain: Connection timed out (-110))
Labels: e: device-specific,platform-android,p: camera,package,P2,team-android,triaged-android

I am using the camera plugin version [camera: ^0.5.8+2] and one of our app users Is getting this error. 

```
CameraException(CameraAccess, CAMERA_ERROR (3): waitUntilIdle:1656: Camera 1: Error waiting to drain: Connection timed out (-110))
```

Model details are as follows:

{"model":"SM-J720F","platform":"Android",,"version":"10167","manufacturer":"samsung","serial":"unknown",}

Please help. Regarding this, I am getting this error almost every day.
Repository: terminal
Issue: Allow the user to set the minimum window size
Labels: Help Wanted,Area-Settings,Product-Terminal,Issue-Task,Priority-3,good first issue

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement
Create an option "disable window resizing" or "fixed minimum window size" in global settings.
<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

# Proposed technical implementation details (optional)
Window Resizing Settings

Property name: enableWindowResizing

Necessity: Optional

Accepts: true, false

Default value: true
_________________________ OR __________________________________

Fixed Minimum Window Size

Property name: minimumWindowSize

Necessity: Optional

Accepts: Dimensions - rows,columns

Default value: 30,120

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: go
Issue: runtime: deprecate SetCPUProfileRate and replace body with panic
Labels: NeedsFix,compiler/runtime

Long ago we had runtime.SetCPUProfileRate and runtime.CPUProfile as the interface to profiling. And runtime/pprof was layered on top of them. At some point we realized that this was not a good enough interface, and we made the runtime export hooks directly to runtime/pprof.

We marked CPUProfile deprecated and replaced the body with a panic. 

But we forgot to do the same to SetCPUProfileRate. The result is that today this function is documented as if it is useful, when in fact it is not. We should mark it deprecated and replace the body with a panic, same as CPUProfile, leaving a back-door hook for runtime/pprof.
Repository: go
Issue: x/pkgsite: add function to set up frontend server
Labels: NeedsFix,pkgsite

There are several places in the code where we set up a `frontend.NewServer`:

- `cmd/frontend`: https://github.com/golang/pkgsite/blob/master/cmd/frontend/main.go#L94-L123
- `internal/frontend/server_test.go`: https://github.com/golang/pkgsite/blob/master/internal/frontend/server_test.go#L990-L1031
- `internal/testing/integration/frontend_test.go`: https://github.com/golang/pkgsite/blob/master/internal/testing/integration/frontend_test.go#L155-L167

It would be useful to factor out shared parts of this code to reduce duplication.
Repository: java-design-patterns
Issue: View Helper pattern
Labels: epic: pattern,type: feature

Description:
The View Helper design pattern aims to separate the business logic from the presentation layer by using helper components to handle processing and formatting. This enhances the maintainability and modularity of the code by promoting a clear separation of concerns.

Main Elements of the Pattern:
- **View Helper**: A component that performs complex formatting or data processing tasks.
- **Controller**: Directs the request to the appropriate View Helper and subsequently to the view.
- **View**: Renders the final output using data prepared by the View Helper.

References:
1. [View Helper Design Pattern - Oracle](https://www.oracle.com/java/technologies/viewhelper.html)
2. [Java Design Patterns - Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

Acceptance Criteria:
1. Create a View Helper class that handles data formatting or processing tasks.
2. Ensure the Controller directs requests to the appropriate View Helper.
3. Implement a view that utilizes the data provided by the View Helper to render the final output.
Repository: java-design-patterns
Issue: Asynchronous Page pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Asynchronous Page Design Pattern allows for the decoupling of long-running tasks from the main flow of a web page, providing a more responsive and interactive user experience. This pattern is particularly useful for web applications where certain operations, like data retrieval or processing, can take a significant amount of time and would otherwise block the user interface.

Main elements of the pattern:
- **Client-Side Asynchronous Call:** Initiate an asynchronous request from the client side using JavaScript (AJAX, Fetch API, etc.).
- **Server-Side Processing:** Handle the asynchronous request on the server side, processing the task in a non-blocking manner.
- **Polling or Callback Mechanism:** Update the client with the status of the request, either through polling, long-polling, or server-sent events.
- **User Feedback:** Provide immediate feedback to the user, indicating that the request is being processed, and update the UI once the processing is complete.

**References:**
1. [Java Design Patterns - Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)
2. [Asynchronous Page Design Pattern - Google Books](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)

**Acceptance Criteria:**
1. Implement a client-side example demonstrating the initiation of an asynchronous request and handling the response.
2. Develop a server-side component that processes the asynchronous request in a non-blocking manner and communicates the status back to the client.
3. Provide clear documentation and usage instructions, including code comments and a README file explaining how to run and test the implementation.
Repository: java-design-patterns
Issue: Caching Filter pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Caching Filter design pattern aims to improve the performance and scalability of an application by caching the results of expensive operations and reusing them for identical subsequent requests. This pattern is particularly useful in scenarios where the same data is frequently requested, and the cost of recomputing the data is high.

**Main Elements of the Pattern:**
1. **Filter:** Intercepts requests and checks if a cached response is available.
2. **Cache Store:** A storage mechanism for saving and retrieving cached data.
3. **Cache Key:** A unique identifier for caching entries based on request parameters.
4. **Expiration Policy:** Defines how long cached data is considered valid.
5. **Cache Miss Handler:** Fetches data from the original source when a cache miss occurs and populates the cache.

**References:**
- [Java Design Patterns Project Wiki](https://github.com/iluwatar/java-design-patterns/wiki)
- [J2EE Design Patterns](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)

**Acceptance Criteria:**
1. Implement a basic Caching Filter that can intercept requests and check for cached responses.
2. Develop a simple cache store with a configurable expiration policy.
3. Ensure comprehensive unit tests are provided to validate the correct functionality of the caching mechanism.
Repository: java-design-patterns
Issue: Data Transfer Hash pattern
Labels: epic: pattern,type: feature

**Description:**
The Data Transfer Hash design pattern is used to transfer a large amount of data between different parts of a system or across systems. This pattern uses a hash map to store data as key-value pairs, which facilitates easy data retrieval and manipulation. The primary elements of this pattern include:

- **Data Container:** A hash map or dictionary to store the data.
- **Serialization/Deserialization:** Methods to convert data to and from the hash map format.
- **Encapsulation:** Ensuring that the data structure hides its implementation details and exposes only necessary interfaces for interaction.
- **Efficiency:** Optimization for quick data access and manipulation.

**References:**
1. Data Transfer Hash Design Pattern - [Link to Book](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)
2. Project Contribution Guidelines - [Github Wiki](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement a hash map-based data container with appropriate methods for adding, retrieving, and removing data.
2. Include serialization and deserialization methods for converting the data container to and from a transferable format.
3. Ensure the implementation adheres to the project's coding standards and passes all existing unit tests.
Repository: java-design-patterns
Issue: DAO Factory pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The DAO (Data Access Object) Factory design pattern is used to abstract and encapsulate all access to the data source, providing a clean separation between the business logic and the data access logic. This pattern enables the application to switch between different data sources and provides a mechanism to manage the data access objects efficiently.

Main elements of the pattern:
- **DAO Interface:** Defines the standard operations to be performed on a model object(s).
- **Concrete DAO Class:** Implements the DAO interface and handles the CRUD operations with the data source.
- **DAO Factory Interface:** Provides a way to get the appropriate DAO based on the data source.
- **Concrete DAO Factory Class:** Implements the DAO Factory interface and returns instances of the specific DAO.

**References:**
1. [DAO Factory Design Pattern - Oracle](https://www.oracle.com/java/technologies/dataaccessobject.html)
2. [Java Design Patterns - DAO](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement the DAO interface and at least one concrete DAO class for a model object.
2. Create a DAO Factory interface and a concrete implementation of the DAO Factory that returns instances of the concrete DAO.
3. Ensure that the implementation is well-documented and includes unit tests for the DAO methods and factory.
Repository: java-design-patterns
Issue: Procedure Access Object pattern
Labels: info: help wanted,epic: pattern,type: feature

### Description:
Implement the Procedure Access Object (PAO) design pattern in the project. The PAO pattern centralizes the logic to access stored procedures in the database, providing a uniform interface for executing these procedures. This helps in decoupling the business logic from the data access logic, promoting a cleaner and more modular design.

### Main elements of the Procedure Access Object pattern:
- **Centralized Procedure Access**: All stored procedure calls are centralized in a single class or a set of classes.
- **Uniform Interface**: Provides a consistent interface for executing stored procedures, making it easier to manage and call these procedures from different parts of the application.
- **Decoupling**: Separates the business logic from the data access logic, ensuring a more modular and maintainable codebase.

### References:
- [Procedure Access Object Design Pattern](https://www.oreilly.com/library/view/j2ee-design-patterns/0596004273/re19.html)
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

### Acceptance Criteria:
1. Implement a class or set of classes to centralize stored procedure calls, ensuring they follow the PAO pattern.
2. Provide a consistent and uniform interface for executing stored procedures.
3. Ensure the new PAO classes are well-documented and include examples demonstrating their use in the project.
Repository: java-design-patterns
Issue: PK Block Generator pattern
Labels: info: help wanted,epic: pattern,type: feature

## Description

The PK Block Generator design pattern is a structural pattern that allows for efficient and modular generation of blocks of code or data. This pattern is particularly useful in scenarios where blocks of data need to be generated dynamically based on varying input parameters. The main elements of the PK Block Generator design pattern include:

1. **Generator Interface**: Defines the interface for creating blocks.
2. **Concrete Generator**: Implements the generator interface to create specific types of blocks.
3. **Block Class**: Represents the blocks that are generated.
4. **Client**: Uses the generator to create blocks as needed.

## References

1. [PK Block Generator Design Pattern - Google Books](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)
2. [Java Design Patterns - Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

## Acceptance Criteria

1. **Implementation of Generator Interface**: Develop a generator interface that defines methods for block creation.
2. **Creation of Concrete Generators**: Implement at least one concrete generator that creates a specific type of block.
3. **Client Integration**: Demonstrate the use of the generator in a client class, ensuring that blocks are generated dynamically based on input parameters.
Repository: java-design-patterns
Issue: Stored Procedures for Primary Keys pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
Implement the Stored Procedures for Primary Keys design pattern. This pattern centralizes the creation of primary key values in a database through stored procedures. The primary objective is to ensure unique and sequential key generation across different parts of an application. By utilizing stored procedures, this pattern enhances consistency, simplifies key management, and can improve performance by reducing the logic required in the application layer for key generation.

**Main Elements:**
1. **Centralized Key Generation**: Use stored procedures to generate primary key values, ensuring uniqueness and sequential order.
2. **Database Consistency**: Maintain consistent key generation across different application modules.
3. **Simplified Application Logic**: Offload key generation logic from the application layer to the database.
4. **Performance Optimization**: Reduce the overhead of key generation logic in the application, potentially improving overall performance.

**References:**
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)
- [Stored Procedures for Primary Keys Design Pattern - Source](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)

**Acceptance Criteria:**
1. A stored procedure is created in the database to handle the generation of primary keys.
2. The application layer is modified to call the stored procedure for primary key generation instead of generating keys within the application code.
3. Comprehensive tests are implemented to ensure that the stored procedure generates unique and sequential primary key values and that the integration with the application is seamless.
Repository: java-design-patterns
Issue: Tuple Table pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Tuple Table design pattern is a structural pattern that provides a flexible way to manage complex data structures. It is used to store and manipulate a collection of tuples (fixed-size collections of elements) in a tabular format. This pattern is particularly useful when dealing with databases or any system that requires the efficient handling of structured data.

**Main elements of the Tuple Table pattern:**
1. **Tuple:** A finite ordered list of elements.
2. **Table:** A collection of tuples organized in rows and columns, similar to a database table.
3. **Schema:** Defines the structure of the tuples within the table, specifying the types and order of elements.
4. **Operations:** Functions to add, remove, update, and query tuples within the table.
5. **Flexibility:** Ability to handle different types of data within the same table by defining appropriate schemas.

**References:**
1. Tuple Table pattern overview: [Google Books Reference](https://books.google.fi/books?id=x-7_W0P9KGsC&printsec=frontcover&hl=fi&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false)
2. Project contribution guidelines: [GitHub Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement the Tuple Table pattern with a clear definition of tuples, table, and schema.
2. Provide basic operations for managing tuples within the table, including addition, removal, update, and querying of tuples.
3. Ensure comprehensive unit tests are included to verify the correct implementation of the pattern.