Multithreaded Server with AsynchronousServerSocketChannel
I have to implement a Server which should accept more connections. Without any deeper thoughts i decided to use the new JAVA NIO.2 classes. My current approach is: final Semaphore wait = new...
View ArticleWhat is the difference between std::unordered_map and boost::unordered_map?
I found both container used in our codes. This is a bit of confusing, especially when I include libs that depends on both of them. So what is the main difference between these two implementations? Are...
View Articleinterface changes: add new arguments to abstract c++ method
We have a large software framework where, in the heavy-lifting part of the code, we have an abstract base class, say class Base { public: virtual double eval() const = 0; }; which pretty much acts as a...
View ArticleEffect of Any() on the state of an IEnumerable
suppose i have a code already working that goes like this .... .... foreach(object item in enumerator.GetItems(arg1, arg2....) { } .... .... where getItems is a method of an abstract class...
View ArticleDifficulty understanding java implementations and methods
I am not sure how to implement a comparable and serializable interface into my abstract class. Nor am I sure on how to do the following: Create & populate a linked list with the Dog & Cat...
View ArticleHow does this custom ArrayList alter its size? [duplicate]
This question already has an answer here: Resize an Array while keeping current elements in Java? 6 answers I am reading the Oracle documentation about creating custom implementations of the...
View ArticleApache Storm – What is the difference between the Scheme and the MultiScheme...
I couldn’t find any documentation about the Scheme and MultiScheme interfaces of Apache Storm. The implementations are here:...
View ArticleDifference in implementation for Insertion Sort
I’m trying to practice programming by implementing different algorithms in different languages. I have two questions about a c++ implementation for insertion sort. First, why do most implementations in...
View ArticleHadoop Secondary Sort Composite key compareTo VS Custom Sorter compare...
In Hadoop Secondary sort the code in Composite has the following method to compare values, the Composite key class implements WritableComparable :- @Override public int compareTo(CustomKey o) { int...
View ArticleTop down mergesort. Merge operation not clear
I’m learning about top down mergesort, and I am starting to understand the recursive part. I’ve seen a couple of implementations where the merge was done with a series of while loops. However, in the...
View Article