6,015 Topics

Member Avatar for
Member Avatar for dev.vini

her is the code and please tll me that how can i save the directory file in same location that is opend in textarea pls tell me soon[code]<?php if(empty($_GET['dir'])) $currdir = '.'; else $currdir = $_GET['dir']; // open this directory $myDirectory = opendir($currdir); // get each entry while($entryName = readdir($myDirectory)) …

0
63
Member Avatar for fire_

Hello. I'm writing program wich reads from file line by line and then rewrites everything to other file. This is simplifyied part of code: [CODE]for (int i=0; i<=5;) { getline (file1, str1); /* file1 is file from wich i read and str1 is string*/ file << str1; }[/CODE] No i'm …

Member Avatar for Ancient Dragon
0
275
Member Avatar for ganesh_IT

Hi guys, i want to read a file backward using iterator pls any explain me with sample code

Member Avatar for Topi Ojala
0
52
Member Avatar for dsul

Hey people, I've been coding in vb.net for a while but never had to publish anything (it didn't get covered during any of my classes) so here's my confusion: Context: My application uses an existing excel spreadsheet which it then modifies per user input, and saves the modified version to …

Member Avatar for ÜnLoCo
0
387
Member Avatar for phplover

Hi, Does a file have to be writable in order to be deleted? If a file is writable using the php [b]is_writable()[/b] function does it mean it can also be deleted because it is writable? Reason for asking is before i attempt to delete a file and record from database …

Member Avatar for phplover
0
119
Member Avatar for pdoratis

Hello there, Kindly seek your help with a C programming language program that: 1 Reads reads and modify a text fine called mydata.txt 2 In txt file, we must enter the following data : name surname telephone number like this: John West 6976688742 3 The program should be able to …

Member Avatar for challarao
0
1K
Member Avatar for iadman

Hi, In my project im using CGI and c++ in the server. When ever i download files from the server, IE 8 opens a window for every file downloaded. Then it does not close that damn new window. Please help me remove these extra windows.

0
80
Member Avatar for revsin

I'm a noob, there got that outta the way. Wrote this to serve as a very basic inventory control for our store's iPad inventory. Lets junior employees count our inventory, and then appends the count in a text file. 99% there for what I want, but having trouble getting it …

Member Avatar for revsin
0
104
Member Avatar for watery87

hi guys, am currently coding a multi threaded program to solve a maze. But firstly im having trouble saving the maze into 2d array. Any help is much appreciated [CODE] #include <stdlib.h> #include <iostream> #include <stdio.h> #include <fstream> using namespace std; void getMaze() { fstream readMaze("mazedata.txt"); string templine, line; while(getline(readMaze, …

0
75
Member Avatar for Dremerend

Hi, I am trying to write a somewhat basic program to read and write to a .cfg file(text file). Inside the .cfg file are a bunch of lines like so: server 127.0.0.1 servername Test server_no 1 server_group 1 etc, etc. The first word in the line being the name and …

Member Avatar for PsychoCoder
0
138
Member Avatar for SeanC

I'm trying to create a method which checks if a certain text file is empty, and if so it deletes it. However, the program seems to freeze for one reason or another when executing this part. [CODE]try { BufferedReader in = new BufferedReader(new FileReader("File List.txt")); String str; while ((str = …

Member Avatar for SeanC
0
2K
Member Avatar for Brandlax

I want a very good download manager for my OS X.. heres the reason. i want to download Xcode and iPhone SDK which is 2GB. So i want to download it partially as the connection in my country is not very good. For example: 1.i downloaded 200MB today. 2.turned off …

Member Avatar for Anna Brooks
0
148
Member Avatar for K0ns3rv

Hello fellow daniwebians. So I've encountered this problem with querys in PHP. In the system I am working on at the moment we've created an install file which tests the db connection, creates the db structure e.t.c. But when creating the database the query fails. The query it self i …

Member Avatar for pritaeas
0
154
Member Avatar for ak_barik

When runnning scapy from command prompr (windows XP), the output cannot be stored. When the following command is executed in command prompt: scapy >C:\dir.txt The following error shows up: C:\automation\atg\GeneralFiles?_AC\ScapyExe?>scapy >C:\dir.txt INFO: Can't import python gnuplot wrapper . Won't be able to plot. INFO: Can't import PyX. Won't be able …

Member Avatar for Beat_Slayer
0
449
Member Avatar for ak_barik

I am trying to convert a testtoexe.py (which imports scapy and paramiko) file to exe. I am running Python2.6 (in PythonWin?) on Windows XP. I am using pyinstaller1.4 I am able to convert the .py to .exe, but..... I get the following error when I run the exe: C:\automation\createexe\dist>testtoexe.exe ['C:/DOCUME~1/arinc/LOCALS~1/Temp/_MEI4842', …

0
78
Member Avatar for raju_boini525

hi all, i am uploading bmp image. it is uploaded but my problem is it is not croping. i am getting this error [CODE]Warning: imagecreatefromwbmp() [function.imagecreatefromwbmp]: 'products_image/76525Linksys SPA921 IP Phone.bmp' is not a valid WBMP file in C:\wamp\www\touchintelligence\admin\products.php on line 107 Warning: imagecopyresampled(): supplied argument is not a valid Image …

Member Avatar for sDJh
0
77
Member Avatar for amithlaxman

Hi, I am a newbie to a perl. I have a problem in getting old and new contents of file. The file is like this: [code] StartTimeStamp,EndTimeStamp,counter1,counter2 Aug15 2010 22:45:43,Aug15 2010 23:00:00,6,0 Aug15 2010 23:00:00,Aug15 2010 23:07:43,3,0 [/code] The output should be: [code] Aug15 2010 23:00:00,Aug15 2010 23:07:43,3,0 [/code] After …

Member Avatar for d5e5
0
141
Member Avatar for johnroach1985

Hi. I really know very little about linux scripting. And I need help writing this script. The script is to get one parameter which is <directory>. And than the following will ensue; [CODE] for each image within directory [INDENT]if not(image exist in temp-directory) [INDENT]cp image to temp-directory and resize to …

Member Avatar for rch1231
0
178
Member Avatar for JDuch

""" Hi i intended to list the built-in function using this function. It seems however to give me the results corresponding with a dictionary. Why is that ? """" [CODE] def showbuiltins(): """ saves the list of built in functions to a file you chose """ blist = dir(__builtins__) print …

Member Avatar for JDuch
0
188
Member Avatar for hari.sarvothama

The aim of the program is to read contents from 2 files and store it in struct variables.(This is actually a part of another program which stimulates pass2 of two pass assembler) [B]This code works fine.[/B] [code=c] #include<stdio.h> #include<stdlib.h> #include<string.h> struct optbl { char opco[10]; int value; }o_tbl[100]; struct symtbl …

Member Avatar for hari.sarvothama
0
2K
Member Avatar for plizz

I think that I misunderstood something about class definitions in c++... Why it is legal to define class in multiple files, like this: file Test.cpp: [CODE]#include <iostream> using namespace std; void testFunc(); class A { public: void printText(); } clA; void A::printText() { cout << "file: Test.cpp, class: A, method: …

Member Avatar for mike_2000_17
0
277
Member Avatar for cac186

I'm working with a java application and trying to modify this code so that it no longer prompts the user with the Dialog box to save a txt file. The user already uses the Dialog box to choose a directory in which to save the file at an early point …

Member Avatar for cac186
0
612
Member Avatar for saransh60

[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> // for exit function // This program reads values from the file '1.txt' // and echoes them to the display until a negative value // is read. int …

Member Avatar for Ancient Dragon
0
169
Member Avatar for Petitcharatonyo

Hello World! I'm new in the forum and I don't have too much experience with C++, I'm looking for help with my code, I hope you could help me :) I have to read from a file.txt different collumns, each of them corresponds to a parameter and store them in …

Member Avatar for sfuo
0
583
Member Avatar for saransh60

[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> int main() { ifstream indata; // indata is like cin char num; int sar,ri,sat,ha; sar=0;ri=0;sat=0;ha=0; char s[]=".txt"; for(int some_int=1;some_int<=3;some_int++){ ostringstream buffer; buffer <<some_int; string s1 =buffer.str(); s1+=s; indata.open(s1.c_str()); …

Member Avatar for saransh60
0
199
Member Avatar for browgreg

Hi all, I am trying to work out how to use the try and catch methods in Java. I am new if you havent guessed and I am wondering how I can change my code which searches for a particular user id which is inputted and when found it opens …

Member Avatar for NormR1
0
137
Member Avatar for judithSampathwa

Hi there, I have a question regarding file open in C# , I have the path of the file saved in the database, what I want is when I open the open dialog button it will show the files in the path that I have saved and when the use …

Member Avatar for judithSampathwa
0
151
Member Avatar for helpme87

so i am designing some software to prompt the user to enter their account number which in turn leads them to have to input their usage of ln. this then is to be displayed in a database file. i have all the code done for this. it reads in the …

Member Avatar for helpme87
0
151
Member Avatar for judithSampathwa

Hi there, I have a question regarding file delete, for this I use the File.Delete() commend . as a parameter for this I send the file path. Which is “C:\\Documents and Settings\\awaduge\\My Documents\\Visual Studio 2008\\Projects\\Admin Application\\Admin Application\\Details\\P110082010112121\\Report\\Technical Sheet" And Technical Sheet is the file name. the file can be in …

Member Avatar for nssltd
0
186
Member Avatar for Levo

Hi, I am using the following code to download files from the internet: [code=c]size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written; written = fwrite(ptr, size, nmemb, stream); return written; } int main(int argc, char** argv) { FILE *downloaded_file; if ( (downloaded_file = fopen (download_path , "w" …

Member Avatar for 0x69
0
2K
Member Avatar for omega1

hi all, i am trying to have the content of a txt file loaded in a page (which works), but this file changes on a regular basis and I need just the text to refreash, not the whole page, this is what I have... As mentioned, it correctly displayes the …

Member Avatar for omega1
0
1K
Member Avatar for mybluehair

Hello. I have a php file with a form on it. the form has a few text fields and a few file fields. The problem is that for some weird reason the file upload fields screw everything up. After I press submit, it carries NO data to the fallowing page. …

Member Avatar for syamsasi
0
267
Member Avatar for hjaffer2001

Hi all, I have a code which works fine. [code=php] <?php $db = mysql_connect("localhost","root",""); mysql_select_db("test",$db); $today = date("F j, Y, g:i a"); //echo $today;exit(); $file = "test.txt"; $fp = fopen($file, "r"); $data = fread($fp, filesize($file)); fclose($fp); $output = str_replace("\t|\t", "|", $data); $output = explode("\n", $output); foreach($output as $var) { //$categories_id …

Member Avatar for Karthik.gautham
0
140
Member Avatar for chitian5057

Hi All, Is there a way to create a HTML file generated in browser in a JSP file? This same JSP file parsed by server and show up in a browser in HTML form and also save this HTML form to a HTML file on the server. The only way …

Member Avatar for javaAddict
0
160
Member Avatar for zahnsoftware

Not sure if this is the best topic to post this question. We had an issue where during uploading javascripts, they became corrupt and no longer executed on the web page. Is there an automated way to detect if the uploaded files match the source file to detect corruption? We …

0
77
Member Avatar for hussey001

[CODE]#include <iostream> #include <fstream> using namespace std; void countWords(fstream &myText, int word); void countLines(fstream &myText, int lines); void wordLength(fstream &myText, int length); int main() { char textLine[100]; int lines = 0, word = 0; fstream myText; myText.open("myText.txt", ios::in | ios::out); if (!myText) { cout << "Cannot open file - myText.txt" …

Member Avatar for Fbody
0
108
Member Avatar for watery87

Hi guys, am currently creating a client/server program. However im having trouble reading from a text file. Im not sure whether fgets or fread is better in my case. Basically my program requires user to input a country, and the program will display its details out.My question is, what method …

Member Avatar for watery87
0
479
Member Avatar for jenzilla

Hi.. I've been trying to get this to work for hours now but I'm not understanding what to do. Basically I'm creating a quiz on python with 5 questions. I have a function that is only for the quiz. Another function is to display the highest quiz score. I want …

Member Avatar for Beat_Slayer
0
4K
Member Avatar for java_programmer

I am writing a program which will read a properties file. I craeted the properties file and placed it in the same location of the class file. But when I am trying to run the program from eclipse, it can't find the properties file, but if I specify the full …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for baki100

Hi i'm stuck on this script that i'm busy writing and have no idea where to start. I need a script that connects to a secure ftp, downloads files and store it on my local pc. has anyone done something similar and which modules should i be looking at.

Member Avatar for baki100
0
107
Member Avatar for newyawk

Hi, I have a file that has about 65000 lines and three columns. I need to read in the first 2 columns until line 112960. I then need to write the 12960 lines of 2 columns to a file. This needs to be repeated for about 600 files... I then …

Member Avatar for woooee
0
180
Member Avatar for riaver

Hi There I may be asking a question about something that is not do-able, but, here's my question Does anyone know if it is possible to let a visitor to my website upload a file to my server, without using the normal form file upload? maybe upload with ftp. I …

Member Avatar for riaver
0
156
Member Avatar for starlight849

Hello. I am having a problem. I am attempting to gather a group of file names from a directory. I am able to do this. I tested the code by having the list populate into a listbox and all desired items were added to the list. Here is my code: …

Member Avatar for starlight849
0
161
Member Avatar for vineetanimu

Hi All, I have written a JSP file which will run query, get the result in a csv file and send the csv file daily to an email address. But how can I execute this JSP file daily in Linux? Can anyone help in this?

Member Avatar for masijade
0
585
Member Avatar for Don_leon

I am new to c# with that in mind can some one please tell me how to call a class file that i have created in to a windows form file.for example how do i call a function that handles error logs to call and run on a form file. …

Member Avatar for saravind84
0
123
Member Avatar for fussballer

Hi, I don't know if this is the right place to post this question but here is my problem, I would like to take an audio wave file and convert it to a data file, (.csv, .txt etc). I would like to do some signal analysis on the file but …

Member Avatar for griswolf
0
191
Member Avatar for H. B. Duran

[ATTACH=RIGHT]16431[/ATTACH]Blitz Arcade, the downloadable division of Blitz Games Studios found themselves a World Record holder today, despite having accomplished this feat last year. With the creation of[I] Invincible Tiger: The Legend of Han Toa[/I] in 2009, Blitz now holds the Guiness World Record for the very first stereoscopic 3D console …

0
326
Member Avatar for okwy

his is a follow up to the question I asked earlier and with the help of some people here I was able to start up with the function I want to write,but I am yet to complete it. Here is my earlier question: I have a series of files with …

Member Avatar for Adak
0
204
Member Avatar for Ajuddy

I would like to save to database but not file. please help me and show me how i can change from file to databasetables. [CODE]****users***** <?php function saveUsers($onlineusers_file){ $file_save=fopen("onlineusers_".$_POST… flock($file_save,LOCK_EX); for($line=0;$line<count($onlineusers_f… fputs($file_save,$onlineusers_file[$li… }; flock($file_save,LOCK_UN); fclose($file_save); } $onlineusers_file=file("onlineusers_".… if (isset($_POST['user'],$_POST['oper'])){ $user=$_POST['user']; $oper=$_POST['oper']; $userexist=in_array($user,$onlineusers… if ($userexist)$userindex=array_search($use… if($oper=="signin" && $userexist==false){ $onlineusers_file[]=$user; saveUsers($onlineusers_file); echo …

Member Avatar for Ajuddy
0
148
Member Avatar for wallance

Hi, I have a file that connects to a database, database.php. I also have a file for defined constants, config.php, and it is stored in the top level directory because I'm going to use those constants on the main site and when I edit them, I don't want to edit …

Member Avatar for digital-ether
0
120

The End.