eg. what to modify in web.config
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
@{ | |
@* Pagination Logic *@ | |
var postsPerPage = 5; | |
var allPosts = Model.Content.GetPropertyValue<string>("images").Split(','); | |
allPosts.ToList().ForEach(i => i = Umbraco.TypedMedia(i)); | |
var totalPages = Math.Ceiling((double)(allPosts.Count() / (double)postsPerPage)); | |
var currentPageNo = int.Parse(Request.QueryString["p"] ?? "1"); |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Service Moved</title> | |
<style> | |
body { | |
font-family: "Lucida Console", Monaco, monospace; | |
} | |
</style> | |
</head> |
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
// Example. Let's sort the apples, pears, and oranges into the right baskets. | |
const fruits = ["apple", "pear", "apple", "apple", "orange", "pear", "orange", "pear", "apple"] | |
let appleBasket = [] | |
let pearBasket = [] | |
let orangeBasket = [] | |
let strategies = [] | |
const appleSortStrategy = (fruit) => { |
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
// Example of a React state. Manage this with Flux, Redux, black magic, etc... | |
import AccountFields from '../Components/AccountFields' | |
import SurveyFields from '../Components/SurveyFields' | |
import Confirmation from '../Components/Confirmation' | |
let pages = [ | |
{"Title": "Account Fields", "ActiveComponent": React.createFactory(AccountFields) }, | |
{"Title": "Survey Fields", "ActiveComponent": React.createFactory(SurveyFields) }, | |
{"Title": "Confirmation", "ActiveComponent": React.createFactory(Confirmation) } | |
] |
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
// React componey using the strategy pattern instead of switch | |
import React from 'react' | |
const Registration extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { |
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 Autofac; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using Umbraco.Core; | |
using Umbraco.Core.Services; | |
namespace MyApplication |
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 System.Web; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
namespace MyApp.Services | |
{ |
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 Autofac; | |
using Autofac.Integration.Mvc; | |
using Autofac.Integration.WebApi; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using MyApp.Services; | |
using MyApp.Services.Interfaces; |
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 Autofac; | |
using Autofac.Integration.Mvc; | |
using Autofac.Integration.WebApi; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Optimization; | |
using MyApp.Services; | |
using MyApp.Services.Interfaces; |
OlderNewer