Search Results

Search found 16182 results on 648 pages for 'event tracing'.

Page 15/648 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Event Listener in Google Charts API

    - by DeanGrobler
    I'm busy using Google Charts in one of my projects to display data in a table. Everything is working great. Except that I need to see what line a user selected once they click a button. This would obviously be done with Javascript, but I've been struggling for days now to no avail. Below I've pasted code for a simple example of the table, and the Javascript function that I want to use (that doesn't work). <html> <head> <script type='text/javascript' src='https://www.google.com/jsapi'></script> <script type='text/javascript'> google.load('visualization', '1', {packages:['table']}); google.setOnLoadCallback(drawTable); var table = ""; function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('number', 'Salary'); data.addColumn('boolean', 'Full Time Employee'); data.addRows(4); data.setCell(0, 0, 'Mike'); data.setCell(0, 1, 10000, '$10,000'); data.setCell(0, 2, true); data.setCell(1, 0, 'Jim'); data.setCell(1, 1, 8000, '$8,000'); data.setCell(1, 2, false); data.setCell(2, 0, 'Alice'); data.setCell(2, 1, 12500, '$12,500'); data.setCell(2, 2, true); data.setCell(3, 0, 'Bob'); data.setCell(3, 1, 7000, '$7,000'); data.setCell(3, 2, true); table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); } function selectionHandler() { selectedData = table.getSelection(); row = selectedData[0].row; item = table.getValue(row,0); alert("You selected :" + item); } </script> </head> <body> <div id='table_div'></div> <input type="button" value="Select" onClick="selectionHandler()"> </body> </html> Thanks in advance for anyone taking the time to look at this. I've honestly tried my best with this, hope someone out there can help me out a bit.

    Read the article

  • HTTP MODULE Event Does Not Fire When Click Browser's Back Button

    - by Ali
    I Wrote an Http Module that checks if logged user is restricted disables images on the page. void application_AuthorizeRequest(object sender, EventArgs e) { . . . if (context.User.IsInRole("Restricted")) { context.Response.StatusCode = 401; context.Response.End(); } The code works fine. When the page loads, every image on the screen disapears. but when I go to another page and click back button on the browser and goto previous page images appear. What should I? (I dont want to clear Cache every time) context.Response.Cache.SetNoStore(); context.Response.Cache.SetCacheability(HttpCacheability.NoCache);

    Read the article

  • Grails domain class event listner in service level

    - by BlackPanther
    Hi , I want to interrupt some specific grails domain class events(read,write,delete,update).Is there any hibernate eventlistner available for grails domain classes.So that all the calls will go through that eventslistner.I tried following def beforeLoad={}, def beforeInsert={} ,etc ..Other than that is there any other way something can be done in service level? Thanks

    Read the article

  • Customising event delegates in the jQuery validation plug-in

    - by Russell
    I am currently setting up the jQuery validation plug-in for use in our project. By default, there are some events automatically set up for handling. I.e. focus in/out, key up events on all inputs fire validation. I want it to only fire when the submit button is clicked. This functionality seems to be in-built into the plug-in, which is making it difficult to do this (without modifying the plug-in code, Not What I Want To Do). I have found the eventDelegate function calls in the plugin code prototype method: $(this.currentForm) .validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate) .validateDelegate(":radio, :checkbox, select, option", "click", delegate); When I remove these lines from the plug-in I get my result, however I would much rather do something Outside the plug-in to achieve this. Can anybody please help me? If you need any more details, please let me know. I have searched google with little success. Thanks

    Read the article

  • Javascript Mouseover bubbling from children

    - by Nicky De Maeyer
    Ive got the following html setup: <div id="div1"> <div id="content1">blaat</div> <div id="content1">blaat2</div> </div> it is styled so you can NOT hover div1 without hovering one of the other 2 divs. Now i've got a mouseout on div1. The problem is that my div1.mouseout gets triggered when i move from content1 to content2, because their mouseouts are bubbling. and the event's target, currentTarget or relatedTarget properties are never div1, since it is never hovered directly... I've been searching mad for this, but I can only find articles and solutions for problems who are the reverse of what I need. It seems trivial but I can't get it to work... The mouseout of div1 should ONLY get triggered when the mouse leaves div1. One of the possibilities would be to set some data on mouse enter and mouseleave, but I'm convinced this should work out of the box, since it is just a mouseout... EDIT: bar.mouseleave(function(e) { if ($(e.currentTarget).attr('id') == bar.attr('id')) { bar.css('top', '-'+contentOuterHeight+'px'); $('#floatable-bar #floatable-bar-tabs span').removeClass('active'); } }); changed the mouseout to mouseleave and the code worked...

    Read the article

  • Implementing tracing gestures on iPhone

    - by bmoeskau
    I'd like to create an iPhone app that supports tracing of arbitrary shapes using your finger (with accuracy detection). I have seen references to an Apple sample app called "GestureMatch" that supposedly implemented exactly that, but it was removed from the SDK at some point and I cannot find the source anywhere via Google. Does anyone know of a current official sample that demonstrates tracing like this? Or any solid suggestions on other resources to look at? I've done some iPhone programming, but not really anything with the graphics API's or custom handling of touch gestures, so I'm not sure where to start.

    Read the article

  • Prototype function to set onclick event observer in checkboxes

    - by xain
    Hi, I want to set an observer for each of the following checkboxes: <div id="listr"> <ul id="lr" style="list-style-type: none"> <p class="tir">Text 1</p> <li class="ro"><input type="checkbox" name="r1" id="r1"/>A1</li> <li class="ro"><input type="checkbox" name="r2" />A2</li> <p class="tir">Text 2</p> <li class="rubro"><input type="checkbox" name="r3" />B1</li> <p class="tir">Text 3</p> <li class="ro"><input type="checkbox" name="r4" />B2</li> </ul> </div> It works if I write one observer per checkbox, but I want to do it in a short fashion, so I need something like $$('listr.lr.li.input').invoke('observe',click,function(field) { alert(this.name + ' clicked ' + this.checked); // other stuff ... }); Which is not working Thanks in advance

    Read the article

  • Getting the right result of mouse click event

    - by Jessy
    Hello, I'm curious why I got the "right" BUT "wrong"number of result when I click the mouse. I supposed to print on the console mouseClicked once everytimes the mouse is clicked. However I got many of them printed out everytimes I clicked the mouse ...sometimes 5 e.g. mouseClicked mouseClicked mouseClicked mouseClicked mouseClicked Instead of just mouseClicked Why? public void mouseClicked(MouseEvent arg0) { System.out.println("mouseClicked"); }

    Read the article

  • .NET Web Browser Control - SaveAs Event

    - by Dale
    Does anybody know if you can access the SaevFileDialog control that's used by the WebBrowser control? Once somebody saves the webpage being displayed I need to catch where the files have been created; however I can't seem to find any events/members that allow me access to that information.

    Read the article

  • Hooking a synchronous event handler on a form submit button in JS

    - by Xzhsh
    Hi, I'm working on a security project in javascript (something I honestly have not used), and I'm having some trouble with EventListeners. My code looks something like this: function prevclick(evt) { evt.preventDefault(); document.loginform.submitbtn.removeEventListener('click',prevclick,false); var req = new XMLHttpRequest(); req.open("GET","testlog.php?submission=complete",false); req.send(); document.loginform.submitbtn.click(); //tried this and loginform.submit() } document.loginform.submitbtn.addEventListener('click',prevclick,false); But the problem is, the submit button doesn't submit the form on the first click (it does, however, send the http request on the first click), and on the second click of the submit button, it works as normal. I think there is a problem with the synchronization, but I do need to have the request processed before forwarding the user to the next page. Any ideas on this would be great. Thanks in advance.

    Read the article

  • Can a Page.PrePrender event be fired before Page.Load event handler called return?

    - by flashnik
    A Page.PreRender event is guaranteed to be fired after Page.Load event is fired. But is it guaranteed to be fired after Load event handler returned? A more general question is if event lifecycle of ASP.Net page guarantees that each event is fired only after previous has returned or events can be fired while previous is still executing? How does answer change if previous event fires some custom event such as DataBound? Can such event be executed in parallel with another event in page lifecycle?

    Read the article

  • Flex - Why is my custom event not being registered with the following event listener?

    - by flexfanatic
    printableInvoice.addEventListener(batchGenerated, printableInvoice_batchGeneratedHandler); Results in this error: 1120: Access of undefined property batchGenerated. I have tried it as FlexEvent.batchGenerated and FlashEvent.batchGenerated. The MetaData and function that dispatches the even in the component printableInvoice is all right. It I instantiate printableInvoice as an mxml component instead of via action-script it well let put a tag into the mxml line: batchGenerated="someFunction()" Thanks.

    Read the article

  • Java: pass an event to another component

    - by John
    Sorry I don't know if this is very clear, but I'm pretty new to Java. So I have a JFrame with a BorderLayout containing a JPanel and a JButton. What I want to do is when something happens in my JPanel, I want for example change the text of the JButton, or enable/disable it. How would I do that? How can I access the JButton from the JPanel? I know some ways of doing it but I don't think they're the best way to do it. What would be the best way to do this? Thanks in advance

    Read the article

  • Tracing all events in VB.NET

    - by MatsT
    I keep running into situations where I don't know what event I have to listen to in order to execute my code at the correct time. Is there any way to get a log of all events that is raised? Any way to filter that log based on what object raised the event? EDIT: Final solution: Private Sub WireAllEvents(ByVal obj As Object) Dim parameterTypes() As Type = {GetType(System.Object), GetType(System.EventArgs)} Dim Events = obj.GetType().GetEvents() For Each ev In Events Dim handler As New DynamicMethod("", Nothing, parameterTypes, GetType(main)) Dim ilgen As ILGenerator = handler.GetILGenerator() ilgen.EmitWriteLine("Event Name: " + ev.Name) ilgen.Emit(OpCodes.Ret) ev.AddEventHandler(obj, handler.CreateDelegate(ev.EventHandlerType)) Next End Sub And yes, I know this is not a good solution when you actually want to do real stuff that triggers off the events. There are good reasons for the 1 method - 1 event approach, but this is still useful when trying to figure out which of the methods you want to add your handlers to.

    Read the article

  • click event working in Chrome but error in Firefox and IE

    - by Hunter Stanchak
    I am writing a messaging system with jquery. When you click on a thread title with the class '.open_message', It opens a thread with all the messages for that thread via Ajax. My issue is that when the thread title is clicked it is not recognizing the id attribute for that specific thread title in firefox and IE. It works fine in chrome, though. Here is the code: $('.open_message').on('click', function(e) { $(this).parent().removeClass('unread'); $(this).parent().addClass('read'); $('.message_container').html(''); var theID = e.currentTarget.attributes[0].value; theID = theID.replace('#', ''); var url = '".$url."'; var dataString = 'thread_id=' + theID; $('.message_container').append('<img id=\"loading\" src=\"' + url + '/images/loading.gif\" width=\"30px\" />'); $.ajax({ type: 'POST', url: 'get_thread.php', data: dataString, success: function(result) { $('#loading').hide(); $('.message_container').append(result); } }); return false; }); Thanks for the help!

    Read the article

  • forcing to Not to process an event

    - by BDotA
    C# WinApps: the main form has a key binding to CTRL-V ...so anywhere in the main app when I press CTRL-V something runs..good ... but also there are some MDI apps that are opening inside this main app ... in one of those there is a test box...ah! now CTRL-V also has a meanining for text box which is "Paste" ... so I added PreViewKeyDown to textbox and handled it, so now it is pasting BUT it is ALSO doing the main CTRL-V key binding that I had defined for the whole app ... but I do no want this to happen.... what can I do? ( I cannot change the key binding od the main app. I must keep it.)

    Read the article

  • Is it possible to export Windows event logs from multiple servers to a non-windows host, without running event manager on each of the Windows servers?

    - by Taylor Matyasz
    I want to export event logs from Windows to a non-Windows host. I was considering using Logstash, but that would seem to require that I install and run Logstash on each server. Is it possible to do this without having to run it on all of the servers? I am hoping to be able to consolidate all of the information from different servers to make searching and reporting much easier. If not, what would you recommend is the best way to export to a non-Windows host in real time? Thank you.

    Read the article

  • Event 36888 : The following fatal alert was generated: 10. The internal error state is 1203

    - by Param
    I search on the Internet, but i am unable to find, Why this error is coming? It has flooded my Event Viewer, after interval of 1 minutes, this Error pops-up. ( means the frequency is 1 minutes ) I didn't have any IIS installed. This server is purely Domain controller and no other role has been added. Please suggest, what should i do? Server OS - Window Server 2008 R2 Standard Edition More detail:- Log Name: System Source: Schannel Date: 6/28/2012 6:06:11 PM Event ID: 36888 Task Category: None Level: Error Keywords: User: SYSTEM Computer: QKSRVDC212.Corp.abc.com Description: The following fatal alert was generated: 10. The internal error state is 1203. Event Xml: 36888 0 2 0 0 0x8000000000000000 9305 System QKSRVDC212.Corp.abc.com 10 1203 Thanks & Regards, Param

    Read the article

  • SQL SERVER – Introduction to Extended Events – Finding Long Running Queries

    - by pinaldave
    The job of an SQL Consultant is very interesting as always. The month before, I was busy doing query optimization and performance tuning projects for our clients, and this month, I am busy delivering my performance in Microsoft SQL Server 2005/2008 Query Optimization and & Performance Tuning Course. I recently read white paper about Extended Event by SQL Server MVP Jonathan Kehayias. You can read the white paper here: Using SQL Server 2008 Extended Events. I also read another appealing chapter by Jonathan in the book, SQLAuthority Book Review – Professional SQL Server 2008 Internals and Troubleshooting. After reading these excellent notes by Jonathan, I decided to upgrade my course and include Extended Event as one of the modules. This week, I have delivered Extended Events session two times and attendees really liked the said course. They really think Extended Events is one of the most powerful tools available. Extended Events can do many things. I suggest that you read the white paper I mentioned to learn more about this tool. Instead of writing a long theory, I am going to write a very quick script for Extended Events. This event session captures all the longest running queries ever since the event session was started. One of the many advantages of the Extended Events is that it can be configured very easily and it is a robust method to collect necessary information in terms of troubleshooting. There are many targets where you can store the information, which include XML file target, which I really like. In the following Events, we are writing the details of the event at two locations: 1) Ringer Buffer; and 2) XML file. It is not necessary to write at both places, either of the two will do. -- Extended Event for finding *long running query* IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='LongRunningQuery') DROP EVENT SESSION LongRunningQuery ON SERVER GO -- Create Event CREATE EVENT SESSION LongRunningQuery ON SERVER -- Add event to capture event ADD EVENT sqlserver.sql_statement_completed ( -- Add action - event property ACTION (sqlserver.sql_text, sqlserver.tsql_stack) -- Predicate - time 1000 milisecond WHERE sqlserver.sql_statement_completed.duration > 1000 ) -- Add target for capturing the data - XML File ADD TARGET package0.asynchronous_file_target( SET filename='c:\LongRunningQuery.xet', metadatafile='c:\LongRunningQuery.xem'), -- Add target for capturing the data - Ring Bugger ADD TARGET package0.ring_buffer (SET max_memory = 4096) WITH (max_dispatch_latency = 1 seconds) GO -- Enable Event ALTER EVENT SESSION LongRunningQuery ON SERVER STATE=START GO -- Run long query (longer than 1000 ms) SELECT * FROM AdventureWorks.Sales.SalesOrderDetail ORDER BY UnitPriceDiscount DESC GO -- Stop the event ALTER EVENT SESSION LongRunningQuery ON SERVER STATE=STOP GO -- Read the data from Ring Buffer SELECT CAST(dt.target_data AS XML) AS xmlLockData FROM sys.dm_xe_session_targets dt JOIN sys.dm_xe_sessions ds ON ds.Address = dt.event_session_address JOIN sys.server_event_sessions ss ON ds.Name = ss.Name WHERE dt.target_name = 'ring_buffer' AND ds.Name = 'LongRunningQuery' GO -- Read the data from XML File SELECT event_data_XML.value('(event/data[1])[1]','VARCHAR(100)') AS Database_ID, event_data_XML.value('(event/data[2])[1]','INT') AS OBJECT_ID, event_data_XML.value('(event/data[3])[1]','INT') AS object_type, event_data_XML.value('(event/data[4])[1]','INT') AS cpu, event_data_XML.value('(event/data[5])[1]','INT') AS duration, event_data_XML.value('(event/data[6])[1]','INT') AS reads, event_data_XML.value('(event/data[7])[1]','INT') AS writes, event_data_XML.value('(event/action[1])[1]','VARCHAR(512)') AS sql_text, event_data_XML.value('(event/action[2])[1]','VARCHAR(512)') AS tsql_stack, CAST(event_data_XML.value('(event/action[2])[1]','VARCHAR(512)') AS XML).value('(frame/@handle)[1]','VARCHAR(50)') AS handle FROM ( SELECT CAST(event_data AS XML) event_data_XML, * FROM sys.fn_xe_file_target_read_file ('c:\LongRunningQuery*.xet', 'c:\LongRunningQuery*.xem', NULL, NULL)) T GO -- Clean up. Drop the event DROP EVENT SESSION LongRunningQuery ON SERVER GO Just run the above query, afterwards you will find following result set. This result set contains the query that was running over 1000 ms. In our example, I used the XML file, and it does not reset when SQL services or computers restarts (if you are using DMV, it will reset when SQL services restarts). This event session can be very helpful for troubleshooting. Let me know if you want me to write more about Extended Events. I am totally fascinated with this feature, so I’m planning to acquire more knowledge about it so I can determine its other usages. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Training, SQLServer, T SQL, Technology Tagged: SQL Extended Events

    Read the article

  • How can I dynamically inject code to event handlers in Delphi?

    - by mjustin
    For debugging / performance tests I would like to dynamically add logging code to all event handlers of components of a given type. For example, for all Dataset components located ona TDatamodule, I would like to add some code for the BeforeOpen and the AfterOpen event to store the start and end time and send a line to a logger with the elapsed time in the AfterOpen event. I would prefer to do this dynamically (no component subclassing), so that I can add this to all existing datamodules and forms with minimal effort only when needed. Iterating all components and filtering by their type is easy, but for the components which already have event handlers assigned, I need a way to store the existing event handlers, and assign a new modified event handler which first does the logging and then will invoke the original code which was already present. Is there a design pattern which can be applied, or even some example code which shows how to implement this in Delphi?

    Read the article

  • How can I dynamically inject code into event handlers in Delphi?

    - by mjustin
    For debugging / performance tests I would like to dynamically add logging code to all event handlers of components of a given type. For example, for all Dataset components located ona TDatamodule, I would like to add some code for the BeforeOpen and the AfterOpen event to store the start and end time and send a line to a logger with the elapsed time in the AfterOpen event. I would prefer to do this dynamically (no component subclassing), so that I can add this to all existing datamodules and forms with minimal effort only when needed. Iterating all components and filtering by their type is easy, but for the components which already have event handlers assigned, I need a way to store the existing event handlers, and assign a new modified event handler which first does the logging and then will invoke the original code which was already present. Is there a design pattern which can be applied, or even some example code which shows how to implement this in Delphi?

    Read the article

  • When designing an event, is it a good idea to prevent listeners from being added twice?

    - by Matt
    I am creating an event-based API where a user can subscribe to an event by adding listener objects (as is common in Java or C#). When the event is raised, all subscribed listeners are invoked with the event information. I initially decided to prevent adding an event listener more than once. If a listener is added that already exists in the listener collection, it is not added again. However, after thinking about it some more, it doesn't seem that most event-based structures actually prevent this. Was my initial instinct wrong? I'm not sure which way to go here. I guess I thought that preventing addition of an existing listener would help to avoid a common programming error. Then again, it could also hide a bug that would lead to code being run multiple times when it shouldn't.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >