Monday, October 1, 2012

.NET Async Await

* Performance consideration: http://msdn.microsoft.com/en-us/magazine/hh456402.aspx
* Comparison with old patterns: http://msdn.microsoft.com/en-us/library/jj152938.aspx

,NET timers

Comparisons: http://msdn.microsoft.com/en-us/magazine/cc164015.aspx

Note that System.Timers.Timer and System.Threading.Timer by default call your timer event handler on a worker thread obtained from the common language runtime (CLR) thread pool.



 System.Windows.FormsSystem.TimersSystem.Threading
Timer event runs on what thread?UI threadUI or worker threadWorker thread
Instances are thread safe?NoYesNo
Familiar/intuitive object model?YesYesNo
Requires Windows Forms?YesNoNo
Metronome-quality beat?NoYes*Yes*
Timer event supports state object?NoNoYes
Initial timer event can be scheduled?NoNoYes
Class supports inheritance?YesYesNo
* Depending on the availability of system resources (for example, worker threads)

Monday, September 24, 2012

WebGL

Model-View-Projection Matrices

  • Model maps object coordinate to world coordinate
  • View maps world coordinate to camera coordinate
  • Projection maps camera coordinate to screen coordinate

Monday, September 10, 2012

Thursday, September 6, 2012

WebSocket

Friday, July 20, 2012

Cookies

How to detect cookie in Javascript
http://stackoverflow.com/questions/8112634/jquery-detecting-cookies-enabled

Delete cookie for a specific site by clicking bookmark
http://labnol.blogspot.jp/2006/12/how-to-delete-browser-cookies-of-any.html

Cross-domain communication, 3rd party cookie problems:
http://vimeo.com/24705559, options:
  - PostMessage
  - JSONP
  - CORS Cross Origin Resource Sharing
  - Document.domain Hacks
  - Window.name Hacks
  - IFrame Hacks

Creating P3P compact policy:
 - http://blog.sweetxml.org/2007/10/minimal-p3p-compact-policy-suggestion.html
 - http://stackoverflow.com/questions/5774014/iframe-cant-read-nor-set-cookies
 - http://viralpatel.net/blogs/how-to-set-third-party-cookies-with-iframe/