Questions tagged [structure]

Structure is a fundamental, tangible or intangible notion referring to the recognition, observation, nature, and permanence of patterns and relationships of entities. DO NOT USE this tag for C or C++ struct questions!

A structure can be a:

  • A structure in mathematical logic: in universal algebra and in model theory, a structure consists of a set along with a collection of finitary operations and relations which are defined on it.

  • The structure of a program

For the following topics, use different tags as indicated below:

  • A : a particular way of storing and organizing data in a computer so that it can be used efficiently.
  • A (short for "structure") is a keyword in the C and C++ languages, used to indicate a structures record.
6561 questions
1
vote
2 answers

Should individual classes listen for a global event or a 'manager' update them instead?

I am wondering what is better practice - Should classes listen for a global event or should a manager listen for the event and then call public methods on those classes? for example: import App public class DualLanguageText { public function…
davivid
  • 5,910
  • 11
  • 42
  • 71
1
vote
1 answer

Assembly Language x86: Offset of an indirect operand to a structure

I created a structure that held basic information as well as some BYTE strings.. For instance: EXAMPLESTRUCT STRUCT somePrompt BYTE 20 DUP (0) ;other fields EXAMPLESTRUCT ENDS My intent was to create an array of structures with messages…
user994121
  • 77
  • 6
1
vote
7 answers

dynamic array in structure with consecutive memory?

struct Test { int var; char *arr; } int main() { Test a; a.arr = new char[50]; } The above code would create a dynamic array in the structure but the dynamic array would not be actually memory allocated within the structure, its…
Uzair Farooq
  • 917
  • 3
  • 15
  • 25
1
vote
1 answer

Infinispan tree like cache structure

I would like to use Infinispan following a tree like structure for the cache. For example, using the following data structure for ticker symbols: Exchange (NY stock exchange, AMEX...) Date Ticker I am not sure how to implement this as the only…
user899757
  • 351
  • 2
  • 4
  • 21
1
vote
1 answer

Deep copy structures to POSIX shared memory

I have two structures : struct bets{ int bets[36]; int last_bet; }bets struct board{ int type; bets *bet; }board I created a chunk of shad memory of sizeof(board). So, I got a pointer to the Board in shared memory (lest call it ptr). I…
Onica Radu
  • 183
  • 2
  • 4
  • 11
1
vote
4 answers

How do I free pointers inside structures?

I'm new to structures so please bear with me. I wrote a structure called gnt containing an integer pointer, an integer, and a boolean: struct gnt { unsigned int* num; unsigned int size; bool negative; }; Because I am allocating…
sth128
  • 93
  • 2
  • 8
1
vote
4 answers

Assigning responsibility: a Game that has Players which each has a BankAccount

I've been studying some Object Oriented Analysis and Design lately, and I feel that I got a pretty good overall feel for it. But this little scenario keeps bugging me. Let's say I'm designing a simple board game. I have class Game which holds info…
leflings
  • 646
  • 3
  • 17
1
vote
1 answer

cgicc: multi-levels of same element

I'm starting with cgicc which let me keep code short and clean. But now I'm struggling. I want to have something like that:
Andi
  • 888
  • 2
  • 10
  • 24
1
vote
1 answer

SQL tables with similar structure - best practices

Imagine that we have a website where users can read articles, view photos, watch videos, and many more. Every "item" may be commented, so that we need space to save that comments somewhere. Let's discuss storage possibilities for this…
Tomasz Kowalczyk
  • 10,472
  • 6
  • 52
  • 68
1
vote
1 answer

matlab saving a cellarray

I have a script which does not fully work: inputfield=input('Which field would you like to see: ','s') if isfield(package, inputfield) fprintf('The value of the %s field is: %c\n',inputfield,... eval(['package.' inputfield])) else …
1
vote
2 answers

Repository Structure for android project

I have an android project versioned with SVN. I have three eclipse projects inside my repository. Library project, free version project, paid version project. My current repository structure is: repository/ branches/ tags/ trunk/ …
rfsbraz
  • 2,101
  • 1
  • 18
  • 26
1
vote
2 answers

Another odd NoClassDefFoundError on WhiteSpaceProcessor

I'm strugelling with an odd problem for days now. Only one of the users of my webapp get an NoClassDefFoundError when trying to use some functionallity. This is the stacktrace: java.lang.NoClassDefFoundError: com/sun/xml/bind/WhiteSpaceProcessor …
Michel
  • 9,220
  • 13
  • 44
  • 59
1
vote
1 answer

Right HTML 5 Article Structure

I hope the question is not too generic, but I would need an advice: Which one of the following examples would you consider to be the right one? Number 1

Title

r0skar
  • 8,338
  • 14
  • 50
  • 69
1
vote
1 answer

Ideal Folder Structure in MVC 3

I am Just started a new MVC3 application.I am using EF fro data base access .I have doubts about folder structure . Here i am attaching solution explorer picture my application I Created 3 folders in Models Folder 1.View Models - this contains…
Null Pointer
  • 9,089
  • 26
  • 73
  • 118
1
vote
3 answers

Creating a Dynamically Changing Structures in C

I am trying to create a structure that can be dynamically added to with malloc and free. There are three functions that I need to implement. I need to be able to print the current structure and move to the next structure and print it as well (Needs…
jenglee
  • 343
  • 2
  • 5
  • 10