Search Results

Search found 2272 results on 91 pages for 'fire dragon dol'.

Page 72/91 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Which knowledge base/rule-based inference engine to choose for real time Runway incursion prevention

    - by Piligrim
    Hello, we are designing a project that would listen to dialog between airport controllers and pilots to prevent runway incursions (eg. one airplane is taking off while other is crossing the runway). Our professor wants us to use Jena for knowledge base (or anything else but it should be some sort of rule-based engine). Inference is not the main thing in Jena and there's not much documentation and examples of this. So we need an engine that would get messages from pilots as input and output possible risks of incursion or any other error in message protocol. It should be easy to write rules, and should be easy to provide engine with real time data. I image it something like this: A pilot sends a message that he lands on some runway, the system remembers that the runway is busy and no one should cross it If someone is given an instruction to cross this runway, the engine should fire a rule that something is wrong When the pilot sends a message that he left the runway and goes to the gate, the system clears the runway and lets other planes to use it. So is Jena, or prolog or any other rules engine suitable for this? I mean it is suitable, but do we really need to use it? I asked the prof. if we could just keep state of the runway and use some simple checks based on messages we receive and he said that it is not scalable and we need the knowledge base. Can someone give me any advise on which approach to use for this system? If you recommend k.b., then which one should we use? The project is written in java. Thank you.

    Read the article

  • Change UIButton Background Image more than once per second

    - by beta.services
    I am currently working with the iPhone SDK. I have a NSTimer that changes the background image of a UIButton. Once this is complete, it will trigger the same action again (reset the NSTimer) for a predetermined number of times. My problem is that if my NSTimer is set to execute more than once per second. (0.75, say) The background image wont change. I am using NSLog to check that the event fires. But the button image will just remain in its original state. Is there any way to change the background image more often than once per second? This is my timer : [NSTimer scheduledTimerWithTimeInterval: tmpLvlSpeed target: self selector: @selector(simPressRed:) userInfo: nil repeats: NO]; And the code to change the image: [btnRed setImage:[UIImage imageNamed:@"btn_red.png"] forState:UIControlStateNormal]; if tmpLvlSpeed is less than 1.0, the button image will never change. Even though the simPressRed function will still fire. Any clues? Is there an update cycle I can modify?

    Read the article

  • How to implement two way binding between an ActiveX control and a WPF MVVM View Model

    - by Zamboni
    I have a WPF application implemented using the MVVM framework that uses an ActiveX control and I need to keep the WPF and ActiveX UI synchronised. So far I can update the ActiveX UI when I change the WPF UI using the code at the bottom of the question that I got from the article Hosting an ActiveX Control in WPF and this question. But I cannot update the WPF UI when I make a change in the ActiveX UI. I suspect that I need to fire the PropertyChanged event from my ActiveX control but I have no idea how to do this or if it is even possible. The ActiveX controls I have written are in VB6 and MFC as I am just prototying at this time for the eventual integration of VB6 ActiveX controls in a WPF contaner application. Here is a code snipet that indicates the work done so far: System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); // Create the ActiveX control. AxTEXTBOXActiveXLib.AxTEXTBOXActiveX axWmp = new AxTEXTBOXActiveXLib.AxTEXTBOXActiveX(); // Assign the ActiveX control as the host control's child. host.Child = axWmp; axWmp.DataBindings.Add(new System.Windows.Forms.Binding("ActiveXStatus", (MainWindowViewModel)this.DataContext, "ModelStatus", true, DataSourceUpdateMode.OnPropertyChanged )); // Add the interop host control to the Grid // control's collection of child controls. this.activexRow.Children.Add(host); How to implement two way binding between an ActiveX control and a WPF MVVM View Model?

    Read the article

  • Run ajax scripts on page when navigating with ajax?

    - by Oskar Kjellin
    I got a bit of an issue in my ASP.NET MVC project. I have a chat div in the bottom right corner (like facebook), and of course I do not want this to reload when navigating to all my navigation is ajax. The problem I am facing is that I use the following code on the top of the view page: <script type="text/javascript"> $(document).ready(function() { $('#divTS').hide(); $('a#showTS').click(function() { $('#divTS').slideToggle(400); return false; }); }); </script> The problem is that this code is only loaded with ajax and does not seem to fire? I would like to run all scripts in the newly loaded view, just as if I hadn't navigated with ajax. I cannot put this in the site.master as it only loads once and then probably the divs I am trying to hide doesn't exist. Is there a good way to run scripts in the ajax-loaded div?

    Read the article

  • Android: how to tell if a view is scrolling

    - by Dave
    in iPhone, this would be simple---each view has a scrollViewDidScroll method. I am trying to find the equivalent in Android. My code works, but it isn't giving me what I want. I need to execute code the entire duration that a view is scrolling. So, even though I use OnGestureListener's onScroll method, it only fires when the finger is on the screen (it's not really named correctly---it should be called "onSlide" or "onSwipe", focusing on the gesture rather than the UI animation). It does not continue to fire if the user flicks the view and it is still scrolling for a few moments after the user lifts his finger. is there a method that is called at every step of the scroll? public class Scroll extends Activity implements OnGestureListener { public WebView webview; public GestureDetector gestureScanner; public int currentYPosition; public int lastYPosition; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webview = new WebView(this); setContentView(webview); webview.loadUrl("file:///android_asset/Scroll.html"); gestureScanner = new GestureDetector(this); currentYPosition = 0; lastYPosition = 0; } public boolean onTouchEvent(final MotionEvent me) { return gestureScanner.onTouchEvent(me); } public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { // I do stuff here. return true; }

    Read the article

  • Losing 'post' requests sent to Pylons paster server

    - by Philip McDermott
    I'm sending post requests to a Pylons server (served by paster serve), and if I send them with any frequency many don't arrive at the server. One at a time is ok, but if I fire off a few (or more) within seconds, only a small number get dealt with. If I send with no post data, or with get, it works fine, but putting just one character of data in the post fields causes massive losses. For example, sending 200, 2 will come back. Sending 100 more slowly, 10 will come back. I'm making the requests form inside a Qt application. Tis will work ok (no data): QString postFields = "" QNetworkRequest request(QUrl("http://server.com/endpoint")); QNetworkReply *reply = networkAccessManager-post(request, postFields.toAscii()); And this will result in only a fraction of the requests being dealt with: QString postFields = "" QNetworkRequest request(QUrl("http://server.com/endpoint")); QNetworkReply *reply = networkAccessManager-post(request, postFields.toAscii()); I've played around with turning on use_threadpool, and other options (threadpool_workers, threadpool_max_requests = 300), of which some combinations can alter the results slightly (best case 10 responses in 200). If I send similar requests to other (non paster) servers, the replies come back ok, so I'm almost certain its'a paster serve config issue. Any help or advice greatly appreciated. Thanks Philip

    Read the article

  • Adding custom valiadtion to ASP.NET controls

    - by Brian
    We're trying to build a simple asp control for some clients where they can just drop in a single block - i.e. <captcha:CaptchaControl ID="CaptchaControl1" runat="server" Server="http://localhost:51947/" /> and have it render the control. The catch is that I can't get this to include custom validation. Right now I'm using the RenderContents function to display the layout of the control itself as well as hook it up the to Javascript. The problem is that I don't know how to get custom validation to fire when used as part of a control. protected override void RenderContents(HtmlTextWriter output) { output.Write(@" <script type=""text/javascript"" src=""http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js""></script> <link rel=""stylesheet"" type=""text/css"" href=""/Layout/CaptchaLayout.css"" /> //etc <asp:Textbox id=""text1"" runat=""server"" text=""""></asp:Textbox> <asp:CustomValidator id=""CustomValidator2"" runat=""server"" ControlToValidate = ""text1"" ErrorMessage = ""You must enter at least 8 characters!"" ClientValidationFunction=""validateLength"" > </asp:CustomValidator>" ); } Any suggestions for a better way to do this?

    Read the article

  • Force ListViewItem Background colour to change when bound item it is bound to changes.

    - by hayrob
    My ItemContainerStyle works perfectly when a ListViewItem is added: <Style x:Key="ItemContStyle" TargetType="{x:Type ListViewItem}"> <Style.Resources> <SolidColorBrush x:Key="lossBrush" Color="Red" /> <SolidColorBrush x:Key="newPartNo" Color="LightGreen" /> <SolidColorBrush x:Key="noSupplier" Color="Yellow" /> <Orders:OrderItemStatusConverter x:Key="OrderItemConverter" /> </Style.Resources> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=DataContext, Converter={StaticResource OrderItemConverter}}" Value="-1"> <Setter Property="Background" Value="{StaticResource lossBrush}" /> </DataTrigger> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext, Converter={StaticResource OrderItemConverter}}" Value="-2"> <Setter Property="Background" Value="{StaticResource newPartNo}" /> </DataTrigger> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext, Converter={StaticResource OrderItemConverter}}" Value="-3"> <Setter Property="Background" Value="{StaticResource noSupplier}" /> </DataTrigger> </Style.Triggers> </Style> However when the source item changes, the trigger is not fired and the background colour is not what I expect. How can I make the trigger fire?

    Read the article

  • iPhone accelerometer:didAccelerate: seems to not get called while I am running a loop

    - by AJ
    An accelerometer related question. (Sorry the formatting may not look right, its the first time I am using this site). I got the accelerometer working as expected using the standard code UIAccelerometer *accel = [UIAccelerometer sharedAccelerometer]; accel.delegate = self; accel.updateInterval = 0.1; //I also tried other update values I use NSLog to log every time the accelerometer:didAccelerate: method in my class is called. The function gets called as expected and everything works fine till here. However, when I run a loop, the above method doesn't seem to get called. Something like this float firstAccelValue = globalAccel; //this is the x-accel value (stored in a global by the above method) float nextAccelValue = firstAccelValue; while (nextAccelValue == firstAccelValue){ //do something nextAccelValue = globalAccel; // note globalAccel is updated by the accelerometer method } The above loop never exits, expectedly since the accelerometer:didAccelerate: method is not getting called, and hence globalAccel never changes value. If I use a fixed condition to break the while loop, I can see that after the loop ends, the method calls work fine again. Am I missing something obvious here? Or does the accelerometer method not fire when certain processing is being done? Any help would be greatly appreciated! Thanks!

    Read the article

  • Kohana 3, themes outside application.

    - by Marek
    Hi all I read http://forum.kohanaframework.org/comments.php?DiscussionID=5744&page=1#Item_0 and I want to use similar solution, but with db. In my site controller after(): $theme = $page->get_theme_name(); //Orange Kohana::set_module_path('themes', Kohana::get_module_path('themes').'/'.$theme); $this->template = View::factory('layout') I checked with firebug: fire::log(Kohana::get_module_path('themes')); // D:\tools\xampp\htdocs\kohana\themes/Orange I am sure that path exists. I have directly in 'Orange' folder 'views' folder with layout.php file. But I am getting: The requested view layout could not be found Extended Kohana_Core is just: public static function get_module_path($module_key) { return self::$_modules[$module_key]; } public static function set_module_path($module_key, $path) { self::$_modules[$module_key] = $path; } Could anybody help me with solving that issue? Maybe it is a .htaccess problem: # Turn on URL rewriting RewriteEngine On # Put your installation directory here: # If your URL is www.example.com/kohana/, use /kohana/ # If your URL is www.example.com/, use / RewriteBase /kohana/ # Protect application and system files from being viewed RewriteCond $1 ^(application|system|modules) # Rewrite to index.php/access_denied/URL RewriteRule ^(.*)$ / [PT,L] RewriteRule ^(media) - [PT,L] RewriteRule ^(themes) - [PT,L] # Allow these directories and files to be displayed directly: # - index.php (DO NOT FORGET THIS!) # - robots.txt # - favicon.ico # - Any file inside of the images/, js/, or css/ directories RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|static) # No rewriting RewriteRule ^(.*)$ - [PT,L] # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php/$1 [PT,L] Could somebody help? What I am doing wrong? Regards

    Read the article

  • Memory leak of java.lang.ref.WeakReference objects inside JDK classes

    - by mandye
    The following simple code reproduces the growth of java.lang.ref.WeakReference objects in the heap: public static void main(String[] args) throws Exception { while (true) { java.util.logging.Logger.getAnonymousLogger(); Thread.sleep(1); } } Here is the output of jmap command within a few seconds interval: user@t1007:~ jmap -d64 -histo:live 29201|grep WeakReference 8: 22493 1079664 java.lang.ref.WeakReference 31: 1 32144 [Ljava.lang.ref.WeakReference; 106: 17 952 com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference user@t1007:~ jmap -d64 -histo:live 29201|grep WeakReference 8: 23191 1113168 java.lang.ref.WeakReference 31: 1 32144 [Ljava.lang.ref.WeakReference; 103: 17 952 com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference user@t1007:~ jmap -d64 -histo:live 29201|grep WeakReference 8: 23804 1142592 java.lang.ref.WeakReference 31: 1 32144 [Ljava.lang.ref.WeakReference; 103: 17 952 com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference Note that jmap command forces FullGC. JVM settings: export JVM_OPT="\ -d64 \ -Xms200m -Xmx200m \ -XX:MaxNewSize=64m \ -XX:NewSize=64m \ -XX:+UseParNewGC \ -XX:+UseConcMarkSweepGC \ -XX:MaxTenuringThreshold=10 \ -XX:SurvivorRatio=2 \ -XX:CMSInitiatingOccupancyFraction=60 \ -XX:+UseCMSInitiatingOccupancyOnly \ -XX:+CMSParallelRemarkEnabled \ -XX:+DisableExplicitGC \ -XX:+CMSClassUnloadingEnabled \ -XX:+PrintGCTimeStamps \ -XX:+PrintGCDetails \ -XX:+PrintTenuringDistribution \ -XX:+PrintGCApplicationConcurrentTime \ -XX:+PrintGCApplicationStoppedTime \ -XX:+PrintGCApplicationStoppedTime \ -XX:+PrintClassHistogram \ -XX:+ParallelRefProcEnabled \ -XX:SoftRefLRUPolicyMSPerMB=1 \ -verbose:gc \ -Xloggc:$GCLOGFILE" java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode) Solaris 10/Sun Fire(TM) T1000

    Read the article

  • How can I get jQuery validation plugin Ketchup to stop an Ajax form submission when validation fails?

    - by Marshall Sontag
    I'm using Ruby on Rails, Formtastic gem, jQuery and ketchup to validate my form. I'm submitting the form created by Formtastic inside a modal box using ajax: <% semantic_form_remote_for @contact_form, :url => '/request/contact' do |f| %> I have a validation plugin verifying the fields on the form: $(document).ready(function() { $("#new_contact_form").ketchup(); }); The problem is that semantic_form_remote_for generates an onSubmit ajax request that the jQuery validation plugins won't prevent, since it's not a normal form submission. One question on stackoverflow suggests using :condition on the remote form declaration to fire a javascript function, but I can't do that since I'm not using a function, but rather relying on a jQuery handler. I also tried putting ketchup within a submit event handler: $(document).ready(function() { $("#new_contact_form").submit(function() { $('#new_contact_form').ketchup(); }); }); No luck. Form still submits. I also tried using the beforeSend option of jQuery.ajax: $(document).ready(function() { jQuery.ajax( { beforeSend: function(){ $('#new_contact_form').ketchup(); } }); }); Validation fires off, but form is still submitted. I switched to jQuery Validation plugin just to see if it was due to some limitation in Ketchup. It turns out that Validation has a submitHandler option: $(document).ready(function() { $('#new_contact_form').validate({ submitHandler: function(form) { jQuery.ajax({ data:jQuery.param(jQuery('#new_contact_form').serializeArray()), dataType:'script', type:'post', url:'/request/contact' }); return false; } }); }); This works when I use a regular semantic_form_for instead of semantic_form_remote_for, but alas, I would rather use Ketchup. Is Ketchup just woefully lacking? Am I forced to use jQuery Validation?

    Read the article

  • Embedded Vimeo Video Callbacks

    - by Andrew
    This post is kind of a follow up to a post I made earlier in regards to HTML5 video callbacks. In that thread, I was given a great piece of code that would allow for the browser to be informed of when the video stops playing and then fire off an action (with jQuery). This is the code I'm currently using: $('video.normal').bind('ended', function(){ $(this).fadeOut().queue(function(){ $(this).siblings('.post-video').fadeIn(); $(this).dequeue(); }); }); Which basically fades the video out when it's completed and brings a poster frame of the video (or similar image) back into view. Well, the scope of the project has changed and now the client is asking for true full screen video and different size videos to be delivered based on user connection speed, something that's a little over my head and a lot over budget. So I've been researching and a Vimeo Plus player seems like a great alternative for visitors using a desktop browser (HD embeds, true full screen, and more). Thing is, I need that above code to continue working in some capacity or another, so does the embedded Vimeo player offer a similar callback that I can utilize? Or am I SOL here? Thanks in advance!

    Read the article

  • Interception with Unity in Prism v2 for WPF (not working for me)

    - by Bobby Chopra
    I cannot get interception to work with Prism v2 (Oct 2009). I am trying to intercept the Setter for any Public Properties and then fire the PropertyChanged event if the property has changed. I can see that the code gets executed (by stepping through with the debugger or adding a debug point). However, the WPF Window controls that are bound to these properties do not get updated. If I subscribe to these events and print to the console, I can print out the property change notifications. So, if the View has a textbox, which updates the property on the ViewModel, then the property in the ViewModel gets updated. However, if a button on the view (implemented as a DelegateCommand) causes the property to get updated, then the textbox (TwoWay Binding Mode) that is bound to that Property is not updated even though the event is triggered and the console has printed out the information about which property was updated. Has anyone encountered this issue? Here is the sample WPF Application that I have written. Wordpress doesn't allow uploads of zip files, so I renamed it to have a pdf extension (rename the file to have a zip extension). Please let me know what I am doing wrong. Thanks in advance.

    Read the article

  • YUI button onclick get value

    - by Simon
    I have a a set of yui buttons generated using the standard yui html. <span class="yui-button yui-checkbox-button" id="analystbutton1"> <span class="first-child"> <button type="button" class="facetbutton" tabindex="0" id="analystbutton1-button"> Joe Bloggs </button> </span> </span> I create the buttons like so, and I then have some javascript to create the button and the listener. var analystCButton1 = new YAHOO.widget.Button("analystbutton1", { type:"checkbox", value:"BLOGGS", checked:false }); analystCButton1.on("click", onFacetClick); Finally I have the onFacetClick function var onFacetClick = function (e) { // e is the event var target = YAHOO.util.Event.getTarget(e); var button = new YAHOO.widget.Button(target); alert(button.get('type')); alert(button.get('id')); alert(button.get('value')); }; When I click on any of my buttons the first two alerts display the type and id (although not what I would expect). I cannot get the value, the alert doesn't fire, but I see no error in FireBug or the error console. alert(button.get('type')); returns push - I would expect checkbox alert(button.get('id')); returns analystbutton1-button

    Read the article

  • convert string to date and write back into NSMutableArray

    - by padatronic
    I have a NSMutableArray I get by loading a plist into it. The date field comes in as a string and i want to change it into a nsdate. I can change an nsstring into an nsdate. My array is an array of objects like the one below; { Date = "1/1/2009" Description = "Have you ever looked at a badger and thought i wonder how far you could fire that out of a cannon? Well this talk is for you"; File = "http://www.badgerCannon.org.uk/mp3/070310pm.mp3"; Series = "The Badger planet"; Speaker = "Will Ferell"; Title = "Is it a bird, is it a plane? no its a badger"; } I loop through and pull out the date and convert it from a NSString to a NSDate. I try writing it back in using the code; [[self.MediaDataArray objectAtIndex:i] replaceObjectAtIndex:0 withObject:Date]; but it errors and i am pretty sure it is because i am not putting it back into the array in the same format, ie just as a date not as date = "date". But lets face it i don't really know! Am i barking up the wrong tree? Please help, i have got the coding equivalent of writters block, or alternatively am just being really stupid! thanks in advance

    Read the article

  • No feedback from Socket.SendAsync

    - by BowserKingKoopa
    I'm creating a socket and I'm trying to send data through it using SendAsync. My socket isn't connected to anything so I expected to get an error of some sort. However I get nothing. I get no indication that the send didn't work. If I use the synchronous Send method instead of the asynchronous SendAsync method I get an Exception stating that the socket isn't connected to anything. That makes sense to me. When using SendAsync the completed event doesn't ever fire and I get no indication that the send didn't work. So basically my question is how can I tell when SendAsync fails? Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); SocketAsyncEventArgs args = new SocketAsyncEventArgs(); args.SetBuffer(new byte[0], 0, 0); args.Completed += delegate(object sender, SocketAsyncEventArgs e) { Debug.WriteLine("async send complete"); Debug.WriteLine("SOCKET ERROR: " + e.SocketError); }; bool completedSynchronously = socket.SendAsync(args); if (completedSynchronously) { Debug.WriteLine("sync send complete"); Debug.WriteLine("socket error: " + args.SocketError); }

    Read the article

  • Easiest way to support multiple orientations? How do I load a custom NIB when the application is in

    - by Peter Hajas
    Hi there, I have an application in which I would like to support multiple orientations. I have two .xib files that I want to use, myViewController.xib and myViewControllerLandscape.xib. myViewController.xib exists in project/Resources and myViewControllerLandscape.xib exists in the root project directory. What I want to do is use a separate NIB (myViewControllerLandscape.xib) for my rotations. I try detecting rotation in viewDidLoad like this: if((self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { NSLog(@"Landscape detected!"); [self initWithNibName:@"myViewControllerLandscape" bundle:nil]; } But I can see in gdb that this isn't executed when the app is started with the device in landscape. The NSLog message doesn't fire. Why is this? What have I done wrong? Also, if I explicitly put the initWithNibName function call in the viewDidLoad method, that nib is not loaded, and it continues with the myViewController.xib file. What's wrong with my call? Should I specify a bundle? Thanks!

    Read the article

  • Run ajax scripts on page with navigating with ajax?

    - by Oskar Kjellin
    I got a bit of an issue in my ASP.NET MVC project. I have a chat div in the bottom right corner (like facebook), and of course I do not want this to reload when navigating to all my navigation is ajax. The problem I am facing is that I use the following code on the top of the view page: <script type="text/javascript"> $(document).ready(function() { $('#divTS').hide(); $('a#showTS').click(function() { $('#divTS').slideToggle(400); return false; }); }); </script> The problem is that this code is only loaded with ajax and does not seem to fire? I would like to run all scripts in the newly loaded view, just as if I hadn't navigated with ajax. I cannot put this in the site.master as it only loads once and then probably the divs I am trying to hide doesn't exist. Is there a good way to run scripts in the ajax-loaded div?

    Read the article

  • Mingling C++ classes with Objective C classes

    - by Joey
    I am using the iphone SDK and coding primarily in C++ while using parts of the SDK in obj-c. Is it possible to designate a C++ class in situations where an obj-c class is needed? For instance: 1) when setting delegates to obj-c objects. I cannot make a C++ class derive from a Delegate protocol so this and possibly other reasons prevent me from making my C++ class a delegate for various obj-c objects. What I do as a solution is create an obj-c adapter class that contains a ptr to the C++ class and is used as the delegate (notifying the C++ class when it is called). It feels cumbersome to write these every time I need to get delegate notifications to a C++ class. 2) when setting selectors This goes hand in hand with item 1. Say I want to set a callback to fire when something is done, like a button press or a setAnimationDidStopSelector in the UIView animation functionality. It would be nice to be able to designate a C++ function along with the relevant delegate for setAnimationDelegate. Well, I suspect this isn't readily possible, but if anyone has any suggestions on how to do it if it is, or on how to write such things more easily, I would love to hear them. Thanks.

    Read the article

  • WPF: Once I set a property in code, it ignores XAML binding forever more... how do I prevent that?

    - by Timothy Khouri
    I have a button that has a datatrigger that is used to disable the button if a certain property is not set to true: <Button Name="ExtendButton" Click="ExtendButton_Click" Margin="0,0,0,8"> <Button.Style> <Style> <Style.Triggers> <DataTrigger Binding="{Binding IsConnected}" Value="False"> <Setter Property="Button.IsEnabled" Value="False" /> </DataTrigger> </Style.Triggers> </Style> </Button.Style> That's some very simple binding, and it works perfectly. I can set "IsConnected" true and false and true and false and true and false, and I love to see my button just auto-magically become disabled, then enabled, etc. etc. However, in my Button_Click event... I want to: Disable the button (by using ExtendButton.IsEnabled = false;) Run some asynchronous code (that hits a server... takes about 1 second). Re-enable the button (by using ExtendButton.IsEnabled = true;) The problem is, the very instant that I manually set IsEnabled to either true or false... my XAML binding will never fire again. This makes me very sad :( I wish that IsEnabled was tri-state... and that true meant true, false meant false and null meant inherit. But that is not the case, so what do I do?

    Read the article

  • Jquery .hide problem

    - by Sergio
    I'm using jquery to show animated MSN like window at the bottom of the page. Jquery code: $(document).ready(function() { $(" .inner").stop().animate({height:'142px'},{queue:false, duration:600}); $(' .close').click(function(event) { $(' .inner').hide(); }); $(' .inner').click(function() { location.replace("somepage.php"); }); }); The CSS: .close {height:14px; z-index:100; position: absolute; margin-left:174px; margin-top:12px; border:1px solid #F00;} .inner {position:absolute;bottom:0;width:201px;height:117px;right: 0; margin-right:10px; float:left; z-index:-1; display:block; cursor:pointer;} The problem that I have with this code is that the close button (showing at the right top corner of .inner DIV) can't fire Jquery .hide function. Why?

    Read the article

  • When onblur occurs, how can I find out which element focus went *to*?

    - by Michiel Borkent
    Suppose I attach an onblur function to an html input box like this: <input id="myInput" onblur="function() { ... }"></input> Is there a way to get the ID of the element which caused the onblur event to fire (the element which was clicked) inside the function? How? For example, suppose I have a span like this: <span id="mySpan">Hello World</span> If I click the span right after the input element has focus, the input element will lose its focus. How does the function know that it was mySpan that was clicked? PS: If the onclick event of the span would occur before the onblur event of the input element my problem would be solved, because I could set some status value indicating a specific element had been clicked. PPS: The background of this problem is that I want to trigger an Ajax.AutoCompleter control externally (from a clickable element) to show its suggestions, without the suggestions disappearing immediately because of the onblur event on the input element. So I want to check in the OnBlur function if one specific element has been clicked, and if so, ignore the blur event.

    Read the article

  • NullPointerException in javax.swing.text.SimpleAttributeSet.addAttribute

    - by Paul Reiners
    Has anyone ever seen an exception like this?: ERROR: java.lang.NullPointerException: null at java.util.Hashtable.put(null:-1) at javax.swing.text.SimpleAttributeSet.addAttribute(null:-1) at javax.swing.text.SimpleAttributeSet.addAttributes(null:-1) at javax.swing.text.StyledEditorKit.createInputAttributes(null:-1) at javax.swing.text.StyledEditorKit$AttributeTracker.updateInputAttributes(null:-1) at javax.swing.text.StyledEditorKit$AttributeTracker.caretUpdate(null:-1) at javax.swing.text.JTextComponent.fireCaretUpdate(null:-1) at javax.swing.text.JTextComponent$MutableCaretEvent.fire(null:-1) at javax.swing.text.JTextComponent$MutableCaretEvent.mouseReleased(null:-1) at java.awt.AWTEventMulticaster.mouseReleased(null:-1) at java.awt.AWTEventMulticaster.mouseReleased(null:-1) at java.awt.Component.processMouseEvent(null:-1) at javax.swing.JComponent.processMouseEvent(null:-1) at java.awt.Component.processEvent(null:-1) at java.awt.Container.processEvent(null:-1) at java.awt.Component.dispatchEventImpl(null:-1) at java.awt.Container.dispatchEventImpl(null:-1) at java.awt.Component.dispatchEvent(null:-1) at java.awt.LightweightDispatcher.retargetMouseEvent(null:-1) at java.awt.LightweightDispatcher.processMouseEvent(null:-1) at java.awt.LightweightDispatcher.dispatchEvent(null:-1) at java.awt.Container.dispatchEventImpl(null:-1) at java.awt.Window.dispatchEventImpl(null:-1) at java.awt.Component.dispatchEvent(null:-1) at java.awt.EventQueue.dispatchEvent(null:-1) at java.awt.EventDispatchThread.pumpOneEventForFilters(null:-1) at java.awt.EventDispatchThread.pumpEventsForFilter(null:-1) at java.awt.EventDispatchThread.pumpEventsForHierarchy(null:-1) at java.awt.EventDispatchThread.pumpEvents(null:-1) at java.awt.EventDispatchThread.pumpEvents(null:-1) at java.awt.EventDispatchThread.run(null:-1) I wish I could tell you an easy way to reproduce this, but I can’t. It’s happening in a Java Swing application I maintain. It happens infrequently and the application is quite complex. I know it’s a bit of a long shot just showing this stack trace, but I thought I’d try.

    Read the article

  • Problem using NSXMLParser with NOAA data on iPhone

    - by Amagrammer
    Can anyone help me see why NSXMLParser is not causing these methods parser:didStartElement:namespaceURI:qualifiedName:attributes: parser:didEndElement:namespaceURI:qualifiedName:attributes: to fire for the part of the following data: <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:NDFDgenResponse xmlns:ns1=""><dwmlOut xsi:type="xsd:string"><?xml version="1.0"?> <dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd"> (body excluded) </dwml> </dwmlOut></ns1:NDFDgenResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> I'm not an XML expert, but to me, the part looks like just a regular element, to be parsed just like the parts before it. I do get two parser:parseErrorOccurred: errors, #200 and #201, but they occur during the parsing of the <SOAP-ENV:Body> element, not the element, so I'm not sure if they are relevant. Thanks for any help you can give me.

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >