Search Results

Search found 28593 results on 1144 pages for 'best pratices'.

Page 9/1144 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to best launch C++ application from web page

    - by JB
    I guess there are two parts to this question, one technical and one best practice for security and doing things "right". I'm working on a little game using C++ / directx but I would like to be able to launch it from a web page by someone clicking on a link on that page. Ideally I would like the first time they clicked for it to launch an installer downloads and installs the game on their machine, and then the next time to launch an application which updates the game from a web site if it's old and then launches it. I have no problems with the expected security popups and questions the first time it runs. I want people to be certain what they are installing and understand what they are doing. But it would be nice if once it is installed they could run it with the minimum of fuss. My question then is what technologies I could use to do this? I'm thinking that it would need a browser plugin and an activex control so that first time you'd install that, and subsequently the control/plugin would be able to launch the game. I'm not sure that under newer browser secuity models that a plugin would have the permissions to be able to run an installer though or silently invoke applications on the client machine even if they are already installed. Is there a more sensible way to achive what I want to achieve? And I'm worried about the security aspects too. I want this to be convenient for users but I of course want to do it "right". I know this can be done as I've seen several mmorpg type games that launch in this way from the browser now but it's not entirely clear to me how they've done it.

    Read the article

  • Best way to unit test Collection?

    - by limc
    I'm just wondering how folks unit test and assert that the "expected" collection is the same/similar as the "actual" collection (order is not important). To perform this assertion, I wrote my simple assert API:- public void assertCollection(Collection<?> expectedCollection, Collection<?> actualCollection) { assertNotNull(expectedCollection); assertNotNull(actualCollection); assertEquals(expectedCollection.size(), actualCollection.size()); assertTrue(expectedCollection.containsAll(actualCollection)); assertTrue(actualCollection.containsAll(expectedCollection)); } Well, it works. It's pretty simple if I'm asserting just bunch of Integers or Strings. It can also be pretty painful if I'm trying to assert a collection of Hibernate domains, say for example. The collection.containsAll(..) relies on the equals(..) to perform the check, but I always override the equals(..) in my Hibernate domains to check only the business keys (which is the best practice stated in the Hibernate website) and not all the fields of that domain. Sure, it makes sense to check just against the business keys, but there are times I really want to make sure all the fields are correct, not just the business keys (for example, new data entry record). So, in this case, I can't mess around with the domain.equals(..) and it almost seems like I need to implement some comparators for just unit testing purposes instead of relying on collection.containsAll(..). Are there some testing libraries I could leverage here? How do you test your collection? Thanks.

    Read the article

  • Best implementation of Java Queue?

    - by Georges Oates Larsen
    I am working (In java) on a recursive image processing algorithm that recursively traverses the pixels of the image, outward from a center point. Unfortunately... That causes stack overflows, so I have decided to switch to a Queue-based algorithm. Now, this is all fine and dandy -- But considering the fact that its queue will be analyzing THOUSANDS of pixels in a very short amount of time, while constantly popping and pushing, WITHOUT maintaining a predictable state (It could be anywhere between length 100, and 20000); The queue implementation needs to have significantly fast popping and pushing abilities. A linked list seems attractive due to its ability to push elements unto its self without rearranging anything else in the list, but in order for it to be fast enough, it would need easy access to both its head, AND its tail (or second-to-last node if it were not doubly-linked). Sadly, though I cannot find any information related to the underlying implementation of linked lists in Java, so it's hard to say if a linked list is really the way to go... This brings me to my question... What would be the best implementation of the Queue interface in Java for what I intend to do? (I do not wish to edit or even access anything other than the head and tail of the queue -- I do not wish to do any sort of rearranging, or anything. On the flip side, I DO intend to do a lot of pushing and popping, and the queue will be changing size quite a bit, so preallocating would be inefficient)

    Read the article

  • How best to manage my growing data in Excel?

    - by Mike
    This isn't a question about formulas or features in Excel. I'm debating the correct/best way to manage the growing amount of data 'I have to' manage in Excel (I produce PIVOT tables/reports for my management). DATA: I record the number of publications we order: cost, date ordered, start and end of subscription, who requested it, when they ordered it, when I ordered it, will it be cancelled next year, etc, etc, etc. DILEMMA: Obviously we re-order a lot of the same publications, so depending on how I manage the data I could be duplicating all over the place. OPTION 1: So, do I use ROWs = publication name in Row 1 and all the related columns for each financial year are copied and pasted after each financial year ready for the new FY information? This will lead to me going to column ZZ. OPTION 2: Or, do I use COLUMNs = each row has only one FY information for each publication and if we re-order or cancel a publication I re-type the publication name in a row below and fill in appropriate columns? This will lead to a long list of publications down to row 10000, and potential for misspelling of repeat ordered publication names. IDEAS: What's the best way - thinking in terms of pivot table best practice, being able to sum or count easy, report formatting, etc. Any best practices much appreciated.

    Read the article

  • Best practices for sending automated daily emails from web service

    - by Tauren
    I am running a web service that currently sends confirmation emails out to new users via the gmail smtp servers. As I'm only getting a few new users each day, this hasn't been a problem. I've recently added new features to the webapp that will require a customized message to be sent out to each user every day. Think of this as similar to the regular messages LinkedIn sends out that give you a status report on the activity in your network. Every user's message will be different. With thousands of users, this means thousands of unique messages will be sent each day. Edit: I've since found that these types of email are called "transactional or relationship messages". Spamtacular has a good article on differentiating between marketing and transactional email. I don't think using gmail's smtp servers will cut it anymore, but I don't know that for sure. I don't know what gmail's maximum outgoing messages per account is (it might be 100/day), but they limit outgoing mail to 500 recipients per message. I'm not sending a single message to 500 recipients, but I'm going to be sending 1000's of customized messages with each recipient getting one per day. I'm interested to learn any best practices for doing this (especially for Java-based webapps). Here are some of my thoughts and concerns on it: Should I set up my own outgoing mail server? If I do this, it seems like I'll have all sorts of other issues to worry about, such as preventing mail server abuse, monitoring bounces, allowing ways to opt-out of emails, etc. Are there any tools or services to help with this? Maybe something like OpenEMM or a services like MailChimp? But those seem focused more toward email marketing campaigns. I don't think I should have the webapp itself handle sending emails as it currently is for new user signups. I'm thinking I should setup a separate messaging server that can access the same backend/datastore as the webapp. Thoughts on this? Should I consider setting up some sort of message queueing service to help with this, such as JMS, RabbitMQ, ActiveMQ, etc.? Do I need to provide users a way to opt-out? Do I need to flag these as bulk messages? I don't really consider these email marketing messages, but I'm unsure what is considered appropriate or proper netiquette. Any advice is appreciated. I'm also very interested in open source tools or web services that simplify things and could help me to ramp up as quickly as possible. Thanks!

    Read the article

  • What should I do to scale out an high-traffic website?

    - by makerofthings7
    What Best Practices should be undertaken for a Website that needs to "scale out" to handle capacity? This is especially relevant now that people are considering the cloud, but may be missing out on the fundamentals. I'm interested in hearing about anything you consider a best practice from development-level tasks, to infrastructure, to management. Use your best judgement when posting multiple answers, since it may make sense to post them separately for voting purposes. (hint: you'll likely get more reputation points for many small answers than one large answer)

    Read the article

  • winforms databinding best practices

    - by Kaiser Soze
    Demands / problems: I would like to bind multiple properties of an entity to controls in a form. Some of which are read only from time to time (according to business logic). When using an entity that implements INotifyPropertyChanged as the DataSource, every change notification refreshes all the controls bound to that data source (easy to verify - just bind two properties to two controls and invoke a change notification on one of them, you will see that both properties are hit and reevaluated). There should be user friendly error notifications (the entity implements IDataErrorInfo). (probably using ErrorProvider) Using the entity as the DataSource of the controls leads to performance issues and makes life harder when its time for a control to be read only. I thought of creating some kind of wrapper that holds the entity and a specific property so that each control would be bound to a different DataSource. Moreover, that wrapper could hold the ReadOnly indicator for that property so the control would be bound directly to that value. The wrapper could look like this: interface IPropertyWrapper : INotifyPropertyChanged, IDataErrorInfo { object Value { get; set; } bool IsReadOnly { get; } } But this means also a different ErrorProvider for each property (property wrapper) I feel like I'm trying to reinvent the wheel... What is the 'proper' way of handling complex binding demands like these? Thanks ahead.

    Read the article

  • WiX tricks and best practices

    - by Si
    We've been using WiX 3 for a while now, and despite the usual gripes about ease of use, it's going reasonably well. What I'm looking for is useful advice regarding: Setting up a WiX project (layout, references, file patterns) Integrating WiX into solutions, and build/release processes Configuring installers for new installations and upgrades Also interested in any good WiX hacks you'd like to share, thanks!

    Read the article

  • Partial template specialization of free functions - best practices

    - by Poita_
    As most C++ programmers should know, partial template specialization of free functions is disallowed. For example, the following is illegal C++: template <class T, int N> T mul(const T& x) { return x * N; } template <class T> T mul<T, 0>(const T& x) { return T(0); } // error: function template partial specialization ‘mul<T, 0>’ is not allowed However, partial template specialization of classes/structs is allowed, and can be exploited to mimic the functionality of partial template specialization of free functions. For example, the target objective in the last example can be achieved by using: template <class T, int N> struct mul_impl { static T fun(const T& x) { return x * N; } }; template <class T> struct mul_impl<T, 0> { static T fun(const T& x) { return T(0); } }; template <class T, int N> T mul(const T& x) { return mul_impl<T, N>::fun(x); } It's more bulky and less concise, but it gets the job done -- and as far as users of mul are concerned, they get the desired partial specialization. My questions is: when writing templated free functions (that are intended to be used by others), should you automatically delegate the implementation to a static method function of a class, so that users of your library may implement partial specializations at will, or do you just write the templated function the normal way, and live with the fact that people won't be able to specialize them?

    Read the article

  • Good place to look for example Database Designs - Best practices

    - by Younes
    I have been given the task to design a database to store a lot of information for our company. Because the task is rather big and contains multiple modules where users should be able to do stuff, I'm worried about designing a good data model for this. I just don't want to end up with a badly designed database. I want to have some decent examples of database structures for contracts / billing / orders etc to combine those in one nice relational database. Are there any resources out there that can help me with some examples regarding this?

    Read the article

  • Best Practices for persisting iPod Playlist (MPMediaItemCollection) across sessions

    - by coneybeare
    When using in-app audio in the iPhone SDK, it is possible to allow users to select a list from their ipod library and create an in-app local playlist. If I want to persist this choice, it is easy to serialize the data and write to file, then recover. Just vanilla like this, however, leads me to think there is going to be something wrong. For example, what if the user syncs and removes sounds? I can loop across them all and query the iPod DB at setup time, but with lists that could be 50,000 long, this could take some time. How are other people doing this and what are some gotchas that I haven't though about?

    Read the article

  • Implement password recovery best practice

    - by Enrique
    Hello I want to to implement password recovery in my web application. I'd like to avoid using secret questions. I could just send the password by e-mail but I think it would be risky. Maybe I could generate a new temporary random password and send it by e-mail but I think it is as risky as the above point. Can I send a url by e-mail for example http://mysite.com/token=xxxx where xxxx is a random token associated with the user. So when the user navigates to that url he/she can reset the password. Any ideas?

    Read the article

  • Updating multiple Sprites - AS3 performance best practices

    - by dani
    Within the container "BubbleContainer" I have multiple "Bubble sprites". Each bubble's graphics object (a circle) is updated on a timer event. Let's say I have 50 Bubble sprites and each circle's radius should be updated with a mathematical formula. How do I organize this logic? How do I update all Bubble sprites within the BubbleContainer? (should I call a bubble.update() function or make a temporary reference to the graphics object?) Where do I put the Math logic? (as static functions?)

    Read the article

  • Best Practise for Writing a POS System

    - by Gary
    Hi, I'm putting together a basic POS system in C# that needs to print to a receipt printer and open a cash drawer. Do I have to use the Microsoft Point of Service SDK? I've been playing around with printing to my Samsung printer using the Windows driver that came with it, and it seems to work great. I assume though that other printers may not come with Windows drivers and then I would be stuck? Or would I be able to simply use the Generic/Text Driver to print to any printer that supports it? For the cash drawer I would need to send codes directly to the COM port which is fine with me, if it saves me the hassle of helping clients setup OPOS drivers on there systems. Am I going down the wrong path here? Thanks, Gary

    Read the article

  • Best Practices for Source Control Dependencies

    - by VirtuosiMedia
    How do you handle source control setup of a project that has dependency on a separate framework or library? For example, Project A uses Framework B. Should Project A also include the code from Framework B in its repository? Is there a way for it to be included automatically from a different repository or would I have to updated it manually? What are the general approaches are usually taken for this scenario? Assume that I control the repositories for both Project A and Framework B and that the source code for both is not compiled. Any resources or suggestions would be greatly appreciated. I'm currently using Subversion (on a very basic level), but I would like to switch to Mercurial so that I can try out Kiln with Fogbugz. Edit: In Mercurial, would you use parent repositories for this function?

    Read the article

  • Best Practices - Data Annotations vs OnChanging in Entity Framework 4

    - by jptacek
    I was wondering what the general recommendation is for Entity Framework in terms of data validation. I am relatively new to EF, but it appears there are two main approaches to data validation. The first is to create a partial class for the model, and then perform data validations and update a rule violation collection of some sort. This is outlined at http://msdn.microsoft.com/en-us/library/cc716747.aspx The other is to use data annotations and then have the annotations perform data validation. Scott Guthrie explains this on his blog at http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx. I was wondering what the benefits are of one over the other. It seems the data annotations would be the preferred mechanism, especially as you move to RIA Services, but I want to ensure I am not missing something. Of course, nothing precludes using both of them together. Thanks John

    Read the article

  • Configuring asp.net web applications. Best practices

    - by Andrew Florko
    Hello everybody, There is a lot of configurable information for a web-site: UI messages Number of records used in pagination & other UI parameters Cache duration for web-pages & timeouts Route maps & site structure ... There are many approaches to store all this information also: AppSettings (web.config) Custom sections (web.config) External xml/text files referred from web.config Internal static class(es) of constants Database table(s) ... What approaches do you usually choose for your tasks & what approaches do you find unsuitable? Thank you in advance!

    Read the article

  • What are the best programming articles?

    - by lillq
    Part of being a good software developer is keeping current with what people are saying in the community. There are many good articles out there on the Internet about the wide subject of computer programming. What articles have you found worth your time? Please provide the article's title, author and a link if possible.

    Read the article

  • mvc presentation model best-practices

    - by Andrew Florko
    Hello, everybody How do you usually convert business objects to presentation? For example: Business object Person { Id, FirstName, LastName, Patronymic ... } should be presented as "LastName F. P. " in html layout. We use Presentation classes hierarchy to represent data ready for output from Business model. Questions: Will you keep presentation model completely separated from Business Model. For example, can strong-typed views (MVC ASP.NET) aggregate formatted business data as well as raw business objects (that leads toward <%=Html.Encode(PersonHelper.ToShort(Model.Person))% html layout injections) What architecture layer do you choose for conversion (mvc controllers that formats business data from business layer, for instance). Thank you in advance

    Read the article

  • Best way to get all digits from a string with regex

    - by Chris Marisic
    Is there any better way to get take a string such as "(123) 455-2344" and get "1234552344" from it than doing this: var matches = Regex.Matches(input, @"[0-9]+", RegexOptions.Compiled); return String.Join(string.Empty, matches.Cast<Match>() .Select(x => x.Value).ToArray()); Perhaps a regex pattern that can do it in a single match? I couldn't seem to create one to achieve that though.

    Read the article

  • Best practices for Subversion and Visual Studio projects

    - by Alex Marshall
    I've recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that's built from a cobbling-together of various programs and scripts written in C and Perl. The projects I'm now working on have reached critical mass for being committed to subversion. I was wondering what should and should not be committed to the repository for Visual Studio projects. I know that it's going to generate various files that are just build-artifacts and don't really need to be committed, and I was wondering if anybody had any advice for properly using SVN with Visual Studio. At the moment, I'm using an SVN 1.6 server with Visual Studio 2010 beta. Any advice, opinions are welcome.

    Read the article

  • Best practices to develop and maintaing code for complex JQuery/JQueryUI based applications

    - by dafi
    I'm working on my first very complex JQuery based application. A single web page can contain hundreds of JQuery related code for example to JQueryUI dialogs. Now I want to organize code in separated files. For example I'm moving all initialization dialogs code $("#dialog-xxx").dialog({...}) in separated files and due to reuse I wrap them on single function call like dialogs.js function initDialog_1() { $("#dialog-1").dialog({}); } function initDialog_2() { $("#dialog-2").dialog({}); } This simplifies function code and make caller page clear $(function() { // do some init stuff initDialog_1(); initTooltip_2(); }); Is this the correct pattern? Are you using more efficient techniques? I know that splitting code in many js files introduces an ugly band-bandwidth usage so. Does exist some good practice or tool to 'join' files for production environments? I imagine some tool that does more work than simply minimize and/or compress JS code.

    Read the article

  • Best practices for building a simple, scalable cluster on Amazon EC2 for a Java web app

    - by Alex B
    I want to build a Java web app and deploy it on EC2. It will be written in Java and will use MySQL. I was hoping to get some pointers on the actual deployment process and configuration. In particular I'm interested in the following topics: machine images (diy vs ready made) mysql replication and backup to S3 ways of deploying and redeploying the app to EC2 without interruptions firewalls? load balancing and auto scaling cloudtools (or alternative tools)

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >