43,549 Solved Topics
Remove Filter ![]() | |
Hey guys, check this out: [CODE] File test = new File(path + "person.data"); FileOutputStream fos = new FileOutputStream(test); ObjectOutputStream oos = new ObjectOutputStream(fos); Person p = new Person(); Person p2 = new Person(); p.setName("Sub Zero"); p.setGender("Male"); p2.setName("Sonya Blade"); p2.setGender("Female"); ArrayList<Person> people = new ArrayList<Person>(); ArrayList<Person> people2 = new ArrayList<Person>(); people.add(p); … | |
Good day, I'm having problems seeing how the recursion is working with this program. I've traced it but I don't understand why after if(num >0) is false it returns to the statement following the last function call and then seems to start the recursion again, but backwards? What I see … Software Development c++ | |
Hi, I recently started learning C++ because i wan to develop games, anyway i just got to file i/o part and i got a problem with the binary file read. I created a class to test the binary file i/o: [code=c] #ifndef KAIZOKU_H #define KAIZOKU_H #include <string> #include <fstream> class … Software Development c++ | |
i have a bit a weak understanding of those 2 concepts. could you explain to me what is happening in that part of the code? [CODE] public class Part5{ public static void main(String[] args) { // Object[] zoo=new Object[4]; // zoo[0]=new Cat(); Object[] animals=new Object[4]; animals[0]=new Cat(); animals[1]=new Dog(); animals[2]=new … Software Development java | |
Hello! I am trying to edit a csv file. This is my original csv file [CODE]"TINAMIFORMES",,,, ,"Tinamidae",,, ,,"Tinamus",, ,,,"tao","Grey Tinamou" ,,,"solitarius","Solitary Tinamou" ,,,"osgoodi","Black Tinamou" ,,,"major","Great Tinamou" ,,,"guttatus","White-throated Tinamou" ,,"Nothocercus",, ,,,"bonapartei","Highland Tinamou" ,,,"julius","Tawny-breasted Tinamou" ,,,"nigrocapillus","Hooded Tinamou" ,,"Crypturellus",, ,,,"berlepschi","Berlepsch's Tinamou" ,,,"cinereus","Cinereous Tinamou" ,,,"soui","Little Tinamou" ,,,"ptaritepui","Tepui Tinamou" ,,,"obsoletus","Brown Tinamou" ,,,"undulatus","Undulated Tinamou" ,,,"transfasciatus","Pale-browed Tinamou" … Software Development python | |
I have been reading through many blogs, the MSDN website, and Google search results trying to figure this out... At what point, or in what situations would someone ever want to have multiple projects under one solution? I have thought about having a project that contains forms and some "core" … Software Development | |
Hi Folks, Windows/Python3.1.2 I'm totally at a loss with this one... The code is supposed to open a file (postscript with UNIX LF-only EOL characters), look for and change a line, then write the lines back. It works fine, except for the fact that I can't dissuade Python from writing … Software Development file-stream python unix | |
I want to be able to input two (2) 'grades' exactly like they are in the String array and have it come back printing BOTH showing the grades, again, as well as the grade score corresponding to those grades. For example: input C- (enter) B+ (enter) output does: ONLY the … Software Development java | |
This one might be a challenge... Okay some of you might have an inkling what i'm trying to do already from the last thread (thanks for helping!) but I figured I should start a new topic for a new problem so that people can search solutions easier. I've got multiple … Software Development python | |
Hi Daniweb. I just read the other threads on regex and couldn't find the help I am looking for. The problem is simple. I have a bunch of settings in a .xml file which I read into my program. One of the settings is '*.txt', which is used for regex … | |
Can anybody help me? I am following instructions about how to put an Iframe in my app. Here is the code for the button: protected void Submit_Click(object sender, EventArgs e) { //frame1 = (HtmlGenericControl)this.FindControl("frame1"); HtmlControl frame1 = (HtmlControl)this.FindControl("frame1"); frame1.Attributes["frameborder"] = "0"; frame1.Attributes["scrolling"] = "auto"; frame1.Attributes["width"] = 640 + "px"; frame1.Attributes["height"] … Software Development web-server | |
Hello everyone, I am trying to process various texts by regex and NLTK of python -which is at [url]http://www.nltk.org/book-[/url]. I am trying to create a random text generator and I am having a slight problem. Firstly, here is my code flow: Step-1)Enter a sentence as input -this is called trigger … | |
I would like to learn how to program in Java. Does anyone have any textbook /other resource suggestions? Software Development java | |
Hi, So, I did create a client and a server, and all of them work pretty well. When I send messages to the server, rather than sending one message at a time, I put the information in a class, say like a Person class - I put set the Person's … Software Development client-server java | |
While I know how to set this up perfectly, I was wondering, is it possible to set up my jdbc connection with my access database so that I have to put in a username and password? I would really like to do this with access, if it's possible Software Development java | |
Hi, I am new to perl and have been getting decently good at it. Now i am getting into doing plots with perl. I read some articles/examples on how to create plots using perl It mentions using GD::Graph Module However when i try to plot I get Can't locate GD/Graph/bars.pm … Software Development perl | |
ok i am writing a program that ask for the amount total and amount tender. then i'm supposed to calculate a combined amount of coins and dollars to make up the change amount. i know how to split out the dollar amount, but i'm stuck on how to calculate the … Software Development java | |
I want to open a PDF document when I click on a button. I know the way to open a word document but couldn't apply the same method to open a PDF document. If anyone can help me regarding this matter it would be a great help to me. Thank … | |
How can you get to only save all the modified tabs By save i mean save as a text file or open your own savedialog < example :) Software Development vb.net | |
Hey all, I've been having some problem with python - i'm pretty awful at programming but have been soldiering on with this for some time now! What I need to do is take one list and compare it to another. Both lists are presented in rows, and I need to … Software Development python | |
Hi All, I'm a relative newbie having trouble completing a program that is required to read the text character by character from a .txt file and to then encode certain characters to something thing else. It is then supposed to be output to a separate .txt What seems to happen … Software Development c c# c++ file-stream | |
Hey all, I am trying desperately to create a cube using VBO. I have the correct vertices that must be used yet when I render it, it only displays one part of the face of the cube (which in this case is a half triangle, since a square is made … Software Development c++ data-structure opengl | |
<edit>(scroll down a bit to avoid some rambling and get to the main question!)</edit> Hi there, I'm trying to write a C++ program that repeatedly executes another program (with a system call) that creates a file called 'output', then copies the output into a subdirectory and renames it so that … Software Development c++ | |
Hello there, I'm developing a server which use epoll to manage the incoming connections. I'm working at the moment on timers and I'm using the [I]setitimer[/I] and [I]sigaction[/I] interface of Linux. It's working well but I've found out that epoll and setitimer conflict each other: I guess they share the … Software Development c | |
![]() | I'm trying to write a to string function that would use std::stringstream to convert the the instance data into a string, but haven't been able to get operator overloading to work with it. As soon as I define a new << operator, I get a bunch of ambiguity errors saying … Software Development c++ visual-studio ![]() |
Good day, I've got a question about why program 19-3 won't display a returning message but program 19-2 will. THIS IS 19-2 // This program demonstrates a simple recursive function. #include <iostream> using namespace std; // Function prototype void message(int); int main() { message(5); return 0; } //************************************************************ // Definition … Software Development c++ | |
I have a vb .NET 2005 form that needs to load data based on a selected month by the user. Because there is a large amount of data in the table (60k+ records per month) it is taking the query a long time to pull the dataset back and populate … Software Development data-structure dataset vb.net | |
Hi everyone, I'm making some kind of game in Python and i need to save random number to text file but i cant. Please help me out. Here is the code: [code]def lvl(): x = random.randint(100,1000) tfile = open("text.txt", 'w') tfile.write(x) input("")[/code] Without x everything is good, but i need … Software Development python | |
Hi, I have been reading a number of posts about this, but I have not been able to figure it out. I want to write hex to a midi file. The hex code of the midi file looks like this: [CODE]4D 54 68 64 00 00 00 06 00 01 … Software Development c++ file-stream ios | |
So I am trying to implement a menu that loops in a CLI simulator, I have the menu implemented but I am stuck figuring out how to make it loop or progress to the next option that requires input from the user. I have used scanner in for the menu, … Software Development java java-netbeans | |
I was having some confusions about string and NULLs. So, I read this [URL="http://www.daniweb.com/forums/thread77987.html"]thread[/URL] on this very forum. But, I could not understand somethings... Firstly, Is NULL an integer value 0, or something else? Secondly, [CODE]if(strlen(str)==0)[/CODE] this shows that the string is null or it shows that the first character … Software Development c++ | |
This is giving me an error and im not sure why? [CODE]procedure BeginSort; var I, X: Integer; begin //(1) whole thing Sorted:= false; repeat begin //(2) For I := 1 to 30 do Begin //(3) If Question[I].position > Question[I+1].position then Begin //(4) for if the question position is higher TempQuestionText:= … Software Development pascal | |
Hi, all! I was wondering if there is any way to check from the server side whether the client has closed a socket connected to one on my side. client side [CODE]import socket s = socket.create_connection ((host, random_port)) s.close () [/CODE] server side [CODE] ... a = lstn.accept () [/CODE] … Software Development client-server python | |
Okay so I feel stupid for asking this and I feel like i am overlooking something, but how do retrieve the value of a datagridview cell as an int. I have used this code to change the column to type int [CODE]dataGridView1.Columns[0].CellTemplate.ValueType = typeof(int);[/CODE] I haven't really had a chance … Software Development vb.net | |
Hi guys I have been attempting to get my software to create new records in my database. For some reason something that should be simple is telling me my syntax is wrong on this line [code] String ex = "INSERT INTO `client_net_score`.`brands` (`id`, `brand`) VALUES (NULL, '"+bra+"');";[/code] so the string … | |
I'm learning C++ from the book C++ Primer Plus. At the end of the chapter on loops, they want us to design a structure, allocate adequate memory for an array of such structures using new, then feed input data to it. I got this code: [CODE]#include <iostream> using namespace std; … Software Development c++ data-structure ![]() | |
Dear All I have two files having values like this: File1: 10.1103/PhysRevA.10.2325 1 10.1103/PhysRevLett.32.584 2 10.1103/PhysRevB.13.4845 3 File 2: having comma separated values like this: 10.1103/PhysRevA.10.2325,10.1103/PhysRevLett.32.584 10.1103/PhysRevB.13.4845,10.1103/PhysRevLett.32.584 I want the result two be like this: 1 2 3 2 I am using this code but have not be able to … Software Development perl | |
Hey guys. I just signed up and was hoping someone could help me out here. So for this program that's an assignment for my CS 1410 class.There's 2 dices and im suppose to do 1 million rolls. The program is suppose to calculate percentage of how many times the following … Software Development java | |
Hi, We have a date input come in the format of YYYYMMDD, ex: if the date comes as 19980224, then its good else if the date comes as 19982402, then we need to raise exception we need to validate this date format. can you please guide me how to do … Software Development python | |
[CODE]strcpy(post[j],in[x]);[/CODE] Just what is wrong with this code of mine? in[x]='4' But it doesn't copy the value to post[j] Software Development c | |
I need some help understanding how the exception handling flow of code works. I have written a sample program that has exception handling in it. There are two classes here: My custom Array class and the Main.cpp class to implement and test the Array class. Inside the main() method, I … Software Development c++ | |
This is from the book: [I]C++ Weekend Crash Course[/I], pg 142. It is designed to concatenate two strings, and put a hyphen in the middle. It compiles; it works, but I don't understand why it works. The two strings are entered in main() as szString1 and szString2. During execution, they … Software Development c++ | |
Trying to write a puts like subroutine in assembly but failing miserably. I'm using BIOS calls only (I.E. I'm not running another operating system). The code is using Intel syntax. What I have so far is: [CODE=asm]; [BITS 32] [GLOBAL hello_world_asm] ; ; a very basic puts function without the … Software Development assembly operating-system | |
In order to arrange data in a listview I can either use the properties panel or use the following code; [CODE]listView1.Sorting = SortOrder.Descending;[/CODE] How can I do a SortOrder for the [I]second[/I] column? eg; [CODE]listView1.columnHeader2.Sorting = SortOrder.Descending;[/CODE] Thanks in advance! Software Development listview | |
Hi, for any of you who have done some java programming in cryptography I need your help. I'm trying to right and blinding and unblinding procedure, however at the final stage I should get a true, but I'm getting a false. If you know what's wrong, can you point it … Software Development java | |
![]() | I know there are a lot of topcs. I was searching for what i needed.But as i sow there wasn't anything that i can specifically use. I need a short code that generates 10 random numbers. Anyone help? Software Development c++ |
![]() | Me and a friend are making an app which we need to play a sound when Form1 is started. How do we do this? I don't mind code. Software Development vb.net ![]() |
I am working on validating a combo box. This does have a list of possible values but also allows for editing. So for example if the user does not select one of the available cities in the list they can type it in. I have tried using the validation event … Software Development vb.net | |
I want to display all e-mail addresses from my database in a TextBox. The reason I want to use a TextBox is that I want them in a single row, separated by "; " and that's not possible in a ListBox (right?) which I was using from the beginning. So … Software Development display |
The End.