132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for treyd

I have to write a program that has a tic tac toe board. When you click it, it should go from one image to another. My code compiles fine, but it doesnt run. I get some errors: Exception in thread "main" java.lang.NullPointerException at TicTacToe3.<init>(TicTacToe3.java:27) at TicTacToe3.main(TicTacToe3.java:41) My code: [CODE]import java.awt.*; …

Software Development java java-swing
Member Avatar for treyd
0
130
Member Avatar for jko2326

I have my program working but, I need to cut out the repeated code. How do I change this part of my code to pass arguments to a user defined method? I'm lost. I really have no clue exactly where to start on this. Basically when a user clicks a …

Software Development java
Member Avatar for jko2326
0
144
Member Avatar for isabellegagnier

I need to create a triangle in C++ that will take the user inputted letter (capital) and then create a triangle that will look like. I can only use nested loops NO arrays or strings Enter a letter: F F FE FED FEDC FEDCB FEDCBA here is the code i …

Software Development c++
Member Avatar for isabellegagnier
0
234
Member Avatar for Loony064

Hey guys! I figured it might be easier to have my various questions in separate posts, to avoid confusion. My next problem is that with two of my tables (Hours Worked and Occupations) when i want to save the records, it places the correct values (taken from text boxes on …

Software Development visual-basic
Member Avatar for esspeter
0
218
Member Avatar for SMIFMD

Can anybody help me out on creating the ceasar cipher. I am attempting to create the program with several functions, including a function for a password. I think that it adds a few more "bells and whistles" by adding this feature. When I run the script below, what is being …

Software Development python
Member Avatar for masterofpuppets
0
197
Member Avatar for gtrippleb

I'm trying to write a c++ program that first asks how may people are in a party, then it takes that number to calculate how many times to ask what the next person wants to order. This is what I have so far. I can get the program to recognize …

Software Development c++
Member Avatar for gtrippleb
0
117
Member Avatar for JRabbit2307

How would I ask the user to input what type of engine they want and getting an output of $150 [CODE=vb.net]Console.WriteLine("Enter EngineChoice for your vehicle:") Response = Console.ReadLine() EngineChoice = Convert.ToString(Response) If EngineChoice = Sixcylinder Then Convert.ToInt32(Response) Console.WriteLine(150) ElseIf EngineChoice = Eightcylinder Then Console.WriteLine(475) ElseIf EngineChoice = Diesel Then Console.WriteLine(750) …

Software Development vb.net
Member Avatar for TomW
0
143
Member Avatar for discovery-power

Hi All, I am trying to write a small program to better understand and practise writing blocks of code, I have written the one below but get the error message : "Linker Error undefined reference to WinMain@16 ld returned 1 exit status" // This program demonstrates a block of code …

Software Development c++
Member Avatar for Fbody
0
131
Member Avatar for abraham james

May somebody pliz help explain to me line by line of this c++ coding cause I can't seem to understand it:- #include <stdio.h> #include <stdlib.h> #define SIZE 50 #define pi 3.14 void push(int i); int pop(void); void sort(int stack[SIZE],int numbers); int *pointer, stack[SIZE],numbers; void main(void) { int value,numbers,num,num2,num3,num4,array[5],num6,num7,num8; float num5,num9; …

Software Development c++
Member Avatar for William Hemsworth
0
215
Member Avatar for didi00

Hello I'm doing a program about UART in Borland C. And I have a few questions. This is the code: [code] #include <iostream.h> #include <dos.h> #include <conio.h> #include <stdio.h> #define COM1 0x3F8 int main(void) { clrscr(); // outportb( COM1 + 1, 0 ); outportb( COM1 + 3, 0x83); outportb( COM1, …

Software Development c
Member Avatar for didi00
0
104
Member Avatar for kadamora

hi...i'm making a game that uses the direction arrows and fires with space...the problem is that when i keep holding 2 keys it makes only the behavior of one....can any1 tell me what i shall do

Software Development
Member Avatar for mikiurban
0
170
Member Avatar for abu taher

have any code for all form. I mean, here I write [CODE]form1.show form2.show form3.show[/CODE]But I want I write one line. like: "allform.show". or other what is right.

Software Development visual-basic
Member Avatar for AndreRet
0
127
Member Avatar for nareshkumar131

Hello, I have a DatePicker and text box on my Form and When I try to show the choosen date of DatePicker in the TextBox. It Shows the date and time. But I want to show only date. Plz help me. Code: text1.text=DatePicker1.value

Software Development visual-basic
Member Avatar for AndreRet
0
230
Member Avatar for eggmatters

In Design mode in NetBeans IDE, I had a palette with all of my AWT and Swing controls and some netbeans that I can drag and drop onto the Jframe I'm designing, I accidentally closed it. I am not seeing a menu option anywhere to add that palette back as …

Software Development ide java java-swing
Member Avatar for eggmatters
0
320
Member Avatar for Kaotic07

Hello, I have to write a program that merges 2 seperate files and then outputs to a single file. Each input file is to have numbers in ascending order and the output is supposed to compare these and then put them in ascending order. ex.: input1 = 1 3 5 …

Software Development c++
Member Avatar for Kaotic07
0
154
Member Avatar for nalasimbha

I have the following struct [CODE]struct A { int a, *b, *c, *d; };[/CODE] I would be creating an array of A and then populating the member variable for each of struct in the array. The members b,c,d are allocated dynamically based on the value of A.a. To assign the …

Software Development c++
Member Avatar for VernonDozier
0
111
Member Avatar for Q8iEnG

Hi.. Is there any ready-made code for "Binary Search Tree" for Strings? if not, how to use Binary Search Tree with Strings? Thanks.

Software Development java
Member Avatar for Q8iEnG
0
120
Member Avatar for deftones

Hi gang, I've started making a card game, which seems is going to be quite a challenge for me. To make my question more simple, let's say we have a form with three empty images and three images with cards. How do I put those three card pics randomly into …

Software Development visual-basic
Member Avatar for deftones
0
75
Member Avatar for qldrobbo

Hi, I have an app that gets data out of the database. This data is updated via a separate application. At the moment the first application has to check every x seconds if there is any new data. I seem to remember reading a while ago something about subscribing to …

Software Development sql
Member Avatar for qldrobbo
0
117
Member Avatar for zyrus001

I'm reading in a file and sending the data (once encrypted) to a dictionary, with a hash of the data before and after encryption. I then pickle the dictionary but find the file size is massive compared to the source file size. If I write the encrypted data straight to …

Software Development encryption file-system open-source python
Member Avatar for vegaseat
0
283
Member Avatar for guguman

Hi guys, Sorry to ask a question as my first post. I'm totally new with c++ and I couldn't understand much about vectors. [CODE] case 1: { cout<<"Enter [S]avings Account , [C]hecking Account,[G]eneral Account"<<endl; cin>>selection; if ((selection == 'G') || (selection == 'g')) { acc.push_back(newAccount); cout<<"New account added"<<flush<<endl; break; }//end …

Software Development c++
Member Avatar for SVR
0
141
Member Avatar for wrobl1rt

I am trying to remove a specific substring from a string... Here are the doctests. I'm just absolutely stumped. Can someone point me in the right direction on where to start? def remove(sub, s): """ >>> remove('an', 'banana') 'bana' >>> remove('cyc', 'bicycle') 'bile' >>> remove('iss', 'Mississippi') 'Mippi' """ def remove_all(sub, …

Software Development python
Member Avatar for vegaseat
0
6K
Member Avatar for Excizted

Hi. I have a problem I cant find a solution to, since I am unable to describe the problem in a searchable way. I make a hWnd for each contact the user has: [CODE=C++]contact[atoi(rowC[0])].hWnd = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG4), hWnd, messengerBox);[/CODE] messengerBox is defined like this. [CODE=C++]BOOL CALLBACK messengerBox(HWND hWnd, UINT message, …

Software Development c++
Member Avatar for Excizted
0
432
Member Avatar for UKmason

[CODE]double distance (double angle, int mps, double earth_gravity) { double earth_distance; double speed_sqr = mps * mps; earth_distance = speed_sqr * sin(2*angle) / earth_gravity; return earth_distance; }[/CODE] its supposed to come out at = 3831.57 intead it ends up being =3155.52 anyone know what im doing wrong?

Software Development c++
Member Avatar for Fbody
0
270
Member Avatar for krishna_sicsr

f = \ ''' Product: DECNET Node: ALETHA Address(es): 1.1 Product: TCP/IP Node: aletha.ind.hp.com Address(es): 15.146.239.174 ''' lines = f.split('\n') i = 1 ###### To get the IP Address(es) adapter_config = True for line in lines: if adapter_config: # print line import re if (re.match("^Product:\s+",line)): line1=re.split("\s+",line) print line1[5] I want …

Software Development python
Member Avatar for masterofpuppets
0
137
Member Avatar for discovery-power

Hi All, I have just started learning how to write C++, I have written my very first very simple program using notepad and saved the file as simple.cpp. So my question is how do I compile or build my program into an executable file, I understand I have to use …

Software Development c++
Member Avatar for discovery-power
0
161
Member Avatar for discovery-power

Hi All, I am currently learning C++ and i have started to write some small programs that explain operators, integers and values, my question is this. How do I make my programs stay on screen, at the moment I run my program it displays the message on screen for about …

Software Development c++
Member Avatar for discovery-power
0
165
Member Avatar for jrosh

I want to run a FTP url in explorer. (Not in IE) What i want is some how when the button clicked the URL should appear in the address bar of the windows explorer. This is because the ftp I access should be accessed in that way (By typing the …

Software Development vb.net
Member Avatar for GeekByChoiCe
0
142
Member Avatar for tom.t

I'm writing pseducode for a Java class. Obviously being pseudo the language shouldn't matter but thought I'd mention it as it would explain any 'bias' I have. BTW, this is my first programming class. I'm revising for my end of semester exam. Write a pseudo code algorithm which will input …

Software Development algorithm java
Member Avatar for tom.t
0
194
Member Avatar for sibobo

im newbies in c++... my task is to translate code Morse into alphabet an count the word i use... the problem is i dont know how to use the ifstream to read and use the code Morse that must be kept in .text file i only manage to write the …

Software Development c++
Member Avatar for sibobo
0
166
Member Avatar for ramprakash2489

i am not getting the desired result in link list in C# when i am putting the record bt its nt showing in the records when i view this code so plsss help me to find the desired result [code=csharp]using System; using System.Collections.Generic; using System.Text; namespace Single_Linked_List { class Node …

Software Development c#
Member Avatar for sajid syed
0
230
Member Avatar for Iam3R

Hello , i have written the code for finding the middle element of the list with 0(n) complexity. please gurus, verify that and let me know if it needs any modifications and ofcourse i have question to ask when the no of elements are odd we can easily find the …

Software Development c
Member Avatar for Iam3R
0
130
Member Avatar for MoooCow

Hello, I am having some difficulty in trying to figure out where I am going wrong in my program. I am trying to convert infix to postfix and from there I am evaluating the postfix. However, it is not compiling correctly. I've tried several things but nothing seems to work …

Software Development java
Member Avatar for quuba
0
143
Member Avatar for nccsbim071

Hi All the coders out there. I need a suggestion. I have windows xp installed on my computer and i need to develop application for windows vista. I would prefer to use .net framework 2.0 and visual studio 2005. Instead of .net framework 3.5 and visual studio 2008. Well, selection …

Software Development visual-studio windows-vista windows-xp
Member Avatar for nccsbim071
0
419
Member Avatar for tayspen

how would i do this i need to do it other wise u have to havesomthing (i forget what is on your comp in order for them to worK)

Software Development c#
Member Avatar for DARREN HANSON
0
293
Member Avatar for beginerC#

Hi! I have a form with two dateTimePickers (first with date of one month ago, and the secod with current date), a dataGridView and a button. When i click the button i want to populate the dataGridView, but only between date1 and date2 [CODE] mySqlCommand = con.CreateCommand(); mySqlCommand.CommandText = "SELECT …

Software Development
Member Avatar for beginerC#
0
269
Member Avatar for topcat712

Could someone lend me their brain? :D I thought I had most of it done, until I got an error saying that my 'calcAverage' definition was not defined.. x.x here is the prompt for the program: Write a program that asks the user how many pumpkin weights they have, and …

Software Development python
Member Avatar for masterofpuppets
0
166
Member Avatar for YingKang

This code outputs the result in console. I want to implement a Swing JFrame, producing output readable by user. Do I have to change all my code if I want to use JFrame? Can anyone help? I am not familiar with JFrame at all. Thanks : ) [code] import javax.swing.*; …

Software Development java java-swing
Member Avatar for masijade
0
198
Member Avatar for skiplatte

Pretty much what the title says!! Basically I want to store method generated Strings and then plug them into another method - would hashtable be a way to do this?? Thanks

Software Development java
Member Avatar for masijade
0
103
Member Avatar for just4why

I would like to automatically generated staff number before generated the staff number i would like to check the staff.txt is the staff number exist. If exist then it will get the last's staff number and continue to adding. But the code that i creating it wont work. Please help …

Software Development c++ ios
Member Avatar for just4why
0
112
Member Avatar for jomamik

Hi to all, May I ask any help for a code in VB6 in saving images in either SQL server or MS Access databases? Please give me some idea thanks a lot in advance.

Software Development sql visual-basic
Member Avatar for MansoorAhmedK
0
255
Member Avatar for AnkitKumar

Dear All I am new in ADO.Net and i am using C#. My problem is I want to execute one trigger in my program I am having name of student in my student table now from my C# program I will pass any name which is in table from textbox …

Software Development c#
Member Avatar for AnkitKumar
0
4K
Member Avatar for amitcs100

I am doing project on printing a passbook of bank in which i have 8 fields those are transactiondate, particulars,chequeno,debit,credit,balance,print and serialno and i wanted to print that in passbook and print is a boolian type if i mark on one row it must print the other rows present in …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
198
Member Avatar for naveen g

i run vb6.0 code in xp for getting hdd physical id and it run ok. but when i run same programme in vista it does not display any hdd physical id. please solve the problem

Software Development visual-basic
Member Avatar for naveen g
0
183
Member Avatar for kat_stephens

I'm currently working with a group of my classmates on a recipe measurement converter, and I'm currently on the most difficult code of the three that is my part of the project. The code is basically for getting the amount from the user, a fraction. I have based my algorithm …

Software Development algorithm c
Member Avatar for mrnutty
0
73
Member Avatar for punchinello

Here's the code: [CODE]#include<iostream.h> int test(); int main() { cout<<test(); return 0; } int test() { int a=1; a==1? return 1: return 0; }[/CODE] Could anyone please help me by telling me why VC++ 6.0 rejects this piece of programming code? Is the line" a==1? return 1: return 0;" grammatically …

Software Development c++
Member Avatar for mrnutty
0
131
Member Avatar for riya0707

I am a perl beginner and need some help with regex Input for this code is : aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atgactagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactagactgacaaggtaaggtaaggtatgatgatgatcgatgacgat... and so on Here i am trying to assign input file as a scalar variable and trying to find a match of "aaggtaaggt" and then skip some 100 characters whether they are …

Software Development perl regex
Member Avatar for thangdd
0
152
Member Avatar for jeeter19

I need to print out the following values on std-out: -CPU Type and Model -Kernel Version -Amount of time since the system was last booted, in the form dd:hh:mm:ss This is all on Ubuntu 8.04 I have looked through my Linux Kernel book but it is very vague about how …

Software Development c linux-kernel ubuntu
Member Avatar for dkalita
0
193
Member Avatar for freddyvf

please help me what all things should be included in convertor in turbo c++

Software Development c++
Member Avatar for mrnutty
0
74
Member Avatar for cookware_ok

Easily allows temporary message to be displayed on any label for a programmable length of time. This is a very simple way to display a temporary message on an existing label (or textbox)without doing a lot of coding.

Software Development visual-basic
Member Avatar for muzaffar85
0
318

The End.