Last week, I stumbled upon the following piece of code:
IList<double> doubles = new List<double> {22.123, 400.12, 100.22}; foreach (int number in doubles) { Console.WriteLine("The Current Number Is : {0}", number); }
Can you see the bug in that code? We convert all of the doubles in the list to integers, truncating them. I was very surprised that the compiler didn’t warn me about this issue, especially because the compiler would not let me write this code:
Suppose you have several objects in your WPF application filled with similar Brushes which differ in brightness only. Like in this image:
The nine rectangles use the same RadialGradienBrush but each rectangle is a little darker than previous. You can create these 9 different brushes in your favorite design tool (Expression Blend, etc.). But what if you need to change the base color later or you just need to make the brush user-configurable? Like in these samples:
Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. As such, it is not just a method for building "web services." The terms "representational state transfer" and "REST" were introduced in 2000 in the doctoral dissertation of Roy Fielding,[1] one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification.
REST is a method of managing resources over HTTP. There are a number of methods of interacting with resources via REST.
| HTTP | CRUD |
| POST | Create |
| GET | Read |
| PUT | Update, Create |
| DELETE | Delete |
Systems which follow Fielding’s REST principles are often referred to as "RESTful".
Hey all
I am sorry for the long absence but I just got married and went on a great honeymoon, so I was not around!
I hope things will start to pick up from now.
Just wanted to let you all know that we are back online, and to tell you that we have updated the Write [...]
We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn More