1. Create Json Model Object: sử dụng JsonProperty để định nghĩa tên của 1 field.
2. Khi parse json string. Nên parse thành JToken, vì nó tổng quan nhất, sau đó dựa vào cái type của nó để xác định xem nên parse thành gì (nếu không có thể sẽ bị exception). Điều này quan trọng để parse string thành 1 type nào đó, đôi lúc string không hợp lệ cho type đó.
Thursday, October 29, 2015
Tuesday, October 20, 2015
How to detect error base on RestSharp returned response fields?
Never check ErrorMessage for detecting error, just check StatusCode.
Note. This picture is In case of using Asp Web Api 2, doesn't has ErrorMessage but has System.Net.HttpStatusCode.NotFound status. (See all http status codes)
Một số lưu ý khi sử dụng SQLite
Links hay:
http://blogs.msdn.com/b/matt/archive/2008/05/22/into-to-linq-to-sql-optimistic-concurrency.aspx
1. Khi tạo các model, sử dụng namespace using System.Data.Linq.Mapping;
Example:
2. Không sử dụng 1 số hàm sau trên IQueryable (của System.Linq):
http://blogs.msdn.com/b/matt/archive/2008/05/22/into-to-linq-to-sql-optimistic-concurrency.aspx
1. Khi tạo các model, sử dụng namespace using System.Data.Linq.Mapping;
Example:
[Table(Name = "McmUser")]public class McmUser{[Column(Name = "Username", IsPrimaryKey = true)]public string Username { get; set; }[Column(Name = "IsActive")]public bool IsActive { get; set; }}
2. Không sử dụng 1 số hàm sau trên IQueryable (của System.Linq):
- First
- FirstOrDefault
- ElementAt
Wednesday, October 14, 2015
Sunday, September 20, 2015
Link hay
http://philipwalton.com/ google engineer
http://www.redblobgames.com/ học thuật toán làm game
http://www.learnsvg.com/
Matrix
http://www.coranac.com/documents/geomatrix/
http://bl.ocks.org/mbostock/raw/10591444/b34b3579998f4988da04337310901519df0afc93/ Matrix transform
http://bl.ocks.org/mbostock/10591444
http://codepen.io/ktamas77/pen/EkrCl
http://freespace.virgin.net/hugo.elias/routines/3d_to_2d.htm
3D Svg
https://github.com/ndebeiss/svg3d
http://www2.fc.unesp.br/wrva/artigos/50227.pdf Perspective distortion
http://bl.ocks.org/mbostock/10591444 Perspective distortion example
http://www.math.utah.edu/~treiberg/Perspect/Perspect.htm
http://www.redblobgames.com/ học thuật toán làm game
http://www.learnsvg.com/
SVG
Matrix
http://www.coranac.com/documents/geomatrix/
http://bl.ocks.org/mbostock/raw/10591444/b34b3579998f4988da04337310901519df0afc93/ Matrix transform
http://bl.ocks.org/mbostock/10591444
http://codepen.io/ktamas77/pen/EkrCl
http://freespace.virgin.net/hugo.elias/routines/3d_to_2d.htm
3D Svg
https://github.com/ndebeiss/svg3d
http://www2.fc.unesp.br/wrva/artigos/50227.pdf Perspective distortion
http://bl.ocks.org/mbostock/10591444 Perspective distortion example
http://www.math.utah.edu/~treiberg/Perspect/Perspect.htm
Thursday, August 6, 2015
Monday, August 3, 2015
Ninect OnePerRequestModule
http://stackoverflow.com/questions/536007/ninject-oneperrequestbehaviour-doesnt-seem-to-work-correctly
IIS7:
IIS7:
<system.webServer>
<modules>
<add name="OnePerRequestModule" type="Ninject.Core.Behavior.OnePerRequestModule, Ninject.Core"/>
</modules>
</system.webServer>
IIS6:
<system.web> <httpModules> <add name="OnePerRequestModule" type="Ninject.Core.Behavior.OnePerRequestModule, Ninject.Core"/> </httpModules> </system.web>
Subscribe to:
Posts (Atom)