Search Results

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

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

  • Using one sqlconnection/sqlcommand through 2 DB-bound methods

    - by dotnetdev
    I have a class with a method which gets data from a database through a SELECT stored proc. This method uses a SqlDbReader by returning ExecuteReader() on a SqlCommand. The connection and everything is made in this method, with fields (such as connection string) set as class level fields. I now need to populate an array based on the results of this query (so the columns of each row will go into the array with its own index). However, this query will not select all of the data from one table which is involved. I can write the queries to get what I need, but how can I use one connection throughout the class? If I instantiate the connection object and call Open() in the constructor, I get an exception @ runtime. I'm hoping for something like this: // At class level: sqlconn.Open(); // sqlcommand set up Method() { // Fire stored proc // Insert results in a collection } Method2() { // Pass same collection in (use same one), // Add new row columns into same collection } How can I do this with strict performance in mind? Thanks

    Read the article

  • Sync Framework: SqlSyncProvider ItemConflicting vs ApplyChangeFailed

    - by Paul Smith
    I'm trying to use design a syncronisation application that syncs changes between different SQL Server databases. I came up with a design based around receiving the ItemConflicting event, storing the knowledge associated with the conflict, and resolving all conflicts off-line. However, it seems that I can only get the ApplyChangeFailed event to fire. Is there some reason why SqlSyncProvider does not use the ItemConflicting event? Am I just hooking up to the event wrongly? The reason I care is that the ItemConlficting event allows me to simply log the conflict and continue with the rest of the synchronisation in a way that I can't seem to achieve with the ApplychangeFailed event.

    Read the article

  • c# compact-framework textbox mouseleave

    - by arnoldino
    hello, I would like to leave the textbox via code. when user clicks in the textbox, and types in something , and then the user will click outside the textbox. on the screen there are just labels. only this one textbox is on the form. my problem is, that the textbox does not lost focus when I click everywhere on the screen. the texbox it still has the focus. this textbox is used to filter a list, built from labels. the complete story is: - I have no mainmenu on the screen, so the Sip icon is not visible - user clicks in the textbox, and i bring up the SIP, in the textbox.GotFocus event - user types in some letters, the list is filtered - if user clicks away, the SIP disappears (textbox.lostfocus), but the textbox still has the focus, I mean the cursor remains in the textbox - when user wants to type some other letters for filtering, it clicks in the textbox, but GotFocus does not fire how can I make the texbox to loose the focus?

    Read the article

  • How to handle empty return from getJSON

    - by Gee
    Alright so I have a php script which gets results from a DB, and to get those results I'm using a jQuery script to pull the results via getJSON. It works perfectly but now I want to do something if the php script returns no results (empty). I tried: $.getJSON('path/to/script'), {parameter:parameter}, function(data){ if (data) { alert('Result'); } else { alert('Empty); } }); But it's no good. I've tried different things like if (data.length) but still nothing. I've noticed that if there is no returned data the callback will never fire at all. So if that's the case, how do I handle a empty return?

    Read the article

  • Is it Pythonic to have a class keep track of its instances?

    - by Lightbreeze
    Take the following code snippet class Missile: instances = [] def __init__(self): Missile.instances.append(self) Now take the code: class Hero(): ... def fire(self): Missile() When the hero fires, a missile needs to be created and appended to the main list. Thus the hero object needs to reference the list when it fires. Here are a few solutions, although I'm sure there are others: Make the list a global, Use a class variable (as above), or Have the hero object hold a reference to the list. I didn't post this on gamedev because my question is actually more general: Is the previous code considered okay? Given a situation like this, is there a more Pythonic solution?

    Read the article

  • mx:Tree not dispatching "itemClick" event when click on icon

    - by Xshare
    I have a flex tree that worked perfectly fine when we set the defaultLeafIcon={null} and the folderClosedIcon and folderOpenIcon to {null}. We decided to put the icons back in and took out the nulls. Now they show up fine, but if you click on the icon instead of the label or the rest of the row, it seems to change the selected item, shows the highlight around the new item, but doesn't dispatch the ItemClick event. This makes it really hard to know that the tree's selected item has changed! The weird part is that once you have clicked on the icon once and it looked like the selectedItem changed (or at least it applied that style), if you click the same icon again, it will actually fire the itemClick event. if you click any other icon, it does the same thing again, switching the selectedItem and styling that row, but not firing the itemClick event. Any ideas? Thanks. (This is in flex 4 btw)

    Read the article

  • How can I throttle user login attempts in PHP

    - by jasondavis
    I was just reading this post http://stackoverflow.com/questions/549/the-definitive-guide-to-website-authentication-beta#477585 on Preventing Rapid-Fire Login Attempts. Best practice #1: A short time delay that increases with the number of failed attempts, like: 1 failed attempt = no delay 2 failed attempts = 2 sec delay 3 failed attempts = 4 sec delay 4 failed attempts = 8 sec delay 5 failed attempts = 16 sec delay etc. DoS attacking this scheme would be very impractical, but on the other hand, potentially devastating, since the delay increases exponentially. I am curious how I could implement something like this for my login system in PHP?

    Read the article

  • WPF Visual States and the transitions between them

    - by Mark
    I'm trying to define many different states in my app (around 7 in my case) and I have defined each one of them with a "Default Transition" of zero seconds, but the animation that accompanies each state goes for 1 second. When I fire up my app I have a button than goes through the states one by one, when I go "State1" - "State2" it looks perfect, but when I tell my app (which should be in State2 now) to go to "State3" it reverts all the objects in my scene back to their base state, and then animates to "State3", why doesnt it go from "State2" to "State3". I was hoping to only define each state's end position without defining a starting position as this would really take a long time to do. Can this be done? Any examples? Cheers, Mark

    Read the article

  • Javascript: Do processing when user has stopped typing

    - by Midhat
    I have a text box on a web page, whose value I want to send to a XMLHttpRequest. Now I want the user to just type the value, without pressing a button. But If i just send the request int he keyboard events, it will fire every time a key is pressed. So basically I want something liek this function KeyUpEvent() { if (user is still typing) return; else do processing } It would be great if the solution could come from plain javascript or mootools. I dont want to use any other library.

    Read the article

  • Execute an autocommand only once

    - by Andrej M.
    I have an issue with using GVim on Windows. I have set up the following in my .vimrc: if has("gui_running") autocmd VIMEnter * :source C:/session.vim endif Unfortunately this creates a problem. If I'm a the top of the file and try to move up a line (k), the screen flashes. If I hold the key for just a second it will flash a few dozen times, it is really nasty too look at. I've tried using GUIEnter instead but I got the same results. The docs mention that I can fire an autocommand only once, but I couldn't figure out the exact syntax. Care to help?

    Read the article

  • Raise the time-out for a single webservice

    - by Carra
    My web configuration looks as follows: <system.web> <compilation debug="false"/> <httpRuntime executionTimeout="90"/> </system.web> This is fine for most webservices but one webservice has a query that is running a very long (5 minutes) time and will be stopped before it has finished. Is it possible to set the runtime to 5 minutes for this webservice alone? I've thought about running the database query async (fire and forget) but it doesn't seem possible with sybase/oracle through ODBC.

    Read the article

  • calling facebox in a google maps balloon

    - by XGreen
    Hi Guys, I have a gmap balloon. var marker = createMarker(point, '<div style="width:240px" id="mapsball"><h2>Splash of London</h2><img src="_assets/images/themes/shop.jpg" id="mapThumb" width="100" align="right" /><p>110-112 Hoxton Street</p><p>London</p><p>N1 6SH</p><\/div>'); map.addOverlay(marker, icon); and a facebox attached to the click event of the image ('#mapsball') which opens it in a facebox $(function() { $("body").delegate("#mapThumb", "click", function(){ jQuery.facebox('<img src="_assets/images/themes/shop.jpg" align="right"/>'); }); }); this works fine in ff and safari and chrome. but doesn't fire in ie. I don't get a js error in ie so I am assuming it just doesn't get binded. any help would be greatly appreciated.

    Read the article

  • Button click event

    - by Malcolm
    I am binding an object of other class to a silverlight list box itemsource.I want to fire the click event of a button,but I don't want to define command under this class. I have defined other class and have defined command inside it. Now the question is how to bind the command of this class to the command property of that button. There are two classes A and B I am binding the item source of a listbox to A and i have defined a command in B and i need this command to bind with the button present inside the listbox.(ie..listbox-listboxitem-button) Is there any way to bind to a property outside of the current data context?

    Read the article

  • Modify EXE to stop launching firefox

    - by Random Joe
    I'm using a wireless modem program from my ISP. This program automatically disconnect when it detects the line is idle. It does so in 2-5 minutes of idle time. Whenever I reconnect, It will automatically fire up my default browser to the ISP portal. I DID NOT pay them to shove their web portal in my face 50 times a day. The ISP provides no options for disabling this behavior. Can someone please show me how to hex edit the EXE program to stop it from annoying the hell out of me?

    Read the article

  • jQuery .animate chains, callbacks, and .stop(true, true)

    - by JKS
    So I have a animation chain (.animate().animate().animate()), and on the last .animate(), there is a callback to do some clean-up. The animation is triggered by the hash in the address changing (#page1, #page2, etc.) -- so when the user changes the history state rapidly, if there is a currently executing animation, it needs to stop so they don't queue up. The problem is, if I add a .stop(true, true), it appears only to jump to end of the currently running animation -- and executes only its callback, if there is one. What I need is for it to jump to the end of all of the chained animations, and fire all of the callbacks (well, really just the last one). Is this possible somehow? Huge thanks.

    Read the article

  • Web Application within a Web Site in Visual Studio?

    - by Sean
    Visual Studio allows you to make "Web Sites" and "Web Applications", but, inside a project, can you have one within the other? Say I have my website "www.mysite.com" and I have an application called "BudgetCalculator". One the production server, this is supposed to be located at: www.mysite.com/BudgetCalculator And the BudgetCalculator app contains links back to other parts of the website, like "/page1" and "/page2". However in Visual Studio, when they're listed as two different projects, they're on the same level. When I fire up the debugger for the BudgetCalculator app, those links aren't going to point back to the main website, like they should. Is there a way around this?

    Read the article

  • Difference between 'Web Site' and 'Project' in Visual Studio

    - by Gudmundur Orn
    Duplicate http://stackoverflow.com/questions/344473/asp-net-website-or-web-application-project I have noticed that there is clearly a difference in what you get when you fire up Visual Studio 2008 and choose 'New Project' - 'ASP.NET Web Application' instead of 'New Web Site' - 'ASP.NET Web Site'. For example if you choose 'Project', then you can compile to .dll and each page gets a *.aspx.designer.cs codebehind file. 1) Why do we have these two different project types? 2) Which do you prefer? 3) Why would I choose one over the other? 4) What's the deal with the *.aspx.designer.cs files?

    Read the article

  • WYSIWYG iframe editor and oninput event.

    - by teehoo
    I'm writing a simple WYSIWYG editor in an iframe, but having trouble registering the "oninput" event to detect when the user modifies the text field such as pasting in data etc. var txtArea = document.getElementById('txtArea'); txtArea.contentWindow.document.designMode="on"; txtArea.contentWindow.document.open(); txtArea.contentWindow.document.write("<head><style type='text/css'>body{font-size:13px;}</style></head><body>"+data.document+"</body>"); txtArea.contentWindow.document.close(); $([txtArea.contentWindow.document]).bind("click", updateCaretPosMouse); //fires $([txtArea.contentWindow.document]).bind("keyup", updateCaretPosKeyboard); //fires $([txtArea.contentWindow.document]).bind("input", textChanged); //doesn't fire If I create a plain old element, and add the "input" event to this, then it works. Do 'input" events not work with iframes WYSIWYG editors?

    Read the article

  • Using Unix Process Controll Methods in Ruby

    - by John F. Miller
    Ryan Tomayko touched off quite a fire storm with this post about using Unix process control commands. We should be doing more of this. A lot more of this. I'm talking about fork(2), execve(2), pipe(2), socketpair(2), select(2), kill(2), sigaction(2), and so on and so forth. These are our friends. They want so badly just to help us. I have a bit of code (a delayed_job clone for DataMapper that I think would fit right in with this, but I'm not clear on how to take advantage of the listed commands. Any Ideas on how to improve this code? def start say "*** Starting job worker #{@name}" t = Thread.new do loop do delay = Update.work_off(self) break if $exit sleep delay break if $exit end clear_locks end trap('TERM') { terminate_with t } trap('INT') { terminate_with t } trap('USR1') do say "Wakeup Signal Caught" t.run end end

    Read the article

  • GKSession sendDataToAllPeers including sender?

    - by Typeoneerror
    I've got a number of devices connected over wifi using GameKit. I have a simple UIAlertView popping up when peers receive data. All but the sendee show this alert view when data is sent, so I'm wondering if that's a bug in my app or if that's expected behavior. If the device doing the sending is also a GKSessionModePeer, I would expect it to "fire" its receiveData: message as well since I'm sending to all peers. Should I call a method manually at the same on the sendee device? For example, if I wanted to send a "GameStart" packet to the 4 phones, the peers would call startGame: in the receiveData:fromPeer:inSession:context: method when it receives that packet and the sendee would be calling sendDataToAllPeers: and call startGame: on itself. Does that sound right or is there a way to include the sendee in the sendDataToAllPeers: list so that it responds exactly the same as all connected peers?

    Read the article

  • ObservableCollection and CollectionChanged Event

    - by wpfwannabe
    Why does the collectionchanged event not fire in the following code, yet I can see the new instance of InventoryBTO I add to the ObservableCollection? private ObservableCollection<InventoryBTO> _inventoryRecords; public ObservableCollection<InventoryBTO> InventoryRecords { get { return _inventoryRecords; } set { _inventoryRecords = value; } } private InventoryBTO _selectedRecord; public InventoryBTO SelectedRecord { get { return _selectedRecord; } set { if (_selectedRecord != value) { _selectedRecord = value; OnPropertyChanged(new PropertyChangedEventArgs("SelectedRecord")); } } } public InventoryViewModel() { if (_inventoryRecords == null) { InventoryRecords = new ObservableCollection<InventoryBTO>(); this.InventoryRecords.CollectionChanged += new NotifyCollectionChangedEventHandler(InventoryRecords_CollectionChanged); } _inventoryRecords = InventoryListBTO.GetAllInventoryRecords(); } void InventoryRecords_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { }

    Read the article

  • Android - When to use Service

    - by Chris
    This question is related to my previous question: http://stackoverflow.com/questions/2786720/android-service-ping-url So I have an Android app that on the click of a button, opens up a web page. Now, in the background I want to call another http url for gathering stats. My question is does this have to be a service? I know a service is for background tasks that run for an indefinite period of time, while the user is busy doing something else. In my case, all I really need is to get the URL in the background, not show it to the user, instead show the web page to the user. Can I just not write code to get contents of the http url and fire up the activity that displays the web page? Coz all I want is to get the url in the background and be done with it. Or does this have to be done using the Service class? I am confused. Thanks Chris

    Read the article

  • Issue with SOAPUI: running test for concurrency

    - by Kangkan
    I am trying to test my web service using SOAPUI (the free version). For testing concurrency, I wished to fire concurrent threads from SOAPUI onto the service. But with the options, the thread count increases gradually (even in the burst mode). The machine where SOAPUI is installed is a WinXP machine. Can I actually do the concurrency testing? If so how? Please guide me. I am waiting for your answers and help.

    Read the article

  • jQuery Autocomplete losing text on AutoPostBack

    - by Moose
    I have a jQuery Autocomplete field on an ASP.Net Webform and everything has been working great until now. I also have a DropDownList that I have a need to fire onSelectedIndexChanged with AutoPostBack. When I changed my code to do the AutoPostBack, the text field that has the jQuery AutoComplete on it comes back blank. However, if I look at the source of the page, the text is in the text field. If I now post the form, the page will send back a blank field. My Google-Fu is weak on this one, as I could not come up with any workaround for it. Has anyone had any issues like this with the Autocomplete field getting blanked out on an AutoPostBack, and how did you get around it? I can post code if it's really necessary, but I'd need to sanitize a lot of it before I could due to company policy.

    Read the article

  • ASP.NET Call Another Element's DoPostBack Function

    - by blu
    I have an ASP.NET control that has an onclick event handler rendered inline on the element. I would like to call that function and have it raise the target control's server side event handler. <asp:CheckBox ID="Foo" runat="server" AutoPostBack="true" Text="Foo" /> <a href="#" onclick="javascript:setTimeout('__doPostBack(\'Foo\',\'\')', 0)">Test </a> I created the checkbox, looked at the rendered function on the field, and then copied that into the onclick on the anchor element. The anchor will raise a postback, but the event handler for the check box is not raised. protected override void OnLoad(EventArgs e) { // fires for checkbox // fires for anchor (the anchor does cause a postback) } void Foo_CheckedChanged(object sender, EventArgs e) { // fires for checkbox // does not fire for anchor } protected override void OnInit(EventArgs e) { this.Foo.CheckedChanged += new EventHandler(Foo_CheckedChanged); } Is it possible to do this?

    Read the article

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