Search Results

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

Page 53/237 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Best practices for withstanding launch day traffic burst

    - by Sam McAfee
    We are working on a website for a client that (for once) is expected to get a fair amount of traffic on day one. There are press releases, people are blogging about it, etc. I am a little concerned that we're going to fall flat on our face on day one. What are the main things you would look at to ensure (in advance without real traffic data) that you can stay standing after a big launch. Details: This is a L/A/M/PHP stack, using an internally developed MVC framework. This is currently being launched on one server, with Apache and MySQL both on it, but we can break that up if need be. We are already installing memcached and doing as much PHP-level caching as we can think of. Some of the pages are rather query intensive, and we are using Smarty as our template engine. Keep in mind there is no time to change any of these major aspects--this is the just the setup. What sorts of things should we watch out for?

    Read the article

  • Server-side application configuration security. Best practices

    - by Andrew Florko
    We publish server-side application to our customer workstation and customer's security guys are concerned about configuration connection strings safety. Connection strings are stored as plain text right now, but as configuration file is not in the public/shared folder we supposed that workstation security itself is enough. What are the ways to improve connection strings security further? It is a big step forward to encrypt password and keep a decryption key on the same workstation? What are the steps we can take to keep connection strings (and alike) information more and more securable? Thank you in advance!

    Read the article

  • Best practices for displaying large number of images as thumbnails in c#

    - by andySF
    I got to a point where it's very difficult to get answers by debugging and tracing object, so i need some help. What I'm trying to do: A history form for my screen capture pet project. The history must list all images as thumbnails (ex: picasa). What I've done: I created a HistoryItem:UserControl. This history item has a few buttons, a check box, a label and a picture box. The buttons are for delete/edit/copy image. The check box is used for selecting one or more images and the label is for some info text. The picture box is getting the image from a public property that is a path and a method creates a proportional thumbnail to display it when the control has been loaded. This user control has two public events. One for deleting the image and one for bubbling the events for mouse enter and mouse leave trough all controls. For this I use EventBroadcastProvider. The bubbling is useful because wherever I move the mouse over the control, the buttons appear. The dispose method has been extended and I manually remove the events. All images are loaded by looping a xml file that contains the path of all images. For each image in this XML I create a new HitoryItem that is added (after a little coding to sort and limit the amount of images loaded) to a flow layout panel. The problem: When I lunch the history form, and the flow layout panel is populated with my HistoryItem custom control, my memory usage increases drastically.From 14Mb to around 100MB with 100 images loaded. By closing the history form and disposing whatever I could dispose and even trying to call GC.Collect() the memory increase remain. I search for any object that could not be disposed properly like an image or event but wherever I used them they are disposed. The problem seams to be from multiple sources. One is that the events for bubbling are not disposing properly, and the other is from the picture box itself. All of this i could see by commenting all the code to a limited version when only the custom control without any image processing and even events is loaded. Without the events the memory consumption is reduced by axiomatically 20%. So my real question is if this logic, flow layout panels and custom controls with picture boxes, is the best solution for displaying large amounts of images as thumbnails. Thank you!

    Read the article

  • what are the best practices to prevent sql injections

    - by s2xi
    Hi, I have done some research and still confused, This is my outcome of that research. Can someone please comment and advise to how I can make these better or if there is a rock solid implementation already out there I can use? Method 1: array_map('trim', $_GET); array_map('stripslashes', $_GET); array_map('mysql_real_escape_string', $_GET); Method 2: function filter($data) { $data = trim(htmlentities(strip_tags($data))); if (get_magic_quotes_gpc()) $data = stripslashes($data); $data = mysql_real_escape_string($data); return $data; } foreach($_GET as $key => $value) { $data[$key] = filter($value); }

    Read the article

  • What are CDN Best Practices?

    - by Wild Thing
    Hi, I have recently started using the Rackspace Cloudfiles CDN (Limelight), about which I have some questions: I am using jQuery, jQuery UI and jQuery tools in addition to custom JS code. Also, my site is written in ASP.Net, which means there is some ASP.Net generated JS code. Right now what I have done is that I have combined all of the js (including the jquery code), except the ASP.Net generated JS into one file. I am hosting this on the Rackspace CDN. I am wondering if it would make more sense to just get the jQuery, jQuery UI files from the Google hosted CDN (which I suspect would work very well in serving these files, since they will be in many users' cache already)? This would mean one extra HTTP request, so I'm not sure if it'll help. Right now I have multiple containers for my assets. For example, in Rackspace I have 3 containers: JS, CSS and Images. The URL subdomain for all 3 is different. Will that lead to a performance penalty? Should I just use one container (and thus one domain for the CDN)? Is there a way of having the MS ASP.Net generated JS loaded from MS CDN? Would this have a performance hit as per the above question? Thanks in advance, WT

    Read the article

  • what is the best practices around links and url in asp.net-mvc

    - by ooo
    looking at different sites, i see conflicting conventions. if you want to have links to images, other pages, js files, i have seen: URL.Content("~/scripts/myscript.js"); <a href="/scripts/msscripts.js"> <img src="../../content/stylesheet.css"> <img src="../content/stylesheet.css"> these all seem to work in asp.net mvc but it seems like there are all doing slightly different things. I am moving to a new webserver where they are changing from iis redirecting to isapi rewriting and i was told to make sure my links were done in a correct way or the site not work. Can someone clarify what the "correct" way is ?

    Read the article

  • Best Practices for Working with Multiple Monitors in Visual Studio 2010

    - by Clever Human
    Now that Visual Studio 2010 has support for multiple monitors, I am curious how other people have their environments arranged. I have yet to come up with an arrangement that I am really satisfied with. The current best I have come up with for my 2 monitor system is to have all code windows detached. Then, on my primary monitor, I am able to have two code windows side by side (using the Windows 7 keyboard shortcuts WinKey+LeftArrow and WinKey+RightArrow.) On my secondary monitor I put the rest of the IDE with all of the tool windows that are normally on the bottom (errors list, find window, call stack, etc...) docked where the code windows normally go. I've also tried having all those things detached and having almost nothing in the IDE proper. The problems with this layout are: Newly opened code windows always open in the IDE, not on top of one of the detached windows. Detached code windows do not remember their exact placement from session to session (they are slightly off, having me to use the winkey + arrow key shortcut again and again for each window. There seems to be no way to have the code panes aware that they are on top of one another (IE -- multiple tabs.) The CTRL+TAB shortcut always displays on top of the IDE proper. The Code Panes are always "on top" of (children of) the IDE. So clicking on any code pane brings the IDE to the foreground, even when I care only about that code pane, and not the IDE. Other more minor issues... What would go a long way to making this better is having the code panes detach such that they are tab strips that can have other code panes docked within them. The new multi-monitor support in VS2010 is good, but it still seems really lacking. Can these issues be solved with an add-in? If so, is anyone aware of one? Is there a better way to work with the IDE on multiple monitors than what I am doing? NOTE: While this question is subjective (there is certainly no "this is the best way and that's final" answer) I'd really like to know possibly better methods of working with the IDE than what I have come up with. The intent is not to start a "mine's best" flame war.

    Read the article

  • Best practices for multiple asserts on same result in C#

    - by asdseee
    What do you think is cleanest way of doing multiple asserts on a result? In the past I've put them all the same test but this is starting to feel a little dirty, I've just been playing with another idea using setup. [TestFixture] public class GridControllerTests { protected readonly string RequestedViewId = "A1"; protected GridViewModel Result { get; set;} [TestFixtureSetUp] public void Get_UsingStaticSettings_Assign() { var dataRepository = new XmlRepository("test.xml"); var settingsRepository = new StaticViewSettingsRepository(); var controller = new GridController(dataRepository, settingsRepository); this.Result = controller.Get(RequestedViewId); } [Test] public void Get_UsingStaticSettings_NotNull() { Assert.That(this.Result,Is.Not.Null); } [Test] public void Get_UsingStaticSettings_HasData() { Assert.That(this.Result.Data,Is.Not.Null); Assert.That(this.Result.Data.Count,Is.GreaterThan(0)); } [Test] public void Get_UsingStaticSettings_IdMatches() { Assert.That(this.Result.State.ViewId,Is.EqualTo(RequestedViewId)); } [Test] public void Get_UsingStaticSettings_FirstTimePageIsOne() { Assert.That(this.Result.State.CurrentPage, Is.EqualTo(1)); } }

    Read the article

  • Best practices for an internal webservice

    - by sankara
    Experience says that using WSDL-SOAP based webservice for internal consumption is an overkill. There are too many service-based POJO classes that when let into the system complicates it way too much. One option would be use adapter pattern, map the request/response objects to internal domain classes and . But is it even required? Is there a better approach? What are your suggestions?

    Read the article

  • WPF tooltip best practices

    - by Martin
    I'm about to change my application to include tool tips for all buttons, combo boxes, etc. I was wondering if there are any recommendations on doing this. For every control I'd like the tooltip to show the control's name in bold, followed by the description. I want to keep the style separated from the control, so I can change the tooltip style globally. What I would like to have, unless there's a better suggestion, is two additional fields per button/combobox/etc: 1-ToolTipName and 2-ToolTipDesc, both containing a string. How can I accomplish this (and is it even possible?).

    Read the article

  • Needed inputs for helping hospitals/practices save money on mandatory compliance Policies and Course

    - by user363414
    Recently one of my clients came up to me and asked "Is there any way we can save some money on mandatory compliance policies and courses, and I started wondering what can I do? I started creating a calculator to show some savings if they used elearning. I wanted your input to validate that data. How many Policies your practice/hospital need to sign and average number of pages per policy? Also how many employees need to sign these policies? This would be really helpful and once I have this done I will send a copy to you as well.

    Read the article

  • SQL CONNECTION best Practices

    - by george9170
    Currently there is discussion as to what are the pros and cons of having a single sql connection architecture. To elaborate what we are discussing is, at application creation open a sql connection and at application close or error closing the sql connection. And not creating another connection at all, but using just that one to talk with the DB. We are wondering what the community thinks.

    Read the article

  • Beginner: Best Practices in an Android App UI Navagation

    - by AndyD273
    I am trying to learn how to do stuff in Android, and I'm not sure of the best way to build the interface. I've been working on porting an iPhone app, which uses navigation controllers and table views for looking at the different sections: basically, someone touches a cell in the table, which drills down to another table. when they touch a cell on that table it drills down to a webview that displays the information. I want to do something similar for the android app, but I don't know how, or if there is a better way native to Android. I've figured out how to use the webview to my purposes, but moving forward and backward in the table tree is unclear.

    Read the article

  • Best practices with STDIN in Ruby?

    - by griflet
    I want to deal with the command line input in Ruby: > cat input.txt | myprog.rb > myprog.rb < input.txt > myprog.rb arg1 arg2 arg3 ... What is the best way to do it? In particular I want to deal with blank STDIN, and I hope for an elegant solution. #!/usr/bin/env ruby STDIN.read.split("\n").each do |a| puts a end ARGV.each do |b| puts b end

    Read the article

  • Best practices: displaying text that was input via multi-line text box

    - by chris
    I have a multi-line text box. When users simply type away, the text box wraps the text, and it's saved as a single line. It's also possible that users may enter line breaks, for example when entering a "bulleted" lists like: Here are some suggestions: - fix this - remove that - and another thing Now, the problem occurs when I try to display the value of this field. In order to preserve the formatting, I currently wrap the presentation in <pre> - this works to preserve user-supplied breaks, but when there's a lot of text saved as a single line, it displays the whole text block as single line, resulting in horizontal scrolling being needed to see everything. Is there a graceful way to handle both of these cases?

    Read the article

  • Input Sanitation Best Practices

    - by Adam Driscoll
    Our team has recently been working on a logic and data layer for our database. We were not approved to utilize Entity or Linq to SQL for the data layer. It was primarily built by hand. A lot of the SQL is auto generated. An obvious down fall of this is the need to sanitize inputs prior to retrieval and insertion. What are the best methods for doing this? Searching for terms like insert, delete, etc seems like a poor way to accomplish this. Is there a better alternative?

    Read the article

  • Best practices for "search data class" in ASP.NET MVC

    - by Tim Ridgely
    Hi everybody, I'm hoping this isn't too subjective, but I'm new to ASP.NET MVC and I'm trying to figure out how others may have solved similar problems. Basically, I have two entities, Customers and Orders. A customer has many orders; an order belongs to exactly one customer. I'm making an Order Search feature that should allow a user to search for orders based on order or customer information. Pretty straightforward, I think. I've read in other posts that the search controller should use GET, but I think it makes more sense to use POST because of the large number of search params. I'm using Entity Framework to create my models, and that's in a separate class library project and namespace. This article talks about using binding instead of Request.Form to get at the POST data. Would it make decent sense to make a class to hold all the search data that could be materialized by the magic model binding? Otherwise I'd just be poking through the FormCollection to pull out particular values, which might be fine. Where would you recommend making such a class?

    Read the article

  • Windows Multiple User Application Best Practices

    - by Burt
    I am developing a WPF application that will hook into a SQLLite database and I have a number of reservations around multiple users: When I install my application should I assume that each windows user account will mean only one user of my application or should I include a login for my app (drawback is that the user will have to log in all the time) If I am supporting multiple users how do I handle a new user account i.e. on application start of the new account should I set up a new user in the DB Are there any other gotchas around this area, it isn't something I have really had to worry about before. Thanks in advance, B

    Read the article

  • Best practices to test protected methods with PHPUnit

    - by GrGr
    Hello, I found the discussion on Do you test private method informative. I have decided, that in some classes, I want to have protected methods, but test them. Some of these methods are static and short. Because most of the public methods make use of them, I will probably be able to safely remove the tests later. But for starting with a TDD approach and avoid debugging, I really want to test them. I thought of the following: Method Object as adviced in an answer seems to be overkill for this. Start with public methods and when code coverage is given by higher level tests, turn them protected and remove the tests. Inherit a class with a testable interface making protected methods public Which is best practice? Is there anything else? It seems, that JUnit automatically changes protected methods to be public, but I did not have a deeper look at it. PHP does not allow this via reflection.

    Read the article

  • Reverse Search Best Practices?

    - by edub
    I'm making an app that has a need for reverse searches. By this, I mean that users of the app will enter search parameters and save them; then, when any new objects get entered onto the system, if they match the existing search parameters that a user has saved, a notification will be sent, etc. I am having a hard time finding solutions for this type of problem. I am using Django and thinking of building the searches and pickling them using Q objects as outlined here: http://www.djangozen.com/blog/the-power-of-q The way I see it, when a new object is entered into the database, I will have to load every single saved query from the db and somehow run it against this one new object to see if it would match that search query... This doesn't seem ideal - has anyone tackled such a problem before?

    Read the article

  • Authenticating model - best practices

    - by zerkms
    I come into ASP.NET from php so the reason why i ask my question is because it's totally different nature of how application works and handles requests. well, i have an exists table with user creditians, such as: id, login, password (sha hashed), email, phone, room i have built custom membership provider so it can handle my own database authentication schema. and now i'm confused, because User.Identity.Name contains only user's login, but not the complete object (i'm using linq2sql to communicate with database and i need in it's User object to work). at php applications i just store user object at some static method at Auth class (or some another), but here at ASP.NET MVC i cannot do this, because static member is shared across all requests and permanent, and not lives within only current request (as it was at php). so my question is: how and where should i retrieve and store linq2sql user object to work with it within current and only current request? (after request processed successfully i expect it will be disposed from memory and on next request will be created again). or i'm following totally wrong way?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >