Search Results

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

Page 53/1024 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • jQuery: event that tracks click in browser autocomplete

    - by Fernando
    I have a keyup event on an input. This event works fine for auto complete when you select a value and press enter. But it doesn't work when you click at an auto complete value. Is there an event that i can use in such case? I already tried the change one but it doesn't work. Thanks! Edit: Maybe i was not clear but i am referring to the autocomplete feature that browsers have. I am not trying to build my own. Example: I have the following event: $('.product').keyup(searchByProduct); When user clicks at this input the old values that he already typed shows up ( it's the browser that does this ). If he clicks on one of the values, the function searchByProduct is not called. Which event do i have to register to track this click ( and that the input content has changed )?

    Read the article

  • Pygame single push event

    - by Miller92Time
    in Pygame i am trying to translate an image by 10% in each direction using each arrow key. right now the code i am using moves the image as long as the key is pushed down, what I want is for it to move only once regardless if the key is still pushed down or not. if event.type == KEYDOWN: if (event.key == K_RIGHT): DISPLAYSURF.fill((255,255,255)) #Clears the screen translation_x(100) draw(1) if (event.key == K_LEFT): DISPLAYSURF.fill((255,255,255)) #Clears the screen translation_x(-100) draw(2) if (event.key == K_UP): DISPLAYSURF.fill((255,255,255)) #Clears the screen translation_y(100) draw(3) if (event.key == K_DOWN): DISPLAYSURF.fill((255,255,255)) #Clears the screen translation_y(-100) draw(4) is there a simpler way of implementing this besides using time.sleep

    Read the article

  • AS3: Performance question calling an event function with null param

    - by adehaas
    Lately I needed to call a listener function without an actual listener like so: foo(null); private function foo(event:Event):void { //do something } So I was wondering if there is a significant difference regarding performance between this and using the following, in which I can prevent the null in calling the function without the listener, but am still able to call it with a listener as well: foo(); private function foo(event:Event = null):void { } I am not sure wether it is just a question of style, or actually bad practice and I should write two similar functions, one with and one without the event param (which seems cumbersome to me). Looking forward to your opinions, thx.

    Read the article

  • How to raise an event when another event is raised?

    - by WulfgarPro
    Hi, I have an application that handles the OnQuit event of another running application. I would like to raise an additional (custom) event when the OnQuit event is handled. How could I implement such an event? My OnQuit handler is like so: private void StkQuit() { _stkApplicationUi.OnQuit -= StkQuit; Marshal.FinalReleaseComObject(_stkApplicationUi); Application.Exit(); } The reason I require the additional event is so that I can tell my View layer that the application has exited. If this is not the correct way, what would be better? WulfgarPro

    Read the article

  • how to detect datacard connect and disconnect event on win32

    - by Vinayaka Karjigi
    Hi All, I have a data card, as soon as i insert the data card, i am getting the events by using wm_device_change event. But I also want to get event, when my data connect actually connects to out side world. I mean to say, as soon as we click on connect/disconnect button of data card,i want to get the event. exactly speaking wanted to know, when connection is established and disconnected. data card is vodaphone data card and i am trying to browse using that data card. what ever is the SDK, somewhere the OS should get the event of connection and disconnection to network is there any way to access that event which OS is getting. as i can see in notificaiton the changes of vodaphone connection and LAN connection data card is a USB device having SIM within it, and can be used to access internet through GPRS. can i know how to do this in win32 c/c++ programe. with regards Vinayaka Karjigi

    Read the article

  • How can I define a one-time event so that new handlers fire (once) even after the event has already occurred?

    - by harpo
    You know how this $(function() { ... }); will fire whether or not the "document ready" event has already occurred? I want to define an event like that. That event is a special case in jQuery. I'm wondering if a custom event can behave in the same way, using only the standard event mechanisms. Ideally, I'd like to be able to define handlers in the "normal" way: $(document).on("init.mything", function() { ... }); This works now if the above runs before init.mything is triggered. But if it doesn't, then the handler never runs. What makes this tricky is, I don't want to assume anything except that jQuery has loaded. Any ideas?

    Read the article

  • How are the conceptual pairs Abstract/Concrete, Generic/Specific, and Complex/Simple related to one another in software architecture?

    - by tjb1982
    (= 2 (+ 1 1)) take the above. The requirement of the '=' predicate is that its arguments be comparable. Any two structures are comparable in this case, and so the contract/requirement is pretty generic. The '+' predicate requires that its arguments be numbers. That's more specific. (socket domain type protocol) the arguments here are much more specific (even though the arguments are still just numbers and the function itself returns a file descriptor, which is itself an int), but the arguments are more abstract, and the implementation is built up from other functions whose abstractions are less abstract, which are themselves built from less and less abstract abstractions. To the point where the requirements are something like move from one location to another, observe whether the switch at that location is on or off, turn the switch on or off, or leave it the same, etc. But are functions also less and less complex the less abstract they are? And is there a relationship between the number and range of arguments of a function and the complexity of its implementation, as you go from more abstract to less abstract, and vice versa? (= 2 (+ 1 1) 2r10) the '=' predicate is more generic than the '+' predicate, and thus could be more complex in its implementation. The '+' predicate's contract is less generic, and so could be less complex in its implementation. Is this even a little correct? What about the 'socket' function? Each of those arguments is a number of some kind. What they represent, though, is something more elaborate. It also returns a number (just like the others do), which is also a representation of something conceptually much more elaborate than a number. To boil it down, I'm asking if there is a relationship between the following dimensions, and why: Abstract/Concrete Complex/Simple Generic/Specific And more specifically, do different configurations of these dimensions have a specific, measurable impact on the number and range of the arguments (i.e., the contract) of a function?

    Read the article

  • One National Team One Event &ndash; SharePoint Saturday Kansas City

    - by MOSSLover
    I wasn’t expect to run an event from 1,000 miles away, but some stuff happened you know like it does and I opted in.  It was really weird, because people asked why are you living in NJ and running Kansas City?  I did move, but it was like my baby and Karthik didn’t have the ability to do it this year.  I found it really challenging, because I could not physically be in Kansas City.  At first I was freaking out and Lee Brandt, Brian Laird, and Chris Geier offered to help.  Somehow I couldn’t come the day of the event.  Time-wise it just didn’t work out.  I could do all the leg work prior to the event, but weekends just were not good.  I was going to be in DC until March or April on the weekdays, so leaving that weekend was too tough.  As it worked out Lee was my eyes and ears for the venue.  Brian was the sponsor and prize box coordinator if anyone needed to send items.  Lee also helped Brian the day of the event move all the boxes.  I did everything we could do electronically, such as get the sponsors coordinate with Michael Lotter on invoicing and getting the speakers, posting the submissions, budgeting the money, setting up a speaker dinner by phone, plus all that other stuff you do behind the scenes.  Chris was there to help Lee and Brian the day of the event and help us out with the speaker dinner.  Karthik finally got back from India and he was there the night before getting the folders together and the signs and stuffing it all.  Jason Gallicchio also helped me out (my cohort for SPS NYC) as he did the schedule and helped with posting the speakers abstracts and so did Chris Geier by posting the bios.  The lot of them enlisted a few other monkeys to help out.  It was the weirdest thing I’ve ever seen, but it worked.  Around 100+ attendees ended up showing and I hear it was  a great event.  Jason, Michael, Chris, Karthik, Brian, and Lee are not all from the same area, but they helped me out in bringing this event together.  It was a national SharePoint Saturday team that brought together a specific local event for Kansas City.  It’s like a metaphor for the entire SharePoint Community.  We help our own kind out we don’t let me fail.  I know Lee and Brian aren’t technically SharePoint People they are honorary SharePoint Community Members.  Thanks everyone for the support and help in bringing this event together.  Technorati Tags: SharePoint Saturday,SPS KC,SharePoint,SharePoint Saturday Kanas City,Kansas City

    Read the article

  • Wine PPA dependency problems after upgrading to 12.04

    - by Pablo
    I recently upgraded my Ubuntu up to 12.04. Untill that, i can't use synaptic at all. After trying to repair the issue through synaptics, it returns me: installArchives() failed: dpkg: dependency problems prevent configuration of wine1.4-i386:i386: wine1.4-i386:i386 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-i386:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4: wine1.4 depends on wine1.4-amd64 (= 1.4-0ubuntu4); however: Version of wine1.4-amd64 on system is 1.4.1-0ubuntu1~precise1~ppa3. wine1.4 depends on wine1.4-i386 (= 1.4-0ubuntu4); however:No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already Package wine1.4-i386 is not installed. Version of wine1.4-i386:i386 on system is 1.4.1-0ubuntu1~precise1~ppa3. dpkg: error processing wine1.4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-common: wine1.4-common depends on wine1.4 (= 1.4-0ubuntu4); however: Package wine1.4 is not configured yet. dpkg: error processing wine1.4-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-amd64: wine1.4-amd64 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine: wine depends on wine1.4; however: Package wine1.4 is not configured yet. dpkg: error processing wine (--configure): dependency problems - leaving unconfigured dpkg: depeNo apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already ndency problems prevent configuration of playonlinux: playonlinux depends on wine | wine-unstable; however: Package wine is not configured yet. Package wine1.4 which provides wine is not configured yet. Package wine-unstable is not installed. dpkg: error processing playonlinux (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: wine1.4-i386:i386 wine1.4 wine1.4-common wine1.4-amd64 wine playonlinux Error in function: SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1) dpkg: dependency problems prevent configuration of wine1.4: wine1.4 depends on wine1.4-amd64 (= 1.4-0ubuntu4); however: Version of wine1.4-amd64 on system is 1.4.1-0ubuntu1~precise1~ppa3. wine1.4 depends on wine1.4-i386 (= 1.4-0ubuntu4); however: Package wine1.4-i386 is not installed. Version of wine1.4-i386:i386 on system is 1.4.1-0ubuntu1~precise1~ppa3. dpkg: error processing wine1.4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine: wine depends on wine1.4; however: Package wine1.4 is not configured yet. dpkg: error processing wine (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-common: wine1.4-common depends on wine1.4 (= 1.4-0ubuntu4); however: Package wine1.4 is not configured yet. dpkg: error processing wine1.4-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-amd64: wine1.4-amd64 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-i386:i386: wine1.4-i386:i386 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-i386:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of playonlinux: playonlinux depends on wine | wine-unstable; however: Package wine is not configured yet. Package wine1.4 which provides wine is not configured yet. Package wine-unstable is not installed. dpkg: error processing playonlinux (--configure): dependency problems - leaving unconfigured I tried the following: sudo apt-get clean sudo apt-get autoclean sudo apt-get install -f And returnsme: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: wine1.4 wine1.4-common Suggested packages: dosbox The following packages will be upgraded: wine1.4 wine1.4-common 2 upgraded, 0 newly installed, 0 to remove and 110 not upgraded. 6 not fully installed or removed. Need to get 0 B/1,126 kB of archives. After this operation, 9,216 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: dependency problems prevent configuration of wine1.4-i386:i386: wine1.4-i386:i386 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-i386:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4: wine1.4 depends on wine1.4-amd64 (= 1.4-0ubuntu4); however: Version of wine1.4-amd64 on system is 1.4.1-0ubuntu1~precise1~ppa3. wine1.4 depends on wine1.4-i386 (= 1.4-0ubuntu4); however: Package wine1.4-i386 is not installed. Version of wine1.4-i386:i386 on system is 1.4.1-0ubuntu1~precise1~ppa3. No apport report written because the error message indicates its a followup error from a previous failure. dpkg: error processing wine1.4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-common: wine1.4-common depends on wine1.4 (= 1.4-0ubuntu4); however: Package wine1.4 is not configured yet. dpkg: error processing wine1.4-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine1.4-amd64: wine1.4-amd64 depends on wine1.4-common (= 1.4.1-0ubuntu1~precise1~ppa3); however: Version of wine1.4-common on system is 1.4-0ubuntu4. dpkg: error processing wine1.4-amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of wine: wine depends on wine1.4; however: Package wine1.4 is not configured yet. dpkg: error processing wine (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of playonlinux: playonlinux depends on wine | wine-unstable; however: PackagNo apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already e wine is not configured yet. Package wine1.4 which provides wine is not configured yet. Package wine-unstable is not installed. dpkg: error processing playonlinux (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: wine1.4-i386:i386 wine1.4 wine1.4-common wine1.4-amd64 wine playonlinux E: Sub-process /usr/bin/dpkg returned an error code (1) Cna anyone helpme? I've been searching for a sollution for days and still can't solve it. Thanks! Pablo

    Read the article

  • Why does Evolution give me multiple reminders for the same event?

    - by Dylan McCall
    I have a bunch of calendars on my Google Calendar account (school & work, personal, etc.), so I have Evolution subscribed to each one of those calendars. When I get a notification for an upcoming (recurring) event, I actually get many notifications for the same event, all at the same time. For example, just now I got 21 notifications for one event. I am using Gnome Shell, where the message tray displays event notifications in its own way. I get the same behaviour on my other computer, also running Ubuntu 11.10 with Gnome Shell. (And it has happened running Unity where Evolution only shows its dialog window with event reminders, but I'm not sure if it has happened quite as intensely). Does someone know why this is happening, and maybe how to fix it? It would be cool to get slightly less panic-inducing event reminders :)

    Read the article

  • flash cs4 file reference. Event.COMPLETE not called on a MAC,

    - by jobbie jones
    Hi, I am working with a fileReference, however I'm having issues running on Safari on a MAC... EDIT The below example also doesnt work on Safari on a MAC... http://www.permadi.com/blog/2010/06/flash-as3-using-filereference-to-load-files-example-for-flash-cs4-and-above/ # The workflow on a PC runs as such: 1) Create file reference 2) attach addEventListener's for Event.SELECT and Event.COMPLETE 3) call the browse() method On a PC, Event.SELECT is fired when a file has been selected. Event.COMPLETE is fired when the file data is available to flash. If I select an 500meg file, it takes a few seconds before Event.COMPLETE is fired. If I attempt to access the file data properties (such as reading the data stream) before Event.COMPLETE is fired, I receive null reference errors... So far so good. However, on a MAC (speficially Safari, not tested other browsers), the Event.COMPLETE is not fired. I have checked the Adobe docs, which say Event.COMPLETE is fired when the upload is completed. So why does it get fired on windows when the fileReference has parsed the file, but the upload method has not yet been called... Can anyone help? Here's snippets of the code I am working on: public function browseFile(target:Object):void { var imagesFilter:FileFilter = new FileFilter("Allowed files", "*.jpg;*.bmp;*.flv;"); fileReference.browse([imagesFilter]); fileReference.addEventListener(Event.SELECT, fileSelect); fileReference.addEventListener(Event.COMPLETE, fileSelectComplete); } private function fileSelect(event:Event):void { // update label - IMPORTANT for large files as there's a delay while flash parses file, before control is handed back to this script... setStatusLabel("...loading file"); var fileReference:FileReference = event.target as FileReference; fileReference.addEventListener(Event.COMPLETE, fileSelectComplete); // load the file into the fileReference object fileReference.load(); } // Called when upload file has been processed by flash (a few secs for large files, or fileRef.data is null...) private function fileSelectComplete(event:Event):void { var fileReference:FileReference=event.target as FileReference; trace("ready to do things - but not fired on Safari on a MAC "); }

    Read the article

  • System Event ID 11 Disk

    - by Guy Thomas
    Upon starting Windows Server 2008 R2 I get this error message: Event ID 11 Disk The driver detected a controller error on \Device\Harddisk3\DR3. There are also also 3 more similar messages for Harddisk 2, 4, and 5, but not zero or 1. Checking the event viewer reveals it's been going on for 3 months. I ran chkdsk - no bad sectors. Any advice on the cause, better still, a solution?

    Read the article

  • Format Change Event for Excel VBA

    - by The_Third
    I'm trying to prevent people from modifying (most) of my spreadsheet while still alowing them to use the sort function of the AutoFilter. What I've done so far is used the Worksheet_Change event and Application.Undo to automatically undo any values entered into cells that I don't want to be modified. This works great, except that it can't detect changes in formatting. Does anyone know of a means to trigger an event when the format (text/background color) of a cell is changed? Thanks!

    Read the article

  • Event Log time when Computer Start up / boot up

    - by Param
    Client OS - Window XP Domain Controller:- Window server 2008 Standard R2 I had one Window XP system, i want to find out when the system has started or boot ( at what time and at which date ). I don't know which parameter / word should i search in Event Log. For finding out shutdown time, i simply find the word "Shutdown" in Event Log. Can you guide me which word should i find for finding Start up or boot time

    Read the article

  • Getting a null reference exception exporting a slightly complex rdlc report to excel

    - by George Handlin
    Have an issue in exporting a slightly complex report to excel from an rdlc. Exporting a simple tabular report works fine, but getting a null reference exception with a more complex one. As is usually the case, it works on the server in the development environment, but not in the test environment. The server in the development environment has iis, sql and sql reporting services on it and test only has iis (I didn't set them up). I'm guessing there is something that gets installed with SSRS that is not installed with just the report viewer. The report has several parameters going into it and a few generic lists going in for datasources. Some tables for display as well as a list. Working with the 2005 version. Exception follows: [NullReferenceException: Object reference not set to an instance of an object.] Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack) +91 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout& lastPageLayout) +607 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets() +150 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet() +358 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream) +158 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream) +385 Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +230 [ReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +296 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1124 [WrapperReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1681 Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) +1693 Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings) +227 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +235 [LocalProcessingException: An error occurred during local report processing.] Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +276 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +189 Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +28 Microsoft.Reporting.WebForms.LocalReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileNameExtension) +52 Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +202 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Read the article

  • jquery countdown/countUP with server side values

    - by basit.
    script: http://keith-wood.name/countdown.htm daily json response: items: { fajr: '5:23 am', sharooq: '7:23 am', dhur: '1:34 pm', asr: '4:66 pm': magrib: '6:23 pm', isha: '8:01 pm'} when site loads i make ajax request and get the above response times, these are events that happens daily for everyday, but different timing. i want to get that time and put a count down on how many minitues left or hours or seconds and show that and once the seconds are done, then show how many minitues ago that event took place, after 15 minitues later show new even count down. so following on how it will look on display dhur 2 hours left dhur 2 minutes left (if no longer hours left) dhur 55 seconds left (if no longer minutes left) dhur 5 seconds ago (if count down finished and then show how many seconds ago) dhur 9 minutes ago (if extended more then seconds, then show how many minutes ago) asr 1 hour left (after 15 minutes later time changes to new event) this is kind of very simple for pro in javascript and really complicated for me, so need your guys help, if the script im using not good and you prefer some other script for this kind of task, please share with me, it dont have to be jquery script, but helps if its jquery.

    Read the article

  • WPF Infinite loop in references found while processing the Template

    - by Ryan
    I am pretty new to WPF and am getting this error after my mouse is over my custom listbox item. Error: Infinite loop in references found while processing the Template for an element named '' of type 'System.Windows.Controls.TextBox'. <Window.Resources> <ControlTemplate x:Key="MouseOverFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF013B73" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF014A8F" Offset="0.5"/> <GradientStop Color="#FF003363" Offset="1"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="MouseOverFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource MouseOverFocusTemplate}"/> </Style> <ControlTemplate x:Key="LostFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="LostFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource LostFocusTemplate}"/> </Style> <ControlTemplate x:Key="GotFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FFE38E27" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF002F5C" Offset="0.5"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="GotFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource GotFocusTemplate}"/> </Style> <Style TargetType="ListBoxItem"> <EventSetter Event="GotFocus" Handler="ListItem_GotFocus"></EventSetter> <EventSetter Event="LostFocus" Handler="ListItem_LostFocus"></EventSetter> <EventSetter Event="Mouse.MouseMove" Handler="ListItem_MouseOver"></EventSetter> </Style> <DataTemplate DataType="{x:Type TextBlock}"> </DataTemplate> <DataTemplate x:Key="CustomListData" DataType="{x:Type ListBoxItem}"> <Border BorderBrush="Black" BorderThickness="1" Margin="-2,0,0,-1"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </Grid.RenderTransform> <!--<ScrollViewer x:Name="PART_ContentHost" />--> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" FocusVisualStyle="{StaticResource GotFocusStyle}" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </Border> </DataTemplate> <Style TargetType="{x:Type ListBox}"> <Setter Property="ItemTemplate" Value="{StaticResource CustomListData }" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> </Style> </Window.Resources> <Window.DataContext> <ObjectDataProvider ObjectType="{x:Type local:ImageLoader}" MethodName="LoadImages" /> </Window.DataContext> <ListBox ItemsSource="{Binding}" Width="320" Background="#FF021422" BorderBrush="#FF1C4B79"> <ListBox.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Transparent</SolidColorBrush> </ListBox.Resources> </ListBox> The code behind for the mouse over event is as follows private void ListItem_MouseOver(object sender, RoutedEventArgs e) { e.Handled = true; FrameworkElement element = e.OriginalSource as FrameworkElement; if (element != null) { while (VisualTreeHelper.GetParent(element) != null) { element = VisualTreeHelper.GetParent(element) as FrameworkElement; TextBox item = element as TextBox; if (item != null) { item.Style = (Style)item.FindResource("MouseOverFocusStyle"); return; } } } } What am I missing? Is there an easier way to do this ? Thanks in advance Ryan

    Read the article

  • Checking if a RoutedEvent has any handlers

    - by AK
    I've got a custom Button class, that always performs the same action when it gets clicked (opening a specific window). I'm adding a Click event that can be assigned in the button's XAML, like a regular button. When it gets clicked, I want to execute the Click event handler if one has been assigned, otherwise I want to execute the default action. The problem is that there's apparently no way to check if any handlers have been added to an event. I thought a null check on the event would do it: if (Click == null) { DefaultClickAction(); } else { RaiseEvent(new RoutedEventArgs(ClickEvent, this));; } ...but that doesn't compile. The compiler tells me that I can't do anything other than += or -= to an event outside of the defining class, event though I'm trying to do this check INSIDE the defining class. I've implemented the correct behavior myself, but it's ugly and verbose and I can't believe there isn't a built-in way to do this. I must be missing something. Here's the relevant code: public class MyButtonClass : Control { //... public static readonly RoutedEvent ClickEvent = EventManager.RegisterRoutedEvent("Click", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyButtonClass)); public event RoutedEventHandler Click { add { ClickHandlerCount++; AddHandler(ClickEvent, value); } remove { ClickHandlerCount--; RemoveHandler(ClickEvent, value); } } private int ClickHandlerCount = 0; private Boolean ClickHandlerExists { get { return ClickHandlerCount > 0; } } //... }

    Read the article

  • while loop ignore the event listener

    - by Tamer
    so when i run this code to try to change the background the GUI crashes and gets stuck in a infinite while loop ignoring the event listeners. here is the code: `private Panel getPanel1() { if (panel1 == null) { panel1 = new Panel(); panel1.setLayout(new GridBagLayout()); while(frame.isVisible()){ panel1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { frame.setVisible(false); } }); int r = (int) (Math.random()*255); int g = (int) (Math.random()*255); int b = (int) (Math.random()*255); Color c = new Color(r, g, b); panel1.setBackground(c); try { Thread.sleep(4000); } catch (InterruptedException e1) { e1.printStackTrace(); } panel1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { /*panel1.setVisible(false); frame.setVisible(false);*/ System.exit(0); } }); } } return panel1; }` instead of exiting the loop of terminating the program or event changing the background it just displays the panel and does nothing else and i have to force it to quit. what should i do?

    Read the article

  • Should an Event that has no arguments define its own custom EventArgs or simply use System.EventArgs

    - by Mike Rosenblum
    I have an event that is currently defined with no event arguments. That is, the EventArgs it sends is EventArgs.Empty. In this case, it is simplest to declare my Event handler as: EventHandler<System.EventArgs> MyCustomEvent; I do not plan on adding any event arguments to this event, but it is possible that any code could need to change in the future. Therefore, I am leaning towards having all my events always create an empty event args type that inheretis from System.EventArgs, even if there are no event args currently needed. Something like this: public class MyCustomEventArgs : EventArgs { } And then my event definition becomes the following: EventHandler<MyCustomEventArgs> MyCustomEvent; So my question is this: is it better to define my own MyCustomEventArgs, even if it does not add anything beyond inheriting from System.EventArgs, so that event arguments could be added in the future more easily? Or is it better to explicitly define my event as returning System.EventArgs, so that it is clearer to the user that there are no extra event args? I am leaning towards creating custom event arguments for all my events, even if the event arguments are empty. But I was wondering if others thought that making it clearer to the user that the event arguments are empty would be better? Much thanks in advance, Mike

    Read the article

  • Is android's motion event handling accurate??

    - by Peterdk
    Bug I have a weird bug in my piano app. Sometimes keys (and thus notes) hang. I did a lot of debugging and narrowed it down to what looks like androids inaccuracy of motion event handling: DEBUG/(2091): ACTION_DOWN A4 DEBUG/(2091): KeyDown: A4 DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_UP B4 //HOW CAN THIS BE???? DEBUG/(2091): KeyUp: B4 DEBUG/(2091): Stream is null, can't stop DEBUG/(2091): Hanging Note: A4 X=240-287 EventX=292 Y=117-200 EventY=164 DEBUG/(2091): KeyUp Note: B4 X=288-335 EventX=292 Y=117-200 EventY=164 Clearly it can be seen here that out of nowhere I suddenly have an ACTION_UP for another note. Shouldn't I definitely get a ACTION_MOVE first? As shown in the end of the log, it's definitely not an error in region detection, since the ACTION_UP event is clearly in the B4 region. Logging Implementation details Every onTouchEvent() call is logged, so the log is accurate. The relevant pseudo-code for the ACTION_MOVE logging is: Key oldKey = Key.get(event.getHistoricalX(), event.getHistoricalY()); Key newKey = Key.get(event.getX(), event.getY()); Question Is this normal behaviour for Android (the jumping in coordinates)? Am I missing something?

    Read the article

  • Clipplanes, vertex shaders and hardware vertex processing in Direct3D 9

    - by Igor
    Hi, I have an issue with clipplanes in my application that I can reproduce in a sample from DirectX SDK (February 2010). I added a clipplane to the HLSLwithoutEffects sample: ... D3DXPLANE g_Plane( 0.0f, 1.0f, 0.0f, 0.0f ); ... void SetupClipPlane(const D3DXMATRIXA16 & view, const D3DXMATRIXA16 & proj) { D3DXMATRIXA16 m = view * proj; D3DXMatrixInverse( &m, NULL, &m ); D3DXMatrixTranspose( &m, &m ); D3DXPLANE plane; D3DXPlaneNormalize( &plane, &g_Plane ); D3DXPLANE clipSpacePlane; D3DXPlaneTransform( &clipSpacePlane, &plane, &m ); DXUTGetD3D9Device()->SetClipPlane( 0, clipSpacePlane ); } void CALLBACK OnFrameMove( double fTime, float fElapsedTime, void* pUserContext ) { // Update the camera's position based on user input g_Camera.FrameMove( fElapsedTime ); // Set up the vertex shader constants D3DXMATRIXA16 mWorldViewProj; D3DXMATRIXA16 mWorld; D3DXMATRIXA16 mView; D3DXMATRIXA16 mProj; mWorld = *g_Camera.GetWorldMatrix(); mView = *g_Camera.GetViewMatrix(); mProj = *g_Camera.GetProjMatrix(); mWorldViewProj = mWorld * mView * mProj; g_pConstantTable->SetMatrix( DXUTGetD3D9Device(), "mWorldViewProj", &mWorldViewProj ); g_pConstantTable->SetFloat( DXUTGetD3D9Device(), "fTime", ( float )fTime ); SetupClipPlane( mView, mProj ); } void CALLBACK OnFrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext ) { // If the settings dialog is being shown, then // render it instead of rendering the app's scene if( g_SettingsDlg.IsActive() ) { g_SettingsDlg.OnRender( fElapsedTime ); return; } HRESULT hr; // Clear the render target and the zbuffer V( pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB( 0, 45, 50, 170 ), 1.0f, 0 ) ); // Render the scene if( SUCCEEDED( pd3dDevice->BeginScene() ) ) { pd3dDevice->SetVertexDeclaration( g_pVertexDeclaration ); pd3dDevice->SetVertexShader( g_pVertexShader ); pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( D3DXVECTOR2 ) ); pd3dDevice->SetIndices( g_pIB ); pd3dDevice->SetRenderState( D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0 ); V( pd3dDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0, 0, g_dwNumVertices, 0, g_dwNumIndices / 3 ) ); pd3dDevice->SetRenderState( D3DRS_CLIPPLANEENABLE, 0 ); RenderText(); V( g_HUD.OnRender( fElapsedTime ) ); V( pd3dDevice->EndScene() ); } } When I rotate the camera I have different visual results when using hardware and software vertex processing. In software vertex processing mode or when using the reference device the clipping plane works fine as expected. In hardware mode it seems to rotate with the camera. If I remove the call to RenderText(); from OnFrameRender then hardware rendering also works fine. Further debugging reveals that the problem is in ID3DXFont::DrawText. I have this issue in Windows Vista and Windows 7 but not in Windows XP. I tested the code with the latest NVidia and ATI drivers in all three OSes on different PCs. Is it a DirectX issue? Or incorrect usage of clipplanes? Thanks Igor

    Read the article

  • using xml type attribute for derived complex types

    - by David Michel
    Hi All, I'm trying to get derived complex types from a base type in an xsd schema. it works well when I do this (inspired by this): xml file: <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Employee"> <name>John</name> <height>59</height> <jobDescription>manager</jobDescription> </person> xsd file: <xs:element name="person" type="Person"/> <xs:complexType name="Person" abstract="true"> <xs:sequence> <xs:element name= "name" type="xs:string"/> <xs:element name= "height" type="xs:double" /> </xs:sequence> </xs:complexType> <xs:complexType name="Employee"> <xs:complexContent> <xs:extension base="Person"> <xs:sequence> <xs:element name="jobDescription" type="xs:string" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> However, if I want to have the person element inside, for example, a sequence of another complex type, it doesn't work anymore: xml: <staffRecord> <company>mycompany</company> <dpt>sales</dpt> <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Employee"> <name>John</name> <height>59</height> <jobDescription>manager</jobDescription> </person> </staffRecord> xsd file: <xs:element name="staffRecord"> <xs:complexType> <xs:sequence> <xs:element name="company" type="xs:string"/> <xs:element name="dpt" type="xs:string"/> <xs:element name="person" type="Person"/> <xs:complexType name="Person" abstract="true"> <xs:sequence> <xs:element name= "name" type="xs:string"/> <xs:element name= "height" type="xs:double" /> </xs:sequence> </xs:complexType> <xs:complexType name="Employee"> <xs:complexContent> <xs:extension base="Person"> <xs:sequence> <xs:element name="jobDescription" type="xs:string" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:sequence> </xs:complexType> </xs:element> When validating the xml with that schema with xmllint (under linux), I get this error message then: config.xsd:12: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}sequence': The content is not valid. Expected is (annotation?, (element | group | choice | sequence | any)*). WXS schema config.xsd failed to compile Any idea what is wrong ? David

    Read the article

  • ASP.NET Event delegation between user controls

    - by Ishan
    Give the following control hierarchy on a ASP.NET page: Page HeaderControl       (User Control) TitleControl       (Server Control) TabsControl       (User Control) other controls I'm trying to raise an event (or some notification) in the TitleControl that bubbles to the Page level. Then, I'd like to (optionally) register an event handler at the Page codebehind that will take the EventArgs and modify the TabsControl in the example above. The important thing to note is that this design will allow me to drop these controls into any Page and make the entire system work seamlessly if the event handler is wired up. The solution should not involve a call to FindControl() since that becomes a strong association. If no handler is defined in the containing Page, the event is still raised by TitleControl but is not handled. My basic goal is to use event-based programming so that I can decouple the user controls from each other. The event from TitleControl is only raised in some instances, and this seemed to be (in my head) the preferred approach. However, I can't seem to find a way to cleanly achieve this. Here are my (poor) attempts: Using HttpContext.Current.Items Add the EventArgs to the Items collection on TitleControl and pick it up on the TabsControl. This works but it's fundamentally hard to decipher since the connection between the two controls is not obvious. Using Reflection Instead of passing events, look for a function on the container Page directly within TitleControl as in: Page.GetType().GetMethod("TabControlHandler").Invoke(Page, EventArgs); This will work, but the method name will have to be a constant that all Page instances will have to defined verbatim. I'm sure that I'm over-thinking this and there must be a prettier solution using delegation, but I can't seem to think of it. Any thoughts?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >