43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for chrisb76

I am in a class and am trying to get this project done. I get the code to compile but it is giving me a out of bounds error. Here is the assignment. Write the program in Java (without a graphical user interface) and have it calculate the payment amount …

Software Development java user-interface
Member Avatar for BestJewSinceJC
0
294
Member Avatar for jozz3

Hello I'm writing a python program and need some help. Firstly, is there anyway to include variables in an input prompt? For eg. [variable1 = 4 variable 2= 3 variable= raw_input("Please enter a number between", variable 1, "and", variable2) ] Also, if data is being appended to the end of …

Software Development python
Member Avatar for jozz3
0
114
Member Avatar for toko

Okay, i have 2 objects in my form: a label with a picture and a picturebox with a picture. The background of my form has another picture. What i want to happen: 1.I press the label,the picture of the label is on top with the bakground of the picture in …

Software Development
Member Avatar for toko
0
93
Member Avatar for eshirley

I need to write a program that will output a list of all even numbers between 1-100. It needs to use a while loop then use a for loop. Any one got any help on how to do that?

Software Development java
Member Avatar for eshirley
0
225
Member Avatar for restrictment

Please tell me why this doesn't work: [code] #include<iostream> using namespace std; int main() { char felix[3] = "ho"; if(felix == "ho") cout << felix; } [/code]

Software Development c++
Member Avatar for restrictment
0
173
Member Avatar for leverin4

I understand, vaguely, what a reduce/reduce conflict is, but I don't understand why I'm getting one in my Yacc Parser. Can anyone help me out? [code=yacc]Prog : START StmtSeq END { }; StmtSeq : Stmt StmtSeq { }; StmtSeq : { }; Stmt : Id ASSIGNOP Expr SEMICOLON { *$1 …

Software Development c
Member Avatar for nezachem
0
399
Member Avatar for *Moonlight*

Hi, I have a quick question...so I have this program that asks user to enter an integer and then it analyzes that integer..it outputs factors of that number, and tells whether its composite or prime, abundant or deficient, and so on...and then after telling few things about that number..it asks …

Software Development c++
Member Avatar for jephthah
0
663
Member Avatar for Mz3g

Hi guys, I am doing a TCP/IP time server/client. I already wrote the two programs but when I run them I don't get any output. Simply, the idea is the client asks the server for Time or Date and the server has to respond and terminate after the second request. …

Software Development c client-server
Member Avatar for abhimanipal
0
216
Member Avatar for duomaximus

Good day, Hi, I'm trying to develop mapping feature for a tool. It has a wx.ScrolledWindow that contains wx.lib.buttons.GenBitmapTextButton as map nodes. When the number of map nodes reached around 50+ the scrolling becomes too slow. Any ideas on how to improve the performance of the scrolling when there are …

Software Development python
Member Avatar for duomaximus
0
427
Member Avatar for student21

i have sucessfully coded my form so that when a user enters data into the texxt box and searches any matching data is displayed on another form my problem is when no data matches the search criteria the form that would display the result still opens but is blank how …

Software Development vb.net
Member Avatar for student21
0
100
Member Avatar for joydsouza90

:?: How do you make an object, say a rectangle, move in turbo c++, using right and left arrow keys? I want the object to move when a user presses right or left arrow keys. Please reply ASAP either here or at my email [I]<<email address snipped>>[/I]

Software Development c++ email
Member Avatar for kirit275
0
1K
Member Avatar for DaveTran

I'm now trying out for loops with different sized iterations (is that the right word?) This loop [code] for (int i = 0; i < 5; ++i) { for (int j = 0; j < 3; ++j) { Console.WriteLine("i = {0} j = {1}", i, j); } } [/code] outputs …

Software Development
Member Avatar for Geekitygeek
0
156
Member Avatar for sluck

[CODE]//SELECT ID van ingelogde gebruiker MySqlConnection cn = cn = new MySqlConnection("server=localhost; user id=bla; password=bla; database=project; Allow User Variables=True;"); cn.Open(); string selID = "SELECT LidID FROM gebruikers WHERE Gebruikersnaam=?Gebruikersnaam;"; MySqlCommand cmd = new MySqlCommand(selID, cn); MySqlDataReader dr = default(MySqlDataReader); //Add parameters to get the username and password cmd.Parameters.Add("?Gebruikersnaam", MySqlDbType.VarChar); cmd.Parameters["?Gebruikersnaam"].Value …

Software Development dataset
Member Avatar for sluck
0
283
Member Avatar for persianprez

I have 3 functions working together, but I only have abundant returned every single time, I don't know what is wrong [CODE]def sumDivisors(n): total = 0 for counter in range(1, n): if (isDivisor(n, counter)): total += counter return total def checkForPerfect(n): total = sumDivisors if (total == n): return 'Perfect' …

Software Development python
Member Avatar for persianprez
0
205
Member Avatar for jallan2010

[code] Private Sub PopulateProductList() Dim con As OleDbConnection Dim cmd As OleDbCommand Dim dr As OleDbDataReader Dim strSQL As String Dim objListItem As ListItem Try strSQL = "SELECT [Sr No], [First Name] FROM [Lani]" con = New OleDbConnection(connectionString) con.Open() cmd = New OleDbCommand(strSQL, con) dr = cmd.ExecuteReader() lblani.Items.Clear() Do While …

Software Development vb.net visual-basic
Member Avatar for pritesh2010
0
148
Member Avatar for meistrizy

Thanks in advance for your help. I am writing a program that is supposed to display a menu and ask the user to enter a list of his/her favorite games, then display the games if they choose to. The problem is that when it comes to entering the names of …

Software Development c++
Member Avatar for VernonDozier
0
122
Member Avatar for hell04

Hi all, I have the following task; Extend an ArrayList of Integer by adding a method called 'sum', that returns the total sum of the elements of the list of integers. Such that each time the method is called sum up all the integers. So I started by making the …

Software Development java
Member Avatar for tiny7415
0
6K
Member Avatar for Mitja Bonca

I would like to know how can I transfter a string value (a name or something) from Login class over static class to Form1? This code I have: 1. In program class: [CODE] static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] …

Software Development
Member Avatar for kvprajapati
0
258
Member Avatar for Kyle Wiering

Ok, here goes, I've got a staticwindow where I am putting the information from keyboard presses and onscreen button presses. When I run the program, I can press the keys and they show up just fine. I then press the button on the screen with my mouse which also works. …

Software Development c++
Member Avatar for Frederick2
0
446
Member Avatar for zrd0808

I am trying to copy a string into an array then write bits out to a file accordingly. (compression assignment). here is the code [code=c] // strnewdup(const char* s) returns a copy of a // null-terminated string, with the copy stored // in the heap char* strnewdup(const char* s) { …

Software Development c++
Member Avatar for zrd0808
0
2K
Member Avatar for jeffery12109

Hey, I have one question though, how do you write on a txt file???

Software Development python
Member Avatar for HiHe
0
101
Member Avatar for omar isaid

java.io.FilePermission this exception always thrown when I am trying to run my code using tahiti server that i am developing java mobile agent

Software Development java
Member Avatar for omar isaid
0
119
Member Avatar for omar isaid

the following code I want to press done buttone to close JFrame without exit the application ---------------------------------------------------------------------------------- [CODE] package examples.SecretaryAgent; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Display extends JFrame { private JCheckBox _first_Interval; private JCheckBox _second_Interval; private JButton _done_Button; public Display() { setLayout(new FlowLayout()); _first_Interval=new JCheckBox("First Interval"); _second_Interval=new …

Software Development java java-swing
Member Avatar for omar isaid
0
880
Member Avatar for omar isaid

fscanf is a C function designed to read character by character from a file to the system how we can use scanf programmatically to read till first white space ???? :) :)

Software Development c
Member Avatar for omar isaid
1
3K
Member Avatar for omar isaid

I am developing C#-based mobile application and the exception always thrown and catched by my try catch block Exceptin thrown : The database file cannot be found.Check the path to the database [File name = .\MyMobileDB.sdf] the snippet code is [CODE] namespace DeviceApplication4 { public partial class Form1 : Form …

Software Development open-source
Member Avatar for omar isaid
0
560
Member Avatar for omar isaid

When I am trying to debug my mobile application , that used C# as programming language a notification beside the open the connection appeares and display that the module of it not loaded and thank you

Software Development
Member Avatar for omar isaid
0
393
Member Avatar for Bodul

Hi. I am new to this forum, but i have been playing with Visual Basic since 4.0. Anyway here is my problem. I am getting error and can't figure out why. [CODE] Dim connectionString As String Dim cnn As OleDbConnection connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Database\tmprcStavka.mdb;" cnn = New OleDbConnection(connectionString) Try cnn.Open() …

Software Development dataset open-source vb.net visual-basic
Member Avatar for Bodul
0
95
Member Avatar for N00b3r-1

I'm a complete and utter noob to VB so I sorta bit off more than I could chew with this little project. I'm not so sure how to create a calendar. But I have sort of designed it already. I'm planning on making the layout with labels and maybe tooltip …

Software Development visual-basic
Member Avatar for N00b3r-1
0
170
Member Avatar for Excizted

Hi people. I'd like to use MySQL in my application - would be an easy way for me to store users. But then I'd have MySQL credentials in my app, visible for everyone with a HEX editor, I'd suppose? And even though that MySQL user will have low privileges, then …

Software Development app-store c++ mysql
Member Avatar for Excizted
0
163
Member Avatar for Xufyan

I want the remainder of all the numbers inside the loop except the number which i assigned for variable [B]a[/B] for example , if i entered number [B]5[/B] for [B]a[/B], the loop is 5 4 3 2 1. i want my program to take remainder of all these values except …

Software Development c
Member Avatar for Xufyan
0
126
Member Avatar for revellution

Hi everyone, I just started learning Python 3.1 (never done programming before). I just wrote this useless little program. It seems to work but I would just like a little bit of feedback as to how well I executed the idea. Basically I want to know if I am making …

Software Development python
Member Avatar for revellution
0
125
Member Avatar for Simes

I am working on a guessing game in Python and would like some feedback on how the code looks. I am struggling a bit with it, particularly with the menu options and getting it to loop back to the menu again after it has written to a high scores txt …

Software Development python
Member Avatar for Simes
0
147
Member Avatar for CreativeCoding

So I have this code: [CODE]String^ main = "http://www.lockerz.com/"; if(main == web->Url->ToString()){ MessageBox::Show("Hello", "WIN"); }[/CODE] and it's attached to a timer that ticks every 100 milliseconds. Oh yeah, and web is the web browser in VC++. But when I run, I get this error: [CODE]An unhandled exception of type 'System.NullReferenceException' …

Software Development c++ web-browser
Member Avatar for CreativeCoding
0
158
Member Avatar for anjoz

hi i have a program here the 15 puzzle my problem is that im having a hard time makeing a random function the right way and also thinking of a way to make so that the program will not go out of the bounderies here my code [CODE]#include <stdio.h> void …

Software Development c puzzle
Member Avatar for anjoz
0
120
Member Avatar for Christoph928

In this programming assignment I need to implement a number of useful functions using a header file and an implementation file. I will place the prototypes for my function in a .h file, and implement these functions in a .cpp file. I will also need to write a driver (a …

Software Development c++
Member Avatar for Stefano Mtangoo
0
176
Member Avatar for VJ APU

This issue is probably caused by me being an idiot a while back. I installed Office 2010 beta on my dev box. It did NOT affect my project that uses Microsoft.Office.Tools.Excel However when I decided to uninstall 2010 and go back to 2007 only to maintain some compatibility with customers …

Software Development assembly microsoft-office
Member Avatar for VJ APU
0
196
Member Avatar for Eman1

To accept 3 number and find max among three number(using && for checking multiple experssion) [COLOR="Red"]Please help me, I am a beginner in this discipline, and I hope I explain the problem[/COLOR]

Software Development java
Member Avatar for Katana24
-1
69
Member Avatar for Katana24

Hi, im trying to use an actionlistener attached to a button to add a component to a frame I have created. The actual button should add to the frame a circle with some text placed in it which I have already created, it works fine so there's no problems there. …

Software Development gui java perl
Member Avatar for Katana24
0
116
Member Avatar for Nerathas

Hello, I have writted a prog that generates the values & triangleOf Pascale. But the thing i cannot seem to find, is[B] how to get rid of the Console.Writlines in the middle of my code[/B] (where the values get calculated). I am using a 1 dimensional array for this insteed …

Software Development mathematics
Member Avatar for ddanbe
0
115
Member Avatar for PcCopat

Hello, I want to make a linked list program consisting of one main link, and each main links have sub link. [CODE]Main 1 -> Main 2 -> Main 3 -> ... -> Main N -> NULL | | | | Sub 1-1 Sub 2-1 ... ... | | Sub 1-2 …

Software Development c++ linked-list
Member Avatar for kbshibukumar
0
127
Member Avatar for churni

hi, i have a very simple problem with my program and just need a push in the right direction and will be much appreciative of your help. i have a bucket sort program which works fine. well i say fine, its fine when it is sorting the numbers initialised at …

Software Development c
Member Avatar for churni
0
178
Member Avatar for pearle

Hi, all. I'm trying to write a function that checks the status of a Tic Tac Toe game. If there's a winner, it'll return the character for the winner ('X' or 'O'). If there's a draw, it returns 'D'. I'm having trouble getting it to check whether the game is …

Software Development c++
Member Avatar for usainbolt
0
4K
Member Avatar for barabass

Hello everybody, I'm new to Python wx and I'm trying to make an application which requires the use of database content. I've already made the input data frame. I need to make a frame where to list the database content. I need to create a label for each row like …

Software Development python
Member Avatar for barabass
0
385
Member Avatar for BrandonB

I have created a function to determine the lowest out of 5 scores, I'm not too sure as to whether or not it can be simplified... the function is as follows: [code=C++] void findLowest (int & minScoreP, int score1P, int score2P, int score3P, int score4P, int score5P) { minScoreP = …

Software Development c++
Member Avatar for BrandonB
0
124
Member Avatar for Dan08

Each time I create a new GUI, the bit that I always hate, is the bit where the buttons and entries look like I am working on a Windows 98 machine, isn't there a way to make my buttons and entries look like Qt would look like? They're well squary …

Software Development gui python qt tkinter
Member Avatar for snippsat
0
124
Member Avatar for gkaykck

[CODE] #include <stdio.h> #include <stdlib.h> int det(int); int minor(int); int main() { int mat[10][10],dim,a,b; printf("Please enter an integer for matrix dimensions(1-10):"); scanf("%d",&dim); for (a=0;a<=dim-1;a++) { for (b=0;b<=dim-1;b++) { mat[a][b]=rand()%10+1; printf(" %d",mat[a][b]); } printf("\n\n"); } printf("Determinant for the matrix is: %d",det(mat)); return 0; } int det(int mat[10][10]) { int a,b,temp,length; length=0; …

Software Development c
Member Avatar for gkaykck
0
145
Member Avatar for Kruptein

I'm using the rsa module (easy_install rsa), and if I use it from command line: [code=python]import rsa public,private = rsa.gen_pubpriv_keys(3) cipher=rsa.encrypt("test",public) rsa.decrypt("cipher",private)[/code] this will return test again. (like expected) but in my code it gives a zlib error -3 incorrect headers [code=python]def RSA(txt): global crypt if crypt=="en": key=raw_input("Public key:") ciphertext=rsa.encrypt(txt,eval(key)) …

Software Development encryption python
Member Avatar for Kruptein
0
112
Member Avatar for rue64ja

Hello, I'm trying to write a method that resets a string to a default value (previously defined in a class) if the value inputted is not a valid. Because I know the format or structure of a valid input, I should easily be able to do this. The string is …

Software Development java
Member Avatar for javaAddict
0
75
Member Avatar for musikluver4

The code below is the file for the constructor method and the get methods [code] //Date: 3/18/2010 public class Taxpayer { private int socSec; private double yearlyGross; public Taxpayer(int taxPayer, double income) { socSec = taxPayer; yearlyGross = income; } public int getSocSec() { return socSec; } public double getYearlyGross() …

Software Development java oop programming-construct
Member Avatar for javaAddict
0
178
Member Avatar for NeedHelpWithC++

Hi, New to this forum, but been browsing a few threads and seems like the best place to seek help. I have an assignment to complete. What I need to do is read in values from a .txt file and place these values into a matrix. I have the values …

Software Development c++
Member Avatar for creative_m
0
200

The End.