Skip to content

Instantly share code, notes, and snippets.

function solve() {
return function (selector) {
var selectedList = $(selector);
selectedList.hide();
var childrenSelectedList = selectedList.children();
var numberOfChildren = childrenSelectedList.length;
var defaultText = 'Select value';
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Notifier
{
public class Person : INotifyPropertyChanged
app.UseLinkedInAuthentication(new LinkedInAuthenticationOptions
{
ClientId = ConfigHelper.GetValue("LinkedInClientId"),
ClientSecret = ConfigHelper.GetValue("LinkedInClientSecret"),
CallbackPath = new PathString("/umbraco/surface/UmbracoIdentityAccount/ExternalLoginCallback/")
});
@MichaelaIvanova
MichaelaIvanova / Bootstrapper.cs
Created April 27, 2017 08:39 — forked from mortenbock/Bootstrapper.cs
MiniProfiler.UmbracoMvc proof of concept. Blogpost here: http://www.mortenbock.dk/post/Profiling-MVC-views-in-Umbraco-6
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Web.Mvc;
namespace UmbMvcMiniProfiler
{
public class Bootstrapper : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
public class CustomEventHandler : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RenderViewEngine());
}
}
}
@MichaelaIvanova
MichaelaIvanova / XMLSitemap.cshtml
Created June 21, 2017 08:20 — forked from alindgren/XMLSitemap.cshtml
XML sitemap for Umbraco 7 (based on Cultiv Search Engine Sitemap package). See http://www.alexlindgren.com/archive/dynamically-generated-xml-sitemaps-with-umbraco-7/
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using System.Linq;
@{
Layout = null;
Response.ContentType = "text/xml";
}<?xml version='1.0' encoding='UTF-8' ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
@ListChildNodes(Umbraco.TypedContent(UmbracoContext.Current.PageId).AncestorOrSelf(1))
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace algos
{
class Program
{
static void Main(string[] args)
{
int[] input = new int[] {3, 8, 9, 7, 6};
int k = 3;
solution(input, k);
}
public static int[] solution(int[] input, int times)
{
var r = new int[input.Length];
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace algos
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace algos
{
class Program
{