Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by moshe on Jul 28th, 2009 | Filed under .Net, C# | 5 Comments

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:

 


Continue Reading...
Posted by ailon on Jul 23rd, 2009 | Filed under .Net, C#, Silverlight, WPF | 9 Comments

Suppose you have several objects in your WPF application filled with similar Brushes which differ in brightness only. Like in this image:

red_rect

 

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:


Continue Reading...
Posted by Justin on Jul 17th, 2009 | Filed under C# | 6 Comments

What is REST?

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".

 


Continue Reading...
Posted by Amit on Jul 12th, 2009 | Filed under C# | 1 Comment

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 [...]


Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More