Category "file"

How To Open and Read a File of Type FileField in Django?

I am trying to open a file that would be uploaded through the django FileField attribute. I also want to read the contents of the file and output it. But when I

New file creation detection using Python in Windows

Is there a possibility to detect if a new file is created on Windows using Python programming language? Maybe my questions sounds meaningless, but I need this i

How to load a pre-trained Word2vec MODEL File and reuse it?

I want to use a pre-trained word2vec model, but I don't know how to load it in python. This file is a MODEL file (703 MB). It can be downloaded here:http://dev

Want to protect file from copy,download

I have following requirement. Admin can upload any files like jpg,pdf,PPT,DOC file on server. End User or viewer only access the files in display/view mode.

Create File object type in TypeScript

I have a function that should only accept JS File objects. How do I create that type in TypeScript? edit: sharing my tsconfig.json { "compilerOptions": {

How to programmatically read xml file inside cab file

Is there any way for me to read contents of an xml file in a cab file in C#? I know how to use XDocument to load an xml file and read its contents, but not sure

Protecting a file by a password [closed]

I have a C# application in which i'd like to create a file : string fileName = "test.txt"; // a sample file name // Delete the fi

Can't download ipynb file

I need to download an ipynb file and so I am trying to set colaboratory as the default app to open (because when I try it says "Please install an app, or if one

Populate jsTree from external JSON file

I've been experimenting with the jQuery.jsTree library and need some help. Please could someone advise me on how to read json_data from an external .json file.

Selenium give file name when downloading

I am working with a selenium script where I am trying to download a Excel file and give it a specific name. This is my code: Is there anyway that I can give th

Trying to connect to wwwroot and get a image

I work in aspnet core mvc technology, I manage to add an image, it does go to wwwroot, but the image does not display well in the browser Example: enter image d

request.FILES always empty on file upload

I am totally stumped on this, and must be doing something incredibly stupid. I am trying to simply upload a file on a Django project. The problem seems to be th

How to download a file from http using C?

I spent the last days trying to figure out how to download a file from an URL. This is my first challenge with socket and I'm using it to have an understanding

merge all files in directory to one text file

In PHP, how can I open everyfile, all text files, in a directory and merge them all into one text file. I don't know how to open all files in a directory, but

How Django set path to files

In a django project, I want to open a file "file.png" (from images folder) in "worker.py". worker.py images file.png otherfile.png It works well using the te

Why can the posix thread id be NULL in Linux kernel function filp_close?

Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_

How to open file in another directory in java?

How to open a file that is not present in the current directory but in another directory. For example, I have a folder F:/test and my file is in F:/test/test2/d

Java - Getting file from same package

If I want to read from "Words.txt" which is in the same package as the class, how would I do this? Doing simply Scanner = new Scanner(new File("Words.txt")); re

What file extensions can be created/written with Java's Writer write() method?

I have a question about Java streams but I can't seem to find the answer in the documentation: What file formats or extensions can be written with java.io FileW

how does fscanf works with different variable types?

I was looking at the MSDN documentation for fscanf. I tried changing the sample code in the documentation, but it didn't work as I expected. If, for example, I