Geeks With Blogs

Post Categories

Micah's Blog Another Subtext Powered Blog
I have updated my pythagorean triplets code. private Image GeneratePythagoreanTripleVi... imageSize) { int size = imageSize - 1; int limit = (int)Math.Ceiling(Math.Sqrt... * size * 2)); Func<int, int, int> greatestCommonDivisor = null; greatestCommonDivisor = (x, y) => x % y == 0 ? y : greatestCommonDivisor(y, x % y); Bitmap triplesImage ......

One of the examples for my CHADNUG talk is a function to generate an image that represents Pythagorean triplets. private Image GeneratePythagoreanTripleVi... imageSize) { int size = imageSize - 1; int limit = (int)Math.Ceiling(Math.Sqrt... * size * 2)); Bitmap triplesImage = new Bitmap(imageSize, imageSize); var perfectSquares = from n ......

Every alarm clock I have ever used has had the same mechanism for setting the minutes. You have to press a button to increment the time by one minute. After minute 59 it wraps around to minute 00. To go from 6:45 to 6:30 you have to press the button 45 times. The minute button should work in increments of 5 minutes. To go from 6:45 to 6:30 you would ......

Copyright © Blog Author | Powered by: GeeksWithBlogs.net