199,114 Archived Topics
Remove Filter ![]() | |
this is inside my servlet: [CODE]ArrayList<String> currentCustomer = model.getAllCustomers(); req.setAttribute("currentCustomer", currentCustomer );[/CODE] how do i access this arraylist in my JSP file? I eventually wanna loop over each string element. | |
Hello everyone, The questions is below. Please bear with me. I'm a first year student, majoring in computer science. I have just finished an introductory course in the java programming language. I already know that what i type to program in java is a source code that has to be … | |
Hello, I basically have 2 GUI windows in my project. Just to explain it better, let's call the 2 GUI windows: - Window A - Window B In Window A, there is a variable that I want to change, but I have to change the value of the variable in … | |
Hi all! I am extremely new to java and to computer programming in general so I greatly appreciate all our help. Here's my problem, I am trying to write a program that reads in a basic text file with some names and some numbers, and inputs the given information into … | |
Hello Everybody, I am new into Java Programming. I am having a requirement of showing calendar in my JSP. Foe Example I have a field named 'Start Date' , whenever that field is clicked or is focused a calender should pop up and date chosen on that calendar should be … | |
Is there a way by which I can examine how the class Class was coded? | |
[CODE]import javax.swing.*; import java.awt.*; class Calculator{ JFrame frame; JPanel panel1, panel2; JTextField textField; JButton button[]; Container contentPane; void launchFrame(){ frame = new JFrame("My Calculator"); panel1 = new JPanel(); panel2 = new JPanel(new GridLayout(4,4)); textField = new JTextField(10); button = new JButton[17]; for (int i=0; i <10; i++) button[i] = new … | |
Hello. It's been a while since I was on here. I'm writing a Java class with a generic type parameter. Among other things, it maintains an internal ArrayList of the same generic type as itself. In a perfect world, the code would go like this: [CODE=Java]import java.util.ArrayList; public class MyGenericClass<T> … | |
Hi, I'm new to c++ and programming all together and I really need help. So what I had to do was display a table showing the medals earned by several countries at a certain competition and their total medal count. Then I'm asked to write a function which returns the … | |
Problem: Write the program columns that takes three command-line arguments. The first is the file to open, the second, the file to write to, and the third is the number of characters to display on each line. Read the input file, character by character, echoing to the output file, inserting … | |
Please give me a turbo c code on how to calculate grades with percentage. | |
Hi guys, I want to build a DLL to access classes and functions from a Visual Basic program This right here is my class [CODE] class SimpleDevice : public IHaptikDevice { private: // Callback Related PVOID object; PVOID method; UINT32 timerId; // State HaptikData data; HaptikUserData userdata; public: static Vector3 … | |
so basically i wrote a progarm that begins with a menu allowing you to select one of 5 functions, but at the end of whichever function i would like it to return to the menu the problem is i dont know how to do that and would like any tips … | |
Hi everybody, I am planning to build a java programe named word counter. It shall have file view and help menu. A text field where user can type or paste text. A button which starts counting number of words in the text. and a text field where the total number … | |
I have made a program that loads all the songs on my computer into a listview and plays them at random (at least that is what I want) right now I have them moveing to another list and removeing them from the current list so that none are played twice … | |
Hi Guys, I'm having an issue with my sum() function on my queries. My DB has 3 tables 1. plans 2. handset 3. matrix [B][U]plans;[/U][/B] - planNum - planCode - planName - planLength - simRebate - commission [B][U]handset;[/U][/B] - handset - RRP [B][U]matrix;[/U][/B] - planNum - handset - subsidy The … | |
[code]public double bigramPMI(String bigram,String []bi) { String[] arr = bigram.split(" "); int n11 = 0, n12 = 0, n21 = 0, n22 = 0, n1p = 0, np1 = 0, n2p = 0, np2 = 0, npp = 0; double m11 = 0, PMI = 0; for (int i = … | |
Hi i was given an assignment that ask me to create a simple object viewer. These are the requirements: 1. Display simple objects such as cubes, cylinders, pyramids, etc. 2. Objects should be able to rotate around all 3 dimensions. 3. There should be a parent object class from which … | |
[CODE] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main() { int x; cout << "Press the number 1, 2 ,or 3"; cin >> x; while (x!=1){ cout<<"Please try to pick a difference selection."; cin>>x; } if ((x==1) { cout<<"\nYou chose ";cout<<x; } system("PAUSE"); return 0; } [/CODE] … | |
![]() | hello again i got an assignment i thought i understand it but the every time i read it i understand it differently. my teacher won't explain the exercise. here is the exercise [IMG]http://img42.imageshack.us/img42/8331/37255827.png[/IMG] he also gave an input output example located here [url]http://rapidshare.com/files/434579925/sorted.zip[/url] i'v learned using shmat & shmget and … |
So I am a noobie when it comes to C++, I was wondering if anyone could suggest some resources so that I can learn what is going on? | |
[CODE] /* Write a program which continueously calls a menu function which prints the following menu and returns to main the operation selected: 1.Add 2.Subtract 3.Multiply 4.Divide 5.Compare 6.Quit The menu function must keep printing the menu and asking for a selection, as long as the user enters an invalid … | |
Could you please help me with this task? "Write a shell script which solve the task without the whereis command. The parameter ($1) is a file name. The script tells you which directories (maybe more than one) does the file exist in. (in the all-time PATH variable)" So far, i … | |
this is my infile's data..How do I get info into various data types? extraction operator? I know extraction works but the 5th line throws me for a loop..Thanks for help; 11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes … | |
Hi, I am trying very hard to make my own recurring invoice script. I simply have a field where the invoice date is entered. I just want to check if the date is equal to the date+1year ahead of time. If so then run the rest of the php to … | |
I need to build a Windows program with Visual C++ that sends an SMTP email when an alarm condition occurs. I will be reading data out of several PLCs (automation controllers) with the help of active-x controls purchased earlier for other projects. New to Visual C++, (I'm mostly an old … | |
jquery slideshow works in dream weaver but doesn't work at all in the browser. I can't even see the pictures of the controllers for the slideshow. I can see the first image in it and thats about it as you have to click on a button to get the second … | |
I've spent a good while looking, but keep coming up empty. Can anyone provide any advice for reading from a database (Google search has lead me to believe it is Paradox, of some type) with the file extension T. | |
hello can any 1 hlp me for creating a secured exe file of an console application.means i hv created 1 program in c using dev c++ as compiler. now it is creating an exe file of the project in the same project directory. thats fine. nw along with that exe … ![]() | |
Hello, I need to take a file filled with numbers and input them into a two-dimensional array. The file would look like: 3 6 3.9 4.5 2.1 1.0 2.4 4.3 3.1 4.2 5.1 6.2 1.0 2.7 1.2 2.3 3.1 4.2 5.2 6.4 where the first two numbers are the vertical … | |
I'm making a Card class and need to make sure that the suit is valid. When I call on the Card class and construct one setting the suit to 'Jordan' it actually ok's that suit and prints 'Ace of Jordan'. Instead it should become the default, of Spades. What am … | |
Hello, I have to create a graph based program that will validate a zip code given an expression to match eg. ddddd - dddd, where d is a digit 0 - 9. I am new to graphs and don't know how to accomplish this. I'm trying to make graph class, … | |
This is my function that is supposed to take a base ten number and return the same number in a base 16(hexidecimal) format ie. 45 returns 2D instead I am getting 6850 [CODE] string inttohex (int n) { ostringstream buffer; string result; int num; num=n%16; if(num<10) buffer<<(num+'0'); else {buffer<< ((num-10)+'A');} … | |
I have been trying to remove two errors in this code, line 12 (non-static variable this cannot be referenced from a static context) and line 204(cannot find symbol:(method `compareTo(java.lang.Object)` import java.util.*; public class InventoryPart3 { public static void main(String[] args) { Inventory invent = new Inventory(); <---[U]non-static variable this cannot … | |
I'm new to file I/O in C++ and have encountered a problem. My program checks to see if file "projectdb.txt" exists. If it does, it uses its data to populate an array. If it doesn't exist, it is supposed to create the file. This is where I am having the … | |
Hi! I have a problem, what i cant solve...I have to write a program, that settles if the most frequent birds peculiar to an area were the same. The number of areas is N. We note the number of the birds. The number of the species is M. I have … | |
hi, I'm just trying to make the Cancel button on my form close that form on Enter key but the problem is that it closes it when i hit space key and if i change code below to [CODE]if (e.KeyChar == (char)Keys.Return) this.Close();[/CODE] it does not work. it just works … | |
I am trying to write some code that reads a file line by line and then outputs the text of each line using cout. Here is what I have so far: [CODE]#include<iostream> #include<string> #include<fstream> #include<sstream> using namespace std; int main() { ifstream input("test.txt"); if (input.fail()) { cerr << "File not … | |
Hey I'm very new to the programming world, and what i am trying to do is produce a Koch Snowflake via turtle from python2.5. this is what I have so far... [CODE] from turtle import * def snowflake(lengthSide, levels): if levels == 0: return forward(lengthSide), right(120), forward(lengthSide), right(120), forward(lengthSide) forward(lengthSide) … | |
Good day, I am new to the site and would like some help on a code. I must write a perl program that gets the average of each column of numbers in any file? The format is: 1 2 3 4 5 6 6 6 4 4 2 3 4 … | |
This code is from MSDN ([url]http://msdn.microsoft.com/en-us/library/6t4fe76c(v=VS.80).aspx[/url]). [CODE] #include <string.h> class String { public: String( char *ch ); // Declare constructor ~String(); // and destructor. private: char *_text; size_t sizeOfText; }; // Define the constructor. String::String( char *ch ) { sizeOfText = strlen( ch ) + 1; // Dynamically allocate the … | |
Hi I am developing an application in Windows environment. I was used to program under linux with Kdevelop and I do miss a feature in the Dev-c++ now. In Kdevelop I can collapse all the functions in my code even the loops and if statements. So when I collapsed all … | |
A little project I am doing for fun. I want to make a self extracting exe that will take files of format .scx and extract them to a location on the computer based on a registry key that I know of. The key will help locate the location of the … | |
Hi there just a quick question I am using C#Express. When I add the reference System.Windows.Forms I cannot seem to access Messagebox.Show...any ideas what I am doing wrong? Btw this is in a console application... | |
Ok guys so i am trying to create 2 versions of a program which sorts items into boxes. The first version i have to create puts the item weights (integer between 1 and 20) into the first "box" they will fit into. So given the input 11,17,3,5,4 the list the … | |
i am having this problem , i have 8 strings say ( boy,topped,pens,remotes ,boted ,toyed, car,house) but i am looking for 3 strings having substrings ending with a (ed,s,s ) for exapmle topp[COLOR="Red"]ed[/COLOR],pen[COLOR="Red"]s[/COLOR],remote[COLOR="Red"]s[/COLOR] however i have to check by first checking the first string boy and i throw it away … | |
hey people i wrote this code and i got a problem , i cant register a session . this is the login form : [CODE] <?php if(!isset($_POST['username'])) { $title = "- signin"; include "header.php"; include "nav.php"; ?> <form action="" method="post"> Username :<br /><input type="text" name="username" size="70" /><br /> Password :<br … | |
Hi, Currently I developed a C sharp windows form application which is installed in both German and English windows operating system. The problem is the calculation part and storing it in MySql. The German windows operating system uses "," as a separator (for e.g 2,53) where as English operating system … | |
i am trying to print this: [CODE] string one = "[----------------]"; string two = "[ ]"; string three ="[ Go To Jail ]"; string four = "[ ]"; string five = "[_______________]"; Console.Write(""); Console.Write(one); Console.Write(two); Console.Write(three); Console.Write(four); Console.WriteLine(five); Console.Write(i); Console.Write(m); next to this square: string one = "[----------------]"; string two … | |
[CODE]'<form action="" method="post"> '<fieldset> ' <ul> ' <li> ' <input type="text" name="username" id="user"/> ' </li> ' <li> ' <input type="password" name="pass" id="pass"/> ' </li> ' <li> ' <input type="submit" name="submit" value="submit"/> ' </li> ' </ul> '</fieldset> '</form>[/CODE] Above is a php form that has refused to be submitted by my … |
The End.