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
34
votes
3 answers

Fast, templated, C++ Octree implementation

I've been searching high and low (mostly on google) for a fast, efficient, templated (ie. with STL-like properties) octree implementation, without success. I want to use this in the context of a 3D scene graph. Does such a thing exist, or do people…
Robinson
  • 9,666
  • 16
  • 71
  • 115
34
votes
3 answers

How do You structure an iPhone Xcode project?

What are good ways of building groups/folders? I've tried by feature (UI for a feature plus model etc) with a common group. I've also tried by UI, model, etc. The former keeps like things together which fits the iPhone paradigm nicely. The latter…
Scott McKenzie
  • 16,052
  • 8
  • 45
  • 70
33
votes
8 answers

Compare structures of two databases?

I wanted to ask whether it is possible to compare the complete database structure of two huge databases. We have two databases, the one is a development database, the other a production database. I've sometimes forgotten to make changes in to the…
streetparade
  • 32,000
  • 37
  • 101
  • 123
32
votes
6 answers

Can I delete these build folders when I am not running Android Studio?

I am backing up android studio projects in google drive and I found that the build folders contain thousands of files, so google drive ends up tired. My practice is that I run the 'clean project' command in Android Studio before exiting so that the…
Usman
  • 2,331
  • 2
  • 21
  • 29
32
votes
1 answer

input_event structure description (from linux/input.h)

Can someone please tell me what are the properties of the datatypes used by the input_event structure? It is defined as follows in the input.h file: struct input_event { struct timeval time; __u16 type; __u16 code; __s32 value; }; but there are no…
SP5RFD
  • 841
  • 3
  • 17
  • 31
31
votes
6 answers

Odd use of curly braces in C

Sorry for the simple question but I'm on vacation reading a book on core audio, and don't have my C or Objective C books with me... What are the curly braces doing in this variable definition? MyRecorder recorder = {0};
John
  • 2,121
  • 1
  • 23
  • 38
31
votes
3 answers

What is the correct way to setup multiple logically organized sub folders in a terraform repo?

Currently I am working on a infrastructure in azure that comprises of the following: resource group application gateway app service etc everything I have is in one single main.tf file which I know was a mistake however I wanted to start from…
Pablo Marti Cordero
  • 944
  • 2
  • 9
  • 23
31
votes
6 answers

Is a member of an rvalue structure an rvalue or lvalue?

A function call returning a structure is an rvalue expression, but what about its members? This piece of code works well with my g++ compiler, but gcc gives a error saying "lvalue required as left operand of assignment": struct A { int…
hpsMouse
  • 2,004
  • 15
  • 20
31
votes
3 answers

Read bitmap file into structure

I would like to read a bitmap file into a struct and manipulate it like eg. making a mirror effect, but I cannot understand which kind of struct should I be creating in order to read into it. Thank you for your help.
Ege
  • 941
  • 4
  • 17
  • 36
31
votes
2 answers

Why structs cannot be assigned directly?

Suppose I have a fully defined struct with tag MyStruct, and suppose that x, y, ..., z are allowed values for its fields. Why is struct MyStruct q = {x,y,..,z}; allowed, but struct MyStruct q; q = {x,y,...,z}; is not allowed? I find this very…
a06e
  • 18,594
  • 33
  • 93
  • 169
30
votes
7 answers

Quickest way to initialize an array of structures to all-0's?

I'm trying to initialize an array of structures to all-0's, using the below syntax: STRUCTA array[MAX] = {0}; However, I'm getting the following warning from gcc : warning: missing braces around initializer What am i doing wrong - is there…
TCSGrad
  • 11,898
  • 14
  • 49
  • 70
30
votes
4 answers

Best practice for storing tags in a database?

I developed a site that uses tags (key words) in order to categorize photographs. Right now, what I have in my MySQL database is a table with the following structure: image_id (int) tag (varchar(32)) Every time someone tags an image (if the…
John Dewans
  • 303
  • 1
  • 3
  • 4
30
votes
3 answers

AngularJS : How should controllers and factories/services be structured with a rich, hierarchical object model?

I read these two great articles: The state of angularjs controllers by Jonathan Creamer and Rethinking AngularJS Controllers by Todd Motto In these articles, the authors talk about the right way to use controllers (making them anemic bridges between…
richard
  • 12,263
  • 23
  • 95
  • 151
30
votes
5 answers

How to work with string fields in a C struct?

I'm having trouble making a database based on a singly-linked list in C, not because of the linked list concept but rather the string fields in the struct themselves. This is an assignment in C and as far as I know (I'm a newbie), C doesn't…
fleuracia
  • 301
  • 1
  • 3
  • 5
28
votes
1 answer

Generally speaking, how are (Python) projects structured?

I'm a bit lost when it comes to structuring my project(s). I try to structure things in ways that make sense, but always end up restructuring the whole thing at least twice per day. Granted, my projects aren't very big, but I would love to not have…
Ruben Bakker
  • 446
  • 1
  • 5
  • 11