43,549 Solved Topics
Remove Filter ![]() | |
[CODE] tdate= new JTextField(); tdate.setBounds(200,25,134,20); java.util.Date date = new java.util.Date(); DateFormat df = DateFormat.getDateInstance(); String s = df.format(date); a = s.split(" "); a2 = a[1].split(","); //a[0]=oct , a[1]=27, , a[2]=2009 , a2[0]=27 , int mon=0; if(a[0].equalsIgnoreCase("jan")){ mon=01; }else if(a[0].equalsIgnoreCase("feb")){ mon=02; }else if(a[0].equalsIgnoreCase("mar")){ mon=03; }else if(a[0].equalsIgnoreCase("apr")){ mon=04; }else if(a[0].equalsIgnoreCase("may")){ mon=05; }else … Software Development java | |
im working on a program for my exams and its not really working.....cant really figure out why........i ran my program in both borland and turbo.....and both are giving the same error......DECLARATION SYNTAX ERROR. [CODE]void mul(int a[][3],int b[][3]) {int k=0; for (i=0;i<3;++i) { for(j=0;j<3;++j) { c[i][j]=0; for(k=0;k<3;++k) c[i][j]=c[i][j]+(a[i][k]*b[k][j]); //Multiplication of two … Software Development c++ matrix-multiplication | |
i have a text box, control botton and a datetime picker i want that if i write 2 in textbox and press button then datetimepicker auto change the current date and add 2 days in it . i am doing it in c#.net Software Development | |
Hello every one ... I have a C# windows based application in which when i press ALT + F4 key at that my window is closed as usual... but i dont want to close window when user press ALP + F4 key . User have to close window by clicking … Software Development | |
Hello, I'm new to C and having this problem. What I need to do is add a single integer (0-9) to an (obviously char) string. More specifically, I want to add the value of a function that returns an integer (0-9) to a string. I don't want to change the … Software Development c | |
I have the following driver for my template class the parameter being passed to the template is another class, the error I get is Error line 28 : templateclass.h std::ostream<<ballteam is illegal driver.cpp line 30 Where instationating templateclass<ballTeam>::print const () driver [code] #include <iostream> #include <fstream> #include "arrayListTypeT.h" #include "ballTeam.h" … Software Development c++ | |
Hi, I am trying to use strings, and even a simple program like this doesn't work. [CODE]#include <iostream> #include <string> int main() { string Hello; Hello = "Hello world!"; cout << Hello; cin.get(); }[/CODE] I am using Borland C++ 5.0, and it gives me this error. "String does not name … Software Development c++ | |
In my c++ book they give a program that finds the prime numbers between 1 and 100. The problem I am having trouble understanding is the logic of the second for loop. I know what it does but not how, if that makes any sense. [CODE] #include <iostream> using namespace … Software Development c++ | |
I want to allow certain characters to a string For example I want strA to contain either 'A' or 'B' or 'C' or 'D' How do I do that, help would be greatly appreciated. Thanks strA = 'A' or 'B' or 'C' or 'D' Software Development python | |
I'm having a tough time figuring this out. we need to fill in the blanks [CODE]import ____________ def wordCount(): lineCnt = 0 wordCnt = 0 charCnt = 0 list = [] ______________ = _______________("Enter the filename : ") file = ________(filename, __________) for _________ in file: ____________ += 1 list … Software Development python | |
I am trying to create a 2d array list but it is giving me a compiler error pointing at the first line of the function. I don't really get what is causing the problem. I am pretty good in C++ but Java has some new rules that I am trying … Software Development java | |
Hi I have a pointer generated in a method. And this pointer is input to another object. So at what point I have to delete this pointer? [CODE] method() { TEnemyCharacter *tenemyCharacter = new TEnemyCharacter(this); } [/CODE] So how to delete this tenemyCharacter. I cannot use delete tenemyCharacter; at the … Software Development c++ | |
Return the longest odd-length palindrome centered at the int index in the str. Assume that the index is valid, that the length of the str is at least one, and that there are only lowercase letters: no punctuation, spaces, or uppercase letters. I just want to know what this question … Software Development python ![]() | |
I know how to handle multi-dimensional arrays, but whats the best way to represent them on a form?? Not sure how best to describe the problem : / Its an order form. Each row represents a product, each column represents the week we're ordering for. The problem is the order … Software Development | |
hi all i am using VB6 and is writing a code for a maths project. learners have to enter an answer into a textbox and press enter to mark the given answer. i am currently using a command button to mark the answer, but it is time consuming. the idea … Software Development visual-basic | |
Hi.. I have 3 JPanels. (one) JPanel contains the scrollpane and the (two) JPanel contains a JButton. I am adding (one) + (two) into (combine) JPanel and then adding to the frame.Now I am really having a hard time align the scrollpane and the Jbutton. scroll pane is coming squeezed … Software Development java | |
I'm stuck trying to get a C# USB MIDI link to an Audio Mixer. Is there some sort of C# class or API that I can use to send and receive MIDI commands? Thanks. | |
Good morning, all! I have a Java project that is complete, but it's not due for another week. I've been poking around trying to "spruce it up" a little with maybe a pull-down menu for one of the options. The examples I've found online all deal with web development. Will … Software Development ide java java-netbeans | |
Hey there, I've never actually used a forum to ask for help on any sort of project before, but I'm a little stuck.. okay, a lot. =D It's probably something really stupid and minuscule, though. Anyway, heres the project.. I hope it's not too confusing: Write a program that asks … Software Development python | |
How to call a comboBox1_SelectedIndexChanged(object sender, EventArgs e) method from this code: [CODE]private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { // Get subdirectories from disk, add to treeView1 control AddDirectories(e.Node); // if node is collapsed, expand it. This allows single click to open folders. treeView1.SelectedNode.Expand(); // Get files from disk, add … Software Development | |
So I have written a reverse polish notation calculator: [CODE] #include <ctype.h> #include <stdio.h> #include <stdlib.h> #define NUMBER '0' #define MAXOP 100 int main () { int type; int op1, op2; char s[MAXOP]; while ((type = getop(s)) != EOF) switch (type) { case NUMBER: push(atoi(s)); break; case '^': push ((unsigned … Software Development c | |
Evening there. [B]I need to return an (x,y) tuple of an object, This x,y will be used to help 1 object calculate where the other object is and move towards it.[/B] My problem is that both the objects need to know the others' x,y. (i'm unsure how to get the … Software Development python | |
im taking a class in python but i just cant keep up with the curriculum. Some things confuse me so i was wondering if anyone have any websites or anything that can help me get through python or at least help me understand it easier. the book im using right … Software Development python | |
hi, i want to ask.. is it can to get an input from the user by only call the class object? here's the code : #include <iostream> class Time{ private: int time; int minute; int sec; ... }; void main(){ Time t; cin >> t; cout << "The time is … Software Development c++ | |
Hi! I can compile the following code, but when I try to run it with the line [B]a.out File1.txt[/B], my programming partner get a seg fault, and I get this error: [INDENT]a.out: relocation error: a.out: symbol __cxa_allocate_exception, version XXABI_1.3 not defined in file libstdc++.so.6 with link time reference[/INDENT] I found … | |
Call List3.AddItem(txtname & vbTab & txtamount & vbTab & txtqan & _vbTab & Format$(ans, "Currency")) need help need to align the text the keep displaying like this: toy car 1 $3.00 $3.00 card board box1 $0.50 $0.50 remote control car 1 $3.00 $3.00 cart 1 1 $1.00 $1.00 this is … Software Development visual-basic | |
hi to everybody. I'm just wonderin' if someone can help me with arrays. I am making a program of computing an average grade. I manage to execute the first requirements. The problem i have is how can i compute the grades that had been entered using a seperate method here … Software Development java | |
i have to make program for a hotel (just a scenario) but i'm having problems. First i have to ask them to choose a room type i.e A/B/C/D which decides how much their room costs per night (a=$22, b=$55 etc). Then i have to ask how many nights they wish … Software Development | |
I have this code: [CODE]string[] dirs = Directory.GetFiles(@"c:\myFolder\", "*.doc"); [/CODE] How do I do the same code, if I change "*.doc" with the comboBox. I have done the code that a user selects a filter from the comboBox. I did: [CODE]string[] dirs = Directory.GetFiles(@"c:\myFolder\", comboBox1.SelectedItem.ToString());[/CODE] but it is not working... … Software Development | |
Hi! I'm getting this error when compiling: $ g++ index.cpp index.cpp:85: error: 'friend' used outside of class index.cpp: In function 'std::ostream& operator<<(std::ostream&, const GrabStuff&)': index.cpp:88: error: 'myLineNumbers' was not declared in this scope Links to included files: [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/mystring.h"]mystring.h[/URL] [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/string.cpp"]string.cpp[/URL] [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/SplayTree.h"]SplayTree.h[/URL] [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/QueueAr.h"]QueueAr.h[/URL] And for fun: [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/SplayTree.cpp"]SplayTree.cpp[/URL] [URL="http://users.cs.fiu.edu/~weiss/dsaa_c++/Code/QueueAr.cpp"]QueueAr.cpp[/URL] [CODE]#include <iostream> #include <fstream> … | |
kind of a basic question but i cant seem to figure it out. well i have a list and i split it up using the split function but now im confusing how i can use one string and divide it to another. i tried turning it into a int or … Software Development python | |
[CODE]reply=float(raw_input("Enter your choice: ")) if reply!=1 or reply!=2: print "Not a Valid Choice" [/CODE] i cant use while loops other wise i prob wouldve done so. Basically im trying to get the user input to only allow the numbers 1 or 2. anything else should give a not a valid … Software Development python | |
I need to convert seconds to Minutes, hours and seconds. I must use pass by reference in variables. I know I need to use the modulus to deal with the remainders when I'm converting to Hours, minutes and seconds. I am really having a difficult time with the code. Software Development c | |
Hey, everyone. I know how to strip certain characters from a string using for loop. Can you give an example of how that can be done with the use of while loop? Software Development python | |
How can I limit the length of a text field.. I want allow entering specific number of characters in the text field?? Is there a constructor... I couldn't find 1.. plz help... Software Development java | |
hey i got something again i got confused by in PE files and they don't rlly explain why happens oke so what im confused with FileAlignment and SectionAlignment files must be aligned or sections to whatever count is right ? like if the it's less than the number (x) then … Software Development c | |
The do...while loop works fine when i key in only single character, however if i key in multiple characters, the default statement is executed infinitely. I think the problem lies in cin >> int?, i need some help in modifying the code, thx [CODE] bool rightanswer = true; do { … Software Development c++ | |
I select a month from a combobox and type the year in maskeditbox then press a button to show the report. 1st the report show. when I select another month to show again the report then show a error msg: [CODE]run-time error 3705 operation is not allowed when the object … Software Development visual-basic | |
What I want to do is a drop down list (comboBox) that the user can see only selected files. For example, if user selects a Word Documents from a comboBox, on the explorer will be only visible a doc files. I have done a FileFilter class: [CODE]public class FileFilter { … Software Development pdf | |
Hi there, I'm attempting to write a program that does the target word puzzles you see in most major newspapers. The target word problem involves a 3x3 grid of 9 random letters that a user needs to be able to make words out of using at least the middle letter … | |
Hi guys, Just wondering if someone could help point out why the string value s1 in the for loop cannot be passed on to String input.... here is my code. Please ignore the commented out parts. Cheers for any help [CODE]import java.io.*; import java.util.*; import java.lang.*; public class gaelan3 { … Software Development java | |
Hi everyone this is my first post, i've been browsing for awhile and finally decided to join. I'm having trouble with an assignment i have in class. I need to calculate the euclidean distance between two 2d vector. The function takes in two 2d vectors of integers. I'm also having … Software Development c++ | |
Ok, well I am JUST beginning to learn Java, and I have run into a little stumbling block. I am attempting to write a little applet, but it doesn't seem to want to run. My Java code: [code=java] import java.awt.*; import java.applet.*; public class TestApplet extends Applet { public void … Software Development java | |
I need help with my Palindrome code For some reason, I cannot seem to convert the text into lower case letters and I cannot seem to ignore spaces and commas and periods and so on. Here is my code [CODE]def is_palindrome(user_input): i = 0 result = True while i <= … Software Development python | |
Well, I did this program and it works, but my instructor wants me to use this statements instead of the one I used: My original code was: Dim DiscountVal As Double = 1.0 'ByVal arguments passed as by value (chapter VI) Dim BasePrice As Double = 9.95 Dim AdditionalPrice As … Software Development vb.net | |
The clock() function works fine in Visual C++ Version 6. I used it for evaluating how many milliseconds certain functions needed. But with Version 8 it won't let me use time.h the library that holds clock(). Naturally the error is unreadable, but there's hundreds of them and its obviously complaining … Software Development c++ | |
this is the simple problem I'm working on. A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period … Software Development c++ | |
Hi all.. I am new to Python and I am here seeking help. Actually, I'd like to run a DOS executable file from Python. The DOS excutable file requires 5 inputs from the users, and I have tried some coding which apparently doesn't work. Can anyone help? Here is my … Software Development python | |
hi, I have a program that compresses a file but for some reason my output file comes up empty every single time ...I dont get it . can some body tell me what i might be overlooking The sample input file looks like this ..GGGGGG...OOOOOOOO...OOOOOOOO...DDDDDD and my function has to … Software Development c++ file-system | |
How can I get the sum of the numbers of only one textbox? For example text1.text= 1367 How to get the sum of this 4 digit number? I appreciate your assistance in advance. Lida Software Development visual-basic |
The End.