Questions tagged [handlers]
225 questions
68
votes
2 answers
Custom EventHandler vs. EventHandler
Recently I've been wondering if there is any significant difference between this code:
public event EventHandler SomeEvent;
And this one:
public delegate void MyEventHandler(object sender, MyEventArgs e);
public event MyEventHandler…

haiyyu
- 2,194
- 6
- 22
- 34
24
votes
4 answers
executing default signal handler
I have written an application where i have registered number of signal handler for different signals in linux .
After process receives the signal the control is transferred to the signal handler i had registered. In this signal handler i do some…

app
- 421
- 1
- 4
- 7
22
votes
4 answers
The logging.handlers: How to rollover after time or maxBytes?
I do struggle with the logging a bit. I'd like to roll over the logs after certain period of time and also after reaching certain size.
Rollover after a period of time is made by TimedRotatingFileHandler,
and rollover after reaching certain log size…

sumid
- 1,871
- 2
- 25
- 37
19
votes
1 answer
Is it bad practice to use inline event handlers in HTML?
Is it bad to use inline JavaScript event handlers, or is that fine?
On the page I plan to use it on, I'm only going to use an event handler once, so is it acceptable to use an inline event handler in this case, or shall I write the code for the…

Sharikul Islam
- 319
- 2
- 8
16
votes
4 answers
Android - loop part of the code every 5 seconds
I would like to start repeating two lines of code every 5 seconds when I press the button START and end it, when I press the button STOP. I was trynig with a TimerTask and Handles, but couldn't figure it out how.
public class MainActivity extends…

Damijan
- 183
- 1
- 2
- 7
13
votes
2 answers
No handlers found for logger __main__
I set up logging throughout my python package using a logconfig.ini file.
[loggers]
keys=extracts,root
[formatters]
keys=simple,detailed
[handlers]
keys=file_handler
[formatter_simple]
format=%(module)s - %(levelname)s -…

Zihs
- 347
- 2
- 4
- 17
12
votes
1 answer
Tornado Restful Handler Classes
I've read around and found this answered question about a problem relating to this but what I really want to know is how to implement this structure and how many handler classes I need:
1 GET /items #=> index
2 GET /items/1 #=>…

odgrim
- 1,275
- 10
- 14
12
votes
4 answers
call an eventhandler with arguments
Visual Studio 2008, C# 3.0.
I have a method below which calls an event handler. I would like to pass the two arguments received by the method to the event handler.
I would like to do something like this:
wc.DownloadDataCompleted +=…

dezkev
- 599
- 2
- 7
- 15
9
votes
1 answer
Meaning of path attribute on handlers in web.config
I'm looking at IIS7.5 configuration (system.webServer/handlers).
Do you know what is the diference between \*. and \* in the path argument for handlers?
Could you use file.* (to match file.txt and file.xml) or abc.a?c (to match abc.abc and abc.asc)…

Eduard
- 664
- 2
- 14
- 26
8
votes
2 answers
Is there an actual difference in the 2 different ways of attaching event handlers in C#?
In C# is there any real difference (other than syntax) under the hood between:
myButton.Click += new EventHandler(myMemberMethod);
and
myButton.Click += myMemberMethod;
?

DuckMaestro
- 15,232
- 11
- 67
- 85
7
votes
2 answers
How to quit HandlerThread's looper safely
I have a HandlerThread, to which I keep posting a runnable every 5 seconds. Something like this:
HandlerThread thread = new HandlerThread("MyThread");
thread.start();
Handler handler = new Handler(thread.getLooper());
handler.post(new Runnable() {
…

sundie
- 245
- 3
- 12
6
votes
3 answers
Facebook login secure?
I want to let people to log in with "Facebook login".
but, I wonder if it is secure enough, or I'm just doing it wrong.
What I'm getting back after a successful login is the user data, with the facebook_id, which I'm inserting to the DB passed by a…

Yaniv
- 1,906
- 2
- 16
- 23
6
votes
3 answers
How to pass progress value from thread to activity?
I am having a design issue sending progress bar value from class called from a Thread in Activity class to update the GUI, as the following
[The code snippet don't compile it's for explaining only]:
Class A : Extend Activity {
new Thread(new…

Ahmad Kayyali
- 8,233
- 13
- 49
- 83
6
votes
1 answer
how to use swiftmailer handler with monolog
i would like to know how exactly to use SwiftMailerHandler within Monolog packagist?
In the Monolog documentation i don't see any usage example regarding SwiftMailerHandler or maybe i missed out.
Here is the SwiftMailerHandler constructor code: …

Firman Hidayat
- 415
- 4
- 13
6
votes
2 answers
IE10 is not Handling Click Events | Help Using MSPointer
Please forgive me in advance for being a stoopid noob.
Anyway, I'm trying to make my html5 game play on IE10,
but it's not detecting my clicks.
So I research this a bit and find out that instead of understanding what this…

Donzo
- 179
- 1
- 5