Questions tagged [file-structure]

257 questions
1
vote
1 answer

How to share Database models between two modules?

Background I am currently working on a web project in python that is hosted on AWS Elasticbeanstalk. We have two deploy-able web apps. A front end flask application and a back end flask application. Structurally The two are in the same git…
1
vote
0 answers

Mixins / mixing modules and files

I know that you can have multiple modules in a single file using the mod keyword. I know that you can also split a module across several files using the file structure described in the tutorial: ├── english │ ├── farewells.rs │ ├──…
ethanabrooks
  • 747
  • 8
  • 19
1
vote
5 answers

Organising classes - Best practice?

A quick question about best practice with PHP classes. I have seen people use filenames such as something.class.php to organise their classes in external files. So, is it best practice to have one file per class, or multiple classes per file. At the…
Saladin Akara
  • 2,518
  • 6
  • 30
  • 50
1
vote
1 answer

Layout of Node.js Application

I'm new to Node.js and am unsure about how to layout some things. My directory structure is as follows (I'm open to changing this): - controllers - helpers - middlewares - models - BlockLibraryConfigs.js - BlockMosaicStreamer.js -…
Sara Fuerst
  • 5,688
  • 8
  • 43
  • 86
1
vote
4 answers

c++ where/how to correctly define static text

I am creating a console program in C++. I have static text lines like "error wrong usage, usage is: program " or "game over!" I recently had a C project where all code had to be all in one c file. I just made lots of defines…
t0b4cc0
  • 319
  • 4
  • 19
1
vote
2 answers

linux kernel: how to get 'struct file' pointer inside kernel for a device file?

Is there a way to get a struct file pointer for a device file inside linux kernel? I am writing a kernel module. I want to access file * for a scsi device (e.g. /dev/sg1). Can I access it from the kernel without having to open the device in user…
1
vote
2 answers

Should I make a new PHP file for this code?

I am customizing an already existing theme. The theme uses a header.php and a footer.php. I noticed that the and tags are split between the two PHP files, respectively. If I want to make a
element that will not be a part of the…
DarthVoid
  • 604
  • 3
  • 9
  • 21
1
vote
1 answer

Need help using .BAT files to create a complicated file structure with texts documents

I am trying to create a batch file(s) that makes a folder, that contains 9 folders, with each of those 9 folders containing a text file, each of which has similar, but unique text. What I have been able to scrap together is a batch that creates 1…
user2813209
  • 91
  • 1
  • 1
  • 7
1
vote
1 answer

Stylus global variables

I have a core.styl where I put my grid-style, some stylus-functions and some variables. This file should be imported in all of my routes. Beside that I have an page.styl which depends on my current route (e.g. contact.styl for /contact) Note: My…
1
vote
0 answers

Relative Object Data path not working in PhantomJS

I have a PhantomJS script that goes through folders in my file system and takes screenshots of HTML pages. Because of window size and a variety of issues explained here I've opted to place the HTML file in an Object of the width and height of my…
Oliver Evans
  • 960
  • 1
  • 20
  • 43
1
vote
5 answers

Beginner - C# iteration through directory to produce a file list

The end goal is to have some form of a data structure that stores a hierarchal structure of a directory to be stored in a txt file. I'm using the following code and so far, and I'm struggling with combining dirs, subdirs, and files. ///…
dassouki
  • 6,286
  • 7
  • 51
  • 81
1
vote
1 answer

File structure preference

I'm a young developer and I'm trying to get some best practice down. I hope my question isn't subject to too much opinion and I can get a standard answer here. Basically I have a big ol' JS file I wrote, couple thousand lines long. There are three…
Magic Man
  • 15
  • 7
1
vote
1 answer

File structure of a Procedural C++ program

I am new to c++ and am writing a procedural program to get the hang of that side of it. I will have a collections of functions that call each other and some include statements, namespace statements, and constant declarations. My questions…
Bren
  • 3,516
  • 11
  • 41
  • 73
1
vote
2 answers

404 error with index.html file

I get a 404 error when I run my project, my JBoss server is running fine. Here is in the index.html: First Name:
Last Name:
Bawn
  • 509
  • 3
  • 13
  • 36
1
vote
0 answers

Getting file structure in the client browser even when offline using JavaScript

I want to display the file structure of the my project folder (downloaded from my site only) in the user/client's web browser even when user is offline. Example: my_project/ │ css/ │ │ style.css │ │ js/ │ │ js.js │ └…
user2569737
  • 101
  • 6