This file contains 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
import { Component } from '@angular/core'; | |
import { async, TestBed } from '@angular/core/testing'; | |
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; | |
import { By } from '@angular/platform-browser'; | |
import { SyncControlDirective } from './sync-control.directive'; | |
class FormGroupHostComponent { | |
formGroup = new FormGroup({ | |
ctrl: new FormControl('') | |
}); |
This file contains 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
import { | |
Directive, | |
EventEmitter, | |
InjectFlags, | |
Injector, | |
OnDestroy, | |
OnInit, | |
Type | |
} from '@angular/core'; | |
import { AbstractControl, FormControlDirective, FormControlName } from '@angular/forms'; |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:GridSample" | |
x:Class="GridSample.GridSamplePage"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<Style x:Key="headerTablet" TargetType="Label"> | |
<Setter Property="TextColor" Value="White" /> | |
<Setter Property="FontAttributes" Value="Bold" /> |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:GridSample" | |
x:Class="GridSample.GridSamplePage"> | |
<Grid Padding="20" VerticalOptions="CenterAndExpand"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="40" /> | |
<RowDefinition Height="40" /> |
This file contains 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.Expressions; | |
using System.Reflection; | |
namespace MiscUtil.Reflection | |
{ | |
/// <summary> | |
/// Non-generic class allowing properties to be copied from one instance | |
/// to another existing instance of a potentially different type. |
This file contains 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 keyMatch = function(o,r){ | |
var c = 0; | |
var nO = {}; | |
Object.keys(o).forEach(function(k){ | |
c++; | |
no[k] = k.match(r) ? o[k] : void 0; | |
}); |
This file contains 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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |