578 Topics

Member Avatar for
Member Avatar for jrotunda85

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 …

Member Avatar for jrotunda85
0
114
Member Avatar for vijaybrar

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 …

Member Avatar for adam_k
0
236
Member Avatar for Aardwolf

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 …

Member Avatar for karthik_ppts
0
129
Member Avatar for shurshot

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 …

Member Avatar for TrustyTony
0
343
Member Avatar for K0ns3rv

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

Member Avatar for mrnutty
1
321
Member Avatar for MargateSteve

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 …

Member Avatar for urtrivedi
1
312
Member Avatar for ddanbe

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 …

0
3K
Member Avatar for arunkumar267

#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); …

Member Avatar for arunkumar267
0
281
Member Avatar for BOOMBOOMF

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 …

Member Avatar for mKorbel
0
339
Member Avatar for jonsan32

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 …

Member Avatar for jonsan32
0
223
Member Avatar for enakta13

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?

Member Avatar for enakta13
0
170
Member Avatar for iamuser_2007

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 …

Member Avatar for sergent
-2
189
Member Avatar for AfghanTea

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 …

Member Avatar for predator78
0
312
Member Avatar for TrustyTony

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 …

Member Avatar for TrustyTony
0
725
Member Avatar for nightbreed

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 …

Member Avatar for nightbreed
0
1K
Member Avatar for laokn

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 …

Member Avatar for pratik_garg
0
210
Member Avatar for TrustyTony
Member Avatar for raptr_dflo
0
1K
Member Avatar for tboz203

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 …

Member Avatar for JamesCherrill
0
187
Member Avatar for TrustyTony

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()

Member Avatar for TrustyTony
1
615
Member Avatar for Jade_me
Member Avatar for TrustyTony
Member Avatar for TrustyTony
1
262
Member Avatar for virusisfound

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 …

Member Avatar for virusisfound
0
137
Member Avatar for tikoti

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 …

Member Avatar for TrustyTony
0
511
Member Avatar for Romil797

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 …

Member Avatar for TrustyTony
0
519
Member Avatar for Labdabeta

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); …

Member Avatar for mrnutty
0
632
Member Avatar for penguino138

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() { …

Member Avatar for Derek Elensar
0
902
Member Avatar for manny23

[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: …

Member Avatar for mrnutty
0
139
Member Avatar for ztparker

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 …

Member Avatar for PlotHost
0
134
Member Avatar for NumeroUno123

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 …

Member Avatar for britanicus
0
160
Member Avatar for RazorRamon

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 …

Member Avatar for Insensus
0
180

The End.