43,549 Solved Topics
Remove Filter ![]() | |
I'm trying to have my function return an OPENFILENAME struct. Problem: It returns it fine and everything except that I cannot print the filetitle :S At the moment, it prints the path of the file perfectly fine but when it comes to printing the file title via cout, it prints … Software Development c++ | |
In this code i did not understand something. In one class, a variable is declared as private, but then this value is used in another class. import java.awt.Graphics; import javax.swing.JPanel; public class DrawRect extends JPanel { private int choice; //user's choice of which shape to draw. public DrawRect (int userChoice){ … Software Development java java-swing | |
> I have asked this question before, but i think i could not totally understand the diffefence between bitwise and logical operands. According to the book i am using to learn java, the bitwise operands can change the value and this is described as side effect. Also, in bitwise operands, … Software Development java | |
I'd like to represent an integer with a value between 0-100,000. Unsigned short int (range 0-65535) is too small. Unsigned int (range 0 - 4294967295) is big enough, but for a large data set this wastes a lot of space. Does there already exist a class that is in between? … Software Development c++ | |
When I handle WM_MOUSEMOVE in my window prodedure, HIWORD(lParam) and LOWORD(lParam) are both a little off. It's returning a point that is slightly to the left and slightly above where my cursor actually is... What's really weird is that as I move the cursor closer to the top left of … Software Development c++ | |
I have two RichTextBoxes in my vb.net application (rtf1 & rtf2). rtf1 is loaded with the external data. Mostly It contains para split into different sections. The paragraph is a dynamic data, hence the no. of words keep on changing. Now my question is that, I want to select a … Software Development vb.net | |
My first Daniweb question!! Am at the front end of learning Python (3.2.3) I'm doing a SQL query into a MySQL database for two fields, track_ID and track_duration. I'm getting a return of both, but instead of the duration value being expressed as 00:02:50, as it is stored in the … Software Development python | |
How to hide and then to show again when I want to a standard menu toolbar in MFC doc view application? Software Development c++ | |
Hi there. I am having some trouble trying to figure out how to delete a pointer that is held in a vector. int main() { vector<Test*> iVector1; vector<Test*> iVector2; vector<Test*>* pVec1(&iVector1); vector<Test*>* pVec2(&iVector2); pVec1->push_back(new Test(11)); pVec1->push_back(new Test(12)); pVec2->push_back(new Test(23)); pVec2->push_back(new Test(24)); //delete iVector1.at(0); delete iVector1[0]; iVector1.at(0) = new Test(21); pVec1->at(1) … Software Development c++ | |
Hi..... How do i set a listview to only add one item from a combobox? Example: In the text file containing the list are "Chicken, Beef, Buffalo", that already exists in listview is "Cow" then the listview will only add "Chicken, Buffalo". i have here a code for adding items … | |
It compiles but my JButton won't work... when i run the applet and press the Exit button.. it just prints some errors(or i dunno what they are) in the black window that opens when you run the applet. import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; ; public class CheckRadioTest … Software Development java java-swing | |
I tried to convert this GUI to a JApplet but then I get the error message. > D:\JAVA\PROGRAMS\whiteboard\whiteBoardapplet.java:9: error: whiteBoardapplet is not abstract and does not override abstract method actionPerformed(ActionEvent) in ActionListener > public class whiteBoardapplet extends JApplet implements ActionListener > ^ > 1 error > > Tool completed with … Software Development gui java java-swing | |
This is a JApplet. the Radio Buttons for colos work.. why won't the Checkboxes work? import java.awt.event.*; import javax.swing.*; import java.awt.*; public class CheckRadioTest extends JApplet implements ItemListener { //private String CurrentComboName = "Select One"; private int currentStyle = Font.PLAIN; //private int intBold = Font.PLAIN; //private int intItalic = Font.PLAIN; … Software Development java java-swing | |
I am having trouble with databinding when trying to add it to a dropdownlist. I can get it to work with a label: <asp:Label ID="Label3" runat="server" Text='<%# Eval("Location") %>'></asp:Label> But when I try with the DropDownList I get this error and I can't seem to find an answer for it. … Software Development vb.net visual-basic | |
In the below code, I want to know the significance of 10 while creating a PrioriyQueue. I know its the initial capacity but what does it mean?? I replace 10 with any positive number and the output remains same. import java.util.*; class Test { static class PQsort implements Comparator<Integer> { … | |
hey i heard that there is something called qt signals you can use it to change the GUI out side the main thread coz when i try to change it i get an error that i cant change the gui out of the main thread but i need it to … | |
Hi guys, Your typical C++ beginner here. I'm using the renowned Deitel C++: How to program to learn C++. I am my own mentor and here's what I can't comprehend: What's a Dangling Reference? According to Deitel C++: How to Program and I quote "Functions can return references, but this … Software Development c++ | |
Hello, I am new in VB2008. Could you guys please advice how I can programmtically delete/remove/clear the content of a cell of DataGridView? Say,for example,I have the following code that populates with data in DataGridView. Now,how can I clear/delete the "Test4" text from the cell of DataGridView? The GridView is … Software Development vb.net | |
Hello Daniwebers! I was just reading This C++0x Beginner Tutorial: http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class And I was confused by something: " `int_vector(int_vector& aV);` > Obviously, this type of constructor would allow the transfer of the resource, since the source object can be modified and put into an empty-state (or "zombie-state"). But there are … Software Development c++ | |
I wrote a class called Creature.java that creates a random creature object with various body stats. The Creature class extends MonsterGUI. I used Netbeans to create a new jFrame form, called MonsterGUI.java to create a GUI to display the creature objects' stats using jLabels. In MonsterGUI I have a private … Software Development gui java java-netbeans | |
public void compareStrings() This method will prompt the user to type two strings and will put them into different String variables. Then it will compare those strings to see if they are the same, i.e. have the same letters in the same order. If the strings are the same, “same” … Software Development java | |
Hello Friends, I need to create a report for my project I am using Miscrosoft Visual Studio 2010 and the SAP crystal Report I am not able to set up the connection The SQL server that I am using is not coming in the drop down of the server part … Software Development mssql vb.net visual-studio | |
Here is a example for my work. if a date ---> 20/03/2012 should be shown as 01/04/2012 16/12/2011 Should be shown as 01/01/2012 02/05/2008 Should be shown as 01/06/2012 My requirement is to get a given date as 1st of next month. I know to do this with IF conditions. … Software Development vb.net | |
I have a project named project1 in VS in a solution called Solution 'ShopEntry'. I want to have a copy of the project1 as project2 within the same solution. How can I do it without having errors. thankx in advance Software Development | |
#include <Stdafx.h> #include <iostream> #include <math.h> #include <stdlib.h> #include <time.h> using namespace std; int rand_0toN1(int n); int main() { int n, i; int r; srand(time(NULL)); // set a seed for random-number generation. cout<< "Enter number of dice to roll: "; cin>> n; for(i = 1; i <= n; i++) { … Software Development c++ | |
![]() | I am trying to cast vector to a string players = (Vector<Player>) inStream.readObject(); And I get error: java.lang.ClassCastException: java.util.Vector cannot be cast to java.lang.String Can someone tell me is there a way to do it? Thanks Software Development java ![]() |
Hi everybody, I just start learning python, and beacuse of that I don't really know all usefull packages and methods, that this language has. But I would like to know how would you write this program, or how would you change it (or may be some part of it) to … Software Development python | |
i have problem with query the database. i want to add data into two table that share same Primary key. here my code error message :The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the … Software Development dataset open-source vb.net | |
Hello, I need to create a JDBC that connects to a mySQL database, retrieves the data from a table and displays it into a JTable. I have done this successfully, but have ran into a problem. The initial values I entered into the database (for testing) are permament. If I … Software Development java java-swing mysql | |
Hi, I have a List containing double values and a double mean. I need to check and store all 5 consecutive values (in indivuals lists) that are higher that mean value. At this moment my solution always clear my aux List :( any ideas? double media = 1.8815; List<double> lista … Software Development | |
Hi. I am wondering if a log file can be created in a header which is associated with a try-catch block. Below is my stripped down code for the log_header.h and log_test.cpp Here is log_header.h #include<fstream> #include<iostream> using namespace std; class thrower{ //fstream myfile2; public: void errormessage(); }; void thrower::errormessage(){ … | |
Guys, Need your help here please.. I have a windows form where i have a requirement to convert money entered as integer into string format.. like : if amt entered was 5000,it shld be converted to five thousand rupees only.. please help.. Software Development vb.net | |
I use Visual Basic 2008 Database is Mysql Three tables: 1. table article fields: item number, item description, color number, month number 100 chair 2 3 2. table colors fields: color number, color description 1 red 2 blue 3. table months fields: month number, month description 1 January 2 February … Software Development vb.net visual-basic | |
I am currently using code::blocks but i am experinsing trouble trying to link the ws2_32.lib and other libraries. I tried visual studio express but it doesnt work with me. What are some good FREE c++ compilers that have very easy library linking and are rather user-friendly and that i can … Software Development c++ visual-studio | |
Hi! Only two windows-dialogs in my programm. On button click I do this->EndDialog(0); MyWiew mw; mw.DoModal(); ShellExecute(0, NULL, fdlg.m_ofn.lpstrFile, NULL, NULL, SW_MINIMIZE); But MS WORD opens file and starts only when mw is closed. How to start it with the mw together? Thanks in advance. Software Development c++ | |
Hi all, I want to know the way of maintaining sessions in a WPF application. I did the same in ASP.Net but that was a web application. I'm not sure how to do the same task in WPF. Any help is appreciated. Thanks. | |
Hello all, I have been long using Tango Icons and are good, but some stuffs are lacking. Is there good freeware Icon designer or free Icon package? Thanks alot Software Development python | |
Being a vb.noob as basically most of the vb.net world, I use the `Try/Catch` statement quite a bit for when it comes to errors, as the following. With Me .Text = "a" Try .Text += 1 Catch ex As Exception MsgBox("error: " & ex.Message, MsgBoxStyle.Critical) End Try MsgBox("a") .Text = … Software Development vb.net | |
![]() | I stuck against the wall again in implementing list of classes. In the nutshell: The idea is to put a LIST containing several CLASS, the Class content can only be manipulated and accessed with get and set method (which is already established). To add a value inside Job, Paycheck, and … Software Development |
I am newbie in java. I am facing problem now. My purpose is to put the time in textfield. I need press "Start" button and then the time will start go. But after i compile this code. It got error. I have no idea to do it. Can anybody help … Software Development java java-swing | |
Hi, I'm new to this site, and I thought this place might help me with some of the problems I am hitting. I am currently in grade 12 Computer Science, and I am coding a third-dimensional snake game (isometric view, so can all be drawn in 2D) I have taken … Software Development java | |
Greetings The quicksort i am building works for only aprox 50000 element in a list. If i go above that i will run out of memory and the program will crash. This is only when i use the median of three or left as my pivot element. When i use … Software Development c | |
Hi guys, I have some problems regarding textbox and radiobutton. My GUI design is like this: I have a textbox, 3 radiobuttons and an enter button. My first question: how can I make the enter button only visible if the textbox is filled and the radiobutton is clicked? If not … Software Development gui | |
Hi, The code shown below sucessfully saves text onto a line in a txt document, but using the array, I want to be able to save each piece of text on a separate line. How would I do this? Thanks in advance :) Dim filePath As String Dim objectWriter As … Software Development vb.net | |
![]() | Hello all, I am trying to think of ideas for programming projects, Python is the language I know most about so I decided to post it here. I have made some random stuff, like a Python program which generates a specified amount of asterisks I have made a text based … Software Development python ![]() |
This is my program import java.util.*; class Triangle { public static void main(String Vinod[]) { int i,j,n; Scanner sc=new Scanner(System.in); System.out.print("Enter a height of triangle : "); n=sc.nextInt(); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { System.out.print("*"); } System.out.println(); } for(j=n;j<=1;j--) { for(i=j;i<=1;i--) { System.out.print("*"); } System.out.println(); } } } I dont know what … Software Development java | |
Hi all, i have installed jdk1.7 , now i want to set the class path.. because i am compiling my program its giving an error.....javac is not recognized as an internal or external commond. please help me to set the class path.......and how to able to run my program. Software Development java | |
>> I googled the dinference between bitwise and logical operators, but i could not understand exactl what it is. Can you simply explain ? Software Development java | |
main.c #include <stdio.h> #include <stdlib.h> #define MAX_USERS 100 typedef struct Utilizadores{ char *login; char *pwd; } USERS; void ReadUsers(USERS user[]); int u = 0; int main(){ USERS user[MAX_USERS]; ReadUsers(user); return 0; } void ReadUsers(USERS user[]){ FILE *fp; fp = fopen("/home/Jiwe/Desktop/users.txt", "r"); while(fscanf(fp, "%s[^=]=%s\n", user[u].login, user[u].pwd) != EOF){ u++; } fclose(fp); … Software Development c | |
can anybody explain with details how to calculate the factor of a number ? i m trying to do this with while statement. how can i do this ? please... Software Development java |
The End.