I am currently working on a program to track my mile for my monthly expense report for work. Everything is working great, however, I can not for the life of me find a code to write 8 lines from the text file back into the listview on my form. I have found some samples that work for 2 to 4 columns, but not for 8. My code for saving the file is as follows: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim sfile As New SaveFileDialog With sfile .Title = "Choose your path to save the information" …

Member Avatar
Member Avatar
+0 forum 9

I am having my friend USB, which contains the error while Formatting, copying, deleting, renaming, moving files from it. The error is `"The Disk is Write Protected"`, I don't Know why this all happens? I try to repair it with the google help and find some common solution and tried too But I failed (i.e. that's don't work for me) My Work (My trials) Regarding the hotfix, I think you can install it directly. The hotfix will replace/update some USB related system files which would be helpful for USB related issues. Actually, I have had this type of issue before …

Member Avatar
Member Avatar
+0 forum 16

Hi, I have started this project and come to the point where I can't figure out how to finish it. First Want to say that I'm noob for VB6 and programming in general, but I saw some examples and make it work this part of job I need. I will upload complete project, and sample text file, and screen shoot also, where I have explained how I want my app to work. So, please take a look and help me if you can :) in short - I need app to write text file with specific number of lines, continuing …

Member Avatar
Member Avatar
+0 forum 10

Part 3 of the taste of Swift explores class objects in Apple's Swift language. A class allows you to group methods (class functions) together that belong together. Class Person groups some information of people working in an office. Class Pay inherits class Person and adds pay information. Class File groups file read and write methods. By convention class names start with a capital letter. Once a class is written it can be inherited by another class which eliminates a lot of extra code writing. Part 4 will talk about a related object, the structure. Swift has elevated the structure to …

Member Avatar
Member Avatar
+1 forum 5

Hi, I have writen web sites before but have been asked to create a VB program, but dont know where to start so hoping someone can help me. I need to create a program that sits waiting for data from the serial port which is attached to a set of scales, when the scales are triggered they send the weight of the object down the serial port to the pc that then writes the data to a text file and then waits for the next weight to be received, and continuous to run until stopped at the end of the …

Member Avatar
Member Avatar
+0 forum 5

**Read title.** username = base64.b64encode(username)+'\n' This is what I thought would have worked, but it comes up with an error, "TypeError: can't concat bytes to str", meaning that I cannot add +'\n' to the end of the code. If there is anyway anyone knows how to write the byte of base64.b64encode(username) to a file line by line, please help!

Member Avatar
Member Avatar
+0 forum 2

I'm not understanding why i'm able to read from the file but i can't write to it. The fstream is open in both modes. Once the program finishes i haven't changed the content of the file. Thank you in advance. #include <fstream> #include <string> #include <iostream> int main() { std::string line; std::fstream m_File("/home/user/file.txt", std::ios::in | std::ios::out); if(m_File.fail()) return -1; // read file std::getline(m_File, line); while(m_File.good()) { std::getline(m_File, line); std::cout << line << std::endl; } // write to file std::string line2 = "test to write"; m_File.seekp(std::ios_base::beg); m_File << line2; m_File.close(); return 0; }

Member Avatar
Member Avatar
+0 forum 6

hi all i've been strugling with this error. could someone help me. below is the code stremail = "some@email" For Each store In outlookapp.Session.Stores strchecking = store.DisplayName outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) For Each objfolder In outlookfolder.Folders For Each obj As Object In objfolder If TypeOf (obj) Is Outlook.MailItem Then MsgBox(obj.Subject) End If Next Next Next the error says : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." and it appears in this line `outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)`

Member Avatar
Member Avatar
+0 forum 10

I have written some code just to practice verbosity in python. Verbosity is embedded by means of the ArgumentParser module....however, I'd also like to write the stdout to file also when verbosity is disabled : #!/usr/bin/python from optparse import OptionParser from argparse import ArgumentParser import sys def printable1(): print "1" def printable2(): print "2" def printable3(): print "3" def Main1(): printable1() printable2() def Main2(): printable2() printable3() class Logger(object): def __init__(self): self.terminal = sys.stdout self.log = open("logfile2.log", "a") def write(self, message): self.terminal.write(message) self.log.write(message) #te = open('./logfiles.txt','w') # File where you need to keep the logs #class Unbuffered: #def __init__(self, stream): #self.stream …

Member Avatar
+0 forum 0

Hello I am using jxls quite fine. I'm sort of on my last lap with exporting my data to a file. However all I want to know is, how do I display my collection in the same row please? I've manage to do this downwards in the same column, but I'm not sure how to display them across in the same row. There website telss me how to do multiple collections across, but not one. Oy. I hope someone has an idea, because it "seems" simple enough.....seeems, but I judt don't tknow the syntax.

Member Avatar
Member Avatar
+0 forum 1

Hi all, I'm trying to use the following code to see if a method exists and then use it if it does: $method_exists = method_exists('myclass', 'mymethod'); if ($method_exists && isset(myclass::mymethod('blah')) { but I am getting the following error: Fatal error: Can't use function return value in write context I've looked around on google and seen various explanations of why this could occur but none of them seem to make sense with this scenario. Any light shed on the matter would be greatly appreciated. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I need to create a page where an admin can upload an excel worksheet in the .xlsx file format, this is then read and writen onto another php page. I'm new to PHP so I am confused by the code, I can find help on .xls but not accepting .xlsx. Thanks for any help.

Member Avatar
Member Avatar
+0 forum 1

Hi I am a beginner programmer and I am really interested about learning new skills. So I need your help. I have a question regarding designing. I want to design a website where the user will be first shown couple of example page designs/template and then the user chooses one of it. Then the user will be asked to give his inputs in a form. After this, when the user presses the Submit button, the details of the form will be automatically written in that chosen example page using the user details. How can this be done? Which languages should …

Member Avatar
Member Avatar
+0 forum 6

Hey guys, I need assistance with my program need to write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many random numbers the file will hold. Once that program is done, need to write a program that reads from a file named ‘random.txt’ using a for loop with in file_object clause, display the numbers, and then display the following data: the sum total of the random numbers picked and the number of random numbers read from …

Member Avatar
Member Avatar
+0 forum 2

I want my XML file to look like this: <?xml version="1.0"?> <Student> <Name>Jax</Name> <Prenume>Teller</Prenume> </Student> I wrote the following code in C#: using System; using System.Xml; namespace ReadingXML2 { class Class1 { static void Main(string[] args) { XmlTextWriter textWriter = new XmlTextWriter(@"c:\users\danuts\documents\visual studio 2010\Projects\BD - XML\BD - XML\XMLFile1.xml", null); textWriter.WriteStartDocument(); textWriter.WriteString("\n"); textWriter.WriteStartElement("Student"); textWriter.WriteString("\n"); textWriter.WriteElementString("Name","Jax"); textWriter.WriteString("\n"); textWriter.WriteElementString("Prenume","Teller"); textWriter.WriteEndElement(); textWriter.WriteEndDocument(); textWriter.Close(); } } } It breaks at line "textWriter.WriteString("\n");" and I can't figure out why. The error I get is this: An unhandled exception of type 'System.InvalidOperationException' occurred in System.Xml.dll Additional information: Token Content in state Prolog would result in an invalid …

Member Avatar
Member Avatar
+0 forum 2

i am working on a project but this parts seems to stall me i want to be able to write to a text file to change just two lines of d file say line 1 and 3 using wxwidgets i will appreciate helps nd suggestions thanks

Member Avatar
Member Avatar
+0 forum 5

Good morning community, Can someone help me with the IndexOf method to reverse the name: Don Paul to Paul, D

Member Avatar
Member Avatar
+0 forum 4

I'm curious about write locks with MySQL and how they are prioritized with eachother. Specifically, I'm wondering if "low priority write" locks have lower priority than "normal" write locks, or if they are equal. The only documentation I can find states that the low priority locks have lower priority than read locks, allowing read locks to process first. But I can't find anything that states how they relate to other write locks. The point of this is that I'm looking for a way to "prioritize" write locks, and wondering if just the standard low priority lock will do what I'm …

Member Avatar
Member Avatar
+0 forum 1

hi, I'm new in Java and Hadoop. I'm in need of MapReduce code for large EEG data file split in Java. Based on channels(electrodes attached on head) and time, data have to be splitted. In mapper file splitting takes palce and in reducer it process the splitted data. For parallel processing mapper give splitted data to different nodes. Mapper(master node) and slave nodes have reduser. I have an overview of mapreduce code that I given below. I'm quite sure that it may be wrong, because I'm new in Java. Please help me to write map and reduce code. //getfile(File location) …

Member Avatar
+0 forum 0

I would like to know how to take selected information from a listview and add them to a .dat file This is what i got so far but it is to save into a text file Sorry for any mistakes i am a noob Private _filepath2 As String = Application.StartupPath & "\Teachers/Courses.dat" Private Sub SaveToFile(LV As ListView, fpath As String) Dim swriter As New StreamWriter(fpath, True) Dim line As String With swriter For i As Integer = 0 To Listview1.Items.Count - 1 swriter.Write(Listview1.Items(i).Text) For subItemIndex As Integer = 1 To Listview1.Items(i).SubItems.Count - 1 swriter.Write(Listview1.Items(i).SubItems(subItemIndex)) Next sw.Write(line.NewLine) Next sw.Close() End With …

Member Avatar
Member Avatar
+0 forum 4

How to read a specific value from a text file and then save the value in another text file. Example: in data.txt file there is some values. Item Name : m-01 Item Brand : One Man Item size : XXL Item Price : 1000 Item vat : 15% these are the data saved in data.txt Now my program will ask for the item name and when I will write the item name(ex:m-01) It will just take the values 1000 ( price ) and 15 (vat) and then will save them in a new txt file data2.txt How can I do …

Member Avatar
Member Avatar
+0 forum 12

Hi Guys, I was trying to code in C for the following. You are given with 2 files, file1.txt and file2.txt. The contents of the file contain INTERGER values. Add the contents of the file and write them to another file file3.txt. My code is as follows #include <stdio.h> #include <stdlib.h> int main() { static int data,data1,sum; FILE *f1,*f2,*f3; f1 = fopen("C:\\file1.txt","r"); f2 = fopen("C:\\file2.txt","r"); f3 = fopen("C:\\file3.txt","w"); while(( fscanf(f1,"%d",&data) != EOF ) || ( fscanf(f2,"%d",&data1) != EOF )) { if(data == EOF && data1 == EOF) { break; } else if(data == EOF) { sum += data1; } else …

Member Avatar
Member Avatar
+0 forum 5

Write code to record daily humidity of a place for a week

Member Avatar
Member Avatar
+0 forum 1

Hello I have a XML DB. I write the first element. I can not get the entries to (fragments) to write to the Database. I know I do not have the error handler setup right. The error stops the process on the transform. Is there some debugging techniques I could use to understand why the fragments are not being appended. All the data is collected and in place. Thanks. java.lang.NullPointerException at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(ToUnknownStream.java:342) [code] dom: import java.io.*; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import model.notes.reference.ReadXML; import org.w3c.dom.*; [/code] [code] XML DB <?xml version="1.0" …

Member Avatar
Member Avatar
+0 forum 2

Hi I have data in the following format that I need to write to a csv file. Student1 Mark1 Mark2 Mark3 Mark4 Mark5 Student2 Mark1 Mark2 Mark3 Mark4 Mark5 Student3 Mark1 Mark2 Mark3 Mark4 Mark5 Student4 Mark1 Mark2 Mark3 Mark4 Mark5 Student5 Mark1 Mark2 Mark3 Mark4 Mark5 I am writing my code in C. Any ideas on how I can do this?

Member Avatar
Member Avatar
+0 forum 1

Hi Everyone, I need to write to a text file that is located on my website Currently, I have the following code to let me read from a text file on my website [CODE]HttpWebRequest reqFP3 = (HttpWebRequest)HttpWebRequest.Create("http://jamesgeddes.com/tracknan/phone3.txt"); HttpWebResponse rspFP3 = (HttpWebResponse)reqFP3.GetResponse(); Stream st3 = rspFP3.GetResponseStream(); using (StreamReader sr3 = new StreamReader(st3)) { WebTextPhone3 = sr3.ReadLine(); }[/CODE] What do I need to do to write to that file instead? Thanks everyone! James

Member Avatar
Member Avatar
+0 forum 2

Okay I am wondering what is a syntax to create a new property with read-write proprties, I read the book but it is not clear. Your help is appreciated

Member Avatar
Member Avatar
+0 forum 1

trying to make this script work: <script type="text/javascript"> var tmp='<html><head><title>popup</title>'; tmp+='<script type=text/javascript>'; tmp+='function nowTime(){'; tmp+='var oNowTime=new Date();'; tmp+='var iMonth=oNowTime.getMonth();'; tmp+='var iDate=oNowTime.getDate();'; tmp+='var iYear=oNowTime.getFullYear();'; tmp+='var iHours=oNowTime.getHours();'; tmp+='var iMinutes=oNowTime.getMinutes();'; tmp+='var iSeconds=oNowTime.getSeconds();'; tmp+='var iMilliSeconds=oNowTime.getMilliseconds();'; tmp+='var sNowTime=iHours+":"+iMinutes+":"+iSeconds;'; tmp+='return sNowTime'; tmp+='}'; tmp+='function nowDate(){'; tmp+='var oNowTime=new Date() '; tmp+='var iMonth=oNowTime.getMonth()+1'; tmp+='var iDate=oNowTime.getDate()'; tmp+='var iYear=oNowTime.getFullYear()'; tmp+='var iHours=oNowTime.getHours()'; tmp+='var iMinutes=oNowTime.getMinutes()'; tmp+='var iSeconds=oNowTime.getSeconds()'; tmp+='var iMilliSeconds=oNowTime.getMilliseconds()'; tmp+='var sNowTime=iYear+"-"+iMonth+"-"+iDate;'; tmp+='return sNowTime'; tmp+='}'; tmp+='function showNowTime(){'; tmp+='var oObjId1=document.getElementById("mdate");'; tmp+='oObjId1.innerHTML=nowDate();'; tmp+='var oObjId2=document.getElementById("mclock");'; tmp+='oObjId2.innerHTML=nowTime();'; tmp+='setTimeout("showNowTime()",1000)'; tmp+='}'; tmp+='<\/script></head><body onload="showNowTime()">'; tmp+='<font size="7">'; tmp+='<div id="mdate">mdate</div>'; tmp+='<div id="mclock">mclock</div>'; tmp+='</font></body></html>'; var newwindow2=window.open('','name','height=200,width=150'); newwindow2.document.write(tmp); </script> What's Wrong ?? any suggestions are welcomed. thanks

Member Avatar
Member Avatar
+0 forum 5

Hi all I need any tool which can write protect all externl storage devices in corporate network of more than 200 computers. thanks in advance

Member Avatar
Member Avatar
+0 forum 4

matrix multiplication program

Member Avatar
Member Avatar
-1 forum 2

The End.