199,114 Archived Topics
Remove Filter ![]() | |
[CODE]#include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const; {return title;} [/CODE] [ICODE]error code C2059(syntax error: '{' ) and C2334(unexpected token preceding '{' skipping apparent function body occur [/ICODE] [CODE]double getPrice() const; {return price;}[/CODE] … | |
Please help the code compiles but then gives runtime error and I have no Idea why please help with the insert of the book the .h file [CODE]#ifndef BOOK_H #define BOOK_H #include <string> #include "Person.h" using namespace std; struct node { node *left; node *right; Person data; }; class Book … | |
[CODE] C={} D={} C['21600']=[{'vid':1,'route':[11,12,13,14,15]},{'vid':2,'route':[21,22,23,24,25]}] C['23500']=[{'vid':3,'route':[31,32,33,34,35]},{'vid':4,'route':[41,42,43,44,45]}] #D['21600']=[{'vid':1,'route':[11,12,13]},{'vid':2,'route':[23,24,25]}] #D['23500']=[{'vid':3,'route':[31,32]},{'vid':4,'route':[45]}] D=C for n in D: for n2 in D[n]: if n2['vid']==1: n2['route'].remove(14) n2['route'].remove(15) elif n2['vid']==2: n2['route'].remove(21) n2['route'].remove(22) elif n2['vid']==3: n2['route'].remove(33) n2['route'].remove(34) n2['route'].remove(35) elif n2['vid']==4: n2['route'].remove(41) n2['route'].remove(42) n2['route'].remove(43) n2['route'].remove(44) print 'Printing D ', D for u in D: for u2 in D[u]: print len(u2['route']) … | |
So I have the y and e endings down, just need some help with the middle. Basically, I need to double the last letter before adding er if: the last letter is b,d,g,l,m,n,p,r,s or t and the second to last letter is not the same as the last letter. [CODE]def … | |
hi, i have to rotate an image. the image is stored in an image[rows][cols] array.. i am trying to rotate it using trignometric functions. i am not sure what happens when i rotate the image, does the address of the pixel vary or the value of the pixel vary. and … | |
Hi, I´ve found a code that is exactly what I need for a POS system based on web language that I am developing. What it does is send as soon as a pop-up window is activated, the information that appears (shopping items, quantities, etc.) to my email address (so I … ![]() | |
// Daryl Sanderson & Ladarius White //Tic Tat Toe //Professor Cook //Programming II // 11 am #include <iostream> using namespace std; int main () { char square1 (' '); char square2 (' '); char square3 (' '); char square4 (' '); char square5 (' '); char square6 (' '); char … | |
![]() | Hi, I'm having a problem where I set a session after checking login details, and then change the section respectively via ajax. The problem that I've noticed is that the session is only set once the page is refreshed - I was wondering if it would be possible to set … ![]() |
Alright im trying to create a program that allows the user to input numbers into an array and then will take the average of all the numbers within the array but im getting very strange results any help is much appreciated [CODE]#include <stdio.h> #include <stdlib.h> #define SIZE 9 int main(void) … | |
hello someone out there...help me with algorithm to determine range of marks!! here is my code so far [ICODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> struct stumarks { int studentid; int progassn; int lab; int test; int exam; char seperator; double finalmark; } stumarks[9]; using namespace std; int main() … | |
Hello friends. I need a good article or book that compare storage engins _such as MyISAM, InnoDB, Falcon and etc_. if any one know a good source please introduce me. Tanks if help me. | |
Hi I am trying to compile and run my prog3.c program, but I am getting the compiler errors below. I have tried to reference the information by doing #include "node0.c" etc., but no luck. Any ideas on how to fix this problem? I attached the files below that I am … | |
I just dont know where to start on this. Can anyone lend me a hand? 4- Write a Java program to create the following array that hold the salaries of employees: 1550.8 2439.5 1800.75 2890.0 The company wants to give the employees a bonus of 30% of their initial salary, … | |
Hi all, I am looking to pass a javascript array that is created by the user (through checking different boxes and populating the array with id numbers) to a php script which this uses the id's in the array to make url calls. I am having difficulty passing the array … | |
hey people . i have question . i want to create a social engine like facebook but i dont know where to start from and how to do everything so please tell what do i need to create a scoial engine like elgg and if you know a website that … | |
Hi, I'm a newbie to programming in general. I want create two functions to read and write dat from one file to another file. Function read will read dat from file to buffer, and funtion write these data from buffer to another file. These functions work parallel, it means: Function … | |
I have this code in here: [CODE]#include <stdio.h> #include <conio.h> #include <string.h> void array_input(int *a) { int i=0,n,p; printf("How many items you wanna input? : "); scanf("%d", &p); for(n = 0; n <= 99; n++) if(*(a+n) != 0) i++; for(i; i<(i+p); i++) { printf("Enter %d number:",i); scanf("%d", &(*(a+i))); } } … | |
i have the following array: [CODE] int[,] simpleArray =new int[,]{ {1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{1,8},{1,9},{1,10},{1,11} , {2,1}, {2,11}, {3,1}, {3,11}, {4,1}, {4,11}, {5,1}, {5,11}, {6,1}, {6,11}, {7,1}, {7,11}, {8,1}, {8,11}, {9,1}, {9,11}, {10,1}, {10,11}, {11,1},{11,2},{11,3},{11,4},{11,5},{11,6},{11,7},{11,8},{11,9},{11,10},{11,11}, }; for (int i = 0; i < 11; i++) { for (int m = 0; m < 11; … | |
As a beginner of C++, i cannot handle this project smoothly, please correct my code! Write a class of fraction. Your fraction should provide the methods read(), print() and the friend operator +. The read() method will read from the keyboard the integral part, the numerator and the denominator respectively. … | |
Hi, I am creating an order form that brings data of the items and its price from a external .txt file. I am to add the number of items and get the total price of that product. Here is the code: <form action="pay.php" method="post" name="form1"> <?php $lines = file('list.txt'); $fnames … | |
Hi Guys, I just want to ask you if you have any GOOD and EASY to understand Ms Access Tutorial. Since I am new in VB.Net, I would really want to know how to do that. I wish to have a tutorial how to ADD,EDIT,DELETE,VIEW I hope you can give … | |
I'm trying to parse xml file and convert all the unix timestamps in it to datetime... [QUOTE]<Sample> <TimeStamp>1291052077</TimeStamp> blah blah blah blah </Sample> <Sample> <TimeStamp>1291052077</TimeStamp> blah blah blah blah </Sample> </Content>[/QUOTE] [CODE]import fileinput file = raw_input("Enter file: ") file = open(file, "wb+") for line in fileinput.FileInput(file,inplace=1): if "TimeStamp" in line: … | |
need an xslt for a collection control that produces the below: <ul> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> </ul> <ul> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> <li>{quicklink}</li> </ul> The key here is to have a count on the items. After the 7th item, it needs to start … | |
Hi Plz help i'm new i want to edit a record from the database using the html form that comes with the record on the field when i click edit and be able to delete it when i click a delete i want a pop up message to ask if … | |
Hi i am new to java script.In my project i submit the html form for insert some records.i validate form with java script.whenever i click the save button the browser ask to resend or retry.but the records were inserted .i need the page want to refresh automatically without asking resend,retry … | |
Hi, I want to insert a array variable in a another variable. I know how to get it done in php but not in JavaScript. Please advice how should I code the syntax for variable statement ? [CODE] var name[0][0]="tom"; name[0][1]=12; statement="My name is".name[0][0]."and my age is".name[0][1]"; [/CODE] I searched … | |
hello everyone. so im on my second semester of c++ and am having lot of problems as the class begins to involve more and more pointers(:@). we were assigned a program that created a structure for course grades. it was asked that we dynamically allocated an array for the tests … | |
hi, so i've been looking for a string matching algorithm that gives me a "rating" based on how close the 2 strings match.. luckily, i googled and read this article: [URL="http://www.catalysoft.com/articles/strikeamatch.html"]how to strike a match[/URL] here's the original java class code [CODE=java] package strike_a_match; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; … | |
btw any tutorials out there on how to create database with vb.net with mssql just to let me get started, i was hoping for a simple db to practice on like id,name. ive made db with php and mysql but vb.net is a bit far from php and mysql though … | |
What are some practical ways to resolve legacy code in an n-tier architecture where all of the code is written in self-referencing web services? So far, much of the code is undocumented, uses old VB6 conventions, and there are very long procedures. What's the best way to approach, let's say, … | |
I have written a function that calculates an area from coordinated stored in vector arrays: [CODE]void areaCalc(int corners, vector<float> x, vector<float> y, float& area) { float sum=0; for (int i=0; i<=(corners-2); i++) { sum+=(((x[i])*(y[(i+1)]))-((x[(i+1)])*(y[i]))); } sum+=(((x[(corners-1)])*(y[0]))-((x[0])*(y[(corners-1)]))); area=0.5*sum; }[/CODE] The problem is that when I compile it I get this warning … | |
/* I have a problem with my class matran, when I make "(A+B)*(D+E)" it's no result */ /* help me to correct it */ #include<iostream.h> #include<math.h> #include<iomanip.h> using namespace std; class matran { int n,m; double A[20][20]; public: void nhap(); void in(matran); matran operator+(matran); matran operator-(matran); matran operator*(matran); }; //////////////////////////////////////////////////////// … | |
plz.. help me .. how to arrange the set words in aphabetical order in c.its confusing me | |
Hello, First of all, I hope my post isn't breaking any of the forums' rules Here's my code so far [CODE]import java.util.Scanner; /** * * @author user */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner sc = … | |
hi dears i want designing a db.mdf Bank for a website of school that student can see their record (grade) and news of the school on web site. the principal can send email for students and teachers. whether the structure tables are apparopriate? help me in dtermining the types of … | |
I usually make enumerations separate from classes, but when my CS teacher was teaching us about enums, he put it inside the class, and when it came time to set a variable of the enum outside of the class, he told us to just pass a string to the class … | |
The program runs but only switches the player once [CODE]#include <iostream> #include <string> #include <cmath> #include <ctime> #include <cstdlib> using namespace std; class TicTacToe{ public: TicTacToe(void);//constructor void playOneGame(void);//member function void switchPlayer(char &);//member function void showBoard(void);// member function void postMove(int, int, char);// member function char determineWinner(void);// member function private: char Board[3][3]; … | |
Hi Guys, Wanted some help with my code. This should be the OUTPUT. Enter the size of your array: (array size should be 1-100) Enter values of your array: x[0]= (any integer) x[1]= (any integer but not equal to the value of x[0]) x[2]= (any integer but not equal to … | |
how to store checkbox values in database in php | |
[CODE]<?php $con = mysql_connect("localhost","root","" ); mysql_select_db("test",$con); $sql="select image from image"; $res=mysql_query($sql) or die(mysql_error()); $i=1; while($i < mysql_num_rows($res)) { $image_id[$i] = mysql_result($res, $i); echo "<img src=\"".$image_id[$i]."\">"; $i++; } ?> [/CODE] I'm using this code to display the image from mysql but images are shown like this M¢—‡¤6n幆J1³ŒªÌF·æFLùp1 `‘ã:ÃDVNÒ–¢QSgWñg€?´‘íx3²ûEùÝ ô.l%·ËìÈŒÿAzH'óÀËË€XƒÍ«L²GçÚ›9ást¸°äŒëŸ]˜¦21ŒÖ|¸E^®ÏJOXX&æàߣéü6bêæ¬Öò7aúQ¡·÷9;Ó-ˆ )ôdx¹cüÖlÒ'j( q1ÌnéW4Ó÷dÇå©uF … | |
So my teacher wants us to design a short program to add 2 polynomials, asking the user for the degree and coefficients, and print out the new coefficients. ie: poly1 deg=2 coeff= 3 4 5 poly2 deg=2 coeff= 2 5 6 output would be: 5 9 11 however, sometimes one … | |
Hi Guys I am a Computer Science student at University and am looking for some ideas on a project that I have to complete. I have to come up with an hypothetical Software engineering problem in Java , I have to create a bad way of solving it and then … | |
Hello, i am running a site consisting mainly of images . the problem im facing is high traffic loads sometimes from social networks on image links directly like : /i/image_123232.jpg instead of the image page. I have developed teh site in a way to use same image name as teh … | |
could anyone provide code for me how to search data using column name. example: if i have 2 columns called [B]NAME,ID[/B] then i select [B]NAME or ID[/B] and enter the keyword to search. would greatly appreciate your help! | |
I have learn to make website using php and mysql from tutorial book And I have some problem and I don't know how to do with it. :X If anyone know about solution to fix it please help.... Here is my code [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … | |
[B]Hey[/B] I need to store data in a database. I actually don't really need to get data from it. I created a local database in VS2010. With some tables, I added the database as a new data source. Now I'm stuck. I don't know how to insert data to it. … | |
[CODE]<?php require_once('upper.php'); require_once('database.php'); echo $error_msg=''; if(isset($_POST['submit'])) { $LoginId=mysqli_real_escape_string($dbc,trim($_POST['LoginId'])); $Password1=mysqli_real_escape_string($dbc,trim($_POST['Password1'])); $Password2=mysqli_real_escape_string($dbc,trim($_POST['Password2'])); $Name=mysqli_real_escape_string($dbc,trim($_POST['Name'])); $Age=mysqli_real_escape_string($dbc,trim($_POST['Age'])); $BloodGroup=mysqli_real_escape_string($dbc,trim($_POST['BloodGroup'])); if(!isset($_POST['Sex'])) { echo 'Please enter Sex<br>'; } else{ $Sex= mysqli_real_escape_string($dbc,trim($_POST['Sex'])); } $Qualification=mysqli_real_escape_string($dbc,trim($_POST['Qualification'])); $ContactNumber=mysqli_real_escape_string($dbc,trim($_POST['ContactNumber'])); $Email=mysqli_real_escape_string($dbc,trim($_POST['Email'])); $Address=mysqli_real_escape_string($dbc,trim($_POST['Address'])); $AboutYourself=mysqli_real_escape_string($dbc,trim($_POST['AboutYourself'])); //$countCheck=count($_POST['checkbox']); //echo $countCheck; //$checkbox=$_POST['checkbox']; //$countCheck=count($checkbox); if(empty($LoginId)){echo 'Please enter Login Id';} elseif(empty($Password1)){echo 'Please enter Password';} elseif(empty($Password2)){echo 'Please confirm Password';} elseif($Password1!==$Password2){echo 'Password didn't … | |
hi, I am doing an instant chat system using java client and server architecture. currently im implementing the server side of it. my question is: Should i design a gui for the server side as well? if yes what kind of functionality should I include? thanks | |
Dear Experts, good morning, I am working on a project. In which i am unable to send data on a particular ip in 8 bits unsigned integer kindly guide me. I have to send st first 2 bits unsigned integer then 8 bits unsigned integer. e.g. i have to send … |
The End.