Questions tagged [file]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Directory structures

I'm trying to create a new directory inside my pset1 directory. When I execute "~/ $ mkdir ~/pset1/mario" I get "bash: /home/ubuntu/: Is a directory". I think I need a better ...
0
votes
1answer
14 views

Terminal window not update

Struggling after Certain changes were made on the file and compiled as compiler failed to identify the changes made.I.e the terminal window displays the same errors in the file. This meant program ...
0
votes
0answers
18 views

Flask file uploading, processing and sending back

wondering if anyone can please share some useful resources for uploading, processing and downloading files within a Flask application. I have spent a lot of time looking for resources online, but the ...
0
votes
1answer
82 views

MY code works with a hardcoded string, but not a string object

I'm working on pset6 2020 dna. I'm having trouble inputting the sequence file to be compared into my search function. If I just open the file and copy paste the sequence into the code as a string, it ...
0
votes
1answer
13 views

Querry regarding maintainence and usage of files in c

So, csv files are used to store data and so does .txt files. I just want to know how do we manage a large text file. For example, if i have a file which contains all the info about school students, ...
0
votes
1answer
7 views

writting a function to display a file

in the week 4 shorts, it was told how we can write cat command from linux in c: i Wrote the following code: #include <stdio.h> include void Print_File(FILE *f) { char s = fgetc(f); while (s ...
0
votes
1answer
14 views

What does a pointer to a file really represent?

I have a question regarding file pointers (i.e FILE *). I am having a hard time understanding conceptually what this represents in terms of its memory. When the concept of files was introduced in ...
1
vote
0answers
61 views

CS50, pset2, crack, suggested dictionary file

I am taking cs50 on edx and I am currently on pset2, crack. I want to find a dictionary file that has a fair (maybe over 50,000?) amount of words in it to encrypt and compare them with the hashed ...
0
votes
1answer
42 views

Code not working when saved inside bigger files

Hello, I am following along in week 1's second lecture, specifically trying to code capitalize0.c. Previously, all my coding files (cash, cash.c, hello, etc) were aligned with my bigger files, psest1 ...
0
votes
1answer
75 views

cs50 - I can not clear check pset1 Mario less cause “…required files…”. I'm in the right directory.

The check50 is returning I have not created the file, which I see has been a problem others experienced, but all the solutions offered are to get into the correct directory. I am in the correct ...
0
votes
1answer
55 views

Files Won't Open In The Directory

Hey so I have written some code, needless to say I am a bit confused, I have pasted it below. It is for pset4 recover and so I want to open the files that are contained in card.raw, however despite ...
0
votes
1answer
133 views

Detecting if we already found a jpg

I'm having trouble figuring out how to print extra 512bytes, if the first jpg is longer than that, like how to loop UNTIL it hits the next 4 header indicators. In this code example I've tried with a ...
0
votes
1answer
148 views

[PSET4][Recover] Why does FILE* img work but not FILE *img?

A little background first: I really enjoyed figuring out recover.c. After finishing the successfully once, I wanted to cement the concepts in my head, so I rewrote it from scratch as best I could, ...
0
votes
1answer
539 views

How Do I Create A File

I am attempting pset1. Let me quote the first line of instructions: "Shall we have you write your first program? Inside of your pset1 folder, create a new file called hello.c, and then open that file ...
0
votes
1answer
24 views

Ports and Files

In Week 6 lectures where we first learn about computer networks, we learnt about ports. David said that the ports tell the listening computer what type of file it is, e.g. port 80 for HTTP, 25 for ...
0
votes
0answers
237 views

crack.c brute force - optimization needed!

I have written a recursive algorithm that should break the encryption, although to do so, it creates a file for each possible size of a string (8 is max). After it depletes the 1 size combos, it ...
1
vote
1answer
200 views

how to read integers (separated with spaces) from a file line-wise?

I have a file filled with integers and these integers are separated with spaces and a new line. This means that there are a bunch of integers per line. I want to read each line of integers and store ...
1
vote
1answer
70 views

problem mounting john harvard's home directory

I type in \\w.x.y.z\jharvard into address box on top of folder (where w.x.y.z is the IP address of the appliance - not literally w x y z but with the numbers in IP address at bottom right of the ...
0
votes
0answers
85 views

how to pass arguments to copy file program?

i am learning on study50 regarding file io. the exercise asks us to write a program to copy a file. I have written the code correctly for this program. I have named this cp.c and usage cp source ...
0
votes
1answer
116 views

edx pset 3 file not found

Is it too late to do pset 3 now? Below message seems suggest the file is no longer available.. Thanks~ jharvard@appliance (~): ~/Dropbox bash: /home/jharvard/Dropbox: Is a directory jharvard@...
3
votes
2answers
550 views

Where are cs50.c / cs50.h?

I've seen in week 5, David opened up the cs50.c and cs50.h files. I'd want to further look into that myself but can't found it anywhere in my appliance. Where are cs50.c and cs50.h?
0
votes
1answer
322 views

pset 5 Recover check if file open

How do I check if I already opened a jpeg file to write to? I could declare an int outside of the loop that I set to 1 if I open a file, but I think there must be another way... Some kind of function ...