43,549 Solved Topics
Remove Filter ![]() | |
Good Day... the problem is that the Jbutton is not displaying in my Jpanel. can you help me, this will help me a lot, Thanks Here's the code [CODE] import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.URL; import javax.swing.JButton; import javax.swing.JOptionPane; public class GameBoard extends JPanel implements ActionListener { JButton … Software Development java java-swing | |
Hey all, I've been programming an ISBN system of sorts and I'm a little stuck (again). I want to output my linked list to a text file, so I setup the code like this: [code] void saveList(char fileName[40]) { for ( list< Publication* >::iterator it = pubList.begin(); it != pubList.end(); … Software Development c++ linked-list oop | |
hey guys! im just so frustrated with this error .. more like a bug though heres a link to all my code on google docs [URL="https://docs.google.com/document/d/1JxrZtbBJ8RPpMvuXvi767Y4gBSiXmKauNu7RApHNVbg/edit?hl=en_GB"]Source[/URL] the bold and enlarged stuff is whats causing the bug problem is when i add [ICODE]void Platform::set_clips(SDL_Rect platClip[], int i)[/ICODE], i guess something in … Software Development c++ | |
I'm currently developing a game (And no, just because that's the case doesn't mean this belongs in game development), and I've run into a problem. Basically, I need to generate a random number. The number needs to stay the same after it is generated once. The code is in an … Software Development c++ | |
Hi, I am biginer to java. I need to make a class method that retrieve specific row values from database (using ID), and then to make new class instance using those values (as field properties). I wrote code for the first part(getting row value from ID), but I need help … Software Development java | |
I want to print a pyramid like this..... ***** **** *** ** * This is my code.....[CODE]#include<iostream> #include<conio.h> using namespace std; int main() { int i,j; int b; char* sp=" "; cin>>j; for(int a=j;a>=1;a--) { for( b=a;b>=1;b--) cout<<"*"; cout<<endl; for(int k=1;k<b;k++) cout<<sp; } getch(); return 0; } [/CODE] But it … Software Development c++ | |
I'm hoping I'm not the first to deal with this issue but here goes. running py2exe I get this error [CODE]Traceback (most recent call last): File "setup.py", line 4, in (module) setup(console=['hello.py']) File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, … Software Development python | |
Hey all, I'm attempting to use an STL List to store a list of objects. Now I realise it's quite trivial to store a list of objects of my own definition. My real question is, how do I fill the list with objects that inherit from a base class. E.g. … Software Development c++ linked-list oop | |
I wrote a program that converts Celsius to Fahrenheit and vice versa. when converting Celsius to Fahrenheit I used the formula (9/5) * Celsius + 32. but that didn't work, I discovered that 9/5 was returning 1 rather than 1.8 and I'm not sure why that is. I fixed the … Software Development c# | |
Hi everyone, I'm new to Java and a relative newbie when it comes to programming in general. I've been learning a bit from some Youtube tutorials dealing with Java basics. They've been very helpful and I've been able to create a basic game setup with my new knowledge, with a … Software Development java | |
[CODE]// This is traditionally the first program written using System; namespace HelloWorldProgram { class HelloWorld { static void Main() { Console.WriteLine("Hello World!"); } } }[/CODE] I dont get why the statements in the body end with a " ; " but nothing is placed at the end of method headings. … Software Development | |
Hi I wanted to ask what is the relationship between "system" , "console" and "read" so far I found out that console is a "class" in the system name-space. Software Development | |
hey guys i got one more question :O i have this code for a class function [CODE] void Platform::set_clips(SDL_Rect platClip[], int i) { for( int j = 0; j < i; j++ ) { platClip[j].x = 0; platClip[j].y = 0; platClip[j].w = random_number_w(); platClip[j].h = 5; } } [/CODE] is … | |
Hey guys! i just started using SDL engine to make a 2d game . This is the code ive got so far, you can view it online on googledocs via this link: [URL="https://docs.google.com/document/d/1S1upv5FxT3TvZsvhaZ1nFb39aUz-AVl7MhqP8zSZ4DM/edit?hl=en_GB"]CODE[/URL] i have made bold the code that causes the problem. when i do [ICODE]apply_surface(0, 0, stick, screen, … Software Development c++ | |
So i just started learning SDL and came across "Event driven programming", just wanted to be sure if i understood the tutorial correcly. So lets say by adding: [CODE]SDL_Event event;[/CODE] i add lets say a container that keeps track of every event i do? After that i start using: [CODE]while … Software Development c++ | |
Hey there so i made this code, and i do not get why my while loop doesn't work, it checks once and then it continues to the next line, this is my code: [CODE] private void Timer1_Tick(object sender, EventArgs e) { timer++; if (timer != 65) { timerdone = false; … Software Development | |
Suppose that I have a text file and I want to insert a character in each of its line at some position. Then can I insert a character there without rewriting all the characters ahead of that position with one position ahead. Like, if I try to do that in … Software Development java | |
First off let me say that I am a student and do not want any answers. What I do want is some help understanding why my logic isn't working so I can devise a new plan. Any help at all would be greatly appreciated because I am completely stuck atm … Software Development c | |
Hey all, (Skip down till "Question:" if you're in a rush) Context: I'm coding on an audio application which involves storing buffers of audio. I'm currently using a [ICODE]std::vector<float>[/ICODE], as a member of an [ICODE]AudioBuffer[/ICODE] class. These [ICODE]AudioBuffer[/ICODE] instances are held in another class [ICODE]ResourceHolder[/ICODE]. In the "process" callback (where … Software Development audio c++ motherboards-cpu-ram | |
This is my code: [CODE] stringstream str_number string description while(!str_number.eof()) { str_number >> str_description; if (str_description.length() < 1) { break; } description = description +" "+ str_description; }[/CODE] My problem is that if the description is more than one string, the last string is repeated twice. For example if the … Software Development c++ | |
This is my code: [CODE] for (i = 0; i < date.size(); i++) { str_date << date[i]; str_date >> newDay; str_date >> newMonth; str_date >> newYear; apptDay.push_back(newDay); apptMonth.push_back(intMonth); apptYear.push_back(newYear); }[/CODE] My problem is that the first date[1] gets saved nicely, however the second round of the loop it all goes … Software Development c++ | |
[CODE] //A c++ program that calculate and print parking charges #include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 12; const int numOfMinsPerHour = 60; void inputAndValidate(int&,int&,int&,int&); void convertToMinutes(int&,int&,int&,int&); void convertBackToTime(int&,int&,int&); double calcCharge(int,int); int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime … Software Development c++ | |
i'm using this code [CODE] If txtCashTendered.Text = "" Then MsgBox("Input Amount First!") txtCashTendered.Focus() Exit Sub End If If ctbTotal.Text < txtCashTendered.Text Then Try Dim x x = MsgBox("Finalize Transaction?", MsgBoxStyle.YesNo) If x = vbYes Then txtCashChange.Text = Format(txtCashTendered.Text - ctbTotal.Text, ".00") FinalizeTransaction() End If Catch ex As Exception MsgBox("Create … Software Development vb.net | |
Hi I have set pane1.hide() and panel2.hide on form load however the panel still shows when I had only one panel it worked fine the new panel is exactly the same size placed directly over the other. Why does it still show? I know I could use multiple forms it … Software Development vb.net | |
i have a control dll and i use this control in my project then i change this controls codes after i do it . appears some error on this lines in form1[designer] [ICODE] Me.Dentisyon1 = New WindowsControlLibrary1.dentisyon Friend WithEvents Dentisyon1 As WindowsControlLibrary1.dentisyon [/ICODE] what should i do? thx for answers Software Development vb.net | |
Help please I am trying to output a value of an array, for example I want to output 7. How do I do it? Here's the code: [CODE]{ class Program { public static void Main(string[] args) { double [] kush = new double [2] {5.2,7}; Console.WriteLine(kush[2]); Console.ReadKey(true); } } }[/CODE] … Software Development | |
i for example i save ppt in OLEDB OLE Object :-/ and i need to open this powerpoint file in my program how can i do that :| thx for answers :| Software Development vb.net | |
i have a table and oleobj column in this table. i save some files to oleobj. and i need to open them how i can do that. for example i save ppt in oleobj and ineed to open this powerpoint file how can i do .. 2nd question. can i … Software Development vb.net | |
I'm trying to make a simple text game just for fun. Java is a language I want to learn so making a game is a great start. I'm having problem with my if statement however. This is an example of whats happening. This is only a few hours into the … Software Development java java-swing programming-construct | |
I'm trying to understand utilizing classes and their methods. I made a simple program to exit or print 'Will continue' given a word. however I keep getting a TypeError for self and through reading my books and searching online I'm still not quite sure why. the code is: [CODE]class OffSwitch(object): … Software Development python ![]() | |
Hi I have managed to sort out my date issue however although I have used the same code format on of my tables is not being updated and I am not getting any error msg so not sure why it will not work this is my code [CODE] cmd1 = … Software Development open-source vb.net | |
I have written some code to count the number of upper case letters in a string and the last line will not work? I am trying to print a statement that concatenates a line of text and an integer variable: [CODE]print ("The number of upper case letters are: " + … Software Development python | |
I am trying to write code to count the number of upper case letters in a string using Python. I have written the following but instead of the code returning the number of Upper Case letters it returns []? An help would be gratefully recieved. [CODE]import re while True: strPassword … Software Development python | |
Its something really basic, but for some reason i cant get my dinamic array to work. Keep getting a message that i need to add the "[]", but then i would create a static array, not a dinamic one. The code: [CODE]program Noname0; var arr : array of integer; begin … Software Development pascal | |
[CODE]Dim Processors(4) As ProcessorType For j = 1 To 4 Step 1 Put #filenum, WritePos, Processors(j).byte0 WritePos = WritePos + 1[/CODE] I'm in the process of translating this VBA code to python, and essentially what it does is creates 4 Processor Objects but as you can see from the for … Software Development python visual-basic | |
What is the c++ code of this c language code [CODE]printf("%d", b[i])[/CODE] ?? Software Development c++ | |
Is anybody know what is the easiest way to encrypt and decrypt text from textbox? Thank you in advance. Good day! Software Development encryption vb.net | |
For my user system, I require each user to have a unique id. The reading in and saving of the user data is all done, but now I'm focusing on adding new users. In my add user dialog, I have the information fields required to create a new user, one … Software Development vb.net | |
I am trying to sort a vector of strings in order (one line consists of various strings e.g. 12 10 2010) and was wondering if I would be able to extract individual values from one line of a vector? The way I am doing this is by reading lines from … Software Development c++ | |
I would like to know how the isFull() function works for a Stack and a Queue, but by implementing the Stack as a dynamic array(without a predefined size) and implementing the Queue as a linked list. Software Development c++ linked-list queue | |
Hi, I'm coding my program on VB.net and I take my laptop when I am away and use my PC back at home. I know this may sound simple, but what is the easiest way to get the project on another PC. For example, in Java I know that you … Software Development vb.net visual-studio | |
Hi there everyone, I really hope someone can help me, I am working with Visual C++ with QT libraries and using... well... something that represents MVC (long story)... now I need to pass a const QString& from my 1 controller class to the model of another class... When doing so … Software Development c++ qt software-architecture | |
*sigh* Okay, I'm building a small console app to launch batch files. I have user inputs for selecting the drive letter, and the folder path. The batch files have the same name as the drive letter (i.e. d.bat, e.bat, etc.). [CODE]drvPath = (drive + ":\\" + fpath + "\\" + … Software Development c++ | |
l am writing XML to a file. Everything works fine, however if l view the XML source the first line is always indented. Cant seem to figure out the cause. Thankx in advance for the help Software Development xml | |
Greetings to all experts, I am a newbie here in Java OOP and is struggling in practicing how to code a OO program, using Java. I hope anyone can give me a head start please. Here is the requirement which i am suppose to complete: [B]Input[/B] The first line of … | |
hi, i have a question in data tables. i am coding in C#. my scenario is employees have many benefits in a company such as life, health, dental, 401k and such... i have a tabel in MSSQL database to represent the employee data and a emp benefit table to hold … | |
I'm working on an add-in for Visual Studio which works well on framework 3.5 but not on 4. Do you have any idea why would the add-in do this? The add-in is written in C#. Software Development visual-studio | |
I have a very big string "-dAwin Main_Window -dwin Widget_Window -dh 500 -dw 300 -da 100 -dv 10 -dint 2............" This string gives me input parameter for running my application.Example -dAwin Main_Window gives me application window name. -dAwin is identifier b'coz this sequence may change or number of parameters may … Software Development c | |
Ok, I have a program that gets the factors of a LCD of a number (recursion). I need help converting it to loop statement :( . Any help will be appreciated. and please add an explanation I would really appreciate it. [CODE]#include<stdio.h> #include<stdlib.h> void whatIs (int nNum) { int nF … Software Development c | |
Basically I use text files to hold the program data, which is loaded in to variables when the program starts. I use StreamWriter to write to the text files when they update within the program. This is fine although the writer adds a extra line when I do not want … Software Development vb.net |
The End.