43,549 Solved Topics
Remove Filter ![]() | |
Hey; I'm trying to do a hang man game in Java. I newly learned some stuff about programming some GUI using Swing and AWT, but I'm not still clear with it. The problem is that all the drawing is done by a single function paintComponent() from the JPanel that I … Software Development gui java java-swing | |
Even after looking at a lot of books, I am not able to understand the problem in the following code: [CODE] //1.c static int y=23; void abc(int a){ printf("%d\n",a); } [/CODE] [CODE] //2.c #include<stdio.h> #include "1.c" int main(){ abc(12); printf("\n"); printf("%d\n",y); return 0; } [/CODE] I can understand that the … Software Development c | |
[code] class complex { int real; int imag; public: complex(){}//why default constructor is always needed complex(int a,int b){real = a;imag = b;}// why can't we define only this constructor ~complex(){} }; [/code] Software Development c++ | |
I HAVE TWO LISTS AND I AM LOOKING TO SUM THE VALUES IN THEM. I HAVE TRIED SO MANY DIFFERENT WAYS. THIS IS WHAT I HAVE SO FAR: [CODE] for (int l = 1; l < list1.Count; l++) { string[] lineValues = list1[l].Split(','); float intValue = float.Parse(lineValues[l]); for (int k … Software Development | |
This is the full code and the single error!!!!! 1>d:\s\o.o\hws\new folder\shop\shop\main.cpp(37): fatal error C1075: end of file found before the left brace '{' at 'd:\s\o.o\hws\new folder\shop\shop\shop.h(8)' was matched [code] #include<iostream> #include<string> using namespace std; #ifndef SHOP_H #define SHOP_H class Shop{ friend ostream &operator<<(ostream &output,const Shop &S){ output<<"\nThe name of the … Software Development c++ | |
Hey guys I need to store a single string into Memory for later use on different pages to be able to create a log file for my app. so on my 1st form(Login Form) i need to pass the Username to Memory and then read it from the memory later … Software Development app-store motherboards-cpu-ram vb.net | |
[url]http://paste.pound-python.org/show/941/[/url] Having trouble getting a loop to write to a series of newly created sequential blank .wp files. Grateful for any help, thank you. Regards & a Happy New Year! Banjoplucker. Software Development python | |
I've tried many time to solve this problem...but still not successful, I'm newbie..so anyone of guys can help me check this problem... [LIST] [*]Button "Back" is big as frame [*]Seems no TextField for NoOfTicket [/LIST] [CODE]import javax.swing.*; import java.awt.*; //import java.awt.event.*; public class ticketReservation extends JFrame { private JLabel jlbWelcome, … Software Development java java-swing | |
i am trying to get the picture string from the database and when it is a null it gives me this error. [COLOR="Red"]Unable to cast object of type 'System.DBNull' to type 'System.String [/COLOR] [B]This is my code[/B][CODE]public List<Item> GetAllItemFromMenuID(List<int> ListOfItemIDs) { conn.Open(); List<Item> listOfItems = new List<Item>(); try { foreach … Software Development | |
Hi guys! is it possible to call parameterized constructor from derived class no-parameters constructor? To be clear - I want to override the most simple exception constructor (withpout parametrs) by other one - with string-parameter for class - [CODE]public class SetEception : ApplicationException[/CODE] thanks in advance) Software Development | |
Hi I am trying to link selected item from one list box to another list box and make the second Item selected there as well. Lets say I have 2 list box populated by the city names in two different listbox in different orders and from different source, now I … Software Development | |
hi..im doing a C# windows form application in visual studio 2008 and for the database im using SQL EXPRESS 2005..i need to create a crystal report. my question is when i start creating a new crystal report, using wizard, i get 1 window where i have to choose Data: i … Software Development sql visual-studio | |
I have never run into this problem before and I am frustrated. What am I missing? I am trying to initialize an array of five social security numbers. It does fine until the fifth one, then throws an error saying something about the indexer out of bounds. SSN has to … Software Development | |
I have Googled and looked and looked. What is the best cleanest way to format a social security number to look like xxx-xx-xxxx? And as long as I am asking, how about how to ensure that a nine digit number is entered? Thank you! Software Development | |
Hi all, I try to read file from file.. i put the file at drive D:\test.txt Please help me.. Thanks. Best Regards Software Development visual-basic | |
![]() | Edit: Never mind I figured it out. I used Math.pow(base, exponent) to figure it out I'm creating a calculator and I can figure out how to the power of two doubles. This is what I have: [CODE] public Power(Double base, Double exponent) { result = base ^ exponent; //result is … Software Development java |
Hello:( I have an assignment to build the booking and payment part of a Thearte Booking System. I have four classes linked to an MDF database - well they should be - the two that we have been given will will be and the two that I have done might … Software Development linked-list | |
Hi I am currently primarily programing graphics applications and am still fairly new to this. I know the relevance and can see the advantages of making items a template especially with things such as collision detection. I was wandering is there any advantage/disadvantage to doing everything as a template? Obviously … Software Development c++ | |
Hello, This is a really simple question but I just don't see the error here: [CODE]def foo(): x = input('write something: ') if x == 1 or x == 2: print('OK') else: print('NO') print(x)[/CODE] Why does it keep printing NO? Also, I have a more complicated one: def foo(x, y): … Software Development python | |
I'm trying to save everything to a .txt file with a new line after every string, but I can't get it to work for me. I tried using [ICODE]<<endl;[/ICODE] and [ICODE]"\n"[/ICODE] but it all gets written in a single line. So if I enter "John" for [ICODE]first[/ICODE], "Smith" for [ICODE]last[/ICODE], … Software Development c++ | |
My assignment: develop a limited application to track the statistics of sports players. For each player, track first and last name, points scored, assists made, and penalty rate. Design and implement an object capable of recording this info. Implement this object as Player. Must allow user to enter new player … Software Development java | |
Hello. I've seen some tutorials, but I can't find one that particularly suits my needs. What I'm trying to do is this: I have a form that contains an object. I want this object to be able to modify its parent form when an event for it is thrown. The … Software Development | |
Ok so does any body have any ideas or hints on how to select a range of values from an array??? say: Array1[1,0] to Array1[10,0] so that would be the first values in each row from 1 to 10. ANy ideas? Software Development | |
I have to create a Pizza GUI that shows pizza size choices and topping choices for pepperoni and mushrooms and then calculate the total. I'm having trouble constructing the GUI. Down in the createCenterPanel method Eclipse is tell me that radioButtonPanel, checkBoxPanel, and pricePanel cannot be resolved to a type. … Software Development gui java java-swing | |
HAY people ive created the code as below but when i run the program it is displaying: system.Array[] or somthing like that instead of the value in the array. I though it mite be a problem when converting the string[] to string but i cant seem to find a solution. … Software Development | |
hi, I have made a web services app which i have install it in server. This web services is to check datetime form the server.....if the server time and my pc time is match it will proceed further to next step....i have set it to 5 min different...it is going … Software Development vb.net | |
![]() | Hi Guys, I'm trying to create a simple webpage which has a login form. When the user successfully logs in, I want a cookie to be stored with the name "MyCookie", and a value of "1". Then I want the login form to hide and instead display a textbox with … Software Development c# html-css web-browser |
Hi! :icon_biggrin: I'm trying to program a personal project, but I've hit a bit of a bump in the road. I've got a Button, a Textbox, and a CheckedListBox; when the button is pressed, whatever is in the TextBox is added to the CheckedListBox. However, when the form is closed … Software Development vb.net | |
hi i want to add Scroll Pane to JTable [CODE]JScrollPane jScrollPane = new JScrollPane(table); jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); add(jScrollPane,BorderLayout.CENTER);[/CODE] in the above code table is and Object of JTable with default model i write above code but that code display the scrollbar but they dont work Software Development java | |
Hi, Continuation of a previous thread. This is different question, so new thread. I have an array of 5 taxpayers. User enters 5 SSNs and Incomes. An array is instantiated to fill this data. I need to display all five objects listing SSN, income and tax. I am having difficulty … Software Development | |
Hello All, Have somebody heard about a C++ library which help Agent programming like Java Agent Development Environment(JADE). Please let me know. I googled it but I could not find. Thank you ThiLiNa Software Development c++ | |
Hello..... i am new to C#, can some one please give me a simple code example for an array data structure to read Name, Age, Salary, and Address for the employee by Asking the user to enter the number of employees. Thank you Software Development data-structure | |
Hello, I have been trying to get this program to work for a while now with no luck and I was hoping that someone could clear things up. My problem is the program always gives the failure to open file message so I can't tell if anything else works or … | |
Hello everyone. I am trying to find the max values of each column in this 5 column array. I have skipped the first column because it is just the product name. The other 4 columns contain revenue of that product. The function I wrote below works for col 1, 2 … Software Development c++ | |
[CODE] // this is main.cpp // stuck on getting the ouput of the distance NOT to be 0 i think its someting to do with the variables // in the distance method in the point.cpp file // The invokeX and invokeY are set to 0,0 cout << "The distance from … Software Development c++ | |
Hi Guys, I have developed a program which continuously draws a circle using a timer. Now every time the circle gets displays it flickers and which is because i have used me.refresh. Is there any other way to avoid this flickering. here is my code [CODE]Private Sub Timer1_Tick(ByVal sender As … Software Development image social-media vb.net ![]() | |
Hello Members, The following code compiles and runs accurately, but gives the following message: [CODE]Note: List.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.[/CODE] [CODE]import java.util.*; public class List { private final static int[] array = {1,2,3,4,5,6,7,8,9,10,11,12,56}; public static void main(String args []) { ArrayList x = … Software Development java | |
Does anybody know how to query all groups with provided user in managed by field? Thx in advance. Software Development asp.net c# file-system windows-server | |
Hi all, I'm sure it's an error by me, but I'm having a problem with ifstream inside a loop. The reason for the loop is read in a piece of text from multiple files, and cases within the switch statement change the filename, path is previously declared. The first iteration … | |
I am working on visual studio 2008 what i want to do is read till the end of the file the code i am using is [CODE] StreamReader ^sr= gcnew StreamReader("example.txt"); String ^str; while(sr->Read()!= 0) { str=sr->ReadLine(); textBox2->Text=sr->ReadLine(); MessageBox::Show(str); } sr->Close(); [/CODE] what could be used inside while condition that … Software Development asp.net c++ visual-studio | |
I spent so much time from scratch to finish and to the point that I couldn't figured out what is all my mistakes about. I need a fresh set of eye, may you help? (errors at the bottom, sorry for have to scroll down the long page) Thanx [code]/* *Description: … Software Development file-system java | |
I have a SQL file that needs to be BCP exported to pipe delimited because of limitations on the recieving end. I have tried the following with no sucess; [BCP sql statement] + '.txt" -t"|", -c -T' [BCP sql statement] + '.txt" -t\|, -c -T' [BCP sql statement] + '.txt" … Software Development | |
im looking to check a binary value at a certin bit and determin if that bit is a 1 or a 0. For example: A = 10000000 B = 01111111 I want to check the first bit and if it is a 1 load it into one array and if … Software Development | |
Ok, so I have a stupid question to ask, and I aks all of you not to ridicule one who is merely looking for knowledge. What is the difference between using [code]#include "whatever"[/code] versus using [code]#include <whatever> [/code]? I've always used the brackets versus the quotes, and have tried looking … Software Development c++ | |
can anyone say how to use java in windows 7 I installed it but its not working. i am unable to compile a java program. please help me in solving this problem. i am getting this message in command problem when i use javac "'javac' is not recognized as an … Software Development java | |
I wrote a program which I tested in the IDE of python 3.2, it worked but whenever I open the program directly or run from command prompt, it doesn't run correctly, after the user inputs the correct answer, the program keeps saying try again. [URL="http://www.daniweb.com/software-development/python/code/359115"]here's the program it's in the … Software Development daniweb-bug ide python | |
hello to all, i got a problem in vb.net program, i dont how to delete multiple rows in a single table i used "truncate" command. this is my code for deleting: [CODE] Private Sub tranc() Try Dim dbconn As OleDbConnection Dim dbcom As New OleDbCommand dbconn = New OleDbConnection(cnnstring()) dbcom.CommandText … Software Development vb.net | |
i founds this code to search data in datagrid.. [CODE]Me.BS.Filter = "date = " & DateTimePicker.text "'"[/CODE] what BS mean & are this code true ?? Software Development vb.net | |
Guys need help with this one. Here's the condition / algorithm. "If first digit is number/int and last digit is letter add two zero in front of the string" Hoping for any idea! Thanks. Software Development algorithm | |
How do you implement in java to select only data from a Column i a database using java |
The End.