Hello,
For each product there are associated cost calculators like: discount, discount by merchant, bonus by merchant, monthly discount etc. In future, more cost calculators would be added.
We have a concrete product class and many decorators for each cost calculation. All products should use all of the calculators, because the calcula...
I am developing an application based on questions and answers, and I would like to prevent a registered user from posting multiple answers to the same question.
How can I do that? And where is the best place to put this code (i.e. controller, model)?
...
I've already separated the authentication bit out of my controllers, but I'm still forced to assign permissions and roles in my controller actions and service classes.
Lets say that a user is creating a blog entry or something like that and the system will assign the user a permission giving him the right to do what ever he (or she) wa...
So right now i need to create and implement an extension of the Python logging module that will be used to log to our database. Basically we have several python applications(that all run in the background) that currently log to a random mishmash of text files. Which makes it almost impossible to find out if a certain application failed o...
I'm working on a little Java game in which all sorts of events can happen. There are at least a couple of dozen basic events that various event handlers may be interested in. There are also several places in the code where these events might be triggered. Rather than forcing the event listeners to know which class they need to registe...
Dear experts, I am working on design a application that required to send a notification email for paid services. For example, user signed up a hosting solution for 3,6, and 12 months. The application requires to send an email to user whenever the contract expires in a sequence until user renew service for every 2 weeks, 3days and 1 days ...
I have been making webpages for about 5 years now. I'm a C# programmer but I do know HTML, JavaScript, and CSS by nature and all my websites seem to look like they just walked out of the year 1995's internet. Is there quick reference to a set of do's and don't in web design?
Note: Even though my websites don't look great, at least they...
For example, we have two domain objects: Cell and Body (as in human cell and body).
The Body class is just a collection of Cells, e.g.
class Body
{
IList<Cell> cells;
public void AddCell(Cell c) { ... }
public void RemoveCell(Cell c) { ... }
}
The Cell has a Split method, which internally creates a clone of itself, e.g.
...
Hello everyone,
I am developing a web site and I need to build a data structure to store user profile information. Just like what we filled about our gender/age/education/etc. information for Facebook, etc. The current issue I met with is how to design an extensible and secure
data structure, in more details,
Currently I may not consi...
I'm a contractor and am often brought in on projects to be heads down and just implement features for a deadline. Oftentimes though my pace becomes faster than that of the underlying design. So I often wind up having to create functions/methods to perform a task in a preliminary way while awaiting the final design.
Case in point, cu...
I am trying to get a better handle on decoupling my code, code reuse, etc.
I'm tired of typing the below every time I want to read some rows:
using(SqlConnection conn = new SqlConnection(myConnString))
{
using(SqlCommand cmd = new SqlCommand(cmdTxt, conn))
{
conn.Open();
using(SqlDataReader rdr = cmd.ExecuteReader())
{...
background: we've got a number of server processes and client apps that are used entirely internally, in a fairly controlled environment. we capture a significant amount of data every day that goes into a couple database machines. most everything is c#, with a few c++ apps.
just about every app has some basic (if not extensive) dependen...
In XNA, when is it appropriate to render your game content using more than one spritebatch? So far I've never used more than one, and have never noticed any downsides to this approach.
In what situations would using multiple spritebatches be recommended or even necessary?
...
As a kind of opposite to this question: "Is low-level embedded systems programming hard for software developers" I would like to ask for advice on moving from the low level embedded systems to programming for more advanced systems with OS, especially embedded Linux.
I have mostly worked with small microcontroller hardware and software, ...
Class c = new Class( { Prop = "Initial" } );
I have the class above. How would you create a method to modify it?
public Class ModifyIt(Class c)
{
c.Prop = "changed";
return c;
}
or
public void ModifyIt(Class c)
{
c.Prop = "changed";
}
Then called like this...
Class c = ModifyIt(c);
Console.WriteLine(c.Prop);
// chang...
I want to insert my product's image into a database and then want to get those image on request. please suggest.
...
I'm trying to show a tree structure in an HTML table. It's basically a list of people you referred to a site, but you can expand each and see the people they referred too (only 2 or 3 levels).
I'm also showing a number of pieces of information on each person, so I'm using a table, with several columns.
I'm wondering what's the best way ...
I am currently attempting to refactor an application that has a lot of places where it displays lists or tables of data, with totals or averages at the end, and percentage changes or cumulative totals with each record.
Typically the collection is modelled as a list of objects and the other data is calculated in the aspx code behind (yu...
I have a web app that requires a user to have an account. This user can then vote 'once' on a specific item. However, some users are signing up for lots of accounts to 'game' the system.
Does anyone have any ideas how you can restrict this type of thing?
Could I restrict number of signups per day per IP address? (what are problems with...
As a C++ programmer, we have to deal with concepts and the relation of related
concepts before implementing them to classes.
However,how to design a software in procedure languages like C ?
How can I deal with concepts without the help of class in C++.
Related:
What is the best way to plan and organize development of an application ...