Factorials, Permutations, Combinations
5
That is, after two starting values, each number is the sum of the two preceding numbers. The first Fibonacci numbers , also denoted as Fn, for n = 0, 1, … , are:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811…
this is One line function to get the sequance.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811…
this is One line function to get the sequance.
3
A simple, flexible formula for generating diminishing returns out of input numbers. Full explanation and home, with sample calculators and versions of the code in other languages, on the Lost Souls MUD Grimoire.
7
fracturedpsyche
Three little functions to return the Windows Identity, The Envoronment Identoty and the Environment Domain.
7
fracturedpsyche
This class allows the developer to change the current impersonated user. This is not my code originally, so I cannot take credit for it. I thought it may be useful to someone so I am posting it here.
10
This is snippet of code solves the interesting (and specialized) problem of generating all permutations of a list. I hope you like recursion.
For exmaple:
permute( [0,1,2] )
would return
[[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]]
For exmaple:permute( [0,1,2] )
would return
[[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]]
5
Returns a percentage. There are 3 arguments.
1. complete - How much is done?
2. total - How much is there?
3. maxPercentage - Total percentage possible, usually 100.
Simple, yep.
1. complete - How much is done?
2. total - How much is there?
3. maxPercentage - Total percentage possible, usually 100.
Simple, yep.
-8
Databinding in asp.net 2.0 is takes very few lines of code.
-7
Databinding in asp.net 2.0 takes very few lines of code. This example shows how to bind a CheckBoxList using a SqlDataSource.
5
A while back ago I wrote this in a simple program I wrote.
Unfortunately, it only reduces proper fractions. If someone wants to rewrite it and make it work with inproper fractions that would be awesome!
Unfortunately, it only reduces proper fractions. If someone wants to rewrite it and make it work with inproper fractions that would be awesome!









