Program X is GPL'd. You want to modify it but don't want to release your modifications. Slightly modify the source of X so that it can dynamically load foreign executable code. Have it load your proprietary additions.
Release the source of your Program X fork as GPL, but do not reveal the source of your proprietary additions.
Name:
Anonymous2012-11-11 13:23
Can someone convert this python code into C++ please?
#!/usr/bin/python
# find the number of ways to reach a total with the given number of combinations
def count_combs(left, i, comb, add):
if add: comb.append(add)
if left == 0 or (i+1) == len(denominations):
if (i+1) == len(denominations) and left > 0:
comb.append( (left, denominations[i]) )
i += 1
while i < len(denominations):
comb.append( (0, denominations[i]) )
i += 1
print " ".join("%d %s" % (n,names[c]) for (n,c) in comb)
return 1
cur = denominations[i]
return sum(count_combs(left-x*cur, i+1, comb[:], (x,cur)) for x in range(0, int(left/cur)+1))