43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for jackmaverick1

Hi, I'm very new to Java (started today, though I have 1.5 years in c++) and I've now read a little bit about Java, the thing that I can't find is how to take user input from the keyboard through a console window... How can you go about do that? …

Software Development java
Member Avatar for sourabh17
0
201
Member Avatar for Despairy

im looking for a more efficient algorithm, is there any known one? ive checked my math books and c++ book and really didnt find anything more efficient than the following : [CODE] int first_prime(int num) { for (int i=2;i<sqrt(num);i++) { if (num%i==0) { if (isprime(i)); return(i); } } } bool …

Software Development algorithm c++
Member Avatar for Despairy
0
1K
Member Avatar for saddas

hello all, i really hope you can help me. im trying to get a list of customers which are in my database to show up in a combo box but with the code i currently have, it only shows the last record that was entered [CODE]rs.MoveLast With Me.Combo1 .Clear Do …

Software Development visual-basic
Member Avatar for saddas
0
159
Member Avatar for DarkLightning7

I am trying to use the java XOM libraries but I am having trouble getting them to work the way I want them to. I want to get each element and its attributes from an xml file then use that information to create folders and files on the users computer …

Software Development java xml
Member Avatar for DarkLightning7
0
326
Member Avatar for xGrimReaperx

Hi, I found this video on youtube showing how to create a basic login system [URL="http://www.youtube.com/watch?v=FYvlqL2ieCY"]VIDEO[/URL] in C# I have to do this program but I need UserList to be in another class. I am doing this already for like an hour and I cannot solve it. Please I need …

Software Development
Member Avatar for xGrimReaperx
0
103
Member Avatar for e-papa

[CODE]file=open(words.txt) print(file)[/CODE] Please Ive been trying to use the open() function to open a txt file in python, but it keeps telling me that there is no such file or directory, where should I put the file for me to be able to import it. HINT: I use pyscripter, but …

Software Development python
Member Avatar for e-papa
0
180
Member Avatar for patel.ajay82

[code] import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class SendMailTLS { public static void main(String[] args) { String host = "smtp.gmail.com"; int port = 587; String username = "avdhoot.patel@gmail.com"; String password = "password"; Properties props = new Properties(); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); …

Software Development java session
Member Avatar for kvprajapati
0
3K
Member Avatar for Despairy

we had an assigment a few months ago to build a sodoku solver recursively so here it is.... i hope noone was bored enough to build one already. [CODE]//////////////////////////INCLUDES////////////////////////////////// #include <iostream> #include <cstdlib> //////////////////////////////////INFO////////////////////////////// /* */ //////////////////////////////USING///////////////////////////////// using std::cout; using std::cin; using std::endl; const int N=2; //////////////////////////////////PROS////////////////////////////// int sodoku(int array[N*N][N*N], …

Software Development c++
Member Avatar for Despairy
0
104
Member Avatar for computerbear

Hello, I have a program I am working on that is working, except for the output for the avg. I know NaN can occur when the denominator is a zero, but mine are not zeros. Here is the relevant code. [CODE] double avg6 = (grade6tot/cont6Count); // grade_tot's are declared as …

Software Development
Member Avatar for computerbear
0
126
Member Avatar for PM312

Hi I have program where multiple forms remaine open at a time. I dont want user to move away from last opened form unless he closes that form. i.e last opened form should not lose focus by clicking on other forms unless active form is closed. How it can be …

Software Development visual-basic
Member Avatar for WaltP
0
570
Member Avatar for Nevillelajru

i have a form that edits contents in a database. everything is correct to my point of view but when i try to update a path of an image it gives me an error telling me System.Data.OleDb.OleDbException was unhandled Message="Incorrect syntax near 'C:'." Source="Microsoft OLE DB Provider for SQL Server" …

Software Development
Member Avatar for abelLazm
0
105
Member Avatar for bhagawatshinde

Hi Everyone, I have no idea about How to check Richtextbox vertical scroll bar is ON. Means suppose Richtextbox has 3 lines displayed perfectly but when 4 line is inserted vertical scroll bar is on Now i want to check at runtime the vertical scroll bar is available now... Can …

Software Development
Member Avatar for bhagawatshinde
0
1K
Member Avatar for jmcginny5

I have to write this program, and I am not sure exactly how to write the functions and where to put what. I have tried several times, and decided to start over from the beginnning. What i have so far is at the very bottom. Here is the prompt: Overview …

Software Development c++
Member Avatar for jmcginny5
0
3K
Member Avatar for MaddTechwf

I've been trying to figure out the easiest way to populate a menu to allow for easy updating in the future. I would like to add anything to a specific folder and when the program runs it would be populated by the contents of the specific folder. Is this possible? …

Software Development vb.net
Member Avatar for MaddTechwf
0
221
Member Avatar for madfase

Goal: drag-and-drop from one button to another button and have access to the following info from the original button: - Image - BackColor - Tag Problem: I can only implement one. If I try to implement all three I get null pointers. [code] private void button1_MouseDown(object sender, MouseEventArgs e) { …

Software Development c c# c++
Member Avatar for madfase
0
178
Member Avatar for krii017

i got a problem i have a registration and log in program the registration is fine but on log-in , the 1st entry on registration is the only accessible on log in i tried the 2nd and 3rd username with correct psw but it got an error heres my code …

Software Development c#
Member Avatar for krii017
0
160
Member Avatar for linezero

I have tried many ways to download the files in a listbox. non-seems to work. the listbox has url eg: [ICODE] [url]http://www.hahaww.com/2.pdf[/url] [url]http://www.hahaww.com/f1.pdf[/url] [url]http://www.hahaww.com/24.pdf[/url] [/ICODE] I want to download the files until ListBox.Items.Count = 0 which each file with number ording... for eg: 2.pdf will be 1.pdf f1.pdf will be …

Software Development file-system vb.net web-browser
Member Avatar for codeorder
0
738
Member Avatar for jackmaverick1

Hi, I'd like to learn some basic graphics (2D) that would be easy to use and quick (So no OpenGL, or Direct X). Also, it NEEDs to have Linux portability. I've already tried Allegro and paintlib, neither of them could I install and they didn't look quite as easy as …

Software Development c++ image opengl
Member Avatar for jackmaverick1
0
158
Member Avatar for eskimo456

Hi there I am developing a grid system that would generate non-overlapping grid cells. Upon creating a grid I want to be able to check to see if the potential grid overlaps any other grid cells. If it does then clamp the new grid cell to the already existent grid. …

Software Development c++ linked-list
Member Avatar for eskimo456
0
148
Member Avatar for Labdabeta

I have asked this question before on a different forum without success. I would like to know how to do templated type conversions for a class. The syntax is getting me though. Here is what I want: [CODE]class Thing { public: template <typename T> T operator T(); }[/CODE] This would …

Software Development c++
Member Avatar for Labdabeta
0
99
Member Avatar for zachattack05

I've been struggling with this for a while. It's not so much a "problem" as it is an approach. I've been working on my client/server socket program and I've reached the point in my planning (which isn't very far in) where I really need to think about how the server …

Software Development client-server queue
Member Avatar for mcriscolo
0
355
Member Avatar for Labdabeta

Quick question (hopefully), how do I save an SDL_Surface image to a file?

Software Development c++ image
Member Avatar for Labdabeta
0
447
Member Avatar for burntout

Im working on an app that takes two numbers(lower bound and upperbound)and determines all the prime numbers within the specific bounds, inclusive. [code] Public Class primeNumber Private Sub calculatePrimesButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculatePrimesButton.Click 'declare variables Dim N As Long Dim LowerBound As Integer Dim UpperBound …

Software Development app-store vb.net
Member Avatar for Jx_Man
0
384
Member Avatar for josephP

This code how to find the smallest number. My question is now how to find the largest number? [CODE] int iSmallest = int.MaxValue; int iSmallestLocation = 0; int[] iArray = new int[5]; for (int i = 0; i < iArray.Length; ++i) { Console.Write("\nEnter a value: "); iArray[i] = int.Parse(Console.ReadLine()); } …

Software Development
Member Avatar for josephP
0
94
Member Avatar for Despairy

we just started studying about linked lists and i wrote a simple code to build up a link list. than post the sum of all the numbers inside the list my problem is that i need to delete all even numbers and i cant figure out what is wrong with …

Software Development c++ linked-list
Member Avatar for Despairy
0
4K
Member Avatar for HASHMI007

[CODE]/* I made point class it has two objct x,y. i made saparate function for giving values to x & y object but when i run the it provide wrong answer. i enter firstValue=5 , secondVaue=6. the program shoul provide same answer same as like(5,6) but result show after excuting …

Software Development c++
Member Avatar for HASHMI007
0
112
Member Avatar for v_janssens

I have a class Matrix2D where the matrix is defined as vector<double> elements. I'm trying to use the function Gauss() to perform gaussian elimination on a matrix a [CODE]bool Gauss(Matrix2D& a) { [INDENT][/INDENT]//Gaussian elimination routine }[/CODE] The function itselt works perfectly and if I view the matrix a just before …

Software Development c++ oop
Member Avatar for v_janssens
0
163
Member Avatar for darkelflemurian

Hello, I have a layout and i have to paste information on that layout, in that lay i have Columns H, P i have a formula in column P like this [CODE] =IF(ISERROR(P3/H3),0,P3/H3) [/CODE] but when i insert the information obtained in VBN to EXCEL worksheet it pastes the information …

Software Development microsoft-office vb.net
Member Avatar for darkelflemurian
0
277
Member Avatar for Derek Elensar

Okay, so I have said code: [code] #include <iostream> #include <cstdlib> using std::cout; using std::cin; using std::endl; int main() { char input[8]; int counter = 0; int newletter; do { cout << "Please enter a 7 letter word to encrypt:\n>"; cin >> input; if(input[8] != '\0') { input[8] = '\0'; …

Software Development c++
Member Avatar for Derek Elensar
0
180
Member Avatar for NOVICE3

Although I have received some advice and code snippets, I think that I should present a broader view of what I am trying to do and the trouble I am having. I have built a test fixture that has an internal microcontroller which directs traffic in and out of the …

Software Development data-structure hard-drive
Member Avatar for NOVICE3
0
191
Member Avatar for kvskchaitanya

i'm writing a small desktop application to store details entered in to a swing ui.this application saves, edits and deletes the records.every thing is working fine but when writing searching functionality when i search the records i'm able to fill the searched record in to the text fields successfully.but if …

Software Development java java-swing
Member Avatar for kvskchaitanya
0
169
Member Avatar for littleleaf

Hey guys, I am writing a C++ program with the help of dynamic allocation of a character array. The size of the array depends on the size of file read. However, when I checked the size of allocated array, it is always 4! So, is there any limit on this …

Software Development algorithm c++ ios
Member Avatar for jonsca
0
172
Member Avatar for Mike Askew

The code for this is: [CODE=VB.NET]'IMAGE HANDLING Dim bytes() As Byte = DS.Tables("Location").Rows(0).Item(4) Dim ProductImage As Image = Image.FromStream(New System.IO.MemoryStream(bytes)) pic_ProductImageDisplay.Image = ProductImage pic_ProductImageDisplay.Load()[/CODE] The error occurs line 3 stating "ArgumentException was unhandled: Parameter is not valid." Any idea on a solution to this problem?

Software Development image vb.net
Member Avatar for Unhnd_Exception
0
214
Member Avatar for Nevillelajru

hi i have a datagrid view that is filled with fields from a database. until filling this datagridview it is alright. in this form i have a button delete and a textbox. when i press this button it takes the number in the field which will be the primary key …

Software Development
Member Avatar for Nevillelajru
0
298
Member Avatar for spe_eddy

I can't work out why when i try to print the list(listProb....s) it prints the empty list, i'm not setting them to the empty list after this code or anything, and when i print the normDistProb's on their own it prints fine): [CODE]for i in range(0,12): listProbFog.append(normDistProb(dayValues[i], fogAve[i], fogVar[i])) listProbSnow.append(normDistPr...ob(dayValues[i], …

Software Development python
Member Avatar for TrustyTony
0
182
Member Avatar for hness1

After searching around for along time... I've found nothing. I need to be able to grab an image from an imagelist. I tried searching through the properties and methods, but found nothing that looked like it would help. [CODE] begin PicArray[WhichCol, WhichRow].Picture := {Image from imagelist} end; until Imageindex[WhichCol, WhichRow] …

Software Development image pascal
Member Avatar for Wolfgan
0
2K
Member Avatar for smandape

Hello experts, I am trying to extract data from XML file using XSLT. I am trying to code a general XSLT code that can handle similar XML files that may differ a bit from each other. the XML code I am working on can have the following 4 scenarios for …

Software Development xml
Member Avatar for xml_looser
0
370
Member Avatar for 8.brahim

I want to draw an image at X Y position when the user click the mouse so I'm using an InternalFrame with layout set to NULL , inside a JFrame with Layout free - using netbeans here is the image class [CODE=java] package myPak_1; import java.awt.*; import java.awt.image.*; import java.io.*; …

Software Development gui java java-netbeans java-swing oracle
Member Avatar for 8.brahim
0
233
Member Avatar for schrope

I need help i am not sure if i am on the right track. i have to write a program to calculate the night of nights someone has to stay and what size bed they want. than i have to give a total of cost plus 6% sales tax. her …

Software Development c++
Member Avatar for txwooley
0
310
Member Avatar for dospy

recently i understood at last how can i store more values in an int with bytwise operators, also, i have read that #define directives are evil for a number of reasons. one of them: [CODE] #define SEVEN 2 + 5 int result = SEVEN * 5; cout << result; // …

Software Development c++
Member Avatar for dospy
0
171
Member Avatar for Atistus

I am quite new to Python programming, just started about a week ago, and was just designing a simple menu for a simple guessing game. I have browsed Google and other websites trying to find snippets of code that may help me but my searches haven't turned up anything. I've …

Software Development python web-design
Member Avatar for Atistus
0
176
Member Avatar for lxXTaCoXxl

Okay so I got the original working and is fairly simple. Only problem is I can't figure out how to set it up to scroll one color section after the other. Like this pseudo code would be: [CODE]if (color1 >= 255) { color2++; } if (color2 >= 255) { color3++; …

Software Development
Member Avatar for abelLazm
0
119
Member Avatar for visom

Hi, I'm making a program that finds the number of days between two dates (so far you can only put in 1 date because my code is incomplete). The code is incomplete right now but my problem is that the problem is that my code doesn't return a needed value. …

Software Development c++
Member Avatar for visom
0
105
Member Avatar for juan92

currently i am taking a java class, and out professor is introducing it with the language processing so we get the idea of how things work. he moentioned that processing comes from java, so that's the reason i posted it here. i made a really simple game somewhat of a …

Software Development java
Member Avatar for juan92
0
139
Member Avatar for shyla

Create a console-based application that computes the price of a desk and whose main() method calls four other methods a method to accept the number of drawers in the desk an input from the keyboard. this method returns the number of drawers to the main method a method to accept …

Software Development c c# c++ gui
Member Avatar for shyla
0
700
Member Avatar for lxXTaCoXxl

Okay so I've been trying for a few days now and just can not seem to figure this algorithm out. Right now I'm trying it with a while loop but still not working. Basically here is my snippet. It's on a timer for 10ms. [CODE]void colorScrollRotation(object sender, EventArgs e) { …

Software Development algorithm
Member Avatar for lxXTaCoXxl
0
145
Member Avatar for jackmaverick1

Hi, I'm trying to make my own library so that I know the names of the functions and can use them more simply. Also, I normally don't get the File I/O right so if I write the Library once, then I can use it over and over again (without having …

Software Development c++ ubuntu
Member Avatar for jackmaverick1
0
180
Member Avatar for Tamlyn

Hey everyone :) Hope you can help Here is what I've done with the instructions given: I need to know the average price difference between the cash and credit prices. But i'm pretty sure that only comes in at the end. Here is what my this function is supposed to …

Software Development c++ ios
Member Avatar for Tamlyn
0
121
Member Avatar for Mike Bishop

I am writing a database and need to post a value in a lable to a sql field. the sql datatype is set to money. when posting i have CMD.Parameters.addwithValue("@Claim", LBCLAIM.text) when posting i gett an error cannot convert a char vaule to money. the char vaule has incorrect syntax. …

Software Development vb.net
Member Avatar for Unhnd_Exception
0
102
Member Avatar for benjybob

Hello there, im writing code for my asteroids game and am nearly finished but ive come across a problem when trying to load the file the save game is written like this and works perfectly fine, it saves the things i want to a text file: [CODE]void WrapGame::save() { cout<<"enter …

Software Development c++ ios
Member Avatar for WaltP
0
226

The End.