300 Topics

Member Avatar for
Member Avatar for bluem1

Team - I hope you can give me a hand here. I am working on a shopping cart type site which displays products in a datalist. I need to find a way to add up all the products and place that total in a label outside of the datalist. Also, …

Member Avatar for kvprajapati
0
111
Member Avatar for ninikobb

Hello everybody! Im a new to this site. I wonder how can I get the row dimension of a matrix. For example i have a matrix double[n,m] and i want to get n provided m is unknown. So what property of method should i use??? Thank you

Member Avatar for ddanbe
0
117
Member Avatar for TrustyTony

With this code you can explore the functions of math module interactively seeing the docstrings automatically for each function. EDIT: The docstring was unfortunately from old code, this version copes with values like 'e' and multiple parameter functions.

Member Avatar for TrustyTony
0
217
Member Avatar for fereak

Hey, I'm a student, doing VB at college. I've been trying to make a program to compute Pi, and am making good progress, I think I know what to do. However, part of the algorithm requires me to cube a number. The way I'm doing it is having stored the …

Member Avatar for fereak
0
179
Member Avatar for rokape

Hi Guys, As the title says really... Sounds simple, it is. But....! I'm dealing with huge numbers here. I'm dragging bandwidth from a logging system I am developing for a client and it returns it in BYTES... Very accurate :| This is the sort of number I'm dealing with here... …

Member Avatar for rokape
0
2K
Member Avatar for TrustyTony

Here another small snippet of mathematical nature returning all possible divisors of number. (set is, by the way, needed because of perfect squares Not possible to edit the snippet part but here the same with less stupid command line interface (not repeating the loop): [CODE]def divides(n): return sorted(set(sum( ([x,n/x] for …

Member Avatar for TrustyTony
1
813
Member Avatar for Seagull One

I've been working hard all day to get this to work. I'm playing around with the math module in python. I eventually want the following code to help me control the speed of a servo motor. The idea is to get the servo speed to accelerate and then decelerate as …

Member Avatar for woooee
0
189
Member Avatar for ChaosKnight11

So I started to work on my last Computer Science project for the school year, a maths tutorial application. I'm a bit stuck with displaying a form to explain a mathematical concept. I decided to make a dynamic form on run-time for each grade which then contains all the available …

Member Avatar for pritaeas
0
135
Member Avatar for ryan400

Here is my code, for some reason it goes to an infinite loop when i try and adjust the highest and lowest values for the Math.Random() method. The code works fine if i do not try to change those values based on if the guess was higher or lower than …

Member Avatar for ryan400
0
1K
Member Avatar for giftalp

I have created class menu and class number. I would like that my functions in class do sum, subtract, multiply, and divide. I've done sum, but I have problems with other functions. When I do difference, it is actually sum my numbers, and result of multiplication and division is 0 …

Member Avatar for giftalp
0
191
Member Avatar for tKc

I am trying to learn parameters by reference. In my code i try to compute the sum between 1 and n. This is what i got so far and if i input 5 it outputs a extremely high number. Any suggestions? [CODE] #include <iostream> #include <cmath> using namespace std; void …

Member Avatar for csurfer
0
131
Member Avatar for kirennian

I'm currently having an issue with moving the camera around the z-axis (roll). For debugging purposes, I have an object with which I've tested with all 3-axis rotation and movement and it's working as expected; the object in question as well as the camera class superseed a positions class for …

Member Avatar for dineshguru
0
989
Member Avatar for raheel_88

I'm having trouble with a for loop! I'm trying to solve a differential equation using Euler's method like so; [TEX]\displaystyle\frac{dy}{dx} = 7{y^2}cos(y^2)-3e^{xy}, \ \ \ 0 \leq x \leq 1 \ \ \ y(0) = 0[/TEX] This is solved using the algorithm [TEX]y_{n+1} = y_n + hf(x_n , y_n)[/TEX] Where …

Member Avatar for Unimportant
0
826
Member Avatar for mikaandy83

how can i find value of Acos without using math library of c#??i have serch for more time in the web!thank you

Member Avatar for Momerath
-1
184
Member Avatar for hoganmadman

the basic idea of what im trying to do is write a program that reads an arbitrary number of integers less than 20. then it prints out the position of the integer in the order the user inputed it then it finds the sum when it scans a non integer …

Member Avatar for hoganmadman
1
137
Member Avatar for madawa123

Hi guys, I hv the two coordinates of the map. Top left : 37 44 55.49S 144 52 30.73E bottom right: 37 47 54.43S 144 57 59.54E my map is a rectangle with 500width 800height. I want to get the mouse pointer in terms of lat long in degrees and …

Member Avatar for peter_budo
0
4K
Member Avatar for peterman.k

Okay, so I have created and array of a maximum degree, which the user defines, and then inputs their own coefficients according to the size of the polynomial. For example, I ask for degree, they type 2, and then input 1,3 and 5 to create a polynomial: 1 + 3x …

Member Avatar for peterman.k
0
256
Member Avatar for madawa123

hey guys, How to convert the lat/long (in decimal) to x,y pixel. my map has a height and width of 800,500 thnx regards, Nishan

Member Avatar for NormR1
0
478
Member Avatar for msrd

Hi all, I'm fairly new to VB. I'm working on a Windows forms app that will average a set of numbers, the only catch is that there are 10 textboxes(4 in the example for times sake), and not all of the textboxes could be filled with a number... I know …

Member Avatar for msrd
0
93
Member Avatar for Hawkeye Python

When realising the following operation: [CODE]do = 1.0 - 2.718281828**(-(23**2)/730) print do[/CODE] Python returns 0.632120558766 When you do it on the calculator or when google it, it returns 0.515509538 :-O

Member Avatar for vegaseat
0
255
Member Avatar for watz_uph

hi all, i have a little issue with SUM query from this table UNIQUEID Date Production engine1 01/12/1999 1440 engine1 01/01/2000 6061 engine1 01/02/2000 5152 engine1 01/03/2000 5347 engine1 01/04/2000 4642 engine1 01/05/2000 5264 engine1 01/06/2000 5247 engine2 01/07/1995 561 engine2 01/08/1995 3066 engine2 01/09/1995 2133 engine2 01/10/1995 2282 engine2 …

Member Avatar for watz_uph
0
127
Member Avatar for DeIntegro

Say 3 integers are giving: 3, 4, 16 how does one go about writing a program to find the least common denominator? greatest common divisor? etc.. I was wondering if there is a way to use the multiples and then select the number that matches up, in this case 48 …

Member Avatar for coil
0
614
Member Avatar for ankilosado

I have writen a code for adding (math +) two arrays. Actually, I have two arrays of a class I have also designed, that has two attributess, one of wich is an integer. I would like to sum (add element by element) one array on the other by adding the …

Member Avatar for ankilosado
0
177
Member Avatar for NH1

What if the number i want to round is a decimal.? [code=c] /// <summary> /// Rounds a number to the closest multiple of another number. /// </summary> /// <example>83 rounded to closest 25 would give a value of 75 (83 is closer to 75 than 100)</example> /// <param name="num">The number …

Member Avatar for jbisono
0
169
Member Avatar for jeffsbaker

Does anyone know why the following subquery is using filesort and scanning all rows in the table according to EXPLAIN? I am trying to get the total of the top ten scores and the result is fine. [CODE]EXPLAIN SELECT SUM( score ) AS top10_total FROM ( SELECT score FROM answers …

Member Avatar for tesuji
0
1K
Member Avatar for nekogda

Here's a simple question. Need: => to use scipy special package function in my python prog (python2.6). 1. Downloaded & intalled numpy for python2.6 2. Downloaded & intalled scipy (scipy-0.8.0-win32-superpack-python2.6.exe) tested: import numpy import scipy - everything's ok According to scipy docs, a package needs to be loaded before a …

Member Avatar for nekogda
0
208
Member Avatar for lukefuller

Hi All, I have been pulling my hair out over this one. What we are trying to do is pull sum values for the same item out of three different tables in the same DB (MSSQL '05) – Should be quite straight forward however... The result should look a bit …

Member Avatar for tesuji
0
156
Member Avatar for AkashL

I have heard you can efficiently use your GPU to do fast floating point calculations. This can be done using OpenGL but you may have to use the library in an unorthodox way or graphics card toolkits such as CUDA (by nVidia) which I guess is Graphics card specific. Does …

Member Avatar for 0x69
0
153
Member Avatar for AkashL

I have heard you can efficiently use your GPU to do fast floating point calculations. This can be done using OpenGL but you may have to use the library in an unorthodox way or graphics card toolkits such as CUDA (by nVidia) which I guess is Graphics card specific. Does …

0
110
Member Avatar for crapgarden

[COLOR="Red"]3.2 - Defining and Differentiating Computation. [] vs ()[/COLOR] I'm trying to get a solid fix on how math computations work in C++ and how to declare their order, in particular with respect to ( ) operators. this adds to an array: [CODE] inventory[numItems++] = "armor".[/CODE] why don't I need …

Member Avatar for crapgarden
0
126

The End.