6,015 Topics

Member Avatar for
Member Avatar for dean8710

I have upload files over the live domain. and some files are process files. how I can limit the permission of the files so user cannot type that file's name on the url address bar? example of file permission code, 0755, 0644 Can someone gives me the list, and the …

Member Avatar for dean8710
0
192
Member Avatar for bellarc

I am attempting to remove instances of a character from a txt file with python using the following code: [CODE]import fileinput for line in fileinput.FileInput("test.txt",inplace=1): line = line.replace("^M","") print line[/CODE] and get the following error: File "par.py", line 6 line = line.replace(" ^ SyntaxError: EOL while scanning string literal I …

Member Avatar for woooee
0
333
Member Avatar for chuyauchi

I have a difficulty for saving a file in C++. I have an existing file which is opened by my program. The program should save the changes to the existing file (Example: D:\A4.txt) when I select 4 (as known as the menu). However, the program does not save the changes. …

Member Avatar for thines01
0
217
Member Avatar for ndraycott

Hi I am trying to store the filepath of uploaded files in a sql server database using vb.net. I have run the code at it uploads fine but nothing is being added to the database. Any help will be greatly appreciated. [CODE]Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As …

Member Avatar for lolafuertes
0
146
Member Avatar for javaNewb37

I want to modify the below code to read the Polynomial Terms from a text file (vs. hard-coded values) Furthermore, read data from text file in the format: P1 = 3 5 1 -1 0 8 P2 = 5 6 2 -1 1 7 0 -4 etc... Name the values …

Member Avatar for stultuske
0
342
Member Avatar for engineer61

Hi friends I need urgent help. now three variables we printed to a file received from the user. This variable to another file, the user wants to take that file and the value of the variable is a variable, you need to do. And this event is the first change …

Member Avatar for zeroliken
0
139
Member Avatar for Alvi89

Im currently trying to delete a record from a file The structure ive used is this: [code]struct studentRecord { char rollnumber[12]; char name[32]; int attendancePercentage; float quiz; float assignment; int classpart; float mid1; float mid2; float final; float semesterPerformance; float overallPerformance; }; [/code] Now I have 2 problems: 1.I cant …

Member Avatar for Adak
0
228
Member Avatar for izh

Hello, I joined here desperately asking for your help I have an assignment about creating a program that loads a text file given. the text file contains many lines and those lines are questions and answers it is on this sequence question answer question answer and so on so we …

Member Avatar for izh
0
248
Member Avatar for alaa sam

hi everyone I'm new to c# and working with file currently I need to read some string from the file but not the whole file so what functions can I use to read the file string by string ?

Member Avatar for alaa sam
0
144
Member Avatar for lolwut25

I have an assignment where I have to write a program to prompt the user for a file name and location (it is a text file), once the user has entered that, a menu pops up and gives the user 4 options and asks which one they would like to …

Member Avatar for Lerner
0
2K
Member Avatar for nickThebeginner

I am using window 7 as a operating system and i run this code in same os it shows the problem related to file handling but this problem wasn't occurred on xp and vista whats the problem ........???????????? try to run on win 7 and xp you will get the …

Member Avatar for mazzica1
0
186
Member Avatar for crysoberil

Say, i want to create a file compressor-extractor(using C programming language). When the file is compressed, it has the extension ".jisan" ... is there any way that when i double click on the compressed file(example: file.jisan), it will extract itself automatically?

Member Avatar for Ancient Dragon
0
114
Member Avatar for th3b3n

I know this is an OLD thread, but i"m having the same problem. a Runtime error when trying to "OPEN" a file. [CODE]public void actionPerformed( ActionEvent evt) { //filterMap.put(evt.getActionCommand(), ((JCheckBox)evt.getSource()).isSelected()); if(evt.getActionCommand().equals("export")){ String file2Read; file2Read = fileIN.getText(); //file2Read = "NotConverted2.xls"; new BPSepcExporter().BPSReader(file2Read); } //If to check if Open button was hit …

Member Avatar for th3b3n
0
292
Member Avatar for Nikesh2014

[CODE]#include<conio.h> #include<stdio.h> #include<iostream.h> #include<process.h> #include<dos.h> #include<time.h> #include<fstream.h> #include<string.h> class getInfo { int dep; int with; int bal; int year; int mon; int day; char des[100]; public: getInfo() { dep =0; with =0; bal =0; year =0; mon =0; day =0; strcpy(des,""); } int year1() { return year; } int month1() …

Member Avatar for Schol-R-LEA
0
134
Member Avatar for slygoth

Hey guys. Im trying to open a file the user entered. [CODE] cout<<"Please enter the file name"; cin>>name; cout<<"Do you want to open the file? [yes] or [no]"<<endl; cin>>pick; if(pick=="yes") system("C:\\wmplayer.exe [COLOR="Green"]fname[/COLOR]"); else cout<<"Good bye"; [/CODE] How do i get the value thats in fname to be printed their so …

Member Avatar for peter_budo
0
195
Member Avatar for nobert79

I'm trying to write this program that'll generate 10 random values in a given range, store these numbers in a .txt file, and then read these numbers from the same file and display them on the screen with equivalent words. I've got to the part where im trying to read …

Member Avatar for thines01
0
151
Member Avatar for fmatin

Hello! I just made a LAMP server out of an old computer, Ubuntu 10.04. Everything is set up properly, or so I thought. Whenever I upload a file to the "public_html" folder via ftp, the permissions are reset so that it says "Forbidden" when I try to access it. Then …

0
133
Member Avatar for spades0001

Hey guys! I've created this program that allows the user to get a .txt file from anywhere in the hard drive and it displays the contents in the text area. My question is: how can I edit my code so that it only allows picture files to be selected(jpg and …

Member Avatar for Ezzaral
0
143
Member Avatar for amnakhan786

hi, i am working on a code it has two parts: for the first part i have 1500-4000 text files which have strings in them.some files are same and some have different strings and i have to find amongst those a subset of files which are 10-20 n number and …

Member Avatar for Adak
0
221
Member Avatar for thetechlady21

I can not seem to delete a record from the text file taken from a datagrid. Please see below. I know I need to bind the data and at the same time I need to delete the file in the current directory. I have tried a few methods but can …

Member Avatar for BitBlt
0
253
Member Avatar for BDan

I am a fairly new programmer still in school, and trying to have my program write the selected information to a designated file. I keep getting an error message on my file OutputStream. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.text.*; class ExampleJComboBoxSample extends JFrame implements …

Member Avatar for Ezzaral
0
169
Member Avatar for meandmyipod

I'm having troubles with the following code [CODE]#include <stdio.h> #include <ctype.h> int main (void) { int i=0,j=0,row; char str1[5], str2[5]; char machine[4][5]={0}; FILE *fp; fp = fopen("text.txt","r"); while (fscanf(fp,"%s %s",&str1,&str2) == 2 ) { row = str1[1]; while (str2[i] != NULL) { machine[row][i]=str2[i]; i++; } } for (i=0;i<5;i++) for (j=0;j<5;j++) …

Member Avatar for Narue
0
116
Member Avatar for sandman64

What i need it to is write a GUI program that has one text field, one button, and one text area. The user can enter data into the text field, and then click the button. When the button is clicked, the program records the value in the text field to …

Member Avatar for Aviras
0
2K
Member Avatar for r_k_k

how do i store the data from the partData file and find if the order was successful?????? is this program correct???????? #include <stdio.h> #include <stdlib.h> #define MaxWordSize 1000 /*Part Number = PartNume Selling Price = SP Quantity in stock = QtyInStock Order Number = OrderNum Quantity requested = QtyRequested partData …

Member Avatar for WaltP
0
223
Member Avatar for crazymidget01

I am trying to write a program to perform matrix operations. I want input the two matrices from a file. The file has the format: 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 * 0 9 8 7 6 5 4 3 …

Member Avatar for thines01
0
138
Member Avatar for icebirdy

For example, I have 2 classes A[x,y,z] and B[a,b] and one vector for each class. I want to read a text file containing data with my two classes For example the text file may contain: A [1,2,3] B [1,2] A [4,5,6] How do i read in this file such that …

Member Avatar for mrnutty
0
150
Member Avatar for jackly94

Ok i have a problem which i cant seem to figure out why it is not woriking, First off When i do Enter in some Details and want to enter Records to the end of File it give me the choice of enter in the Details. When display the Array …

Member Avatar for jackly94
0
212
Member Avatar for reco21

how do I set the path of this cookie to my whole site "/"? [ICODE]setcookie("name$id$uid", $id, $month);[/ICODE] currently this is what I have. How do I format the above to set the cookie on a global scale for the entire site.

Member Avatar for reco21
0
201
Member Avatar for Jetster3220

Task: • Create a text file with 5 questions in it. • Read each question in from the file. • Ask the user for their response. • Create a new text file. • Write the user’s answers to the text file. • Ask the user if they’d like to review …

Member Avatar for woooee
0
320
Member Avatar for Szabi Zsoldos

Hello, I have this weird issue with my simple upload form for different files. [CODE] <form enctype="multipart/form-data" action="mesaje_furnizori.php" method="GET"> <table> <tr><td align="right">Va rugam selectati &raquo; </td><td><?php echo $selectare; ?></td></tr> <tr><td align="right"><td><input type="file" name="file" id="file"/></td></tr> <tr><td align="right" colspan="2">Fisiere suportate (.*gif,*.jpg,.*jpeg,.*png,.*bmp,.*doc,.*docx,.*xls,.*xlsx) Marimea maxima de: <strong>5MB</strong></td></tr> <tr><td colspan="2"><textarea name="mesajTrimis" cols="70" rows="15"></textarea></td></tr> </table> <input …

Member Avatar for Stefano Mtangoo
0
202
Member Avatar for Coderunner

Hello, I hope somebody can help me out here ... I'm having a problem with error code while searching a word in a flat file. My flat file[CODE]|~|20091105213652|~|05 november 2011 - 21:36|~|John|~|18 cm|~|text 1|~|text2|~|text3|~|text4|~|text5|~|text6|~|No|~|John.jpg|~|xxx.xxxs.xxx.xxx|~|extra|~| |~|20091105213929|~|05 november 2011 - 21:39|~|Jeff|~|45 cm|~|text 1|~|text2|~|text3|~|text4|~|text5|~|text6|~|No|~|Jeff.jpg|~|xxx.xxxs.xxx.xxx|~|extra|~| |~|20091105220916|~|05 november 2011 - 22:09|~|Paul|~|15 cm|~|text 1|~|text2|~|text3|~|text4|~|text5|~|text6|~|No|~|Paul.jpg|~|xxx.xxxs.xxx.xxx|~|extra|~| |~|20091105221959|~|05 november …

Member Avatar for diafol
0
232
Member Avatar for sethii

Hi everyone! This is my first post and i'm also a newbie so don't be harsh on me! I have this exercise to do which asks pretty much what the title says. I have a function that reads strings from a file and puts them in an array. Then I …

Member Avatar for YAMNA MIDHAT
0
229
Member Avatar for sike.mausa

I am trying to read a file using a string input as the filename. For example, if the filename is datafile.txt then if the input is "datafile.txt" and there is a file of that name in the directory, how do I read it? Here is my initial code: [CODE]Scanner kbd …

Member Avatar for Aviras
0
183
Member Avatar for tygergyrl

i am trying to put this together so it opens a file sorts the data saves a file and appends a file i have got my self so confused. can any one help???? this is the code Ive got so far. [code]import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import …

Member Avatar for StephNicolaou
0
161
Member Avatar for Despairy

i studied c++ before c guess that was my mistake... i try to read from a file a set of strings and put them in the new allocated array, i do not understand what is the main thing this code isnt working. i get segmentation fault... and even trying to …

Member Avatar for Narue
0
2K
Member Avatar for ananth3125

hi , i had created a new .doc file, in the coding part a single doc file is readed and writed to the new doc file ... how can i continue the operation for reading multiple doc file and write it to a new doc file ..... [CODE]Imports System.Windows.Forms Imports …

0
66
Member Avatar for renzlo

Hi All, I need to compare one file in each file in the folders, some sort of duplicate check through md5 hashcode that I've found in my google search. Here's the code of functions: [CODE]Public Function CompareFiles(ByVal FirstFile As String, _ ByVal SecondFile As String) As Boolean Return ReadFile(FirstFile) = …

Member Avatar for renzlo
0
325
Member Avatar for evilsilver

c++ I am making a game and decided to put in a bogus company animation thing, kinda like Blizzard does, but need to find a way to play the file that we made without going on in the code. ie it comes to the line to play the file (c:\evilsilver.avi) …

Member Avatar for omid80
0
180
Member Avatar for 54uydf

Hi, if I have few files (xlsx) in a folder on my computer (file's name is known), and I want to give the path of the folder in my form using a textbox, [CODE]<input type="text" name="path" id="path" >[/CODE] and for the files to be uploaded to a specific folder on …

Member Avatar for niranga
0
998
Member Avatar for triumphost

I have a file that has the layout: [CODE] 0 0 0 1 1 0 1 1 [/CODE] I want to read it into a multidimensional array and use the values. The thing is I don't know how to read it in.. I can read the amount of columns and …

Member Avatar for triumphost
0
244
Member Avatar for tygergyrl

I am having trouble in sorting out what i need to do for my first assignment. open a text file, with colon char, 1 student number: 2 student name: 3 5 fields with marks; a algorithms: b mathematics: c java: d C++: e scripting open txt file read open txt …

Member Avatar for solomon_13000
0
241
Member Avatar for bowmaster

this is a page of code on a Apache Tomcat server the error i get is the following : Eror :licenta\upload\Tulips.jpg (The system cannot find the path specified) project path is : ROOT\licenta [CODE]<%@ page import="java.io.*" %> <%@ page import="java.lang.*" %> <%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ …

Member Avatar for bowmaster
0
324
Member Avatar for javaNooblet

Hi All, I am currently trying to figure out to finish this project. Below is my code that I have so far. There are some blank methods that I am not sure where to even begin on how to complete them. I have a description of what the methods should …

Member Avatar for NormR1
0
2K
Member Avatar for bossie09

Hello Every One Can some one provide me with a php download script......I would appreciate if its well commented so I can know what each line of code is doing. I understand the php uploading.....just need the download script to tap things off Thanks

Member Avatar for diafol
0
143
Member Avatar for omesanni

Hi, I am currently in my final year doing an eportfolio system as my final year project and this system will allow students to do things such as upload images, academic documents in say word,pdf files. Also it would allow students to set privacy issues to each document in their …

Member Avatar for cnwanjah
1
2K
Member Avatar for Firzin

So I have question regarding a program I need to write. I need to read a text file which consists of a location and the coordinates of it's longitude and latitude. The program should be able to read any amount of spaces and tabs in between the tokens. So it …

Member Avatar for mzimmers
0
190
Member Avatar for low1988

I'm going to do my graduate dissertation this year .My title is develop a forensic tools which is able to detect and analyse the file signature then compare it with the extension.If the extension is wrong match with the file signature then there is a feature in the tools that …

Member Avatar for akkbkht
0
1,000
Member Avatar for v_janssens

I am using _getcwd() to get the full path of the current working directory but I am having a strange problem with this: When I run the program from within Visual Studio _getcwd returns "F:\...\ProgramName\bin" to which I append "\Debug\config.txt" to give the path of a text file. However, when …

Member Avatar for Tumlee
0
409
Member Avatar for revski

hi i seem to have run into a problem when adding records to a Typed file that already exists. I have used ReWrite method to create the file in the first place. [CODE] // Open the file for writing To AssignFile(F, ExtractFilePath(Application.ExeName) + 'bin\drivers' + (frm_vars.Driver1.Caption) + '\card.digi'); Rewrite(F); // …

Member Avatar for pritaeas
0
252
Member Avatar for manpreet87

Hi, i am working on a script that will filter out the unique trace of error logs from a log file. The log file might contain different types of exception traces(like Null Pointer Exception, Illegal Argument Exception etc.) and i want to retrieve each such exception trace and also count …

Member Avatar for manpreet87
0
216

The End.