This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading; | |
| namespace ConsoleApplication2 | |
| { | |
| class Program | |
| { | |
| public static void Main() | |
| { | |
| var action = new Action( MethodA).Timed(TimeSpan.FromSeconds(7)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace ConsoleApplication2 | |
| { | |
| class Program | |
| { | |
| private static DateTime _lastInvoke = DateTime.MinValue; | |
| public static void Main() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// | |
| /// IF YOU LOOK HERE AND COMPARE THE 2 OUTPUT I PRINT THERE DIFFERENT BUT LOOKING AT THE FORMULA ON THE PAPER | |
| /// http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3622359/#ref40 IT LOOKS LIKE YOUR VARIABLES ARE IN THE WRONG ORDER | |
| // actual formula from paper : E = DENSITY * Ein + (1 - DENSITY) * Eout | |
| // Ein = reference variance thing where you use 4 | |
| // Eout is the water one which is 80.4 | |
| // these 2 forumlas below will give different results |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Test | |
| { | |
| public int Width { get; set; } | |
| } | |
| public class Test2 | |
| { | |
| private int _width; | |
| public int GetWidth { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace ConsoleApplication2 | |
| { | |
| public sealed class AnonymousObserver<T> : IObserver<T> | |
| { | |
| private readonly Action<T> _onNext; | |
| private readonly Action<Exception> _onError; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Collections.Specialized; | |
| namespace Observables | |
| { | |
| public interface IRepository<T> : ICollection<T>, INotifyCollectionChanged | |
| { | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps to build | |
| 1. download VS2013 3rd Party full or small for OSG from OSG's website (http://www.openscenegraph.org/index.php/download-section/dependencies) | |
| 2. download OSG's source (https://github.com/openscenegraph/osg) | |
| 3. download OsgEarth source (https://github.com/gwaldron/osgearth) | |
| 4. extract them all and setup directory structure as such (you can change this setup by modifying the envvars, but this is the default way) | |
| - osgEarthinstallfolder | |
| -- 3rdParty_x86_x64 | |
| -- osg | |
| -- osgearth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <osgViewer\Viewer> | |
| #include <osgEarthDrivers\gdal\GDALOptions> | |
| #include <osgEarth\ImageLayer> | |
| #include <osgEarth\MapNode> | |
| #include <osgEarthUtil\EarthManipulator> | |
| #include <iostream> | |
| #include <osg\ShapeDrawable> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Xunit; | |
| namespace _2015_08_03_E_Adding_Fractions.Intermediate | |
| { | |
| public class C229ReverseFizzBuzz | |
| { | |
| public class Key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Fixed point of f(x) = cos(x) where x = 3.00 | |
| count input output difference | |
| 1 3.000000 -0.989992 3.989993 | |
| 2 -0.989992 0.548696 1.538689 | |
| 3 0.548696 0.853205 0.304509 | |
| 4 0.853205 0.657572 0.195634 | |
| 5 0.657572 0.791479 0.133907 | |
| 6 0.791479 0.702794 0.088685 | |
| 7 0.702794 0.763039 0.060245 | |
| 8 0.763039 0.722739 0.040300 |