Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

Cartoon #8: Subclass

Inheritance (C# Programming Guide)
Posted by mohamedg | 0 Comments
Filed under:

WCF Service Throttling

Throttling, generally speaking, is tricky. Get the limits low and you may be prone to DoS and clients timing out trying to connect to your service in vain; Get them high and you may end up with an overloaded service that’s eating up machine resources
Posted by mohamedg | 0 Comments
Filed under: ,

VSTS 2010 and .Net 4.0 Beta 2

Beta 2 is here , give it a try and let us know what do you think. div#widget { position: relative; width: 250px; height: 155px; } body ul#cntdwn { width: 250px; height: 80px; background: transparent url(http://toysfortweets.com/visualstudiowidget/cntdwn-bg.png)
Posted by mohamedg | 0 Comments
Filed under:

C++: Calling a virtual function from a constructor is not polymorphic

In C++, if you call a virtual function form a constructor, it won’t be polymorphic, meaning that the following code won’t behave as you may have expected: class   Foo   { public :     Foo()   {        
Posted by mohamedg | 1 Comments
Filed under: ,

Selection of Majority in O(n)

Selection algorithms are very useful in many instances, like finding the majority. Given an array of size n that contains a majority item (an item that's repeated more than n/2 times), we can find that item in O(n). Basically, we can consider it as a
Posted by mohamedg | 4 Comments
Filed under:

Passing C++ Arrays by Value

Just in case you needed to, you can wrap an array into a struct/class and pass it by value to a function: template < typename T, int N> struct array { T value[N]; T & operator []( int i) { return value[i]; } }; template < typename T, int
Posted by mohamedg | 5 Comments
Filed under: ,

Proxy Design Pattern

One of the useful design patterns is the proxy design pattern, it allows you to control access to an object via a proxy and also saves you the startup and cleanup overheads as you instantiate only what you use upon request (lazy initialization). Take
Posted by mohamedg | 0 Comments
Filed under: ,

Test Patterns

Just like design patterns, the use of test patterns will make your life easier. A lot of the common testing methods can be reused. Along with the benefits of reuse, using patterns makes it easier to explain to others what you are going to do in a word
Posted by mohamedg | 2 Comments
Filed under:

How to: Query all labels on a folder recursively?

To do this, you can't call query labels with a wildcard character, you need to do the following: - Get all items blow $/Dir1 using GetItems - Loop through them calling QueryLabels on each one. Here's a code snippet: VersionControlServer sc = tfs.GetService<
Posted by mohamedg | 3 Comments
Filed under: , ,

How to: Move a shelveset to another branch?

A very handy power tool is tfpt unshelve. It’s capable of migrating a shelveset from a branch to another, it does that by performing a baseless merge, so you will need to resolve the conflicts produced. The syntax of the command looks like the following:
Posted by mohamedg | 6 Comments
Filed under: , ,

How to: Receive daily email notifications?

You can receive a daily email that has a compiled list of notifications, but you will need to subscribe programmatically: IEventService eventService = ( IEventService ) new TeamFoundationServer ( "http://tfs:8080" ).GetService( typeof ( IEventService
Posted by mohamedg | 3 Comments
Filed under:

Cartoon #7: Protected

protected (C# Reference)
Posted by mohamedg | 1 Comments
Filed under:

How to: Diff shelved files?

You can run: tf diff /shelveset:shelvesetName;DOMAIN\ownerUserName Please note that this will diff the shelved changes against the unmodified version, not necessarily the latest version, just like what the you get from clicking compare in the shelveset
Posted by mohamedg | 1 Comments
Filed under: , ,

How to: List changesets between two labeled versions?

You can achieve that behavior by running: tf hist rootItemSpec /r /version:LstartLabel~LendLabel Here’s my scenario: tf hist /i File.cs Changeset Change User Date Comment --------- -------------------------- ------------- ---------- -------- 65 edit mohamedg
Posted by mohamedg | 2 Comments
Filed under: , ,

How to: View history of an item across branches?

You can use tfpt history /followbranches to follow the history of an item across branches. We are looking into supporting this in the history dialog in the next version . You can see which versions are ported over during the merge operation if you use
Posted by mohamedg | 1 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker