Questions tagged [file-structure]

257 questions
2
votes
2 answers

What's a good way to separate the background code from the HTML displaying code?

Here's a rough picture of how I how I have my files and what they do. index.php at the start displays the beginning HTML tags and includes header.php (a div of links), and at the very end includes footer.php which displays the end HTML tags. In…
2
votes
1 answer

How to keep FileSystemWatcher running when App Pool stops

Is there a feasible way to allow an instance of the FileSystemWatcher class to continue to run, even when the application pool shuts down due to inactivity, say overnight? The .NET default is 20 minutes of inactivity. Ideally, I'd like for the…
Matt
  • 23,363
  • 39
  • 111
  • 152
2
votes
3 answers

fopen doesn't open file completely

I'm writing a program that is creating a lookup table from two tables that are in two separate files. When I read the first table, everything is read correctly. However, when I am reading the second file, fopen doesn't seem to open the whole file.…
Rommel Alonzo
  • 61
  • 2
  • 8
2
votes
1 answer

What can I do to better structure my File Directory?

I am working on a dynamic blog/portfolio: Ref Link: http://www.andrewryan.me/ I have been working on my personal website for more than a month now. I keep modifying things because I feel like I am setting up this entire thing wrong. I know I am in…
Andrew
  • 61
  • 1
  • 13
2
votes
3 answers

Does the structure of a C# file affect what is compiled?

Does the structure of a C# file affect what is compiled? For example, would the order of members (in terms of where in the file it exists) affect the compiled class?
StuperUser
  • 10,555
  • 13
  • 78
  • 137
1
vote
1 answer

Modification of directory into file in Linux by using inode structure in C program

I want to change a directory into a file, I did some research. In Linux, inode structure stores the metadata about the file and directory. I want to change the file protection mode from Directory to file, Print some general file info #include…
Nimit
  • 1,714
  • 3
  • 22
  • 33
1
vote
1 answer

Compressing and Encrypting Data Into Blocks

I am working on a compressing and encryption system and I have run into a little roadblock that I think I can overcome by thinking it through with some professionals. Goal I want a file container system that will be able to hold many types of files.…
DanielG
  • 131
  • 11
1
vote
2 answers

B+ trees, choosing the order

I am studying B+ trees for the first time. I just want to know, on what basis should a developer choose the order of the B+ tree? Also, is there something like, B+ trees for the dummies tutorial? I desperately need it.
simplfuzz
  • 12,479
  • 24
  • 84
  • 137
1
vote
2 answers

How can I use both header files and cpp files within other headers?

I am working on a project in Visual Studio and I decided to reorganize a lot of my code. Unfortunately, I am running into problems with linking different headers and their cpp files. I have one header file that contains the libraries which get…
1
vote
1 answer

GitHub API not creating directories correctly using Python

I'm using the Github API and Python to attempt to generate a file structure in a repository, but the directories aren't forming correctly. To authenticate and create the repository, I'm using the Github library, and the create_file_structure…
1
vote
1 answer

PDF file with two trailers?

If I analyse multiple PDF files with a hex editor, I see that all of them have two trailers. That's possible if an object has changed or renewed (https://blog.idrsolutions.com/multiple-trailers-in-a-pdf-file/), but in my case, the PDF files are not…
Moooz
  • 15
  • 5
1
vote
1 answer

tRPC stops working when moving code to src

I'm creating a simple twitter clone with Next and TRPC, I already got tRPC working, but I would like to move all my code into the src directory. I noticed that just by simply moving everything, TRPC stops working with the following error: TypeError:…
Jeremy
  • 1,447
  • 20
  • 40
1
vote
1 answer

Cmake link own library with multiple other libraries

I have a project and the file structure of it looks like this: |-- CMakeLists.txt |-- build |-- include |-- libs | |-- glad | | |-- include | | | `-- glad | | | `-- glad.h | | `-- src | | `-- glad.c | `-- glfw | …
m100re
  • 88
  • 5
1
vote
1 answer

How do I use .htaccess to limit file uploads to .pdf?

I have a simple upload form that allows a file to be uploaded to a folder in the site. I don't want to allow anything but .pdf files to be uploaded. However, I cannot modify the form at all to limit the upload. And I can't use PHP on the back end…
codescribblr
  • 1,146
  • 2
  • 11
  • 29
1
vote
0 answers

Best practice to for storing SVG in React app?

The question may be trivial but I am a bit confused. I imported to my React app some SVG files and I wonder what is the best place to keep them to have a clean file structure. I have two folders that I assume could be the best for them. The first is…
Yerbaneyo
  • 45
  • 5