Hi everyone,
I was trying to change a convention so that my IDs follow this simple rule: ProductCode, CustomerCode, OrderCode etc etc.
I've found a simple way to do that adding a convention:
public class PrimaryKeyNameConvention : IIdConvention
{
public void Apply(FluentNHibernate.Conventions.Instances.IIdentityInst...
I'm at the beginning of a C++ project and I've been using Doxygen from the start.
I'd like to know how you use Doxygen in your project, i.e. I have several questions:
1. Where do you put your Doxygen comments? Header or sources?
I think that they should go to the header, because that's where I look to find out how to use methods. Howe...
I'm looking for a FluentNH (Fluent NHibernate) convention or configuration that ignores all properties that have no setter:
It would still map these:
public class foo{
public virtual int bar {get; private set;}
}
And omit these:
public class foo{
public virtual int fizz{get;private set;}
public virtual int bar{get {return fizz...
I missed a short syntax to express fundamental operations over functions in Clojure. Because of that, I started to use º as a shorthand for comp (cause it's closer to the math operator but easily accessible) and ¬ for partial (because reminds me of missing parameters).
What are your thoughts about this? is it useful or does it have the ...
I need to build a table for some new components that will keep track of available and used inventory. It will be something like this:
CREATE TABLE components
(
component_Id int NOT NULL PRIMARY KEY,
workOrder_Id int FOREIGN KEY,
componentSerial varchar(25) NOT NULL,
foo varchar(50),
bar int,
information nvarchar(250)
...
In 90% of the example projects I see for ActionScript / Flex I notice the following two coding conventions:
1) private member variables with getters/setters start with an underscore as in "_credentials"
and
2) interfaces start with the letter "I" as in "ISessionInfo"
Coming from the Java world, I find both of these conventions unnec...
Java programmers and API seems to favor explicit set/get methods.
however I got the impression C++ community frowns upon such practice.
If it is so,is there a particular reason (besides more lines of code) why this is so?
on the other hand, why does Java community choose to use methods rather than direct access?
Thank you
...
It is my understanding that a module docstring should just provide a general description of what a module does and details such as author and version should only be contained in the module's comments.
However, I have seen the following in comments and docstrings:
__author__ = "..."
__version__ = "..."
__date__ = "..."
Where is the co...
I'm making a game in Python, and it makes sense to have one of my modules named 'map'. My preferred way of importing is to do this:
from mygame import map
As pylint is telling me, however, this is redefining a built-in. What's the common way of dealing with this? Here are the choices I can come up with:
1) Ignore the pylint warnin...
Hi everyone! <-- Rookie C++ here again ^^
I have another theory question , as the title suggested it's to evaluate a build of code. Basically I'm considering using this template everywhere.
I am using VC++ VS2008 (all included)
Stapel.h
class Stapel
{
public:
//local vars
int x;
private:
public:
Stapel();
Stapel(...
For example: I want to create a new kind of tag (fancy_input_tag) for use from any view as a plugin. No problem, I can do this. The trick is my tag requires the use of stylesheets and javascripts. As usual, my rake task copies these assets into their appropriate public folders.
Having built this plugin myself, there’s no real issu...
public class MyObjectMap : IAutoMappingOverride
{
public void Override(AutoMapping mapping)
{
mapping.IgnoreProperty(x => x.InterfaceProperty);
}
}
I am currently doing this in every map... how can I make this into a convention? I am adding conventions like so:
private Action<IConventionF...
I'm facing a particular line that is 153 characters long. Now, I tend to break things after 120 characters (of course, this is heavily dependent on where I am and the local conventions.) But to be honest, everywhere I break the line just makes it look bad. So I'm looking for some ideas on what I should do for it.
Here's the line:
priva...
Hi, I am just wondering. Do I need to call System.exit(0); right before main method of a Java command line application ends? If so, why? What is the difference from letting it exit on its own, if I would just always put there 0? What is not cleaned up?
Thanks in advance.
...
Hello,
I have observed that the general coding convention for a successful completion of a method intended functionality is 0. (As in exit(0)).
This kind of confuses me because, if I have method in my if statement and method returns a 0, by the "if condition" is false and thereby urging me to think for a minute that the method had fa...
I've been told that an Eclipse workspace is the equivalent of a Visual Studio solution. But I've also been told that people commonly use a single workspace for all their work. Are these apparently conflicting statements correct? If yes, how do we then create and maintain the equivalent of multiple VS solutions in Eclipse?
Secondly, in t...
Possible Duplicate:
Is there a reason to not use Boost?
In my distaste for over-re-using small libraries that I had designed for different purposes (filesystem, network etc) for each project I had become to like the taste of using a larger general purpose library such as Boost.
If it saves time (and money depending on the ge...
Imagine a SOAP RPC method getBill that returns an instance of this class:
class Bill:
customer = String
total = Double
Now, assume that the Bill class and the getBill method are defined in two different namespaces, foo:getBill and bar:Bill
What should be the namespace of the accessor element of the response message? The names...
Bit of a newbie question, but I'm unfamiliar with Java. I'm thinking either:
com.company.webservices
or
com.company.webserviceretriever
or
com.company.webservice.retriever
Any thoughts or opinions on the matter?
...
Should the attributes of any particular HTML tag be listed in a specific order? Is there a convention for the order? For example, I have the following image tag in an HTML strict page...
<img src="http://example.com/media/graphics/border_bottom.png" class="border" height="5px" width="600px" alt="Lower Border" />
Should the src be li...