Search Results

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

Page 200/237 | < Previous Page | 196 197 198 199 200 201 202 203 204 205 206 207  | Next Page >

  • Guice child injector override binding

    - by Roman
    Hi All I am trying to to override a binding in a child injector that was already configured in a base injector. like that : public class PersistenceModule extends Abstract{ @Override protected void configure() { bind(IProductPersistenceHelper.class).to(ProductPersistenceHelper.class); } } then : Injector injector = Guice.createInjector(new PersistenceModule()); injector.createChildInjector(new AbstractModule(){ @Override protected void configure() { bind(IProductPersistenceHelper.class).to(MockProductPersistenceHelper.class); } }) Guice is complaining that it has already a binding for that. Are there any patterns or best practices for that problem ?

    Read the article

  • Preparing for the next C++ standard

    - by Neil Butterworth
    The spate of questions regarding BOOST_FOREACH prompts me to ask users of the Boost library what (if anything) they are doing to prepare their code for portability to the proposed new C++ standard (aka C++0x). For example, do you write code like this if you use shared_ptr: #ifdef CPPOX #include <memory> #else #include "boost/shared_ptr.hpp" #endif There is also the namespace issue - in the future, shared_ptr will be part of the std, namespace - how do you deal with that? I'm interested in these questions because I've decided to bite the bullet and start learning boost seriously, and I'd like to use best practices in my code. Not exactly a flood of answers - does this mean it's a non-issue? Anyway, thanks to those that replied; I'm accepting jalfs answer because I like being advised to do nothing!

    Read the article

  • Preventing entire JOINed MYSQL query from failing when one field is missing within a WHERE clause

    - by filip o
    I am doing a couple of joins with a variable in the WHERE clause. I'm not sure if I am doing everything as efficiently as I could, or even using the best practices but my issue is that half my tables have data for when tableC.type=500, and the other half don't resulting in the entire query failing. SELECT tableA.value1 , tableB.value2, tableC.value3 FROM tableA JOIN tableB ON tableB.id=tableA.id JOIN tableC ON tableC.id=tableB.id WHERE tableA.category=$var && tableC.type=500; What I would like to happen is to still get tableA.value1 and tableB.value2 even if there is no field in tableC with a type=500. any thoughts? i'm totally stumped as how to approach this...

    Read the article

  • How painful is a django project deployment to a live (staging) site?

    - by Ignacio
    Hi, I've getting quite fast with a small django project of mine, which I'm developing locally, of course. But, as I had never worked with django before, I'm not aware of what it implies to upload it and test it on a production server. And I'm quite curious, since I'm very eager to test an early release live. I know there is this document, which I think it'll be really helpful: http://djangobook.com/en/2.0/chapter12/ But, are there any details I should take into account before, during and after the deployment? Any advice or best practices? Thanks.

    Read the article

  • Optimizing PHP code (trying to determine min/max/between case)

    - by Swizzh
    I know this code-bit does not conform very much to best coding practices, and was looking to improve it, any ideas? if ($query['date_min'] != _get_date_today()) $mode_min = true; if ($query['date_max'] != _get_date_today()) $mode_max = true; if ($mode_max && $mode_min) $mode = "between"; elseif ($mode_max && !$mode_min) $mode = "max"; elseif (!$mode_max && $mode_min) $mode = "min"; else return; if ($mode == "min" || $mode == "between") { $command_min = "A"; } if ($mode == "max" || $mode == "between") { $command_max = "B"; } if ($mode == "between") { $command = $command_min . " AND " . $command_max; } else { if ($mode == "min") $command = $command_min; if ($mode == "max") $command = $command_max; } echo $command;

    Read the article

  • Best Design Pattern to Implement while Mapping Actions in MVC

    - by FidEliO
    What could be the best practices of writing the following case: We have a controller which based on what paths users take, take different actions. For example: if user chooses the path /path1/hello it will say hello. If a user chooses /path1/bye?name="Philipp" it will invoke sayGoodBye() and etc. I have written a switch statement inside the controller which is simple, however IMO not efficient. What are the best way to implement this, considering that paths are generally String. private void takeAction() { switch (path[1]) { case "hello": //sayHello(); break; case "bye": //sayBye(); break; case "case3": //Blah(); break; ... } }

    Read the article

  • First html5 website, see any mistakes?

    - by noxxten
    http://dl.dropbox.com/u/921159/designgoods/index.html I've made my first html5 website by converting another blog theme I had. It's actually a pretty sloppy job since its a learning experience and all. I know some files (like favicons and some scripts) are useless/not linked, but seeing as this is a test I won't bother creating them. But do you see any mistakes I made? Any 'better practices' to point out? :) Any C&C is very welcome and appreciated!

    Read the article

  • I'm a PHP programmer, how easy will it be to "master" c++?

    - by ThinkingInBits
    I've been a PHP programmer for 8 or so years, I'm familiar with OOP and try to consider best practices whenever programming. I would like to pick up C++ to possibly enter the 'game development' field, where now I'm doing web dev. I'm not a school person, but was wondering what people think about self-taught math to complement learning c++ for game dev. The last math course I took was algebra 2. Should I start delving myself into pre-calculus? Are there any other suggestions you may have to ease the process?

    Read the article

  • Deploying locally compiled binaries on server

    - by nano
    Hi, I have a Zen based VPS server that runs on a dual-core AMD Opteron 64-bit machine. I have some locally developed C++ based daemons that I would want to deploy in that machine. My local machine is an Intel core 2 duo laptop. Can I execute binaries compiled from source code on my machine directly on the above mentioned server? I am a newbie in this area. Would be great if someone could throw light on the standard practices in this kind of situation. Thanks in advance

    Read the article

  • Maintaining traceability up-to-date as project evolves

    - by Catalin Piti?
    During various projects, I needed to make sure that the use case model I developed during the analysis phase is covering the requirements of the project. For that, I was able to have some degree of traceability between requirement statements (uniquely identified) and use cases (also uniquely identified). In some cases, enabling traceability implied some additional effort that I considered (and later proved) to be a good investment. Now, the biggest problem I faced was to maintain this traceability later, when things started to change (as a result of change requests, or as a result of use case changes). Any ideas of best practices for traceability maintenance? (It can apply to other items in the project - e.g. use cases and test cases, or requirements and acceptance test cases) Later edit Tools might help, but they can't detect gaps or errors in traceability. Navigation... maybe, but no warranty that the traceability is up-to-date or correct after applying the changes.

    Read the article

  • What is the Sql Server equivalent for Oracle's DBMS_ASSERT?

    - by dotNetYum
    DBMS_ASSERT is one of the keys to prevent SQL injection attacks in Oracle. I tried a cursory search...is there any SQL Server 2005/2008 equivalent for this functionality? I am looking for a specific implementation that has a counterpart of all the respective Oracle package members of DBMS_ASSERT. NOOP SIMPLE_SQL_NAME QUALIFIED_SQL_NAME SCHEMA_NAME I know the best-practices of preventing injection...bind variables...being one of them. But,in this question I am specifically looking for a good way to sanitize input...in scenarios where bind-variables were not used. Do you have any specific implemetations? Is there a library that actually is a SQL Server Port of the Oracle package?

    Read the article

  • How to Audit Database Activity without Performance and Scalability Issues?

    - by GotoError
    I have a need to do auditing all database activity regardless of whether it came from application or someone issuing some sql via other means. So the auditing must be done at the database level. The database in question is Oracle. I looked at doing it via Triggers and also via something called Fine Grained Auditing that Oracle provides. In both cases, we turned on auditing on specific tables and specific columns. However, we found that Performance really sucks when we use either of these methods. Since auditing is an absolute must due to regulations placed around data privacy, I am wondering what is best way to do this without significant performance degradations. If someone has Oracle specific experience with this, it will be helpful but if not just general practices around database activity auditing will be okay as well.

    Read the article

  • How to self-update PHP+MySQL CMS?

    - by SaltLake
    I'm writing a CMS on PHP+MySQL. I want it to be self-updatable (throw one click in admin panel). What are the best practices? How to compare current version of cms and a version of the update (application itself and database). Should it just download zip archive, upzip it and overwrite files? (but what to do with files that are no longer used). How to check if an update is downloaded correctly? Also it supports modules and I want this modules to be downloadable from the admin panel of cms. And how should I update MySQL tables?

    Read the article

  • Best practice for autoupdates

    - by ravi
    For desktop based applications, what are best practices to perform auto updates? Currently, we download all files, then copy and register (if com dll) to their respective directories. I looked at Google Chrome update method. It seems that it first downloads a zipped file into a directory, and then unzips all the files. Also, they have a setup application which seems to be used to do the update. Additionally, they create a directory mapped to update version like 1.0.154.43, but they keep the old version's directory.

    Read the article

  • Sharepoint Web performance optimization

    - by hertzel
    We are running on SSL on following server topology: 1 ISA (SSL Terminate/cache/proxy+AD authentication) 1 Sharepoint 1 IBM DB2 Database as enterprise/corporate DB 1 MS SQL Server as local DB We have recently optimized the caching, compression, minification, and other ASP.net best practices such as viewstate and cookie sizes, minimizing round trips, parallel connections/domain sharding and a lot more.... Now we are not convinced that the we are in an optimized position as the network resources i.e. bandwidth and especially latency are out of our control!! The client/browser to server/sharepoint is trans-Atlantic i.e. (ASIA, USA, EUROPE). As of my understanding the only ways to improve the network (latency) are: - TCP/SSL optimization - hardware/software? - CDNs - cloud or our own ? Your opinion and insights would be much appreciated Best regards Hertzel

    Read the article

  • Why and How to avoid Event Handler memory leaks ?

    - by gillyb
    Hey There, I just came to realize, by reading some questions and answers on StackOverflow, that adding event handlers using += in C# (or i guess, other .net languages) can cause common memory leaks... I have used event handlers like this in the past many times, and never realized that they can cause, or have caused, memory leaks in my applications. How does this work (meaning, why does this actually cause a memory leak) ? How can I fix this problem ? Is using -= to the same event handler enough ? Are there common design patterns or best practices for handling situations like this ? Example : How am I supposed to handle an application that has many different threads, using many different event handlers to raise several events on the UI ? Are there any good and simple ways to monitor this efficiently in an already built big application ? Thanks in advance!

    Read the article

  • what are the various approaches for generating PDFs?

    - by andthereitgoes
    I have an idea for an app that would take some flash content which contains graphics and images like various geometric shapes and polygons and some random images and convert them to PDF. Also, since I envision this app to be used my multiple users I want this process to be quick and scalable. One possible solution I could think of is have a small flash client with the capability of assembling the above mentioned graphics and images. Generate some sort of XML, send it to a server running a Java process which could render the PDF using iText. I was wondering what are the other possible ways to do it or the best practices. Technology isn't an issue; open source or commercial. I am looking for ideas to make the process fast and scalable. Most importantly, I don't want the back end server side PDF render engine to constraint the flash client capabilities. I would appreciate if you could share your tech stack idea. Thanks a lot!

    Read the article

  • How do I have my apps dialog box pop up and take focus from the current running app?

    - by simba
    I know this type of thing is looked negatively upon but I write software for people with disabilities and sometimes good gui practices don't make sense. In this case, the user interacts with a assistive interface and under certain conditions, my control app needs to prompt the user with a question. My background process creates a dialog (I'm using wxwidgets wxDialog class) and calls Show(). The dialog box appears but it does not have focus (the application that the user was previously using keeps it). Since my users can't use mice, they can't simply click on the window. I've tried calling show and then followed by SetFocus(HWND) but that doesn't do it. What's the problem? Is this even possible? Window7. I'm thinking that it might have something to do with it being a dialog and not a full window (wxFrame). Any help is greatly appreciated.

    Read the article

  • Introduction to c# for c/c++ users

    - by Ronny
    I have 6+ years of c/c++ experience. Tomorrow starts a university assignment where I will have to use c#. Therefor I would like to have a list of links which you think important, an extensive tutorial - in short everything you think worthy. codingstyle, best practices, ... (I don't know any specifics about the c# environment I will be using(IDE, OS, w/e), the first meeting is tomorrow evening) (I have never coded c# before) One more thing: I would like to work using linux (kubuntu 10.4). IDE / environment / turorial suggestions regarding linux specifically are very welcome. thanks for your help!

    Read the article

  • What's a good way to have sample data on the iPhone/iPad?

    - by MikeN
    I have an iPad application that pulls in all of its data from an external web service. I am working on building in a demo mode that will use a cache of demo data stored on the device so it can be demoed and tried out without the web service connection (or an internet connection.) Is there a project or good practices standard to follow to model this type of sample data? I'm expecting JSON arrays/Dictionaries back from my web service, how could I build a function that uses hardcoded data to create the NSMutableData object I'd expect to get back from a JSON web request?

    Read the article

  • Archiving rows dynamically

    - by Serge
    I was wondering what would be the best solution to dynamically archive rows. For instance when a user marks a task as completed, that task needs to be archived yet still accessible. What would be the best practices for achieving this? Should I just leave it all in the same table and leave out completed tasks from the queries? I'm afraid that over time the table will become huge (1,000,000 rows in a year or less). Or should I create another table ie task_archive and query that row whenever data is needed from it? I know similar questions have been asked before but most of them where about archiving thousands of rows simultaneously, I just need to know what would be the best method (and why) to archive 1 row at a time once it's been marked completed

    Read the article

  • Is it good practise to use meta refresh tags for redirects instead of header() function in php?

    - by Kent
    I have to use redirects a lot in my scripts, for example after a user logs in I need to redirect them to the admin area, etc. But I find it inconvenient to always have to have the header function at the very top. So if I use the meta refresh tags for my redirects, is that something that would be frowned upon according to best practices or is it acceptable? function redirect($location) { echo "<meta http-equiv='refresh' content='0; url=$location' />"; }

    Read the article

  • What is the Quicker / More Efficient CSS styling

    - by Sessa
    I have been curious as to which method of CSS styling is quicker (rendering wise) and then from simply a best practices perspective which method makes more sense (pretty subjective I would say?). I can create base classes like: .rounded-corners-5 { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } OR I can do the other method of applying styles to multiple IDs/Classes: #box1, #header, #container, .titles { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }

    Read the article

  • .htacces to create friendly URLs. Help needed....

    - by Jonathan
    Hi, I'm having a hard time with .htacces. I want to create friendly URLs for a site I'm working on... Basically I want to convert this: http://website.com/index.php?ctrl=pelicula&id=0221889 http://website.com/index.php?ctrl=pelicula&id=0160399&tab=posters Into this: http://website.com/pelicula/0221889/ http://website.com/pelicula/0221889/posters/ In case I need it later I would also want to know how to add the article title to the end of the URL like this (I'm using PHP): http://website.com/pelicula/0221889/the-article-name/ http://website.com/pelicula/0221889/the-article-name/posters/ Note: Stackoverflow method is also good for me, for example the url of this question is: http://stackoverflow.com/questions/3033407/htacces-to-create-friendly-urls-help-needed But you can put anything after the id and it will also work. like this: http://stackoverflow.com/questions/3033407/just-anything-i-want I have used some automatic web tools for creating the .htacces file, but its not working correctly. So I ask for your help. I will also be glad if you can recommend .htacces best practices and recommendations.. Thanks!

    Read the article

  • Handling dynamic number of columns

    - by Whistle
    I'm developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to give them the ability to choose to display or hide the left column, the right column and/or the top div. The middle column cannot be hidden since this is where the actual content will show, whereas the other columns are for navigation or side menus. I've been looking for a way to make this as smart and flexible as possible. For now I'm using a MasterPage, but that seems to be too constraining. For instance, with MasterPage you need to add a ContentPlaceHolder control in every of your ASPX pages. What are the best practices in this area? I guess a simpler way of saying this would be "I want to create a template system over which I have complete control".

    Read the article

< Previous Page | 196 197 198 199 200 201 202 203 204 205 206 207  | Next Page >