How many of you have been used cherry-pick in Git?
Cherry picking in git means to choose a commit from one branch and apply it onto another.
git cherry-pick <commit-hash>
Official documentation: https://git-scm.com/docs/git-cherry-pick
Visual Explanation: http://think-like-a-git.net/sections/rebase-from-the-ground-up/cherry-picking-explained.html
It is convinient way to copy changes from previous commit in Visual Studio 2015
There are a lot of types of built-in collections in C#:
Consider what collection will be the optimal for the specific case. It will likely result in better performance and less room for error. For example if you want to store items as key/value pairs for quick look-up by key, so the best choice will be Generic.Dictionary<TKey, TValue>. If you want to use items first-in-first-out (FIFO), go on Generic.Queue<T>. If you going to access elements by index frequently, go on System.Array if it’s non-generic Elements, but the best option will be Generic.List<T>, if you store elements of type T only. If you frequent action is access items sequentially, better choose Generic.LinkedList<T>. There are a lot more considerations. More information can be found here:
My 3 recommendations. Don’t start to write your own collection class, .NET provide a large variety of existing classes, which you can you use or extend. Think about what actions will be applied on Collection more often. And Generic collections are always preferable than non-generic.
Creating Web publisher app and console consumer in .NET:
Why it is useful, simple image gallery application example
Working with .Net applications deployed on IIS now, I decided to refresh memories about IIS architecture. It can be helpful to any .NET developer.
IIS 7 and above have a similar HTTP request-processing flow as IIS 6.
Here is the diagram, with steps explanation below it.
- When a client browser initiates an HTTP request for a resource on the Web server, HTTP.sys intercepts the request.
- HTTP.sys contacts WAS to obtain information from the configuration store.
- WAS requests configuration information from the configuration store, applicationHost.config.
- The WWW Service receives configuration information, such as application pool and site configuration.
- The WWW Service uses the configuration information to configure HTTP.sys.
- WAS starts a worker process for the application pool to which the request was made.
- The worker process processes the request and returns a response to HTTP.sys.
- The client receives a response.
In a worker process, an HTTP request passes through several ordered steps, called events, in the Web Server Core. At each event, a native module processes part of the request, such as authenticating the user or adding information to the event log. If a request requires a managed module, the native ManagedEngine module creates an AppDomain, where the managed module can perform the necessary processing, such as authenticating a user with Forms authentication. When the request passes through all of the events in the Web Server Core, the response is returned to HTTP.sys.
Diagram 2, below, shows an HTTP request entering the worker process.
It’s just a small piece of IIS architecture.For more information about IIS go to Introduction to IIS