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
17
votes
2 answers

SML: What's the difference between using abstype and using a signature to hide the implementation of a structure?

I've done a little work in SML in the past, but I'm now starting to get to the more interesting parts. Using the abstype...with...end construct, I can make things but keep their implementation details hidden. I can also create a signature of the…
Alan
  • 171
  • 1
  • 3
17
votes
6 answers

Is there a way to access individual bits with a union?

I am writing a C program. I want a variable that I can access as a char but I can also access the specific bits of. I was thinking I could use a union like this... typedef union { unsigned char status; bit bits[8]; }DeviceStatus; but the…
PICyourBrain
  • 9,976
  • 26
  • 91
  • 136
17
votes
3 answers

How to structure my HTML files properly?

For a basic static website, with a few pages and sub-pages, I'm kind of confused on best practices for directory structure for the HTML pages. Say I have a simple website like this: An index (home) page, about, contact, and news page. On the news…
MetalEscape
  • 293
  • 2
  • 3
  • 9
17
votes
2 answers

PHP - How to build tree structure list?

So, my problem is, that I want to build a tree of these 2 tables: Parent table: +-------+---------------+ | pr_id | parent_name | +-------+---------------+ | 1 | p | | 2 | p_0 | | 3 | p_0_1 | | 4 …
Vaiman Hunor
  • 404
  • 1
  • 4
  • 12
17
votes
6 answers

Does storing a lot of images in a single directory slow down image retrieval?

If i have a site where users can upload as many images as they want(think photobucket-like), what is the best way to set up file storage (also, all uploads get a unique random timestamp)? site…
sqram
  • 7,069
  • 8
  • 48
  • 66
16
votes
3 answers

What does an unnamed zero length bit-field mean in C?

I saw the following example in the C standard draft (n1570): $3.14 paragraph 4 : A structure declared as: struct { char a; int b:5, c:11, :0, d:8; struct { int ee:8; } e; } So, What does :0…
msc
  • 33,420
  • 29
  • 119
  • 214
16
votes
2 answers

plot list structure in R

I work more and more with highly nested lists such as: mynestedlist<-list(list(LETTERS,month.name),list(list(seq(1,100,5),1,1),seq(1,100,5),seq(1,100,5))) and sometimes I struggle to understand the structure of the list I am working on. I was…
matmar
  • 318
  • 2
  • 13
16
votes
7 answers

[ERROR]Native table performance schema has the wrong structure

150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure 150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure 150814 9:09:14 [ERROR] Native table…
Cherry
  • 313
  • 3
  • 4
  • 10
16
votes
16 answers

Is it compulsory to learn about Data Structures if you want to be a Java/C++ programmer?

So do I really need to learn about them ? Isn't there an interesting way to learn about stacks, linked lists, heaps, etc ? I found it a boring subject. **While posting this question it showed some warning. Am I not allowed to post such a question ?…
Serenity
  • 4,968
  • 19
  • 65
  • 104
16
votes
2 answers

How can I declare and initialize an array of pointers to a structure in C?

I have a small assignment in C. I am trying to create an array of pointers to a structure. My question is how can I initialize each pointer to NULL? Also, after I allocate memory for a member of the array, I can not assign values to the structure to…
user246392
  • 2,661
  • 11
  • 54
  • 96
16
votes
2 answers

How to Break knockout view model in parts with requirejs

I am currently working on an application which is enlarging itself due to so much functionality. Here i am going to present some sample code to understand. function test(){ var self = this /* Define Properties */ self.TaskSection =…
Muhammad Raheel
  • 19,823
  • 7
  • 67
  • 103
16
votes
2 answers

Web Application (Django) typical project folder structure

I am very new to web development, just wanted to figure out if there is a recommended(preferred) project folder structure to use (may be even specific to Django based projects). Thank you.
Greg
  • 227
  • 1
  • 2
  • 9
16
votes
3 answers

C# P/Invoke: Marshalling structures containing function pointers

Sorry for the verbose introduction that follows. I need insight from someone knowing P/Invoke internals better than I do. Here is how I'm marshalling structures containing function pointers from C to C#. I would like to know whether it's the…
Gregory Pakosz
  • 69,011
  • 20
  • 139
  • 164
16
votes
8 answers

Why is DateTime a structure in .Net?

Why is DateTime a structure instead of an inheritable class? (I would like to be able to override the ToString() method but I can't.)
Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
16
votes
7 answers

Should I use Enum, static Class, Dictionary or Struct to represent these "labeled floats" in C#?

I have a constant data structure that represents the relative height of each human vertebra, normalized in relation to total spine height. This is derived from anthropometric studies, etc. I have implemented it in Python as a tuple of tuples, each…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252