Hi, I'm using this SQL statement to retrieve Value and Date which will then be plotted on a graph: SELECT DISTINCT assets.SEDOL,assets.Quantity,stock_names.value,stock_names.Fileid,date_header.dateid FROM assets,stock_names,date_header WHERE assets.Client_ref = '$clientref' AND stock_names.SEDOL = assets.SEDOL AND date_header.fileid = stock_names.fileid I'm also selecting Quantity. Instead of having to multiply out the arrays, how can I multiply value and quantity inside the SQL statement and then just return Value (multiplied by quantity)?

Member Avatar
Member Avatar
+0 forum 2

Hello, I am new to using windows form application in c++ and i am having a problem with making my program work. I have three textBars and one button. The first textBar is for the user to input a double. When the button is pressed i want it to perform the mathmatical task: textBox1 * 150 / 60, and show the results in textBox2. Then, textBox2 * 20 / 60 results in textBox3. All with the one button click.

Member Avatar
Member Avatar
+0 forum 4

I'm writing this program to calculate the best fit line. It's not finished. I'm doing it step to step to make sure it runs so I don't get lots of errors and totally freak out at the end. Right now it runs fine, but something is really off with the calculations I have so far. The loop for the input works great, but the averages are really wrong, and the for the sum of squares calculation it is only calculating the square of the last value. Where am I going wrong? [CODE]#include <iostream> #include <cmath> using namespace std; double avg(double[], …

Member Avatar
Member Avatar
+0 forum 9

I wrote this code for an assignment that asked to create a program that calculates and displays the average of any amount of real numbers. The program is supposed to ask the user how many numbers they want to enter and then use a loop to ask the user to enter a number, keeping track of the sum as they are entered, and then calculating the average. I have it somewhat ok, until the end where it's supposed to give the average. I tried a couple things but none of them gave me the right answer. I don't think I'm …

Member Avatar
Member Avatar
+0 forum 8

I'm writing some while loops but I feel like there is a better way to write them. [CODE]int i=3; while (i<31) { cout << i << " "; i+=3; } //this one is for the first 10 terms of a sequence starting with 3 and adding 3 each time. int i=2; while (i<50000) { cout << i << " "; i*=2; } //this one is the first 15 terms starting at 2 and doubling each one.[/CODE] Is there some way to let the program know how many variables to show without figuring out how far it has to go? Also, …

Member Avatar
Member Avatar
+0 forum 5

Hi to all, I am new to this forum..If i did any thing wrong in this thread please correct me... Let me tell you something about my project .... I am working on ARM7-LPC2148 processor with Graphical LCD. Now i am making a calculator which should be like as our PC calculator... I did in a normal way this calculations that means The steps involved in my calculator are... 1. Taking input numbers as strings 2. converting them to float values by using [B]atof()[/B] function which is having a limitation to return floating value. 3. Doing all calculations in a …

Member Avatar
Member Avatar
+0 forum 4

Hi Friends I am using dynamic text box, i want to calculate the amount from value of rate in the text box and qty Pls help me how to solve it... [CODE]<?php include("config.php"); ?> <script type=text/javascript> function multiply(){ a = document.getElementById("rate").value; b = document.getElementById("qty").value; c = a*b; amt = alert(c); } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="" method="get" name="test"> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center">S.No</td> <td align="center">Item Name</td> <td align="center">Item Code</td> <td height="30" align="center">Rate</td> <td align="center">QTY</td> <td align="center">Amount</td> </tr> <tr> <?php …

Member Avatar
Member Avatar
+0 forum 5

I've spent the last hour trying to figure out why my calculations are not adding up. Once i run the program it just output 0 for the total points program averages and etc and it also leaves student name blank. Can someone please help me figure out the issue. thanks //Preprocessor Directives #include<iostream> #include<iomanip> #include<fstream> #include<conio.h> using namespace std; //Global variables, constants, AND function prototypes void headerfn(void); void getName(string firstName, string lastName); string firstName, lastName; int score (int firstProgramGrade, int secondProgramGrade, int thirdProgramGrade, int firstTestGrade, int secondTestGrade, int thirdTestGrade); int firstProgramGrade, secondProgramGrade, thirdProgramGrade, firstTestGrade, secondTestGrade, thirdTestGrade; void outputfn (string firstName, …

Member Avatar
Member Avatar
+0 forum 1

I have so much trouble in making this thing work. This is what i supposed to do: 1.build program to make histogram 2.The program should also calculate average and median. 3.The array should come from the text file. The problem is..i can build the histogram..but i have problem to get the file from the text file and use it to count an average and median. could someone help me on this?? this is the code that i already make:[CODE]#include <stdio.h> #include <stdlib.h> #define MAX_ELMNTS 51 #define ANLYS_RNG 101 //function Declaration int getData (int numbers[], int size, int range); void printData …

Member Avatar
Member Avatar
+0 forum 5

I have a database that is filled with time series data points on different items. I would like to calculate the difference between values by item for the time series and then store it in a difference column. My table is as follows: id | Ticker | Date | SO | difference 1 | QQQQ | 2011-01-03 | 200000 | 0 2 | QQQQ | 2011-01-04 | 200100 | 100 3 | QQQQ | 2011-01-05 | 201000 | 900 4 | PWC | 2011-01-03 | 180000 | 0 5 | PWC | 2011-01-04 | 180500 | 500 6 | PWC …

Member Avatar
Member Avatar
+0 forum 5

Hello, I was hoping somebody could help me. I have an estimator on a page that calculates cost. Its in a form and I Post action to pricing.php. On pricing.php I display line by line cost for the user. What I would like to do is once the user is viewing pricing.php and viewing his estimate. If they like they would like to send me the estimate along with their contact information then they could fill out another form in pricing.php and have emailed to me. I really dont want to use mysql for this because I really have no …

Member Avatar
Member Avatar
+0 forum 4

The End.