Menu
  • HOME
  • TAGS

Number of JMS listeners on MQ

java,jms,mq,listeners

You have to look at two things here: server performance and client performance. Major JMS providers (HornetQ, ActiveMQ, etc.) can easily handle 5000+ messages per second, so you are covered on that side (if you want more information have a look at the SPECjms2007 results). Client performance depends on the...

Bukkit plugin - Listener not running?

java,plugins,bukkit,listeners

If that is your main mod class, you should never make a new instance of it. Instead, you should have an @Instance('yourmodid') public static CSmain instance; That way you can retrieve your mod instance from anywhere like so: // assuming your getSpawn() returns chunk coordinates ChunkCoordinates cc = CSmain.instance.getSpawn(); You...

What is the easiest way to select a list-item in a html list with jquery or javascript?

javascript,jquery,html,list,listeners

This is a better way to solve the problem, since using css classes is better than modifying css directly in javascript. Also you would be able to do more styling than just change the background for the selected item. I have also modified some of the javascript eliminating unnecessary foreach...

Is it possible for a DigitalMicrograph script object to be notified of an ROI change on an image?

events,listeners,dm-script

Yes there are. In fact, as far as ROIs are concerned there are two possibilities. First option: Listen to a specific ROI Any ROI in DigitalMicrograph has a unique ID number. You can add a listener to that particular ROI-ID as with the script below. Note, that the identical ROI...

how to implement ctrl+backspace and ctrl+delete for a text edior in swt

java,swt,text-editor,e4,listeners

addSelectionListener() is the wrong method to use here; use addKeyListener() and then a KeyAdapter to process the events. java2s has an example: http://www.java2s.com/Code/JavaAPI/org.eclipse.swt.custom/StyledTextaddKeyListenerKeyListenerkey.htm or here for a more complete one: http://www.java2s.com/Tutorial/Java/0280__SWT/Asimpleeditor.htm Your code to implement "copy to clipboard" is not necessary since StyledText already implements this. Just call the copy()...

Phonegap 3.3 / 3.4 - event firing issue android

android,events,cordova,listeners

This did the trick for me for Jellybean: It still isn't working for KitKat... <script type="text/javascript"> document.addEventListener("deviceready", onDeviceReady, false); document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); function onDeviceReady() { alert("device ready"); appStartUp(); }; // Handle the resume event // function onResume() { setTimeout(function() { alert("onResume"); }, 0); }; // Handle the...

Extjs 5.1: method in a ViewController not invoked

javascript,viewcontroller,extjs5,listeners

I found the solution: Add this in the ViewController control: { '#': { afterlayout: 'onMainAfterLayout' } }, remove the listeners from the view ...

How to send data through Matlab Events and Listeners?

matlab,events,asynchronous,real-time,listeners

Suppose I have a class 'myClass' that I want to listen to. First, I need to write my class with an event: classdef myClass < handle properties % list of properties end events myEvent end methods % ... we'll write this in a second! end end Then, we build another...

acessing variables inside an enclosing scope, specifically BlahListeners

java,eclipse,listeners

Maybe like this? ContainingClass.this.someMethod(); // Inside your Listener for example ContainingClass and someMethod are just bogus values ;) You need to get out of the Listener scope if I did understand you correctly....

Java Swing - Detecting a change in the document

java,swing,listeners

How does your this even compile notepad = new JTextArea(); notepad.addTextListener(new TextListener() { // .... } since TextListeners are not defined to work with JTextAreas but rather with TextAreas, a completely different beast. You should add a DocumentListener to your JTextArea's Document. notepad.getDocument().addDocumentListener(new DocumentListener() { void insertUpdate(DocumentEvent e) { documentChanged...

Javascript onkeydown event on HTML element

javascript,jquery,onkeydown,listeners

You need to use the DOMContentLoaded event to delay execution until after the HTML has loaded. In plain JavaScript, it will look something like this: document.addEventListener('DOMContentLoaded', function() { var container = document.getElementById('container'); container.addEventListener('keydown', function(e) { alert("a") }); }); With jQuery, it's pretty much the same, but a little shorter: $(document).ready(function()...