Skip to main content

All Questions

Tagged with
1 vote
0 answers
350 views

How to get the index of a data point when the cursor clicks on it?

I have a scatter plot and I want to get the initial index of the data sample when clicked on it. fig, ax = plt.subplots() sc = plt.scatter(features[:, 0], features[:, 1], c=labels) On an on-click ...
Berkay Berabi's user avatar
1 vote
1 answer
729 views

How to narrow callback event type based on event name

I'm trying to implement an event emitter. The code is very simple. Right now tsc thinks that the event type in eventHandler is 'ErrorEvent' | 'MessageEvent'. This is the problem and I want tsc to ...
manidos's user avatar
  • 3,434
6 votes
1 answer
3k views

d3.js undefined data value in callback function click event [duplicate]

I'm trying to pass a value to a d3 click event bind to a group composed of a circle and a letter. However this value remains 'undefined' in the callback function. On the other hand if I pass the same ...
vbby's user avatar
  • 63
0 votes
1 answer
351 views

How to unsubscribe from Event after a Page disappear

From a viewModel of a page which displays DATA, I need to display a SecondaryPage, with a subset of those DATA. So when the button is clicked, I apply filter to the DATA and call the SecondaryPage. I ...
Belight's user avatar
  • 304
0 votes
2 answers
812 views

Receiving data in python callback function from dll

I am writing a program in Python that communicates with a spectrometer from Avantes. There are some proprietary dlls available whose code I don't access to, but they have some decent documentation. I ...
Guilherme B.M.'s user avatar
0 votes
1 answer
437 views

Function Pointers as Event Callbacks in a st

I am currently trying to implement an event system where layers can subscribe to certain event types. I am struggling with function pointers for the callback methods. In the layer.h file I have the ...
Nicky's user avatar
  • 121
0 votes
2 answers
1k views

D3v6 drag event callback function fire with undefined parameters

Following the D3v6 documentation, i am unable to implement a simple dragging behaviour on a path SVG element drawn using the d3.symbol util. The typescript class is shown here as a context. The events ...
G.Launay's user avatar
3 votes
1 answer
504 views

Listen for event and invoke callback, based on specification?

I am currently building out a custom task manager and I'm wondering if it's possible to tell the task manager to listen for a specific event (OnSomething below), and then invoke a callback method when ...
Taco's user avatar
  • 2,892
1 vote
1 answer
1k views

Passing a function with parameters to a child component

I'm writing blazor component wrappers for some of my favorite Javascript plugins using Javascript interop. My parent component has this function: async Task<IEnumerable<DpEvent>> GetEvents(...
Tom Crosman's user avatar
  • 1,257
1 vote
1 answer
435 views

Benefit of using event listeners over functions callbacks in Matlab

Note: The question here is specifically for the case of Matlab! The context of this question is a Matlab handle class, which receives some data over a websocket, does some processing to that data and ...
deragent's user avatar
5 votes
1 answer
4k views

Event Callback issue parent/child component "does not have a property matching the name 'OnClickCallback'"

The issue So I have an issue in Blazor where I am trying to invoke a method in my MainLayout parent component from a child component (NavMenu). All I am trying to achieve is to open a dialog in the ...
Jordan's user avatar
  • 159
0 votes
1 answer
366 views

How to manage events in converse.js xmpp library

Im actually developing a custom ERP for my business company and i need implement xmpp web based chat applicatión using Converse.js. But i can't find any solution to manage events callback's with the ...
Moises bolaños davila's user avatar
1 vote
1 answer
150 views

Set onclick method for an element in a loop using local variables without having it activate immediately

I have a for loop in which I'm using a local variable from the loop as a parameter for an onclick event callback. I'm doing it according to what I've read in these posts: Passing parameter onclick, ...
SemperCallide's user avatar
0 votes
1 answer
474 views

How to draw free and horizontal lines using mouse events and flags?

I try to build a code, in which I can draw lines above the image using OpenCV. In my code, I can draw lines freely, but I want draw horizontal lines, while I'm pressing the shift key. Actually, I didn'...
Yong Hwan Kim's user avatar
0 votes
0 answers
388 views

Get Callback From Custom Attribute Tagged Functions [C#]

I have a custom attribute that can be applied to methods. How would I go about getting a callback when a tagged function is called? class RPC : Attribute { private string RPCName; public ...
volairs22's user avatar

15 30 50 per page
1
2
3 4 5
18