We do our build-management with Ant, we have to build scripts, one to create a dispatchment for our customer, with hash informations, the sourcecode, installation-guide etc., the other build-file lies in the created artefact, and is the build for the customer which creates the war file from the sourcecode.
for the build-file which creat...
(I finally posted and accepted an answer to the effect of "no, there isn't, and the question isn't actually that general".)
Consider the Common Lisp function 'mapcar'. It takes a function and some lists as arguments, and calls the function with arguments pulled from the same position in each list.
Do standard libraries typically have a...
Is it a good idea to name important tags with # prefix eg #reviews, #articles (somewhat like the twitter hashtag) to separate them from thousands of regular tags?
What would be its effect on SEO and will the '#' be stripped when used in a URL?
...
http://example.com/foo.aspx?foo=bar
I'm refactoring and need to name the constant which will hold only the question mark character of this string. I'm not sure what best to name the variable, as I've never known what the proper name of that question mark was.
What should I name the constant? Or... is there something in .NET that's th...
Toying with heredocs in PHP, I realized the name of the heredoc does not have to be unique. Thus:
$a = <<<EOD
Some string
EOD;
$b = <<<EOD
A different string
EOD;
is correct and behaves exactly as you would expect.
Is this bad practice for any reason? Why does a heredoc need a name/label (EOD above) at all, since you can't referen...
I'm creating this:
# models.py
class Item(models.Model):
sku = models.CharField(max_length=20)
class Attribute(models.Model):
item = models.ForeignKey(Item, related_name='items')
Is that going to cause naming collisions in Python? Like:
# views.py
some_object.items.create(sku='123abc')
# Is there a place / way that this c...
I have a simple object that holds some [public] data.
I want to keep my interface clean, so I don't want to pre-/post- fix anything to the names of the publically accessible variables nor to the names of my function arguments.
That said, I ended up doing something like this:
template<typename T> struct Foo
{
explicit Foo(T x) : x(x)...
Visual Basic .NET
C##
etc
C#? With two pound signs?
It's on so many of these programming résumés we're getting -- from random people -- listed as a qualification.
Any ideas what these folks are talking about? Is this convention an accidental holdover from C++, or something?
EDIT/ANSWER: Turns out the corporate résumé management s...
I want to get a value from a variable then use that as the name for another variable. I got something like this:
var eval(BodyWeight[i]["ExerciseTitle"]) = BodyWeight[i]["ExerciseVideo"];
This is giving me an error, 'missing ; before statement'.
Any ideas?
...
How can I train myself to give better variable and function names (any user-defined name in a program).
...
This has "always" bothered me...
Let's say I have an interface IFiddle and another interface that does nothing more than aggregate several distinct IFiddles:
public interface IFiddleFrobbler
{
IFiddle Superior { get; }
IFiddle Better { get; }
IFiddle Ordinary { get; }
IFiddle Worse { get; }
IFiddle Crackpot { get; }...
We seems to be abstracting a lot of logic way from web pages and creating "helper" classes. Sadly, these classes are all sounding the same, e.g
ADHelper, (Active Directory)
AuthenicationHelper,
SharePointHelper
Do other people have a large number of classes with this naming convention?
...
Don't really know how to formulate the title, but it should be pretty obvious from the example.
More specifically, what rules do you use for naming "dependent" classes. For example, Blog is a pretty descriptive name itself, but how do I deal with posts? BlogPost or Post? Clearly, first name clearly expresses that it's a "subordinate" cl...
If I create a table with datetime default getdate() field that is intended to keep date&time of record insertion, which name is better to use for that field ?
I like to use Created and I've seen people use DateCreated or CreateDate.
Other possible candidates that I can think of are: CreatedDate, CreateTime, TimeCreated, CreateDateTime,...
I have a Permissions class in Java with methods in fluent style like this:
somePermissions.setRead(true).setWrite(false).setExecute(true)
The question is, whether I should name these methods set{Property} or only {property}. The latter would look like this:
somePermissions.read(true).write(false).execute(true)
If I look at these me...
If I only want to check if something is impossible or not (i.e., I will not be using something like if(possible)), should I name the boolean notPossible and use if(notPossible) or should I name it possible and use if(!possible) instead?
And just to be sure, if I also have to check for whether it is possible, I would name the boolean pos...
I have a GUI tool that manages state sequences. One component is a class that contains a set of states, your typical DFA state machine. For now, I'll call this a StateSet (I have a more specific name in mind for the actual class that makes sense, but this name I think will suffice for the purpose of this question.)
However, I have ano...
Hi All,
When I added a class with non-Ascii caharacters in the class name, it removed the non-Ascii from class name and when added directly to class it complains of non-Ascii characters.
Are Non-ASCII characters not supported in class name and variable name?
...
There is a pattern that I use from time to time, but I'm not quite sure what it is called. I was hoping that the SO community could help me out.
The pattern is pretty simple, and consists of two parts:
A factory method that creates objects based on the arguments passed in.
Objects created by the factory.
So far this is just a stand...
I am writing code that catches this OutOfMemoryException and throws a new, more intuitive exception:
/// ...
/// <exception cref="FormatException">The file does not have a valid image format.</exception>
public static Image OpenImage( string filename )
{
try
{
return Image.FromFile( filename, );
}
catch( OutOfMe...