199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for amras123

[CODE] package primecdesc; import java.util.Scanner; public class Primecdesc { public static void main(String[] args) { Scanner myScanner = new Scanner (System.in); int a,b=0,ctr=0, ktr=1; System.out.print("Enter a number: "); a = myScanner.nextInt(); while(b>=1001) { if (a%b==0) b++; ctr--; } /*for(b=1;b<=1001;b++) { if(a%b==0) ctr--; }*/ if(ctr==1) { System.out.println(a + " is a …

Member Avatar for JamesCherrill
0
163
Member Avatar for tonic22

[CODE]#include <iostream> using namespace std; struct account { account(); int accountnum; float balance; float interestrate; }; account::account() { accountnum = 50; } struct account2 { account2(); account * data; void test(); }; account2::account2() { } void account2::test() { data->accountnum = 1000; } int main() { account test; account2 test2; cout …

Member Avatar for LevyDee
0
130
Member Avatar for geekme
Member Avatar for almostbob
0
91
Member Avatar for biplob29

<%@ page import="java.sql.*" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <% String ans=" "; if(request.getParameter("correctAns")!=null) { ans=request.getParameter("correctAns").toString(); } Connection con = null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = java.sql.DriverManager.getConnection("jdbc:odbc:sid"); Statement st = null; ResultSet qrst; ResultSet rs = null; String id=request.getParameter("id"); …

Member Avatar for masijade
0
128
Member Avatar for pro_learner

I get this error in my Java programme which coded by me according to a tutorial.I coded it to connect my Java App with MySql database.This is the code.[CODE]package Gui; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.sql.SQLException; /** * * */ public class connectionconfig { private connectionconfig() …

Member Avatar for masijade
0
281
Member Avatar for hallmat

Hello, im trying to make a program that opens up jpeg files one at a time and look at there brightness and then if its past a threashold moves the file to a "keep" folder if not moves it to a "varify" folder im new to C# so im not …

Member Avatar for hallmat
0
403
Member Avatar for Pravinrasal

I want display 2nd cycle after sleeping 1st cycle time 1 second after that display 2nd ,3rd and so on.... I bold my thread code in above program.... [CODE] public class MainDrawCycle extends JPanel implements ActionListener ,Runnable { JButton button; JLabel lblclkValue,lbldispValue,lblTitle; JTextField textField; JScrollPane pane; JPanel panel; JFrame frame; …

Member Avatar for JamesCherrill
0
448
Member Avatar for sidra 100

hey i have written this code to make a GUI but it compile correctly but gives error at run time. the error is exception in thread main "java.lang.NullpointerException" at GUI.intGUI(GUI.java:22) at GUI.(init)(GUI.java :75) at GUI.main (GUI.java:79) the code is [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; public class GUI { JFrame …

Member Avatar for peter_budo
0
224
Member Avatar for drameshgar1

import java.util. *; import java.util. ArrayList; public class Module { private int moduleCode; private String classlist; private ArrayList<String>studentsEnrol; public Module(){ studentsEnrol = new ArrayList<String>(); } public void storestudent(String student){ studentsEnrol.add(student); } public String classlist(){ return classlist(); } This is a code i wrote, the code meant to store student in …

Member Avatar for stevanity
0
228
Member Avatar for cvanithakpm
Member Avatar for cvanithakpm
0
98
Member Avatar for FiToKa

Hello, everybody. I'm stuck on an assignment I've been given recently. Looks like I've missed many lectures in programming. Here's the thread. I'm just asking for some hints, really, I'd appreciate that. [B] The problem:[/B] Write a complete program with at least one example for using all interface functions of …

Member Avatar for FiToKa
0
147
Member Avatar for rahul.ch

[CODE]class Mammal { String name = "furry"; String makeNoise() { return "generic noise";} } class Zebra extends Mammal { String name = "stripes"; String makeNoise() { return "bray";} } public class Zoo { public static void main (String[] args) { new Zoo().go();} void go() { Mammal m = new Zebra(); …

Member Avatar for rahul.ch
0
152
Member Avatar for YouKnowIt

Hey everyone, been using this site for a lot of my programming needs, but is time I would appreciate some help. Just started assembly language and I am having trouble with a problem. The question: Write a program that will prompt the user to enter a number and then the …

Member Avatar for adnanshahid89
0
2K
Member Avatar for mehdi.yazdani

Hi, i created the page which is display some information from database with some rules in the end of page i putted the command that it is show how many page that i have. so, i decide to add next and previous in the sides of page numbers and also …

Member Avatar for Stefano Mtangoo
0
130
Member Avatar for harde

Slot Machine I got all this so far !!! Nex is .. First build in support for writing output to an output file. 2 Make a copy of your existing program and modify the new program to be array based or to use functions or both. It does not have …

Member Avatar for sushlet
0
157
Member Avatar for phfilly

Hi! I would just like to know if its possible to give an linked image the ability to send the form instead of a submit button? Like in the example below: [CODE] <form method="post" action="Search.php"> <table id="search"> <tr> <td> Search: <input type="text" name="search" id="search" placeholder="Search for friends"/><td><a href="Search.php" action="Search.php"><img src="graphics/search.png" …

Member Avatar for selina12
0
147
Member Avatar for microbert

Hi, I have build my website with PHP and MySQL and when I was debugging I noticed a problem which I cannot find a way around it. Basically I have a search box on my website, which will search from a column that I have on MySQL database. Now I …

Member Avatar for smantscheff
0
165
Member Avatar for pseudorandom21

I have accepted an internship that involves re-writing a project written in "Clipper Summer of '87" in C#, and basically it's missing a couple source code files and I have no idea how to work with the database files it uses. I do know it uses something called "dBase III" …

Member Avatar for TrustyTony
0
305
Member Avatar for rajesh1158

I'm very much depressed with the following code. As for me, everything is correct. But the Goddamn code doesn't work. I've a html form with radio buttons and a hidden field. On clicking Submit, the form does not submit. Trying print_r($_POST) on the submitted radio button variable, it returns an …

Member Avatar for Zahinize
0
1K
Member Avatar for violette

I'm having problem to update the data into mysql database. for insert new data, it works nicely but if i want to update the existing data, it will hang my pc. even if i debug line by line, it shows like infinite loop. which part has gone wrong? i'm totally …

Member Avatar for violette
0
165
Member Avatar for persianprez

I'm starting from the bottom of XML and all I want to do is display the elements of one tag. You'll understand what I mean if you look at the code. [CODE]<table> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code …

Member Avatar for niranga
0
121
Member Avatar for brsharvari

can u please provide me with a c/c++ program to add a user to MySQL and allow him to only insert into the database

Member Avatar for ushapriya
0
255
Member Avatar for zeeya

Hello!! For my final year project, i would like to build decision support system that give suggestion to customer to build their house based on type of house and price. So, customer will select type of house that they like and also the budge money that they have. Then, the …

Member Avatar for Stefano Mtangoo
0
927
Member Avatar for Thevenin

Hi all, this is my first thread here, but I've read your forum a lot as unregistered user. I've searched the web for a complete Javascript or some hint, but I didn't find an interesting script or article to implement what I've thought. There's a way to write text or …

Member Avatar for niranga
0
174
Member Avatar for Scott.Atkinson

Hi All, im in the process of creating a mini auction in vb.net, so far i have deisgned the pages and now im beginning to code, but im stuck on the Fileupload of the image, this is the first time i have used a file upload so im looking for …

Member Avatar for Atul Dhiman
0
164
Member Avatar for rajandass65

hi, my table has following fields ForumPostsId(primary key),ForumPost,ParentPost parentpost can have 0(which means its parentpost) or ForumPostsId(which means its a chlid post related to parentpost) i need to generate a list which will the show parentpost and count of child post related to parent post Any suggestion!!!!!!!!! regards rajan

Member Avatar for simplypixie
0
83
Member Avatar for spicyrelish

I need some help to bebug some C++ code. I can't see any obvious errors but my compiler reported 36 errors. I think they are all relating to the first error I'm getting from inside the State class. It says: "changes meaning of 'State' to 'class State' but I'm not …

Member Avatar for mrnutty
0
138
Member Avatar for awaziri

Hii everyone.. i have wanted to create a TCP/IP Lan chat program in visual studio 2005. i am a newbie to it 2005. i have already created an interface for it but no codes yet. Attached are images of the client and the server. pls helpppppppppppppp

Member Avatar for komal_gawali
0
921
Member Avatar for jcarbillon

Need help guys.. I need to separate all labels from aspx & aspx.cs file to XML file but I getting this error Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Xml.XmlNodeList' to 'string' here is my xml file [CODE=xml]<?xml version="1.0" encoding="iso-8859-1"?> <labels> <btn>Update</btn> </labels>[/CODE] and here is my aspx.cs file …

Member Avatar for jcarbillon
0
150
Member Avatar for Saima_Khan

Hello ! I'm trying to edit and update and cancel in datagrid. Edit and cancel commands are working properly but at UPDATE i m getting this error.(Incorrect syntax near '12'). Please help me. my code is here.. [code] protected void DataGrid1_UpdateCommand(object source, DataGridCommandEventArgs e) { num = Convert.ToInt16(e.Item.Cells[1].Text.ToString()); TextBox t1, …

Member Avatar for thines01
0
140
Member Avatar for thanveer11.nc

How will I be able to send the password to the user's email id, when he or she selects forgot password? It's a crucial part of my project, please let me know how can i retrieve it?

Member Avatar for thanveer11.nc
0
84
Member Avatar for ali11

Hi i am looking for following output.I am just getting 0 for a,b,c,d,f. total no of grades Number of A's Number of B Numbers of C Number of D number of F [CODE]import java.util.Scanner; public class ExamScores { public static void main (String[]args) { String a; int count= 0; int …

Member Avatar for Rzink92
0
138
Member Avatar for pagerussell

hello, I am building a site where I want all links to partial page reload using xmlhttprequest and innerhtml. I have done this before, butI always had to have a seperate xmlhttprequest function for each link. So this time I am trying to write just one function, and have the …

Member Avatar for niranga
0
134
Member Avatar for kaosjon

Hi i am having a little trouble with my jquery tabs, for some reason it loads the first tab content, but when i select another tab the content is not displayed. When i try to go back to the first tab it doesnt load either. Here is the html [CODE]<div …

Member Avatar for niranga
0
196
Member Avatar for LDiver

I am trying to per textchanged in a textbox call an isnumeric function. I cant seem to get it to work. function: [ Private Function IsNumericCheck(ByVal CheckVal As String) As String 'check for numeric values and return boolean If IsNumeric(CheckVal) = False Then Return False Else Return True End If …

Member Avatar for nedrosat
0
915
Member Avatar for jetlife76

Ok guys i am working on a program that will compute the distance in miles from Chicago or dallas(radio buttons)to specific destinations. The destination cities are in a selection list. The output should be the distance between the two cities, the time it would take to drive at 60 mph. …

Member Avatar for jetlife76
0
113
Member Avatar for Zssffssz

I need to read one wide Charecter(wchar_t) from a file once but it says: "ambiguous overload for 'operator>>' in 'WER >> mont' The part that also confuses me is that it writes the Charecter just fine. It is only one Charecter not a string if that makes a difference. Thanks.

Member Avatar for Zssffssz
0
439
Member Avatar for skylinedrifter

Here's the the question... 1. Declare an enumeration type consisting of the nine planets in their order by distance from the Sun (Mercury first, Pluto last). 2. Write a value-returning function that converts the name of a planet of the enumeration type declared in Step 1 into the corresponding string. …

Member Avatar for mrnutty
0
863
Member Avatar for spar

â–ºWrite a class implementation for a class Student that contains the data members: 1. Data member for the student Name. 2. Data member for the student Number (ID). 3. Data member for the student Faculty. 4. Data member for the student Gender (M or F). 5. Data member for the …

Member Avatar for XMasterrrr
0
325
Member Avatar for f4fjks

Hey All! Can Any one help me in getting an idea what to make for a computer programming project? Thanks!

Member Avatar for StuXYZ
0
121
Member Avatar for writeout

Hello forum, I want to write a simple code of two dices rolling for two players. The players can roll as many times as they want per turn. If they are matching numbers, the total is zero. If a person passes, it is passed on to the next player. Please …

Member Avatar for CSloan7597
0
299
Member Avatar for mv740

[CODE]import java.util.Scanner; import java.util.Random; public class test { public static void main(String[] args) { Random rand= new Random(); // being able to use random object int[][] array = new int[3][9]; // print array in rectangular form for (int i=0; i<array.length; i++) { for (int j=0; j<array[i].length; j++) { int k …

Member Avatar for hfx642
0
217
Member Avatar for sidra 100

i have jst started programing in java m beginer. m making gui which contains a two radio button a slider and a text message. although its compiling coreectly but it doesnot display any thing [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; public class GUI { JFrame frame; JLabel coord; JRadioButton Man=new …

Member Avatar for hfx642
0
128
Member Avatar for tnimblett

Hi, I don't really have a programming issue rather a artistic issue. Look at the following code of the front view an unfinished building. I'm trying to add a side view to the right or left. I just can wrap my mind on how it is supposed to look. [CODE] …

Member Avatar for tnimblett
0
101
Member Avatar for renzlo

Hi All, I need to compare one file in each file in the folders, some sort of duplicate check through md5 hashcode that I've found in my google search. Here's the code of functions: [CODE]Public Function CompareFiles(ByVal FirstFile As String, _ ByVal SecondFile As String) As Boolean Return ReadFile(FirstFile) = …

Member Avatar for renzlo
0
325
Member Avatar for dsmey

Hi all, I'm trying to create a simple function in MS Visual Studio which would take a function and a range of values, divide that range into 500 equal steps, and barf out the results to a CLR richTextBox. The function looks like this: [code]void Form1::Range(double from, double to, double …

Member Avatar for Narue
0
174
Member Avatar for MrEARTHSHAcKER

Hi, I created the class for converting decimal to binary numbers and I wish to make the Windows application but there's an error: [ICODE]E2285 Could not find a match for 'TForm1::TForm1()' [/ICODE] The source code: [CODE]//--------------------------------------------------------------------------- #include <vcl.h> #include<math.h> #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 …

Member Avatar for MrEARTHSHAcKER
0
204
Member Avatar for moone009

I have a simple ssis package that grabs data from sql server 2005 then puts that into a flat file and then sends it to my webserver. This package currently just pulls data from one db. I would like it to do this for 10 dbs now therefore creating 10 …

Member Avatar for moone009
0
111
Member Avatar for akshaya kochare

Please do help me!!! i have to validate date using date time picker such that u can't choose the date /month/year before you were born.

Member Avatar for bluehangook629
0
79
Member Avatar for evilsilver

c++ I am making a game and decided to put in a bogus company animation thing, kinda like Blizzard does, but need to find a way to play the file that we made without going on in the code. ie it comes to the line to play the file (c:\evilsilver.avi) …

Member Avatar for omid80
0
180

The End.