6,015 Topics

Member Avatar for
Member Avatar for celina1234

I have a 1000x24 matrix in a text file and i want to sum the adjoining columns of the whole matrix e.g. col1+col2, col2+col3, col3+col4,... col23+col24 and store these values in a separate text file. My code runs like this: #include <stdio.h> int main() { int i,j; float a[100][24]; FILE …

Member Avatar for Edward_3
0
235
Member Avatar for lilita

private void btnCancel_Click(object sender, EventArgs e) { //setDirty(); this.Close(); } private void btnOk_Click(object sender, EventArgs e) { setDirty(); //openFileDialog1.ShowDialog(); saveFileDialog1.ShowDialog(); } private void btnBrowse_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = @""; openFileDialog1.Title = "Select a File"; if (openFileDialog1.ShowDialog() != DialogResult.Cancel) txtFilePath.Text = openFileDialog1.FileName; else txtFilePath.Text …

Member Avatar for cgeier
0
330
Member Avatar for Deep Modi

Hey Everyone, I forgot this simple code and messup. I am having almost 23 Files in my resources. (extension: .Targa Files) now When the User Click Extract Files, I need this files to be extracted to "fbd.selectedpath\MyFiles\" (fbd: folderbrowserdialog) The Another Thing is Each files are big, So obviously it …

Member Avatar for Deep Modi
0
355
Member Avatar for analys

I'm trying to output binary file information something like this: File size : 5 KB Start : 0x00 End: 0x 20 But I don't really know how to output the end of file. Hope somebody can help me. Thanks. public static void binaryread(string file) { FileStream fs; BinaryReader br; FileInfo …

Member Avatar for JOSheaIV
0
206
Member Avatar for catastrophe2

hello I have an inquiry about reading from a file. so if i have a file and if it opens (meaning it is there) how do i check if there is data? ifstream file("example.txt"); if (file.good()) { //file.open("example.txt"); // is this necessary again???????? i read that the ".good" provide checking …

Member Avatar for catastrophe2
0
3K
Member Avatar for jack_7

hello to all I want convert this code to assembly for mac osx intel 64 : #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> //#define RCVBUFSIZE 4096 int main( int argc, char *argv[] ) { int sock, length; struct sockaddr_in server; char *command; // …

Member Avatar for sDJh
0
445
Member Avatar for fungus00

Hi all, nothing happen when i download file Everything looks fine when i debug code.. there is no error protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e) { int ID = Convert.ToInt32(e.CommandArgument); if (((LinkButton)e.CommandSource).Text == "View") { Response.Redirect("~/Detail.aspx?id=" + ID ); } else { GetFile(ID); } } public void GetFile(int ID) { …

Member Avatar for yssirhc
0
93
Member Avatar for Silfro

Anyone knowledge with reading binary file intro struct? I got weird error.. The first line is correct but then its only trash.. http://s14.directupload.net/images/141003/nz6k6cd2.jpg it starts 1,0,450 and then it should be 2,450,1200 3,1200,xxx and so on. Load file function: bool CNtlFileSerializer::LoadFile(char* pszFullPathFileName, bool bCrypt /* = FALSE */, char* szCryptPassword …

0
102
Member Avatar for berserk

I have this script that will NOT work no matter what i add to it, i have fopen not working and i believe that is the root of all my other errors but i cannot be sure, i originally had 8 errors but 4 of them were simple notices for …

Member Avatar for berserk
0
402
Member Avatar for ma.da.7140

Hello..im a newbie in php, i'm curious about how to make a single file with multifunction, so i can call this file in another file. For example, i made a search function in "search.php". Then i want to call it in another file (more than one), to run a search …

Member Avatar for ma.da.7140
0
523
Member Avatar for Jinxx

I have written a code that asks the user a name (ex.candy) and a number then it stores it in a stuff.txt file like so: " candy 20 candy 40 decorations 70 costumes 40 candy 60 " When reading from that stuff.txt file, how can I add the running total …

Member Avatar for tinstaafl
0
810
Member Avatar for Asif_6
Member Avatar for kaakka

i have form file delete anybody can help make file clone instead of delete. <?php if(isset($_POST['filed'])){ unlink($_POST['file']); } ?> <form action="delet.php" method="post"> <b>Name of file(on the server):</b><INPUT type='text' Name='file'><Br> <INPUT type='Submit' Name='filed' Value='Delete File'> </form>

Member Avatar for kaakka
0
164
Member Avatar for kaakka

# #how can use file extension like .txt,.php,.html for the same script. # anybody can help# <?php if ($_POST['variable'] == '') { $variable = './'; // default folder } else { $variable = $_POST['variable'] ; } $folder = $variable; $uploadpath = "$folder/"; $max_size = 2000; $alwidth = 900; $alheight = …

Member Avatar for mattster
0
342
Member Avatar for chubbyy.putto

a program to count the number of occurrences of words in a passage. The program will read white-space separated words from a file, convert all words to a single case, and remove any non-alphanumeric characters from both ends of the words. It is to count the number of each word, …

Member Avatar for uonsin
0
212
Member Avatar for red711

Hi, I'm new to perl, and need help about comparing 2 columns within 2 different .tsv files. I have search through the forum for some similar case of mine, such as [url]http://www.daniweb.com/software-development/perl/threads/335711[/url], [url]http://www.daniweb.com/software-development/perl/threads/336421[/url] and [url]http://www.daniweb.com/software-development/perl/threads/311399[/url] , I have tried to modified them according to my needs but somehow the final …

Member Avatar for 2teez
1
560
Member Avatar for ignnniter

Progressbar not updating :'( please help. Private Sub ftpupload() Dim ext As String = Path.GetExtension(NsTextBox1.Text) Dim fname As String = Path.GetFileNameWithoutExtension(NsTextBox1.Text) Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://xxx@xxx.org/" & fname & ext), System.Net.FtpWebRequest) request.Credentials = New System.Net.NetworkCredential("xxx@xxx.org", "xxxxxxx") request.Method = System.Net.WebRequestMethods.Ftp.UploadFile Dim file() As Byte = System.IO.File.ReadAllBytes(NsTextBox1.Text) Dim strr As System.IO.Stream …

Member Avatar for J.C. SolvoTerra
0
517
Member Avatar for erabxes

How do one go about opening a file in php by using the resources made available on a system. Take for instance that after getting the header content information of a file, one discovers that the file is a word document, or a pdf file, how do one use a …

Member Avatar for steelbrain
0
287
Member Avatar for DawnofanewEra

Hello. I've written a simple program that will once read text into a file and then append some other text when it starts reading again. In other words, adding text to an already existing one. My program doesn't do that but instead it keeps overwriting the older text. How can …

Member Avatar for TylerD75
1
215
Member Avatar for HuePig

Hi, I'm having trouble reading a file the way I want it to. /*Textfile.txt*/ ROOM Closet Its too dark, you cant see anything. EXIT out Basement 1 ROOM Basement Its too dark, you need some sort of light to help you see. EXIT enter Closet 1 EXIT up Dinning_Room 1 …

Member Avatar for rubberman
0
126
Member Avatar for Saboor880

Hi! i am writing a program in which i am reading a text file named "studentinfo". I have made a notepad file as "studentinfo" and then wrote a program to read this file. but there is an error occuring : " invalid operand of types 'char[20]'and '<unknown type>' to binary …

Member Avatar for Saboor880
0
141
Member Avatar for GingerDontCare

Hello Daniweb, So, I am currently working on a simple download time estimator program using JOptionPane and some loops. I have some beginning code and wanted to check how it is working, only it seems I messed up something and am stuck in my loop when I run it. I …

Member Avatar for GingerDontCare
0
1K
Member Avatar for kaakka

hello i am looking script image and html or text file upload with option make file name and file deletion any body can help?

Member Avatar for mattster
-2
265
Member Avatar for gtcorwin

My company has Xen servers, the hardware is pretty solid, my questions pertains to setting up a Virtual Windows 2014R2 File Server in this environment. Has anyone had any experience with VM file servers? Would you create a small VHD (100GB) for the file server as one and then have …

Member Avatar for CimmerianX
0
335
Member Avatar for prahesh

text_data = {apple \n grapes \n straberry}; FILE *fp; int i; char ch; std::string DataVal; std::ifstream in("D:\\test\\file.txt", std::ios::in | std::ios::binary); if(NULL != in) { cout<<"File Open Success"<<endl; in.seekg(0, std::ios::end); DataVal.resize(in.tellg()); in.seekg(0, std::ios::beg); in.read(&DataVal[0], DataVal.size()); in.close(); } else { cout<<"File Open Failure"<<endl; return 0; } * Here I am able to …

Member Avatar for prahesh
0
461
Member Avatar for wikit

Hi guys, thanks in advance for any help. I'm using this tutorial [Click Here](https://www.youtube.com/playlist?list=PL7C25B2F18F68F3EF) To make a multi-file upload. the actual upload works just fine, however the % progress and final file list of uploaded files that is supposed to show at the end is not working. Here is the …

0
178
Member Avatar for krunal1986

Hi, I want to convert my word file to pdf file in vb6. source code will be appreciated. so far, i have tried with below code also. Private Sub Convert_WordDoc_to_PDF(DocPath As String, sDestsPDFFile As String) 'Dim worddoc As New Word.Application Dim worddoc As Object Set worddoc = CreateObject("Word.Application") Dim x …

Member Avatar for Vidya Sagar
0
5K
Member Avatar for saravananosiz

I am new to svg , I need to draw a inner or outer path for the svg editor generated svg path , i am unable to draw . I tried a lot but i cant . help me.

Member Avatar for saravananosiz
0
341
Member Avatar for unitedwaykat

I am trying a long distance help session with a friend who lost the file edit etc line in Outlook Express and now Windows Live has same problem. Any suggestions? IE 8, Win XP Home. Thanks

Member Avatar for SUNILDAS
0
1K
Member Avatar for mcroni

hi, i have written a function that can search through a folder and display a picture in a new window if the file is present but i always have to add the image file format or extension before the function can work. is there a way i can work around …

Member Avatar for vegaseat
0
280
Member Avatar for Viruthagiri

Hello everyone.. I have a open source remote file upload script. It is called file snatcher. We can directly upload the files to our server from another server. But the problem is we can upload only one file at a time. I mean if you have many url, you have …

Member Avatar for Saad Awan
0
593
Member Avatar for Hussain_3

i have exe file generated by the Compilation of C++ program now I want to pass arguments to the generated exe file through C# and save all of the output of exe file on a .txt file this is What i have done so far public static string RunCmd(params int[] …

Member Avatar for tinstaafl
0
1K
Member Avatar for bananacat

My code goes as follows: private void btnChangeImg_Click(object sender, EventArgs e) { using (var openFileDialogForImgUser = new OpenFileDialog()) { string location = null; string fileName = null; string sourceFile = null; string destFile = null; string targetPath = @"..\..\Images"; openFileDialogForImgUser.Filter = "Image Files (*.jpg, *.png, *.gif, *.bmp)|*.jpg; *.png; *.gif; *.bmp|All …

Member Avatar for JOSheaIV
0
161
Member Avatar for chaitu11

I have a (2gb)txt file which has thousands of queries, i need to read those file queries and split those queries into n no. of txt files..and save them in a folder... can any one post an example or guide

Member Avatar for chaitu11
0
243
Member Avatar for hanspeare_1

Hello Daniweb,, I have uploaded an image using the student_id as its filename. The student id is auto-incremented and unique per student_id. Now i am confused why it gives me problem to display it. I have tried. <?php print '<img src="uploads/'.$session_id.'" />' ?> <?php print '<img src="uploads/'.$session_id.".".$ext'" />' ?> <?php …

Member Avatar for hanspeare_1
0
4K
Member Avatar for Thurston_1

Hi i have to make this program that will read a message from another text file and surround each occurence of an abbreviation with <> brackets. and the write the marked message to a different file. The program must beable to read from a text file that contains the abbreviations …

Member Avatar for Thurston_1
0
730
Member Avatar for haider885

i am trying to write input() function into file..... please help.... i am using visual studio 2013 // N Copy.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "iostream" #include "fstream" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { fstream file; file.open("NCopy.txt"); file << …

Member Avatar for Hiroshe
0
257
Member Avatar for Ritesh_4

Hello I am currently working on a "local" dev wordpress site, where I have a JS file stored with the path as e.g, http://www.devsite.com/websites/wordpress/mysite/wp-content/themes/mtheme/validations.js Currently, am using the relative path e.g. src = "././wp-content/themes/mtheme/validations.js" to load it. However, on the live server, which is maintained by someone else and I …

Member Avatar for Ritesh_4
0
248
Member Avatar for stepan.adrian

Hi, I've been trying for days now to figure out a way to open a local file in WebBrowser, in an Input File, without using a file dialog. I want to be able to submit a filename stored in a variable to the <input type='file'> without triggering a dialog box …

Member Avatar for Mr.M
0
215
Member Avatar for blueguy777

program fetching text file contents into array, and storing array variable values into example.csv file. The values are not storing column wise. ----------------- text file content ----------------- THE SAHARA CO-OP CREDIT SOCIETY LTD MUMBAI OVERDUE LIST OF P NO :1 PERSONAL LOAN AS ON 31/08/2014 ---------------------------------------------------------------------------------------------------------------------------------- S.NO A.NO NAME SAN …

Member Avatar for almostbob
0
362
Member Avatar for sarvesh_1

Hi all, I need to change label text dynamically for two operations on webpage in asp.net. First,when file uploading is completed label should show 'upload completed'. After that it will perform validation process and later will show the message 'validation complete'. I have two methods that will be called one …

Member Avatar for EddyC27
0
444
Member Avatar for Indians

i want to upload the employee profile picture into mysql database using php. i tried this coding. image uploaded successful but when i fetch that image on browser it shows me text character like this (ÿØÿàJFIFHHÿáLExifMM*bj(1r). one more problem is below 20kb size images only uploaded into mysql. how to …

Member Avatar for mattster
0
3K
Member Avatar for DavidB

For the past while, I have gotten comfortable doing things a particular way when it comes to inputting data: i) create text file whose first entry is N, an integer indicating the number of data entries following, and the actual data entries. For example, for 101 data values, the text …

Member Avatar for DavidB
0
3K
Member Avatar for mark_jason

Hi guys, I'm working on my homework: I have to use a data structure to store words read from input file, i chose AVL tree to be the data structure, i implemented the tree and tested it with hard coded words, it works fine. However, with words read from input …

Member Avatar for Taywin
0
6K
Member Avatar for hanspeare_1

Good Day, There's a sticky that TUT about uploading image but i want the restrictions to be in this manner. But my problem here is no notice, no errors but the image file won't upload eventhough the other data has been updated, Here, check my codes. this quite long to …

0
159
Member Avatar for cameos

How can i read data from a text file or an excel file, I want the user to have both choices depending on what file he/she has.

Member Avatar for h4ng4r18
0
71
Member Avatar for Varunkrishna

I am using PrintWriter to write the input from the standard input to a file, here I am trying to create an ascii table in the text file, but there is no proper alignment of the table in the text file. Here is my code guys. package code.practise.MyIdeas; import java.io.FileNotFoundException; …

Member Avatar for Taywin
0
260
Member Avatar for _echelon

Hi DaniWeb, I've been programming a litecoin clone for about two weeks now. I came to build the daemon to acquire a merkle hash, but It give me this error. Error: To use vizcoin, you must set a rpcpassword in the configuration file: /home/crypto/.vizcoin/vizcoin.conf It is recommended you use the …

Member Avatar for David W
0
191
Member Avatar for _echelon

Hi DaniWeb, I've been programming a litecoin clone for about two weeks now. I came to build the daemon to acquire a merkle hash, but It gives me this error. Error: To use vizcoin, you must set a rpcpassword in the configuration file: /home/crypto/.vizcoin/vizcoin.conf It is recommended you use the …

Member Avatar for rubberman
0
212
Member Avatar for abaddon2031

I have a python code that reads a specific folder for specific files. Once it finds a file that matches the re.split peramiters that it is given it then writes the data to a csv file. The issue is that for every file that it loops through and writes it …

Member Avatar for abaddon2031
0
2K

The End.