Questions tagged [data-files]

209 questions
0
votes
2 answers

Add data folder recursively using data_files in Python

I want to add folders mydata1 and mydata2 in root package recursively when install my project. So I write this function in setup.py: def gen_data_files(*dirs): results=[] for datadir in dirs: results.extend([(p, [os.path.join(p,f)…
aviit
  • 1,957
  • 1
  • 27
  • 50
0
votes
1 answer

Writing and reading from a file sequentially using the same file object

I am learning data file handling basics in c++ (and am working in the compiler turbo C++). So I wanted to create a text file , write some data onto it and then read it. So I wrote this: - int main() { fstream…
0
votes
0 answers

My program seems to run into an infinite loop when display function is called

The following excerpt works to create a new object of class 'contact'. The create_contact function works to get new data through member function getdata() and hence create a new contact and attach it to a file 'contact_diary' in a sorted manner. The…
0
votes
1 answer

Reading project data file in Mac OS Xcode project

I am new to developing with XCode 9.2, writing a Cocoa app for MacOS. I want to maintain a data file (simple CSV text file) within the program. Lets say the file is called "the_data.dat". This has been added to the project. The intention is for this…
TenG
  • 3,843
  • 2
  • 25
  • 42
0
votes
5 answers

How to write and replace elements in a text file?

I am a bit lost with this concept, and we have no examples to show us how to replace or search within a file. The prompt: Write a File You will be provided a file path for input I, a file path for output O, a string S, and a string T. Read the…
Wolverine39
  • 83
  • 1
  • 5
  • 12
0
votes
1 answer

What do I do to get the program to recognize a lower and uppercase A and count them in total?

I have this program and I need it to count the lower and uppercase A's in a data file. I'm not sure what to use between charAt or substring. It's also all in a while loop, and I was getting at the fact that maybe I need to use the next() method?…
Dommy Bomb
  • 15
  • 5
0
votes
0 answers

ClickOnce: How to Dynamically Detect Data Directory Between Debug, Release, and Publish

I'm trying to find a vb.net method that returns the path to the directory where project files labelled as 'Data Files' are stored: which is valid for ClickOnce applications during development and after the app has been Published? I've found…
Tod Lewis
  • 36
  • 8
0
votes
1 answer

summation of outputs from a data file

I would like to sum numbers in a text file(1.txt) containing the following numbers 1 10 2 20 3 30 If we run the following code we can reach the outputs written under this code: q=0 def func(x,y): h=y+i return x+h for i in range(1,5): …
user8376915
0
votes
1 answer

why I cannot see my datafile on my defining library

I am running the following %global source_dir util_dir paramf workdir datadir dataunitid saserror ; %let datadir = %str(I:....\KATER\DATA); %let outdir = %str(I:...\KATER\Results); I set my library libname datain "&datadir"; options…
Katerina
  • 1
  • 3
0
votes
3 answers

Turbo C++ : while(fin) vs while(!fin.eof())

I was told that I should be using while(fin) instead of while(!fin.eof()) when reading a file. What exactly is the difference? Edit: I do know that while(fin) actually checks the stream object and that when it becomes NULL, the loop breaks and it…
Alpha Mineron
  • 348
  • 1
  • 2
  • 13
0
votes
2 answers

What is the expected behaviour in a virtualenv python?

Here is my problem, I am trying to make an application which copies data files during its setup. When i am doing pip install the setup copies a few files to a directory. Now my question is, When inside a virtual environment, what is the behaviour…
0
votes
3 answers

Opening Files in C

Full Edit: I am getting frustrated, I don't know what am I doing wrong in here I still have so many stuff to do in the code but I can't even open a file to continue my work. #include #include #include void…
Bolar
  • 11
  • 2
0
votes
2 answers

PostgreSQL - Recovery of Functions' code following accidental deletion of data files

So, I am (well... I was) running PostgreSQL within a container (Ubuntu 14.04LTS with all the recent updates, back-end storage is "dir" because of convince). To cut the long story short, the container folder got deleted. Following the use of…
George G
  • 43
  • 1
  • 6
0
votes
1 answer

User's Outlook 2007 data files randomly removed

Within our network infrastructure we utilize a 2007 Exchange Server for our domain. Today I was faced with a situation where a user who has MS Office 2010 x64 and utilized Outlook 2010 called me and stated that her "Saved Items" inbox was missing. I…
Squid
  • 47
  • 1
  • 1
  • 6
0
votes
1 answer

How to make Data File Handling functions in a private header file? (To be edited)

EDIT: This question is to be edited, please stop reading. Don't waste your time! Thank you I’m doing High School Turbo C++. I tried making a header file containing a function to search a binary file. My Headerfile program is: alpha.h #ifndef…
Alpha Mineron
  • 348
  • 1
  • 2
  • 13