578 Topics
| |
I'm trying to figure out the best way to accomplish the computation of weighted averages for my site. Here's the PHP that pulls down the results -- [CODE]$SQL = "SELECT a.*, b.CName, c.Description FROM humidor a LEFT JOIN cigar b on a.CigarID = b.CigarID LEFT JOIN cd_manufacturer c on b.Manufacturer … | |
Hi i am just new to VB.NET and our teacher told us to experiment on for loop in a ODD SUM Program you need to add all odd numbers from Input One to Input Two like that but i can't stop it from adding continuously for example i input the … | |
| How would I do this in 1 line [code] $name = $firstName + " " + $lastName; //output: 0 [/code] the problem is what I think it is, is that its trying to add like mathematics. whilst I want the '+ " " +' to become a space in between … |
Hi all, I'm new to this forum and I am also new to Python and coding in general. While I've gotten through basic tutorials on most general topics of Python such as series, dictionary, parameters, loops, and so forth I am still very much a newbie (as you will see … | |
A little program I made to try and remeber C++, first program I've written in C++ in about a year. Tested and working under windows 7 64 bit, run via command line. If you have any improvements or ideas please leave a comment. Cheers K0ns3rv | |
I have a query which generates a soccer standings table and although it works fine there I am trying to implement a couple of variations on it but everything I have tried has failed. I have searched and asked many times and for both problems and it seems as though … | |
I find C# very well suited for doing math and all sorts of calculations, so here is an example. Just start a Console application and fill in the code. Have fun! The code also shows a use of delegates and some Console functions. If you don't know what the Newton-Raphson … | |
#include<iostream> using namespace std; class polynomial { private: struct p { int degree; float coefficient; p *link; }*head; public: polynomial() { head=NULL; } void getdegree(); void getpolynomial(int d); void display(); void addition(polynomial p1,polynomial p2); }; void polynomial::getdegree() { int degree1; cout<<"\n Enter the highest degree of your polynomial:"; cin>>degree1; getpolynomial(degree1); … | |
hey im new in java. i needto make GUI for my program buh im confused as to what to wirte in GUI codes and wat to write in Main codes etc. could someone plz help me? mathprogram.java main class [CODE]public class mathprogram { public static void main (String[] args){ addition … | |
I've searched a while, can't find this... I'm looking for a way to present two choices for values, then to have a result immediately appear based on those choice. IE... The first choice is an option between 1, 2, 3, 4, or 5 players... and the second choice is an … | |
Explanation: suppose an expression -23+5-9/(5*2) is entered then i want output as Numbers: -23 +5 +9 +5 +2 Operators: + - / * () Is it possible? | |
hi in my text book i have this problem. how to program this [ICODE] Define a class Quadratic_int that stores the coefficients of a quadratic polynomial in a dynamically allocated array of integers. Supply the "big three" memory management functions. Use this class to demonstrate (a) the difference between initialization … | |
I've looked everywhere and tried so many things nothing has worked. My cable is fine, I reinstalled my driver and changed my speed/duplex settings to everything but nothing worked I had AVG AV and I removed it from my computer and also took down my firewalls from windows and still … | |
This I did also after 'spying' discussions in other forum. Of course you would use sieve prime generation for bigger numbers, but I proved other simple way for a change. Slightly more advanced primes list generator would use primes % 6 in (1,5) property: [CODE]def primes(n): """ primitive non-sieve prime … | |
Hey guys! I'm trying to write a program that calculates the area of the convex hull of a set of points in a plane. I can find which points construct the convex hull but calculating the area is a little bit difficult for me. I guess the problem is that … | |
Can you help me with the following Mysql question? I get a table, say, three variables: ID, Date and Value, for example, ID Date Value 1 2001 2 2 2005 3 3 1986 7 4 1985 1 How can I add a variable, sum, to each line, with the condition … | |
This is hopefully example of properly tested code snippet (fingers crossed). | |
I've had an idea for a class that, instead of storing a number as a single floating-point value, stores the exact value as two or more integers (in cases such as division, fractional exponents, or irrational numbers such as pi or e). The class would have it's own mathematical functions … | |
Little clean up of vegaseat's code for generating pi decimals. Added number of decimals desired and string type return for easy use with ''.join() | |
Hi all,, How i can sum all item on listview column. Thank you in advance. | |
Here is function to count the number of elementary events for sum of multiple throws of n-faced dice. | |
I have done some calculations in two textbox data type is double like 9/8 The answer is in point [B]1.125[/B] how can i make it in complete value. like if it is less than .5 it take 1 as complete number. or if the answer is above .5 then it … | |
Hi all, I have been doing for fun this problem in projecteuler.net. The problem is as follows: +++++++++++++++++++++++++++++++++++++++++ Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4. Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6. Peter and … | |
As you folks may know, I love math! I know almost all programming languages, but which one should I use for math. Basically, I want: Easy type conversion I don't care if it is object-oriented or not' Can handle LARGE numbers And speed! I do not need graphical features, just … | |
I have the following trig functions, but I am wondering if there is a faster algorithm that I could implement: [CODE]static const double SINMIN=0.0009999998333333; static const double COSMIN=0.9999995000000417; static const double TANMIN=0.0010000003333334; static const double E=2.718281828459045235360; static const double PI=3.14159265358979323846; static const double MINVAL=0.01; double sin(double ax) { double x=aabs(ax); … | |
Ok so i want to make a program that calculates pi. Ive done that already but it only gives me so many decimal places. I want it to give me tons. Im using Dev C++ if that helps too. Here's my code: [CODE] #include <iostream.h> #include <math.h> int main() { … | |
[CODE]ifndef POLY_H #define POLY_H class Poly { public: Poly() : first(0) { } void addTerm(double coeff, unsigned exponent); // add term (coeff^exponent) to the polynomial; // might just change coefficient of existing term, // or might insert new term; maintains terms // in order from greatest to least exponent private: … | |
Hi all, I am trying to produce a basic till system, and at current am using an ADOquery to bring up the items ordered along with their relevant prices in a DBGrid. What I now need to be able to do is use the price values contained within the DBGrid … | |
So essentially I'm prompting the user for two binary numbers. How can I add these together? I don't know how to get the 0b in front the the original input. If there is an easier way to do it, please let me know. #Prompt the user for two binary numbers … | |
I'm trying to build a mortgage qualifying script for a company. My php code is working fine .. up until the if else statements. fyi I'm using wamp... heres the code. The code if very raw, i've only been working on it for a day or 2, but I can't … |
The End.