7,373 Topics
![]() | |
Code written and tested using the Borland C++ compiler. Code uses access() to determine if an input string exists either as a directory name or as a file name. If access() fails, the string is neither a file or directory and the function terminates. If it does exist, the name … | |
Hi all! Сonditions of a problem: 1) in one form post info and upload file 2) validation only php without js 3) associated fields: if the value is not the same, we don't need to validate field 4) associated fields: if the value is the same, we need echo new … | |
Hi I was wondering if it is possible to process 2 different files with one function and store the strings/lines I'm searching for in different variables as for instance number1 for file 1 and number 2 for file 2. the code so far: [CODE]import string Name = raw_input("Filename ") infile … | |
Hello all, just hoping for a bit of understanding of new[]. I'm writing an insertion sort program for school (of course) and I've got most of it done; I have the program asking for a filename, and asking for file "size" (or how many numbers are in the file), and … | |
Hi, I am stuck. I am trying to create a new file C:\HourlyATC\ATC101509\10-15-09 to 10-21-09 ATC.txt, and have a bunch of text wrote to this file to have it uploaded to a web site. At this point I would be happy if I could create the file and have the … | |
Hi.. How do I check the data type in an input file ? Suppose my text file looks like this. Tab separated :- [CODE] 123 456 ABCD 789 890 EFGH 298 764 IUHJ [/CODE] Now I read the file like char or string in my while loop using getline. So … | |
hello, I have to write a program that takes floating point numbers from another file and prints out the average. The problem is the other file submits three columns so I don't know how to do the average for the three separate columns. This code is terrible and I can't … | |
I am having trouble uploading any file to the path in the error message below. Does anyone have any idea what the problem is. I did some research on this and most sites say that the permissions need Read/Write access for the asp.net user. I tried this and I still … | |
Hi all ! Can anybody tell me why the following code is not copying the file from source to destination? Thakns in advance........ use File::Copy; my $source="C:\\shared\\8.4.1\\DXSI"; my $dest="C:\\r45"; my @files; my $file; opendir(DIR, $source) or die "can't opendir $source: $! \n"; @files=readdir(DIR); close DIR; foreach $file(@files) { print "\n … | |
My code so far opens a text file in a particular format and reads in the data into a structure called salesRecord. There is no problem there. The problem arises when I write the data to a new binary file. Here is the structure: [code=CPP] struct salesRecord { int custNo; … | |
I've written a program like the follow: [CODE]int main () { . . . . ifstream file1; ifstream file2; ofstream simiralities; simiralities.open("P(0)_P(1).txt", ios::app); file1.open("test1.txt", ios::in); while (!file1.eof()) { . . . file2.open("test2.txt", ios::in); while (!file2.eof()) { . . . . } file2.close(); } simiralities<<number; file1.close(); simiralities.close(); return 0; }[/CODE] the … | |
How to read a part of a text file and put them in an array in c# 0 #1 1 Day Ago I have a text file including several strings and doubles. I want to find a specific string in the text and read all double numbers after it which … | |
I need to prompt a user to type in a text file name and then take that file and and count the amount of words in the file. I have this code which counts the words in a file(that may not be "perfectly" written). I cannot figure out how to … | |
I wonder if i writing the correct code segment to read data from binary file.eg.the content file operation in constructor [CODE] try{ raf = new RandomAccessFile("record.dat","rw"); } catch(IOException ex) { JOptionPane.showMessageDialog(null,"Error create file"); System.exit(0); } [/CODE] write content to file [CODE] do { Name = JOptionPane.showInputDialog(null,"Please Enter The Account Holder's … | |
hey guys i want an help from you guys to create a jar file for my keylooger project which i had developed in java and vc++ using jni technology.while i try to create a jar file for it using the specified command which create a manifest file ALSO it is … | |
Hi, This is an existing code from a website which is supposed to find a desired string in the file and replaces it on its occurance. I tried compiling this code n it doesn't seem to append the string Replacetext(Help) in the FILE fp. But however it does write into … | |
im trying to get the same heat index that prints int the program to write to a file. i have copied the procedure from another program that worked correctly. any help is appreciated. import java.io.PrintWriter; import java.io.IOException; import java.util.Scanner; import java.io.File; public class HeatIndex { public static void main(String [] … | |
Hello I am trying to develop a small program that will periodically (say every 6 hrs) calculate my ISP broadband speed (both up and dn stream) and display on my router GUI's WAN page. I am thinking of say, start a Linux timer, start down/uploading a file of a known … | |
I recently started messing with tcp socket programming. I hacked up a little instant messaging application that seems to work has some little problems but the world isn't in need of more IM clients. but I wanted to know a good practice for sending large files over tcp sockets. i … | |
Hi all, could anyone tell me how to read a unorder file into order output, I wrote a method that only read order file(begin with product). The following is my code. My input file like this: product Apples location 10 Downing Street London England quantity 382764 location Akihabara Tokyo Japan … | |
Hi, I need to copy a file from one location say c:\a\abc.txt to c:\b\abc.txt. I used the following below code #include <stdio.h> #include<fstream> int main() { if ( rename("c:\a\abc.txt","c:\b\abc.txt") perror( NULL ); system("pause"); return 0; } when i ran this code, the original file in the folder "a" gets deleted. … | |
Yes I know its a long code and it will get longer but there is a compiler error in the [COLOR="Green"]int main ()[/COLOR] First Visual C++ 2008 Express edition error [QUOTE] ------ Build started: Project: MAC ADDRESS, Configuration: Debug Win32 ------ Compiling... MAC ADDRESS.cpp warning C4603: '_WIN32_WINNT' : macro is … | |
I want to be able to extract the file info of music files(title, artist, album, genere, ect.) and then rename the file to the title of the music track. But I don't know anything about this and have no idea where to start, can someone tell me? ![]() | |
Hi, its me again, I promise this should be quick and simple because I have an idea of what needs to be done. I'm working on my form (if you saw my other post its basicly a grade book with 5 forms). Is there any simple way to write the … | |
I had asked this question and thought that I had it solved but I could not get the text defined as variables. Below is the text file. I would like to specify a line and the length and set that to a variable. In the Example below the items in … | |
Hey folks, I have an Epson POS printer which support printing via my COM port using ESC/POS. This all works well in my c# app. I have used Epson's BMP converter tool to convert a bmp file to a binary file which can be sent directly to the printer. How … | |
I was wondering if it is possible to write a program in C or C++(maybe even Visual Basic, as i m more experienced with that programming language) to convert a .wav file into bytes and save the same file as a text file. I am a Visual Basic programmer and … | |
New Question. I end the output to one file (fout1) and try to start it to a new input and output file, using this code: [CODE]" fout1.close(); } cout << endl << "Detailed employee reports have been printed in " << fileOutput1 << "." << endl << endl; cout << … | |
i currently am developing a program that monitors a folder, if anything new is added to the folder it is then copied to another folder. the code i have so far is [CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace filemover { class Program { static void Main(string[] … | |
Below is the code that I have to find the Mac address of any pc (physical host ID) I struggle to make it print to a file but now i have a problem... It prints MAC Address: XX-XX-XX-XX-XX-XX to C:\\Physical-Address.txt but I only want it to print the XX-XX-XX etc … | |
Web Server: Sun Java System Web Server 7 update 5 I have inherited a JSP application and am trying to get it to work. I have figured out that it has something to do with the [ICODE]<input type="file"> [/ICODE]tag, because I cut all the rest of the code out. [CODE]<input … | |
Hi Please tell me how we can search PDF File , which is stored in folder like C:\Folder and then show in show.php page as dynamic link. also Upload new PDF File to Folder Please tell me how? | |
hello everyone, I am trying to read the same file twice,but after the first reading it is not taking the value again. what i need to do is read the file once and count the number of lines in the file, then read it again and do further computations...... but … | |
I've been working on a laptop and I can't seem to find out why there are temp files constantly and rapidly building up in my temp folders. I ran MalwareBytes which discovered and removed viruses and I also ran AVG Free Antivirus and nothing new came up. I also ran … | |
i want to create a program that can upload my new picture automatically. plez help.. | |
Hello - I love this site and often visit to search for answers to problems I have with homework. Well I finally ran into a brick wall with this one. Hopefully I can get some help, or at least pointed in the right direction. I usually can figure things out … | |
I am having a problem writing from a outside file. here is the assignment. Write the program as an object-oriented C++ program that allows the user to select which way they want to calculate a mortgage: by input of the amount of the mortgage, the term of the mortgage, and … | |
I have a txt file which has the following input. 13 .34 67 45 12 4 85 56 42 44 2 8 3 5 2 the first number is the size, second is a multiplier, last one is used for search. I am wondering if the code below looks correct. … | |
I am a beginner in shell programming in Unix. My current problem is log file analysis based on a given time range for listed dates. The file is a long file and I need to sort IPs based on a user input through terminal. For example, from the end of … | |
Hi, I have a major problem that I can not figure out. I have a directory that is updated once a night by fetching data from a site provider. For the last 3 days it will go fetch the data and fills the log file with the following errors over … | |
I am having a problem writing from a outside file. here is the assignment. Write the program as an object-oriented C++ program that allows the user to select which way they want to calculate a mortgage: by input of the amount of the mortgage, the term of the mortgage, and … | |
I must write a interface to enter course information for transfer students. The created data file should be sequential in nature, with the student's name, his/her ID number, the course number from the previous college, and the accepted course number at the current college. The code I wrote so far … | |
I am new to this and maybe I'm missing the boat. I want to learn how to write a program that accepts data and adds it to a file, I also want to be able to sort that data, edit that data etc. This seems like the most basic thing … | |
I have a file that consists of dates like this: 12/[B]01/[/B]2008 12/[B]02[/B]/2008 12/[B]03[/B]/2008 12/[B]04[/B]/2008 12/[B]05[/B]/2008 Now if I will read this file from beginning to end, this is a solution: [code] String^ FilePath = "C:\\DateFile.txt"; String^ GetLine = ""; StreamReader^ Read = gcnew StreamReader(FilePath); while(Read->Peek() >= 0 ) { GetLine … | |
Hello, I am trying to read the contents of a text file from a website. I am running Visual Basic 6 (SP6). I need to add this code to an existing application written in VB6, so VB.NET is out. The file I want to read is on our website. It … | |
How do you acces a folder beneath the current folder? The upload script is at: htdocs/mysite/management/upload.php and i want the files to be uploaded at: htdocs/mysite/images/ What should the directory be? | |
hello, can somebody help me in learning file i/o in c++? i would be very grateful | |
Ok I need help on this Freshman year project-( so it should involve loops, arrays/strings,fstreams and functions only) A CSV file contains airport info: [QUOTE]ABZ,"Dyce","Aberdeen","Scotland, United Kingdom","GB",57.200000,-2.200000,493,\N,"Aberdeen",2657832,2638360 EDI,"Turnhouse","Edinburgh","Scotland, United Kingdom","GB",55.950000,-3.350000,493,\N,"Edinburgh",2650225,2638360 BXE,"Bakel","Bakel","Senegal","SN",14.916667,-12.908333,569,"Senegal",\N,\N,2245662 MFV,"Accomack County","Melfa","United States","US",13.633333,39.133333,67,"Verenigde Staten",\N,\N,6252001 ADK,"Adak Island Ns","Adak Island","United States","US",51.878056,-176.646111,67,"Verenigde Staten",\N,\N,6252001 LIT,"Adams Field Airport","Little Rock, AR","United States","US",34.729444,-92.224444,67,"Verenigde Staten",\N,5035199,6252001 ADS,"Addison Airport","Dallas","United … | |
I Need a script that will change the name of a file when it is getting downloaded. for example: the file getting downloaded has a name "File.mp4" and when the user downloads it i need it to be "Title.mp4" | |
In early linux systems, inodes were kept together on one part of a disk, while the corresponding data was scattered elsewhere on the disk. Later editions divided disks drives into group of adjacent cylinders called cylinder groups, in which each cylinder group contains inodes and their corresponding data. How does … |
The End.