199,114 Archived Topics
Remove Filter ![]() | |
Hi all, When I run use to add second element in the tree set it shows java.lang.ClassCastException: could any one explain me why [CODE] import java.util.TreeSet; public class Venus { public String str; public static void main(String[] args) { Venus a =new Venus(); Venus b= new Venus(); a.str="obj1"; b.str="obj2"; TreeSet<Venus> … | |
Hi, well im working on a project for school but I can't seem to get it to work. Its an app that is connected to a DB with 3 tables, this is my sql syntax of the db: [CODE] Table structure for table `income` CREATE TABLE `income` ( `idincome` int(11) … | |
Hi I would like the following action to happen without having to have a 'submit' button. This would avoid users having to go from one page to a second page and the action could just happen on the first page by clicking on the word? How could it be done? … | |
hello , let me know , what is the best way to learn c++ efficiently , reading c++ books and doing exercises based on the each capter , or read a book , then to solve exercises?. I'm waiting a reply from those experienced people . Thanks. | |
[B]here is my code[/B] [CODE] Dim lvitem Dim iCount As Integer Dim iLoop As Integer Dim query3 = New SqlCommand query3.Connection = New SqlConnection("SERVER=localhost;UID=root;DATABASE=test") iCount = lvLogs.Items.Count() If Not lvLogs.Items.Count = 0 Then Do Until iLoop = lvLogs.Items.Count LvItem = lvLogs.Items.Item(iLoop) With LvItem query3.CommandText = "insert into wer(CustomerName,SalesGroup,CustomerType,TypeOfIndustry,RM,SeniorRM) values('" & … | |
So basically I need to find a way to evaluate an infix that's been converted into a postfix. The code below takes an entered infix and converts it into a postfix but I don't know how to take that postfix and evaluate it. Every single tutorial I've seen evaluates a … | |
I am slowly understanding functions, but I can't completely wrap my head around it yet. What is the purpose of function with nothing in the parentheses? Like this something(). Also, is there a way to write a function and then have it output what is going on in that function? … | |
[COLOR="red"]I'm making a program like Notepad but better! But i don't know the code for the Open and Save buttons! Can someone please tell me the code? (I'm using VB6)[/COLOR] | |
Hey everyone, I have a function that has an error reading "Parse error: syntax error, unexpected '}' in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\test5\func\blog.php on line 31" here is the code for that function: [CODE]function get_categories($id = null){ $categories = array(); $query = mysql_query("SELECT `id`, `name` FROM `categories`"); while( $row = mysql_fetch_assoc($query)) { … | |
Hello, I am getting the following error from line 108. I'm trying to find information on the error. The elapsed_time function returns a double, so I'm not sure where there is a problem. error C3867: 'Timer::elapsed_time': function call missing argument list; use '&Timer::elapsed_time' to create a pointer to member [CODE]#include … | |
The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set … | |
I have some question about boost::promise After studying the website of boost and "C++ concurrency in action" I still can't get the idea of boost::promise According to the book(if I have no make any mistake) boost::future is designed for one off event you could wrap the task by packaged_task and … | |
I have written almost all of my program, except I am stuck on this certain part. I need to write an averege out to figure all students final grades out as a statistic of the course. Students name and final grade have been appended to an external file(keep in mind … | |
I'm working on a small concept demo for a friend and I'm stuck on the UI. I'm trying to build something akin to an FPS interface (using mouse-look and the iconic WASD). I'm working in a Windows environment (Win7 to be precise), so I figured I'd use the standard Windows … | |
[B]Perfect number cousins[/B] 6 is a perfect number. but 220 and 284 are perfect number cousins. because the sum of the divisors of 220 is 284 and the sum of the divisors of 28 is 220. so they are called perfect number cousins. write a program that finds and writes … | |
Hi all, im doing a program using java and sql, and im trying to set a textbox with a value stored in a database. thing is: i have a combo with airlines, and each airline has a cost for each seat. so what im trying to do is get this … | |
Hi, I would like to write a member function with a default argument, but the value of the default argument I would like to use is the value of the classes data member [CODE] class testdf {// testdf private: const int _defaultVal; public: testdf() : _defaultVal(1) {} int testMF(int arg … | |
program enter element and if num is already exist give message enter other number no duplicate my code give me alwayes else condition [CODE]/** * @(#)Enter.java * * * @author * @version 1.00 2011/11/18 */ import java.util.Scanner; public class Enter { public static void main(String []args){ Scanner input=new Scanner(System.in); int … | |
Hi all, I'm reading to a jtextpane a word document. Everything is fine except for this character \u0169 ( a tilde over an u).. Any suggestions? Thanks | |
I'm trying to isolate a first name, space, middle initial, space, and last name. The full name is given by the user. The only problem I'm having is isolating the middle initial. Current code: [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { string … | |
I just got this script for a countdown on a website and I got it to work locally but when I upload it to the server i get the error "index.html:22 Uncaught TypeError: Object [object Object] has no method 'fancycountdown'". I have checked to make sure all other javascript files … | |
I've tried searching for articles that relate to this issue, but all I keep finding are articles about people who don't know how to define constructors/can't call the parent constructor/etc and I think this will cut straight to the chase. The problem code is as follows: [CODE] #include <stdio.h> class … | |
Hey, I am trying to get this working but failing! I am trying to make it so when you click the heading it opens the nab to do with that heading, and remember it... so next time you go onto the site it will remember what tabs you had open … | |
Im using netbeans gui editor and im trying to add a Jfreechart that is itself in a internal frame, and this internal frame I am wanting to add it to a panel, as you can see in this image: [url]http://www.flickr.com/photos/63259070@N06/6370734167/[/url] The internal frame doesn't even show up on the panel … | |
Not even sure if this is the right spot to post this, but I didn't see any other place. (might have missed them) I have WAMP installed on my computer per the instructions from the book I'm using from Site Point. After I installed it, everything ran just fine up … | |
Hello guys! Ive finished my last project lately about a program that has a trial version. Now, i want to update it, im thinking of creating a database from a website, then my program reads it (say, [url]www.serials.com/getserial.php?id=[/url][user id inputted]),then my program checks if the serial inputted is original, if … | |
I have a recipe class which has a constructor, the constructor takes in 7 parameters = RecipeName,AuthorName,Ingredients,Ingredientamounts,rating,servingSize,Instructions I'm trying to set those values using the scanner, but I don't know how to make it work since I have the scanner method inside of the Recipe class. So it looks kind … | |
Hey y'all, so I've created a 2D billiard program that basically just collides 2 balls together and determines their new direction and velocity however I now want to be able to change the colors of the balls after collision by using [CODE]Color.FromArgb(int r, int g, int b)[/CODE]. I would use … | |
how to create a live streaming site with php and what are thing we need for that. | |
I am developing a desktop application like address book etc. I want to generate a serial key(setup key) using serial number of hard disk, ram, motherboard. So please help me How can i get serial number of hard disk, motherboard, ram. | |
Hi - I know that this has been somewhat discussed in a couple of threads, but I haven't seen anything with an actual answer. What would the design or pseudocode look like? Write a program that checks HTML files to determine whether the embedded XHTML tags are balanced. The program … | |
Hey guys just wanna tell you now that I chose to do a minesweeper game or attempt to do one for a class project in VB. Now I'm not that experienced of a programmer so this is fairly difficult and I can tell you that I'm in way over my … | |
[CODE]#include<stdio.h> #include<string.h> #define SIZE 100 int main(void) { int array[SIZE], i, n, j, sum=0; printf("Enter some integers:"); for (n=0;n<100;++n) { scanf("%d", &array[n]); if(array[n] == -1) { j=n; break; } j=100; } for(j<=100;i>j;++i){ printf("%d", array[n]); } for(j=0;j<n;++j){ sum=sum+array[n]; printf("The sum is %d\n", sum); } return (0); }[/CODE] [I]Im trying to output … | |
Hi, I have a problem and forgive me if this sounds like a stupid question but I'm not really a good programmer. Ok, this is my problem. Say you have a string and you would like to pull out integers from the string what do you do? Example: String question … | |
Hi, I want to Map a single key to array of values. Is that possible? | |
Hello....i am trying to send a file from server to the client using socket programming in C, how do i do this?? basically the client is trying to download a file from the server.... | |
Hi . I surprised what why my lastIdRows method doesnt work .Please take alook at it's definition and tell me do you see any syntax error [code]public function process($query){ $result=mysql_query($query,$this->connection); if(!$result){ die("Database query failed".mysql_error()); } return $result; }// End "process()" method public function lastIdRows($column_set,$table_name,$last_id){ $query="SELECT '{$column_set[0]}','{$column_set[1]}','{$column_set[2]}','{$column_set[3]}' FROM '{$table_name}' WHERE id>'{$last_id}'"; … ![]() | |
Hi, I want to create Arabic to English dictionary with having pronunciation feature for the English words. How it is possible to implement using PHP and MySQL? Thank you, ![]() | |
hey i just switched from turbo c++ to dev c++ i cant run the following program please help #include<iostream> using namespace std; int main() { int n; int k; cout<<"Enter the values\n"; cin>>n; cin>>k; if (n>k) {cout<<"The value entered first is greater ";} else {cout<<"The value entered 2nd is greater";} … | |
Hi basically I need help java and my program is an calculator which must be able to calculate arbitrary expressions like for example (5.0+8.1)*(2.0). My program works fine it does basic things like calling upon classes etc it's just I don't know how to do the arbitrary expressions. My calculator … | |
Hi again, I am migrating my site from ASP to PHP. Things have been going OK, till I hit the login page. Can anyone please help me convert this thing to PHP? The live page is here: [url]http://www.regina.nu/visa.asp[/url] [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Inloggningssida</title> … | |
Hi! I'm trying to create a program that will allow the user to input 5 numbers and will print the largest and smallest number. I tried doing it and this is what I came up.. The thing is, after the program executes its purpose i want to add a statement … | |
Hello! I have a little problem. I don't understand how to solve this issue: Object reference not set to an instance of an object. Thank you! This is my code: [code=c#] BindingList<ComboBox> cmbPlayers = new BindingList<ComboBox>(); Club[] league = new Club[10]; // league contains class Club // class Club contains … | |
Hello. I am ok at php. I am making a web site. The problem is that when i try to decrease the size of the browser that contains my site, the elements on the page distort and get all tangled up. how do you make the browser just cut of … ![]() | |
Hey guys i m trying to make hangman game as java application here is a simple run how it should be. [url]http://e.atilim.edu.tr/mod/resource/view.php?id=5240[/url] i m trying to put JLabels in order when player click correct buttons. firstly i added JFrames at first then i did setEnabled(false) them after button is clicked … | |
Does someone know how to integrate a collection of programs as one whole program? Thanks. :) | |
Hey guys, so this is what happened. I'm stuck on this project on the second part, which is the top right quadrant. Its not showing the graphics at its specified quadrant which is the top right. Its supposed to have randomized sized red blocks that fills the quadrant. Can you … ![]() | |
Here is a complete and working code that 1. Adds the numbers(input) to get a sum(output) 2. Sorts the numbers in a descending order Can you post any suggestions on how I can improve my code :) main.c [CODE]#include <stdio.h> #include "header.h" main (){ int sum, x, y, z,choices; input(&x, … | |
I want to attach User Instructions to a Java application, and allow the user to open it from the help menuitem. I'm not very familiar with classpath variables. If I use an absolute path name everything is fine, such as File pdfFile = new File("C:/Program Files/MyProgram/UserGuide.pdf"); But I want to … ![]() | |
I'm having troubles with the following code [CODE]#include <stdio.h> #include <ctype.h> int main (void) { int i=0,j=0,row; char str1[5], str2[5]; char machine[4][5]={0}; FILE *fp; fp = fopen("text.txt","r"); while (fscanf(fp,"%s %s",&str1,&str2) == 2 ) { row = str1[1]; while (str2[i] != NULL) { machine[row][i]=str2[i]; i++; } } for (i=0;i<5;i++) for (j=0;j<5;j++) … |
The End.