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 interface IRepository<T> : IDisposable where T : class | |
{ | |
IQueryable<T> All(); | |
bool Any(Expression<Func<T, bool>> predicate); | |
int Count { get; } | |
T Create(T t); |
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 MyImageHandler : IHttpHandler | |
{ | |
public book IsReusable | |
{ | |
get { return false; } | |
} | |
public void ProcessRequest(HttpContext context) | |
{ | |
// here you will set the MIME type for response |
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
<configuration> | |
<system.WebServer> | |
<handlers> | |
<add verb="*" path=".jpg" type="MyImageHandler" name="MyImageHandler"/> | |
</handlers> | |
</system.WebServer> | |
</configuration> |
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.Web; | |
using System.Diagnostics; | |
public class LogModule : IHttpModule { | |
public LogModule(){ | |
//constructor | |
} |
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
<configuration> | |
<system.WebServer> | |
<modules> | |
<add name="LogModule" type="LogModule"/> | |
</modules> | |
</system.WebServer> | |
</configuration> |
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
@functions { | |
// To support the layout classifaction below. Implementing as a razor function because we can, could otherwise be a Func<string[], string, string> in the code block following. | |
string CalcuClassify(string[] zoneNames, string classNamePrefix) { | |
var zoneCounter = 0; | |
var zoneNumsFilled = string.Join("", zoneNames.Select(zoneName => { ++zoneCounter; return Model[zoneName] != null ? zoneCounter.ToString() : "";}).ToArray()); | |
return HasText(zoneNumsFilled) ? classNamePrefix + zoneNumsFilled : ""; | |
} | |
} | |
@{ | |
/* Global includes for the theme |
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
$("#submit").click(function() { | |
if (document.getElementById("email").value.length === 0) { | |
alert("please enter your email address"); | |
return false; | |
} else if (document.getElementById("name").value.length === 0) { | |
alert("please enter your name"); | |
return false; | |
} else if (document.getElementById("MobilePhone").value.length === 0) { | |
alert("please enter your mobile number"); | |
return false; |
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
<form action="http://example.com/subscribe" method="POST" accept-charset="utf-8"> | |
<input class="form-control input-lg" type="text" name="name" required id="name" placeholder="Name"/> | |
<br/> | |
<input class="form-control input-lg" type="email" name="email" required id="email" placeholder="Email" pattern="[a-zA-Z0-9._\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,4}"/> | |
<br/> | |
<input class="form-control input-lg" type="tel" name="MobilePhone" required id="MobilePhone" placeholder="Phone"/> | |
</p> | |
<p> | |
<input class="form-control input-lg" type="text" name="WorkshopDate" id="WorkshopDate" placeholder="Click Here To Select a Sunday. (Date Format : Date/Month/Year)" required readonly="true"/> | |
<br/> |
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
<!doctype html> | |
<html amp lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello, AMPs</title> | |
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" /> | |
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<script type="application/ld+json"> | |
{ "@context": "http://schema.org", "@type": "NewsArticle", "headline": "Open-source framework for publishing content", "datePublished": "2015-10-07T12:02:41Z", "image": [ "logo.jpg" ] } | |
</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
<style> | |
.youtube-wrapper { | |
display: block; | |
width: 100%; | |
max-width: 600px; | |
border: solid 1px; | |
margin: 20px auto; | |
} | |
.youtube-player { |
OlderNewer