Search Results

Search found 1192 results on 48 pages for 'listener'.

Page 31/48 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Apache Commons EmailValidator and SeamListener Exception (not deploying)

    - by ranirani
    Hi, friends When using Apache Commons EmailValidator through Maven, I have the following problem that doesn't deploy my app: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.LinkageError: loader constraints violated when linking org/xml/sax/EntityResolver class I've used the following code at my pom.xml: <dependency> <groupId>commons-validator</groupId> <artifactId>commons-validator</artifactId> <version>1.3.1</version> </dependency> One help?

    Read the article

  • addEventListener gone after appending innerHTML

    - by Vishal Shah
    Okay, so i have the following html added to a site using javascript/greasemonkey. (just sample) *a id='abc'*HEllo*/a* *a id='xyz'*Hello*/a* (excuse me, i've had to replace the '<' '' with * since hyperlinks for new users aren't allowed!) and i've also added a click event listener for the elements. All works fine up to this point, the click event gets fired when i click the element. But... i have another function in the script, which upon a certain condition, modifies that html, ie it appends it, so it looks like: *a id='abc'*HEllo*/a* *a id='xyz'*Hello*/a* *a id='123'*Hello*/a* but when this is done, it breaks the listeners i added for the first two elements... nothing happens when i click them. if i comment out the call to the function which does the appending, it all starts working again! help please...

    Read the article

  • How to host your own http-like server using ServiceHost or its analog capable to host WCF services?

    - by Ole Jak
    I use ServiceHost for hosting WCF cervices. I want to host near to my WCF services my own tcp programm (like WCF service but with out WCF) for direct sockets operations (like lien to some sort of broadcasting TCP stream) I want to use ServiceHost for somehow simplyfiing proces of creating my TCP sender\listener, to somehow control namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs like www.example.com:34123/myserver/stream?id=1 or www.example.com:34123/myserver/stream?id=222 and so that I will not be bothered with Idea of 1 client for 1 socket at one time moment, BTW I realy want to keep my WCF services on the same port as my own server or what it is...) Can any body please help me with this?

    Read the article

  • NHibernate filters don't work with Session.Get

    - by Khash
    I'm trying to implement a Soft-deletable repository. Usually this can be easily done with a Delete Event listener. To filter out the deleted entities, I can add a Where attribute to my class mapping. However, I also need to implement two more methods in the repository for this entity: Restore and Purge. Restore will "undelete" entities and Purge will hard-delete them. This means I can't use Where attribute (since it block out soft-deleted entities to any access) I tried using filters instead. I can create a filter and enable or disable it within session to achieve the same result. But the problem is filters don't have any effect on Session.Get method (they only affect ICriteria based access). Any ideas as to how solve this problem? Thanks

    Read the article

  • How to get current compass reading android 2.1

    - by Brandon Delany
    How do I get the current compass reading in android 2.1? I know that I can initiate a listener and receive updates but I do not need constant updates I only need it to get the compass orientation when the user clicks a button. Also what is the most accurate way to get the compass orientation? Lastly, how do I send fake data to the android console. I know that you're supposed to use the terminal and send it commands but what are the commands I can't seem to find it on the Android website. Thank you

    Read the article

  • Why is NavigationHandler.handleNavigation() not forwarding to view ID?

    - by Erik Hermansen
    Inside of a phase listener class that runs during the "RESTORE_VIEW" phase, I have some code like this: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "/a/specific/path/to/a/resource.jspx"); } Navigation to the new URL doesn't work here. The request made will just receive a response from the original JSPX that was navigated to. Code like this works fine: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "OUTCOME_DEFINED_IN_FACES_CONFIG_XML"); } Also the first snippet will work with an IceFaces Faces provider, but not Sun JSF 1.2 which is what I need to use. Is there something I can do to fix the code so it is possible to forward to specific URLs?

    Read the article

  • Fastest method for SQL Server inserts, updates, selects from C# ASP.Net 2.0+

    - by Ian
    Hi All, long time listener, first time caller. I use SPs and this isn't an SP vs code-behind "Build your SQL command" question. I'm looking for a high-throughput method for a backend app that handles many small transactions. I use SQLDataReader for most of the returns since forward only works in most cases for me. I've seen it done many ways, and used most of them myself. Methods that define and accept the stored procedure parameters as parameters themselves and build using cmd.Parameters.Add (with or without specifying the DB value type and/or length) Assembling your SP params and their values into an array or hashtable, then passing to a more abstract method that parses the collection and then runs cmd.Parameters.Add Classes that represent tables, initializing the class upon need, setting the public properties that represent the table fields, and calling methods like Save, Load, etc I'm sure there are others I've seen but can't think of at the moment as well. I'm open to all suggestions.

    Read the article

  • Recommended Python publish/subscribe/dispatch module ?

    - by Eli Bendersky
    From PyPubSub: Pypubsub provides a simple way for your Python application to decouple its components: parts of your application can publish messages (with or without data) and other parts can subscribe/receive them. This allows message "senders" and message "listeners" to be unaware of each other: one doesn't need to import the other a sender doesn't need to know "who" gets the messages, what the listeners will do with the data, or even if any listener will get the message data. similarly, listeners don't need to worry about where messages come from. This is a great tool for implementing a Model-View-Controller architecture or any similar architecture that promotes decoupling of its components. There seem to be quite a few Python modules for publishing/subscribing floating around the web, from PyPubSub, to PyDispatcher to simple "home-cooked" classes. Can you recommend a module that works well in most cases ? Which modules have you had positive experience with ? Negative ? Thanks in advance

    Read the article

  • Node.js and wss://

    - by CNelson
    I'm looking to start using javascript on the server, most likely with node.js, as well as use websockets to communicate with clients. However, there doesn't seem to be a lot of information about encrypted websocket communication using TLS and the wss:// handler. In fact the only server that I've seen explicitly support wss:// is Kaazing. This TODO is the only reference I've been able to find in the various node implementations. Am I missing something or are the websocket js servers not ready for encrypted communication yet? Another option could be using something like lighttpd or apache to proxy to a node listener, has anyone had success there?

    Read the article

  • GF 3.0.1 + Virtual Server: www.myhost.com:8080/projectname-war => www.myhost.com. How?

    - by Harry Pham
    EDIT I need to change www.myhost.com:8080/myproject-war to www.myhost.com. Here is what I've been trying: I configurate the Virtual Server: server. I have still have default Network Listeners to be http-listener-1 and http-listner-2. I change the Default Web Module to ScholarActive#ScholarActive-war.war (The only option in the drop down list, since I only deploy 1 application). For the docroot, I try this ${com.sun.aas.instanceRoot}/applications/ScholarActive/ScholarActive-war_war or this ${com.sun.aas.instanceRoot}/applications/ScholarActive/ Both does not work. What does docroot need to point to, for this to work? what I try to do is: when I type localhost:8080/ScholarActive-war, then my application load, I want to make so that if I type locahost:8080, it will load the app as well, then what left is changed the port to 80. But no luck. Any Idea?

    Read the article

  • TcpListener Socket still active after program exits.

    - by lnical
    I'm trying to stop a TCP Listener as my program is exiting. I do not care about any data that is currently active on the socket or any of the active client sockets. The socket clean up code is essentially: try { myServer.Server.Shutdown(SocketShutdown.Both) } catch (Exception ex) { LogException(ex) } myServer.Server.Close(0) myServer.Stop() myServer is a TCPListener On some occasions, Shutdown will thrown an exception System.Net.Sockets.SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied at System.Net.Sockets.Socket.Shutdown(SocketShutdown how) When this happens, the socket is never released. Even after the application exits netstat shows the socket is still in the listening state. I have not been able to create definitive reproduction scenerio, it happens at seemingly random times. Client Sockets are cleaned up independently. Do you have any suggestions to help me make this socket die?

    Read the article

  • Why is EventListenerList traversed backwards in fireFooXXX()?

    - by Joonas Pulakka
    I don't understand the rationale of this code, taken from javax.swing.event.EventListenerList docs: protected void fireFooXXX() { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==FooListener.class) { // Lazily create the event: if (fooEvent == null) fooEvent = new FooEvent(this); ((FooListener)listeners[i+1]).fooXXX(fooEvent); } } } Why is the list traversed backwards? Why is only every second listener called? The event firing is implemented exactly this way in javax.swing.tree.DefaultTreeModel among others, so it's obviously me who's just not getting something.

    Read the article

  • crunching multiple js files during development

    - by Yaron Naveh
    I'm writing a backbone.js app. I have multiple js, css and html template files. I also have a script to crunch them into a single file so it is faster to download. How should I work during development: Add a listener to the file system and after every change compile the files so I can see it in a browser. This implies a 1-2 seconds overhead before I can see what I did, which is annoying for html fine-tuning. Somehow browse using the multiple files during development and only crunch before going to production. This means I need to have a separate index.html for dev and prod. What's your take?

    Read the article

  • jQuery click event on parent, but finding the child (clicked) element

    - by Mahdi
    let say I have a parent element which has so many nested child elements inside of itself: <div id="p"> <div id="c1"> <div id="c2"></div> <div id="c3"></div> </div id="c4"> <div id="c5"></div> </div> </div> I've already bind a click event on the parent: $('#p').bind('click', function() { alert($(this).attr('id')); }); Because the event is assigned to the parent element, I always see the parent id, however, I'm wondering if there is any possible way to find out which of this child elements has been clicked? I also can't assign any event to the child elements or remove the event listener from parent div.

    Read the article

  • Why would bytesTotal increase in a AS3 preloader?

    - by justkevin
    I'm creating a custom preloader for a Flex app and have noticed the following behavior: when loading, the progress bar goes to 100%, then down then back up, and so on until the app is finished loading. When I put a trace in the dowloadprogress listener, I see that while the app is loading, both bytesLoaded and bytesTotal increase, but not necessarily at the same time. Code: private function onDownloadProgress(event:ProgressEvent):void { var loaded:int = event.bytesLoaded; var total:int = event.bytesTotal; trace(event.target,loaded,total); _starfield.progress = loaded/total; } Output: [object Preloader] 134276 134276 [object Preloader] 265348 285007 [object Preloader] 285007 285007 [object Preloader] 678223 1322116 [object Preloader] 809295 1322116 [object Preloader] 1322116 1322116 [object Preloader] 1322116 1322116 [object Preloader] 1387652 1584342 [object Preloader] 1791882 1791882 [object Preloader] 2293133 2293133 [object Preloader] 2362938 2362938 [object Preloader] 2362938 2362938 [object Preloader] 2362938 2362938 Why does bytesTotal change during load?

    Read the article

  • killing a separate thread having a socket

    - by user311906
    Hi All I have a separate thread ListenerThread having a socket listening to info broadcasted by some remote server. This is created at the constructor of one class I need to develop. Because of requirements, once the separate thread is started I need to avoid any blocking function on the main thread. Once it comes to the point of calling the destructor of my class I cannot perform a join on the listener thread so the only thing I can do is to KILL it. My questions are: what happens to the network resoruces allocated by the function passed to the thead? Is the socket closed properly or there might be something pending? ( most worried about this ) is this procedure fast enough i.e. is the thread killed so that interrupt immediately ? I am working with Linux ...what command or what can I check to ensure that there is no networking resource left pending or that something went wrong for the Operating system I thank you very much for your help Regards MNSTN NOTE: I am using boost::thread in C++

    Read the article

  • custom DB logging using enterprise library 4.1

    - by Rohit
    We have to create a historical log of all the changed entities. we have defined our custom tables for this purpose. I have to incorporate this tables in Enterprise library logging block and do logging in these tables. I need to write a SP to insert values to these tables. Till now,what i have got from google is that i have to create a listener inheriting from CustomTraceListener and give my implementation of WriteMessage. What i need to know is,how will i plug my tables and SP in Enterprise library logging block.

    Read the article

  • dragging components in flex

    - by SuperString
    so I am trying to drag around some images in a canvas. I am adding eventlisteners to the components and calling startDrag() and stopDrag() to pick them up and stuff: component.addEventListener(MouseEvent.MOUSE_DOWN, component.startDrag) The problem is that it is selecting the image at its (0,0) location and not where I initially click on it. So there's a sudden "jump" when I click on the image. It is not smooth. I noticed that startDrag() has two default parameters, one of them is lockCenter and it is default to false. Maybe do I set it equal to true somehow? (I don't know how to pass arguments to my second parameter in addeventlistener) Another question: if I want to add more conditions to it, like make a new function that uses component.startDrag(), how do I pass the component to this function while adding event listener to it at the same time? for example: I want to do: component.addEventListener(MouseEvent.MOUSE_DOWN, some_other_function); where some_other_function uses component.startDrag(); Thanks!

    Read the article

  • action method is not called in JSF

    - by gurupriyan.e
    This is my Phase Listener public class AdminPhaseListener implements PhaseListener { private static final long serialVersionUID = -1161541721597667238L; public void afterPhase(PhaseEvent e) { System.out.println("after Phase " + e.getPhaseId()); } public void beforePhase(PhaseEvent e) { System.out.println("before Phase " + e.getPhaseId()); if(e.getPhaseId()== PhaseId.RESTORE_VIEW) { } } public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; }} On click of a Command Button in my page, i call an action method and do some processing but the action method is not called at all, but in the server log , i could see the messages printed by my PhaseListener for all the Phases. If my view was not changed, It would have stopped after the RESTORE_VIEW Phase right? any thoughts?

    Read the article

  • Pass in the object a java class is embedded in as a parameter.

    - by Leif Andersen
    I'm building an android application, which has a list view, and in the list view, a click listener, containing an onItemClick method. So I have something like this: public class myList extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { getListView().setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { /* Do something*/ } } } Normally, this works fine. However, many times I find myself needing too preform an application using the outer class as a context. thusfar, I've used: parent.getContext(); to do this, but I would like to know, is that a bad idea? I can't really call: super because it's not really a subclass, just an embedded one. So is there any better way, or is that considered cosure? Also, if it is the right way, what should I do if the embedded method doesn't have a parameter to get the outside class? Thank you.

    Read the article

  • Compass accuracy dilemma

    - by mob1lejunkie
    I need to build compass for my application. From reading the documentation it seems there are two reasonable ways of doing this: Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purposes is unacceptable. Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD and getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() method: The documentation says this "is usually more accurate". The problem is regardless of the delay I register with listener the compass goes crazy even when the device is stationary on flat surface. Any suggestions for solving this problem will be greatly appreciated.

    Read the article

  • Preventing a Firefox Extension's load event from triggering across tabs

    - by lgomez
    Hi, I've been working on a Firefox extension that uses an iFrame to do some background scrapping. I have gone through a number of hoops to get it to trigger only once in the window/tab where it should but now when I open a different tab that tab triggers the load event. I found this: https://developer.mozilla.org/en/Code_snippets/Progress_Listeners but the snippets are not there. This was helpful before but doesn't solve the problem: https://developer.mozilla.org/en/Code_snippets/On_page_load More frustrating is that if there is this: https://developer.mozilla.org/En/Listening_to_events_on_all_tabs why should I worry about the normal event listener triggering in more than one tab? Any ideas or examples?

    Read the article

  • javascript and extJs - scope question

    - by ben
    Hi guys, I got a little scope related problem with some js code, maybe somebody can explain to me what I'm making wrong: I'm using extJs and got this snippet: Ext.onReady(function(){ // Form for filter selection var formFilter = new Ext.FormPanel({ // ... items: [ cbGroup = new Ext.form.ComboBox({ fieldLabel: 'Group', store: dsGroups, displayField: 'name', valueField: 'number', emptyText : '- Please choose a group -', listeners:{ 'select': function() { alert(cbGroup.selectedIndex +' '+this.selectedIndex); } } }) ] }); }); The problem: When I access the combobox over 'this' within the listener function, I get the correct result for the selectIndex property. When I access the combobox over it's var name, I allways get the result '-1'. Thank a lot for your help!

    Read the article

  • Starting self hosted WCF services on demand

    - by Pieter
    Is it possible to start self hosted WCF services on demand? I see two options to accomplish this: Insert a listener in the self hosted WCF's web server and spin up a service host when a request for a specific service comes in, before WCF starts looking for the existence of that endpoint; or Integrate a web service in process, start a service host for a request if it isn't running yet and redirect the request to that service host (like I suspect IIS does). I cannot use IIS or WAS because the web services need to run in process with the UI business logic. Which is feasible and how can I accomplish this? EDIT: I cannot just start the service hosts because there are hundreds, most (about 95%) of which are (almost) never used but need to be available. This is for exposing a business logic layer of 900 entities.

    Read the article

  • Connecting to Google app email servers in Python to send from an alias

    - by user575228
    I'm looking to send many emails via Python and would like to connect to Google's email servers to send it from my company email address (it's for work). I've got working code for sending the email through the old company email ([email protected]) which is our login, but can't figure out how to send it through the alias ([email protected]) we use frequently. Long story short, logging in with my regular Google Apps account won't do and I need to sign in with an alias (nickname) instead. Alternatively, I can sign with the regular account ([email protected]) but send via a different email ([email protected]). Working in python and pretty new to programming, but am a good listener! (It's like this question: Google Apps - Send email from a nickname but in Python).

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >