Wednesday, December 21, 2011

How to use Apache 2.0 license in commercial products, explained in simple terms

It allows you to:
  • freely download and use Apache software, in whole or in part, for personal, company internal, or commercial purposes;
  • use Apache software in packages or distributions that you create.
It forbids you to:
  • redistribute any piece of Apache-originated software without proper attribution;
  • use any marks owned by The Apache Software Foundation in any way that might state or imply that the Foundation endorses your distribution;
  • use any marks owned by The Apache Software Foundation in any way that might state or imply that you created the Apache software in question.
It requires you to:
  • include a copy of the license in any redistribution you may make that includes Apache software;
  • provide clear attribution to The Apache Software Foundation for any distributions that include Apache software.
It does not require you to:
  • include the source of the Apache software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;
  • submit changes that you make to the software back to the Apache Software Foundation (though such feedback isencouraged).

Skills for Front-End Developers

http://www.impressivewebs.com/skills-front-end-developers/



  • XHTML / HTML5


  • CSS2.1 / CSS3
  • JavaScript / Ajax
  • jQuery
  • HTML5 Boilerplate
  • Modernizr
  • YUI Library
  • OOCSS
  • CSS Grids
  • CSS Frameworks / Resets
  • Progressive Enhancement / Graceful Degradation
  • HTML and CSS Specifications (W3C / WHATWG)
  • UX / Usability
  • Website Speed / Performance
  •  ...................

    Website optimization with request reduce

     http://requestreduce.com/

    Monday, December 19, 2011

    how to apply CSS class to MVCcontrib grid

    In Razor view:
    @Html.Grid(
    ...
        ).Attributes(@class => "ContribGrid")

    In css file:
    .ContribGrid th
    {
       background: red;
    }

    ASP.NET MVC 4 Developer Preview: What’s New

    http://www.sitepoint.com/asp-net-mvc-4-developer-preview-whats-new/

    Thursday, December 15, 2011

    How to avoid Quirks mode in IE

    Put this line in the first place
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
    </head>


    Reference:
    How to avoid compatibility view and quirk mode in IE?

    Put specific HTML standard in DOCTYPE tag
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">  






    Display Modes in ASP.NET MVC 4 Developer Preview

    http://www.sitepoint.com/asp-net-mvc-4-developer-preview-display-modes/

    Old code





    http://notinventedhe.re/on/2011-11-9Not Invented Here strip for 11/9/2011

    Tuesday, December 13, 2011

    Fixed header and footer by CSS

    http://limpid.nl/lab/css/fixed/header-and-footer

    <style type="text/css">
     body{
      margin:0;
      padding:100px 0 30px 0;
     }
     div#header{
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:30px;
      background:black;
      color:White;
     }
     div#footer{
      position:absolute;
      bottom:0;
      left:0;
      width:100%;
      height:30px;
      background:black;
     }
     @media screen{
      body>div#header{
       position:fixed;
      }
      body>div#footer{
       position:fixed;
      }
     }
     * html body{
      overflow:hidden;
     }
     * html div#content{
      height:100%;
      overflow:auto;
     }
    </style>
    <div id="header"> header
    </div>
    <div id="footer"> footer </div>
    <div id="content"> content </div>

    Monday, December 12, 2011

    How to scroll to a div in a long page by Javascript?



                document.getElementById('divID').scrollIntoView();

    How to render a view without layout in ASP.NET MVC?


    In_ViewStart.cshtml, Check if it is an ajax call. If yes set layout to null
        if (Request.IsAjaxRequest())
        {
            Layout = null;
        }
        else
        {
            Layout = "~/Views/Shared/_Layout.cshtml";
        }

    How ASP.NET MVC routing module works

    http://www.simple-talk.com/dotnet/.net-framework/asp.net-mvc-routing-extensibility/



    routes.MapRoute("BlogArchive",
        "{year}/{month}/{day}",
        new { controller = "Blog", action = "List", month = "1", day = "1" },
        new { year = @"\d{2}|\d{4}", month = @"\d{1,2}", day = @"\d{1,2}" }
        );

    Traveling, Writing and Programming

    http://alexmaccaw.co.uk/posts/traveling_writing_programming

    RTW

    Thursday, December 8, 2011

    How to get assembly version in ASP.NET MVC?

    typeof(ControllerClassName).Assembly.GetName().Version.ToString()

    How to make transformation working for app.config?

    There is an add-on in Visual Studio: SlowCheetah - XML Transforms

    http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5

    Tuesday, December 6, 2011

    How to get root url in MVC?

    var rooturl = string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~"));

    Monday, December 5, 2011