WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Use of wavelets is rapidly increasing for many applications in denoising, image compression, edge-detection, etc, it makes sense for OpenCV to add support. It should be every bit as useful as Fourier/spectral transforms, given that many applications involve the three processes above.

Issue 2:
Transferred from http://code.opencv.org/issues/2923

|| Ajay Viswanathan on 2013-03-26 20:48
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: None
|| PR:
|| Platform: None / None

Discrete wavelet transform

There should functions for Haar, DB-X series, 9/7 and all other kinds of transforms in the OpenCV libraries. They would be quite handy in image compression and transmission applications.

History

Vladislav Vinogradov on 2013-04-01 09:06

Hello, Ajay Viswanathan.

OpenCV is open source library.
You can make your contribution to it. If you can implement this feature, submit a pull request (see [[How_to_contribute]]).

Rel Guzman Apaza on 2013-04-02 18:28

Vladislav Vinogradov wrote:
> Hello, Ajay Viswanathan.
>
> OpenCV is open source library.
> You can make your contribution to it. If you can implement this feature, submit a pull request (see [[How_to_contribute]]).

How large should be the code?
https://github.com/Itseez/opencv/pull/4#issuecomment-7393721

Rel Guzman Apaza on 2013-04-02 18:28

Vladislav Vinogradov wrote:
> Hello, Ajay Viswanathan.
>
> OpenCV is open source library.
> You can make your contribution to it. If you can implement this feature, submit a pull request (see [[How_to_contribute]]).

How large should be the code?
[[https://github.com/Itseez/opencv/pull/4#issuecomment-7393721]]

Vladislav Vinogradov on 2013-04-03 05:44

First of all, new functionality must be useful for large number of applications.

Vladislav Vinogradov on 2013-04-03 05:45

- Category set to imgproc, video
Issue 1:
Summary

In Vue3 / TypeScript project,

import { AxiosError } from 'axios';

Build shows warning:

Non-existent export 'AxiosError' is imported from node_modules/axios/index.js

Although there is only a build warning, any component (Vue) or TypeScript (ts) that includes this import fails to work.

Browser console (Dev-Tools) shows:

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=3226fa61' does not provide an export named 'AxiosError' (at auth-store.ts:2:17)

Environment

Axios Version 1.1.2

Node.js Version v17.4.0

OS: Windows 10

Vite version: 3.1.7

Issue 2:
Describe the bug

AxiosHeaders, AxiosError, CanceledError and Axios are "exported" in the type definitions index.d.ts, but not exported in the module.

To Reproduce

const { AxiosHeaders } = require('axios'); // Allowed by Typescript

const headers = new AxiosHeaders({ 'name': 'value' }); // <-- throws Error as AxiosHeaders is not actually exported

Expected behavior

Types are not exported, but only declared (declare class instead of export class).

Classes are exported and can be imported and used like so:

import { AxiosError, AxiosHeaders, Axios, CanceledError } from 'axios';

new AxiosError();
new AxiosHeaders();
new Axios();
new CanceledError();

Environment

Axios Version 1.1.0

Node.js Version 16.15.1

OS: OSX 12.5

Typescript 4.6.3 (any version)

React 17

Additional context/Screenshots

none
Issue 1:
Here is the sample illustrating the bug :

http://jsfiddle.net/mzQnF/

(just left-click to begin the camera animation)

The scene is composed of an half sphere illuminated with two point lights, red and blue.

A symmetry with the xy plane has been applied to the half sphere.

The sphere's normals are not inverted as expected.

Moreover, if doubleSided is activated, the illumination is not coherent, and the specular component is missing.

Issue 2:
Three.js at present includes a Shape/Text triangulation which was easy to implement but also needed several add-ons, eg. to decide between contours and holes and to remove those holes, and it had quite some issues concerning:

holes in polygons ( #3386: Holes in contours causes triangulation failure (partial solution: #4337); #2919: Triangulation fails for simple shape )

the sequence of contour and hole polygons ( #4357: toShapes: independence of shape and hole specification order, ref. #3386 )

the winding order of contour and hole polygons ( #4626: toShapes: Bugfix; new optional parameter: noHoles; #4590: Text Triangulation Issues )

and finally performance issues: ( #4594, first solution step #4623 )

It seems to work correctly by now but is quite slow if there are many vertices or holes.

Instead of trying to improve the present code further, I created a new project PnlTri.js: Polygon Near-Linear Triangulation in JavaScript

implementation of Raimund Seidel's randomised polygon trapezoidation and triangulation,

does not rely on polygon winding order and holes following on their contour,

reasonably fast: A square with 25000 square holes (~100k vertices -> ~150k triangles) takes less than 3 seconds on my old Laptop (Core 2 Duo T7200, 2 GHz) with Firefox 30.0,

quite small: adds about 10k to three.min.js or about 2k to the gziped file, and it should be possible to further simplify some functions surrounding triangulation in Three.js,

tested with all difficult data available to me in the Three.js examples and issues,

rather robust: in the presence of incompatible input it should produce "wrong" output but not crash.

I also created a branch for Three.js with PnlTri, replacing the present mechanism.

So interested users of Three.js can test their data against it. More test data would be welcome.

The main drawback might be that this algorithm often produces rather long, slim triangles. I'm thinking about a post-processing step to improve on this in the future.

There is still some room to refactor PnlTri and reduce the code surrounding triangulation in Three.js.

The next major step for PnlTri will be to allow polygons with intersections which would also increase robustness further.

@mrdoob: Is it small enough for integration into Three.js, or should it be left for people to combine them on their own ?
Issue 1:
System info

Playwright Version: v1.24.2

Node version: 18.12.1

Operating System: windows server 2019

Browser: Chromium

Issue

The download event is not triggered when I am using the machine to reach some internal site. If I open the chromium.exe manually, I can download the file with the same button clicked.

This issue only happens when I go to the internal sites, if I go to some public website and perform a button click download, the program works well. I have another server running the same node and playwright version with windows server 2016, which can download file no matter which website it is using the same program.

I would like to know is there something I configure playwright wrong or only a permission issue. As the code I am using, I only know that I perform a button click successfully and don't know if the download event emit or not.

Code Snippet

const browser = await chromium.launch({
headless: true,
args: ["--no-sandbox"],
downloadsPath: path_to_data,
executablePath: path.resolve(
"./node_modules/chromium/lib/chromium/chrome-win/chrome.exe"
),
});
const context = await browser.newContext({acceptDownloads: true });
const page = await context.newPage();
// some code here
page.on("download", async (dl) => {
const downloaded = await dl.path();
console.log("Download Finished");
var real_file_name = startDate +"_"+ endDate;
real_file_name = "Download - "+real_file_name.replace(/-/g, '')+".xlsx";
renameSync(downloaded, `${path_to_data}/${real_file_name}`);
console.log("Rename Finished");
await browser.close();
success = true;
});

await page.click('button:text("Export")', { force: true });
console.log("Start Downloading");
await new Promise(resolve => setTimeout(resolve, 10000));

html

<div class="row form-group">
<span class="col-3"></span> <span class="col-3">
<button class="btn btn-primary exportable" onclick="printDownload()">Download</button>
</span>
</div>

When I run the internal site, the code will stop at Start Downloading and then end whten the timeout end, while when the code is run on another server, it will trigger the download event.

Issue 2:
Playwright trace is very helpful in debugging, it shows the dom snapshots as well.

But if my locator has issues, I'd like to have the capability of using query engine on the dom snapshot in https://trace.playwright.dev/ (on the same browser instance where https://trace.playwright.dev/ is running)

it will save time.

Currently I resort to Playwright Inspector / Codegen and replay my test up to that point.
Issue 1:
torch::pickle_save and torch::pickle_load have no docs, maybe torch::save/load should also be deprecated since they are more limited

Issue 2:
These APIs aren't going anywhere as far as I know, but they have no descriptions or usage instructions

They have some documentation here but that's nowhere on the website:

https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/serialization/pickle.h

And some usages are in the tests but aren't very user-discoverable:

https://github.com/pytorch/pytorch/blob/master/test/cpp/api/jit.cpp#L120

https://github.com/pytorch/pytorch/blob/master/test/cpp/jit/test_save_load.cpp#L121

https://github.com/pytorch/pytorch/blob/master/test/cpp/jit/torch_python_test.cpp#L44-L54

Tagging the JIT team to see if there are any plans for these APIs

cc @gmagogsfm
Issue 1:
When accessing multiple fields of a structured array, numpy fails to verify that all the fields exist. Instead, it will only return existing fields. If none exist, it return a strange object that has a dtype that is empty. Normally, creating an object with an empty dtype is not supposed to be possible (zeros(shape=(5,), dtype=[]) results as expected in TypeError: Empty data-type), so this might actually be a dual bug.

In [216]: A = numpy.empty(dtype=[("A", "f4"), ("B", "f8")], shape=(5,))

In [217]: A[["AA"]]
Out[217]:
array([(), (), (), (), ()],
dtype='{'names':[], 'formats':[], 'offsets':[], 'itemsize':12}')

In [232]: A[["AA", "B"]]
Out[232]:
array([(0.0,), (0.0,), (0.0,), (0.0,), (0.0,)],
dtype=[('B', '<f8')])

Issue 2:
When accessing multiple records with arr[["field0", "field1",…]], using a non-existing field is silent:

>>> arr = numpy.array([(1, 2, 10), (3, 4, 10)], dtype=[('x', int), ('y', int), ("z", int)])
>>> arr[["lkjlkj"]]
array([(), ()],
dtype='{'names':[], 'formats':[], 'offsets':[], 'itemsize':24}')

This is inconsistent with accessing a single field:

>>> arr["lkjlkj"]
Traceback (most recent call last):
File "<ipython-input-7-7a431ec24c6c>", line 1, in <module>
arr["lkjlkj"]
ValueError: field named lkjlkj not found

Furthermore, it creates error messages that can be harder to make sense of, like in:

for (x, y_value) in arr[["x", "y_valuf"]]: # Note the typo in "y_valuf"
…

(ValueError: need more than 1 value to unpack).

I can't find any documentation on the current behavior either (it's not in http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html#record-access).

I would suggest that non-existing fields raise an exception, for consistency/least-surprise and practicality reasons.
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

9.0.0

Operating System:

Windows 10 (19631.1)

Last Known Working Electron version:

8.2.0

Expected Behavior

Electron to start

Actual Behavior

Crashes in terminal with error number 2147483651

To Reproduce

I'm not quite sure what's causing this as I've cloned the electron-quick-start repo and before that I followed the quick-start document to a T and I've set up plenty of Electron projects with no problems like this in the past. Weirdly enough, it's not working with my project or a new project, but electron is opening in a older (only by a month or two from now) Electron project of mine. Apparently it's at 8.2.0

Changed the blank skeleton apps Electron version to 8.2.0 and it worked. This might be a problem with the Windows version I'm using (Insider Preview), but I'm confused why 8.2.0 works.

Issue 2:
In relation to the following issue:-

#8386

I can confirm that I am still experiencing the thead rendering issue when printing to PDF using win.webContents.printToPDF() despite the fact that I am using electron 1.8.4 and it having been stated this was rectified in 1.6 in the above issue. The following work around rectifies the issue, with the !important being required:-

@media print {
thead {
display: table-row-group !important;
}
}

Platform win32-x64

Electron Version: 1.8.4.

Please advise.
Issue 1:
cf #2706

Issue 2:
Code Sample, a copy-pastable example if possible

# Your code here

df = pandas.DataFrame({'a': [1, 10, 8, 11, -1],
'b': [1.0, 2.0, 3.0, 3.0, 4.0]})
df.nlargest(3, 'b')
Result:
a	b
4	-1	4.0
2	8	3.0
3	11	3.0
2	8	3.0
3	11	3.0

Problem description

[this should explain why the current behaviour is a problem and why the expected output is a better solution.]

Duplicate values in column 'b' is not being handled correctly. The result is different than

what "df.sort_values('b', ascending=False).head(3)" produces.

Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on master here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

Expected Output

a	b

4	-1	4.0

2	8	3.0

3	11	3.0

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.12.final.0

python-bits: 64

OS: Linux

OS-release: 4.3.5-smp-808.15.0.0

machine: x86_64

processor:

byteorder: little

LC_ALL: en_US.UTF-8

LANG: None

LOCALE: None.None

pandas: 0.19.2

nose: None

pip: None

setuptools: None

Cython: None

numpy: 1.11.1

scipy: 0.15.1

statsmodels: 0.6.1

xarray: None

IPython: 2.0.0

sphinx: None

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: None

tables: 3.1.1

numexpr: 2.5

matplotlib: 1.5.2

openpyxl: None

xlrd: 0.9.3

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 1.0b8

httplib2: 0.9.2

apiclient: 1.5.5

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.8

boto: None

pandas_datareader: None

[paste the output of pd.show_versions() here below this line]
Issue 1:
Current behavior

I have component with class bindings which look like:

<foo class="class1 {{classFromProp1}}" [class.foo-class]="classFromProp2">

classFromProp2= true

when resizing screen classFromProp1 changes and foo-class gets lost.

this behavior works as expected if I use [ngClass]="{'foo-class': classFromProp2}"

Expected behavior

should merge classes correctly

Angular version: 2.0.X

~2.4.0

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

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

Current behavior

If an element has an interpolated class as well as a class that is bound to a component property, bound class is removed if the interpolated class value changes.

Take the following html as example:

<h2 class="existing-class {{compClass}}" [class.bound]="hasClass">Hello {{name}}</h2>

Once the compClass property changes, the bound class is removed.

Expected behavior

The expected behavior is that the class that is bound by a variable is unaffected by an interpolated class.

Thus, in the above example, if hasClass is true the element should have the following classes present "existing-class", "bound" and whatever the value of compClass is.

When compClass changes and hasClass is still true, the element should still have the "bound" class.

Minimal reproduction of the problem with instructions

Create a component with a boolean and string property.

Within the component template, add the string property as a interpolated string in an element's class attribute.

Bind another class to the element with the boolean property ([class.bound]="boolProp")

Change the string property's value after a certain amount of time.

The the class that is added with attribute binding is removed.

Or check out this plunker

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

I think it makes sense to be able to change one class without effecting other classes on an element.

Please tell us about your environment:

Angular version: 2.4.9 && 4.0.0-rc.2

Browser: [Chromium 56 | Firefox 52]

Language: [all | TypeScript X.X | ES6/7 | ES5]

Typescript 2.0.2 (with Angular 2.4.9)

Typescript 2.1.5 (with Angular 4.0.0-rc.2)

Node (for AoT issues): node --version =
Issue 1:
First time opening the menu you can see 8 links clearly, but if you close the menu and open it again, all the links disappear.

This issue happens on Galaxy SIII Mini with Android Jelly Bean 4.1.2 + Chrome in portrait mode only. On the default browser and landscape view are ok.

I also got this problem on a Galaxy SII + CyanogenMod 10.2 (4.3) + Chrome.

The following link:

www.demodirectory.com

Any thoughts?

Issue 2:
How to reproduce:

Open bootstrap [ http://getbootstrap.com/2.3.2/ ] or any website using bootstrap in chrome on mobile android in portrait mode.

then click on menu to open, then close & then click again to open

this time the navigation is coming blank even thought the links are there and can be clicked but can't be seen

Works fine in landscape mode.

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2。6。5

Operating System version: ubuntu

Java version: 1.8

Steps to reproduce this issue

hi, I have a requirement now, when a dubbo application is started, I need get the dubbo instance's ip, port and timestamp, then that message as the dubbo instance's unique key save to mysql ,but i have not a good idea to get that message,please tell me how to get the message ? thanks

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
Andrey Karandey opened SPR-9377 and commented

Key generating has a weak hashing function. Next results are equal:

generate( object1,method1,new Integer( 109 ),new Integer( 434)));

generate( object1,method1,new Integer( 110 ),new Integer( 403)));

It was pity to catch it on production...

Affects: 3.1.1

Issue Links:

#14870 Cacheable key collision with DefaultKeyGenerator ("duplicates")

#13675 Improve DefaultKeyGenerator

#14870 Cacheable key collision with DefaultKeyGenerator

3 votes, 4 watchers

Issue 2:
Bozhidar Bozhanov opened SPR-9036 and commented

org.springframework.cache.interceptor.DefaultKeyGenerator is implemented by calculating the hashcode of all arguments. This is problematic in many cases:

methods with similar signature - foo(int, String), foo(int, List) - if the 2nd argument is null they will get mixed

methods with the same signature in different classes, using the same cache - they will get mixed

is there a collision resolution mechanism? If not, things will randomly fail. Rarely, but they will. Imagine that the arguments of two distinct methods (that use the same cache region) evaluate to the same hashcode (not unlikely) - they will override each other's values, and possibly a ClassCastException will occur on retrieval

What is in the first place the reason to get the hashcodes? The underlying cache mechanism is a hashtable of some sort, so it will calculate the hash of the key anyway. But it will have a collision-resolution strategy, unlike the KeyGenerator.

I suggest:

concatenating the string representations of primitives, and the hashcode of non-primitives.

adding the class name and method name to the key

optionally, where non-primitive values are used as keys, log a warning - this is usually wrong, as the hashcode will change even though the values inside the object are the same

Attachments:

TestDefaultKeyGenerator.java (2.01 kB)

Issue Links:

#14870 Cacheable key collision with DefaultKeyGenerator ("duplicates")

#14870 Cacheable key collision with DefaultKeyGenerator

#14013 org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality

9 votes, 11 watchers
Issue 1:
Trying to create a numpy array from ctypes and ran into a problem which seems to be because of the pack attribute in ctypes. Anyone seen this before?

import sys
import ctypes
import numpy as np

print(sys.version)
print(ctypes.__version__)
print(np.__version__)

class POINT(ctypes.Structure):
_fields_ = [("x", ctypes.c_int),
("y", ctypes.c_float)]

class POINT_BUG(ctypes.Structure):
_pack_ = 4
_fields_ = [("x", ctypes.c_int),
("y", ctypes.c_float)]

n = np.array((POINT*5)())
print(n)

#This fails
nb = np.array((POINT_BUG*5)())

Produces ouput:

2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
1.1.0
1.10.4
[(0, 0.0) (0, 0.0) (0, 0.0) (0, 0.0) (0, 0.0)]
C:/Users/Mark/Desktop/bugreport.py:23: RuntimeWarning: Item size computed from the PEP 3118 buffer format string does not match the actual item size.
("y", ctypes.c_float)]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile
execfile(filename, namespace)
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/Mark/Desktop/bugreport.py", line 23, in <module>
nb = np.array((POINT_BUG*5)())
TypeError: long() argument must be a string or a number, not 'POINT_BUG'

Issue 2:
This seems like a bug inherited from ctypes, so maybe we need a workaround:

Start off with a very simple struct:

class foo(ctypes.Structure):
_fields_ = [('a', ctypes.c_uint8), ('b', ctypes.c_uint32)]
f = foo()

We'd expect this to insert padding, and it does:

>>> memoryview(f).itemsize # ok
8

But that padding doesn't show up in the format string:

>>> memoryview(f).format
'T{<B:a:<I:b:}'

The docs for struct say that

No padding is added when using non-native size and alignment, e.g. with ‘<’, ‘>’ "

So this format has size 5, which contradicts itemsize.

Sure enough, we catch this in our PEP3118 parser:

>>> np.array(f)
RuntimeWarning: Item size computed from the PEP 3118 buffer format string does not match the actual item size.
Out[45]: array(<__main__.foo object at 0x7f2715469bf8>, dtype=object)

I suspect there's already an issue for this - perhaps we need a PEP3118 tag.

The fix would be to special case ctypes objects in the array constructor, and not call memoryview on them because it doesn't actually work.

Worse yet, numpy doesn't stand a chance with an unpadded struct:

class foo(ctypes.Structure):
_fields_ = [('a', ctypes.c_uint8), ('b', ctypes.c_uint32)]
_pack_ = 1
f = foo()

>>> memoryview(f).itemsize # ok
5
>>> memoryview(f).format # WAT
'B'