-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I would like to pass the parameter values in meters or kilometers (both possible) and get the result in meters/second.
I've tried to do this in the following example:
u = 3.986*10^14 Meter^3/Second^2;
v[r_, a_] := Sqrt[u (2/r - 1/a)];
Convert[r, Meter];
Convert[a, Meter];
If I try to use the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Unless I'm mistaken, creating a function in python works like this
def my_func(param1, param2):
/*stuff*/
However, you don't actually give the types of those parameters. Also, if I remember, python is a strongly typed language, as such, it seams like python shouldn't let you pass in a parameter…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have to define an interface. The API in my homework is stated below:
int generate_codes(char * ssn, char * student_id);
int denotes 0 or 1 for pass or fail.
studentid is an output param should return a 6 digit id.
ssn is a 9 digit input param
they school program will take ssn's and use…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I am a C++ beginner. I have the following code, the reult is not what I expect. The question is why, resp. what is wrong. For sure, the most of you see it at the first glance.
struct Complex {
float imag;
float real;
Complex( float i, float r) {
imag = i;
real = r;
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Very similar to this post
How can I declare template array as a parameter in templated function?
Something like this code:
template <unsigned i> void my_func (char (&a)[i]); //yes, I do need that reference
>>> More