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.Windows.Forms; | |
| namespace WindowsFormsApplication1 | |
| { | |
| public partial class Form1 : Form | |
| { | |
| public Form1() | |
| { | |
| InitializeComponent(); | |
| comboBox1.DisplayMember = "Value"; |
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
| Real: 00:00:00.026, CPU: 00:00:00.026, GC gen0: 1, gen1: 0 | |
| val findSeq : int list list = | |
| [[1; 2; 3; -4; 5; 6; 78; 9]; [1; 2; 34; -5; 67; -8; 9]; | |
| [1; 23; -4; 5; 6; 78; -9]; [1; 23; -4; 56; 7; 8; 9]; | |
| [12; 3; 4; 5; -6; -7; 89]; [12; 3; -4; 5; 67; 8; 9]; | |
| [12; -3; -4; 5; -6; 7; 89]; [123; 4; -5; 67; -89]; | |
| [123; -4; -5; -6; -7; 8; -9]; [123; 45; -67; 8; -9]; [123; -45; -67; 89]] |
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
| #time "on" | |
| let findSeq = | |
| let rec find n s = | |
| match s |> List.map(fun t -> (abs t).ToString().ToCharArray()) |> Array.concat |> Array.length with | |
| |9 -> [s |> List.rev] | |
| |x -> let ones = | |
| match x with | |
| |x when x > 1 -> find (n + 1) (n::s) @ find (n + 1) (-n::s) | |
| |_ -> find (n + 1) (n::s) | |
| let twos = |
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; | |
| using System.Collections.Specialized; | |
| using System.Linq; | |
| using Cirrious.CrossCore.Core; | |
| using Cirrious.CrossCore.WeakSubscription; | |
| using Cirrious.MvvmCross.Binding.Attributes; | |
| using Cirrious.MvvmCross.Binding.BindingContext; | |
| using Cirrious.MvvmCross.Binding.ExtensionMethods; | |
| using MonoMac.AppKit; |
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 MonoMac.AppKit; | |
| using MonoMac.Foundation; | |
| namespace CentraStage.Mac | |
| { | |
| [Register("CsTableColumn")] | |
| public class CsTableColumn : NSTableColumn | |
| { | |
| #region Constructors |
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 Cirrious.CrossCore.Core; | |
| using Cirrious.MvvmCross.Binding.BindingContext; | |
| using MonoMac.AppKit; | |
| using MonoMac.Foundation; | |
| namespace CentraStage.Mac | |
| { | |
| [Register("CsTableCellView")] | |
| public class CsTableCellView : NSTableCellView, IMvxBindingContextOwner, IMvxDataConsumer |
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
| var source = new CsTableViewSource (myNSTableView); | |
| var binding = this.CreateBindingSet<TaskManagerViewController, TaskManagerVM> (); | |
| binding.Bind (source).For ((s) => s.ItemsSource).To ((vm) => vm.MyEnumerable); | |
| binding.Apply (); | |
| myNSTableView.Source = source; |
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
| [Test( Description="Should Login OK" )] | |
| public async void OK () | |
| { | |
| var loginSession = LoginSession.Instance; | |
| await loginSession.Login ("user", "password"); | |
| Assert.True (LoginSession.Instance.LoggedIn); | |
| } |
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
| class IPhoneViewPresenter : MvxModalNavSupportTouchViewPresenter | |
| { | |
| public IPhoneViewPresenter (UIApplicationDelegate applicationDelegate, UIWindow window) | |
| :base(applicationDelegate, window) | |
| { | |
| } | |
| HomeView homeView; | |
| protected override UIViewController CurrentTopViewController |
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 static class Extensions | |
| { | |
| public static IEnumerable<T> GetEnumerable<T>(this Java.Util.IEnumeration enumeration) where T : class | |
| { | |
| while (enumeration.HasMoreElements) | |
| yield return enumeration.NextElement() as T; | |
| } | |
| } |
NewerOlder