-
as seen on Stack Overflow
- Search for 'Stack Overflow'
i have this huge function and i am wondering how to make it recursive. i have the base case which should never come true, so it should always go to else and keep calling itself with the variable t increases. any help would be great
thanks
def draw(x, y, t, planets):
if 'Satellites' in planets["Moon"]:
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to calculate the sunset / rise times using python based on the link provided below.
My results done through excel and python do not match the real values. Any ideas on what I could be doing wrong?
My Excel sheet can be found under .. http://transpotools.com/sun_time.xls
# Created on…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi Guys,
I'm constructing a geolocation based application and I'm trying to figure out a way to make my application realise when a user is facing the direction of the given location (a particular long / lat co-ord). I've got the math figured, I just have the triangle to construct.
//UPDATE
So…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
so I'm trying to make a program that will output the sum, average, and smallest and largest values. I have everything basically figured out except the smallest and largest values are outputting 2147483647 and -2147483647, which I believe are the absolute smallest and largest values that Java will…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've heard many times that all programming is really a subset of math. Some suggest that OO, at its roots, is mathematically based. I don't get the connection. Aside from some obvious examples:
using induction to prove a recursive algorithm
formal correctness proofs
functional languages
lambda calculus
asymptotic…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I wrote a program (on my TI-84 calculator) to satisfy the following exercise:
Write a program that will print all solutions of the inequality ax + b < c, where a, b, and c are entered by the user. In this program the domain of x will be a set of consecutive integers, where the smallest and largest…
>>> More
-
as seen on Geeks with Blogs
- Search for 'Geeks with Blogs'
Lately, I exchanged some arguments with Derick Bailey about some details of the red-green-refactor cycle of the Test-driven development process. In short, the issue revolved around the fact that it’s not enough to have a test red or green, but it’s also important to have it red or green for the right…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
Im getting the error
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1
and when the full log is opened, the error is more accurately listed as:
collect2: ld returned 1 exit status
from this simple Cocoa script:
#import "Controller.h"
@implementation Controller
int skillcheck…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have researched my issue all over StackOverflow and multi-google links, and I am still confused. I figured the best thing for me is ask...
Im creating a simple command line calculator. Here is my code so far:
const std::string Calculator::SIN("sin");
const std::string Calculator::COS("cos");…
>>> More
-
as seen on Super User
- Search for 'Super User'
Hi, I'm looking for a light, fast hash/checksum calculator (eg. MD5, SHA1, etc.). I've been using HashCalc and it works fine enough, but I was wondering if there was something better. When downloading .ISOs from MS BizSpark, I've found that it's essential to check the SHA1, and I'm sure that other…
>>> More