145 Topics

Member Avatar for
Member Avatar for ihatehippies

I'm doing some research to determine the most efficient way to copy files. I've got 3 candidate functions: #1 [CODE=python] # uses generator to load segments to memory def copy(src, dst, iteration=1000): for x in xrange(iteration): def _write(filesrc, filedst): filegen = iter(lambda: filesrc.read(16384),"") try: while True: filedst.write(filegen.next()) except StopIteration: pass …

Member Avatar for ihatehippies
0
6K
Member Avatar for Virangya

hi, i'm developing this small seo component, i want to know how it should be done. now i'm writing seo meta tags and other tags search engines looking into the page. i'm getting the content of the page and look for the previous set of say, keywords and replacing them …

Member Avatar for Virangya
0
129
Member Avatar for konman795

Hello all, I have an assignment in which I need to subclass and implement an abstract method (java.io.OutputStream) to create an output stream called NumStream. The NumStream class converts digits to strings. We are given most of the code it seems and I need to only implement one area. It …

Member Avatar for ztini
0
231
Member Avatar for Lucaci Andrew

I keep getting this error and i don't understand why. [code]Traceback (most recent call last): File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 105, in <module> fr_runt() File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 95, in fr_runt run.run() File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 58, in run self.data.write(file, key, value) File "E:\University\Workspace eclipse\dictionares\src\dcts\dicts.py", line 23, in write fh = …

Member Avatar for Lucaci Andrew
0
304
Member Avatar for Graphix

Hi everyone, I'm currently working on a cross-platform project to copy data from the computer onto a USB drive quickly. [B]Main problem: EOF in the middle of the file[/B] It's going good so far, but I stumbled across a problem in my copy_file function: [CODE]int copy_file(char *source_path, char *destination_path) { …

Member Avatar for Graphix
0
2K
Member Avatar for Awilson089

Not sure if this should be in the MySQL section but here goes, I basically need some sort of code which can read events from a database, display them on a webpage, and the ability to edit and add new events. Please do not suggest any sort of calendar as …

Member Avatar for Awilson089
0
176
Member Avatar for DavidKroukamp

I have seen many people struggling with Reading files and writing files in java, also a great problem is how to edit a file too. So in this code snippet I have put all these problems into one small program in hopes to help others. So this code snippet will …

Member Avatar for DavidKroukamp
5
22K
Member Avatar for s3ttt

using System; using WebApplication1.mdws; using System.IO; using System.Text; namespace WebApplication1 { public class MdwsDao { QuerySvc _svc; public MdwsDao() { _svc = new QuerySvc(); _svc.CookieContainer = new System.Net.CookieContainer(); } public void connectAsJohn() { _svc.visitSite("foo", "523", "523", "SMITH,JOHN", "3050134", "999999999", ""); } public string[] ddr(string vistaFile, string vistaFields, string flags, string …

Member Avatar for thines01
0
189
Member Avatar for Tobyjug2222

Hello, I'm Rather new to coding, and It seems like I skipped some of the basics, and jumped in the deep end. I'm having a couple of problems, as I have an ordinary text file called "Orders", and this file stores Orders, placed by users of my program. The Users …

Member Avatar for Reverend Jim
0
212
Member Avatar for Tobyjug2222

Hi, I've been searching around these forums for quite a while now, and can't seem to either understand or find what I'm looking for. ^ As you can probably tell, I'm a real Novice to VB! I have a text file, that my program is always adding to it, it's …

Member Avatar for Tobyjug2222
0
297
Member Avatar for Tobyjug2222

Hello, I'm currently making a program in Visual Basic 2010 for my Course work, and I'm struggling a little as it involves a "log-in system." The system will save the Users Information in a folder (Called UserInfo.txt) (Address, Password, Email etc..), and the folder name being the username of the …

Member Avatar for berniefitz
0
955
Member Avatar for Lemony Lime

So, I have a two part question for you... I'm going to be writing several lines of code to a .txt file, but I won't know what each line is, or how many there will be. There could easily be hundreds of lines. I need to add a prefix to …

Member Avatar for gorbulas
0
222
Member Avatar for Lemony Lime

I'm pretty new to programming, so this may be really obvious, but I'm having trouble with it. I'm trying to learn python, so I thought I'd make a simple program in python to help me write similar lines of java code faster, (I'm going to easily have hundreds of lines …

Member Avatar for Lemony Lime
0
534
Member Avatar for jantrancero

I want to build a script that does the following: The script should do make an arry from the directory where the script is with os.listdir(). Then the script has to test if the value in the array already excists in the outcome file, if not the name in the …

Member Avatar for jantrancero
0
245
Member Avatar for Prisms

Whats up everyone I have a question, but first of all I know how to read a file, write to it and all that good stuff I was wondering how do I manipulate data from one. I want to take this .txt file and compute the gpa by taking the …

Member Avatar for Prisms
0
181
Member Avatar for ricedragon

I am currently writing a Client and server program and I have no idea where when wrong with the write function It calls the function [CODE] writeToclient (int clientFd) { tatic char* win = "you win !"; write (cliendFD , win , strlen(win)+1) ; printf("test"); } [/CODE] it execute the …

0
78
Member Avatar for johnnc

Greetings, I am trying to write XML using SimpleXML for a web service call. I was having success until the XML got a little more complicated. Here is the XML format where I am running into problems: [CODE] <Agent> <Person Last='Smith' First='John'> <Addresses /> <PhoneNumbers> <Phone Type='1' Number='888-555-1212'> </PhoneNumbers> </Person> …

Member Avatar for jmichae3
0
439
Member Avatar for elbeato

Hi there, I'm using php to try and take two separate arrays ($colors and $message), write them to a single multidimensional array ($endline), and then write the resulting md array into a csv. This works fine on my localhost, but for some reason it doesn't work through my web host. …

Member Avatar for elbeato
0
358
Member Avatar for mbirum

Hello, I have a project in which I have to write a client program for the finger protocol. It's a very, very basic program which covers the basic socket() connect() connectToHost() and read()/write() functions. I am having a small problem which I cannot figure out. My program compiles perfectly, no …

Member Avatar for mbirum
0
207
Member Avatar for lavenzo

hi, i having some problem here. I have a DLL written in C# but I need to re-write it in C++ using visual studio 2005. I have no C++ language..o.O so could some one help guide me? help translate my code..should i use new project > 'Class Library' project or …

Member Avatar for thines01
0
2K
Member Avatar for meowbits

I am in an assembly class and we are now working on using files. Part of the assignment is to make a file and write an array full of values into it. I have been working on this assignment for some time and I am stuck on the file portion. …

Member Avatar for meowbits
0
214
Member Avatar for huntaz556

Hi everyone im making a program to keep track of your movies just keeping it simple ! but im having a problem i am writing what movies you have to a text file but i cant append to it every time i write to the text file it overwrites everything …

Member Avatar for TrustyTony
0
294
Member Avatar for George_91

I've to make several experiments of some algorithms. I want to send those results to a .txt file [CODE] //.... for (count= 1; count<= 20; count++){ //.... std::cout<<exp<<"Time: "<<duration << " seconds" <<'\n'; ofstream f2; f2.open("results.txt", ofstream::out); for(int i=0; i<=20; i++){ f2<<duration<<endl; } f2.close(); } [/CODE] With this code, I …

Member Avatar for MachDelta
0
179
Member Avatar for infantheartlyje

Hi folks, I had created a class for student. This is the class. [code] class student { int rollno,marks; char name[20]; public: void show(); void get(); int filecreate(const string &,fstream &); int fileopen(const string &,fstream &); static int add(const student &,fstream &); static int read(const student &,fstream &,int); static int …

Member Avatar for WaltP
0
222
Member Avatar for Nirvin M

Is it possible to write an operating system with Pascal Language (Free Pascal)? If yes, how to get started? Kindly somebody help me!

Member Avatar for TrustyTony
0
82
Member Avatar for Tourbillion

I am trying to do this simple encoding program for class. It is supposed to encode it using the ASCII chart and some slight modding of the number. Then it should be written to a file 'encryptedmessage.txt' for later reading by a decoder later. My issue is I dont know …

Member Avatar for TrustyTony
0
261
Member Avatar for sjgood

I am having trouble with a python homework question. The problem is the following: You are to write a program that counts the frequencies of each word in a text file (text.in), and outputs each word with its count to a file (word.out). Here a word is defined as a …

Member Avatar for JoshuaBurleson
0
316
Member Avatar for cent91

hello everyone. i read about the functions abswrite() or absread() etc, but these fucntions are not supported in modern compilers. i would like to know what are the modern alternatives of these functions in c++?? btw i am using visual studio 2010 and rad studio xe.

Member Avatar for cent91
0
315
Member Avatar for anirudh33

hi all, I guess my first thread here, and I am on with some questions too. Actually I am doing an article on importance of writing among IT professionals. So what better place than Daniweb to ask it. In order to form such an article I will need your views. …

Member Avatar for anirudh33
0
248
Member Avatar for Smithy566

Hi all, Ok, so here is the scenario, I have a hard drive that has Windows XP Embedded installed, and has various project files stored in a folder. I need to overwrite these files but I no longer have access to via Windows because of the way it has been …

Member Avatar for Stefano Mtangoo
0
155

The End.