Design pattern to dynamically create patterns found in a list of links
Can anyone help me think of a way to dynamically generate the patterns section of a tool I am creating? I’m not sure how to store and generate these “patterns” dynamically.
What data structure is suitable for implementing dynamic huffman encoding and decoding on a piece of text?
Some pseudo code or resources will be appreciated.I was thinking if implementing it in form of a BST stored in an array. However,not all operations can be performed easily using this approach. I am open to using STL’s for this purpose as well.My main purpose is to implement it in the simplest manner possible.
Heap overflow vs stack overflow
So as a general rule to avoid a stack overflow, big objects should be allocated to the heap (correct me if I am wrong). But, since the heap and the stack expand towards each other, wouldn’t this cause heap overflow or alternatively limit the space for the stack and higher the chances of stack overflow?
Find the peak of each islands in sparse matrix
I have a sparse matrix that contains several islands of unknown size. I would like to find the highest peak of each islands. Consider this matrix as an example:
Data structure for accessing units of measure
TL;DR – I’m trying to design an optimal data structure to define units within a unit of measure.
Single write, multiple read of stateful objects
Scenario:
How to model/structure data that contains parent/child relationships for the same entity?
I think it is just my thinking that is off here. Suppose I have two entities: question and choice. A question can be a parent or child, or both (in relation to other questions). It seems that this model is too simple and is an unresolved many-to-many, but I think my thinking is the problem here so this is more of a conceptual question. What is the best way to design/model this? Please explain why it is or isn’t a many-to-many relationship, and whether or not it needs to be resolved and why. See below:
Building a Graph Editor – How to create a data driven graph
I am developing a graph-editor that uses drag and drop to build hierarchical graphs (containing nodes and links). Each node in the graph should be linked to a table in our database (SQL Server). I did a lot of research about libraries based on javascript or/and JSON specifications to draw nodes and links. There are a lot of great examples to follow, but I have no idea about the way I can link a graph to a database (SQL Server, Oracle, MySQL…). I thought about this architecture (Question posted on stackexchange.com)
What’s the difference between a stream and a queue?
What’s the difference between a stream and a queue? They both have the concept of an ordered set of elements, but tend to have different implementations and a different vocabulary of ‘insert’/’extract’ (streams) vs. ‘enqueue’/’dequeue’ (queue). Are these interchangable? Do they suggest different concepts or patterns? If so, what are the differences?
Homogeneous vs. heterogeneous AST representation
What are the reasons to choose a homogeneous vs. a heterogeneous AST representation for implementing a complex domain-specific programming language?