Search Results

Search found 1611 results on 65 pages for 'technique'.

Page 39/65 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • DataAdapter Select string from base table schema?

    - by MattSlay
    When I built my .xsd, I had to choose the columns for each table, and it made a schema for the tables, right? So how can I get that Select string to use as a base Select command for new instances of dataadapters, and then just append a Where and OrderBy clause to it as needed? That would keep me from having to keep each DataAdapter's field list (for the same table) in synch with the schema of that table in the .xsd file. Isn't it common to have several DataAdapters that work on a certain table schema, but with different params in the Where and OrderBy clauses? Surely one does not have to maintain (or even redundently build) the field list part of the Select strings for half a dozen DataAdapters that all work off of the same table schema. I'm envisioning something like this pseudo code: BaseSelectString = MyTypedDataSet.JobsTable.GetSelectStringFromSchema() // Is there such a method or technique? WhereClause = " Where SomeField = @Param1 and SomeOtherField = @Param2" OrderByClause = " Order By Field1, Field2" SelectString=BaseSelectString + WhereClause + OrderByClause OleDbDataAdapter adapter = new OleDbDataAdapter(SelectString, MyConn)

    Read the article

  • Adding to the browser user agent string?

    - by stwissel
    I have a plug-in that handles its own url schema (something like mystuf:// ). If a user clicks on such a link when the plug-in isn't installed (s)he gets an ugly error. So I extended my installer to write into the Registry (for Internet Explorer) and the user.js (for Firefox) to ADD a custom string to the user agent string. These additions survive a browser upgrade nicely (Microsoft uses this technique to indicate the presence of the dotNet Framework). Now I need to extend this to Apple Safari and Google Chrome on all supported platforms. To be clear: I'm not looking how to REPLACE the user agent string, but how to amend it with additional information. Any hint?

    Read the article

  • Is writing eSQL database independant or not?

    - by Robert Koritnik
    Using EF we can use LINQ to read data which is rather simple (especialy using fluent calls), but we have less control unless we write eSQL on our own. Is writing eSQL database actually data store independant code? So if we decide to change data store, can the same statements still be used? Is writing eSQL strings in your code pose any serious security threats similar to writing TSQL statements in plain strings? So we moved to SPs. Could we still mode eSQL scripts outside of code as well and use some other technique to make them a bit more secure?

    Read the article

  • iFrame src something other than javascript:false but same effect

    - by macca1
    Is there any other way to write javascript:false that is more pleasant? I'm building a print functionality for an intranet app (for IE6) and I make the printed page using an iframe: $('body').append('<iframe id="printIFrame" src="javascript:false"></iframe>'); $("#printIFrame").attr('style','position:absolute;left:-500px;top:-500px;'); Without having javascript:false in the src, I'll get the "This page contains both secure and nonsecure items" popup when I create it. However the downside of this is that "javascript:false" gets printed as the title on the bottom left of each page (instead of about:blank or something more useful). Is there some kind of javascript technique that I can write javascript:false but in cleaner terms? I tried something like this var PrintOut = false; $('body').append('<iframe id="printIFrame" src="PrintOut"></iframe>'); But I couldn't get that working. Any other ideas?

    Read the article

  • Actionscript 3 : XML cached in local testing

    - by Boun
    Hi, My question is about XML loading. I need to avoid xml caching. On a web server, the technique is adding a random param to reload each time the XML file. But on local testing (in Flash CS4 IDE, CTRL + Enter), the following lines are not possible : var my_date : Date; path = "toto.xml?time="+my_date.getSeconds()+my_date.getMilliseconds(); Is there any trick to bypass this issue ? I've read on different forum about the "delete" method, we delete the xml object and then recreate one new. In my case, I put : myXML = null; myXML = new XML ( loadedData ); But it doesn't work at all. I spent many hours on that problem, if anyone has a good solution... Thank you.

    Read the article

  • Deliberately adding bugs to assess QA processes

    - by bgbg
    How do you know that as many bugs as possiblle have been discovered and solved in a program? Couple of years ago I have read a document about debugging (I think it was some sort of HOWTO). Among other things, that document described a technique in which the programming team deliberately adds bugs into the code and passes it to the QA team. The QA process is considered completed when all the deliberately known bugs have been discovered. Unfortunately, I cannot find this document, or any similar one with description of this trick. Can someone please point me to such a document?

    Read the article

  • Is it considered a good/bad practice to configure tomcat for deploying certain apps?

    - by Roman
    Disclaimer: I've never used technique which is described below. That's why there may occur some mistakes or misunderstandings in its description. I heard that some teams (developers) use 'pre-configured' tomcat. As I understand they add different jars to tomcat \lib folder and do something else. Once I've read something about recompilation (or reassembly?) of tomcat for certain needs. Just yesterday I heard a dialog where one developer sayd that his team-mates were not able to deploy the project until he would give them configured tomcat version. So, I wonder, what is it all about and why do they do it? What benefits can they gain from that?

    Read the article

  • Jquery cross-fade rollover problems in IE7

    - by Thomas
    I built some cross fade rollovers in IE7 using this single image technique: http://jqueryfordesigners.com/image-cross-fade-transition/ It works by placing the rollover image in the background and fading the original image state when the user rollovers the image. IE7 hates it. The rollover state shows up directly below the original image. You can check it out here: http://hardtopdepot.com/dev/inner.html It should be pretty obvious in IE7 but the add to cart buttons are suppossed to be Jquery rollovers. I am by no means a JS expert so Im not sure how to go about solving this problem, any suggestions would be very helpful. Thanks-

    Read the article

  • How doe we name test methods where we are checking for more than one condition?

    - by Sandbox
    I follow the technique specified in Roy Osherove's The Art Of Unit Testing book while naming test methods - MethodName_Scenario_Expectation. It suits perfectly well for my 'unit' tests. But,for tests that I write in 'controller' or 'coordinator' class, there isn't necessarily a method which I want to test. For these tests, I generate multiple conditions which make up one scenario and then I verify the expectation. For example, I may set some properties on different instances, generate an event and then verify that my expectations from controller/coordinator is being met. Now, my controller handles events using a private event handler. Here my scenario is that, I set some properties, say 3 condition1,condition2 and condition3 Also, my scenario includes an event is raised I don't have a method name as my event handler is private. How do I name such a test method?

    Read the article

  • Adding HTML to the DOM through the client.

    - by Mantorok
    Hi all Just wanted your views on the most efficient way to render content on demand, the reason this has come to light is that I'm maintaining a AA compliant website and we recently added video to it, and one of the techniques to avoid invalidation was to add the HTML for the video to the DOM after the page has loaded - which is fine and working ok. However, I found 2 possible techniques and I would appreciate some views, the one I'm currently using is an AJAX call that returns the HTML, the other technique is a hidden field that contains the HTML - I'm presently using the former. The main reason I'm asking the question is because there may be times when this particular control is also requested via an AJAX call, so I would end up with back-to-back AJAX calls, which seems a bit inefficient to me. I hope this makes sense, are there any better techniques to achieve this? Am I worrying too much over the consecutive AJAX calls? Thanks

    Read the article

  • How to combine two sql queries?

    - by plasmuska
    Hi Guys, I have a stock table and I would like to create a report that will show how often were items ordered. "stock" table: item_id | pcs | operation apples | 100 | order oranges | 50 | order apples | -100 | delivery pears | 100 | order oranges | -40 | delivery apples | 50 | order apples | 50 | delivery Basically I need to join these two queries together. A query which prints stock balances: SELECT stock.item_id, Sum(stock.pcs) AS stock_balance FROM stock GROUP BY stock.item_id; A query which prints sales statistics SELECT stock.item_id, Sum(stock.pcs) AS pcs_ordered, Count(stock.item_id) AS number_of_orders FROM stock GROUP BY stock.item_id, stock.operation HAVING stock.operation="order"; I think that some sort of JOIN would do the job but I have no idea how to glue queries together. Desired output: item_id | stock_balance | pcs_ordered | number_of_orders apples | 0 | 150 | 2 oranges | 10 | 50 | 1 pears | 100 | 100 | 1 This is just example. Maybe, I will need to add more conditions because there is more columns. Is there a universal technique of combining multiple queries together?

    Read the article

  • How to populate an ontology at runtime?

    - by Chan
    I have a configuration file with a lot of data like sensor locations, type, rules for activating devices etc. Basically related to a pervasive system. I plan to design an ontology for this domain. The doubt in my mind is how should I populate the ontology with the information in the configuration file, as the configuration files are going to change every now and then. Earlier I was planning to use XML, so I can just read the configuration file at runtime and create an XML as per the XSD. Do we use the same technique for Ontologies? If yes then what is the format of the populated ontology? Thanks Chan

    Read the article

  • SSIS - Update flag of selected rows from more than one table

    - by Rob Bowman
    Hi I have a SSIS package that copies data from table A to table B and sets a flag in table A so that the same data is not copied subsequently. This works great by using the following as the SQL command text on the ADO Net Source object: update transfer set ProcessDateTimeStamp = GetDate(), LastUpdatedBy = 'legacy processed' output inserted.* where LastUpdatedBy = 'legacy' and ProcessDateTimeStamp is not null The problem I have is that I need to run a similar data copy but from two sources table, joined on a primary / foreign key - select from table A join table B update flag in table A. I don't think I can use the technique above because I don't know where I'd put the join! Is there another way around this problem? Thanks Rob.

    Read the article

  • How to convert a gi-normous integer (in string format) to hex format? (C#)

    - by eviljack
    Given a potentially huge integer value (in c# string format), I want to be able to generate it's hex equivalent. Normal methods don't apply here as we are talking arbitrarily large numbers, 50 digits or more. The techniques I've seen which use a technique like this: // Store integer 182 int decValue = 182; // Convert integer 182 as a hex in a string variable string hexValue = decValue.ToString("X"); // Convert the hex string back to the number int decAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber); won't work because the integer to convert is too large. For example I need to be able to convert a string like this: 843370923007003347112437570992242323 to it's hex equivalent. these don't work: http://stackoverflow.com/questions/1139957/c-convert-int-to-hex-and-back-again http://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hex-and-decimal-in-c

    Read the article

  • How can I check the version of an assembly then delete the assembly?

    - by Nescio
    I am using the FileVersionInfo to retrieve the version of a .Net assembly. Then, I want to immediately delete the file. Unfortunately after I call GetVersionInfo, any attempt to delete the file results in an error “…in use by another process…” Is there another technique to determine the version that does not lock the file? Or, is it possible to ensure the lock is released after calling GetVersionInfo? The below example is heavily simplified, but scope matches my real code. void Main() { var fvi = GetVersion("myPath"); if (fvi.ToString() == "2.0.0.7") DeleteFile("myPath"); } FileVersionInfo GetVersion(string path) { return FileVersionInfo.GetVersionInfo(path); } void DeleteFile(string path) { File.Delete(path); }

    Read the article

  • How to determine whether a class has a particular templated member function?

    - by Aozine
    I was wondering if it's possible to extend the SFINAE approach to detecting whether a class has a certain member function (as discussed here: "Is there a Technique in C++ to know if a class has a member function of a given signature?" http://stackoverflow.com/questions/87372/is-there-a-technique-in-c-to-know-if-a-class-has-a-member-function-of-a-given-s ) to support templated member functions? E.g. to be able to detect the function foo in the following class: struct some_class { template < int _n > void foo() { } }; I thought it might be possible to do this for a particular instantiation of foo, (e.g. check to see if void foo< 5 >() is a member) as follows: template < typename _class, int _n > class foo_int_checker { template < typename _t, void (_t::*)() > struct sfinae { }; template < typename _t > static big test( sfinae< _t, &_t::foo< _n > > * ); template < typename _t > static small test( ... ); public: enum { value = sizeof( test< _class >( 0 ) ) == sizeof( big ) }; }; Then do foo_int_checker< some_class, 5 >::value to check whether some_class has the member void foo< 5 >(). However on MSVC++ 2008 this always returns false while g++ gives the following syntax errors at the line test( sfinae< _t, &_t::foo< _n > > ); test.cpp:24: error: missing `>' to terminate the template argument list test.cpp:24: error: template argument 2 is invalid test.cpp:24: error: expected unqualified-id before '<' token test.cpp:24: error: expected `,' or `...' before '<' token test.cpp:24: error: ISO C++ forbids declaration of `parameter' with no type Both seem to fail because I'm trying to get the address of a template function instantiation from a type that is itself a template parameter. Does anyone know whether this is possible or if it's disallowed by the standard for some reason? EDIT: It seems that I missed out the ::template syntax to get g++ to compile the above code correctly. If I change the bit where I get the address of the function to &_t::template foo< _n > then the program compiles, but I get the same behaviour as MSVC++ (value is always set to false). If I comment out the ... overload of test to force the compiler to pick the other one, I get the following compiler error in g++: test.cpp: In instantiation of `foo_int_checker<A, 5>': test.cpp:40: instantiated from here test.cpp:32: error: invalid use of undefined type `class foo_int_checker<A, 5>' test.cpp:17: error: declaration of `class foo_int_checker<A, 5>' test.cpp:32: error: enumerator value for `value' not integer constant where line 32 is the enum { value = sizeof( test< _class >( 0 ) ) == sizeof( big ) }; line. Unfortunately this doesn't seem to help me diagnose the problem :(. MSVC++ gives a similar nondescript error: error C2770: invalid explicit template argument(s) for 'clarity::meta::big checker<_checked_type>::test(checker<_checked_type>::sfinae<_t,&_t::template foo<5>> *)' on the same line. What's strange is that if I get the address from a specific class and not a template parameter (i.e. rather than &_t::template foo< _n > I do &some_class::template foo< _n >) then I get the correct result, but then my checker class is limited to checking a single class (some_class) for the function. Also, if I do the following: template < typename _t, void (_t::*_f)() > void f0() { } template < typename _t > void f1() { f0< _t, &_t::template foo< 5 > >(); } and call f1< some_class >() then I DON'T get a compile error on &_t::template foo< 5 >. This suggests that the problem only arises when getting the address of a templated member function from a type that is itself a template parameter while in a SFINAE context. Argh!

    Read the article

  • How do I "Fire and forget" a WinForms Form?

    - by Neil Barnwell
    What's a good technique to create a WinForms Form instance, display it (non-modally) but not have to keep a reference around to it? Normally, as soon as the variable goes out of scope, the form is closed: var form = new SuperDuperForm(); form.Show(); // Form has probably been closed instantly I don't want to have to keep track of instances of the form, I want it so that when the user closes the form, it is disposed. One idea I've had that I'm going to implement is a kind of controller that I use to open and display forms, that will keep track of them and monitor when they are closed via callbacks. I'm just wondering if there are any neat tricks to get away without that. Any ideas?

    Read the article

  • Save/restore git/cvs checkout changes when switching branches?

    - by Dale Forester
    Using cvs, git or another technique (file system level?), I would like to: Make modifications on branch A Checkout branch B: Changes to branch A are "stowed away" (by name would be nice), branch B is checked out such that my branch A changes are gone Make modifications on branch B Checkout branch A: Changes to branch B are "stowed away" (by name would be nice), branch A is checked out such that my branch B changes are gone but now my "saved" branch A changes from Step #2 are back Git-stash does not appear to fit the flow I'm describing although my impression could be wrong. Techniques involving RCS's or file system or command-line tools or otherwise are welcome.

    Read the article

  • Prefered method for looping sound flash as3

    - by Brian Heylin
    Hi there, I'm having some issues with looping a sound in flash AS3, in that when I tell the sound to loop I get a slight delay at the end/beginning of the audio. The audio is clipped correctly and will play without a gap on garage band. I know that there are issues with sound in general in flash, bugs with encodings and the inaccuracies with the SOUND_COMPLETE event (And Adobe should be embarrassed with their handling of these issues) I have tried to use the built in loop argument in the play method on the Sound class and also react on the SOUND_COMPLETE event, but both cause a delay. But has anyone come up with a technique for looping a sound without any noticeable gap?

    Read the article

  • Computationally intensive scala process using actors hangs uncooperatively

    - by Chick Markley
    I have a computationally intensive scala application that hangs. By hangs I means it is sitting in the process stack using 1% CPU but does not respond to kill -QUIT nor can it be attached via jdb attach. Runs 2-12 hours at 800-900% CPU before it gets stuck The application is using ~10 scala.actors. Until now I have had great success with kill -QUIT but I am bit stumped as to how to proceed. The actors write a fair amount to stdout using println which is redirected to a text file but has not been helpful so far diagnostically. I am just hoping there is some obvious technique when kill -QUIT fails that I am ignorant of. Or just confirmation that having multiple actors println asynchronously is a real bad idea (though I've been doing it for a long time only recently with these results) Details scala 2.8.1 & 2.8.0 mac osx 10.6.5 java version "1.6.0_22" Thanks

    Read the article

  • Limit JavaScript and CSS files on ASP.NET MVC 2 Master Page based on Model and View content

    - by Zack Peterson
    I want to include certain .js and .css files only on pages that need them. For example, my EditorTemplate DateTime.ascx needs files anytimec.js and anytimec.css. That template is applied whenever I use either the EditorFor or EditorForModel helper methods in a view for a model with a DateTime type value. I've put this condition into the <head> section of my master page. It checks for a DateTime type property in the ModelMetadata. <% if (this.ViewData.ModelMetadata.Properties.Any(p => p.ModelType == typeof(DateTime))) { %> <link href="../../Content/anytimec.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/anytimec.js" type="text/javascript"></script> <% } %> This has two problems: Fails if I have nested child models of type DateTime Unnecessarily triggered by views without EditorFor or EditorForModel methods (example: DisplayForModel) How can I improve this technique?

    Read the article

  • A little bit more complicated multiview App for Iphone

    - by Thomas Losert
    Hi, i'm new to iphone development. I spend several days by looking for how write muliview app for an Iphone OS. I found how to switch the diferent views without navigation hierarchy (in this article). It's great, but i want more complicated function. For example, i have three diferent views (view 1 - 3) and i can switch between them with technique from link 1. It works fine. My question is: How can i put UITabBarController on view 2, that shows own subviews (tabView 1 - 3) and how put UINavigationController on view 3, that shows own subviews (navView 1 - 2)? The reslut should look like that, one main view (view 1) with two buttons (for example), which switch me to "window" with UiTabBarController or UINavigationController. I found only tutorials, where UITabBarController was a first controller class, that shows directly from AppDelegate (something like default Xcode predefined scenarios). Thanks for your helpfull answer, or i will be crazy soon:).

    Read the article

  • Mercurial How To Merge 2 Repositories that share a common ancestor but are not clones of the same re

    - by sylvanaar
    I am using hg-subversion, and I have 2 different hg repositories one from our svn trunk, and one from a branch of the trunk. I would like to link them somehow. At some point in the history both Hg repositories will be identical is there some way to join them? In other words is there a way to relate the repositories from within Hg? The technique I am currently using is to just export the second repository over top of the working copy of the revision they share, and then commit that working copy as a branch in Hg, but I lose the history this way. Any advice would be great

    Read the article

  • How to customize OOTB workflow emails

    - by Jeff
    How can I make simple format-type customizations to ALL OOTB workflow related emails? I have found that many pre-Sharepoint 2010 posts indicated that OOTB workflow emails are in fact 'alerts', and therefore OOTB workflow emails could be customized using the same technique which is: making a customized version of alerttemplates.xml and even using IAlertNotifyHandler to intercept all alert emails. However, it seems that OOTB workflow and workflow task emails are not affected by changes to my customalerttemplates.xml file (which I do follow with stsadm updatealerttemplates, iisreset, and timer service restart). This is what I used as a guide to customize alerts: http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/14/how-to-customizing-alert-emails-using-ialertnotificationhandler.aspx What am I missing? Is there a separate template for workflow emails? Can OOTB workflow emails be customized? Thanks! Jeff

    Read the article

  • Data mining logs to locate a bug

    - by gooli
    I'm working on a data distribution application which receives data from a source and distributes that data to multiple target application. After successfully distributing several messages each second for 8 days, it missed a single message and did not deliver it properly to the clients. As I was looking at the logs I tried to find something there that was special for the time the miss happend - either in the data, its rate or some other condition but couldn't find anything. Is there any data mining technique I can use to identify how that specific event differs from other events?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >