Saturday, 11 March 2017

How to Assign Shortcut keys to Build Selected Project in Visual Studio

1. Click on "Tools" menu follows by "Options" to bring up the "Options" dialog.
2. Select "Environment" > "Keyboard".
3. Select the "Build.BuildSelection" command.
4. Press "Ctrl+Shift+B" keys in the "Press shortcut keys" textbox and click on the "Assign" button.
5. Select the "Build.BuildSolution" command.
6. Press "Ctrl+Shift+Alt+B" keys in the "Press shortcut keys" textbox and click on the "Assign" button.

Saturday, 4 March 2017

Make Blogger Site Fluid

Click on "Theme" on the side bar, follow by "Edit theme" button.

Search for:

.content-outer, .content-fauxcolumn-outer, .region-inner { min-width: $(content.width); max-width: $(content.width); _width: $(content.width); }

Change them to:

.content-outer, .content-fauxcolumn-outer, .region-inner { min-width: 1000px; /*$(content.width)*/ max-width: 1280px; /*$(content.width)*/ _width: 100%; /*$(content.width)*/ }

Refer:  Blogger: make your blog fluid (fit any screen resolution)

Friday, 3 March 2017

Set Proxy Settings for Current Command Session

Use the following command to set proxy settings for current command session:

set http_proxy=http://domain%5Cusername:password@proxy:port set https_proxy=http://domain%5Cusername:password@proxy:port

To reset:

set http_proxy= set https_proxy=


Saturday, 11 February 2017

PyCharm - Python IDE from Jetbrains

PyCharm is a great Python IDE from Jetbrains. There are 3 editions available:
  • PyCharm Community Edition - Free and open source Python IDE.
  • PyCharm Edu Edition - Based on PyCharm Community Edition and designed for people who want to learn Python or course intructors teaching Python programming.
  • PyCharm Professional Edition - Has additional support for web technologies. Require license.

Wednesday, 25 January 2017

Enable and Disable jQuery Validation Temporary

You can temporary disable jQuery validation for a form by:

$("#myForm").validate().settings.ignore = "*";



and turn the validation back on by:

$("#myForm").validate().settings.ignore = ":hidden";



":hidden" is the default settings, which is why hidden fields are not validated by default.






Sunday, 22 January 2017

Paging TagHelpers for AspNetCore

I have created a paging TagHelper while learning AspNetCore. It is designed to be simple and allow customization on the generated Html.

The following is the syntax of the pager:

<pager pager-pagenumber="1" pager-pagesize="10" pager-totalitemcount="100"> <pager-info></pager-info> <pager-paginator pager-paginator-url="@getPageUrl"></pager-paginator> </pager>

You can swap pager info and the paginator position by swapping the markup:

<pager pager-pagenumber="1" pager-pagesize="10" pager-totalitemcount="100"> <pager-paginator pager-paginator-url="@getPageUrl"></pager-paginator> <pager-info></pager-info> </pager>

It also allow you to mix any Html in the markup.
e.g.

<pager id="pager2" pager-pagenumber="1" pager-pagesize="10" pager-totalitemcount="100"> <pager-paginator pager-paginator-first-text="<<" pager-paginator-previous-text="<" pager-paginator-next-text=">" pager-paginator-last-text=">>" pager-paginator-url="@getPageUrl"> </pager-paginator> <span class="text-center col-xs-6">You can put some content here</span> <pager-info pager-info-template="{{FirstItemOnPage}}/{{LastItemOnPage}}:{{TotalItemCount}}"> </pager-info> </pager>

You can download the sample codes from here or visit the demo website here.