43,549 Solved Topics
Remove Filter ![]() | |
Hello, I build my java desktop application using NetBeans 6.7, visually. So I click on the Frame -> Events -> KeyTyped and I add a new handler. The problem is the key events are not detected! My components are Swing components. Why is this happening?? :( [CODE] private void formKeyTyped(java.awt.event.KeyEvent … Software Development java java-netbeans java-swing | |
This is the XSLT from a SharePoint Dataview: [CODE]<tr> <td class="ms-vb">Trip Count : <xsl:value-of select="count(/dsQueryResponse/Rows/Row)" /></td> </tr> <tr> <td class="ms-vb">Warning Count : <xsl:value-of select="count(/dsQueryResponse/Rows/Row )" /></td> </tr>[/CODE] Trip Count above counts the total number of forms entered by traveller - the xpath expression works like a charm... How do I … Software Development sharepoint xml | |
I finally got it in order for smooth compilation, but nothing gets converted [CODE] import java.util.Scanner; public class nizadi_Lab8 { public static void main(String[] args) { if(args.length > 0) { try { Integer.parseInt(args[0]); } catch(NumberFormatException f) { System.out.println("wrong format"); } } else { System.out.println("no arg"); } } public int printBin(int … Software Development java | |
1)How can i delete the memory allocated if i have allocated dynamically through "new" like that: classA** instances; instances=new classA*[5]; for(int i=0;i<5;i++){ instances[i]=new classA;} 2)How can i pass arguments on the constructor while i am allocating memory in this way?: classB* instances; instances=new classB[5] Software Development c++ | |
Alright....this is a mess, but it works (compikes) correctly....how would I create a function (probably using "switch") to return a grade based on the averages found in CalculateAvg? [code] #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; double CalculateAvg (ifstream& students, string studentid[60], string fname[60], string lname[60], … Software Development c++ | |
Start off this is my first post so go easy on me :) I am a beginner at C# programming and have been set the task of making a tamagotchi in a console application, my question is there anyone who can point me in the direction of a good tutorial … Software Development | |
I know it seems that everyone is writing a 'backup' program these days. I started working on this a couple weeks ago and now my dream just keeps growing. I have written a script that uses rsync to backup selected files and folders in my home directory to an external … Software Development gui python user-interface | |
Hi Guys, I'm obviously missing something here. Basically I'm writing a program that will read in a csv file or excel file, and allows the user to pick which fields thay wish to use for what line of an address, and then import all the addresses to a SQL table … Software Development vb.net | |
Okay, here's my issue. I want to take a message a user enters, and then take it and convert it to a number, the standard a-z = 1-26, with space equaling 0. I haven't put in any punctuation yet. Anyways, I think I needed a loop, and I made this … Software Development python | |
Hello, There seems to be a multitude of different unit testing frameworks for C and I'm having difficulty in choosing which one to use. (I have no experience with C development at all) Is [URL="http://cunit.sourceforge.net/"]CUnit[/URL] generally the well known and widely used framework as NUnit is for .net and JUnit … Software Development c | |
I have this code that was done using pass by reference but now all the pass by references need to be changed to pass by pointer. Im not sure how to do this going back and forth between the functions. Here's what I have so far. [CODE]#include <iostream> #include <cmath> … Software Development c++ | |
Hi, I'm having " 'System.DBNull' type object not assigned to 'System.Byte[]' type " exception on reading picture data from database into picture object. When there is a picture no problem I get it, but I cannot handle the null case. I tried many alternatives but no result. Here is the … Software Development image | |
I've added a dataset , and a table adapter to my C# project. In this query , I get table data , then filter , then I will iterate and fill a listbox.(The dataset and tableadapter was added via DataSources boxes) [CODE=CSHARP] listBox1.Items.Clear(); ETPDataset.t_USR_UsersDataTable tbl = (new ETPDataset.t_USR_UsersDataTable()); ETPDatasetTableAdapters.t_USR_UsersTableAdapter tblAdap … Software Development dataset | |
Well, here i m trying store the some vertices(4) in an array. and trying to read them. But i m getting an error of "Array Index out of Bounds Exception. I know the error is in the line i have highlighted(red). And i have tried various methods. But not working. … Software Development java | |
im working on a function for a custom list class that writes all the items of the list to an output file. However i keep getting this error: no match for 'operator<<' in 'fout << nodePtr->List::Node::myItem' and error: no match for 'operator<<' in 'fout << ' '' i think ive … Software Development c++ | |
My prob' is that when I type 'Amanda' when the program asks for my name, it returns Hi. I want it to return Howdy when I input 'Amanda', and hello for all other strings. This is my program: [CODE]#include <stdio.h> int main() { int nothing; char namn[20]; printf("What's your name?\n"); … Software Development c | |
Hey Guys. Im having a hard time figuring this out. I realize there are a bunch of topics out there discussing this problem but I couldn't find anything that was helpful to this particular situation. [CODE] #include <iostream> #include <string.h> using namespace std; typedef char charType[4]; int main() { char … Software Development c++ | |
I tried to create an array that would increase its own size depending on the user's action. For example: The user types the name of one contestant, the array contains only one element (the name), later the user enters another contestant, the array becomes an array of 2 elements, each … Software Development c++ | |
I have a microsoft report viewer generated report with tables and all. I have images also in the report. I have to load a image control with a image at the time of report generation. embedded images seems to be from design time. I found some posts to this subject … Software Development image | |
Good day! I just need some help/solution on how to prevent the user to resize the form when the width of the form is less than 8,220. Thank you guys for giving time. God bless Software Development visual-basic | |
Hi, I am learning inheritance and abstract base classes. I need to define an abstract base class (ABC) that provides interfaces, and a derived class (directly from the ABC) that provides the implementation. The derived class may need additional member functions and variables (both, public and private). Using a pointer … Software Development c++ | |
Hi... I've been trying to edit and rewrite my code for quite a while now but no matter what I do the program only ever reads the last instance of a class that I declare. For example, [CODE]Fraction ni = new Fraction(3,4); System.out.println(Fraction.lcd(ni,new Fraction(3,2)));[/CODE] > This code is supposed to … Software Development java | |
Hey again everyone, it's been a while since I've posted here.. What I'm trying to do, is get the command-line argument and convert it to hexidecimal. Example, if the file is named 'test', you would call it with test 72 Or something similar. I have it working, but after MUCH … | |
![]() | Im making a sim of a robocup for a project and it would really help make the code easier to read if I could have an array of players but I cant dim and array as new and my players are all a class I made called gameobject. How do … Software Development vb.net ![]() |
Hi everyone, this is my first post on this site and I was wondering if anyone could help me with this. I'm sorry if my coding style is strange, I'm relatively new at this. The program is supposed to prompt the user to guess a number between 1 and 1000, … Software Development c++ | |
Hi, I'm writing a function that takes a word doc and returns the number of pages in it. I have the function working and returning pages except that it opens a Word dialog asking if I want to save changes - does anyone know how to stop this? I have … Software Development vb.net | |
I have a hmwk assignment that i'm stuck on....It calls for a while loop so I need to basically repeat this 4 times but I cannot for the life of me figure it out....any help would be great I narrow the code down so it works when I input the … Software Development python ![]() | |
This may sound like some simple stuff but I'm getting lost and my professor is hard to reach so if anybody can help me I'd greatly appreciate it. I'm writing sort of like a bank program, there is a "log-in" form, a "registration" form, and a "data access" form. My … Software Development | |
Hey guys, The idea with this form is to add the futures which is calculated when the button is pushed but I need the list to update every time and show the values each time to which the previous value is added to the new calculation, e.g. of what it … Software Development vb.net | |
Hello people, this is my second attempt to get help for the same code. First post is unsolved. I apologize for any confusion in my posts but I'm confused myself so it's somewhat hard for me to properly explain that which I don't even understand....:$.... I have been given the … Software Development c++ | |
I need to be able to take a point on an image and convert it into a point relative to a picturebox with the pictureSizeMode set to zoom here is the code that the picturebox uses to scale and center the image [CODE] Size size = this.image.Size; float num = … Software Development mathematics | |
i believe that it checks every nodes height and makes sure that the left -right is 1 or 0 or -1. It is supposed to return tree if tree is balanced which means that left-right is 0 or 1 or -1 at every node. [CODE] template <class KT, class DT> … Software Development c++ | |
Hi, I'm trying to manually translate 16-bit assembly intruction into the format Instruction Prefix-Opcode-ModR/M-SIB-Address Displacenebt-Immediate Data for an Intel8086. I'm having problems trying to figurit out when to use the respective values for the Mod, the R/M. If anyone could point a good book or site for this type of … Software Development assembly | |
Hi, how could you find the last digit in an integer? Thank you. Software Development c++ | |
so I've got a lot of it done, I just need a hint as to the next step. So far I have the user entering a bank account, interest rate, and account balance. I need the user to enter an amount of years and the program will go through that … Software Development c++ | |
Can anyone help please? How can I give focus to a textbox (for example we have two) by defining a shortcut key as alt+m ? Thanks in advance Btw, I'm a beginner so please tell me in the simplest way. :) Software Development visual-basic | |
Hi there My Algebra 2 class just started matrices, and I don't want to go out and pay $100 for a graphing calculator, just for the matrices, when I can code one myself. So... this is my code, and I can do it without classes, but I decided to make … Software Development python | |
trying to delete selectedItem from combobox to remove selectected account from database using mysql and vb.net 2008....this is my code for my delete menu can anyone help? *************************************************** [code] Public Class delete Public Sub _load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads … Software Development vb.net | |
what's wrong with this code in VC++ 2008 Ex [CODE] #include <conio.h> #include <iostream> using namespace std; class Allocate { private: void* v; unsigned n; __int8 dummy_ret; void* Alloc(unsigned& n) { void* ret; if(n == 0) ret = 0; else { ret = new(nothrow) char[n]; if(ret == 0) n = … Software Development c++ | |
Hi, I want to "click" with the mouse using a Robot object like this: [code] Robot bot = new Robot(); bot.mousePress(InputEvent.BUTTON1_DOWN_MASK); bot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); [/code] This results in: [B]Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid combination of button flags[/B] I even delayed the process before it starts clicking to have time to release … Software Development java | |
Hi, guys. I've been reading your forum for some time. Now I need a little help again. I am trying to read a bitmap file using BITMAPFILEHEADER, BITMAPINFOHEADER and RGBQUAD in windows.h - I need RGB values or only one of them. All the info in header structures is OK. … Software Development c file-stream file-system | |
So I pretty much finished a memory management simulator, and it worked for the test cases my professor gave me, but when I added a test case it didn't work as it should have. The main issue is, the first job will start, and finish, but the wait time wont … Software Development c++ file-stream | |
Hi all, I'm helping my girl out with her hw, (/me not knowing C at all, but someone has to help, right?) I am supposed to read user input, and then try to execute a given command plus the arguments in every given $PATH. I managed it all, but I … Software Development c multithreading | |
im supposed to write a code that you prompt to enter 10 different grades then drop the minimum value, while computing the average of the remaining 9. I'm getting infinity as the answer when I run the program so I know my min is messed up, somewhere but i cant … Software Development mathematics | |
i get a stack error [CODE] template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure() const { my_bst_node<KT,DT>* b=root; show_bst_structure(b,0); } template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure(my_bst_node<KT,DT>*& p, int level) const { int i; if ( root == NULL ) { for ( i = 0; i < level; i++ ) … Software Development c++ | |
I've found this online(Can't remember where) and I thought it might be usefull to other people as well:[CODE]package org.kodejava.example.text; import java.util.List; import java.util.ArrayList; import java.util.Locale; import java.util.Collections; import java.text.Collator; public class StringShortWithCollator { public static void main(String[] args) { List<String> fruits = new ArrayList<String>(); fruits.add("Guava"); fruits.add("Banana"); fruits.add("Orange"); fruits.add("Mango"); fruits.add("Apple"); // … | |
[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TravelExpenses extends JPanel { private JTextField days; //declaring textfields and labels private JTextField lodging; private JTextField airfare; private JTextField taxiCost; private JTextField miles; private JTextField rental; private JTextField seminarFees; private JTextField parkingFees; private JLabel daysL; private JLabel lodgingL; private JLabel airfareL; private … Software Development gui java java-swing | |
Hi all, I want to convert 1 to 000001 in Visual Basic 6 example: 1 = 000001 2 = 000002 thanks Software Development visual-basic | |
Here's what I have so far [CODE] template <class KT, class DT> void my_bst<KT,DT>::show_bst_structure(my_bst_node<KT,DT>*& p) const { my_bst_node<KT,DT>* le=NULL; my_bst_node<KT,DT>* ri=NULL; //empty tree if(p==NULL) { cout<<"tree is empty\n"; } else { //print node key cout<<p->data<<endl; if(p->left!=NULL&&p->right!=NULL) { show_bst_structure(p->left); } else if(p->left!=NULL) { cout<<"enter left\n"; le=p->left; show_bst_structure(le); } else if(p->right!=NULL) { … Software Development c++ | |
I need to write a combination of String and Images to a file. The catch is that I have to write some String, then the Image, then more String again. Does anyone have any ideas how to do this? Should I use BufferedImage? Software Development java |
The End.