I have a component with a number of properties that have various attributes
Normally when these attributes are added to a plain old domain object they are picked up by my custom AttributeConventions.
For the Component properties they are not. Is there some extra wiring needed for these?
e.g.
public class Component
{
[Length(Max=...
Hi,
Could some one help, how would I instruct automap to have not-null for
a cloumn?
public class Paper : Entity
{
public Paper() { }
[DomainSignature]
[NotNull, NotEmpty]
public virtual string ReferenceNumber { get; set; }
[NotNull]
public virtual Int32 SessionWeek { get...
A very much related question has been posted here:
http://stackoverflow.com/questions/199080/how-to-detect-what-net-framework-versions-and-service-packs-are-installed
However, I found that .Net 4.0 conventions are messy. I need to hard-code some logic into an installer / installed product that goes like this:
if not RecentDotNet40IsIn...
This seems like it should be easy to do, but I just can make it work. I'm hooked on the convention plugin in Struts 2.1. However, I need to define some package-level configuration such as a new interceptor stack and exception mappings. I'd like to use the struts.xml file for this, but I can't get the convention-based packages matched to ...
What is the rails convention regarding names of boolean fields?
For example, if I have a User model that needs a flag for its "activeness", should I call the db field is_active or active ?
Note: Rails automatically generates question-marked methods for accessing boolean fields: User.is_active? and User.active?.
...
For example, I've always seen methods referred to as String#split, but never String.split, which seems slightly more logical. Or maybe even String::split, because you could consider #split to be in the namespace of String. I've even seen the method alone, when the class is assumed/implied (#split).
I understand that this is the way me...
I have two issues with struts2 that are somewhat related. I should also mention that all of my jsps are in WEB-INF so they can't be directly accessed by typing in ../page.jsp, but they CAN be accessed by typing in ../page.
First, lets say I want to implement Registration functionality in my website. I have register-form.jsp. This i...
I know that you can return custom objects using struts2 by specifying a declaration in your struts.xml file. I've done that, gotten that to work.
What I want to do is move away from that, and accomplish the same thing via annotations. If I have an action that is going to return a custom result type I would like to be able to do it. ...
I'm using struts 2 with convention plugin. The convention plugin page states for the ParentPackage annotation, "To apply this annotation to all actions in a package (and subpackages), add it to package-info.java." I have two packages, my-default and my-secure. I have a package called actions.secure and in it I have a package-info.java...
Because there is so little information about VB.Net and (Fluent) NHibernate to be found, I decided to write this question to all other developers finding themselves looking for more information.
On of the things i had to struggle with was how to Ignore properties in NHibernate.
The reason i had to ignore properties was because we used ...
What is an OpenSolaris syscall calling convention (x86)?
F.e. I'd like to write a program in 32bit assembly which displays a string to the console. For this I'd like to use "write" syscall (no. 4). C definition for write is:
ssize_t write(int fildes, const void *buf, size_t nbyte)
what registers should hold fildes, buf and nbyte argu...
I am going to an annual Free software/Open Source convention. This event is very community oriented and the hallway meetings are very informal. Since the company I currently work for is looking for C++ developers (in a Linux environment), I printed on a T-shirt the words "We are recruiting C++ developers" in large letters.
Hopefully som...
I know it is bad convention/design to conditionally declare a variable. i.e.:
if some_boolean:
x = 1
where x is not declared anywhere else. But is it bad to conditionally declare a variable if you only use it later on if that condition is met?
if some_boolean and some_other_boolean:
x+=1
...
Assuming that we have a project named project and modules module1 and module2, earlier I tend to use the following naming strategy:
-- project
-- projectModule1
-- projectModule2
Now I use another:
-- project
-- project-module1
-- project-module2
What are best practices for Maven modules naming?
...
Hey all,
I know that to save/restore matrix state you use standard push/pop operations. I haven't been able to find a decent convention for saving/restoring state such as when using glLineWidth() or glColor4ub().
It seems not really necessary as long as you set your line width or color up properly whenever you want to draw anything but...
Are Java style camelCase names good practice in Python. I know Capilized names should be reserved by convention for Class names. Methods should be small letters according to good style, or actually I am not so sure. Is there PEP about naming?
COMMENTS:
Sorry for camels :) , I learned from answer PEP8, that my title is actually properly...
"TLD-first domain-like identifiers" is a mouthful but that's all I can come up with.
I've seen these used in various places over the years and wondered what the history/reason behind this convention is, since you might be forgiven in thinking that there is one true way to mention a domain.
I don't use Java but I recall from poking arou...
this:
public void foo() {
for (int i = 0; i < rows; i++) // <--- no brace!
for (j = 0; j < columns; j++) // <--- no brace!
table[i][j] = new Blabla(i, j);
other();
}
or this:
public void foo() {
for (int i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
table[i][j] = ne...
I just got a Mac Mini OS X Server. This is my first foray into the Mac world. Wanting to get off on the right foot as I configure my machine, which will be used principally for software development (java, groovy, grails, javascript, etc.), I am wondering what conventions are typically followed as you install software tools, locate your p...
I have struts.xml like this.
<struts>
<constant name="struts.convention.action.suffix" value="Controller"/>
<constant name="struts.convention.action.mapAllMatches" value="true"/>
<constant name="struts.convention.default.parent.package" value="rest-default"/>
<constant name="struts.convention.package.locators" value="con...