Search Results

Search found 5915 results on 237 pages for 'practices'.

Page 63/237 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Flowcharting tool/add-in for Visual Studio

    - by Rajah
    A 2 part question: Are flow-charts, as tool to analyze source-code, no longer considered useful? The reason I ask this question is that if you Google for source-code to flowchart tools for Visual Studio, there are no relevant results. Also, Microsoft does not seem to have a tool for this purpose. Are people just not using flowcharts that much any more? (I find them to be a great way to document complex logic in my code). Are there any VS tools that can take .Net (C#, VB.Net) code and convert it to a flowchart? (The only tool that I found is Aviosto's Visustin, which does not provide VS integration). Any other tools that you can recommend for this purpose?

    Read the article

  • linq2sql - where to enlist transaction (repository or bll)?

    - by Caroline Showden
    My app uses a business layer which calls a repository which uses linq to sql. I have an Item class that has an enum type property and an ItemDetail property. I need to implement a delete method that: (1) always delete the Item (2) if the item.type is XYZ and the ItemDetail is not null, delete the ItemDetail as well. My question is where should this logic be housed? If I have it in my business logic which I would prefer, this involves two separate repository calls, each of which uses a separate datacontext. I would have to wrap both calls is a System.Transaction which (in sql 2005) get promoted to a distributed transaction which is not ideal. I can move it all to a single repository call and the transaction will be handled implicitly by the datacontext but feel that this is really business logic so does not belong in the repository. Thoughts? Carrie

    Read the article

  • Give WPF design mode default objects

    - by Janko R
    In my application I have <Rectangle.Margin> <MultiBinding Converter="{StaticResource XYPosToThicknessConverter}"> <Binding Path="XPos"/> <Binding Path="YPos"/> </MultiBinding> </Rectangle.Margin> The Data Context is set during runtime. The application works, but the design window in VS does not show a preview but System.InvalidCastException. That’s why I added a default object in the XYPosToThicknessConverter which is ugly. class XYPosToThicknessConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { // stupid check to give the design window its default object. if (!(values[0] is IConvertible)) return new System.Windows.Thickness(3, 3, 0, 0); // useful code and exception throwing starts here // ... } } My Questions: What does VS/the process that builds the design window pass to XYPosToThicknessConverter and what is way to find it out by myself. How do I change my XAML code, so that the design window gets its default object and is this the best way to handle this problem? I’m using VS2010RC with Net4.0

    Read the article

  • "Collection was modified..." Issue

    - by Tyler Murry
    Hey guys, I've got a function that checks a list of objects to see if they've been clicked and fires the OnClick events accordingly. I believe the function is working correctly, however I'm having an issue: When I hook onto one of the OnClick events and remove and insert the element into a different position in the list (typical functionality for this program), I get the "Collection was modified..." error. I believe I understand what is going on: The function cycles through each object firing OnClick events where necessary An event is fired and the object changes places in the list per the hooked function An exception is thrown for modifying the collection while iterating through it My question is, how to do I allow the function to iterate through all the objects, fire the necessary events at the proper time and still give the user the option of manipulating the object's position in the list? Thanks, Tyler

    Read the article

  • Android Development Tips, Tricks & Gotchas

    - by Mat Nadrofsky
    I'm starting down the road of Android Development. At this point I'm looking for some insight from other developers who have been doing 'droid development and have some experience to share with someone who is just starting out. This can be anything from API to AVM to IDE. Any unexpected things come up while building your apps? Any tips for project layout or organization that help facilitate the deployment process to the Android AppStore? Any patterns which specifically helped in a particular situation? Even links to great blogs or sample apps and resources beyond those which you can grab from Google Code would be appreciated.

    Read the article

  • Working with jTempalte and objects

    - by Dejan.S
    EDITSolved the one object question I had at first Hi I'm using jTemplate for the first time. I been reading and it's not that hard to use it BUT I just found a examaple on one object use. <script type="text/html" id="TemplateREsultTable"> <div style="background-color: #ccc">{$T.Email}</div> <div style="background-color: #ddd">{$T.Password}</div> </script> One question about jTempaltes I got is what is better to do them in htm file or script? Another thought I got, is jTemplate the way to go?

    Read the article

  • Dynamic find methods Vs conditional statements

    - by piemesons
    Student.find(:all, :conditions => [‘name = ? and status = ?’ ‘mohit’, 1]) Vs Student.find_all_by_name_and_status(‘mohit’, 1) Both the queries will result the same set of row but first one is preferable cause in the second way there will be exception generated method_missing and then rails will try to relate it as dynamic method. if fine then result set to returned. Can any body explain me this in a good manner. What exactly is happening behind the screen. Please correct me if i am wrong.

    Read the article

  • Worse is better. Is there an example?

    - by J.F. Sebastian
    Is there a widely-used algorithm that has time complexity worse than that of another known algorithm but it is a better choice in all practical situations (worse complexity but better otherwise)? An acceptable answer might be in a form: There are algorithms A and B that have O(N**2) and O(N) time complexity correspondingly, but B has such a big constant that it has no advantages over A for inputs less then a number of atoms in the Universe. Examples highlights from the answers: Simplex algorithm -- worst-case is exponential time -- vs. known polynomial-time algorithms for convex optimization problems. A naive median of medians algorithm -- worst-case O(N**2) vs. known O(N) algorithm. Backtracking regex engines -- worst-case exponential vs. O(N) Thompson NFA -based engines. All these examples exploit worst-case vs. average scenarios. Are there examples that do not rely on the difference between the worst case vs. average case scenario? Related: The Rise of ``Worse is Better''. (For the purpose of this question the "Worse is Better" phrase is used in a narrower (namely -- algorithmic time-complexity) sense than in the article) Python's Design Philosophy: The ABC group strived for perfection. For example, they used tree-based data structure algorithms that were proven to be optimal for asymptotically large collections (but were not so great for small collections). This example would be the answer if there were no computers capable of storing these large collections (in other words large is not large enough in this case). Coppersmith–Winograd algorithm for square matrix multiplication is a good example (it is the fastest (2008) but it is inferior to worse algorithms). Any others? From the wikipedia article: "It is not used in practice because it only provides an advantage for matrices so large that they cannot be processed by modern hardware (Robinson 2005)."

    Read the article

  • Using ThreadPool.QueueUserWorkItem in ASP.NET in a high traffic scenario

    - by Michael Hart
    I've always been under the impression that using the ThreadPool for (let's say non-critical) short-lived background tasks was considered best practice, even in ASP.NET, but then I came across this article that seems to suggest otherwise - the argument being that you should leave the ThreadPool to deal with ASP.NET related requests. So here's how I've been doing small asynchronous tasks so far: ThreadPool.QueueUserWorkItem(s => PostLog(logEvent)) And the article is suggesting instead to create a thread explicitly, similar to: new Thread(() => PostLog(logEvent)){ IsBackground = true }.Start() The first method has the advantage of being managed and bounded, but there's the potential (if the article is correct) that the background tasks are then vying for threads with ASP.NET request-handlers. The second method frees up the ThreadPool, but at the cost of being unbounded and thus potentially using up too many resources. So my question is, is the advice in the article correct? If your site was getting so much traffic that your ThreadPool was getting full, then is it better to go out-of-band, or would a full ThreadPool imply that you're getting to the limit of your resources anyway, in which case you shouldn't be trying to start your own threads? Clarification: I'm just asking in the scope of small non-critical asynchronous tasks (eg, remote logging), not expensive work items that would require a separate process (in these cases I agree you'll need a more robust solution).

    Read the article

  • like exec command in silverlight(save and load properties of Elements dynamically)

    - by Meysam Javadi
    i have some element in my container and want to save all properties of this elements. i list this element by VisualTreeHelper and save its attributes in DB, question is that how to retrieve this properties and affect them? i think that The Silverlight have some statement that behave like Exec in Sql-Server. i save properties in one line that delimited by semicolon.(if you have any suggestion ,appreciate) Edit: suppose this scenario: End-User choose a tool from Mytoolbox(a container like Grid) ,a dialog shown its properties for creation and finally draw Grid . in resumption he/she choose one element(like Button) and drop it on one of the grid's cell. now i want to save workspace that he/she created! My RootLayout have one container control so any of element are child of this.HERETOFORE i want create one string that contain all general properties(not all of them) and save to DB, and when i load this control, i create an element by the type that i saved and affect it by the properties that i saved; with something like EXEC command. is this possible ? have you new approach for this scenario(Guide me with example please).

    Read the article

  • EJB3 Business Delegates

    - by mykola
    Is there any reason for making delegate when using EJB3? Because the only real benefit i see from delegate is that it allows to hide lookup and access details of EJB architecture. Well it also provides some decoupling but it's mostly unused, imho. With EJB3 we have injection so now i can just create a variable with @EJB annotation and use it as is. Do i still need delegates? Is this injection resource consuming? I mean if i use it in JSF's request managed beans may be it's still better to use delegates just to lessen these injection calls? Thank you!

    Read the article

  • Suggestions on bug lifecycle and release management

    - by Andrew Edgecombe
    Our group is currently analysing our procedures for managing formal software releases and integrating with a bug lifecycle. What bug lifecycle model do you use? And why? For example assume a that formal releases are generated for QA once per week. At what point do you mark bugs as resolved? When the developer has committed their changes? When the changes have been reviewed and merged into the release branch? When the formal release candidate has been created? And what process, or features of your bug tracking sofware, do you use for tracking this? Are there any tips/suggestions/recommendations that you can share?

    Read the article

  • How to show validation messages in MVC?

    - by Ian Boyd
    When a user tries to click:        Save and they have entered in some invalid data, i want to notify them. This can be with methods such as: directing their attention to the thing that needs their attention with a balloon hint automatically dropping down a combo-box triggering an animation showing a modal dialog box etc What is the mechanism where a controller tells the view to show a validation message for some controls, given that different views have different notification methods? p.s. the controller doesn't know the order that controls are physically arranged in the view (e.g. LTR locale wants to notify the user in a top-down-left-to-right visual order, while RTL locale wants to notify the user in a bottom-up-right-to-left order)

    Read the article

  • To Ajax or Not to Ajax a listing page

    - by kaivalya
    Here i am talking about product listing pages where there are multiple filters that filter the list of products appearing on the page like product types, categories price range etc. I have done such pages using both ajax and no ajax way in the past. What I like about using ajax in such page is that, when filters are selected I only update the section that contains the product list. There is no need to refresh the whole page which could end up re-loading the images on top bar, banners etc and slow down the user performance. Ajax way in my opinion becomes more compact and responsive from user experience. Down side for ajax route for me is; since filter states are not maintained in the URL I end up maintaining them on the server. This becomes complicated if I want to handle multi window scenarios and it is also costly to maintain such state on server memory for each session. Not using ajax and simply keeping all filter values on url and refreshing the page is quite simple but the luxury of refreshing only the pane that really needs to be refreshed is lost. Lately I am seeing a lot of large scale e-commerce sites that are using non-ajax approach on their listing pages and this is making me question one more time if it might be more efficient to build non-ajax listing make due to the long term maintenance ease and sacrifice a little bit from user experience. I am about to start implementing a new listing page for a product which I have the flexibility to go either way and I would appreciate your inputs.

    Read the article

  • Databinding in WinForms performing async data import

    - by burnside
    I have a scenario where I have a collection of objects bound to a datagrid in winforms. If a user drags and drops an item on to the grid, I need to add a placeholder row into the grid and kick off a lengthy async import process. I need to communicate the status of the async import process back to the UI, updating the row in the grid and have the UI remain responsive to allow the user to edit the other rows. What's the best practice for doing this? My current solution is: binding a thread safe implementation of BindingList to the grid, filled with the objects that are displayed as rows in the grid. When a user drags and drops an item on to the grid, I create a new object containing the sparse info obtained from the dropped item and add that to the BindingList, disabling the editing of that row. I then fire off a separate thread to do the import, passing it the newly bound object I have just created to fill with data. The import process, periodically sets the status of the object and fires an event which is subscribed to by the UI telling it to refresh the grid to see the new properties on the object. Should I be passing the same object that is bound to the grid to the import process thread to operate on, or should I be creating a copy and merging back the changes to the object on the UI thread using BeginInvoke? Any problems or advice with this implementation? Thanks

    Read the article

  • Best way to define an immutable class in Objective C

    - by Patrick Marty
    Hi, I am a newbie in Objective C and I was wondering what is the best way to define an immutable class in Objective-C (like NSString for example). I want to know what are the basic rules one has to follow to make a class immutable. I think that : setters shouldn't be provided if properties are used, they should be readonly accessInstanceVariablesDirectly must be override and return NO Did I forget something ? Thanks

    Read the article

  • App_Code in Web Client Software Factory, Is it a good idea.

    - by Blithe
    Hi guys, Just want to hear some opinion on adding App_Code in Web Client Software Factory (WCSF) project. The main purpose is to put reusable UI rendering codes which can be use by various pages. For WCSF, I guess only controller can share across pages within a module which does not seems to be a good place for UI stuff. Suggestions? :)

    Read the article

  • Concrete Types or Interfaces for return types?

    - by SDReyes
    Today I came to a fundamental paradox of the object programming style, concrete types or interfaces. Whats the better election for a method's return type: a concrete type or an interface? In most cases, I tend to use concrete types as the return type for methods. because I believe that an concrete type is more flexible for further use and exposes more functionality. The dark side of this: Coupling. The angelic one: A concrete type contains per-se the interface you would going to return initially, and extra functionality. What's your thumb's rule? Is there any programming principle for this? BONUS: This is an example of what I mean http://stackoverflow.com/questions/491375/readonlycollection-or-ienumerable-for-exposing-member-collections

    Read the article

  • Throw exception from initializer list

    - by aaa
    hello. what is the best way to throw exception from initializer list? for example: class C { T0 t0; // can be either valid or invalid, but does not throw directly T1 t1; // heavy object, do not construct if t0 is invalid, by throwing before C(int n) : t0(n), // throw exception if t0(n) is not valid t1() {} }; I thought maybe making wrapper, e.g. t0(throw_if_invalid(n)). What is the practice to handle such cases? Thanks

    Read the article

  • Biggest GWT Pitfalls?

    - by agartzke
    I'm at the beginning/middle of a project that we chose to implement using GWT. Has anyone encountered any major pitfalls in using GWT (and GWT-EXT) that were unable to be overcome? How about from a performance perspective? A couple things that we've seen/heard already include: Google not being able to index content CSS and styling in general seems to be a bit flaky Looking for any additional feedback on these items as well. Thanks!

    Read the article

  • Prevent checkins to SVN

    - by Joseph Mastey
    My team uses SVN for our software platform, and we create tags periodically to help keep module versions straight. Best practice, as I understand it, is not to modify a tag once it has been created. However, it seems that sometimes the temptation is too great and a modification is made to one of the tags. Is there a way to prevent these kinds of checkins, or at least make them a complete pain so that we can discourage them automatically? Thanks, Joe

    Read the article

  • StarTeam trunk.

    - by Nix
    I have the unfortunate opportunity of source control via Borland's StarTeam. It unfortunately does very few things well, and one supreme weakness is its view management. I love SVN and come from an SVN mindset. Our issue is post production release we are spending countless hours merging changes into a "production support" environment. Please do not harass me this was not my doing, I inherited it and am trying to present a better way of managing the repository. It is not an option to switch to a different SCM tool. Current setup Product.1.0 (TRUNK, current production code, and at this level are pending bug fixes) Product.2.0(true trunk anything checked in gets tested, and then released next production cycle, a lot of changes occur in this view) My proposal is going to be to swap them, have all development be done on the trunk (Production), tag on releases, and as needed create child views to represent production support bug fixes. Production Production.2.0.SP.1 I can not find any documentation to support the above proposal so I am trying to get feedback on whether or not the change is a good idea and if there is anything you would recommend doing differently.

    Read the article

  • I've Heard Global Variables Are Bad, What Alternative Solution Should I Use?

    - by Jay
    I've read all over the place that global variables are bad and alternatives should be used. In Javascript specifically, what solution should I choose. I'm thinking of a function, that when fed two arguments (function globalVariables(Variable,Value)) looks if Variable exists in a local array and if it does set it's value to Value, else, Variable and Value are appended. If the function is called without arguments (function globalVariables()) it returns the array. Perhaps if the function is fired with just one argument (function globalVariables(Variable)) it returns the value of Variable in the array. What do you think? I'd like to hear your alternative solutions and arguments for using global variables.

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >