Questions tagged [handlers]

228 questions
63
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,092
  • 4
  • 20
  • 34
23
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
  • 401
  • 1
  • 4
  • 7
20
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,541
  • 1
  • 21
  • 33
18
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
  • 301
  • 2
  • 8
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,135
  • 9
  • 14
12
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
  • 327
  • 1
  • 3
  • 16
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
  • 569
  • 2
  • 7
  • 14
9
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
  • 113
  • 1
  • 2
  • 6
8
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
  • 604
  • 2
  • 11
  • 23
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
  • 13,332
  • 9
  • 61
  • 83
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
  • 2
  • 11
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,908
  • 2
  • 16
  • 22
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,236
  • 13
  • 47
  • 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
  • 395
  • 3
  • 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
  • 169
  • 1
  • 5
1
2 3
15 16