|
So do we not need to implement our own Swap method? Is Interlocked.Exchange the intended Swap method from Microsoft?
Started by Joan Venge on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Interlocked.Exchange only works on reference types: there are different overloads for int, ... .
Thread-safe; you probably don't need this most of the time .
No reason why not, although it's not completely general purpose:
It's guaranteed to be atomic, i.e .
|
|
I have a class which is intended to be abstract. This means: When someone subclasses it, a few methods MUST be overwritten.
But on the other hand, those methods are not intended to be called manually from anywhere except inside the abstract class (the...
Started by HelloMoon on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Do not rely on comments....
If you cannot do that then you should try to generate a runtime error (at the very least in a debug build) if the subclass is not written correctly .
Whenever possible write your code so that improper implementations fail to compile .
|
|
Hello.
I'm very curious - are Qt's signals and slots (delegate patter?) intended only for GUI callback or they are perfectly fine and intended for entire app? I mean, is it better to split app into small, self-contained objects (classes) and interconnect...
Started by Eye of Hell on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
The receiver may actually ....
They are a strictly one way communication mechanism.
They work very well for networking code for instnce
QT's signals and slots are not intended for returning values from the reciver.
You can use them for everything.
|
Ask your Facebook Friends
|
I have the following snippet of code that's generating the "Use new keyword if hiding was intended" warning in VS2008:
public double Foo(double param) { return base.Foo(param); }
The Foo() function in the base class is protected and I want to expose it...
Started by Guy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The difference comes when you method does something....
Since the existing code was protected , it isn't as big a deal - you can safely add the new to stop it moaning .
The new just makes it absolutely clear that you know you are stomping over an existing method .
|
|
Hi,
I want to buy a new laptop. I would want to do large scale dataset computations on my laptop. I dont intend to play high graphics games on my laptop. Mostly I program in Java and I would want parallel algorithms and data intensive computations like...
Started by ajay on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
The only real need for....
Be sure however to have a 64 bits system, or you won't use all that RAM .
Graphical card is sufficient (you can find more details about it at this link ) .
Powerful CPU and lot of RAM.
I think that would be matching to your needs.
|
|
I've been successfully using Django's admin panel for internal users for a while but I recently hit a brick wall while trying to customize it and I'm curious if I'm spending too much time on it. So, my question is:
Is Django's admin panel intended to ...
Started by guidoism on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
The zip-code to state mapping, for example, that no end-user should... .
Databases are full of lookup and administrative tables.
Django Admin is for things where there's no value in doing anything more than the default add/change/delete processing it offers .
|
|
G'day all, I have a Player class, which inherits from an ArmedHumanoids class, which inherits in turn from a Humanoids class.
Where and when should I create the Player object so that it is accessible in all my other classes - for example, a selectPlayerRace...
Started by elwynn on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
As I understand it you want to get a global access to some instance of Player but would not need to extend some other class or implement some interface to do so (which means you don't have ... .
It sounds like you are looking for a static declaration here .
|
|
Hi,
The other day this code was working. I changed some things and re-ran it and now it doesn't work as intended. Obviously something I changed altered the behaviour, but I have gone back and reverted all of those changes and it still doesn't work. Disregarding...
Started by Logan Serman on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Defining a flow layout for this use is not recommended... .
GridLayout gridLayout = new GridLayout(15, 15);
The flow layout may have changed due to using a new look and feel, different fonts or some Java VM upgrade .
It would be much better to use a GridLayout.
|
|
Possible Duplicate:
Linux file system
As the title says, what is the intended purpose of top-level linux/unix directories and what should they contain? What is the meaning of their names? e.g. /var /etc /opt /usr
Is there a definitive guide that applies...
Started by Rob on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
With regard to writing applications that conform to any Linux distribution, you may also want to look at the XDG Base Directory... .
Answers to all the questions you ask are covered in the FHS .
What you're looking for is the Filesystem Hierarchy Standard.
|
|
I've not yet found a clear answer to this and to clarify:
With nHibernate and SQL server are you expected to disregard or migrate your business logic stored in your stored procedures, views and triggers into HQL or application code?
Started by Neil Ramsbottom on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This means that the 'model' contains all....
In such applications, the domain model is an expressive object oriented model of the business .
NHibernate is an O/R mapper which is very suited for applications that are build using a 'domain driven' methodology .
|