199,124 Archived Topics
Remove Filter ![]() | |
hi.....here is my code::: [CODE]int main() { srand((unsigned)time(0)); int random_integer,num,len; cout << "Random numbers: "; cin >> num; cout<<"Lenght of each numbers: "; cin>>len; for (int i=0; i<num; i++) { cout<<endl; for(int j=0; j<len; j++) { random_integer = rand() %10 ; cout << random_integer; } } [/CODE] my question is... … | |
Hello, I'm trying to write a program that evaluates a postfix expression using the vector class. I have done this successfully using stacks but I am experiencing trouble with vectors. Here is the error message I am recieving: I:\vector.java:26: type Vector does not take parameters public static int evalPostfix(String str, … | |
Hey guys, How do I disable/get rid of that default exception message windows shows when you have an "unhandled" exception in your program? Here's my example code (sorry for not limiting the code's size to the problem only, it's readable enough I think): [code=cpp] #include <iostream> #include <fstream> #include <string> … | |
Hello, Iam working on website, technically this is my first j2ee website .. so iam trying my best here .. I tried to make simple front-controller technique using servlets + JSP .. and this is wat i done : index.java [CODE] Map event = new HashMap(); event.put("cats", new cats()); event.put("login", … | |
OK.. I'm trying to write a query which combines data from two tables. (I'm pretty novice at SQL Queries, so bear with me!) However, I want to exclude duplicate data (based on just one column -- an address field). Basically, I want to only have one result per address. The … | |
Hi guys, I cant seem to work out a way to keep my paragraphs when using a text area as part of a form. I send the form using ajax and then display the text again in a textarea to allow editing before finally displaying it on a standard page. … | |
In a game of Hangman, a setter of the word/phrase is required to enter a phrase. However, I was wondering if there was any way to input data blindly, so that the guesser cannot see the phrase getting typed in. An example of its use would be passwords being entered. | |
I had a web site ( Real Estate) and visitor can add data. But I only need to add in site only after my approval. So I make a column in database that "approved". When an user submit data then Enter the value "no" in "approved" column. When I approve … | |
im making a project right now.. a employee will input some personal information in a jframe then when the user click the button another window will popout and it will display the information of the employee.. im using setter and getter methods.. i think there is the problem because when … | |
What SQL statement would I need to join the employees/work orders tables to create the desired output (below)? ++++++++++++++++++++ + employees + ++++++++++++++++++++ + id | name + ++++++++++++++++++++ + 1 | Jim Smith + + 2 | Susie Helms + ++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ + Work Orders + ++++++++++++++++++++++++++++++++++++ + id … | |
Hi, I need to create a function that will allow me to search for records in a struct. Any ideas if how to get started? Thanks | |
Hi y'all! I need to sort an input of integers, long as we wish (not defined, depending on the user), which ends up by -1, and print it to the screen sorted. I can't think of anything that is simple enough to use (a beginners level, all we learned in … | |
Hi, I was wondering how in C# one would go about creating a worker thread, and after the Start Method is finished, have the thread preform another task. For example: I create a thread, and pass path[0].calculate. Now once that is complete I would like to be able to on … | |
Hey guys, I've this code: [code=cpp] #include <iostream> #include <fstream> #include <sstream> #include <string> using namespace std; bool load_file(const string &filepath, string &dest){ ifstream file; file.open(filepath.c_str(), ios::binary); if(!file.good()){ cerr << "Fatal error while opening file." << endl; return false; } //get filesize in bytes from ifstream //seek end, get pointer, … | |
I'm trying to write a short code that will take in a string of text, and tell me how many vowels are in it, with the information being passed between a parent and child process using pipes (I am only testing for "a" at the moment until I get that … | |
i am trying to save values in a textbox for each item in a list of items. The textbox will prompt for values and a button(btnTag) saves the value to the item in a list. The code below saves the value of the textbox for all the items in the … | |
Hi All, I am developing online examination process using jsp. The questions and options are fetched from the text files. For each page i am displaying one question and four options. I am calculating the answers by using radio button. I given a next button and previous button for navigation. … | |
Hi, Code below generates this error [inlinecode]Warning: Missing argument 1, 2, 3for MyWebpage::pageElements(): Class_for_HTML.class on line 18 )[/inlinecode] but i cannot solve the problem. Thanks [code] <?php class MyWebpage { var $header = "<html>\n<head>\n"; var $title; var $keywords; var $content; var $footer = "</body></html>"; function generatePage() { echo $this->header; $this->pageElements(); … | |
program that produces a report with a header line containing the total sales and total expenses. Following this header should be a table with each salesperson's name, percentage of total sales, and percentage of total expenses, sorted by salesperson's name. the text file should be like the following form bob … | |
hi guys... im having a problem figuring out exactly how to fill a dynamically allocated array of doubles. bool getData(double **x, double **y, int n) my function is passed these two pointers to pointers and, in the end, they are supposed to point to the addresses of dynamically allocated arrays … | |
Hi there, I am very new to ASP.net. I have just started making a website in ASP.net 2.0. In this website, i want to have a admin section which can be accessed only after the admin logs in with a login page. Now I am using custom asp.net script then … | |
#include <iostream.h> #include <string> void main() { char name[10]; int num_name; int count; cout << "How many names do you want to enter?\n"; cout << "Answer: "; cin >> num_name; int j =1; cout << "\nEnter names\n"; for (count=1; count<=num_name; count++) { cout << j << "." <<" name: "; … | |
Never done this successfully before and can't seem to figure it out... Any help appreciated. Basically this code draws my Winamp Track like this; "Song Title - Song Artist - Winamp 0:00/0:00" I would like to remove the - Winamp from the drawing if possible, any pointers or code would … | |
Hey guys! I have a serious problem. I missed class for computer science because I had two grandparents die in 2 weeks. My teacher has a no exception policy for turning in homework late. Tonight has been my only free night to do homework but I am stuck and not … | |
Hello...I'm trying to write this program answering this question and I keep getting C2440 errors and C2664 errors and I did some research but couldn't find anything on how to correct it. The question says : Write a program that dynamically allocates an array large enough to hold a user … | |
Hi, I'm trying to write a java program that will read in the scanner input from a user and outputs an postfix expression and answer so if you typed in: A = 5 B = 7 $PART2 AB+ the output would be AB+ = 12 I'm having trouble with the … | |
Hi i'm trying to write a simple SQL command to use within PHP. I want to select the whole table, sort by one of the columns, then only display the top 100 rows. Without the[B] WHERE rownum <=10[/B] it works fine. But it displays the whole contents of the table … | |
hi all, when i want delete items i will show a alert to users like are you sure you want delete .now i want a X symbol or danger symbol in that alert box ,i dont have any idea how to do this any ideas! thank you | |
I'm working on a program to find a way out of a series of underground tunnels. The LinearStructure Interface and the Location Class were written for me and I wrote the LinearStack and LinearQueue Classes, and they are working fine (as far as I can tell). My problem comes in … | |
hi any body describe me how to get the form value on a popup to print in java..... i.e i want that value on form come on a new popup window when i click submit button so that i can print these values accordingly | |
my last thread was just solved that i can run my java programs in my linux box. now i would love to know if some one knows how to make a html/xml page that has a link that if i clicked and it would execute my java program. all i … | |
hello this is my project to convert from arabic numerals to roman one's and vice versa but i have some problems in it ,dont know what 2 do ??/so pleassse help me 2 know or even 2 correct it thanx alot MODEL SMALL .STACK 1000 ORG 100H .DATA INPUT LABEL … | |
Hi guys, I need some help with a project...apart of it requires me to add, delete, edit and view records from a file, I have gotten the add to work so far but it will not delete records from the file, I am wondering if it has to do with … | |
hey guys, i've got an 'if' statement that works but i have to change it into a 'loop' statement. i originally chose 'if' because it's easier for me to understand but... it's gotta be a loop. so if anyone could, what would be the best loop style and how would … | |
I am quite new to C++ and while trying to 'link' functions (methods?) together to make more interesting code. I found that you cannot call a function that is below the function you are calling it from. example: main() { "code" run(); } run() { "code" } This doesnt work. … | |
Hi All I am new to PHP and just got a project ;) that needs me to extract links from the page, i have got the part of page that have links in a string and was wondering if i can extract all the links in that string. String is … | |
My homework problem is the following :Write a program that accepts a string from the user and then replaces all occurrences of the letter e with the letter x. I got the following code below that can recognize to find characters and where they are at but I don't know … | |
hello all, I have to write the code to read the file line by line and sort its words in alphabetical order n store into another file, i have done with the feathing the line from one file but strugling with the sorting part can anybody suggest how should i … | |
suppose the input file is... 5(number of cells) 1 2 -1 4 0 2 3 4 1 0 3 -1 2 -1 3 1 2 0 1 -1 how will i Write a function to read data from an input file to create a dynamic array of pointers to cells, … | |
Hey guys, i just re-installed python and began writing a script, when i go to run it a syntax error appears. The syntax error allways points to the quotes i use, meaning something like [CODE]print "Hello"[/CODE] a syntax error will appear and point at the end quote ' " ' … | |
Hi... This is prida thabah doing my MS in Medical Software..... Right now i am working on 5/3 and 9/7 filters, in this i have understand the logic of it. But, regarding the Lifting Scheme on this code i have few doubt, i want to know how they have used … | |
hello all , i have to initialize the array of stucture singleIMEIarr to null , using NULL doesnt work , when i assign {'\0'} it doesnt execute. any suggestions at to where im wrong ? [code] struct singleIMEI { string planname; string plandescription; string scriptexec; string startdate; string starttime; string … | |
Just wanna have it checked if i'm doing this rightly... i was given an expression to translate it into a polish notation and traversals. the expression is [quote] {( a + b ) - c } * { d * (e / f + g)} [/quote] here's my answer: POSTFIX … | |
Hey guys I need to write a function that separates a line into five different individual fields. My first question is how do I set the entire line of input from a file to an array. These are my directions. void dissectCustLine( char *, char *, char *, char *, … | |
I'm trying to add all the square root answer but why am i getting this output: -858993430 #include <iostream.h> void main() { int input; int sqrt; int i, sum, add; cout << "Please enter your desire number: "; cin >> input; for (i=1; i <= input; i++) { sqrt = … | |
making php code to pull data for database now it pulls most data fine with the like statment now is there anyway to make it pull both things that are lower and uper case ? [code=syntax]$query = "SELECT * FROM `users` WHERE `$lookby` LIKE '%$lookfor%'";[/code] | |
Hey All, I have a Register.php page, whose code is as follows. On Register Me button, i want to restore values back in text boxes, when some invalid input is in textboxes. How can i do this? [code] <?php session_start(void); ?> <html> <head> <title>Login System Using PHP</title> <meta http-equiv="Content-Type" content="text/html; … | |
Hi I have a code here composed of Array. I would like to know what does this mean here: (please see last 3 lines) What does it mean? Thanks & regards ArrayList numbers = new ArrayList(); string yourValue; Console.WriteLine("Give the value (b to end)"); Console.WriteLine(); do { Console.WriteLine("Give the value:"); … | |
How to make a new scripting language in C++ ?...I need: parser,scanner,grammar,included functions,syntax.Where I can start?. I think I use JavaScript/PHP syntax. |
The End.