Search Results

Search found 15886 results on 636 pages for 'event delegation'.

Page 6/636 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to collect Security Event Logs for a single category via Powershell

    - by Darktux
    I am trying to write a script which collects security log from all of our domain controllers hourly and stores them remotely; i can collect the security logs , but is there a way to collect the security logs by category or event number from the DC? please do let me know if any additional questions. My Code: $Eventlogs = Get-WmiObject -Class Win32_NTEventLogFile -ComputerName $computer Foreach($log in $EventLogs) { if($Log.LogFileName -eq "Security") { $Now = [DateTime]::Now $FileName = "Security" +"_"+$Now.Month+$Now.Day+$Now.Year+"_"+$Now.Hour+$Now.Minute+$Now.Second $path = "\\{0}\c$\LogFolder\$folder\$FileName.evt" -f $Computer $ErrBackup = ($log.BackupEventLog($path)).ReturnValue if($clear) { if($ErrBackup -ne 0) { "Backup failed" "Backup Error was " + $ErrBackup } } } } Copy-EventLogsToArchive -path $path -Folder $Folder }

    Read the article

  • Can't Open Up Event Viewer

    - by Erik W
    I just installed a large backlog of Windows Updates (I have Windows 7 Ultimate 64-bit) and now a handful of programs are acting strangely (not opening, crashing, etc) I went to try to diagnose the program using the Event Viewer, but when I open it up I get the error "Microsoft Management Console has Stopped Working" immediately after I double-click on the icon. Is there any way for me to figure out what is going wrong? I have another Windows 7 PC, that I tried to remotely view the logs from, but I got the error "The RPC Server is Unavailable". I'd like to start up the service, but oh wait, I can't open anything in the "Administrative Tools". I'd like not to re-install Windows, as I had just done so a couple months ago after a Windows Update jacked up my graphics card drivers.

    Read the article

  • jQuery: How to stop propagation of a bound function not the entire event?

    - by Dale
    I have a click function bound to many elements. It is possible that sometimes these elements may sit within one another. So, the click event is bound to a child and also bound to its parent. The method is specific to the element clicked. Naturally, because of event bubbling, the child's event is fired first, and then the parents. I cannot have them both called at the same time because the parents event overwrites the event of the child. So I could use event.stopPropagation() so only the first element clicked receives the event. The problem is that there are other click events also attached to the element, for example, I am using jQuery's draggable on these elements. If I stop the propagation of the click event, then draggable doesn't work, and the following click events are not called. So my question is: Is there a way to stop the event bubbling of the method the event will call and not the entire event?

    Read the article

  • Event Log "Wake Source" when system wakes from sleep

    - by Doltknuckle
    So I've been troubleshooting sleep timers for our systems and have run across an interesting issue. I need a way to report how long a system was awake after a number of different inputs. Now, I've discovered that the System Log tracks wake and sleep events and even tells you the times that everything happens at. The thing is doesn't tell you is what triggered the wake event. It does give you a numerical code however. Here are some examples of what I am finding. Index : 2901 EntryType : Information InstanceId : 1 Message : The system has resumed from sleep. Sleep Time: 2010-10-01T23:20:06.097488100Z Wake Time: 2010-10-03T17:41:12.796400500Z Wake Source: 0 Category : (0) CategoryNumber : 0 Source : Microsoft-Windows-Power-Troubleshooter -- Index : 2841 EntryType : Information InstanceId : 1 Message : The system has resumed from sleep. Sleep Time: 2010-10-01T19:19:37.239789600Z Wake Time: 2010-10-01T21:28:48.921200800Z Wake Source: 4HID Keyboard Device Category : (0) CategoryNumber : 0 Source : Microsoft-Windows-Power-Troubleshooter So here's my question: Does anyone know what the different numerical codes for the "Wake Source" mean? I think "0" is a magic packet and "4" is a USB device. Does anyone have any idea if there is any documentation out there on this for Windows 7? Thanks in advance

    Read the article

  • 40k Event Log Errors an hour Unknown Username or bad password

    - by ErocM
    I am getting about 200k of these an hour: An account failed to log on. Subject: Security ID: SYSTEM Account Name: TGSERVER$ Account Domain: WORKGROUP Logon ID: 0x3e7 Logon Type: 4 Account For Which Logon Failed: Security ID: NULL SID Account Name: administrator Account Domain: TGSERVER Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xc000006d Sub Status: 0xc0000064 Process Information: Caller Process ID: 0x334 Caller Process Name: C:\Windows\System32\svchost.exe Network Information: Workstation Name: TGSERVER Source Network Address: - Source Port: - Detailed Authentication Information: Logon Process: Advapi Authentication Package: Negotiate Transited Services: - Package Name (NTLM only): - Key Length: 0 This event is generated when a logon request fails. It is generated on the computer where access was attempted. The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe. The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network). The Process Information fields indicate which account and process on the system requested the logon. The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases. The authentication information fields provide detailed information about this specific logon request. - Transited services indicate which intermediate services have participated in this logon request. - Package name indicates which sub-protocol was used among the NTLM protocols. - Key length indicates the length of the generated session key. This will be 0 if no session key was requested. On my server... I changed my adminstrative username to something else and since then I've been inidated with these messages. I found on http://technet.microsoft.com/en-us/library/cc787567(v=WS.10).aspx that the 4 means "Batch logon type is used by batch servers, where processes may be executing on behalf of a user without their direct intervention." which really doesn't shed any light on it for me. I checked the services and they are all logging in as local system or network service. Nothing for administrator. Anyone have any idea how I tell where these are coming from? I would assume this is a program that is crapping out... Thanks in advance!

    Read the article

  • Custom Event - invokation list implementation considerations

    - by M.A. Hanin
    I'm looking for some pointers on implementing Custom Events in VB.NET (Visual Studio 2008, .NET 3.5). I know that "regular" (non-custom) Events are actually Delegates, so I was thinking of using Delegates when implementing a Custom Event. On the other hand, Andrew Troelsen's "Pro VB 2008 and the .NET 3.5 Platform" book uses Collection types in all his Custom Events examples, and Microsoft's sample codes match that line of thought. So my question is: what considerations should I have when choosing one design over the other? What are the pros and cons for each design? Which of these resembles the inner-implementation of "regular" events? Below is a sample code demonstrating the two designs. Public Class SomeClass Private _SomeEventListeners As EventHandler Public Custom Event SomeEvent As EventHandler AddHandler(ByVal value As EventHandler) _SomeEventListeners = [Delegate].Combine(_SomeEventListeners, value) End AddHandler RemoveHandler(ByVal value As EventHandler) _SomeEventListeners = [Delegate].Remove(_SomeEventListeners, value) End RemoveHandler RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs) _SomeEventListeners.Invoke(sender, e) End RaiseEvent End Event Private _OtherEventListeners As New List(Of EventHandler) Public Custom Event OtherEvent As EventHandler AddHandler(ByVal value As EventHandler) _OtherEventListeners.Add(value) End AddHandler RemoveHandler(ByVal value As EventHandler) _OtherEventListeners.Remove(value) End RemoveHandler RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs) For Each handler In _OtherEventListeners handler(sender, e) Next End RaiseEvent End Event End Class

    Read the article

  • android calender delete event

    - by Faisal khan
    I am suing android calender. how can i remove calender's event using code ? is it possible ? for clarification i would like to mention that i don't want sync process or want to remove remove event using gdata api. Only want to remove local calender's event.

    Read the article

  • YUI 3 programmatically fire change event

    - by Jasie
    Hi all, I was wondering how to programmatically fire a change event with YUI3 -- I added a change listener to one select box node: Y.get('#mynode').on('change', function(e) { Alert(“changed me”); }); and somewhere else in the script want to fire that event. It works, of course, when a user changes the select box value in the browser. But I've tried many ways to fire it programmatically, none of which have worked. Including: // All below give this error: T[X] is not a function (referring to what's called in .invoke(), // in the minified javascript Y.get('#mynode').invoke('onchange'); Y.get('#mynode').invoke('change'); Y.get('#mynode').invoke('on','change'); Y.get('#mynode').invoke("on('change')"); /* Tried using .fire() which I found here: * http://developer.yahoo.com/yui/3/api/EventTarget.html#method_fire * Nothing happens */ Y.get('#mynode').fire('change'); /* Looking around the APIs some more, I found node-event-simulate.js: * http://developer.yahoo.com/yui/3/api/node-event-simulate.js.html, * which by its name would seem to have what I want. I tried: * Error: simulate(): Event 'change' can't be simulated. * ( (function(){var I={},B=new Date().getTim...if(B.isObject(G)){if(B.isArray(G)){E=1;\n) */ Y.get('#mynode').simulate('change'); Any help would be appreciated!

    Read the article

  • AS3 Event Bubbling outside of the Scenegraph/DisplayList

    - by Brian Heylin
    Hi just wondering if it is possible to take advantage of event bubbling in non display list classes in AS3. For example in the model of an application where there is a City class that contains many Cars. What methods are there to attach an event listener to a City object and receive events that bubble up from the child Cars. To clarify The City and Car objects are not part of the display list, they are not DisplayObjects. So can bubbling be implemented outside of the display list somehow? As far as I know, this is not possible without manually attaching event listeners to each Car object and re dispatching the event from the City object. Anyone else have a cleaner solution?

    Read the article

  • C# Event handling In mutiple level /classes

    - by Amitd
    Hi, I have 3 classes A,B,C . Class A creates B .. class B creates class C. Class C raises events after some action/operation with some data, which is handled by event handler in Class B. Now I want to be handle or pass the same raised event data to Class A. I know i can raise another event from class B and handle it in A but is there a better way of handling such events?? Thx

    Read the article

  • Emulate domready event with a custom event (mootools)

    - by Rob
    I need to fire a one time only custom event that functions like the domready event, in that if new events are added after the event has occurred they are fired immediately. This is for some code that cannot execute until certain data and resources are initialized, so I want to do something like this: // I am including a script (loadResources.js) to load data and other resources, // when loadResources.js is done doing it's thing it will fire resourcesAreLoaded with: window.fireEvent('resourcesAreLoaded'); window.addEvent('resourcesAreLoaded', function() { // this is fine }); $('mybutton').addEvent('click', function() { window.addEvent('resourcesAreLoaded', function() { // this is not fine, because resourcesAreLoaded has already fired // by the time the button is clicked }); }); If possible I would like resourcesAreLoaded to function like domready, and execute the code immediately if the event has already fired: window.addEvent('testIsReady', function() { alert('firing test'); }); window.fireEvent('testIsReady'); window.addEvent('test', function() { // this will never execute unless I call fireEvent('testIsReady') again alert('test 2'); }); window.addEvent('domready', function() { alert('domready is firing'); }); window.addEvent('domready', function() { setTimeout(function() { alert('domready has already fired, so this is executed immediately'); }, 500); });

    Read the article

  • Buttons OnClick Event not firing when it causes a textboxes onChange event to fire first

    - by user48408
    I have a few textboxes and button to save their values on a webpage. The onchange event of the textboxes fires some js which adds the changed text to a js array. The ok button when clicked flushes this to the database via a webservice. This works fine except when the onchange event is caused by clicking the ok button. In this scenario the onchange of the textboxes still fires but the onClick event of the button does not. Any ideas? textboxes look something like <input name="ctrlJPView$tbcTabContainer$Details$JP_Details_Address2Text" type="text" value="test" id="ctrlJPView_tbcTabContainer_Details_JP_Details_Address2Text" onchange="addSaveDetails('Jobs###' + document.getElementById('ctrlJPView_tbcTabContainer_Details_JP_Details_Address2Text').value + ');" style="font-size:8pt;Left:110px;Top:29px;Width:420px;Height:13px;Position:absolute;" /> My save button <input type="button" name="ctrlJPView$btnOk" value="OK" onclick="saveAmendments();refreshJobGrids();return false;__doPostBack('ctrlJPView$btnOk','')" id="ctrlJPView_btnOk" class="ControlText" style="width:60px;" /> UPDATE: I guess this comes down to one of two things. 1) Something is happening before the onClick of the button gets called to surpress that call such as an inadvertent return false; or 2) the onClick event isn't firing at all. Now I've rem'd out everything actually inside the functions that are being called beforehand but the problem persists. But if i remove the call altogether it works (???)

    Read the article

  • jQuery event handling with .live() problem with setInterval and clearInterval

    - by Kyle Lafkoff
    jQuery 1.4.2: I have an image. When the mouseover event is triggered, a function is executed that runs a loop to load several images. On the contrary, the mouseout event needs to set the image back to a predetermined image and no longer have the loop executing. These are only for the images with class "thumb": $("img.thumb").live("mouseover mouseout", function(event) { var foo = $(this).attr('id'); var wait; var i=0; var image = document.getElementById(foo); if (event.type == 'mouseover') { function incrementimage() { i++; image.src = 'http://example.com/images/file_'+i+'.jpg'; if(i==30) {i=0;} } wait = setInterval(incrementimage,500); } else if (event.type == 'mouseout') { clearInterval (wait); image.src = 'http://example.com/images/default.jpg'; } return false; }); When I mouseout, the image is set to the default.jpg but the browser continues to loop though the images. It will never stop. Can someone hit me with some knowledge? Thanks.

    Read the article

  • Are event handlerss in JavaScript called in order?

    - by musicfreak
    I know this is a simple question, but I haven't had the chance to test it in any browser other than Firefox. If I attach multiple event handlers to a single event on a single DOM element, are the event handlers guaranteed to be called in the order they were added? Or should I not rely on this behavior?

    Read the article

  • Jquery click event propagation

    - by ozsenegal
    I've a table with click events bind to it rows (tr). Also,there're A elements with it owns click events assigned inside those rows. Problem is when i click on A element,it also fires click event from TD.And Im dont want this behavior,i just want to fire A click's event. Code: //Event row TR $("tr:not(:first)").click(function(){ $(".window,.backFundo,.close").remove(); var position = $(this).offset().top; position = position < 0 ? 20 : position; $("body").append($("<div></div>").addClass("backFundo")); $("body").append($("<div></div>").addClass("window").html("<span class=close><img src=Images/close.png id=fechar /></span>").append("<span class=titulo>O que deseja fazer?</span><span class=crud><a href=# id=edit>Editar</a></span><span class=crud><a href=# id=delete codigo=" + $(this).children("td:first").html() + ">Excluir</a></span>").css({top:"20px"}).fadeIn("slow")); $(document).scrollTop(0); }); //Element event $("a").live("click",function(){alert("clicked!");}); Whenever you click the anchor it fires event from it parent row.Any ideas?

    Read the article

  • Are event handlers in JavaScript called in order?

    - by musicfreak
    I know this is a simple question, but I haven't had the chance to test it in any browser other than Firefox. If I attach multiple event handlers to a single event on a single DOM element, are the event handlers guaranteed to be called in the order they were added? Or should I not rely on this behavior?

    Read the article

  • C++ wxWidgets Event (Focus) Handling

    - by Wallter
    Due to comments I added the following code (in BasicPanel) Connect(CTRL_ONE, wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_TWO,wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_THREE, wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_FOUR, wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_FIVE, wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); (enums) CTRL_NAME = wxID_HIGHEST + 5, // 6004 CTRL_ADDRESS = wxID_HIGHEST + 6, // 6005 CTRL_PHONENUMBER = wxID_HIGHEST + 7, // 6006 CTRL_SS = wxID_HIGHEST + 8, // 6007 CTRL_EMPNUMBER = wxID_HIGHEST + 9 // 6008 (The OnKillFocus Function - the declaration is included as suggested) void BasicPanel::OnKillFocus(wxFocusEvent& event) { switch (event.GetId()) { case 6004: ... break; ... ... ... } All of these added to the code do nothing when the user changes focus on which text box they are using... Q1:I am using wxWidgets (C++) and have come accost a problem that i can not locate any help. I have created several wxTextCtrl boxes and would like the program to update the simple calculations in them when the user 'kills the focus.' I could not find any documentation on this subject on the wxWidgets webpage and Googling it only brought up wxPython. The two events i have found are: EVT_COMMAND_KILL_FOCUS - EVT_KILL_FOCUS for neither of which I could find any snippet for. Could anyone give me a short example or lead me to a page that would be helpful? Q2:Would i have to create an event to handle the focus being killed for each of my 8 wxTextCtrl boxes? In the case that i have to create a different event: How would i get each event to differentiate from each other? I know i will have to create new wxID's for each of the wxTextCtrl boxes but how do I get the correct one to be triggered? class BasicPanel : public wxPanel { ... wxTextCtrl* one; wxTextCtrl* two; wxTextCtrl* three; wxTextCtrl* four; ... }

    Read the article

  • Capture KeyUp event on form when child control has focus

    - by Jon B
    I need to capture the KeyUp event in my form (to toggle a "full screen mode"). Here's what I'm doing: protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); if (e.KeyCode == Keys.F12) this.ToggleFullScreen(); } private void ToggleFullScreen() { // Snazzy code goes here } This works fine, unless a control on the form has focus. In that case, I don't get the event at all (also tried OnKeyDown - no luck there either). I could handle the KeyUp event from the child control, but the controls on the form are generated dynamically, and there may be many of them - each having many children of their own. Is there any way to do this without generating event handlers for every control on the screen (which I certainly could do with a recursive function)?

    Read the article

  • Basic GUI Event Handling Questions C#

    - by JHarley1
    Good Afternoon, I have some very basic questions on GUI Event Handling. Firstly with C# how can we link events to objects - I am guessing event handlers? If so can each handler use separate code? - How can the event handler locate the objects it must manipulate? I have a rough idea of how it works in JAVA. Pointing me towards a reference would be fine - I have already trawled Google for answers to no avail. Many Thanks, J

    Read the article

  • C# Event Handlers Using an Enum

    - by Jimbo
    I have a StatusChanged event that is raised by my object when its status changes - however, the application needs to carry out additional actions based on what the new status is. e.g If the new status is Disconnected, then it must update the status bar text and send an email notification. So, I wanted to create an Enum with the possible statuses (Connected, Disconnected, ReceivingData, SendingData etc.) and have that sent with the EventArgs parameter of the event when it is raised (see below) Define the object: class ModemComm { public event CommanderEventHandler ModemCommEvent; public delegate void CommanderEventHandler(object source, ModemCommEventArgs e); public void Connect() { ModemCommEvent(this, new ModemCommEventArgs ModemCommEventArgs.eModemCommEvent.Connected)); } } Define the new EventArgs parameter: public class ModemCommEventArgs : EventArgs{ public enum eModemCommEvent { Idle, Connected, Disconnected, SendingData, ReceivingData } public eModemCommEvent eventType { get; set; } public string eventMessage { get; set; } public ModemCommEventArgs(eModemCommEvent eventType, string eventMessage) { this.eventMessage = eventMessage; this.eventType = eventType; } } I then create a handler for the event in the application: ModemComm comm = new ModemComm(); comm.ModemCommEvent += OnModemCommEvent; and private void OnModemCommEvent(object source, ModemCommEventArgs e) { } The problem is, I get a 'Object reference not set to an instance of an object' error when the object attempts to raise the event. Hoping someone can explain in n00b terms why and how to fix it :)

    Read the article

  • AS3: Synchronize Timer event to actual time?

    - by Nebs
    I plan to use a timer event to fire every second (for a clock application). I may be wrong, but I assume that there will probably be a (very slight) sync issue with the actual system time. For example the timer event might fire when the actual system time milliseconds are at 500 instead of 0 (meaning the seconds will be partially 'out of phase' if you will). Is there a way to either synchronize the timer event to the real time or get some kind of system time event to fire when an second ticks in AS3? Also if I set a Timer to fire every 1000 milliseconds, is that guaranteed or can there be some offset based on the application load? These are probably negligible issues but I'm just curious. Thanks.

    Read the article

  • WPF Event Handler in Another Class

    - by Nathan Tornquist
    I have built a series of event handlers for some custom WPF controls. The event handles format the text displayed when the user enters or leaves a textbox based on the type of data contained (Phone number, zip code, monetary value, etc.) Right now I have all of the events locally in the C# code directly attached to the xaml. Because I have developed a could controls, this means that the logic is repeated a lot, and if I want to change the program-wide functionality I would have to make changes everywhere the event code is located. I am sure there is a way to put all of my event handlers in a single class. Can anyone help point me in the correct direction? I saw this article: Event Handler located in different class than MainWindow But I'm not sure if it directly relates to what I'm doing. I would rather make small changes to the existing logic that I have, as it works, then rewrite everything into commands. I would essentially like to something like this if possible: LostFocus="ExpandedTextBoxEvents.TextBox_LostFocus" It is easy enough to do something like this: private void TextBoxCurrencyGotFocus(object sender, RoutedEventArgs e) { ExpandedTextBoxEvents.TextBoxCurrencyGotFocus(sender, e); } private void TextBoxCurrencyLostFocus(object sender, RoutedEventArgs e) { ExpandedTextBoxEvents.TextBoxCurrencyLostFocus(sender, e); } But that is less elegant.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >