43,549 Solved Topics
Remove Filter ![]() | |
Hi, I am brand new to the DaniWeb Forums. I'm also very new to VB, and I taking my first course on it. I nearly have a large project done, but I have one main issue that I have not been able to resolve on my own as of yet. … Software Development visual-basic | |
[CODE] public void deleteDvd(String title) { String DvdCompare; Dvd dvdObj; Collections.sort(dvds); for(int i = 0;i< dvds.size();i++) { DvdCompare = dvds.get(i).getdvdTitle(); dvdObj = dvds.get(i); if(title.equals(DvdCompare)) { System.out.println("Dvd is in system"); int index =Collections.binarySearch(dvds,DvdCompare); dvds.remove(index); //delete method in arrayList } else if (!title.equals(DvdCompare)) { System.out.println("Not found Dvd Object"); } } }[/CODE] I'm … Software Development java | |
I have a combo box that is populated from entries in a SQLite table. The entries are city names. Here is the code for the data binding: [code] cbb_City.DataSource = data; cbb_City.DisplayMember = "Accounts.City"; cbb_City.ValueMember = "Accounts.City"; [/code] It gets the values just fine but it has an entry for … Software Development sqlite | |
I have class: [code=c++]template <class T> class Graph; And I have a function: template <class T> void Graph<T>::erase_greater(T needle) { if(TEMPLATE TYPE IS "STRING" OR "CHAR") { do nothing; } else { if(TEMPLATE TYPE IS ONE OF THE INT TYPES) { if(strlen(var1) > strlen(var2)) { USE Var2; } else { … Software Development c++ | |
Hi there, Say I have the following while loop, that loops on the condition that a lne (a string) is received from a file: [CODE]while ( getline( inData2, line ) ) // Increment rows till none left { if ( !line ) { cout << "No data entered. Please enter … Software Development c++ | |
I am new to C# and .NET and am having a problem. I have a windows form application. I created a Ole data adapter to look at an Access Database with 3 tables. I then created a dataset which gets loaded by the adapter when the process starts. I then … | |
Hello, I was trying to get hold of arrays and read lots of stuff. So when i started coding, i got an error message saying incompatible types. I checked with general compliance and it should be ok. Maybe netbeans causing it? Anyway, any kind of help will be appreciated [ICODE] … Software Development java | |
Pardon my newbness, I only just found this site today and I have been having this problem for a bit. Background: I am using Python 2.5.2 that I recieved from a CD from my college. My OS is Windows XP, and my internet provider is Internet Explorer. Problem: When I … Software Development python | |
I am getting a segmentation fault when i run the follwing program. This program takes in a const char* and returns the integer format. I also need advice on converting a C++ Octal or Hexadecimal Notationed string to an integer. Here is the code [CODE=C++] #include <iostream> #include <cstring> int … Software Development c++ | |
I have programed before (QuickBASIC and Macromedia Flash MX) but I am new on Python I want to create a program in which you give it a keyword and it generates a cypher. Like this: (Built in alphabet) ABCDEFGHIJKLMNOPQRSTUVWXYZ (Asks for keyword) (Lets say the keyword is BLOCK) BLOCK (Adds … | |
I'm writing a simple number generator program and I'm trying to find an easier way to get a random number, store it then display it. The catch is I don't want duplicated numbers (each need to be different). here is what I have so far, it does work but I'll … Software Development c++ | |
Hi, I am having a problem with the following function: [CODE]void calcEnergy( vector< vector<double> > &Energy, vector< vector<double> > &Data, const double Constant ) { double Time = 6; // store the change in time double energy ; // Temp variable to store energy double v1,v2; for ( size_t i … Software Development c++ | |
guys i want to debug an application without using a break point. the problem is i dont know which function of the class is called first, so i dont know where to put the break point. i want the debugger to stop when any of its method is called. is … Software Development | |
Hello, I feel embarrassed to ask these types of questions but i can't get answers to them in my text book. So here you go: I have an assignment of copying the constructor writing clone() method and add() method. While i understand the idea of creating of clone and add … Software Development java | |
Hey, I have a problem when I'm trying to delete an image file. I always get an error that says: IOExeption was unhandled. Acces denied because the file is beining used by another process. I do'nt know what process that could be and how to solve it. [CODE]private void comboBox3_SelectedIndexChanged(object … Software Development file-system | |
Hi there, I have an array of strings defined in the following way; [code] string wordbank[]={"yes", "no", "hello", "goodbye"}; [/code] My problem is I would like to create a seperate array of characters for each element of that array. Something of the form; char *word_0[]={'y','e','s'} The things I have tried … Software Development c++ | |
Hi all, I am new to image processing :rolleyes: . what i want to do is read the header section of an image of any type (jpg,bmp,gif ...etc) and show it on the screen. then save the header in a text file and the new image (without the header in … Software Development image | |
Before I explain what I mean in the title, I want to say that I 1) Have very little experience with python, so take anything I say with that in mind. I've only read about it, haven't really used it (although I have installed it), 2) I [B]want[/B] to learn … Software Development gaming php-codeigniter python python-django | |
I tried searching the forum, but I couldn't find any threads that really dealt with what I'm trying to do here. I have a struct set up with three fields (shown below). [code] struct StudentInfo { char id[10]; double mark; char grade; }; [/code] [I]Note that the id MUST be … Software Development c++ | |
[code=java] public static void setValues(PreparedStatement statement, Object... values) throws SQLException { for(int i = 0; i < values.length; i++) { if(values[i] instanceof Integer) { int value = (Integer) values[i]; statement.setInt(i, value); } else if(values[i] instanceof String) { String value = (String) values[i]; statement.setString(i, value); } } } public static ResultSet … | |
hi, i am useing the netbeans for the first time n i am trying to connect to a MS Access DB through the wizard but i am not able to. I entered for a DSNless connection: Name:JDBC-ODBC Bridge. Driver: sun.jdbc.odbc.JdbcOdbcDriver Database URL: jdbc:odbc: Driver={Microsoft Access Driver (.*mdb)};dbq=C:\Users\Vamsi\Documents\PIN.mdb; the issue its … Software Development java microsoft-access | |
Hello, I am working on the problem of creating an abstract class Shape also with Package shape and then creating a subclasses Circle, Square and etc. I belive, i don't have a complete understanding of an abstract. Anyways i keep getting an error: " Shape.Circle is not abstract and does … Software Development java | |
If I have a class that has a vector as a private member, a get function to access the vector, and I iterator over the vector, the iteration only works correctly if I make a new copy of the vector: [code] class MyClass { public: typedef vector<int> Vector; MyClass(); ~MyClass() … Software Development c++ | |
Hi all, I am in need of some assistance with addresses & pointers as my dysfunctional professor is of no help. (I'll be as succinct as possible.) First, the program must call three subroutines from main to fill "n" array elements with a given value; for instance, one must set … Software Development c | |
Hello, I'm trying to get the STL equal_range function to work on a data structure I've designed, but I may be trying to use the equal_range function in a non-standard way. Is there a way to get this to work? Basically, I have a vector of vectors of structures (elements) … Software Development algorithm c++ data-structure | |
OK, I'm obviously going bonkers here, but has something happened to the java code tags? Why doesn't this work in preview mode? [CODE=java] i++; [/CODE] Software Development java | |
Here i have to define a function which will reverse a c-styled string. I have made 2 functions one using dynamic memory and the other not using dynamic memory. I would like to know of any improvements that can be made in the code. I would also like you to … Software Development c++ | |
I want a user to be able to select an audio file to play but am unable to figure out how to create a file open dialog box in Win32 API. I could create one from scratch but am hoping that there is an easier way than manually creating it. … | |
Hello guys, I am new to this website. It's nice to see these friendly people, anyways.... I have been trying to learn Java for a little bit now, I know the basics and some of the advanced things. But I came across a problem that is intriguing me so much. … Software Development java | |
Hi, i am having trouble with an assignment. i need to create an array, store numbers in the array... sqaure, cube and square root those numbers individually using different methods. display the resuts with a dialog box. after that i need to find the sum of the numbers in the … Software Development java java-swing | |
Q1: Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum … | |
Hello friends, I'm working on a program that takes a number input from the user and recursively sums the number 'n' to one. For example, inputting a 5 would sum 1/5 + 1/4 + 1/3+ 1/2 + 1/1. I have sucessfully gotten the fraction sequence to display but I am … Software Development c++ | |
Hello all, I need to update a field in a table with a value that contains dashes it. (e.g. 10-5-2). the field type is Text The problem is that the field gets updated with "3" which is the result of the mathematical expression 10-5-3. And that's not what I want … Software Development | |
ok i have 2 series of p... the user give which one was want... and then give the iterations that he/she want this is the series 4. P= sqrt(8*(1+ (1/9)+(1/25)+(1/49)+... )) 5. P= sqrt(24*((1/4)+(1/16)+(1/36)+(1/64)+...)) code:: first for series 4..... [code] int i; double: serieValue=0,pi=0; cout<<"Iterations"; cin>>i; for (long int n … | |
how can i compute a code if i enter numbers then if i press any key its stops and computes the inputs of all no. Software Development c++ | |
Hello Java Experts, Suppose I visit 10 web sites , some of them open pop up window even when I have blocked them in IE , then I get say 5 additional pop up window , is there an easy way to write java program to close all such pop … Software Development java | |
Hi, this time I've borrowed a book called "Windows Game Programming for Dummies", albeit old it is still useful! However, I came across a problem writing a simple code the author made, namely the TextOut() The error it gives me at build time is as follows: [CODE]1>c:\users\shadow\documents\visual studio 2008\projects\g_app\g_app\main.cpp(75) : … Software Development c++ visual-studio | |
Hello, I am having a hard time with understanding arrays and most importantly implementing them in methods and etc. Does anyone know a good source to learn about arrays from a to z? I really need to nail down these guys. Any help will be appreciated Thank you Software Development java | |
Did a search but found nothing that answers my question. Was assigned the game Hangman as a test and I haven't been able to do anything myself and it's due tomorrow. I've looked on tons of sites for help, but so far haven't found any. The test says [quote]You need … Software Development vb.net | |
Guten Tag, What we need to do is to call a variable (numbersToEnterInteger) from the main method to the total_average method. Also how do we pass the entire array to this method, rather than a single array element. Thanks in advance. Oh and also heres the code. [code] /** * … Software Development java java-swing | |
Hi, I am having trouble with a C++ problem for school. Im writing a program that takes input for the highest and lowest temperatures of each month, and stores them in a 2 dimensional array. I then wrote 2 fuctions to find the average high and low temps. Part of … Software Development c++ | |
Hi, Below is my code. Hopefully it is in the correct format. I would like to know how to ask the user the dir and file name of certain file formats (they are red in the code) and have the program take those answers and put them into the program, … Software Development file-system python user-interface | |
Hello, I am having a hard time with understanding arrays and most importantly implementing them in methods and etc. Does anyone know a good source to learn about arrays from a to z? I m looking for things like book, website or some other media. I do know about Sun … Software Development java | |
Hi, I've got some c++ code(which i don't have much experience in). I'm trying to write the same code again in python but i'm not having much luck. The c++ code creates an array of x,y co-ordinates: [code=c++] for (double ix = 0; ix < nlat; ix++) { for (double … | |
im doing this code and it needs the absolute value of something here is what i have so far. the formula it gives you is x = absolute value of the square root of radius squared minus the y-intercept squared. this is the bit of code i have so far … Software Development python | |
I have an array with 6 items and I need to generate all permutations of lengths 4, 5, and 6. For example, if my array has a, b, c, d,e, f then permutations of length 4 would be: abcd abce abcf ... pemutations of length 5 would be: abcde abcdf … Software Development | |
Hey all, I have decided that in order to learn i will need to write code. So i am working on all the questions on my book. And as I am teaching myself i end up with no-one to scrutinize my code. [code=c++] #include <iostream> /************Declarations of Functions*********/ void func1(); … | |
Hi all, I have defined a function cat which takes in 2 cstring arguments and returns out a pointer to a new cstring which cocatenates the 2 strings I am having 2 problems with it. the cout statement doesnt work and secondly i get a runtime error while i delete. … | |
I have a subclass with 4 attributes and a subclass with 3 attributes. I want to store my subclass instances in a list. Can I have one list for both of them or do I have to create another list because the number of attributes is different? Thanks ! Software Development python |
The End.