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.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Ink; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; | |
using System.Windows.Shapes; |
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; | |
using System.Text; | |
namespace Algorithms | |
{ | |
/// <summary> | |
/// Calculating longest sequence using Patience Sort. See here http://wordaligned.org/articles/patience-sort | |
/// </summary> |
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 account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString"); | |
var blobs = account.CreateCloudBlobClient(); | |
var existingprops = blobs.GetServiceProperties(); | |
blobs.SetServiceProperties(new Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties() | |
{ | |
DefaultServiceVersion = "2011-08-18", | |
Logging=existingprops.Logging, | |
Metrics=existingprops.Metrics, | |
}); |
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
private void RegisterIOC() | |
{ | |
var builder = new ContainerBuilder(); | |
builder.RegisterControllers(typeof(MvcApplication).Assembly); | |
builder.RegisterApiControllers(typeof(MvcApplication).Assembly); | |
AutofacBootstrap.Init(builder); | |
var container = builder.Build(); | |
DependencyResolver.SetResolver(new AutofacDependencyResolver(container)); | |
GlobalConfiguration.Configuration.DependencyResolver = new Autofac.Integration.WebApi.AutofacWebApiDependencyResolver(container); | |
} |
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
public class AutofacBootstrap | |
{ | |
internal static void Init(ContainerBuilder builder) | |
{ | |
} | |
} |
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
function SomeCtrl($scope) { | |
$scope.countries = ['can', 'usa', 'fra', 'jap']; | |
$scope.user = {name: "Evil Trout"}; | |
$scope.age = 34; | |
// Our template now can render {{age}}, {{user.name}} and a list of countries! | |
} |
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
<div id='userData'> | |
<div id='sectionParticulars' ng-include="'particularsTemplate'" ng-init='model=model'></div> | |
<div id='sectionAddress' ng-include="'addressTemplate'" ng-init='model=model.address'></div> | |
<div id='sectionDepedents' ng-include="'dependentTemplate'" ng-init='model=model.dependents'></div> | |
</div> | |
<script type="text/ng-template" class="template" id="particularsTemplate"> | |
<!-- HTML related to user particulars--> | |
</script> |
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
.directive('myDirective', function () { | |
return { | |
restrict: 'E', | |
scope: { | |
model: '=' | |
}, | |
// The linking function will add behavior to the template | |
link: function (scope, element, attrs) { | |
} | |
}; |
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
<location path="signin-google"> | |
<system.web> | |
<authorization> | |
<allow users="*" /> | |
</authorization> | |
</system.web> | |
</location> |
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
$scope.foo = $http({method: 'GET', url: '/someUrl'}); | |
<!--In HTML this works--> | |
<div>{{foo}}</div> |
OlderNewer