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
| Sub FileItem() | |
| Dim Item As MailItem | |
| Set Item = Outlook.Application.ActiveExplorer.Selection.Item(1) | |
| Item.ShowCategoriesDialog | |
| If Not Item.Categories = "" Then | |
| Item.UnRead = False | |
| Set dstFolder = GetFolder("Mailbox - ME\File") | |
| Item.Move dstFolder | |
| End If | |
| End Sub |
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
| Html.RouteLink(Html.Encode(!String.IsNullOrEmpty(item.Title) ? item.Title : "No Title..."), "BlogPost2", | |
| new { | |
| year = item.Published.Year, | |
| month = item.Published.Month, | |
| day = item.Published.Day, | |
| title = Html.Encode(item.Title) | |
| }) |
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
| routes.MapRoute( | |
| "BlogPost", | |
| "Entries", | |
| new { controller = "Blog", action = "BlogPost"} | |
| ); // outputs: mysite.com/Entries?id=0 | |
| routes.MapRoute( | |
| "BlogPost1", | |
| "Entries/{id}", | |
| new { controller = "Blog", action = "BlogPost" } |
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
| // Repository | |
| public IEnumerable<BlogCategory> FindAllBlogCategories() | |
| { | |
| return db.BlogCategories.OrderBy(c => c.BlogCategory_ID); | |
| } |
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
| public static class BlogHelper | |
| { | |
| public static string GetTagClass(int id) | |
| { | |
| if (id % 2 == 0) | |
| { | |
| return "post-tag pop1"; | |
| } | |
| else | |
| { |
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
| <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> | |
| <div id="recent-tags"> | |
| <% foreach (var t in (IEnumerable<Models.BlogCategory>)ViewData["TagCloud"]) | |
| {%> | |
| <a href="http://mysite/Blog/Listing/<%= Html.Encode(t.Category) %>" class="<%= BlogHelper.GetTagClass(t.BlogCategory_ID) %>" ><%= t.Category %></a> | |
| <% }%> | |
| </div> |
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
| <script type="text/javascript" src="/Content/swfobject.js"></script> | |
| <script type="text/javascript"> | |
| var divRecentTags = document.getElementById("recent-tags"); | |
| if (divRecentTags) { | |
| var cloud = new SWFObject("/Content/tagcloud.swf", "tagcloudflash", "275", "200", "9", "#ffffff"); | |
| cloud.addParam("allowScriptAccess", "always"); | |
| cloud.addVariable("tcolor", "0x6290B8"); | |
| cloud.addVariable("tcolor2", "0x000000"); | |
| cloud.addVariable("hicolor", "0xFE5655"); | |
| cloud.addVariable("tspeed", "100"); |
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
| var categories = from c in data.GraphicCategories | |
| join g in data.Graphics on c.GraphicCategory_ID equals g.GraphicCategory_ID | |
| group c by c.LongDescription into categoryGroup | |
| select new | |
| { | |
| Category = categoryGroup.Key, | |
| CategoryFrequency = categoryGroup.Count() | |
| }; | |
| Int32 maxCategoryFrequency = (from c in categories select c.CategoryFrequency).Max(); |
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
| declare @MaxTagFrequency int | |
| declare @tt_Tags table( | |
| BlogCategory_ID int, | |
| [Count] int | |
| ) | |
| insert into | |
| @tt_Tags | |
| select top(@CountLimit) | |
| bc.BlogCategory_ID, |
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
| <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> | |
| <%@ Import Namespace="Sparkline.Helpers" %> | |
| <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> | |
| Spark Line Example | |
| </asp:Content> | |
| <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> | |
| <h2>Hello Sparkline</h2> | |
| <p> |