Search Results

Search found 2114 results on 85 pages for 'fire crow'.

Page 8/85 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to fire the action of a uibarbuttonitem programatically?

    - by Aruna Herath
    I have created an uibarbuttonitem dynamically and it works properly. I want to fire that uibarbutton item action(click) programatically for unit testing. Even though the code work properly when I log the action of the bar button item in the application code (not on testing code) it gives null. The code I have used is given below. NSLog(@"%@",NSStringFromSelector(barButton.action)); In the testing code I have created a bar button called logout and assign barbutton to that.To click the bar button item programatically I followed the following code. [logout.target performSelector:logout.action]; But it didn't work . I logged the action of logout button and it also gives null. NSLog(@"%@",logout.action); I want to know how to programatically click a uibarbutton item which created dynamically .

    Read the article

  • File input javascript event, is there an event fire when someone click okay on the dialog box?

    - by Mickey Cheong
    Hi, When someone click on Browse for the input file below: <input type="file" name="blah" /> A dialog box will appear. The user will then select a file and click 'Ok'. The dialog box will close. Is there an event fire because of that? I tried onfocus and onblur, it didnt work out. The only way is, i start a timer to check the value content when it is onfocus. Not that elegant. Any solution? Cheers, Mickey

    Read the article

  • Where should I put code that is supposed to fire AFTER the view has loaded?

    - by Timbo
    I’m writing an objective-c program that does some calculations based on time and will eventually updates UILabels each second. To explain the concept here’s some simplified code, which I’ve placed into the viewDidLoad of the class that handles the view. (void)viewDidLoad { [super viewDidLoad]; // how do i make this stuff happen AFTER the view has loaded?? int a = 1; while (a < 10) { NSLog(@"doing something"); a = a + 1; sleep(1); } } My problem is that the code halts the loading of the view until the loop is all complete (in this case 10 seconds). Where should I put code that I want to fire AFTER the view has finished loading? newbie question I know =/

    Read the article

  • Can I fire a Text Changed Event for an asp.net Text Box before it loses focus?

    - by Xaisoft
    I have an asp.net TextBox in which I want to check if the text entered into the TextBox is > 0. It works once I tab out or click out of the TextBox, but if I keep focus on the TextBox, it won't fire the Text Changed Event, so I have the following scenario, I want to enable something if and only if the TextBox.Text.Length = 0. Now, if I put my caret in the TextBox and delete all the characters and then leave the caret in the TextBox so it still has focus and take my mouse and click a button, it will not do what it was supposed to do because it never fired the Text Changed Event. How would something like this be handled?

    Read the article

  • Magento: Why do controller action predispatch events not fire if the controller is rewritten?

    - by mattalexx
    Why do controller action predispatch events not fire if the controller is rewritten? Here is a snippet of store/app/code/core/Mage/Core/Controller/Varien/Action.php: abstract class Mage_Core_Controller_Varien_Action { // [...] public function preDispatch() { // [...] if ($this->_rewrite()) { return; // [What is the purpose if this?] } // [...] // [This is where my event needs to be firing, but this code never gets // executed because the controller is rewritten] Mage::dispatchEvent( 'controller_action_predispatch_'.$this->getFullActionName(), array('controller_action'=>$this) ); } // [...] } I don't know where to start fixing this problem. Anyone out there ever dealt with this before?

    Read the article

  • How to fire off a asych thread in a web application, and gaurantee only 1 thread fires?

    - by Blankman
    I want to cache a object in memory. Regenerating the object when the cache expires is fairly expensive, so I want to do the following: When the cache is "about" to expire, I want to fire off a asychronous thread that will go and rebuild the object and then reset the cache. One thing I am worry about is multiple threads firing to fetch the object to cache, I only want a single thread doing this, realizing many people will be hitting the website. This might not be the best use case to do this, but I want to know how to do this sort of thing.

    Read the article

  • Do validations still fire in ASP.NET even if the controls are hidden?

    - by Josh
    I have a form that uses ASP.NET validations. I am using some inline C# in the aspx to show/hide certain controls depending on a user's role. I would use the Visible property, but there are so many of them, I just decided to do inline C# to show and hide (I know, not best practice, but bear with me for a second). I am having an issue where Page.IsValid is always set to False when I submit my form (when certain fields are being hidden). Will the validations still fire off even if the controls are not even rendered on the pag? Also, if this is not the case, is there an effective way of breaking down Page.IsValid to find out what is setting it to False? Thanks.

    Read the article

  • [Raise|Trigger|Fire|...] an event?!?

    - by winSharp93
    Hello, in a German programming forum we currently have a discussion about events and what you (grammatically) do with them. The MSDN talks about "Event Raising" and "to raise an event". Thus, this seems to be one possibility. Are there any other synonyms? What about "to trigger an event" and "to fire an event"? A Google search will bring results for all of the three possibilities. This, however, does not mean that they are correct, too, of course. Are they? Are there any (stylistic, ...) differences or are they used in different contexts? Many thanks in advance for ending a heated debate :-)

    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 to uninstall a Fire fox add-on that doesn't want to be uninstalled?

    - by Fellknight
    Let's say I installed a program, called "E" . Said program requests to install a Firefox add-on. Now the add-on doesn't work due to being incompatible. Because it came with E i uninstall E planning to re-install it with out the add-on, but after the E uninstall finishes the add-on is still there in Firefox, disabled and with the buttons grayed out. Moreover, Firefox displays the "Restart Firefox to uninstall this add-on" message but no matter how many times it's restarted the loop wont end. Is there any way to uninstall E's add-on?

    Read the article

  • jQuery: Targeting elements added via *non-jQuery* AJAX before any Javascript events fire? Beyond th

    - by peteorpeter
    Working on a Wicket application that adds markup to the DOM after onLoad via Wicket's built-in AJAX for an auto-complete widget. We have an IE6 glitch that means I need to reposition the markup coming in, and I am trying to avoid tampering with the Wicket javascript... blah blah blah... here's what I'm trying to do: New markup arrives in the DOM (I don't have access to a callback) Somehow I know this, so I fire my code. I tried this, hoping the new tags would trigger onLoad events: $("selectorForNewMarkup").live("onLoad", function(){ //using jQuery 1.4.1 //my code }); ...but have become educated that onLoad only fires on the initial page load. Is there another event fired when elements are added to the DOM? Or another way to sense changes to the DOM? Everything I've bumped into on similar issues with new markup additions, they have access to the callback function on .load() or similar, or they have a real javascript event to work with and live() works perfectly. Is this a pipe dream?

    Read the article

  • Having some fun - what is a good way to include a secret key functionality and fire the KeyDown event?

    - by Sisyphus
    To keep myself interested, I try to put little Easter Eggs in my projects (mostly to amuse myself). I've seen some websites where you can type a series of letters "aswzaswz" and you get a "secret function" - how would I achieve this in C#? I've assigned a "secret function" in the past by using modifier keys bool showFunThing = (Control.ModifierKeys & Keys.Control) == Keys.Control; but wanted to get a bit more secretive (without the modifier keys) I just wanted the form to detect a certain word typed without any input ... I've built a method that I think should do it: private StringBuilder _pressedKeys = new StringBuilder(); protected override void OnKeyDown(KeyEventArgs e) { const string kWord = "fun"; char letter = (char)e.KeyValue; if (!char.IsLetterOrDigit(letter)) { return; } _pressedKeys.Append(letter); if (_pressedKeys.Length == kWord.Length) { if (_pressedKeys.ToString().ToLower() == kWord) { MessageBox.Show("Fun"); _pressedKeys.Clear(); } } base.OnKeyDown(e); } Now I need to wire it up but I can't figure out how I'm supposed to raise the event in the form designer ... I've tried this: this.KeyDown +=new System.Windows.Forms.KeyEventHandler(OnKeyDown); and a couple of variations on this but I'm missing something because it won't fire (or compile). It tells me that the OnKeyDown method is expecting a certain signature but I've got other methods like this where I haven't specified arguments. I fear that I may have got myself confused so I am turning to SO for help ... anyone?

    Read the article

  • Why does the roll_out event fire in this code?

    - by user339681
    I have made this simple example to demonstrate some problems I'm having. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Canvas id="buttonCanvas" x="100" y="100" opaqueBackground="#000000" width="80%" height="300" creationComplete="init(event)"> <mx:Button x="5" y="5"/> <mx:Button x="5" y="50"/> </mx:Canvas> <mx:Script> <![CDATA[ private function init(event:Event):void{ buttonCanvas.addEventListener(MouseEvent.ROLL_OUT, function(event:Event):void{ buttonCanvas.opaqueBackground=(buttonCanvas.opaqueBackground==0)? 0x666666:0; }); } ]]> </mx:Script> </mx:Application> I don't understand the following: Why doesn't the percentage nor absolute dimensions affect the canvas? Why does the roll_out event fire when the mouse leaves a button (even when it is still inside the canvas). I'm going nuts trying to figure this out. Any help would be greatly appreciated!

    Read the article

  • Why won't this hit test fire a second time? wpf

    - by csciguy
    All, I have a main window that contains two custom objects (AnimatedCharacter). These objects are nothing but images. These images might contain transparent portions. One of these objects slightly overlaps the other object. There is a listener attached to the main window and is as follows. private void Window_MouseLeftButtonUp_1(object sender, MouseButtonEventArgs e) { Point pt = e.GetPosition((UIElement)sender); //store off the mouse pt hitPointMouse = pt; //clear the result list hitResultsSubList.Clear(); EllipseGeometry m_egHitArea = new EllipseGeometry(pt, 1, 1); VisualTreeHelper.HitTest(sender as Visual, HitTestFilterFuncNew, new HitTestResultCallback(HitTestCallback), new GeometryHitTestParameters(m_egHitArea)); //Check all sub items you have now hit if (hitResultsSubList.Count > 0) { CheckSubHitItems(hitResultsSubList); } } The idea is to filter out only a select group of items (called AnimatedCharacters). The hittest and filters are as follows public HitTestResultBehavior HitTestCallback(HitTestResult htrResult) { IntersectionDetail idDetail = ((GeometryHitTestResult)htrResult).IntersectionDetail; switch (idDetail) { case IntersectionDetail.FullyContains: return HitTestResultBehavior.Continue; case IntersectionDetail.Intersects: return HitTestResultBehavior.Continue; case IntersectionDetail.FullyInside: return HitTestResultBehavior.Continue; default: return HitTestResultBehavior.Stop; } } public HitTestFilterBehavior HitTestFilterFuncNew(DependencyObject potentialHitTestTarget) { if (potentialHitTestTarget.GetType() == typeof(AnimatedCharacter)) { hitResultsSubList.Add(potentialHitTestTarget as AnimatedCharacter); } return HitTestFilterBehavior.Continue; } This returns me back a list (called hitResultsSubList) that I attempt to then process further. I want to take everything in the hitResultsSubList and run a hit test on it again. This time, the hit test will be checking alpha levels on the particular animatedCharacter object. private void CheckSubHitItems(List<DependencyObject> hitResultsSub) { for(int i = 0; i<hitResultsSub.Count; i++) { hitResultsList.Clear(); AnimatedCharacter ac = hitResultsSub[i] as AnimatedCharacter; try { //DEBUGGER SKIPS THIS NEXT LINE EVERY SINGLE TIME. VisualTreeHelper.HitTest(ac, null, new HitTestResultCallback(hitCallBack), new PointHitTestParameters(hitPointMouse)); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.StackTrace); } if (hitResultsList.Count > 0) { //do something here } } } Here is my problem now. The hit test in the second function (CheckSubHitItems) never gets called. There are definitely items (DependencyObjects of the type AnimatedCharacter) in the hitResultSub, but no matter what, the second hit test will not fire. I can walk the for loop fine, but when that line is hit, I get the following console statement. Step into: Stepping over non-user code 'System.MulticastDelegate.CtorClosed' No exceptions are thrown. Any help is appreciated.

    Read the article

  • How to install Percona Xtrabackup to Ubuntu 12.04LTS?

    - by coding crow
    I am trying to install Percona Xtrabackup to my Ubuntu 12.04 LTS insatlled on Amazon EC2. I am trying to follow instruction on the Xtrabackup installation page here. The instruction follows as Add this to /etc/apt/sources.list, replacing squeeze with the name of your distribution: deb http://repo.percona.com/apt squeeze main deb-src http://repo.percona.com/apt squeeze main In my case I will replace squeeze with precise but when I open /etc/apt/sources.list for editing it says the following It is suggestion three alternatives instead of editing which are listed a.), b.) and c.). My Question What should I do to install Percona Xtrabackup to my box?

    Read the article

  • How to automatically restart Tomcat7 on system reboots?

    - by coding crow
    I have installed Tomcat 7 on Ubuntu 12.04 LTS which run on an Amzon EC2 instance. Now I wish tomcat should restart automatically on system reboot. I read this blog which suggest adding below script to /etc/init.d/tomcat7 # Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid case $1 in start) sh /usr/share/tomcat7/bin/startup.sh ;; stop) sh /usr/share/tomcat7/bin/shutdown.sh ;; restart) sh /usr/share/tomcat7/bin/shutdown.sh sh /usr/share/tomcat7/bin/startup.sh ;; esac exit 0 and issue the following commands sudo chmod 755 /etc/init.d/tomcat7 sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat sudo /etc/init.d/tomcat7 restart My Questions The tomcat7 already has script in it, where do we have to paste the suggested script? Is the suggested procedure correct?

    Read the article

  • Why does @PostConstruct callback fire every time even though bean is @ViewScoped? JSF

    - by Nitesh Panchal
    Hello, I am using datatable on page and using binding attribute to bind it to my backing bean. This is my code :- <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:form prependId="false"> <h:dataTable var="item" value="#{testBean.stringCollection}" binding="#{testBean.dataTable}"> <h:column> <h:outputText value="#{item}"/> </h:column> <h:column> <h:commandButton value="Click" actionListener="#{testBean.action}"/> </h:column> </h:dataTable> </h:form> </h:body> </html> This is my bean :- package managedBeans; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.component.html.HtmlDataTable; @ManagedBean(name="testBean") @ViewScoped public class testBean implements Serializable { private List<String> stringCollection; public List<String> getStringCollection() { return stringCollection; } public void setStringCollection(List<String> stringCollection) { this.stringCollection = stringCollection; } private HtmlDataTable dataTable; public HtmlDataTable getDataTable() { return dataTable; } public void setDataTable(HtmlDataTable dataTable) { this.dataTable = dataTable; } @PostConstruct public void init(){ System.out.println("Post Construct fired!!"); stringCollection = new ArrayList<String>(); stringCollection.add("a"); stringCollection.add("b"); stringCollection.add("c"); } public void action(){ System.out.println("Clicked!!"); } } Please tell me why is the @PostConstruct firing each and every time i click on button? It should fire only once as long as i am on same page beacause my bean is @ViewScoped. Further, if i remove the binding attribute then everything works fine and @PostConstruct callback fires only once. Then why every time when i use binding attribute? I need binding attribute and want to perform initialisation tasks like fetching data from webservice, etc only once. What should i do? Where should i write my initialisation task?

    Read the article

  • Jquery convert string of one type to string array.....

    - by chandru_cp
    Consider a string which is {"Table" : [{"Bird" : "Peacock"}, {"Bird" : "Crow"}]} to this ["Peacock", "Crow"] in jquery... Is this possible? EDIT: I am doing this but didnt work... $(document).ready(function() { var obj = JSON.parse('{"Table" : [{"Bird" : "Peacock"},{"Bird" : "Crow"}]}'); myarray = []; $.each(obj.table, function(i, v) { myarray.push(v.Bird); }); $("#tags").autocomplete(myarray, { width: 138, max: 4, highlight: false, multiple: true, multipleSeparator: " ", scroll: true, scrollHeight: 300 }); });

    Read the article

  • Migrating from IBM AIX/DB2 Power systems to Oracle Technologies

    - by zeynep.koch(at)oracle.com
    If you are planning to migrate from  IBM DB2 on AIX Power Systems to more open and better-performing computing environment--one that offers enhanced flexibility, clustering, availability, and security, as well as lower maintenance than download this guide that outlines migrating to Oracle Database 11g and Oracle Linux running on Oracle's Sun Fire X4800 server.This guide shows you how to:Move sample applications with an IBM DB2 on an IBM Power System to Oracle Database 11g Release 2Install Oracle Linux and Oracle Database Release 2 on the Oracle's Sun Fire X4800 serverMigrate user databases from the IBM Power System to Oracle's Sun Fire X4800 serverDownload

    Read the article

  • Week in Geek: Malware for Android has Increased 472% since July

    - by Asian Angel
    This week we learned how to safely eject your USB devices from the desktop context menu, make the Kindle Fire Silk Browser *actually* fast, “disable Windows startup programs, use DNS names on your home network, & restore a vintage keyboard”, print or save a directory listing to a file, make your computer press a key every X seconds, and more. How to Make the Kindle Fire Silk Browser *Actually* Fast! Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS

    Read the article

  • Why does this call to jQuery's $.ajax() fire an empty request in Chrome and Firefox?

    - by Martin Wiboe
    Hello, I am trying to call a WCF RESTful service from jQuery. I am using JSON to encode both request and response. The following code functions correctly in IE8: url = 'http://ipv4.fiddler:5683/WeatherWCF/NewBinding/MyService/GetValueFloat'; $.ajax({ url: url, data: '{"alias": "Udetemperatur"}', type: "POST", contentType: "application/json; charset=utf-8", dataType: "text", // not "json" we'll parse success: function(res) { alert('Received response: ' + res); } }); However, in both Firefox and Chrome, res contains an empty string. After using Fiddler to monitor the request, it appears that jQuery sends an empty request to the server as shown in this screen dump: http://imgur.com/EJgwS.png This is the successful request: http://imgur.com/S77BA.png What am I doing wrong? Kind regards, Martin

    Read the article

  • ASP.NET MVC 2: How do I make the Ajax.Form to fire the Client Side Validation with Data Annotation?

    - by Methee
    Here is the code I have so far: <% Html.EnableClientValidation(); %> <% using (Ajax.BeginForm("Address", "Accounts", FormMethod.Post, new AjaxOptions(){}, new { id="dialog-form"} )){ %> <div> <label for="address">Address Name:</label> </div> <div> <%= Html.TextBoxFor(m => m.Name)%> <div> <%= Html.ValidationMessageFor(m => m.Name)%> </div> </div> <input type="submit" value="OK" /> <% } %> When I click submit, It does the validation on the server side, I kinda like it to validate on the Client instead of taking a trip to the server right away.

    Read the article

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