132,725 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for gunjannigam

I have a class which extends JPanel and implements ActionListener. I am having 2 menuItem. When I implemented the abstract method actionPerformed(ActionEvent e) and used repaint if the event source are the menuItem paint method is not called. What can be the possible reasons? This is what I am doing …

Software Development java
Member Avatar for JamesCherrill
0
114
Member Avatar for Mz3g

Hi guys, When I run this code, I got segmentation fault and i can't figure out where the mistake is? I'd really appreciate any help. thanks [code] #include <fstream> #include <iostream> #include <string> #include <sstream> using namespace std; int main () { ifstream file, dest; file.open ("arp.txt"); if (!file) { …

Software Development c++
Member Avatar for Mz3g
0
174
Member Avatar for padmaanand

[CODE]import java.io.*; class ArrayGet { int[] a = new int[20]; void FindMin(int[] a) { int min=a[0]; for(i=0;i<=10;i++) { if(a[i]<min) min=a[i]; } System.out.println("Thr smallest element in the array"+min); } void Display() { for(int i=0;i<10;i++) { System.out.println("The elements in array are "+ a[i]); } } void GetMethod() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); …

Software Development java
Member Avatar for javaAddict
0
144
Member Avatar for tonymuilenburg

Hi all, I'm trying to capture an event when tab is pressed in a textbox using visual studio.net, and am having a hard time. I can capture anything else, inluding the keys that are difficult like instert, alt, and the arrow keys. Here is the MSDN page that did not …

Software Development c++ visual-studio
Member Avatar for tonymuilenburg
0
306
Member Avatar for Prat123

Hello, How to get information about type of file which does not have extension. If I have folder named as [ABC] and also file name same as [ABC] without any extension. I am using FindFirstFile() function to get folder information. [CODE]char path[3] ="C:\ABC" HANDLE hFind; WIN32_FIND_DATA FindFileData; hFind = FindFirstFile(path, …

Software Development c++ file-system
Member Avatar for Nick Evan
0
165
Member Avatar for SHENGTON

Good day DaniWeb experts. This is my first post here and hope you can help me with my problem. I'm a noob with Borand C++. I see a tutorial here "[url=http://www.dreamincode.net/forums/showtopic37428.htm]Converting and Evaluating Infix, Postfix and Prefix Expressions in C[/url]". I copied the code and run it in my Borland …

Software Development c data-structure
Member Avatar for vsiddharthv
0
924
Member Avatar for Gordon209816

Im having a few problems with completeing a adress book program in c (not c++ jus regular c), it requires a minimun of 5 functions so i have decided to use add, search, veiw now in order to complete i wud like to keep the add function but make a …

Software Development c
Member Avatar for Adak
0
120
Member Avatar for motinade

Please help, as I do not know what I have done wrong. Error: illegal start of expression, and ; expected. [code] import java.util.ArrayList; import java.util.List; public class Employee { public static void main ( String args []) { //unique identifier int empID; String firstName; String lastName; double salary; //not sure …

Software Development java
Member Avatar for stultuske
0
1K
Member Avatar for jprogram

I need to get characters one at a time from an ofstream because I need to pass the characters into a function. This is what I was trying but it says "ofstream has no member named get". Here is the code I am using. [CODE] ofstream outFile("source.txt", ios::out); a1.prepare(inFile2, outFile); …

Software Development c++ ios
Member Avatar for vidit_X
0
194
Member Avatar for k2k

would anyone please take a quick look? this always return false for some reason... the database connection is fine and the query is fine... it actually returned the right password from the database. please see below [code] public boolean passCheck(String login, String pass) { String realPass=""; try { String query …

Software Development java
Member Avatar for stultuske
0
150
Member Avatar for nickles

Hi, I was wondering how to write code that allowed a user to input a mathematical expression for evaluation. For example, I've written a simple method that calculates Riemann sums. [CODE]def riemann(hgLoc, a, b, intervals): sums = 0.0 size = float(b - a) / intervals for i in range(0, intervals): …

Software Development python
Member Avatar for TrustyTony
0
222
Member Avatar for Hidden_mistakes

I am making a racing game and am trying to find a way to let some one 'win' the game. in order to do this I am trying to display and image on the background at a certain position. This image isn't visable on the screen though until the racer …

Software Development c++ image
Member Avatar for strmstn
0
80
Member Avatar for dre-logics

I use visual studio 8.0 Two forms: windows form => form1.vb windows dialog form => ProcesDialog.vb On the procesDiaglog are five label fields: label1 label2 label3 label4 label5 Two picture fields picture1 picture2 I want to show the progress of building a Windows form1 I would always show the progress …

Software Development vb.net visual-studio
Member Avatar for dre-logics
0
101
Member Avatar for java=hard

I recently completed a "fun" program where it asks the user questions and outputs answers. I submitted it and my professor said all was great, except he wanted me to implement methods into the program. I have NO idea how o do the methods. Can someone use my code to …

Software Development java
Member Avatar for JamesCherrill
0
146
Member Avatar for pythonnewbie10

[code=syntax] '''calculate the future value of an investment after 10 years''' def calcValue( initialValue, interestRate ): period = 10 investmentValue = initialValue for i in range(period): investmentValue = investmentValue * ( 1 + interestRate ) return investmentValue def main(): principal = int(raw_input("Enter initial investment amount: ")) interest = float(raw_input("Enter interest …

Software Development python
Member Avatar for TrustyTony
0
75
Member Avatar for pythonnewbie10

[code=syntax] from random import randint def menu(): while True: print """ \n\n\n\n\n\n\n ____ ___ ____ _ __ ____ _ ____ _____ ____ | _ \ / _ \ / ___| |/ / | _ \ / \ | _ \| ____| _ \ | |_) | | | | | …

Software Development python
Member Avatar for TrustyTony
0
180
Member Avatar for tkpanther

Hello again, it is me with another homework hurdle. I am currently tasked with creating a Set class. We are not permitted to use Python's set class. I have looked at Python's set class for hints, but I had difficulty understanding it. We are not allowed to add methods not …

Software Development python windows-vista
Member Avatar for TrustyTony
0
182
Member Avatar for camigirl4k3

This is the last lab I have to deal with before the end of the semester and I'm stuck beyond reason it really is interesting though but...so many exams and I just can't figure it out 1.The program begins by displaying the following picture in a window labeled "Original Picture". …

Software Development puzzle python
Member Avatar for TrustyTony
0
582
Member Avatar for pythonnewbie10

I have this program that i have been working on which plays rock paper scissors game with the user. [code=syntax] '''play a game of Rock, Paper, Scissors''' from random import randint def firstChooserWins( chooserChoice, otherChoice ): #print chooserChoice, otherChoice if (chooserChoice == "Rock" and otherChoice == "Scissors") or \ (chooserChoice …

Software Development python
Member Avatar for TrustyTony
0
156
Member Avatar for krishnisilva

in the below quote i took from Devasya i implemented in SQL MS VS 2008, and there is an error coming any idea about it???? The code is : [code] db.openConnection(); int j = 0; int k = 0; string[,] a = new string[100, 100]; string data = "\""; for …

Software Development c#
Member Avatar for kvprajapati
0
143
Member Avatar for hafeez_sheik

Hello All, I need some C/C++ code/calls to unzip a zip file. Please share the code/guidence. Thanks in advance, Hafeez Shaik.

Software Development c++
Member Avatar for pradip_
0
1K
Member Avatar for capson

Hello, If say I have 5 variables: v1=3 v2=1 v3=7 v4=6 v5=5 and two lists made from these L1=[v1, v2, v3, v4, v5] , L2= [3, 1, 7, 6, 5] and I sort on L2, so that I have, L2=L2.sort()=[1, 3, 5, 6, 7] Is there a way to sort …

Software Development python
Member Avatar for TrustyTony
0
123
Member Avatar for jemz

hello, can you help me how to put picture in my button..example i have cmdsavebutton..and i want to put beauty on my form i want my button to change to picture just like saving a document there is a square form then when you click that it will be saved...can …

Software Development visual-basic
Member Avatar for jemz
0
105
Member Avatar for SanjitVigneshS

I was attempting a problem on [URL="http://projecteuler.net/"]Project Euler[/URL] - Problem 20. Since 100! could not be stored as ulong, I was thinking of using hexadecimal. Though I find a lot of example of converting hexa to decomal and vice - versa, I cannot find any info on using it in …

Software Development mathematics
Member Avatar for SanjitVigneshS
0
94
Member Avatar for superbt

anyone can me that I'm using VB.net 2003 and crystal Report 9. Here is my DB structure: Server = server123 Database 1: TestDB1 table :users Server= server123 Database 2: TestDB2 table :users In the design time in crystal report , i used the connection which connect to TestDB1.users but in …

Software Development data-structure database-design vb.net
Member Avatar for udith85
0
135
Member Avatar for kmh72756

Can someone else who has had more caffeine than I please look at this example and tell me what I am doing wrong? I have a custom business object called Customer and a Form1 with a BindingSource1, NumericUpDown1, TextBox1 and ComboBox1 and the attached code. Setting break points in the …

Software Development vb.net
Member Avatar for kvprajapati
0
124
Member Avatar for cheskajoyce

hi im learning VB.NEt im doing a game project where i have 4 animals racing in my properties i have stamina, weight, height acceleration all of them are in combo box with assigned values like "poor", "average", "fast" etc my problem is i want to show the finishing time of …

Software Development vb.net
Member Avatar for kvprajapati
0
146
Member Avatar for Xufyan

how to print the min value from an array ? i just understand the logic of printing max value, i tried so much to print the min but didn't find any clue... here is the program for max value: [CODE] int main(void) { int num[5]; int i,max=0; for (i=0;i<5;i++) { …

Software Development c
Member Avatar for jephthah
0
140
Member Avatar for ebushyu

I am doing an assignment that requires me to have 4 different radio button(earth, moon, jupiter and saturn) and two labels one showing the weight (on different planet) and one for the delivery price ( $5.00 for weights up to 1 kg; $10.00 for higher than 1 kg up to …

Software Development visual-basic
Member Avatar for vb5prgrmr
0
95
Member Avatar for gonzi.p12

Hi guys, I am using MyEclipse....I have even import the itext.jar file to my project folder....still I am getting error in my java code.... Error in resolving import com.lowagie.text.html.*; import com.lowagie.text.pdf.*; Can anyone help me.............

Software Development java pdf
Member Avatar for mintie
0
4K
Member Avatar for vmirz

My assignment is as follows... Create a program called part4.cpp containing a recursive function that accepts a pointer to a null-terminated string as its argument, and prints the string in reverse order. Demonstrate the function by calling it from the main function with a string that has been provided by …

Software Development c++
Member Avatar for chiwawa10
0
105
Member Avatar for tbone2sk

I'm putting together the basic layout for a contacts book, and I want to know how I can make the 3 test buttons span from edge to edge just as the arrow buttons do. [CODE]import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; …

Software Development java java-swing
Member Avatar for tbone2sk
0
131
Member Avatar for Dcurvez

This is what I have Done..and this is what is wrong: What I have done is made a windows form project. On Form2, 3, and 4..I have a Control Tab..and this control Tab is holding Images and text boxes. What I want to do is implement SAVE into my menustrip …

Software Development vb.net
Member Avatar for kvprajapati
0
114
Member Avatar for moods125

[CODE]#include <iostream> using namespace std; class Person { private: string name; public: Person(); Person(string the_name); string get_name() const; }; //////////////////////////////////////////////////////////////// class vehicle { protected: string name; int cylinders; Person owner; public: vehicle(); vehicle(string _name, int _cylinders, Person _owner); void display() { cout << name; cout << cylinders; cout << owner.get_name(); …

Software Development c++
Member Avatar for Fbody
0
103
Member Avatar for flyraf821

i'm having trouble with my factors function. I need to find the factors of all positive numbers in an array and then find their sums. I'm pretty confused at this point. The last thing that I tried was to take each number in array one at a time and find …

Software Development c++
Member Avatar for caut_baia
0
165
Member Avatar for k2k

anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder [code] move folder %ProgramFiles% The syntax of the command is incorrect. [/code] thanks thanks

Software Development shell-scripting
Member Avatar for k2k
0
113
Member Avatar for ms_farenheit1

I am trying to construct a linked list that contains string pointers. Since strings can be quite large, I am trying to save space and access time by storing pointers to them in the linked list. The strings are read from a text file and inserted into a linked list. …

Software Development c++ linked-list
Member Avatar for ms_farenheit1
0
139
Member Avatar for tarheelfan_08

Hey guys, I have been looking into queue's and stacks this week guys and I decided that I would like to convert my current array into a stack. Does anyone know how to or can give me some assistance with the current code I have?? I really do not even …

Software Development algorithm c++ queue
Member Avatar for tarheelfan_08
0
152
Member Avatar for octopusgrabbus

I need to find more ftp examples, like, after logging in, performing an mget * Any pointers? Thanks. cmn

Software Development python
Member Avatar for TrustyTony
0
1K
Member Avatar for toll_booth

I have been fighting the same bug for weeks now with zero success: I am trying to get images to come up on my buttons, but they utterly refuse to show up. Regardless of whether I used my old Python 2.5.1 or now 2.6.5, the following code: [code]'''Minesweeper.''' from Tkinter …

Software Development python tkinter
Member Avatar for TrustyTony
0
268
Member Avatar for colmcy1

Hey all, i would really appreciate some help with abit of code i'm stuck on. I am trying to read data from text files in this way: 1. Open text file 2. Read in the first line from the text file that doesnt start with "/" 3. change this char …

Software Development c++ file-system
Member Avatar for UncleLeroy
0
105
Member Avatar for Arsench

Hello, I’m using Perl script where executing SQL query which connecting to SQL loader to insert my data into table. When the script runs the success status returns, but the loader doesn’t load anything to DB, I want to get the Perl return value to compare it. Here is the …

Software Development perl
Member Avatar for mitchems
0
187
Member Avatar for theABCasian

Hey all ok so the issue seems to be at line 45 it seems to be making a loop from the output betting im just doing something wrong with exceptions, sense im just learning them. thanks in advance [CODE] /* File Name: Demo.cpp Chapter No. 16 - Exercise No. 2 …

Software Development c++
Member Avatar for theABCasian
0
70
Member Avatar for joegarside90

Hi everyone First post but I have been browsing as a guest for help with my university python project for a while now. There some really great help on here, Thank you! Right I'm doing a beginners python programming unit as part of my uni course, and as part of …

Software Development python
Member Avatar for vegaseat
0
414
Member Avatar for tcstom

I have some data in the memory which is pointed to by a pointer (ptr2data), how do i pass this data to a function which accepts unsigned long/DWORD data types? [code] unsigned long* ptr2data; DWORD temp; ptr2data = (unsigned long*)&SomeArrayOfData[4]; temp = (DWORD) tempSerNum; AddDevice(7, temp); [/code] The above code …

Software Development c
Member Avatar for tcstom
0
141
Member Avatar for mystb

Hi everyone, I'm trying to code a program that uses RSA to encrypt your message. I assume you know it but if you don't know let me explain simply: [QUOTE]Your enter a word (actually it is a sentence but for now a word) then program will convert letters to numbers …

Software Development c encryption
Member Avatar for mystb
0
300
Member Avatar for kekela

Hi! Tried searching the forums but I came up short, sorry if I'm asking the same stupid question over and over. I got a code snippet that looks like this [CODE]private void pictureBox1_Click(object sender, EventArgs e) { pictureBox1.Image = Image.FromFile(@"IMAGEPATH\test1.jpg"); }[/CODE] Since I'm a real newbie at programming I want …

Software Development
Member Avatar for jcao219
0
106
Member Avatar for Hidden_mistakes

I am trying to move a player in direction angle by speed. I need to use trigonometric functions in order to calculate this. Can anyone help me discover how to do this? [code]if (playerB.up == true) { (playerB.speed)+=((Delta*ballspeed)/1000); } if (playerB.down == true) { (playerB.speed)-=((Delta*ballspeed)/1000); } if (playerB.left == true) …

Software Development c++
Member Avatar for Tigran
0
122
Member Avatar for makybe

When you preview VB Output printed reports by going through BJ Preview, because report is quite wide the report comes out in Landscape but unfortunately shows on the screen straight down. To read the report you then need to turn your head 90 degrees, sideways, which is not the most …

Software Development visual-basic
Member Avatar for makybe
0
98
Member Avatar for Annettest

Hello everyone: I'm having a problem with vector indexing. The following code results in a segmentation fault: [CODE] for (int i = 0; i < (rows * rows); i++) { temperature[(i * rows) + (rows - 1)] = 0; }[/CODE] And: [CODE] for (int i = 0; i < (rows …

Software Development c++
Member Avatar for Annettest
0
294

The End.