43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for emilio

in my application i have a tabcontrol with two tabs. when i run the program the focus is on the first tab. how can i change the focus to the second tab, so the second tab is shown on certain event ?

Software Development
Member Avatar for northtrench
0
118
Member Avatar for Violet_82

HI I was wondering if you can help me with this random number program. import static java.lang.System.out; import java.util.Scanner; import java.util.Random; class GuessAgain { public static void main(String args[]) { Scanner myScanner = new Scanner(System.in); int numGuesses = 0; int randomNumber = new Random().nextInt(10) + 1; out.println(" ************ "); out.println("Welcome …

Software Development java
Member Avatar for Violet_82
0
204
Member Avatar for histrungalot

["Objects that are instances of an inner class exist within an instance of the outer class"](http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html) Even though I attempt to create an independent instantiation of the inner class, the outer class is always there because of the statement above. ##Is that ture? If true, then that would also mean …

Software Development java oracle
Member Avatar for histrungalot
0
176
Member Avatar for jemz

Hi can you help me please how can i change the color of progressbar or just look like in windows xp progress bar...please help me...thank you in advance hoping for your positive responds...

Software Development java
Member Avatar for Samanta Goutam
0
8K
Member Avatar for Sevyt

Ok my title is probably very vague and unclear. Kind of hard to sumerise in the title. My form has a bunch of textboxes. The content is supposed to be saved with a button. BUT not all the textboxes will have content in them. So lets say i added content …

Software Development vb.net
Member Avatar for Sevyt
0
119
Member Avatar for v_janssens

Hi there, I'm a Visual Basic novice and have written a very simple GUI which I want to use to run a c++ program. I'm wondering how I would write the button click event to call the C++ program? I assume there's probably a simple way to do this but …

Software Development c++ gui visual-basic
Member Avatar for jean1234
0
364
Member Avatar for arcticman452

I am trying to get the ItemListener to work on this program. I keep getting an error that says the method getSelectedItem cannont be found and cannot figure out how to fix it. import java.awt.*; import java.awt.event.*; public class Buttons extends Frame implements ActionListener, ItemListener { public Buttons() { //set …

Software Development java
Member Avatar for mKorbel
0
132
Member Avatar for Magic681

Hey guys, so I'm trying to make a Paper, scissors, rock program (where you play against the computer). And i got pretty far, to the point where it seemed finished. But then i realized that i need to make the program exit itself after the player wins three times. So …

Software Development c++
Member Avatar for Magic681
0
420
Member Avatar for myadav

Hi All I am new to java. I am facing a problem I want to compare a string to a set of strings, For example there is variable string x, If the value String X matches to String A , String B, String C then run the particular code otherwise …

Software Development java os-x
Member Avatar for myadav
0
6K
Member Avatar for lulu79

I have two datatables that generate a datagridview like below: 1) datatable name : grpDT ![119](/attachments/large/3/119.JPG "119") 2) datatable name : grpTot ![211](/attachments/small/3/211.JPG "211") I want to merge both datatable so that I the datagridview will be like this: ![34](/attachments/large/3/34.JPG "34") what is the best way to do this? do …

Software Development vb.net
Member Avatar for lulu79
0
4K
Member Avatar for new_developer

Hi there, Please check my program. When i compile it i am getting error. Cannot find default constructor to initialzie base class. #include <iostream.h> #include <conio.h> class Parent { protected: double num; public: Parent(double n)  { num = n; } void sub() { num -= 2.0; cout << "num …

Software Development c++
Member Avatar for NathanOliver
0
342
Member Avatar for Aiban

Hi There. I joined here some three years ago when i created my ONE and ONLY Python program that actually functions as intended *YAY*, it's a little ugly and i've decided to return and learn more, improve it and maybe start up some new projects. I'm a little confused as …

Software Development gui python video-card
Member Avatar for Aiban
0
230
Member Avatar for TeaAnyOne

Hey! Just wondering how you make the code keep asking for a correct file input until a correct file is inputted, rather than just exiting the program when incorrect? f = input("Enter a file name: ") try: infile = open(f, "r") except: print("File not found:", f) text = infile.read() print(text)

Software Development file-system python
Member Avatar for TeaAnyOne
0
124
Member Avatar for Neversleepin

Hi, i try to handle a Neagtive number exception in my code. i tried this but it shows "illegal start of type" why please? Here is my code: public class JPanelTemporal extends javax.swing.JPanel { public JPanelTemporal() { initComponents(); } public void setDuration(int duration){ this.jSpinnerDuration.setValue(duration); } public Time getTime(){ Time time …

Software Development java java-swing
Member Avatar for Neversleepin
0
15K
Member Avatar for UNDER-18 FG

Hi, I've been given an assignment to write a java program that determines if a random given number is Prime OR not. But we also have to make comments in each lines, explaining the function/purpose of each lines to this java coding. So far, I've gotten the program corrected! All …

Software Development java
Member Avatar for JamesCherrill
0
293
Member Avatar for gelaisg18

Hi guys can you please help me with this. All I need to do is input a number and display the corresponding alphabet.For example 2 then the output should be A B.. I am working on a code but my problem is the output is displaying together with a special …

Software Development c display
Member Avatar for gelaisg18
0
526
Member Avatar for dean.ong.14

i want to make sure that people can quit in the middle of the game and the question is random not in order... please help me.. # make input equal to Python3 style input even in Python2 import random try: input = raw_input except: pass question =" " print("Welcome to …

Software Development python
Member Avatar for dean.ong.14
0
456
Member Avatar for dean.ong.14

I stuck at the part about how many question they want for their game.This is the requrirement. Write a program for an application that let the user host a quiz game. The application will have a collection of questions with short answers. The program should ask the user how many …

Software Development python
Member Avatar for dean.ong.14
-2
174
Member Avatar for Cosmo_Kramer

So I am done with the code below, I will run it like this "python hw3.py < code.txt" I think I have a problem with the indentation or something. the code.txt has a mixed up text in it that is offset using a caesar cipher but it has to be …

Software Development python
Member Avatar for Cosmo_Kramer
-1
307
Member Avatar for Cosmo_Kramer

def random(fileName) setup = open(fileName, "r" ) z = setup.readline() waiting = stack() for line in setup: customerNum, arrivalTime, serviceTime = line.split() plane = Customer(customerNum, arrivalTime, serviceTime) push(waiting, plane) setup.close() print "The data file specifies a", z, "-server simulation." print "There are", len(waiting) , "arrival events in the data file." …

Software Development python
Member Avatar for Cosmo_Kramer
0
191
Member Avatar for Violet_82

Hi there I am reading some java tutorial and a have a question about these 2 classes java.util.Scanner; javax.swing.JOptionPane; In the tutorial I am looking at the 2 classes are used in separate programs to get the input from a user With the first class http://www.homeandlearn.co.uk/java/user_input.html after importing the class …

Software Development java java-swing
Member Avatar for Violet_82
0
2K
Member Avatar for ncis_sg1

I am trying to understand how packages work. I think I have finished steps 1-7 but I am not sure. Now I am trying to start step 8 however I am confused as to how I can get the Test class to use the squar and cube classes. How does …

Software Development java
Member Avatar for ncis_sg1
0
144
Member Avatar for new_developer

I want to write a simple program to check class and inheritance in Code Blocks but i don't know how to write. I have make new project and add new class named "Car". This is main class. #include <iostream> #include "Car.h" using namespace std; int main() { Car c; return …

Software Development c++
Member Avatar for new_developer
0
386
Member Avatar for choeychoco

i am trying to execute an exe file on a remote computer using vb 6.0 and i'm using psexec here is my code: shell("psexec //computer1 d:\test.exe") but it is not working by. by the way i am using a cloned system. can anybody help me.. thank you so much.

Software Development visual-basic
Member Avatar for AndreRet
0
319
Member Avatar for jaasaria

hi guyzz i wanted to remove item in the lisview using the for each i want to delete multiple item with similar field in the listview. any help.. for this problem.. it could be possible ? i have here code but it delete only selected item in the listview. (ListView1.ListItems.Remove …

Software Development listview visual-basic
Member Avatar for bluemarine90
0
3K
Member Avatar for Lethugs

Hi, I have 3 tables Description, Item, Transaction Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Stylus T10 1 1 Repair 1 2 Monitor 2 HP 1 2 Repair 3 3 ViewSonic 2 I need to count how many printers, Monitors etc. are …

Software Development printer sql vb.net
Member Avatar for john.knapp
0
189
Member Avatar for letterG

I'm stuck at comparing the operators, it seems I can only compare the current operator to the topmost of the stack, how do I keep on comparing it til the stack is null or the precedence don't hold true anymore?...i've commented the part where I think my program fails...any help? …

Software Development c++
Member Avatar for letterG
0
4K
Member Avatar for csstu

How do I display an image in a picturebox using a variable name? string name = "photo.jpg"; pictureBox1.ImageLocation = name; // or Image image = Image.FromFile(name); pictureBox1.Image = new Bitmap(image); neither is working. I'm getting the small box with an x in it. Any help? Thanks

Software Development image
Member Avatar for csstu
0
139
Member Avatar for corby

Hi. I am trying to write a function that when given a class, will tell you the number of methods that class has. I am getting the java.lang.noclassfoundexception message. I read something about adding to the PATH but was unsure. I also tried using HelloWorld.class, but that did not work …

Software Development java
Member Avatar for corby
0
232
Member Avatar for Weliaz

Hey there people! I have a problem with an application which i'm working on! The problematic code: #ifndef CONFIG_H #define CONFIG_H bool LoadConfig(); XMLElement* Element(std::string name); #endif Where the "XMLElement* Element" is the problem. I am using the library TinyXML-2 for this. If anybody could help I would be very …

Software Development c++
Member Avatar for Weliaz
0
335
Member Avatar for ROSS679

Hi, I have created an application in C# and would like it viewed in a full screen that also covers Microsoft's taskbar, kind of like the way a PowerPoint is viewed in full screen. Is this possible? Sorry if i come off a bit confusing. Thanks

Software Development
Member Avatar for ROSS679
0
100
Member Avatar for ralph1992

I have attached a quick class model of what I am trying to achieve (Also, sorry for the mass of code but I figured I'd post everything I have thus far in case anyone saw other improvements I could make). I can give a customer an 'Account' but I want …

Software Development c c# c++
Member Avatar for phorce
0
8K
Member Avatar for QuantNeeds

I am not sure why this is occuring. I declared these functions in the header file and it is defined them in the .cpp file but in the main function it does not recognize them. Did I forget something basic or do something illegal? The errors: : error C3861: 'createAndInitializeTextFile': …

Software Development c++ ios
Member Avatar for fiqa92
0
4K
Member Avatar for zachattack05

The question I have involves 3 basic objects, (1)a class that contains methods to serialize and deserialize another class that is then saved to a file on a disk, (2)a class that contains methods and values that is marked serializable and is the class that is serialized to disk and …

Software Development file-system
Member Avatar for zachattack05
0
103
Member Avatar for ponkhiraj

Hello Developers, I'm here for your kind help, I am making a program where these codes i wrote: for i as integer = 0 to 5 If TextBox4.Text.Contains("1") Then TextBox4.Text = TextBox4.Text.Replace("1", "_n_") End If If TextBox4.Text.Contains("2") Then TextBox4.Text = TextBox4.Text.Replace("2", "_o_") End If If TextBox4.Text.Contains("3") Then TextBox4.Text = TextBox4.Text.Replace("3", …

Software Development vb.net
Member Avatar for Reverend Jim
0
557
Member Avatar for Alex_

Hello daniweb community ! I'm finishing my second year of IT studies and the university is giving us the opportunity to engage in a project with a company. I found a good company but now i'm looking for a good project to work on. I was thinking doing something in …

Software Development java
Member Avatar for JamesCherrill
0
316
Member Avatar for london-G

Hello, I want to delete duplicate in the array I have created, I have the following method now: Add an element Remove an element Can you give me an idea of how I can implement the deleteduplicates method. Thanks

Software Development java
Member Avatar for london-G
0
94
Member Avatar for swapna7999

hi i need to connect a vb application to a mysql database which is in a remote server plz suggest solutions thank u very much

Software Development mysql visual-basic
Member Avatar for choeychoco
0
802
Member Avatar for Stuugie

Hi all, With BIDS (Business Intelligence Development Studio)/SSIS, I have a process that downloads zipped CSV files. I store the files using the naming convention from the source ie 03260020-eng.csv. In a script task using BIDS, I would like to rename the file to exclude "-eng" but I'm not sure …

Software Development vb.net visual-basic
Member Avatar for Stuugie
0
190
Member Avatar for shredder2794

Hello all, I was wondering if there was a way to add cover art to an mp3 file using Java? I'm fine using 3rd party libraries. I have been using JID3(http://jid3.blinkenlights.org/) to add and edit ID3 tags of mp3 files but can't seem to find a way to add cover …

Software Development java
Member Avatar for shredder2794
0
1K
Member Avatar for babi.meloo

I need to design a class called Building that represents a drawing of a building(the parameters to the constructor should be the building's height and width). I need to color the buildings black with a few random windows colored yellow. Then I need to make an applet that draws a …

Software Development java
Member Avatar for babi.meloo
0
1K
Member Avatar for tingwong

Hello everyone, I have a little question regarding a project for my class. We are making a tower defense game with ants and zombies objects for our project. My question is with this piece of code provided to us. /** * Callback invoked when the player attempts to recruit an …

Software Development java
Member Avatar for tingwong
0
168
Member Avatar for kaizen202

In my project, I need a stand alone scroll bar for my text box. So I have created a customized scroll bar. Any idea How to use my customized scroll bar(both Horizontal and Vertical) in the text box instead of built-in scroll bar?

Software Development
Member Avatar for kaizen202
0
472
Member Avatar for Programmer629

Hi everyone. im kinda bored so i made my own code language. the code is like a=e b=q c=m d=p e=i ect. so i made it into a program. so i started to fill in the code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim …

Software Development vb.net
Member Avatar for Programmer629
0
99
Member Avatar for CoilFyzx

Hello good day. I have a quick question is anyone able to assist me in saving a password file. I encrypted my password and so I want to save the salt and the encrypted password(which are byte arrays). I tried using a properties file, but I soon found out that …

Software Development encryption java
Member Avatar for CoilFyzx
0
255
Member Avatar for Nutster

If am writing a VB.Net module for a project I am working on and have decided to try out different ways of doing some things, without getting rid of the older code that worked. I am selecting between these methods by setting a `#Const` at the beginning of the Module …

Software Development vb.net
Member Avatar for john.knapp
0
193
Member Avatar for subramanya.vl

I have this static block of code which is following Singleton design pattern. class Employee{ private static Employee emp; static { if (emp==null){ emp=new Employee(); } } public static Employee getEmployee(){ return emp; } } My doubt is if this code can be accessed by Mutiple threads concurrently and break …

Software Development java
Member Avatar for subramanya.vl
0
1K
Member Avatar for Violet_82

Hi there, I am just beginning to learn java right now, and have a real begeinner question. I ahve read that when you declare a float variable and ssigna value to it the number has to be followed by an "f". What I coudln't find out is why: `var floatNumber …

Software Development java
Member Avatar for Violet_82
0
168
Member Avatar for ohmang841

Hi guys...I'm new to python so I've no idea what I'm doing but I need to write a function that 1) asks the user how many strings they would like to input. 2)Stores the strings in a list 3) sorts the list 4) Displays the sorted list 5) Displays the …

Software Development python
Member Avatar for Lardmeister
0
9K
Member Avatar for Rachna0309

**I have a text file as below:** I have a text file as below:  BRANCH :SARDAR BHILADWALA PARDI PEOPLE'S CO-OP. ,Head Office NODE : 9 BRANCH CODE : 1 RUN DATE :11/05/2009 USER : SNA REPORT ID :R048260 * AREA WISE MEMBER LISTING OF SHARE CUSTOMERS ** PAGE : …

Software Development file-system vb.net
Member Avatar for Pgmer
0
257

The End.