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
1 answer

Protecting Photo Folder

I would like to start protecting my photos folder, the photos are for sale and I would like to stop people accessing the photos by URL and I'm on a Windows server. The photos folder should only be used/seen by the website scripts. I have read in a…
TheCarver
  • 19,391
  • 25
  • 99
  • 149
1
vote
1 answer

How to edit multiple variables inside a structure in C

typedef struct { string color; int age; }Dog; int main(void) { Dog cookie = ("brown", 6); cookie.color = "blue"; cookie.age = 12; } Hello, I'd like to know if there's a way to edit multiple structure values as such, while only…
JWpark
  • 15
  • 3
1
vote
2 answers

How do I keep application.js in my Rails app from getting too big, and how do I structure it?

Or: How can I structure the code in my application.js file of my Rails 3.0.10 app, or distribute it (logically) among various files so that I know what the bleep is going on? Currently my application.js is running to 700 lines of code. It's…
Purplejacket
  • 1,808
  • 2
  • 25
  • 43
1
vote
1 answer

Django - Allow duplicate user's emails in the grand User model, but unique in its extended models?

Django - Allow duplicate user's emails in the grand User model, but unique in its extended models? I'm working on a project in Django which have a User model extend from AbstractBaseUser; and 2 models extend from User (Customer and Technician). Its…
jeology
  • 11
  • 2
1
vote
1 answer

Pull data from dynamic instances of views

I'm putting together a data entry form for vendors of an app. To save on time and make coding efficient, I put many of the more standard layouts in their own structures, of which I called instances. The issue is I want to be able to take what people…
AzAzinZ
  • 21
  • 2
1
vote
1 answer

Can I overwrite operator_rules of infix_notation and keep pyparsing code dry when using forward-defined elements?

In shortened and simplified pseudocode I have something like this: arg = Forward() ... ... func_call = somestuff + arg term = ... | ... | arg expression = infix_notation(term, operator_rules) ... ... arg <<= expression | func_call | ... |…
1
vote
0 answers

using the stringparm and the powerobjectparm

I need help, I have problems with the open event of a window the first dw just sample data from another dw and the second dw using a structure to display uploaded files this is the code of event list "open" of my window st_structure st String…
Pedro Paiz
  • 11
  • 2
1
vote
2 answers

Using Python and ctypes to pass a variable length string inside a structure to c function (generated by Matlab Coder)

I am trying to pass a variable size string inside a structure from Python into C code (or rather into a DLL/SO). The C-code is generated by Matlab Coder, so I am fairly limited to changing the C-code (although some tweaks can be made in Matlab to…
SilverPy
  • 53
  • 5
1
vote
0 answers

How to add code sections that would be visible in Pycharm structure window

I'd like to group functions, so it would be easier to navigate them in Pycharm structure window. I tried using #region ... #endregion , but it's not visible in structure window. It only allows to collapse a piece of code. I also looked for some…
Mateusz
  • 13
  • 2
1
vote
0 answers

Python code structure with global variables

I've worked a lot with Python in Jupiter Notebook. In the beginning my projects were small, and everything worked fined. However, my projects are becoming bigger, and my notebooks can become messy with dozens of functions and hundreds of programming…
Mark
  • 45
  • 5
1
vote
0 answers

why when I change the device type in the inspect window the whole structure of my website changes

[this is the viewport the device type is mobileand this is when the device is desktop](https://i.stack.imgur.com/kRGJE.png) when I change the device type in the inspect window from desktop to mobile the fixed elements on the right get out of the…
1
vote
0 answers

ImportError: libLerc.so.4: cannot open shared object file: No such file or directory

Using this structure i try to import GRIBDownloader using from modules.GRIBDownloader import GRIBDownloader (in the GRIBDownloader file is a class called GRIBDownloader) with weathertryouts.py as my main file in which i try to import this. I…
1
vote
1 answer

Issues with string in structure in C codig

I have some issues with strings in structure, i think that the problem is strcpy(), but i can't resolve it. My exercise says that i have to write a program that prints the distinct words given as input, sorted in order of frequency of decreasing…
Numero8
  • 13
  • 2
1
vote
2 answers

Iterate through a MATLAB structure numerically

Is it possible to iterate through a MATLAB structure numerically like a vector instead of using the field names? Simply, I am trying to do the following inside an EML block for Simulink: S.a.type = 1; S.a.val = 100; S.a.somevar = 123; S.b.type =…
tmar89
  • 33
  • 1
  • 6
1
vote
2 answers

C# Structure with inner Clear() method

I want to have simply structure for store information. My problem is to create inner method that clear stored values. public struct GraphValues { public int min, max, ...; public GraphValues(int min, int max, ...) { …
okubik
  • 11
  • 1
  • 2