definition

.NET Threadpool worker threads and asynchronous IO threads

OK, as I understand it, the .NET Threadpool maintains a number of background threads ready to be used for tasks of some kind. The Get/SetMinThreads and Get/SetMaxThreads methods contain two parameters that can be returned or adjusted. According to MSDN the two parameters indicate the number of worker threads and the number of threads ...

c++ pair template struct declaration ambiguity!

In definition of pair class in c++ there are two typedefs. what are they for? there are no use of them in the code! template <class T1, class T2> struct pair { typedef T1 first_type; typedef T2 second_type; T1 first; T2 second; pair() : first(T1()), second(T2()) {} pair(const T1& x, const T2& y) : first(x), second(y) {} t...

Mutually recursive definitions in Clojure

How do I do mutually recursive definitions in Clojure? Here is a code in Scala to find prime numbers which uses recursive definitions: val odds: Stream[Int] = cons(3, odds map { _ + 2 }) val primes: Stream[Int] = cons(2, odds filter isPrime) def primeDivisors(n: Int) = primes takeWhile { _ <= Math.ceil(Math.sqrt(n))} filter { n % _...

Is Java orthogonal?

Hi, I am wondering if Java is orthogonal or not, and if yes, then which are its features that make it orthogonal. How can you determine if a language is orthogonal or not? For example, I found on some website that C++ is not orthogonal, but no explanations, why not. What other languages are orthogonal? Please help me, because there is a...

What is a full powered closure?

I was at a Java conference on Scala the other day and the speaker referred to 'full powered closures'. I am having a hard time nailing down a definition that makes sense to me. I have read the wiki page on closures but it really didn't answer it for me. Can someone help me with a clear cut definition? Maybe even include a simple examp...

What's a buffer?

Hello! As far as my understanding of languages goes, a buffer is any portion of memory in which a data is stored like an int,float variables, character arrays etc. However, I was reading buffer overflows and came across this link while reading about stack http://www.tenouk.com/Bufferoverflowc/Bufferoverflow2a.html The diagram in this li...

Simple definition of "semantics" as it is commonly used in relation to programming languages/APIs?

It occurred to me today that although I've adopted and don't infrequently use the term "semantics" when referring to language elements and naming conventions, I don't have any sense of a formal definition. My attempt to find a formal definition in the programming domain made my eyes glaze over. I have a sense of its meaning from the co...

C++: declaring a class with functions, that handle string

Hello, I haven`t found answer to my question using search, though I thought it is simple and popular. Anyway, my question is: I have got a header file, which declares a class and functions in it. It looks like that: #ifndef SOME_CLASS_H #define SOME_CLASS_H #include <string> class mySomeClass { public: bool a_func(string & my...

C#/XML: 'System.Xml.XmlDocument' does not contain a definition for 'Descendants'

I just received an error a while ago from this code: private void ShowXMLDatatoRTB() { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load("XMLFile.xml"); var persons = from person in xmlDoc.Descendants("Person") select new { Name = person.Element("Name").Value, City = person.Elem...

Explain Polymorphism ?

Now can anyone explain polymorphism to me? I'm not sure I am understanding it correctly. In the Python scope, what I am getting out of it is that I can define parameters as followed: def blah (x, y) without having to specify the type, as opposed to another language like Java, where it'd look more along the lines of: public void blah...

Explanation of BASE terminology

The BASE acronym is used to describe the properties of certain databases, usually NoSQL databases. It's often referred to as the opposite of ACID. There are only few articles that touch upon the details of BASE, whereas ACID has plenty of articles that elaborate on each of the atomicity, consistency, isolation and durability properties....

What does the word "semantic" mean in Computer Science context?

I keep coming across the use of this word and I never understand its use or the meaning being conveyed. Phrases like... "add semantics for those who read" "HTML5 semantics" "semantic web" "semantically correctly way to..." ... confuse me and I'm not just referring to the web. Is the word just another way to say "gr...

What is the differences between the term 'object' and 'instance' in a programming language?

I cannot distinguish the two terms. How about you? ...

What is the macro definition of isupper in C?

I want to know how the "isupper" macro is defined in C/C++. Could you please provide me the same or point me to available resources. I tried looking at ctype.h but couldnt figure it out. ...

jquery toggle on dt element working in Firefox but not other browsers

The following works in Firefox but in no other browser. Is the parent child relationship of <dl>s different in the different browsers? $('dd').parent().find('h3').toggle( function(){ $(this).next('dd').slideDown(500); }, function(){ $(this).next('dd').slideUp(500); } ); HTML looks like: <dt><h3>stuff t...

C# Compiler says function is not defined, when it is...

I just need another pair of eyes... I don't see anything wrong with the following. In fact, I swear I had something just like this not long ago, and it worked. In my Collections.dll: namespace Collections { public class CSuperAutoPool { public static CSuperAutoPool ActivateByType(Type typeToBeActivated, params object[] act...

definition/implementation question in c#

Hello all, I am trying create such a plugin architecture that; IPlugin: an interface that all plugins must implement. NormalPlugin: a normal plugin. ComplexPlugin: a plugin which, beside implementing the base methods, has some custom methods. HostApp: an app that knows what an IPlugin is. currently the host app will have ComplexPlugin a...

JavaScript: declaring and defining a function separately?

If I want to give a JavaScript variable global scope I can easily do this: var myVar; function functionA() { myVar = something; } Is there a similarly simple and clean way -- without creating an object -- to separate the "declaring" and the "defining" of a nested function? Something like: function functionB; // declared wi...

What is the `isolate primitive` mentioned in the documentation of the "cereal" package?

There is an extensive collection of unique words in on the Haskell repository, cabal, (very slight exaggeration). Anyway today's term is isolate primitive. What is an isolate primitive? How does it compare to a non-isolate primitive? Unfortunately, I don't have the background to know most of the Haskell parlance, and Google isn't helping...

What is a hack?

...