Search Results

Search found 31207 results on 1249 pages for 'atg best practice in industries'.

Page 107/1249 | < Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >

  • Converting a constantly changing scalar value to a changing interval or frequency

    - by eco_bach
    Although I'm coding in Objective C, this is more of a general programming question. What is the best way to convert a constantly changing scalar value to a changing interval or frequency? Right now every time the scalar value changes I am destroying the NSInterval ie [self.myTimer invalidate]; self.myTimer = nil; and creating a new one, but this seems like a VERY expensive way to achieve my goal, since the changing scalar value in my case represents the horizontal velocity of a swipe. For a rough analogy, think of the speed of a swipe being reflected in a visual metronome, the faster you swipe, the higher(shorter interval) the frequency of the metronome.

    Read the article

  • Unit testing huge applications - Proven methodologies?

    - by NLV
    Hello members I've been working in windows forms applications and ASP.Net applications for the past 10 months. I've always wondered how to perform proper unit testing on the complete application in a robust manner covering all the scenarios. I've the following questions regarding them - What are the standard mechanisms in performing unit testing and writing test cases? Does the methodologies change based on the application nature such as Windows Forms, Web applications etc? What is the best approach to make sure we cover all the scenarios? Any popular books on this? Popular tools for performing unit testing?

    Read the article

  • SQL Server: Mitigating schema changes/upgrades

    - by bradhe
    I haven't spent a ton of time researching this yet, mostly looking for best practices on upgrading/changing DB schemas. We're actively developing a new product and as such we often have additions or changes to our DB schema. We also have many copies of the DB -- one for the test environment, one for the prod environment, dev environments, you name it. We don't really want to have to blow away test data every time we want to make a change to the DB. Are there good ways of automating this or handling this? None of us have really ever had to deal with this so...

    Read the article

  • How do you handle passwords or credentials for standalone applications?

    - by Abel Morelos
    Let's say that you have a standalone application (a Java application in my case) and that this application has a configuration file (a XML file in my case) where you store the credentials (user and password) for a bunch of databases you need to connect. Everything works great, but now you discover (or your are given a new requirement like me) that you have to put this application in a different server and that you can't have these credentials in the configuration files because of security and/or compliance considerations. I'm considering to use data sources hosted in the application server (a WAS server), but I think this could have poor performance and maybe it's not the best approach since I'm connecting from a standalone application. I was also considering to use some sort of encryption, but I would like to keep things as simple as possible. How would you handle this case? Where would you put these credentials or protect them from being compromised? Or how would you connect to your databases in this scenario?

    Read the article

  • ArgumentException or ArgumentNullException for string parameters?

    - by Anna Lear
    Far as best practices are concerned, which is better: public void SomeMethod(string str) { if(string.IsNullOrEmpty(str)) { throw new ArgumentException("str cannot be null or empty."); } // do other stuff } or public void SomeMethod(string str) { if(str == null) { throw new ArgumentNullException("str"); } if(str == string.Empty) { throw new ArgumentException("str cannot be empty."); } // do other stuff } The second version seems more precise, but also more cumbersome than the first. I usually go with #1, but figured I'd check if there's an argument to be made for #2.

    Read the article

  • Sharing a database connection with included classes in a Sinatra application

    - by imightbeinatree
    I'm converting a part of a rails application to its own sinatra application. It has some beefy work to do and rather than have a million helps in app.rb, I've separated some of it out into classes. Without access to rails I'm rewriting finder several methods and needing access to the database inside of my class. What's the best way to share a database connection between your application and a class? Or would you recommend pushing all database work into its own class and only having the connection established there? Here is what I have in in app.rb require 'lib/myclass' configure :production do MysqlDB = Sequel.connect('mysql://user:password@host:port/db_name') end I want to access it in lib/myclass.rb class Myclass def self.find_by_domain_and_stub(domain, stub) # want to do a query here end end I've tried several things but nothing that seems to work well enough to even include as an example.

    Read the article

  • Is it a good idea to keep documentation in the VCS?

    - by Jj
    At work we just moved to Mercurial for our VCS from SVN. In SVN we used to have a "docs" folder next to "trunk", in "docs" we would keep all our file documentation, client files, diagrams, mockups, etc. (we use a wiki(Redmine) for internal documentation). Now in a DVCS enviroment we don't need a "trunk" folder, so we drop the code at the root of the repo, and now having a "docs" folder inside the repo feels weird being at the same level that the code. This has taken me to reconsider if it is a good idea to keep those files in the VCS, we have a "documents" section in Redmine, but I have never used it because it is a pain to have to download a file each time I want to open it and I can't access the file when I'm offline. What best practices have you guys found to manage these kind of non-code files?

    Read the article

  • Debugging a Browser Redirect Loop

    - by just_wes
    Hi all, I am using CakePHP with the Auth and ACL components. My page loads fine for non-registered users, but if I try to log in as a registered user I get an infinite redirect loop in the browser. I am sure that this is some sort of permissions problem, but the problem exists even for users who have permissions for everything. The only way to prevent this behavior is to allow '*' in my AppController's beforeFilter method. What is the best way to debug this sort of problem? Thanks!

    Read the article

  • Should HTTP POST be discouraged?

    - by Tomas Sedovic
    Quoting from the CouchDB documentation: It is recommended that you avoid POST when possible, because proxies and other network intermediaries will occasionally resend POST requests, which can result in duplicate document creation. To my understanding, this should not be happening on the protocol level (a confused user armed with a doubleclick is a completely different story). What is the best course of action, then? Should we really try to avoid POST requests and replace them by PUT? I don't like that as they convey a different meaning. Should we anticipate this and protect the requests by unique IDs where we want to avoid accidental duplication? I don't like that either: it complicates the code and prevents situations where multiple identical posts may be desired.

    Read the article

  • Decimal rounding strategies in enterprise applications

    - by Sapphire
    Well, I am wondering about a thing with rounding decimals, and storing them in DB. Problem is like this: Let's say we have a customer and a invoice. The invoice has total price of $100.495 (due to some discount percentage which is not integer number), but it is shown as $100.50 (when rounded, just for print on invoice). It is stored in the DB with the price of $100.495, which means that when customer makes a deposit of $100.50 it will have $0.005 extra on the account. If this is rounded, it will appear as $0, but after couple of invoices it would keep accumulating, which would appear wrong (although it actually is not). What is best to do in this case. Store the value of $100.50, or leave everything as-is?

    Read the article

  • In .NET which loop runs faster for or foreach

    - by Binoj Antony
    In c#/VB.NET/.NET which loop runs faster for or foreach? Ever since I read that for loop works faster than foreach a long time ago I assumed it stood true for all collections, generic collection all arrays etc. I scoured google and found few articles but most of them are inconclusive (read comments on the articles) and open ended. What would be ideal is to have each scenarios listed and the best solution for the same e.g: (just example of how it should be) for iterating an array of 1000+ strings - for is better than foreach for iterating over IList (non generic) strings - foreach is better than for Few references found on the web for the same: Original grand old article by Emmanuel Schanzer CodeProject FOREACH Vs. FOR Blog - To foreach or not to foreach that is the question asp.net forum - NET 1.1 C# for vs foreach [Edit] Apart from the readability aspect of it I am really interested in facts and figures, there are applications where the last mile of performance optimization squeezed do matter.

    Read the article

  • TFS Automated Builds to Code Packages

    - by Adam Jenkin
    I would like to hear the best practices or know how people perform the following task in TFS 2008. I am intending on using TFS for building and storing web applications projects. Sometimes these projects can contain 100's of files (*.cs, *.acsx etc) During the lifetime of the website, a small bug will get raised resulting in say a stylesheet change, and a change to default.aspx.cs for example. On checking in these changes to TFS, and automated build would be triggered (great!), however for deploying the changes to the target production machine, I only need to deploy for example: style.css default.asx MyWebApplications.dll So my question is, can MSBuild be customized to generate a "code pack" of only the files which require deploying to the production server based on the changeset which cause the re-build?

    Read the article

  • PHP explode and set to empty string the missing pieces

    - by Marco Demaio
    What's the best way to accomplish the following. I have strings in this format: $s1 = "name1|type1"; //(pipe is the separator) $s2 = "name2|type2"; $s3 = "name3"; //(in some of them type can be missing) Let's assume namen/typen are strings and they can not contain a pipe. Since I need to exctract the name/type separetly, I do: $temp = explode($s1, '|'); $name = $temp[0]; $type = ( isset($temp[1]) ? $temp[1] : '' ); Is there an easier (smarter whatever faster) way to do this without having to do isset($temp[1]) or count($temp). Thanks!

    Read the article

  • Books/resources on authentication and authorization in layered applications

    - by Tommy Jakobsen
    I've been trying to find resources and guidelines for implementing authentication and authorization in multiple layered architectures (C#), but haven't found any "best practices" or patterns to use. And I figured, that there must be some patterns for this, as it is a pretty important area? The application that we're developing, is layered traditionally, having data layer (Entity Framework 4) repositories domain layer service layer (can be WCF, with data transfer objects) multiple clients consuming the WCF service (ASP.NET [MVC], Silverlight, WPF) and clients accessing a service layer directly (no WCF) Are there books/articles/blogs that dig deeply into this area? Primarily about authorization such as handling multiple roles and attributes attached to users). It doesn’t have to be specific for the .NET Framework, but it would be preferred.

    Read the article

  • User controlled html title tags

    - by zaf
    What are the best practices for allowing a user to maintain the html title tags of all the major pages of his/her site? One way could be to allow the mapping of URLs to some text. For example, we have an app with the following (most complex) url format: http://lang.example.com/searchpage.zaf?a=foo&b=bar&c=RANDOM There are several parts to this: Language sub domain Search page Static parameter 'a' (user may want this in the title) Dynamic and relevant parameter 'b' (user may want this in the title) Dynamic parameter 'c' which can be ignored Never done this before, so I'm asking how you would tackle this!

    Read the article

  • Global Exception Handlers in Java

    - by Samuh
    I am thinking of setting up a global, default Exception handler for my (Android) Mobile application(which uses Java syntax) using Thread.setDefaultUncaughtExceptionHandler(...) call. I am thinking of just displaying an Alert Dialog with appropriate message to the user. Are there any gotchas, caveats and rules that one needs to follow when setting DefaultExceptionHandlers? Any best practices like making sure that the process is killed, full stack trace is written to logs etc. ? Links to documentation, tutorials etc. that can throw some light on this are welcome. Thanks.

    Read the article

  • Where's the definitive resource online about how to carry out Agile development?

    - by jdk
    I want to start Agile practices in a team. I'm assuming the information is available for free online about how to specifically carry it out. Online I can locate the manifesto, the alliances and corporations involved but where is the actual central guide or root instruction set about how to do it? (Maybe the practices themselves are more ethereal or subjective than I expect and it's found in multiple places?) Edit to summarize solutions: Agile is a concept so that's what's to be found online about it. However specific processes or methods of Agile development have been created like Scrum and Extreme programming to provide concrete solutions to teams who want to adopt Agile and reap its proposed benefits. Find the shoe (or method) that fits best. Maybe create it. If looking for solutions online to implement Agile development in your organization or for your project, seek out the specific methods too and decide among them.

    Read the article

  • Advanced text search in actionscript-return ALL nouns,adjectives and verbs..

    - by eco_bach
    Hi I know that as3 has some powerful new text search capabilities, especially when combined with regex. I don't even know if this is possible, but I would like to somehow, search any block of text, and return all nouns, adjectives and verbs. What would be the best(most efficent) way to do this? Is regex an option? or would I have to load in some sort of open sourced dictionary 9as used in spellcheckers) to compare with or?? After, I've pulled all the nouns, adjectives and verbs, I need to count and prioritize by their frequency. Any suggestions welcome...

    Read the article

  • Is there a class like a Dictionary without a Value template? Is HashSet<T> the correct answer?

    - by myotherme
    I have 3 tables: Foos, Bars and FooBarConfirmations I want to have a in-memory list of FooBarConfirmations by their hash: FooID BarID Hash 1 1 1_1 2 1 2_1 1 2 1_2 2 2 2_2 What would be the best Class to use to store this type of structure in-memory, so that I can quickly check to see if a combination exists like so: list.Contains("1_2"); I can do this with Dictionary<string,anything>, but it "feels" wrong. HashSet looks like the right tool for the job, but does it use some form of hashing algorithm in the background to do the lookups efficiently?

    Read the article

  • How do you handle multiple (overlapping) projects in trac?

    - by Oliver Giesen
    We are using trac and are really satisfied with it. However, out of the box, trac is best suited for single-project environments only. I'd be interested to hear about the various approaches people take to make it work with multiple projects nevertheless and their experiences with them. Are there any plugins to recommend? Any patches, tweaks or whatnots? Are you maybe even using an entirely different bug-tracking system that offers all of trac's functionality plus multi-project support? We recently started managing a second project ourselves which generally works okay but also has some drawbacks, especially where the two projects overlap because of common library code we wrote that is used in both projects. How do you handle this? (I'll attach our own current approach as an answer to this post.)

    Read the article

  • How do I write a Java text file viewer for big log files

    - by Hannes de Jager
    I am working on a software product with an integrated log file viewer. Problem is, its slow and unstable for really large files because it reads the whole file into memory when you view a log file. I'm wanting to write a new log file viewer that addresses this problem. What are the best practices for writing viewers for large text files? How does editors like notepad++ and VIM acomplish this? I was thinking of using a buffered Bi-directional text stream reader together with Java's TableModel. Am I thinking along the right lines and are such stream implementations available for Java?

    Read the article

  • Better to extend a class or modify it directly?

    - by primehunter326
    Hi, So I'm working on creating a visualization for a data structure in Java. I already have the implementation of the data structure (Binary Search Tree) to start with, but I need to add some additional functionality to the included node class. As far as conventions and best practices are concerned, should I create a subclass of the node with this added functionality or should I just modify what I have and document it there? My question is similar to what's asked here but that's a little over my head. I know it probably doesn't matter much for what I'm doing, so I'm asking this more as a general thing.

    Read the article

  • Using function arguments as local variables

    - by Rubys
    Something like this (yes, this doesn't deal with some edge cases - that's not the point): int CountDigits(int num) { int count = 1; while (num >= 10) { count++; num /= 10; } return count; } What's your opinion about this? That is, using function arguments as local variables. Both are placed on the stack, and pretty much identical performance wise, I'm wondering about the best-practices aspects of this. I feel like an idiot when I add an additional and quite redundant line to that function consisting of int numCopy = num, however it does bug me. What do you think? Should this be avoided?

    Read the article

  • Forward a call to a webservice to another webservice?

    - by Luhmann
    If I have an https webservice behind a firewall on a machine (A) that I cannot access, but access to a machine on the same network (B), from where I can call the webservice on machine A. What is the best way of talking with the webservice on machine A, from the outside via machine B (that I access via VPN)? I can obviously create a service with a matching interface on machine B, and call the methods on the webservice on machine A, and return the result. But I fear for the overhead. Is there another way? Can i somehow forward the request?

    Read the article

  • Modern way to validate POST-data in MVC 2

    - by zerkms
    There are a lot of articles devoted to working with data in MVC, and nothing about MVC 2. So my question is: what is the proper way to handle POST-query and validate it. Assume we have 2 actions. Both of them operates over the same entity, but each action has it's own separated set of object properties that should be bound in automatic manner. For example: Action "A" should bind only "Name" property of object, taken from POST-request Action "B" should bind only "Date" property of object, taken from POST-request As far as I understand - we cannot use Bind attribute in this case. So - what are the best practices in MVC2 to handle POST-data and probably validate it.

    Read the article

< Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >