Search Results

Search found 4921 results on 197 pages for 'conditional execution'.

Page 10/197 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Using "prevent execution of method" flags

    - by tpaksu
    First of all I want to point out my concern with some pseudocode (I think you'll understand better) Assume you have a global debug flag, or class variable named "debug", class a : var debug = FALSE and you use it to enable debug methods. There are two types of usage it as I know: first in a method : method a : if debug then call method b; method b : second in the method itself: method a : call method b; method b : if not debug exit And I want to know, is there any File IO or stack pointer wise difference between these two approaches. Which usage is better, safer and why?

    Read the article

  • Code execution time out occationally

    - by Athul k Surendran
    I am working on an e-commerce website. There is a case where I need to fetch the whole data in database through third-party API and send it to an indexing engine. This third-party API has many functions like getproducts, getproductprice, etc., and each of that functions will return the data in XML format. From there I will take charge, I will use various API calls and will handle the XML data with XSLT. And will write to a CSV file. This file will be uploaded to an Indexing engine. Right now I have details of 8000 products to feed the engine, and almost all time the this process takes about 15 min to complete, and sometimes fails. I can't find a better solution for this. I am thinking about handling the XML data in C# itself and get rid of XSLT. As I think, XSLT is far slower than C#. Is it a good Idea? Or what else I can do to solve this issue?

    Read the article

  • Weird execution of ruby/git executables in Windows [migrated]

    - by Frexuz
    Something strange has happened. I can't run some command line executables in Windows anymore. Steps: Open cmd Run an executable, such as ruby -v or git -h When I do that, a new command prompt opens, running that command (I think, it's too fast to see), and instantly closes again. I've managed to print screen the new command prompt, and it shows that it's running inside this path: C:\Documents and Settings\Administrator\Local Settings\Temp\3582-490 Inside this folder, is the executable I'm tring to run. If I run ruby, then ruby.exe is in there. If I run git, then git.exe is in there. And it's always emptying the folder in between, so there is always just one .exe file

    Read the article

  • c# scripting execution with xna (actions take more than 1 frame)

    - by user658091
    I'm trying to figure out how to implement c# scripting into my game (XNA with C#). I will be using C# as the scripting language. My question is, how to call functions that take more than 1 frame to finish? For example: class UserScript : Script { public override void execute(Game game) { //script must wait for dialog to be closed game.openDialog("This is a dialog"); //script should'nt wait for this int goldToGive = 100; goldToGive += 100; game.addGold(goldToGive); // //script should wait for cinematic to end game.startCinematic("name_of_cinematic"); //doesn't wait game.addGold(100); } } I found that you can do that with yield, but I'm not sure if it's the correct way (It's from 2010, the article mentioned no longer exists). http://stackoverflow.com/questions/3540231/implementing-a-simple-xml-based-scripting-language-for-an-xna-game Is yield the answer? If so, can anyone point me any examples/tutorials/books? I haven't found any regarding my situation. If not, what approach should I take? or am I better off with multi-threading?

    Read the article

  • SQL Server 2012 Integration Services- Using Environments in Package Execution

    SQL Server 2012 Integration Services offers several different options for deploying and storing SSIS packages along with their associated projects, two of which are directly related to two deployment models available in SQL Server Data Tools console. Marcin Policht presents one of these methods, which deals with packages deployed using Project Deployment Model and leverages newly introduced Environments.

    Read the article

  • SQL SERVER Merge Operations Insert, Update, Delete in Single Execution

    This blog post is written in response to T-SQL Tuesday hosted by Jorge Segarra (aka SQLChicken). I have been very active using these Merge operations in my development. However, I have found out from my consultancy work and friends that these amazing operations are not utilized by them most of the time. Here is my [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Periodic script execution

    - by Vagelism
    I made a script that sends my local sensors temperature to a server in the internet and then I can see a graph of it. Everything works fine when I execute it manully. I have the latest ubuntu version. When it comes to run periodically every minute with crontab then nothing works. It doesnt send anything. I tried to run it as SUDO and as user, I tried to add it in the crontab file to run it from several locations like /bin/myscript.sh , /user/Desktop and many others...Nothing seems to work. Any Idea how to solve it? Thank you!

    Read the article

  • XPath execution utility

    - by TATWORTH
    I have written an XPath test utility at http://commonxpath.codeplex.com/releases/view/96687This is a WPF application that allows you to enter some test XML and and an XPath expression. When writing such expressions it is important to get the XPath expression correct before embedding it into a program.The program is available as source under LGPL so you can run it both on your office and home PCs. There is a link to help on XPATH syntax.

    Read the article

  • SQL Server 2012 Integration Services - Unattended Execution of SSIS Packages

    Quite often, tasks accomplished via SSIS are a part of procedures that run unattended, either scheduled to launch at a particular date and time or triggered by some arbitrarily chosen event. Marcin Policht shares a typical approach to implementing such a scenario. 12 essential tools for database professionalsThe SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind. Try it now.

    Read the article

  • Partitioned Tables, Indexes and Execution Plans: a Cautionary Tale

    Table partitioning is a blessing in that it makes large tables that have varying access patterns more scalable and manageable, but it is a mixed blessing. It is important to understand the down-side before using table partitioning. "SQL Backup Pro 7 improves on an already wonderful product" - Don KolendaHave you tried version 7 yet? Get faster, smaller, fully verified backups. Download a free trial of SQL Backup Pro 7.

    Read the article

  • SEO is Not All About Link Building, It's About Execution

    The most people hear the term "SEO", it is generally heavily associated with link building, and dominating in the search engines. Truth be told, whilst this still remains a large part of what it is that you do to rank, it is not the be all and end all. In fact, the most important aspect of SEO is in how you execute it, and this is why the success rate of those who learn methods is actually quite low. Let me demonstrate.

    Read the article

  • Embedding IronPython in a WinForms app and interrupting execution

    - by namenlos
    BACKGROUND I've successfully embedded IronPython in my WinForm apps using techniques like the one described here: http://blog.peterlesliemorris.com/archive/2010/05/19/embedding-ironpython-into-a-c-application.aspx In the context of the embedding, my user may any write loops, etc. I'm using the IronPython 2.6 (the IronPython for .NET 2.0 and IronPython for .NET 4.0) MY PROBLEM Sometimes the users will need to interrupt the execution of their code In other words they need something like the ability to hit CTRL-C to halt execution when running Python or IronPython from the cmdline I want to add a button to the winform that when pressed halts the execution, but I'm not sure how to do this. MY PROBLEM The users will need to interrupt the execution of their code In other words they need something like the ability to hit CTRL-C to halt execution when running Python or IronPython from the cmdline MY QUESTION How can I make it to that pressing the a "stop" button will actually halt the execution of the using entered IronPython code? NOTES Note: I don't wont to simply through away that "session" - I still want the user to be able to interact with session and access any results that were available before it was halted. I am assuming I will need to execute this in a separate thread, any guidance or sample code in doing this correctly will be appreciated.

    Read the article

  • Conditionally format row based on cell value in Excel 2011 Mac

    - by kojiro
    I'm using Excel Mac 2011. I have read some of the other answers, but this question is different because I want to apply conditional formatting to an entire row when its cell in column B contains the value 'Y'. Simple conditional formatting just formats that one cell. Whenever the field at column B for any given row contains the value 'Y', I'd like to format that row. Using Mac Excel's so-called "classic" conditional formatting, I have this: I would really like to apply that to every row, but it just paints the entire sheet red (because $B$3 contains "Y"). I can't seem to figure out how to get the reference to whatever is in field B for this row in the rule.

    Read the article

  • Data Execution Prevention in Windows Live Messenger

    - by Andrija
    I keep getting "Data Execution Prevention" error in Windows Live Messenger. I have noticed that this is happening usually when I leave computer to get coffee, and screensaver comes up, WLM breaks. Is there any way to prevent this error from happening? I see I can turn off this "Data Execution Prevention", but is that safe, since I know that WLM is under heavy attacks from spammers/hackers? Thanks

    Read the article

  • Excel: Make conditional formatting static

    - by Martin
    Is there any way to convert conditional formatting to static formatting in Excel? I'm trying to export a range of a Excel Sheet to a new Workbook, with identical appearance but no formulas, links, etc. The problem here is that I have conditional formatting that relies on calculations outside exported range. I've tried saving the workbook to .html, oddly enough the formatting shows in IE but not when reopening it in Excel.

    Read the article

  • Other ternary operators besides ternary conditional (?:)

    - by Malcolm
    The "ternary operator" expression is now almost equivalent to the ternary conditional operator: condition ? trueExpression : falseExpression; However, "ternary operator" only means that it takes three arguments. I'm just curious, are there any languages with any other built-in ternary operators besides conditional operator and which ones?

    Read the article

  • How to delay execution of a method in c#?

    - by Pandiya Chendur
    I have this if condition, if (sendSMS(Convert.ToInt32(DLComportNo.SelectedItem.Text), TxtDriMob.Text, TxtCliDet.Text) && sendSMS(Convert.ToInt32(DLComportNo.SelectedItem.Text), TxtCliMob.Text, TxtDriDet.Text)) { // I am inserting details to my db } and my sendSMS method looks like this, private bool sendSMS(int portNo, string mobNo, string details) { try { SerialPort SerialPort1 = new SerialPort(); SerialPort1.PortName = "COM" + portNo.ToString(); SerialPort1.BaudRate = 9600; SerialPort1.Parity = Parity.None; SerialPort1.DataBits = 8; SerialPort1.StopBits = StopBits.One; SerialPort1.RtsEnable = true; SerialPort1.DtrEnable = true; SerialPort1.Encoding.GetEncoder(); SerialPort1.ReceivedBytesThreshold = 1; SerialPort1.NewLine = Environment.NewLine; SerialPort1.Open(); SerialPort1.Write("AT" + SerialPort1.NewLine); Sleep(500); SerialPort1.Write("AT+CMGF=1" + SerialPort1.NewLine); Sleep(500); SerialPort1.Write("AT+CMGS=" + (char)34 + mobNo + (char)34 + SerialPort1.NewLine); Sleep(1000); SerialPort1.Write(details + (char)26); Sleep(2000); SerialPort1.Close(); } catch { } return true; } What happens is when i use break point in my sendSMS i get my output (ie) both the methods get executed and messages are sent properly... But when i removed my breakpoint both the methods in the if statement are executed but message from the first method is sent and not from the second method.... Any suggestion?

    Read the article

  • PHP: parse URL for matching directory /somedirectory/ and execute conditional code

    - by Scott B
    This has to be pretty simple, but I'd like to parse the current URL and execute conditional code depending on whether the user is on the /sitemap/ directory. So for example, if the site is example.com, and if the request is example.com/sitemap/. Then I want to execute conditional code in that case. I'm using wordpress so I'm not sure if there is a built-in function that gets this... A pure PHP solution is fine.

    Read the article

  • Doubt in Conditional inclusion

    - by Philando Gullible
    This is actually extracted from my module (Pre-processor in C) The conditional expression could contain any C operator except for the assignment operators,increment, and decrement operators. I am not sure if I am getting this statement or not since I tried using this and it worked.Also for other manipulation a probable work around would be to simply declare macro or function inside the conditional expression,something like this to be precise. Also I don't understand what is the rationale behind this rule. Could somebody explain? Thanks

    Read the article

  • How can i mock or test my deferred execution functionality?

    - by cottsak
    I have what could be seen as a bizarre hybrid of IQueryable<T> and IList<T> collections of domain objects passed up my application stack. I'm trying to maintain as much of the 'late querying' or 'lazy loading' as possible. I do this in two ways: By using a LinqToSql data layer and passing IQueryable<T>s through by repositories and to my app layer. Then after my app layer passing IList<T>s but where certain elements in the object/aggregate graph are 'chained' with delegates so as to defer their loading. Sometimes even the delegate contents rely on IQueryable<T> sources and the DataContext are injected. This works for me so far. What is blindingly difficult is proving that this design actually works. Ie. If i defeat the 'lazy' part somewhere and my execution happens early then the whole thing is a waste of time. I'd like to be able to TDD this somehow. I don't know a lot about delegates or thread safety as it applies to delegates acting on the same source. I'd like to be able to mock the DataContext and somehow trace both methods of deferring (IQueryable<T>'s SQL and the delegates) the loading so that i can have tests that prove that both functions are working at different levels/layers of the app/stack. As it's crucial that the deferring works for the design to be of any value, i'd like to see tests fail when i break the design at a given level (separate from the live implementation). Is this possible?

    Read the article

  • How to defer execution of an Event on each item in a collection until iteration of collection is com

    - by Metro Smurf
    Of Note: This is more of a curiosity question than anything else. Given a List<Window> where each window has an event attached to the Close Event which removes the window from the collection, how could you use delegates / events to defer the execution of the Close Event until the collection has been iterated? For example: public class Foo { private List<Window> OpenedWindows { get; set; } public Foo() { OpenedWindows = new List<Window>(); } public void AddWindow( Window win ) { win.Closed += OnWindowClosed; OpenedWindows.Add( win ); } void OnWindowClosed( object sender, EventArgs e ) { var win = sender as Window; if( win != null ) { OpenedWindows.Remove( win ); } } void CloseAllWindows() { // obviously will not work because we can't // remove items as we iterate the collection // (the close event removes the window from the collection) OpenedWindows.ForEach( x => x.Close() ); // works fine, but would like to know how to do // this with delegates / events. while( OpenedWindows.Any() ) { OpenedWindows[0].Close(); } } } Specifically, within the CloseAllWindows() method, how could you iterate the collection to call the close event, but defer the event being raised until the collection has been completely iterated?

    Read the article

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