Are all immutable objects singleton instances? [closed] - immutability

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Are all immutable objects singleton instances?

No.
Immutable objects are unchangeable, the normal practice for these is to pass (inject) all required values via the constructor (i.e. they are specified when the object is instantiated), these are then externally unchangeable for the lifetime of the object.
Singleton objects are when there is a single instance, that instance could be immutable but seldom is.

Related

Monitor a process for actions applied on a file [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to monitor a process in windows to check what actions it performs on a particular file including renaming it, or encrypt it. I want to generate events for these actions.
its easier to monitor the file than the process. Take a look at FileSystemWatcher class. http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx

Security and speed of linq with stored procedure [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to use linq with stored procedure in asp.net,
but if it reduces security of information, I prefer using linq without stored procedure.
Is there any source to guide me about this?
Any security risk of using linq with stored procs would be the same as using stored procs directly with the old school Db/SqlCommand approach. I would suggest you see LINQ-to-SQL vs stored procedures? the accepted answer gives a pretty good detail of the advantage each have over the other.

Is there a way to allow only one instance of an existing win application? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Is it possible to allow only one instance of any windows app? If yes, how?
Thanks!
You can create a named mutex. At the start of the application, typically the WinMain() function, if you succeed in having the mutex, it implies the instance is the first one else you can flag an error or activate the first application using other means.
HANDLE hMutex = CreateMutex(NULL, FALSE, "MY_MUTEX_123_UNIQUE_STRING");
if (ERROR_ALREADY_EXISTS == GetLastError())
std::cout<<"This is not the first instance\n";
else
std::cout<<"This is first instance\n";

Data Structure Comparison [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am looking for an aggregated summary of comparison of popular data structures. Kind of one place where i can see all the data structures with their complexities, advantages and disadvantages.
http://en.wikipedia.org/wiki/Comparison_of_data_structures
It compares a few of them, but there are a lot of different structures.

What do these Fortran (90) statements do? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have run into the follow code and I do not understand it. What does it do?
A(*)
do n=(k,k-1,j+1-k)
A(*) looks like (part of) the declaration of an 'assumed-size array'; the typical use of this would be in the declaration of a dummy argument to a procedure. Distinguish carefully between assumed-size and 'automatic' arrays. Assumed-size arrays are deprecated in modern Fortran but common in FORTRAN77 and earlier variations.
do n=(k,k-1,j+1-k) looks like a syntactically-incorrect loop statement. The correct form would be do n=k,k-1,j+1-k which loops over the range [k,k-1] in strides of size j+1-k.

Resources