43,549 Solved Topics
Remove Filter ![]() | |
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 | |
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 | |
["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 … | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 … | |
I have two datatables that generate a datagridview like below: 1) datatable name : grpDT  2) datatable name : grpTot  I want to merge both datatable so that I the datagridview will be like this:  what is the best way to do this? do … Software Development vb.net | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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 … | |
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++ | |
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 | |
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 | |
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++ | |
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 | |
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 … | |
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': … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
**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 |
The End.