We all know that all user data, GET/POST/Cookie etc etc needs to be validated for security.
But when do you stop, once it's converted into a local variable?
eg
if (isValidxxx($_GET['foo']) == false) {
throw InvalidArgumentException('Please enter a valid foo!');
}
$foo = $_GET['foo'];
fooProcessor($foo);
function fooProcessor($foo)...
Are there any tools available that allow you to 'look' at any given application and show you which WinForm controls are being used in that application? I happen to have an app which I like the GUI of, and I want to use a similar structure in my own app. Instead of developing these controls myself, it may be easier to buy them, if only I ...
I have an entry-point View with a tab control. Each tab is going to have a user control embedded within it. Each embedded view inherits from the same base class and will need to be updated as a key field on the entry-point view is updated.
I'm thinking the easiest way to design this page is to have the entry-point ViewModel create and...
I have an issue with some inheritance I'm doing. Basically, I have an abstract class called LineCalculator, which, as it suggests, calculates lines of an equation. From there, I inherit this base class in a LinearLineCalculator, which calculates lines on a Cartesian coordinate system, and a PolarLineCalculator, which calculated lines on ...
To explain my point further, I'm a beginner in programming, and I'm working on a small project.
Instead of separating the .cpp file from the header file, I'm implementing the code in the header files, and making one .cpp file for testing. I do this to have less files, hence easier navigation. Then later I'll separate the code as it shou...
Hi there,
I'm setting up templates and snippets for my design team, they don't want to fuss with this that and the other. I figure fair enough, and everything's mostly going well, except that I'm experiencing difficulties in displaying floats in Design view.
It's important to note that Live Preview displays beautifully, as does my outp...
I have created a windows form using (vs.net 2008 and vb.net as programming lanugage).
Functionality part is working fine as expected.
My issues is that, when i run my application in different machines, the form display is not proper accross the monitory screen.
In some machines i noticed extra space on leftside of the container. In som...
[Objective-C]
Do you still use Styrofoam balls to model your systems, where each ball
represents a class?
Tom Love: We do, actually. We've also done a 3D animation version of
it, which we found to be nowhere near
as useful as the Styrofoam balls.
There's something about a physical,
conspicuous structure hanging fro...
I am working on an application and one feature that would make it really useful is the ability to share some information, but the other device may not be expecting the data to be sent.
For example, if I am reading a really good book, and I realize that a friend may like it, I could use an application to send the data to him, so he could...
I am messing around with Entity Framework 3.5 SP1 and I am trying to find a cleaner way to do the below.
I have an EF model and I am adding some Eager Loaded entities and i want them all to reside in the "Eager" property in the context. We originally were just changing the entity set name, but it seems a lot cleaner to just use a pr...
Hi How to design a business object?
I have a library which returns me an Object which have ten lists of other different objects. I need to store it into database all. List of objects are often like:
class Item {
private int id;
private String name;
private double point;
}
But the name is often the same. Like basic title of ...
I was wondering if all design Patterns are only used in Object-Oriented design? Are there any design patterns used in non Object-Oriented design?
Thanks and regards!
...
Last week I interviewed for a position at a TripleA MMORPG game company here in NE. I didn't get the job but one of the areas that came up during the interview was the about the scalability of the code that you write and how it should be considered early on in the design of your architecture and classes.
Sadly to say I've never thought ...
What's the best way of partitioning a class when its functionality needs to be externally accessed in different ways by different classes? Hopefully the following example will make the question clear :)
I have a Java class which accesses a single location in a directory allowing external classes to perform read/write operations to it. ...
I was wondering how you draw diagrams in Unified Modeling Language for your project design? By hand on paper or some editors on computer? It will be great if there are some convenient editors or other gadgets for help. I am programming under Windows and Ubuntu.
Thanks and regards!
...
I often use this design in my code to maintain configurable values. Consider this code:
public enum Options {
REGEX_STRING("Some Regex"),
REGEX_PATTERN(Pattern.compile(REGEX_STRING.getString()), false),
THREAD_COUNT(2),
OPTIONS_PATH("options.config", false),
DEBUG(true),
ALWAYS_SAVE_OPTIONS(true),
THREAD_WAI...
I'm currently developing a small Database Management System for a local company. How would you go about explaining how the system you have designed to a client? If they are non-technical and have no understanding of programming, how would you go about showing what the system will do and how it will do it? I guess some sort of visual repr...
Hi,
I'm looking for best practices and resources regarding design of workflow based applications. E.g.Best practice/guidance for:
How best to represent business object 'states' (position in workflow)
How to approach logging of transition between workflow states
State transition rules
I'm using .NET, but am rather looking for general...
i want to know the exact difference between form id and form name used in html.
...
I know that everything we do in programming can be described as design pattern(even abstract method has design pattern called template method)
public class Guicer extends AbstractModule {
private static Injector injector = Guice.createInjector(new Guicer());
public static void setInjector(Injector injector) {
Guicer.in...