6,015 Topics

Member Avatar for
Member Avatar for Sh13

Hi, I am supposed to read data from an input file with following information 16 //number of destinations// Baltimore //origin city// MD //origin state// Lewes //destination state// DE //destination state// 117.0 //miles b/w previous location and and this one// 160 //estimated driving time// Ferry //place to visit in that location// …

Member Avatar for jephthah
0
94
Member Avatar for localp

if i want to read some text data from an input file stream, 01. what hapence if there is no data 02. or if the input file contains errors 03. or if the out put file contains error because of lack of storage space on disk.

Member Avatar for Salem
0
33
Member Avatar for queenc

hi the below code is used to read a uploaded file and print the first three lines in a document, it is working fine in a txt file .i have written the else part for doc file....it is working but junk values are also getting printed [CODE] <?php $lines=file('http://www.wb.com/judson.doc'); $lin …

Member Avatar for ultra vires
0
77
Member Avatar for DOPY

Hello i am using a public computer (im just starting out with c++) so i dont have the code on me but i have figured out how to create a text file. what i want to know is when i create it, it places it in the direcotry that my …

Member Avatar for DOPY
0
258
Member Avatar for Elmo_loves_you

Hi, I would really appreciate some help. I have a FileUpload control on my Asp.Net web page and want to store the file to a database as a varbinary(max) BLOB with other data via an sproc. However I am getting an error at the line [code] FileStream fs = new …

Member Avatar for Ramy Mahrous
0
396
Member Avatar for blazer2loud

I don't know much about networking at all. I started a thread asking the easiest way to link 2 computers to file share between them and was told to get a crossover cable. I got the cable and now am trying to get the files to share. I have one …

0
50
Member Avatar for mrnobody

Lets say I have a text file which contains a long list of 8bits data and i want to create a .wav or .au file from it. Forexample, my text file contains 8000 bytes for 1 second of audio with the sample rate of 8kHz. How do I create a …

Member Avatar for mrnobody
0
226
Member Avatar for dnk

i wanna to get size of file. help me how to get this. anyone know how to do this. any help will be appreciated :)

Member Avatar for Jx_Man
0
144
Member Avatar for Suraine

Dear c++ gurus, I'm new in creating a header file. never try before. ERm... i have write a header file with a program: [code] Header file: MySensor.H extern short int DetectSensor(int sensorvalue[10]) { ....; } [/code] [code] Program file: MyFile.C #include <MySensor.H> short int i; int p, sensorvalue[10]; int getsensorvalue() …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for roachic

Hi everyone. I was wondering what is the best way to check if a text file is empty? When I read from a text file: file.Open(path, CFile::modeRead); And then try to access it: file.ReadString(line) I get an error.. I have tried if 'file.end' but file.end returns true every time so …

Member Avatar for roachic
0
158
Member Avatar for bswapnil

[code=c] #include <stdio.h> void stripnl(char *str) { while(strlen(str) && ( (str[strlen(str) - 1] == 13) || ( str[strlen(str) - 1] == 10 ))) { str[strlen(str) - 1] = 0; } } int main() { FILE *infile; char fname[40]; char line[100]; int lcount=1,i=0; char mean[100]; /* Read in the filename */ …

Member Avatar for Ancient Dragon
0
132
Member Avatar for rohit83.ken

I have a C file of the following .When I execute this in Fedora 7 version 2.6.21-1.3194.fc7 and arch =i686 I get following errors [root@kwi-11156f06184 Desktop]# cc test.c test.c:3:20: error: libipq.h: No such file or directory test.c: In function ‘main’: test.c:12: error: ‘PF_INET’ undeclared (first use in this function) test.c:12: …

Member Avatar for jephthah
0
576
Member Avatar for jmines

I am new to streams and files in C++. I am having a problem in this code. When i run the program, and after entering the password, a message is displayed "error opening infile". Why the program is not reading from the file or opening it? [CODE]#include<iostream> #include<string> #include<fstream> #include<iomanip> …

Member Avatar for jmines
0
101
Member Avatar for blazer2loud

I have 2 laptops, one running xp pro and one running vista. I would like to know how to link these two computers to be able to get files from each other. I don't have any sort of internet connection. Thanks, Brian

Member Avatar for David Elder
0
77
Member Avatar for tie372

I have a form and upload script so people can upload games to my website. The form code: [code] echo "<form action=newgame.php enctype=multipart/form-data><table border=0 method=post bgcolor=1a1a1a><tr><td width=70%> game title</td> <td><input type=text name=title maxlength=48></input></td> </tr> <tr><td>summary</td><td><textarea name=summary rows=5 cols=30></textarea></tr> <tr><td>genre</td><td> <select name=genre> <option value=action>action</option> <option value=adventure>adventure</option> <option value=arcade>arcade</option> <option value=other>other</option> <option …

Member Avatar for petr.pavel
0
117
Member Avatar for pssturges

Hi, I'm trying to create a web ui that will run some scripts on my server (Ubuntu gusty). I want the user to be able to select some files on the server via some sort of file select form. The selected file path would then be passed to a text …

Member Avatar for sDJh
0
83
Member Avatar for betaven75

Hi guys, This is my very first thread. Now I would like to know about file handling. I have got this book, but the concept is still not that clear to me. So, can you guys suggest any online material that would help me in this regard. Also, could you …

Member Avatar for Narue
0
91
Member Avatar for LODEY

have a bit of an issue trying to obtain some data from a csv file using PERL. I can sort the file and remove any duplicates leaving only 4 or 5 rows containing data. My problem is that the data contained in the original file contains a lot more columns …

Member Avatar for KevinADC
0
124
Member Avatar for shers

Hi all, I have created a VB Script file that runs when the user logs in, and writes the username and date & time to a log file. The vbs file as well as the log file is a network location that contains more than 3 users. I would like …

Member Avatar for shers
0
74
Member Avatar for knight fyre

I'm trying to create a function that searches through all the beds in a hotel until it finds one that is available or just ends when all the records are searched. When it finds that bed, it updates that bed record with new information (marking it as reserved or occupied). …

Member Avatar for Aia
0
315
Member Avatar for zawpai

Hi all, I would like to ask some questions. One is I am facing file missing problem after removing the VB installer. Eg: 'COMCT232.OCX', 'MSCOMCT2.OCX' OR 'MSSTDFMT.DLL'. I don't know how to solve that problem. When I run exe File, it will show a message like above file aren't registered. …

Member Avatar for Jx_Man
0
126
Member Avatar for Ymor

Ok i have some code which stores a subject, difficulty, correctAnswers, maxQuestions and date into a text file. Now when i want this file to be read i can display all the information with no problem, but i want it so the newest date is a the top. Heres my …

Member Avatar for Phaelax
0
97
Member Avatar for Scottmandoo

Is there anything wrong with this script? [CODE]<?php $username=""; $password=""; $database=""; $rom_name = $_POST['rom_name']; $rom = $_FILES['rom']['name']; function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } if (empty($rom)) { $result = '<font color=FFFFFF>Please choose a ROM …

Member Avatar for Scottmandoo
0
245
Member Avatar for cnet1989

I want to write a shell script that finds files in a directory that are (owner permissions) readable, writeable, or executable for the owner. But I don't know the command to list files with certain permissions (rwx)... I'm sure it has something to do with ls, but I just can't …

Member Avatar for dilkash2007
0
63
Member Avatar for y2kundertaker

Hi guys i have a problem with my pc where any folder i attempt to open flashes once then disapears along with my tool bar at which point i have to restart my explorer.exe fro task manager, i have Windows Vista, i trief doing the system restore but it comes …

Member Avatar for gerbil
0
163
Member Avatar for random7

I have a question about reading array from file. I wrote some array at file like below. file name: xy0.dat [2, 4, 6] [4, 8, 12] ... ... Now, I want to read this array(not string) at my original file. I want to define x0[0] = [2,4,6] and x0[1] = …

Member Avatar for vegaseat
0
2K
Member Avatar for quophyie

Can one of you gurus give me some help please. I am a new programmer so please bear with me. I have a header file called Deck.h and a cpp file called Deck.cpp. In my header file, I have a class called Deck which has prototype function called createPack as …

Member Avatar for quophyie
0
392
Member Avatar for charlez40

Hey everyone. Before i start i'm writing up this code for my mothers employee database. I have attached two files. An example of how it's going to be run through a picture and the employee database which is a .txt file containing data such as first name, last name etc. …

Member Avatar for Rajith Cherian
0
114
Member Avatar for agenthobbs

Ok i am writing a program to manipulate structures that are similar to linked list. I have a file that has these contents. 4 5 0 0 0 0 1 0.1 0 2 0.2 0 3 0.3 0 4 0.4 1 0 1 1 1 1.1 1 2 1.2 1 …

Member Avatar for agenthobbs
0
164
Member Avatar for StepIre

Hi All, I am writing a little program that i should be able to get working i think! basically i have this file full of content and i want to search it for a list of words. And add to a score variable each time i find a word [CODE] …

Member Avatar for woooee
0
91
Member Avatar for nelsonsu

as the problem i'd met b4: [url]http://www.daniweb.com/forums/thread115104.html[/url] there's another problem looks like same with that problem, is about the logic of the int outq. this make the result1.txt always get unknown words after few loops. i'd like to know how to correct it. [code=cpp] #include <stdio.h> #include <stdlib.h> #include <time.h> …

Member Avatar for nelsonsu
0
90
Member Avatar for mcx76

I installed Osc store. I was having problem with Register_globle.which was not solved.I find the [URL="http://www.magic-seo-url.com/oscommerce/tips/running-oscommerce-with-register-globals-off.html"]link[/URL] i use this i successfully install store.But still unable to login to admin panel. On [URL="http://cravingcatering.com/store/index.php"]index page[/URL] still have this error.I appied different permissions 444, 644,755 but unable to remove the Message [CODE]Warning: I …

Member Avatar for Free_Man
0
156
Member Avatar for TheFueley

I'm trying to figure out how to write an int (as a record number) and a string (up to 12 characters) into a binary file. So in one project the binary file is created with all 5 records written to it, with blank data, eg string is empty. In the …

Member Avatar for TheFueley
0
122
Member Avatar for nabilchampion

Hi all there is a Windows API function as [CODE]HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); [/CODE] This function contains argument for share mode.. When I provide it 0 value then no other process can open/access the file already opened …

Member Avatar for Ancient Dragon
0
119
Member Avatar for mustafacmpe

When open my computer first time and then, when cllick one icon for example my computer or folder whatever then the new window that is opened start maximizing and minimizing itself automatically and it doesnt stop and then i immediately do ctrl +alt +delete windows task manager i click on …

Member Avatar for caperjack
0
43
Member Avatar for apkumar

Hi all, I would like to open a file in Local drive using Asp.net, And I have written the following code in user control which could open the file, Response.AddHeader("Content-Disposition", "attachment; filename=" & strFilename) Response.WriteFile("C:\\open\\" & strFilename) Response.Flush() Response.Close() The above code working fine in .Net 2005, In SharePoint also …

Member Avatar for plazmo
0
142
Member Avatar for severman

could any 1 tell me why this code isnt working right?? two.txt is not wriiten good... this is the code [code=c] #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define LEN 30 #define LENST 6 int *saveid[5]; char *savename[5]; unsigned *savegrd[5]; unsigned *saveavg[5]; int j=0,k=0; int min=0; int skip[6] = …

Member Avatar for Aia
0
109
Member Avatar for alivip

how to ingrate my code to read text in in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name Camry and file name corolla, file name Honda contain folder accord and BMW contain file …

Member Avatar for jrcagle
0
104
Member Avatar for SheSaidImaPregy

I was wondering, I am doing my best to eliminate a lot of Database queries that are unneeded in order to increase performance. However, this is a tough task as each solution has its own drawback which I then have to compare to see which ones would be better performers, …

Member Avatar for SheSaidImaPregy
0
146
Member Avatar for alivip

Is python provide search in parent folder contain subfolders and files for example folder name is cars and subfile is Toyota,Honda and BMW and Toyota contain file name camry and file name corola, file name honda contain folder accord and BMW contain file name X5 Is there way to enter …

Member Avatar for woooee
0
153
Member Avatar for dr_paul

Hello I'm trying to teach myself how to use mysql and php via a couple of books and a lot of hacking away. I have Jesse Feiler's book "How to Do everything with Web 2.0 Mashups" and I'm stuck on chapter 11 which is a practical exercise in mashup building. …

Member Avatar for peter_budo
0
147
Member Avatar for alivip

I wont to find most 10 frequency word of specific file for that I have written this code [CODE] import sys import string import re file = open ( "corpora.txt", "r" ) text = file.read ( ) file.close ( ) word_freq ={ } word_list = string.split ( text ) for …

Member Avatar for alivip
0
131
Member Avatar for hazelle

hi!...this my code,,,and i knew there"s something wrong with it,,,or maybe something is lacking..would you mind to help me?...i need a very quick response..thanks....Godbless you... [COLOR="Green"]import java.io.*; public class Samplefile { public static void main(String args[]) { File fob1 = new File("dede.txt"); RandomAccessFile rob1 = new RandomAccessFile("Hector.txt","rw"); if exists("dede.txt") { …

Member Avatar for jwenting
0
93
Member Avatar for Jennifer84

I have a .txt file that contains this informaton: Numb1 Number2[1] Numb3 Now there is 2 things that I am trying to do here. I dont know how to begin this. First I will search if there is any Word in this file that is named: Number2[1] But the tricky …

Member Avatar for Jennifer84
0
166
Member Avatar for coffeepot!

Hi all, Can anyone shed any light on this really simple problem please? I need to read a list of files in a directory on a server. I am using PHP to do something like this... [code="PHP"] $counter=0; if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { …

Member Avatar for petr.pavel
0
120
Member Avatar for kevin wood

i am working on a file upload system and i need the user to be able to upload images onto the server with the page reloading. the page reloading causes all the other information to be lost and the user having a lot of unwanted windows open. what is the …

Member Avatar for kevin wood
0
66
Member Avatar for kevin wood

I am fixing an e-mailing system using php and mysql and have hit a stumbling block. i have recently had to take on someone elses work and have fixed most of the problems they had created. I need to upload images and then display them on the newsletters that will …

Member Avatar for kevin wood
0
89
Member Avatar for kevin wood

hello i am trying to get uploaded to a server using a hidden iframe so the page does not reload. i have a upload.php page which resizes the file and remanes the file. What i thiink should happen is that the php file should be in the iframe and the …

0
92
Member Avatar for afg_91320

hi. i am working on an assignment where i have a file that has a list of numbers. using those numbers, i should be able to create a program, where when prompted, i can find the mean of the numbers from that file, the biggest numbers, etc. the output would …

Member Avatar for WaltP
0
95
Member Avatar for Jennifer84

I am trying to open a file with this code but wonder what extension this file has. My project is under this path: c:\\Documents and Stteings\\Jennifer\\My Documents\\Visual Studio 2008\\Projects\\Form1 Under this path I have a File that is named "Form1". If I doubleclick this file VC++ opens. The problem though …

Member Avatar for WolfPack
0
86

The End.