Search Results

Search found 25579 results on 1024 pages for 'complex event processing'.

Page 167/1024 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • Why doesn't the .click() not work in this instance?

    - by Deshiknaves
    Basically what this does is fadeIn pre-existing divs and then loads an image. When the image is loaded it then appends that into one of the pre-existing divs. Then it appends a new div with an id of xButton. Then later it $('#xButton').click() should hide the 3 divs. However it just doesn't work. If I change the click() to either #modalImage or #overlay, it works but just not for the #xButton. I would really like to figure out why its not working and how I should be doing this instead. Thanks. $(function(){ $('#container a').click(function(e){ e.preventDefault(); var id = $(this).attr('href'), img = new Image(); $('#overlay').fadeIn(function(){ $('#modalImage').fadeIn(); }); $(img).load(function(){ $(this).hide(); $('#modalImage').removeClass('loader').append(this); $(this).fadeIn(function(){ var ih = $(this).outerHeight(), iw = $(this).outerWidth(), newH = ($(window).height()/10)*7, newW = ($(window).width()/10)*7; if (ih >= iw && ih >= newH) { $(this).css('height',newH + 'px'); $(this).css('width', 'auto'); } else if (ih >= iw && newH > ih) { $(this).css('height', ih + 'px'); $(this).css('width', 'auto'); } else if (iw > ih && iw >= newW) { if ((newW / (iw / ih)) > newH) { $(this).css('width', 'auto'); $(this).css('height', newH + 'px'); } else { $(this).css('width', newW + 'px'); $(this).css('height', 'auto'); } } else { $(this).css('width', iw + 'px'); $(this).css('height', 'auto'); } var padW = ($(window).width() - $(this).outerWidth()) / 2, padH = ($(window).height() - $(this).outerHeight()) / 2; console.log (padH + ' ' + padW); $(this).css('top', padH); $(this).css('left', padW); if($('#overlay').is(":visible") == true) { ih = ih + 4; $('<div id="xButton">x</div>').appendTo('#modalImage'); if (padH >= 0) { $('#xButton').css('top', padH - 4).css('right', padW - 65); } else { $('#xButton').css('top', '20px').css('right', padW - 65); } } }); }).attr('src', id); }); $('#xButton').click(function(){ $(this).hide(); $('#overlay').fadeOut(function(){ $('#modalImage img').css('top', '-9999px').remove(); $('#xButton').remove(); $('#modalImage').addClass('loader'); }); }); });

    Read the article

  • HTML Input on change of value

    - by arik-so
    Hello, I have an input tag. This tag does not have the autocomplete feature turned off, thus, one does not necessarily need to release a key to change the value of this field and focus anotehr one. My question is: how can I detect ANY value changes of this particular field, like e. g. <input onvaluechange="//do following..." /> The JavaScritp attribute onchange does not fire on change of value, only on changes like blur, focus, etc... Thanks in advance!

    Read the article

  • Grails: Duplicates & unique constraint validation

    - by rukoche
    OK here is stripped down version of what I have in my app Artist domain: class Artist { String name Date lastMined def artistService static transients = ['artistService'] static hasMany = [events: Event] static constraints = { name(unique: true) lastMined(nullable: true) } def mine() { artistService.mine(this) } } Event domain: class Event { String name String details String country String town String place String url String date static belongsTo = [Artist] static hasMany = [artists: Artist] static constraints = { name(unique: true) url(unique: true) } } ArtistService: class ArtistService { def results = [ [ name:"name", details:"details", country:"country", town:"town", place:"place", url:"url", date:"date" ] ] def mine(Artist artist) { results << results[0] // now we have a duplicate results.each { def event = new Event(it) if (event.validate()) { if (artist.events.find{ it.name == event.name }) { log.info "grrr! valid duplicate name: ${event.name}" } artist.addToEvents(event) } } artist.lastMined = new Date() if (artist.events) { artist.save(flush: true) } } } In theory event.validate() should return false and event will not be added to artist, but it doesn't.. which results in DB exception on artist.save() Although I noticed that if duplicate event is persisted first everything works as intended. Is it bug or feature? :P

    Read the article

  • Programmatically triggering events in Javascript for IE using jQuery

    - by Dan Herbert
    When an Event is triggered by a user in IE, it is set to the window.event object. The only way to see what triggered the event is by accessing the window.event object (as far as I know) This causes a problem in ASP.NET validators if an event is triggered programmatically, like when triggering an event through jQuery. In this case, the window.event object stores the last user-triggered event. When the onchange event is fired programmatically for a text box that has an ASP.NET validator attached to it, the validation breaks because it is looking at the element that fired last event, which is not the element the validator is for. Does anyone know a way around this? It seems like a problem that is solvable, but from looking online, most people just find ways to ignore the problem instead of solving it. To explain what I'm doing specifically: I'm using a jQuery time picker plugin on a text box that also has 2 ASP.NET validators associated with it. When the time is changed, I'm using an update panel to post back to the server to do some things dynamically, so I need the onchange event to fire in order to trigger the postback for that text box. The jQuery time picker operates by creating a hidden unordered list that is made visible when the text box is clicked. When one of the list items is clicked, the "change" event is fired programmatically for the text box through jQuery's change() method. Because the trigger for the event was a list item, IE sees the list item as the source of the event, not the text box, like it should. I'm not too concerned with this ASP.NET validator working as soon as the text box is changed, I just need the "change" event to be processed so my postback event is called for the text box. The problem is that the validator throws an exception in IE which stops any event from being triggered. Firefox (and I assume other browsers) don't have this issue. Only IE due to the different event model. Has anyone encountered this and seen how to fix it? I've found this problem reported several other places, but they offer no solutions: jQuery's forum, with the jQuery UI Datepicker and an ASP.NET Validator ASP.NET forums, bug with ValidatorOnChange() function

    Read the article

  • How can I handle all my errors/messages in one place on an Asp.Net page?

    - by Atomiton
    Hi all, I'm looking for some guidance here. On my site I put things in Web user controls. For example, I will have a NewsItem Control, an Article Control, a ContactForm control. These will appear in various places on my site. What I'm looking for is a way for these controls to pass messages up to the Page that they exist on. I don't want to tightly couple them, so I think I will have to do this with Events/Delegates. I'm a little unclear as to how I would implement this, though. A couple of examples: 1 A contact form is submitted. After it's submitted, instead of replacing itself with a "Your mail has been sent" which limits the placement of that message, I'd like to just notify the page that the control is on with a Status message and perhaps a suggested behaviour. So, a message would include the text to render as well as an enum like DisplayAs.Popup or DisplayAs.Success 2 An Article Control queries the database for an Article object. Database returns an Exception. Custom Exception is passed to the page along with the DisplayAs.Error enum. The page handles this error and displays it wherever the errors go. I'm trying to accomplish something similar to the ValidationSummary Control, except that I want the page to be able to display the messages as the enum feels fit. Again, I don't want to tightly bind or rely a control existing on the Page. I want the controls to raise these events, but the page can ignore them if it wants. Am I going about this the right way? I'd love a code sample just to get me started. I know this is a more involved question, so I'll wait longer before voting/choosing the answers.

    Read the article

  • WPF button click in C# code

    - by KMC
    I have an array of button which is dynamically generated at run time. I have the function for button click in my code, but I can't find a way to set the button's click name in code. So, what is the code equivalent for XAML: <Button x:Name="btn1" Click="btn1_Click"> Or, what should I place for "????" in the following Code: Button btn = new Button()btn.Name = "btn1";btn.???? = "btn1_Click";

    Read the article

  • How to re-enable the context menu in this case?

    - by lemonedo
    document.addEventListener('contextmenu', function (e) { e.preventDefault() e.stopPropagation() e.returnValue = false e.cancleBubble = true }) No way? Edit: document.oncontextmenu = null does not work. P.S. I cannot have the reference of the listener function since I am not the owner of the site preventing the context menu.

    Read the article

  • How to handle touch events on UI Controls

    - by Sreelatha
    Hi, I have a query related to Touch events on the UI controls. I have 4 controls on the screen ( UITextField, UISlider, UISwitch, UIButton ). If the user touches any of the control on the screen, I want to fire touchesBegan and touchesEnded events on those controls in which I would implement some code. Please let me know how to fire these events. Thanks in advance, Sreelatha.

    Read the article

  • In Xlib, How can I animate until an event occurs?

    - by Animateur
    Hi, I've been trying to animate in a C program using Xlib and I wanna do something when an event occurs, otherwise I wanna keep animating. Here's an example code snippet of what I am doing currently: while( 1 ) { // If an event occurs, stop and do whatever is needed. // If no event occurs, skip this if statement. if ( XEventsQueued( display, QueuedAlready ) > 0 ) { XNextEvent( display, &event ) switch ( event.type ) { // Don't do anything case Expose: while ( event.xexpose.count != 0 ) break; // Do something, when a button is pressed case ButtonPress: ... break; // Do something, when a key is pressed case KeyPress: ... break; } } animate(); // Do animation step i.e. change any drawings... repaint(); // Paint again with the new changes from animation... } So basically, I wanna keep looping if the user hasn't clicked the mouse OR pressed a key in the keyboard yet. When the user presses a key OR clicks the mouse, I wanna stop and do a specific action. The problem in my above code is that, it doesnt stop whenever I do an action. If I remove the if statement, the animation blocks until an event occurs, however I do not want this. It's a simple problem, but I'm kinda new to Xlib/animations so any help would be highly appreciated. Thanks.

    Read the article

  • Event Aggregator.. not getting a response, how to determine completion?

    - by Duncan_m
    I'm rewriting a vehicle tracking application, a google maps based thing.. The users are able to search for a vehicle by typing a few characters of the vehicles "callsign". My application is based around a sort of "event bus" within Backbone.. when a search occurs I send a message on the bus saying something like "does anyone match this?".. If a marker matches the search term it responds with a sort of "yes, I match!".. My challenge arises when no-one matches, I get no response.. it feels a little hacky to "wait a little while" and check if a response has been recieved.. The application is based around Backbone.js and using the Event Aggregator pattern described in the answer to this question on Stack Overflow: http://stackoverflow.com/questions/7708195/access-function-in-one-view-from-another-in-backbone-js Is there a well defined design pattern that might assist me here? Sending a request for a response and not getting any responses?

    Read the article

  • Elements of a Java Object Array are created but without correct names

    - by Greenhouse Gases
    Hi all Im having rather an annoying problem. I have a class called Person and a class called Event which serve to create objects to be used for competitors that compete in a certain event. When I add a competitor thats fine and the GUI list updates accordingly, however when I add an event the element in the array does not take on the value of the instance variable name in the class Event and so the GUI does not show the event name, though it is being added in the array correctly. How can I make it so that the event object in each element of the listOfEvents array (which is an array of event objects) has the name of the event. I should add this is for university though this isnt the part for which we will be assessed, it is somethign i have come across and due to not being able to see the code for the GUI, I've hit the proverbial brick wall. I wont include the whole load of code Ive been writing but hopefully my description and snippets below will suffice. Any advice I would appreciate greatly. No doubt I have overlooked something simple! Many thanks. listOfEvents is declared as: Event[] listOfEvents = new Event[20]; A snippet from the Event class: public class Event { String name; Person[] participants = new Person[10]; // array of competitors for the event public Event(String name) { this.name = name; } } and its use in the addEvent method (p is a global variable): public void addEvent(String eventName) { listOfEvents[p] = new Event(eventName); p++; }

    Read the article

  • Hook key & key combinations from keyboard with Qt 4.6

    - by Viet
    Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen capture but I don't know how to monitor keyboard globally for key combinations. Please kindly advise. Any help or hint is greatly appreciated! Thanks in advance!

    Read the article

  • XSLT: For each node transform, if A =2 and A=1 were both found do this else do that

    - by Larry
    Example 1: <time> <timestamp>01:00</timestamp> <event>arrived<event> </time> <time> <timestamp>02:00</timestamp> <event>left<event> </time> Example 2: <time> <timestamp>02:00</timestamp> <event>left<event> </time> The XSLT needs to do: FOR EACH node DO: IF event=arrived THEN set eventtype=atdestination IF event=left is found AND event=arrived is found THEN set new node type=leftdestination ELSE set type=left XSLT applied to example 1: <event> <time>01:00</time> <type>atdestination</type> <event> <event> <time>02:00</time> <type>leftdestination</type> <event> XSLT applied to example 2: <event> <time>02:00</time> <type>left</type> <event>

    Read the article

  • How to determine element touched on touchend for a page with layers

    - by Greg
    I cannot supply a follow up question as of yet to Get the element under a touchend , so I am opening a new issue. I want to get the element under a touchend that is different from the touchstart, but my page has absolutely positioned elements, and the function document.elementFromPoint keeps on returning my background element instead of every element in front of it. How do I get the actual element being touched?

    Read the article

  • Updating external Flex components from an action

    - by Scott
    Hello, I'm new to Flex and am having trouble understanding Events. I think Events are what I want to use for my situation. I have 2 components, addUser.mxml and listUsers.mxml. I access these from a ViewStack in my main application. When I load listUsers.mxml it shows a list of current users in a datagrid via a HTTPService call. When I add a user using the form on addUser.mxml I would like the datagrid in listUsers.mxml to refresh when I return to that view to show the new user. I've tried several different things with addEventListener and dispatchEvent but can't seem to get it working. Can someone help me with this logic?

    Read the article

  • Python - How can I make this code asynchronous?

    - by dave
    Here's some code that illustrates my problem: def blocking1(): while True: yield 'first blocking function example' def blocking2(): while True: yield 'second blocking function example' for i in blocking1(): print 'this will be shown' for i in blocking2(): print 'this will not be shown' I have two functions which contain while True loops. These will yield data which I will then log somewhere (most likely, to an sqlite database). I've been playing around with threading and have gotten it working. However, I don't really like it... What I would like to do is make my blocking functions asynchronous. Something like: def blocking1(callback): while True: callback('first blocking function example') def blocking2(callback): while True: callback('second blocking function example') def log(data): print data blocking1(log) blocking2(log) How can I achieve this in Python? I've seen the standard library comes with asyncore and the big name in this game is Twisted but both of these seem to be used for socket IO. How can I async my non-socket related, blocking functions?

    Read the article

  • Will [WithEvents = Nothing] RemoveHandlers in the derived class?

    - by serhio
    I use to set WithEvents variables to Nothing in Destuctor, because this will "Remove" all the Handlers associated with Handles keyword. Will this have the same effect for derivated classes? Class A Protected WithEvents _Foo as Button Private Sub _Foo_Click Handles _Foo.Click ' ... some Click action ' End Sub Public Sub Dispose(disposing as Boolean) If disposing then _Foo = Nothing ' remove handler _Foo_Click ' End Sub End Class Class B Inherits A Private Sub _Foo_Move Handles _Foo.Move ' ... some Move action ' End Sub ' ????? will or NOT remove OR handler _Foo_Move the base Dispose??' Public Overrides Sub Dispose(disposing as Boolean) 'If disposing then _Foo = Nothing ' MyBase.Dispose(disposing) End Sub End Class

    Read the article

  • Upgrading PHP from 5.1 to 5.2 on CentOS 5.4

    - by andufo
    i'm trying to upgrade php 5.1 to 5.2 on a CentOS 5.4 I use: yum upgrade php The result is this (check out the last part): [root@mail httpd]# yum update php Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.raystedman.net * base: mirrors.serveraxis.net * centosplus: mirrors.tummy.com * contrib: mirror.raystedman.net * extras: mirror.raystedman.net * updates: mirrors.netdna.com Setting up Update Process Resolving Dependencies --> Running transaction check --> Processing Dependency: php = 5.1.6-27.el5 for package: php-devel --> Processing Dependency: php = 5.1.6 for package: php-eaccelerator ---> Package php.x86_64 0:5.2.10-1.el5.centos set to be updated --> Processing Dependency: php-cli = 5.2.10-1.el5.centos for package: php --> Processing Dependency: php-common = 5.2.10-1.el5.centos for package: php --> Running transaction check --> Processing Dependency: php = 5.1.6 for package: php-eaccelerator ---> Package php-cli.x86_64 0:5.2.10-1.el5.centos set to be updated --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-xml --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-pdo --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-gd --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-ldap --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mbstring --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mysql --> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-imap ---> Package php-common.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-devel.x86_64 0:5.2.10-1.el5.centos set to be updated --> Running transaction check --> Processing Dependency: php = 5.1.6 for package: php-eaccelerator ---> Package php-gd.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-imap.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-ldap.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-mbstring.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-mysql.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-pdo.x86_64 0:5.2.10-1.el5.centos set to be updated ---> Package php-xml.x86_64 0:5.2.10-1.el5.centos set to be updated --> Finished Dependency Resolution php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 from installed has depsolving problems --> Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed) Error: Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package. [root@mail httpd]# What are the consequences of using --skip-broken? Any recommendations?

    Read the article

  • Applescript create event in calendar, how do I remove the default alert?

    - by zero0cool
    Running 10.8 Mountain Lion, I'm trying to create a new event with Applescript like this: set theDate to (current date) tell application "Calendar" tell calendar "Calendar" set timeString to time string of theDate set newEvent to make new event at end with properties {description:"Last Backup", summary:"Last Backup " & timeString, location:"To a local unix system", start date:theDate, end date:theDate + 15 * minutes, allday event:false, status:confirmed} tell newEvent delete every display alarm delete every sound alarm delete every mail alarm delete every open file alarm end tell end tell end tell However, this does not remove the default Calendar alert which one can set through Calendar preferences (30 minutes prior in my case). How do I create an event with no alarms at all through Applescript?

    Read the article

  • How can I use Web Services Core to send a complex type as a parameter to a SOAP API method

    - by Matthew Brindley
    I don't do much Cocoa programming, so I'm probably missing something obvious, so please excuse the basic question. I have a SOAP method that expects a complex type as a paramater. Here's some WSDL: <s:element name="SaveTestResult"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="result" type="tns:TestItemResponse" /> </s:sequence> </s:complexType> </s:element> Here's the definition of the complex type "TestItemResponse": <s:complexType name="TestItemResponse"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="TestItemRequestId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="ExternalId" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="ApiId" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="InboxGuid" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="SpamResult" type="tns:SpamResult" /> <s:element minOccurs="0" maxOccurs="1" name="ResultImageSet" type="tns:ResultImageSet" /> <s:element minOccurs="1" maxOccurs="1" name="ExclusiveUseMailAccountId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="State" type="tns:TestItemResponseState" /> <s:element minOccurs="0" maxOccurs="1" name="ErrorShortDescription" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="ErrorFullDescription" type="s:string" /> </s:sequence> </s:complexType> I've been using Web Services Core to call a SOAP API method that requires a simple string param, that works great. That same method returns a complex type which WSC converted into nested NSDictionaries, so no problems there. So I assumed I'd be able to convert my local TestItemResponse class into an NSDictionary and then use that as the complex type param. It almost worked, but unfortunately WSC set the object's type as "Dictionary", instead of "TestItemResponse", and the server complained. <TestItemResponse xsi:type=\"SOAP-ENC:Dictionary\"> <ErrorFullDescription xsi:type=\"xsd:string\">foo</ErrorFullDescription> ... I can't seem to find anything that allows you to override the type WSC assigns to the element in the SOAP XML. I've been using code adapted from here, I'm happy to list it, it's just quite long and this is already the longest SO question I've ever posted.

    Read the article

  • Why does Event intent in android not return a result?

    - by dhaval
    I am creating a event using Intent intent = new Intent(Intent.ACTION_EDIT); intent.setType("vnd.android.cursor.item/event"); And invoking the intent using startActivityForResult(intent, Constants.LINK_CALENDER); There is nothing returned to call in onActivityResult(int requestCode, int resultCode, Intent data) It always returns data=null ie., returned intent result is always null. I am trying to retrieve the "Done/Revert" state of calender event just created and some identity so that i can open the event again in future from elsewhere in code.

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >