Posts

Showing posts from 2016

using assembly binding for conflict version assembly

      <dependentAssembly>         <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />       </dependentAssembly>

Get Computer information

public static class PerformanceInfo     {         [DllImport("psapi.dll", SetLastError = true)]         [return: MarshalAs(UnmanagedType.Bool)]         public static extern bool GetPerformanceInfo([Out] out PerformanceInformation PerformanceInformation, [In] int Size);         [StructLayout(LayoutKind.Sequential)]         public struct PerformanceInformation         {             public int Size;             public IntPtr CommitTotal;             public IntPtr CommitLimit;             public IntPtr CommitPeak;             public IntPtr PhysicalTotal;             public IntPtr PhysicalAvailable;             public IntPtr SystemCache; ...

Map asp.net webform to OWIN path

namespace AspNetRoutes { public class Global : System.Web.HttpApplication { // How to hook OWIN pipelines into the normal Asp.Net route table side by side with other components. protected void Application_Start( object sender, EventArgs e) { // Paths that start with /owin will be directed to our startup class. RouteTable.Routes.MapOwinPath( "/owin" ); RouteTable.Routes.MapOwinPath( "/special" , app => { app.Run(OwinApp2.Invoke); }); } } }

Blogger widget

Layouts Data Tags As mentioned in the  Widget Tags for Layouts  article, there are many different tags you can use to include specific pieces of data in your template. They will all be formatted as  <data:name/>  or  <data:name1.name2/> , where  name  is the name of the particular piece of data you want to use. In the  name1.name2  example,  name2  is a particular item within a set of data called  name1 , e.g.  photo.url . This is a master list of all such available data. It is divided into sections by page element, because different types of widgets use different data. Globally Available Data Page Header Blog Posts Blog Archives Profile Text / HTML / JavaScript Feed Picture Labels List Link List Logo Globally Available Data This information applies to the entire page, so you can use it anywhere, unlike other data which can only be used in a specific widget. These should be referenced as...

Tag b:include and b:includable

Các thuộc tính cho thẻ b:includable id  (bắt buộc): Bạn có đặt với chữ số không dấu bất kì, viết liền và không dấu. Mỗi widget phải có tối thiểu một thẻ includable vời id='main' là thẻ đầu tiên mà widget thực thi. var  (không bắt buộc) Bạn có thể đặt với chữ và số, đây là biến tạo ra để sử dụng tham chiếu dữ liệu. Một lưu ý là khi bạn tạo ra thẻ  b:includable  thì nó hoàn toàn không xuất hiện cho đến khi bạn gọi nó ra bằng the  b:include . Các gọi như sau, nếu bạn đặt thẻ  b:includable  với id='ksl', thì khi đó bạn gọi nó ra bằng thẻ  <b:include name='ksl' /> , thuộc tính name chính là tên của id của thẻ includable. Các thuộc tính cho thẻ b:include name  (bắt buộc): Phải trùng với ID của thẻ b:includable đã tạo ra trước đó. data  (không bắt buộc): Là dữ liệu bạn muốn truyền vào thẻ b:includable bạn đã tạo trước đó. Có nghĩa là giá trị của thằng này sẽ chuyển vào cho cái biến mà bạn đã đặt cho var  cho thằng kia. c...