tag:blogger.com,1999:blog-48702274467313825682024-03-14T03:37:51.570+05:00Quick ReviewsUse what you know, do what you always imagined.M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.comBlogger200125tag:blogger.com,1999:blog-4870227446731382568.post-80510522652910591572015-12-02T00:34:00.000+05:002019-03-31T20:21:20.905+05:00Accessing the ASP.NET Web Configuration Tool in Visual Studio 2013<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Visual Studio 2013 Preview has been release, hide few features which was present initially in previous versions. One of them is "Asp.Net Configuration Manager" which is no longer in Visual Studio 2013 Preview. This happened due to the removal of Cassini or Visual Studio Development Server from the product. Many peoples are still want to use the tool. I found these instruction in MSDN blog but before of use make sure that this will work only for sites running on the .Net Framework 4.0 and above. Follow these steps;</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">1. Open the Command Prompt (not as administrator)</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">2. Navigate to the folder where IIS Express is installed on your machine.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">3. In the command line spin up a IISExpress site with the following prompt: “iisexpress.exe /path: </span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><i>C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:”/ASP.NETWebAdminFiles” /port:[port] /clr: 4.0 /ntlm” using the following values for the [param]:</i></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> NOTE: [port] – any port you have free in IISExpress like 8082</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">4. This should launch an IISExpress instance of the Configuration Manager Site</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrs2T5Y8u-hbhZBiZFZHvkjMRpa-vM0Ooq5qtlPc6tiNnZdp4hXHxd1DdAuiaXU9fbLPZPFGWIsqL_8daGG8EO0lX_yGWetwsyQUcxtq7m_TThF2jD5wz24q5ml1eWQZUqGz_8-M3u3XI/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrs2T5Y8u-hbhZBiZFZHvkjMRpa-vM0Ooq5qtlPc6tiNnZdp4hXHxd1DdAuiaXU9fbLPZPFGWIsqL_8daGG8EO0lX_yGWetwsyQUcxtq7m_TThF2jD5wz24q5ml1eWQZUqGz_8-M3u3XI/s1600/1.jpg" /></a></div>
<br />
<div style="text-align: justify;">
5.<span style="font-family: "verdana" , sans-serif;"> Open your browser</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">6. In the URL enter the following </span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><i><b>“http://localhost:8082/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=[appPath]&applicationUrl=/” </b></i></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Substituting the [appPath] with the absolute path to the Visual Studio Project folder with the solution file in it.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Congratulations, you now have your ASP.net Web Site Administration Tool running as before. Stay tune:)</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com10Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-6623098935097238242015-12-02T00:33:00.000+05:002019-03-31T20:21:31.717+05:008 Famous Quotes to Help You Embrace Fear and Achieve Success<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">You can find many words of wisdom but I like 8 of them quite resourceful and these quotes will surely help you embrace fear and achieve success. When offering career advice to young professionals and entrepreneurs, the two things that always top of list are to find a mentor and to read voraciously. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Throughout the course of life, you have been blessed with multiple mentors -- mostly teachers, professors, bosses or colleagues. In addition, you have gathered useful advice from reading, and observing the actions of individuals who identify as some of the world’s best leaders, both past and present. </span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEz9vAdmbbblUZCly66sAqoBgQLREybZM04GdosqPwG8DOZ7bIUkPwldywYvCAPcNADlsMsk0FFVsVfZcrjjlFuHiiESXJrCDe1mRGKPuALKIecXxmFFVwwP0ofHM_d1Y69IGC7EP3Z7k/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEz9vAdmbbblUZCly66sAqoBgQLREybZM04GdosqPwG8DOZ7bIUkPwldywYvCAPcNADlsMsk0FFVsVfZcrjjlFuHiiESXJrCDe1mRGKPuALKIecXxmFFVwwP0ofHM_d1Y69IGC7EP3Z7k/s1600/1.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The following are 8 notable quotes from these “leaders” that have inspired me and helped to shape my principles.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">“Develop success from failures. Discouragement and failure are two of the surest stepping stones to success.” – <b>Dale Carnegie</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">"There are only two ways to live life. One is as though nothing is a miracle. The other is as though everything is." – <b>Albert Einstein</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">"Do not look for approval except for the consciousness of doing your best." – <b>Andrew Carnegie</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">"The true measure of a person is how they treat someone who can do him absolutely no good." – <b>Samuel Johnson</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">"You've got to be very careful if you don't know where you are going because you might not get there." – <b>Yogi Berra</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">“Expect more than others think possible.” – <b>Howard Schultz</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">"If people aren't calling you crazy, you aren't thinking big enough." – <b>Richard Branson</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">“Never, never, never give up.” – <b>Winston Churchill</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">To me, the key takeaway is to push yourself through fear and uncertainty and place your best foot forward no matter what happens. The point is -- put your plans in motion, work hard and be willing to adapt along the way.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-64062158493970294892015-12-02T00:32:00.001+05:002019-03-31T20:21:59.602+05:00How to Become a Great Leader?<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Yesterday I read an article which is very resourceful and points many areas which we improve can </span><span style="font-family: "verdana" , sans-serif;">make us a Great Leader in our domain. All of need is to work hard and stay focus of what you are </span><span style="font-family: "verdana" , sans-serif;">trying to achieve Because without focusing on your goals, you can't make the right alignment </span><span style="font-family: "verdana" , sans-serif;">with your company if so then it will degrade your expertise the company wants in you.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Leadership is a hot topic and will always be one. We seem to linger in a perpetual leadership vacuum. Today's Presidents and CEO s generals and coaches, some of them don't stand in comparison </span><span style="font-family: "verdana" , sans-serif;">with the great leaders of the past - or so we are told - and in times of crisis, people cry out </span><span style="font-family: "verdana" , sans-serif;">for someone who can show them a way to escape the looming threat. There’s a general myth that </span><span style="font-family: "verdana" , sans-serif;">leaders are born rather than made, that somehow Nature produces a peculiar species of human being </span><span style="font-family: "verdana" , sans-serif;">who is bigger, more powerful, smarter, braver, and more charismatic than the rest.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkGVW3N8XawdUgwDG02BnrW7YXb7otl_qIln-h6PnufKCKAwc286-iR1B2rkCiVSK74kv6qCHOeNEqTmsBWKlX42ULykm0w6qULUR8as-qNFBnCNBfelZtuPMBIR22ZopTVzdIs3rmFI/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkGVW3N8XawdUgwDG02BnrW7YXb7otl_qIln-h6PnufKCKAwc286-iR1B2rkCiVSK74kv6qCHOeNEqTmsBWKlX42ULykm0w6qULUR8as-qNFBnCNBfelZtuPMBIR22ZopTVzdIs3rmFI/s1600/1.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">But waiting for such a rare bird is futile, for there are many crises that never find the natural </span><span style="font-family: "verdana" , sans-serif;">born leader it needs. The real challenge in leadership is to find a way to build leaders. The main </span><span style="font-family: "verdana" , sans-serif;">way that business schools and government departments attempt this is by studying the past. </span><span style="font-family: "verdana" , sans-serif;">Learning from history has its advantages, naturally. There are lessons to be learned about how </span><span style="font-family: "verdana" , sans-serif;">World War II was won, why the Chicago Bulls were such a successful basketball team, and why Wall </span><span style="font-family: "verdana" , sans-serif;">St. banks, led by greed and short-sightedness, created the financial collapse of 2008.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">But today's crises never completely mirror yesterday's, and it would be better in the first place </span><span style="font-family: "verdana" , sans-serif;">to build leaders who can prevent crises before they arise. In my view, a great leader is </span><span style="font-family: "verdana" , sans-serif;">inspiring, uplifting, a unite of differences, and someone who brings out the best in human </span><span style="font-family: "verdana" , sans-serif;">aspirations. I named this model "the soul of leadership” and set out to see if leaders with a soul </span><span style="font-family: "verdana" , sans-serif;">could be trained.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Knowing that business, politics, and the military are not spiritual enterprises, I didn't </span><span style="font-family: "verdana" , sans-serif;">formulate the training along "soft" or idealistic lines. Instead, I used a "hard" criterion: what </span><span style="font-family: "verdana" , sans-serif;">groups actually need. If you aspire to be a great leader, the first requirement is that you look </span><span style="font-family: "verdana" , sans-serif;">and listen, so that you can find out the true needs that a situation demands to be fulfilled. </span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">There are seven such needs:</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. Safety, security</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations of threat and instability. People feel insecure. Discontent is in the air. You can see </span><span style="font-family: "verdana" , sans-serif;">nervous faces, feel the prevailing anxiety. Who is going to make the situation feel safer?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. Achievement, success</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations of unrealized achievement. People feel unsuccessful. They want to be more productive, </span><span style="font-family: "verdana" , sans-serif;">but there’s not enough fire or passion. Who is going to step up and provide the motivation so </span><span style="font-family: "verdana" , sans-serif;">sorely needed?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. Cooperation</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations that are incoherent and fragmented. There’s no team spirit. The group disintegrates </span><span style="font-family: "verdana" , sans-serif;">into bickering and petty wrangling. Meetings go on forever but reach no conclusion. Who’s going to </span><span style="font-family: "verdana" , sans-serif;">be the glue that brings coherence to the situation?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>4. Nurturing, belonging</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations mired in bad feeling and apathy. Everyone is going through the motions, doing what they </span><span style="font-family: "verdana" , sans-serif;">need to do but inside feeling totally disengaged. The atmosphere is stale and routine. There’s no </span><span style="font-family: "verdana" , sans-serif;">personal support or trust. Who’s going to bring heart to the situation and make others feel that </span><span style="font-family: "verdana" , sans-serif;">they belong?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>5. Creativity, progress</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations dominated by old solutions and stale ideas. People feel stymied. The atmosphere has no </span><span style="font-family: "verdana" , sans-serif;">creativity; it feels like yesterday’s news. Everyone agrees that something new is needed, but all </span><span style="font-family: "verdana" , sans-serif;">that emerges are small variations on the status qua. Who’s going to bring the spark of creativity </span><span style="font-family: "verdana" , sans-serif;">to the situation?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>6. Moral values</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations that are spiritually empty and corrupt. The weak feel hopeless, the strong are </span><span style="font-family: "verdana" , sans-serif;">cynically taking advantage. People talk about righting wrongs and bringing back the right values, </span><span style="font-family: "verdana" , sans-serif;">but no one knows where to start. The future feels like wishful thinking; the present is oppressive </span><span style="font-family: "verdana" , sans-serif;">and suffocating. Who will bring hope and a renewed sense of innocence?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>7. Spiritual fulfilment</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Situations that symbolize the human condition. People are asking the big questions: Who am I? Why </span><span style="font-family: "verdana" , sans-serif;">am I here? Many are seeking for God. There is talk of a higher reality, yet faith is lacking. Who </span><span style="font-family: "verdana" , sans-serif;">can bring the light and demonstrate that holiness is a living reality?</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Having looked and listened, you will know the situation you are in and the need that is crying out </span><span style="font-family: "verdana" , sans-serif;">to be fulfilled. As you can see, the "hard" criterion that shaped this model of leadership </span><span style="font-family: "verdana" , sans-serif;">eventually leads to moral values and spirituality, because in reality those aren't "soft" needs. </span><span style="font-family: "verdana" , sans-serif;">Every human being has a yearning for them. But unless the basic needs are fulfilled, appealing to </span><span style="font-family: "verdana" , sans-serif;">a group's ideals is usually futile.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The most common cause of leadership failure is ego, which means that someone is looking out for </span><span style="font-family: "verdana" , sans-serif;">number one rather than the group. Ego is a legitimate basis for action - it's the second need </span><span style="font-family: "verdana" , sans-serif;">above safety and security. We all want the good things in life; our instinct is to provide for "I, </span><span style="font-family: "verdana" , sans-serif;">me, and mine." But the collapse of Wall St. and many disastrous wars have resulted when leaders </span><span style="font-family: "verdana" , sans-serif;">get stuck on ego. </span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">You can be a great leader, with all the rewards this carries, while still </span><span style="font-family: "verdana" , sans-serif;">serving the needs of the whole group. In essence, that's what the soul of leadership is all about.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-14727395112775105972015-12-02T00:32:00.000+05:002019-03-31T20:21:46.032+05:00How to Self-Promote without Being a Jerk?<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Yesterday I read an article to self promoting yourself without being a Jerk. Is it possible to genuinely be interested in the needs of others, and still promote yourself? Absolutely, otherwise all the good people would be starving in the streets. But doing so requires that you skip the sort of "me first", self-centred promotion that many utilize.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNy3I4xNaCT381Jdt2tZZGXphN86dyN1BclEFuJgqjKLWLojmoM54vv6bVOZoYl8MQDhPcn8lxBUA3W9lXLJr_8hMRj7vd55U2lIb8VPtAZmSjHFGmmF0xM4l4jYrNdT2LyT2kuSz_6zA/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNy3I4xNaCT381Jdt2tZZGXphN86dyN1BclEFuJgqjKLWLojmoM54vv6bVOZoYl8MQDhPcn8lxBUA3W9lXLJr_8hMRj7vd55U2lIb8VPtAZmSjHFGmmF0xM4l4jYrNdT2LyT2kuSz_6zA/s1600/1.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Here are some tips for getting the right kind of attention:</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Start with the facts.</b> Keep your resume, bio and LinkedIn profile in perfect order. Be factual, clear and complete; If you doubled sales in a year, say so.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Plenty of people do the opposite:</b> They make boastful claims in an article or email, but their profile is lacking the most basic details. </span><span style="font-family: "verdana" , sans-serif;">Make it very easy for people to get facts about what you have accomplished. The key word here is "facts." Don't brag, just tell the truth.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Acknowledge others.</b> State your accomplishments in terms of how you have helped others. If you have clients, list the ways they have benefitted from working with you. If you volunteer, be proactive in supporting your favorite non-profits. When your team wins, give credit to the other team members.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Be helpful.</b> The best articles, blog posts, comments and discussion topics serve to help other people. The wrong way to get a new client is to say, "I'm the best, hire me." The right way is to be so helpful that it becomes obvious to others that you are someone who adds value and brings the right attitude to tough challenges. </span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Beware...</b> people are very good at spotting insincere contributions. Don't simply pretend to help others; actually help them.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Share freely.</b> Few things bother people more than a "teaser" article that forces readers to share their contact information before gaining access to more valuable content. I get the sales and marketing reasons for using such an approach, but a far better strategy is to share freely and make it easy for people to contact you if they value what you have shared.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Be expert.</b> It is much better to be expert than to say you are an expert. If you have worthwhile capabilities, use them. Write a book that imparts genuine insights. Teach others valuable skills. Be calm and focused in stressful situations. Look for actual solutions, instead of simply parroting tired, old phrases. Use your abilities in ways that other people value.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">When you <b>don't know the answer</b>, just say so. It is human nature to fall into the trap of thinking you have all the answers. Newsflash: no one has all the answers. If you want to earn credibility, be the first to admit when you are over your head. Even better, send people to other experts who are equipped to answer their current questions; paradoxically, doing so will raise your credibility.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>One last caution...</b> don't be full of yourself. Never use these words to describe yourself: thought leader, visionary, insightful, or genius.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">And <b>please</b> - if you are over the age of 20, never put your GMAT, LSAT, or SAT scores on your profile. Once you get into a school, it is bad form to tell others how you did it. Listing your board scores is equivalent to saying, "I'm smart, but I lack common sense."</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-11246388354211054512015-12-02T00:31:00.000+05:002019-03-31T20:21:06.844+05:00Different Ways To Test Your Website In Older Version Of IE<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">There are few method present to test your site in older versions of IE to make sure that its working fine in every browser because the annonymous user may have old </span><span style="font-family: "verdana" , sans-serif;">browser when they visit to your websites. You can test your website in following ways:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. DEVELOPER TOOLS</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Firstly IE8, IE9, IE10 and IE11 all have developer tools (use press F12 to open it) these allow you to change your document and browser mode to go back to older </span><span style="font-family: "verdana" , sans-serif;">rendering engines such as IE6. I delivered a session on IE9 developer tools and most of this is valid for IE10 too. With IE11 comes a new set of greatly improved </span><span style="font-family: "verdana" , sans-serif;">tools.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. MODERN.IE SCANNER</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The Modern.ie scanner allows you to enter a web address. The scanner then uses a node.js services (which is available on GitHub) to go fetch the website and </span><span style="font-family: "verdana" , sans-serif;">interrogate it to locate common problems, it then provides a report which details what you may need to do to fix you website so that it works well in IE and also other </span><span style="font-family: "verdana" , sans-serif;">stands based browsers.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. VIRTUAL MACHINES</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">For the most accurate results you will probably want to use Virtual Machines so that you can run the browsers in a real world environment. This is by far and away the </span><span style="font-family: "verdana" , sans-serif;">most popular way to do browser testing in my experience. The good folk at Modern.ie have produced VM’s for all the various browsers and operating system combinations </span><span style="font-family: "verdana" , sans-serif;">(IE6-IE11). These VM’s run on Windows, Linux and Mac and in numerous Virtualisation flavours including Parallels, VMWare and VirtualBox.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>4. HOSTED VIRTUAL MACHINES (BROWSERSTACK)</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Modern.ie provides a 3 month free trial for BrowserStack which allows you to test IE6-10 (and every other major browser like Chrome, Opera, Safari, Firefox as well as </span><span style="font-family: "verdana" , sans-serif;">iOS and Android emulators) inside of your browser. There are also browser plugins available for Chrome and Firefox which make launching BrowserStack even easier. With </span><span style="font-family: "verdana" , sans-serif;">BrowserStack you can simply start up a new Virtual machine in the cloud running practically any OS and then test your website in that environment.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>5. RUNNING MULTIPLE VERSIONS OF IE USING WINDOWS XP MODE</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">One way to run multiple versions of Internet Explorer on one PC is to run the older version(s) of Internet Explorer using Windows XP Mode on a Windows PC running </span><span style="font-family: "verdana" , sans-serif;">Windows 7 Professional, Enterprise, or Ultimate edition. (Windows XP Mode is an optional downloaded feature of Windows 7 Professional, Enterprise, and Ultimate </span><span style="font-family: "verdana" , sans-serif;">editions that provides you a pre-installed image of Windows XP SP3 that you run using Windows Virtual PC..)</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">It is even possible to set up and run multiple XP Modes on one Windows 7 machine, thereby allowing you to run Internet Explorer versions 6, 7, 8, and 9 simultaneously </span><span style="font-family: "verdana" , sans-serif;">on a single machine.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-74264477844942409082015-12-02T00:30:00.000+05:002019-03-31T20:22:28.864+05:0011 Simple Concepts to Become a Better Leader<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCy-H61pC5wdsKRVSq3v48fsLfWmx_lmqNxKeHRzsZJ-cxY1wEdc8dR2Hz3xhSM1mIgXNrD4lp9sAJOu-SA7vupRgEO2kkrkxz2K8CsMbTDkl6HTvOxnaMxwq_z_mk_wkgLfWPy5eNoig/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="327" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCy-H61pC5wdsKRVSq3v48fsLfWmx_lmqNxKeHRzsZJ-cxY1wEdc8dR2Hz3xhSM1mIgXNrD4lp9sAJOu-SA7vupRgEO2kkrkxz2K8CsMbTDkl6HTvOxnaMxwq_z_mk_wkgLfWPy5eNoig/s400/1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">I read an article written by </span><b><span style="font-family: "courier new" , "courier" , monospace;">Dave KerpenCEO</span></b><span style="font-family: "verdana" , sans-serif;">, Likeable Local, NY Times Best-Selling Author & Keynote Speaker in which he defines the 11 simple concepts that help anyone to become a better leader in the world. All you need is to focus on goal and figuring out how to achieve it. It will help you in your job, business, relationships, and life. All of the concepts are simple, and yet, perhaps in the name of revenues or the bottom line, we often lose sight of the simple things - things that not only make us human, but can actually help us become more successful. Below are the eleven most important principles to integrate to become a better leader:</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. Listening</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"When people talk, listen completely. Most people never listen." - <b>Ernest Hemingway</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Listening is the foundation of any good relationship. Great leaders listen to what their customers and prospects want and need, and they listen to the challenges those customers face. They listen to colleagues and are open to new ideas. They listen to shareholders, investors, and competitors. Here's why the best CEO's listen more.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. Storytelling</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"Storytelling is the most powerful way to put ideas into the world today." - <b>Robert McAfee Brown</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">After listening, leaders need to tell great stories in order to sell their products, but more important, in order to sell their ideas. Storytelling is what captivates people and drives them to take action. Whether you're telling a story to one prospect over lunch, a boardroom full of people, or thousands of people through an on-line video - storytelling wins customers.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. Authenticity</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"I had no idea that being your authentic self could make me as rich as I've become. If I had, I'd have done it a lot earlier." -<b>Oprah Winfrey</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Great leaders are who they say they are, and they have integrity beyond compare. Vulnerability and humility are hallmarks of the authentic leader and create a positive, attractive energy. Customers, employees, and media all want to help an authentic person to succeed. There used to be a divide between one’s public self and private self, but the social internet has blurred that line. Tomorrow's leaders are transparent about who they are on-line merging their personal and professional lives together.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>4. Transparency</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"As a small businessperson, you have no greater leverage than the truth." - <b>John Whittier</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">There is nowhere to hide any more and businesspeople who attempt to keep secrets will eventually be exposed. Openness and honesty lead to happier staff and customers and colleagues. More important, transparency makes it a lot easier to sleep at night - unworried about what you said to whom, a happier leader is a more productive one.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>5. Team Playing</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"Individuals play the game, but teams beat the odds." - <b>SEAL Team Saying</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">No matter how small your organization, you interact with others every day. Letting others shine, encouraging innovative ideas, practising humility, and following other rules for working in teams will help you become a more likeable leader. You’ll need a culture of success within your organization, one that includes out-of-the-box thinking.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>6. Responsiveness</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"Life is 10% what happens to you and 90% how you react to it." -<b>Charles Swindoll</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The best leaders are responsive to their customers, staff, investors, and prospects. Every stakeholder today is a potential viral spark plug for better or for worse, and the winning leader is one who recognizes this and insists upon a culture of responsiveness. Whether the communication is email, voice mail, a note or a tweet, responding shows you care and gives your customers and colleagues a say, allowing them to make a positive impact on the organization.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>7. Adaptability</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"When you're finished changing, you're finished." - <b>Ben Franklin</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">There has never been a faster-changing marketplace than the one we live in today. Leaders must be flexible in managing changing opportunities and challenges and nimble enough to pivot at the right moment. Stubbornness is no longer desirable to most organizations. Instead, humility and the willingness to adapt mark a great leader.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>8. Passion</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"The only way to do great work is to love the work you do." -<b>Steve Jobs</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Those who love what they do don’t have to work a day in their lives. People who are able to bring passion to their business have a remarkable advantage, as that passion is contagious to customers and colleagues alike. Finding and increasing your passion will absolutely affect your bottom line.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>9. Surprise and Delight</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"A true leader always keeps an element of surprise up his sleeve, which others cannot grasp but which keeps his public excited and breathless." - <b>Charles de Gaulle</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Most people like surprises in their day-to-day lives. Likeable leaders under promise and over deliver assuring that customers and staff are surprised in a positive way. There are a plethora of ways to surprise without spending extra money - a smile, We all like to be delighted — surprise and delight create incredible word-of-mouth marketing opportunities.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>10. Simplicity</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"Less isn't more; just enough is more." - <b>Milton Glaser</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The world is more complex than ever before, and yet what customers often respond to best is simplicity — in design, form, and function. Taking complex projects, challenges, and ideas and distilling them to their simplest components allows customers, staff, and other stakeholders to better understand and buy into your vision. We humans all crave simplicity, and so today's leader must be focused and deliver simplicity.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>11. Gratefulness</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">"I would maintain that thanks are the highest form of thought, and that gratitude is happiness doubled by wonder." - <b>Gilbert Chesterton</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Likeable leaders are ever grateful for the people who contribute to their opportunities and success. Being appreciative and saying thank you to mentors, customers, colleagues, and other stakeholders keeps leaders humble, appreciated, and well received. It also makes you feel great! Donor's Choose studied the value of a hand-written thank-you note, and actually found donors were 38% more likely to give a 2nd time if they got a hand-written note!</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>The Golden Rule:</b> </span><span style="font-family: "courier new" , "courier" , monospace;">Above all else, treat others as you’d like to be treated</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">By showing others the same courtesy you expect from them, you will gain more respect from co-workers customers, and business partners. Holding others in high regard demonstrates your company’s likeability and motivates others to work with you. This seems so simple, as do so many of these principles — and yet many people, too concerned with making money or getting by, fail to truly adopt these key concepts.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.54505 74.34068300000001331.1117675 73.695236000000008 31.9783325 74.986130000000017tag:blogger.com,1999:blog-4870227446731382568.post-25007176949272217122015-11-10T13:52:00.001+05:002019-01-26T23:36:55.537+05:00SQL SERVER 2016 FEATURES<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">SQL Server 2016 introduces the new statement because it is very confusing when you need to check an object either it is present or not.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Previously when we need to check the Store procedure either it is exists or not we use following long lengthy syntax:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>IF OBJECTPROPERTY(object_id('dbo.sp_GenerateReport'), N'IsProcedure') = 1
DROP PROCEDURE [dbo].[sp_GenerateReport]
GO
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Now in the latest version of SQL Server, they reduce the long lengthy statements into one line for Store procedure, function and tables. They named the statement as 'DIE' => DROP IF EXISTS</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>DROP FUNCTION IF EXISTS fn_CalculateSum
DROP PROCEDURE IF EXISTS sp_GenerateReport
DROP TABLE IF EXISTS Subscriber
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">See that!!! this is so simple to remember and use in your daily routine queries.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Cheers</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121292099999991 73.711711099999988 31.98792009999999 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-29883240475243632872015-10-29T13:23:00.002+05:002019-01-26T23:19:14.912+05:00BENEFITS OF AYAT UL KURSI<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">1. <b>R</b>ecite while <b>L</b>eaving <b>Y</b>our <b>H</b>ouse, <b>A</b>nd 70,000 <b>A</b>ngels <b>W</b>ill <b>P</b>rotect <b>Y</b>ou from <b>A</b>ll sides.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">2. <b>R</b>ecite <b>O</b>n <b>E</b>ntering <b>Y</b>our <b>H</b>ome, <b>A</b>nd <b>P</b>overty <b>W</b>on't <b>E</b>nter <b>Y</b>our <b>H</b>ome.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">3. <b>R</b>ecite <b>A</b>fter <b>W</b>uzu, <b>A</b>nd <b>I</b>t <b>R</b>aises <b>Y</b>ou 70 <b>T</b>imes <b>I</b>n <b>A</b>llah's <b>R</b>ank.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">4. <b>R</b>ecite <b>B</b>efore <b>S</b>leeping <b>A</b>nd 1 <b>A</b>ngel <b>W</b>ill <b>P</b>rotect <b>Y</b>ou <b>T</b>he <b>W</b>hole <b>N</b>ight.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">5. <b>R</b>ecite <b>A</b>fter <b>F</b>ard <b>S</b>alah <b>A</b>nd <b>T</b>he <b>O</b>nly <b>T</b>hing <b>T</b>hat <b>I</b>s <b>S</b>eparating <b>Y</b>ou <b>F</b>rom <b>P</b>aradise <b>I</b>s <b>D</b>eath.</span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">If you pass this on Its <b>S</b>adqa-e-<b>J</b>aria (meaning you on getting rewarded for it, every time someone one acts upon it even when you have died, up until the day of judgement).</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121292099999991 73.711711099999988 31.98792009999999 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-54993504590932872412015-10-26T22:16:00.000+05:002019-01-26T23:28:34.597+05:00SOME GOLDEN WORDS OF PROPHET MUHAMMAD (صلى الله عليه وآله وسلم)<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>1. RESPECT 3 PEOPLE</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. TEACHER</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. PARENTS</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. ELDERLY</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>2. HAVE 3 THINGS IN YOU</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. HONESTY</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. FAITH</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. GOOD DEEDS</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>3. FREE YOURSELF FROM 3 THINGS</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. ARROGANCE (</span><span style="font-family: "arial" , "helvetica" , sans-serif;">THINKING OTHERS AS BELOW YOU AND DENYING THE TRUTH</span><span style="font-family: "verdana" , sans-serif;">)</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. CHEATING</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. DEBT</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>4. HAVE CONTROL OVER 3 THINGS</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. TONGUE</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. ANGER</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. SOUL (SELF DESIRES)</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>5. SAVE YOURSELF FROM 3 THINGS</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. BAD DEEDS</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. BACKBITING</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. JEALOUSY</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>6. OBTAIN 3 THINGS</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. KNOWLEDGE</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. MANNERS</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. PIETY</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>7. KEEP 3 THINGS PURE</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. BODY</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. CLOTHES</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. THOUGHTS</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>8. REMEMBER 3 THINGS</b></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> a. DEATH</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> b. FAVOR (OTHERS HELPING)</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> c. ADVICE</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121292099999991 73.711711099999988 31.98792009999999 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-61203131381844025242015-08-28T16:06:00.001+05:002019-01-26T23:37:17.082+05:00Custom Transpose In SQL Server<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">When we are playing with the database queries in order to create store procedure, triggers or job...we sometimes need to pass the comma separated string of integer values into the IN clause of SQL query.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Took the example from School where case is that we need to get the list of different Students based on StudentID provided in the procedure as a comma separated string.</span></div>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>DECLARE @StudentIdList AS VARCHAR(8000) = '1,10,15,18,22,45,99'
</code></pre>
<br />
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">So when we try to get the Student List based on this parameter using the IN clause as:</span></div>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>SELECT StudentID, StudentName, RollNumber, Age
FROM Student
WHERE StudentID IN (@StudentIdList)
</code></pre>
<br />
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">What happend!! when we try to run the above query. It will return the error on the IN parameter and mesage is mentioning that Cannot able to convert varchar to bigint....(something like that)</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">So how do we solve the problem???</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Here comes the powerful transpose concept. Here we will create a function which will convert the comma separated string into the table structure where each value will be place into the rows.</span></div>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>CREATE FUNCTION [dbo].[ParamsToTable]
(
@ParameterString VARCHAR(8000)
)
RETURNS @TblParam TABLE(IdString VARCHAR(10))
AS
BEGIN
DECLARE @SingleValue VARCHAR(10)
WHILE LEN(@ParameterString) > 0
BEGIN
SET @SingleValue = LEFT(@ParameterString, ISNULL(NULLIF(CHARINDEX(',', @ParameterString) -1, -1), LEN(@ParameterString)))
SET @ParameterString = SUBSTRING(@ParameterString, ISNULL(NULLIF(CHARINDEX(',', @ParameterString), 0), LEN(@ParameterString)) + 1, LEN(@ParameterString))
INSERT INTO @TblParam VALUES (@SingleValue)
END
RETURN
END
</code></pre>
<br />
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Use the above created function in your sql query in order to generate the desire result as:</span></div>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>SELECT StudentID, StudentName, RollNumber, Age
FROM Student
WHERE StudentID IN (SELECT * FROM ParamsToTable(@StudentIdList))
</code></pre>
<br />
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The reason to put the query block into the function is that by doing this we can use it on several places where we need such type of activity to perform.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Let me know if you have any query over this implementation.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Cheers</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com2Lahore, Pakistan31.55460609999999 74.35715809999999231.121292099999991 73.711711099999988 31.98792009999999 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-33614842784803888772015-08-26T16:29:00.000+05:002019-01-26T23:30:42.733+05:00Recursion In LINQ<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">A method which called itself is called "Recursive". These methods are extensively used in daily programming practices. We use it to solve the complex problems or puzzles we face in code. Using recursion add needless complication in other programs.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Before jump into the LINQ world, let me tell you the method definition and implementation. The method should contain the reference variable parameter. It checks a condition near the top of its method body, as many recursive algorithms do.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">So if you see the same method signature repeated many times in the call stack, you have a recursive method.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Back to topic, so how the we can acheive the recursion in LINQ query. It is good here to follow the example and write a LINQ query according to it.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Suppose I have list Candy. And each candy have different flavors while some flavor may extend to their child flavors. We need to calculate the 'Total Count' of candy flavors. How do we acheive this?</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Diagram of this case is like this tree:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>Candy --> Flavor1
Candy --> Flavor2 --> SubFlavor1 --> One, Two
Candy --> Flavor2 -->
Candy --> Flavor2 --> SubFlavor1 --> Three --> Four, Six
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>SOLUTION:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We will use 'SelectMany' in order to calculate the 'Total Flavors' count. When we use 'SelectMany', it collapses many elements into a single collection. The code logic will be:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>var flavorCount = candyList.SelectMany(sm => sm.Flavors).Count(); // C#
Dim flavorCount = candyList.SelectMany(Function(sm) sm.Flavors).Count() ' VB.NET
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">You see that!!! this is very simple in LINQ in order to count the 'Total Flavor'. Here I used 'SelectMany' in order to get the count. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Let me know if have any queries left.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Cheers</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121292099999991 73.711711099999988 31.98792009999999 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-84187272756652511282015-07-30T17:20:00.002+05:002019-01-26T23:31:31.342+05:00Updates In Visual Studio 2015<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In the month of July, 2015... a major release annoucement being made for VS 2015 and .Net Framework 4.6. This post is intent to share with you the great updates which are available in this version.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. ASP.NET Tooling Improvements:</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> a. JSON Editor</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> b. HTML Editor Updates</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> c. JavaScript Editor Improvements</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> d. ReactJS Editor Support</span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> e. Support for JavaScript package managers like Grunt, Gulp and Task Runners</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. ASP.NET 4.6 Runtime Improvements</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> a. HTTP/2 Support</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> b. Support for the .Net Compiler Platform</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> c. Async Model Binding For Web Forms</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. ASP.NET 5</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>4. Entity Framework</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> a. Entity Framework 6.x</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> b. Entity Framework 7</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">This the summary of updates came in this release. In order to read these updates in detail please visit the blog of Scott Guthrie:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><a href="http://weblogs.asp.net/scottgu/released-today-visual-studio-2015-asp-net-4-6-asp-net-5-ef-7-previews" target="_blank">http://weblogs.asp.net/scottgu/released-today-visual-studio-2015-asp-net-4-6-asp-net-5-ef-7-previews</a></span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0tag:blogger.com,1999:blog-4870227446731382568.post-23965566260062089182015-06-23T12:08:00.001+05:002019-01-26T23:31:59.071+05:00ERROR: MSDTC on server 'SomeServerName' is unavailable.<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">This exception is rise when you use '<u>TransactionScope</u>' in your LINQ to SQL or LINQ to Entity logic where updating the database with multiple tables at once. Exception is belongs to '<u>System.Data.SqlClient.SqlException</u>'. Exception is raised because of '<u>Distributed Transaction Coordinator</u>' which not enabled or running on your server/machine.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>SOLUTION:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We have three different types of methods available in order to fix the exception:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u>1. Check the firewall settings:</u></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In Run, type <u>firewall.cpl</u>.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click Exceptions Tab.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click Add Program.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Browse for <u>Msdtc.exe</u> (<u>normally found under C:\Windows\System32</u>).</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click Add Port.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In the Add A Port window, give a name in the Name field.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Give <u>135</u> in the Port Number Field.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Select TCP.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click OK.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>2. Start via Services</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u>Method A:</u></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">You can this by clicking <u>START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES</u>. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Find the service called '<u>Distributed Transaction Coordinator</u>'.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">RIGHT CLICK (on it and select) > Start.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u>Method B:</u></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Type <u>services.msc</u> in the run command box</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Select “<u>Services</u>” manager; Hit Enter</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Select the service “<u>Distributed Transaction Coordinator</u>”</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Right on the service and choose “<u>Start</u>”</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">3. Use this for windows Server 2008 r2</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click Start, click Run, type <u>dcomcnfg</u> and then click OK to open Component Services.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In the console tree, click to expand Component Services, click to expand Computers, click to expand My Computer, click to expand Distributed Transaction Coordinator and then click Local DTC.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Right click Local DTC and click Properties to display the Local DTC Properties dialog box.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click the Security tab.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Check mark "<u>Network DTC Access</u>" checkbox.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Finally check mark "<u>Allow Inbound</u>" and "<u>Allow Outbound</u>" checkboxes.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Click Apply, OK.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>VERIFICATION:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">We can check that either the '<u>Distributed Transaction Coordinator</u>' is enabled or not. In LINQ to Entity, we use '<u>TransactionScope.Complete();</u>' line at the end of transaction. Run the application using breakpoint and you can check that either this line is parsed successfully or raise error/exception. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">If it is parsed then it means '<u>Distributed Transaction Coordinator</u>' is enabled successfully and if it is not try the other method mentioned above in the post.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Let me know if you face any exception after implementing the suggested methods.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Cheers</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0tag:blogger.com,1999:blog-4870227446731382568.post-20243518647075999482015-01-07T11:26:00.000+05:002019-01-26T23:33:37.293+05:00WCF Project Templates in Visual Studio<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u>Article is copying from my publish article at</u> <a href="http://www.experts-exchange.com/Programming/Languages/C_Sharp/A_17517-WCF-Project-Templates-in-Visual-Studio.html" target="_blank">experts-exchange.com</a></span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Project templates provide the class structure and definition of service contracts, data contracts and other important features in Visual Studio for Windows Communication Foundation. Using these predefined template helps you to write a service with minimal code interaction and it will lead you to build more advanced services for your projects.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">There are four different types of templates present in Visual Studio. The first two are the most commonly used to build, test and deploy SOA architectural applications.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>1. <u>WCF Service Library: </u></b></span><br />
<span style="font-family: "verdana" , sans-serif;"></span><br />
<span style="font-family: "verdana" , sans-serif;">The WCF Service Library project (C#) consists of three files; IService1.cs, Service1.cs and App.config. The WCF Service Library project (VB.Net) is consists of three files; IService1.vb, Service1.vb and App.config.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">This type of project is suitable when we are focused on building the services first and deployment later.</span><br />
<br />
<ul>
<li><span style="font-family: "verdana" , sans-serif;"><b>IService File:</b> This is the interface where the WCF service attributes are applied. In this file you place the definitions of data contract methods/operations.</span></li>
<li><span style="font-family: "verdana" , sans-serif;"><b>Service File:</b> This file is inherited from IService interface file and includes the implementations of defined interface's data contract methods/operations. </span></li>
<li><span style="font-family: "verdana" , sans-serif;"><b>Application Configuration File:</b> In this file, you place the definitions of secure HTTP binding, endpoints of services and other important features.</span></li>
</ul>
<br />
<span style="font-family: "verdana" , sans-serif;"></span><br />
<span style="font-family: "verdana" , sans-serif;"><b>2. <u>WCF Service Application:</u></b></span><br />
<span style="font-family: "verdana" , sans-serif;">The WCF Service Application project (C#) is consists of four files; IService1.cs, Service1.svc, Service1.svc.cs and Web.config. The WCF Service Application project (VB.Net) is consists of four files; IService1.vb, Service1.svc, Service1.svc.vb and Web.config.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">This type of project template creates a web site to be deployed to a virtual directory and hosts a service in that website.</span><br />
<br />
<ul>
<li><span style="font-family: "verdana" , sans-serif;"><b>Service Contract File (IService):</b> The service contract interface file where you place the definitions of data contract operations.</span></li>
<li><span style="font-family: "verdana" , sans-serif;"><b>Service Host File (Service1.svc) and Service Implemnetation File (Service1.svc.cs):</b> This file is inherited from the service contract file and implements the data contract operations.</span></li>
<li><span style="font-family: "verdana" , sans-serif;"><b>Web Configuration File:</b> In this file, you place the definitions of secure HTTP binding, endpoints of services and other important features.</span></li>
</ul>
<br />
<div>
<span style="font-family: "verdana" , sans-serif;"><b>3. <u>WCF Workflow Service Application:</u></b></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;">The workflow (WF) service application can be accessed like a web service. It defines distinguish templates for XAML and other imperative programming models. We can create sequential and state machine workfow projects using these templates.</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"></span><br />
<div>
<span style="font-family: "verdana" , sans-serif;"><b>4. <u>Syndication Service Application:</u></b></span></div>
<span style="font-family: "verdana" , sans-serif;">
</span>
<br />
<div>
<span style="font-family: "verdana" , sans-serif;">This type of project template provides the syndication functionality in an application in which you can easily work with feeds in ATOM, RSS and other custom formats as a WCF service. These are allowed you to read and create them and also expose them on service endpoints.</span></div>
<span style="font-family: "verdana" , sans-serif;">
</span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Now hopefully, you'll understand the different project templates in WCF which will be create as per the demand and the requirement.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-11846291346095857402015-01-06T11:50:00.000+05:002019-01-26T23:33:55.376+05:00Encryption - Decryption using AES Algorithm<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u>Article is copying from my publish article at</u> <a href="http://www.experts-exchange.com/Programming/Languages/C_Sharp/A_17512-Encryption-Decryption-using-AES-Algorithm.html" target="_blank">experts-exchange.com</a></span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">You can find plenty of algorithms on the Internet that provide the Encryption - Decryption functionality. One of them is the AES algorithm. AES stands for "Advanced Encryption Standard".</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">The Advanced Encryption Standard was established by US National Institute of Standards and Technology in 2001. It was based; on the work of two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted the proposal to NIST during the selection process.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">In the AES algorithm, there is a terminology we use called 'Cipher Mode'. There are different types Cipher Modes present in the algorithm. Based on your specific needs and requirements you can select the Cipher Modes. Let's have a look at what these are and how they differentiate from other cipher modes.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>1. </b><u style="font-weight: bold;">Electronic Code Book Mode:</u> This mode doesn't require any feedback to be applied. You pass the plain text/data using this and and get the resulted Cipher data from it directly. The main disadvantage is that this mode will return the same cipher data on passing the same type of plain text in loop; if you pass 'Hello, World!' three times in this mode then it will return same cipher data in each iteration. That is why this mode is considered as 'Vulnerable' and not recommended for use.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>2. <u>Cipher Block Chaining Mode:</u></b> This mode is required to add the feeback to modify the pre-encrypted data; with the feedback it will make each cipher data different from previous result. This mode is commonly used to secure applications.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>3. <u>Cipher Feedback Mode:</u></b> This mode works like a Stream Cipher where data being processed can be shorter values rather than a larger block. In this mode, instead of passing the data to AES, it gets the XORed value that is generated from AES engine on the basis of previous message history. Here only XOR function is applied to the data and returns the smaller widths of data as compared to block size.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>4. <u>Output Feedback Mode:</u></b> This mode is quite similar with Cipher Feedback Mode, but does not use the Stream Cipher due to the weakness when the data width that doesn't match the blocksize of encryption algorithm.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>5. <u>Counter Mode:</u></b> This mode is also very common and used in to secure an application where count value of blocksized is maintained and encrypted using XOR. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">I'm going to use the C# Console Application in order to test AES algorithm different approaches. In this post I'm going to define two techniques of AES algorithm in order to Encrypt - Decrypt data.</span></div>
<h4 style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">1. First Technique: Using Aes Class which is inherited from SymmetricAlgorithm</span></h4>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>Main Method:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u><br /></u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>const string original = "Here is some data to encrypt!";
Console.WriteLine("Data to encypt/decrypt: " + original + "\n");
Console.WriteLine("New Technique");
// Create a new instance of the Aes class. This generates a new key and initialization vector (IV)
using (var aes = Aes.Create())
{
if (aes == null) return;
// Encrypt the string to an array of bytes
var encrypted = AesMode.NewEncryptMethod(original, aes.Key, aes.IV);
// Decrypt the bytes to a string
var decrypted = AesMode.NewDecryptMethod(encrypted, aes.Key, aes.IV);
//Display the encrypted data and the decrypted data
Console.WriteLine("Encrypted: {0}", Convert.ToBase64String(encrypted));
Console.WriteLine("Decrypted: {0}", decrypted);
}
</code></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>Classes Used:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u><br /></u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static byte[] NewEncryptMethod(string plainText, byte[] key, byte[] iv)
{
// Check arguments.
if (plainText == null || plainText.Length <= 0)
throw new ArgumentNullException("plainText");
if (key == null || key.Length <= 0)
throw new ArgumentNullException("key");
if (iv == null || iv.Length <= 0)
throw new ArgumentNullException("key");
byte[] encrypted = { };
// Create an Aes object with the specified key and IV
using (var aes = Aes.Create())
{
if (aes == null) return encrypted;
aes.Key = key;
aes.IV = iv;
// Create a decrytor to perform the stream transform.
var encryptor = aes.CreateEncryptor(aes.Key, aes.IV);
// Create the streams used for encryption.
using (var msEncrypt = new MemoryStream())
{
using (var csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
{
using (var swEncrypt = new StreamWriter(csEncrypt))
{
//Write all data to the stream.
swEncrypt.Write(plainText);
}
encrypted = msEncrypt.ToArray();
}
}
}
// Return the encrypted bytes from the memory stream.
return encrypted;
}
public static string NewDecryptMethod(byte[] cipherText, byte[] key, byte[] iv)
{
// Check arguments.
if (cipherText == null || cipherText.Length <= 0)
throw new ArgumentNullException("cipherText");
if (key == null || key.Length <= 0)
throw new ArgumentNullException("key");
if (iv == null || iv.Length <= 0)
throw new ArgumentNullException("key");
// Declare the string used to hold
// the decrypted text.
string plainText;
// Create an Aes object
// with the specified key and IV.
using (var aes = Aes.Create())
{
if (aes == null) return null;
aes.Key = key;
aes.IV = iv;
// Create a decrytor to perform the stream transform.
var decryptor = aes.CreateDecryptor(aes.Key, aes.IV);
// Create the streams used for decryption.
using (var msDecrypt = new MemoryStream(cipherText))
{
using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
{
using (var srDecrypt = new StreamReader(csDecrypt))
{
// Read the decrypted bytes from the decrypting stream and place them in a string
plainText = srDecrypt.ReadToEnd();
}
}
}
}
return plainText;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<h4 style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">2. Second Technique: Using Cipher Mode "ECB" and a priavate key</span></h4>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>Main Method:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u><br /></u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u></u></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>const string original = "Here is some data to encrypt!";
Console.WriteLine("Data to encypt/decrypt: " + original + "\n");
Console.WriteLine("\nOld Technique");
var encryptData = AesMode.OldEncryptMethod(original);
var decryptData = AesMode.OldDecryptMethod(encryptData);
//Display the encrypted data and the decrypted data
Console.WriteLine("Encrypted: {0}", encryptData);
Console.WriteLine("Decrypted: {0}", decryptData);
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>Classes Used:</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><u></u></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>// A key used to encode and later decode the data
private const string PrivateKey = "@pRiVaTeKeY123";
/// <summary>
/// OldEncryptMethod
/// </summary>
/// <param name="plainData">Contains plain data to encrypt</param>
/// <returns>Encrypt Data</returns>
public static string OldEncryptMethod(string plainData)
{
byte[] result;
var utf8Encoding = new UTF8Encoding();
var hashProvider = new MD5CryptoServiceProvider();
var tDesKey = hashProvider.ComputeHash(utf8Encoding.GetBytes(PrivateKey));
var tDesAlgorithm = new TripleDESCryptoServiceProvider
{
Key = tDesKey,
Mode = CipherMode.ECB,
Padding = PaddingMode.PKCS7
};
var dataToEncrypt = utf8Encoding.GetBytes(plainData);
try
{
var encryptor = tDesAlgorithm.CreateEncryptor();
result = encryptor.TransformFinalBlock(dataToEncrypt, 0, dataToEncrypt.Length);
}
finally
{
tDesAlgorithm.Clear();
hashProvider.Clear();
}
return Convert.ToBase64String(result);
}
/// <summary>
/// OldDecryptMethod
/// </summary>
/// <param name="encryptData">Contains encrypt data to decrypt</param>
/// <returns>Decrypt Data</returns>
public static string OldDecryptMethod(string encryptData)
{
byte[] results;
var utf8Encoding = new UTF8Encoding();
var hashProvider = new MD5CryptoServiceProvider();
var tDesKey = hashProvider.ComputeHash(utf8Encoding.GetBytes(PrivateKey));
var tDesAlgorithm = new TripleDESCryptoServiceProvider
{
Key = tDesKey,
Mode = CipherMode.ECB,
Padding = PaddingMode.PKCS7
};
var dataToDecrypt = Convert.FromBase64String(encryptData);
try
{
var decryptor = tDesAlgorithm.CreateDecryptor();
results = decryptor.TransformFinalBlock(dataToDecrypt, 0, dataToDecrypt.Length);
}
finally
{
tDesAlgorithm.Clear();
hashProvider.Clear();
}
return utf8Encoding.GetString(results);
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Hope it helps you to perform your action in fast pace. Stay tuned!</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-34835267510875962132014-12-19T13:01:00.001+05:002019-01-26T23:34:13.543+05:00Visual Studio Project Type GUIDs Cheet Sheet<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Every VS projects have a project type and some of the projects contains more than one type. Each project type is identified by a unique GUID. This GUID is present in the project file for class libraries project while projects like Web Site, GUID is present in the solution file.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Developer require this GUID in order to change the existing project type like suppose you want to change the type from Class Library to Web Application then you need to change its Project Type GUID in order to do so.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">The purpose of this post is to list down all the possible Project Type GUIDs which will help developers around the world to convert their projects to desireable choice.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">List of Project Type GUIDs are:</span></div>
<h3 style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>1.By Description</u></b></span></h3>
<div style="text-align: left;">
</div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 1.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{603C0E0B-DB56-11DC-BE95-000D561079B0}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 2.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F85E285D-A4E0-4152-9332-AB1D724D3325}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 3.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E53F8FEA-EAE0-44A6-8774-FFD645390401}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 4.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E3E379DF-F4C6-4180-9B81-6769533ABE47}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">C#</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">C++</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Database</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">F#</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F2A71F9B-5D33-465A-A702-920D77279786}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">J#</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Setup </span><span style="font-family: "courier new" , "courier" , monospace;">{978C614F-708E-4E1A-B201-565925725DBA}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Database (other project types)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{4F174C21-8C12-11D0-8340-0000F80270F8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Cab</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3EA9E505-35AC-4774-B492-AD1749C4943A}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Merge Module</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{06A35CCD-C46D-44D5-987B-CF40FF872267}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Smart Device Cab</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{AB322303-2255-48EF-A496-5904EB18DA55}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Distributed System</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F135691A-BF7E-435D-8960-F99683D2D49C}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Dynamics 2012 AX C# in AOT</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BF6F8E12-879D-49E7-ADF0-5503146B24B8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Legacy (2003) Smart Device (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{20D4826A-C6FA-45DB-90F4-C717570B9F32}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Legacy (2003) Smart Device (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{CB4CE8C6-1BDB-4DC7-A4D3-65A1999772F8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Model-View-Controller v2 (MVC2)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F85E285D-A4E0-4152-9332-AB1D724D3325}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Model-View-Controller v3 (MVC3)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E53F8FEA-EAE0-44A6-8774-FFD645390401}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Model-View-Controller v4 (MVC4)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E3E379DF-F4C6-4180-9B81-6769533ABE47}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Mono for Android</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">MonoTouch</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{6BC8ED88-2882-458C-8E55-DFD12B67127B}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">MonoTouch Binding</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Portable Class Library</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{786C830F-07A1-408B-BD7F-6EE04809D6DB}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{593B0543-81F6-4436-BA1E-4747859CAAE2}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{EC05E597-79D4-47f3-ADA0-324C4F7C7484}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint Workflow</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F8810EC1-6754-47FC-A15F-DFABD2E3FA90}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Silverlight</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A1591282-1198-4647-A2B1-27E5FF5F6F3B}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Smart Device (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{4D628B5B-2FBC-4AA6-8C16-197242AEB884}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Smart Device (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{68B1623D-7FB9-47D8-8664-7ECEA3297D4F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Solution Folder</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{2150E333-8FDC-42A3-9474-1A3956D46DE8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Test</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3AC096D0-A1C2-E12C-1390-A8335801FDAB}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">VB.NET</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Database Tools</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{C252FEB5-A946-4202-B1D4-9916A0590387}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Studio Tools for Applications (VSTA)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A860303F-1F3F-4691-B57E-529FC101A107}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Studio Tools for Office (VSTO)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BAA0C2D2-18E2-41B9-852F-F413020CAA33}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Web Application</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{349C5851-65DF-11DA-9384-00065B846F21}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Web Site</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E24C65DC-7377-472B-9ABA-BC803B73C61A}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows (Visual C++)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Communication Foundation (WCF)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3D9AD99F-2412-4246-B90B-4EAA41C64699}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 Blank/Hub/Webview App</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{76F1466A-8B6D-4E39-A767-685A06062A39}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 App (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{C089C8C0-30E0-4E22-80C0-CE093F111A43}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 App (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{DB03555F-0C8B-43BE-9FF9-57896B3C5E56}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Presentation Foundation (WPF)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{60DC8134-EBA5-43B8-BCC9-BB4BC16C2548}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Store (Metro) Apps & Components</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BC8A1FFA-BEE3-4634-8014-F334798102B3}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{14822709-B5A1-4724-98CA-57A101D1B079}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow Foundation</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{32F31D43-81CC-4C15-9DE6-3FC5453562B6}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Xamarin.Android</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Xamarin.iOS</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{6BC8ED88-2882-458C-8E55-DFD12B67127B}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (Windows)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{6D335F3A-9D43-41b4-9D22-F6F17C4BE596}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (XBox)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{2DF5C3F4-5A5F-47a9-8E94-23B4456F55E2}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (Zune)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{D399B71A-8929-442a-A9AC-8BEC78BB2433}</span></li>
</ul>
<br />
<h3 style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>2. By GUID</u></b></span></h3>
<div style="text-align: left;">
</div>
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Merge Module</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{06A35CCD-C46D-44D5-987B-CF40FF872267}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{14822709-B5A1-4724-98CA-57A101D1B079}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Legacy (2003) Smart Device (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{20D4826A-C6FA-45DB-90F4-C717570B9F32}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Solution Folder</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{2150E333-8FDC-42A3-9474-1A3956D46DE8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (XBox)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{2DF5C3F4-5A5F-47a9-8E94-23B4456F55E2}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow Foundation</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{32F31D43-81CC-4C15-9DE6-3FC5453562B6}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Web Application</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{349C5851-65DF-11DA-9384-00065B846F21}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Test</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3AC096D0-A1C2-E12C-1390-A8335801FDAB}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Communication Foundation (WCF)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3D9AD99F-2412-4246-B90B-4EAA41C64699}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Cab</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{3EA9E505-35AC-4774-B492-AD1749C4943A}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Smart Device (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{4D628B5B-2FBC-4AA6-8C16-197242AEB884}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Database (other project types)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{4F174C21-8C12-11D0-8340-0000F80270F8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{593B0543-81F6-4436-BA1E-4747859CAAE2}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 1.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{603C0E0B-DB56-11DC-BE95-000D561079B0}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Presentation Foundation (WPF)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{60DC8134-EBA5-43B8-BCC9-BB4BC16C2548}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Smart Device (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{68B1623D-7FB9-47D8-8664-7ECEA3297D4F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">MonoTouch</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{6BC8ED88-2882-458C-8E55-DFD12B67127B}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (Windows)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{6D335F3A-9D43-41b4-9D22-F6F17C4BE596}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 Blank/Hub/Webview App</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{76F1466A-8B6D-4E39-A767-685A06062A39}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Portable Class Library</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{786C830F-07A1-408B-BD7F-6EE04809D6DB}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">C++</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Setup</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{978C614F-708E-4E1A-B201-565925725DBA}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Silverlight</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A1591282-1198-4647-A2B1-27E5FF5F6F3B}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Studio Tools for Applications (VSTA)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A860303F-1F3F-4691-B57E-529FC101A107}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Database</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Deployment Smart Device Cab</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{AB322303-2255-48EF-A496-5904EB18DA55}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Studio Tools for Office (VSTO)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BAA0C2D2-18E2-41B9-852F-F413020CAA33}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Store Apps (Metro Apps)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BC8A1FFA-BEE3-4634-8014-F334798102B3}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">C# in Dynamics 2012 AX AOT</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{BF6F8E12-879D-49E7-ADF0-5503146B24B8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 App (C#)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"> </span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{C089C8C0-30E0-4E22-80C0-CE093F111A43}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Visual Database Tools</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{C252FEB5-A946-4202-B1D4-9916A0590387}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Legacy (2003) Smart Device (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{CB4CE8C6-1BDB-4DC7-A4D3-65A1999772F8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">XNA (Zune)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{D399B71A-8929-442a-A9AC-8BEC78BB2433}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Workflow (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Windows Phone 8/8.1 App (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;"> </span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{DB03555F-0C8B-43BE-9FF9-57896B3C5E56}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Web Site</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E24C65DC-7377-472B-9ABA-BC803B73C61A}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 4.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E3E379DF-F4C6-4180-9B81-6769533ABE47}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 3.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E53F8FEA-EAE0-44A6-8774-FFD645390401}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">J#</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint (VB.NET)</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{EC05E597-79D4-47f3-ADA0-324C4F7C7484}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Xamarin.Android / Mono for Android</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">Distributed System</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F135691A-BF7E-435D-8960-F99683D2D49C}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">VB.NET</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">F#</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F2A71F9B-5D33-465A-A702-920D77279786}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">MonoTouch Binding</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">ASP.NET MVC 2.0</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F85E285D-A4E0-4152-9332-AB1D724D3325}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">SharePoint Workflow</span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; white-space: pre;"> </span><span style="font-family: "courier new" , "courier" , monospace;">{F8810EC1-6754-47FC-A15F-DFABD2E3FA90}</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">C# {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</span></li>
</ul>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com1Karachi, Pakistan24.8614622 67.00993879999998624.400996699999997 66.364491799999982 25.3219277 67.655385799999991tag:blogger.com,1999:blog-4870227446731382568.post-15005008467842711662014-12-18T16:18:00.000+05:002019-01-26T23:37:39.195+05:00Typical Traps In WPF<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In WPF, few traps are present where developers required lots of time to resolve issues. In this post I'm going to list down the common errors arise in development and their solution so that developer would resolve them quickly.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<h4 style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>1. Layout Section</u></b></span></h4>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q1. Scrollbar is not active or visible</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> If your control is within a vertical stackpanel, it gives the control infinite height to layout. Consider replacing the stackpanel by a dockpanel.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q2. I created a data template and set HorizontalAlignment to Stretch but the item is not stretched</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> Set the HorizontalContentAlignment on the list to Stretch.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<h4>
<span style="font-family: "verdana" , sans-serif;"><b><u>2. DataBinding</u></b></span></h4>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q1. I changed a value, but the binding is not reflecting my changes</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> Check the following conditions:</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>a.</b> Check the output window in VisualStudio, if there are any binding errors.</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>b.</b> Does your data support INotifyPropertyChanged?</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>c.</b> Just firing a PropertyChanged event without changing the data does not work. Because the binding checks if oldvalue != newvalue</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<h4>
<span style="font-family: "verdana" , sans-serif;"><b><u>3. Performance</u></b></span></h4>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q1. My list of items takes too long to render</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> Your list is not virtualized. This means, all items will be generated, even if they are not visible. To avoid this check the following points:</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>a.</b> ScrollViewer.CanContentScrol must be set to False</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>b.</b> Grouping must be disabled</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>c.</b> You replaced the ItemsPanel by one that does not support virtualization</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>d.</b> You are using a too complex data template.</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q2. Animations cause a high CPU load</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> WPF cannot use hardware acceleration and does software rendering. This can be because of the following points:</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>a.</b> You have set AllowTransparency to True on your window.</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>b.</b> You are using legacy BitmapEffects instead of fast pixel shaders (Effects).</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>c.</b> Your graphics adapter or driver does not support DirectX</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b><u>4. Custom Controls</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q1. I created a custom control, but the template it not showing</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> Check the following conditions:</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>a.</b> Check if you have overriden the metadata of the DefaultStyleKeyProperty and set it to your type.</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>b.</b> Check if your template is surrounded by a style and both have the right TargetType</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>c.</b> Check if the resource dictionary that contains the default style is loaded</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Q2. I use {TemplateBinding} in my ControlTemplate, but is not working</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>Ans.</b> Check the following conditions:</span></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>a.</b> In most cases you have to replace {TemplateBinding Property} by {Binding Property RelativeSource={RelativeSource TemplatedParent}}</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>b.</b> You can only use TemplateBinding within the content of your control template. It will not work anywhere else!</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>c.</b> If you want to access a parent property in the trigger, you have to use a normal binding, with relative source Self.</span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"> <b>d.</b> TemplateBinding works only within the VisualTree of the template. You cannot use it on items that are only in the logical tree. Neighter on Freezables or to do two-way binding.</span></div>
</div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Karachi, Pakistan24.8614622 67.00993879999998624.400996699999997 66.364491799999982 25.3219277 67.655385799999991tag:blogger.com,1999:blog-4870227446731382568.post-9045687243188609072014-12-10T13:24:00.001+05:002019-01-26T23:38:25.578+05:00Extremely Helpful Extension Methods in C#<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Developers consumed lots of time before C# 3.0 to write methods but after C# 3.0, Microsoft introduces the terminology called "Extension Method" that is saving lots of developer time. Now they have to called these methods to done the matters quickly.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As per Microsoft's correspondence, Extension Methods allow you to create new functionality for existing types without modifying the actual type itself. Extension methods should contains these attributes: </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">a. The class has to be static.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">b. The method has to be static.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">c. The method's first parameter in the signature must have the "this" declared.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">You can create your own extension methods which will helps you throughout project and you can easily return the desire result by passing the method name. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Under below are list of powerful extension methods that will save your lots of development time.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As per rule (a), class has to be static so create static class and then place all the custom extension methods there; I created the custom Extension Method class as:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static class CustomExtensionMethods
{
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">As per rule (b, c), following custom extension method can reduce lots of your development time efforts.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. Calculate Age:</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> To calculate how old someone is:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static int CalculateAge(this DateTime dateTime)
{
var age = DateTime.Now.Year - dateTime.Year;
if (DateTime.Now < dateTime.AddYears(age))
{
age--;
}
return age;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. Has<T>()/Is<T>()/Add<T>()/Remove<T>()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> When you required an enumerated type are like flags instead of full items then use the following method:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static bool Has<T>(this System.Enum type, T value)
{
try
{
return (((int)(object)type & (int)(object)value) == (int)(object)value);
}
catch
{
return false;
}
}
public static bool Is<T>(this System.Enum type, T value)
{
try
{
return (int)(object)type == (int)(object)value;
}
catch
{
return false;
}
}
public static T Add<T>(this System.Enum type, T value)
{
try
{
return (T)(object)(((int)(object)type | (int)(object)value));
}
catch (Exception ex)
{
throw new ArgumentException(
string.Format("Could not append value from enumerated type '{0}'.",
typeof(T).Name), ex);
}
}
public static T Remove<T>(this System.Enum type, T value)
{
try
{
return (T)(object)(((int)(object)type & ~(int)(object)value));
}
catch (Exception ex)
{
throw new ArgumentException(
string.Format("Could not remove value from enumerated type '{0}'.",
typeof(T).Name), ex);
}
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. ToReadableTime()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> This method is useful when you required to display a message like 'One second ago'.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static string ToReadableTime(this DateTime value)
{
var timeSpan = new TimeSpan(DateTime.UtcNow.Ticks - value.Ticks);
double totalSecond = timeSpan.TotalSeconds;
if (totalSecond < 60)
{
return timeSpan.Seconds == 1 ? "one second ago" : timeSpan.Seconds + " seconds ago";
}
if (totalSecond < 120)
{
return "a minute ago";
}
if (totalSecond < 2700) // 45 * 60
{
return timeSpan.Minutes + " minutes ago";
}
if (totalSecond < 5400) // 90 * 60
{
return "an hour ago";
}
if (totalSecond < 86400) // 24 * 60 * 60
{
return timeSpan.Hours + " hours ago";
}
if (totalSecond < 172800) // 48 * 60 * 60
{
return "yesterday";
}
if (totalSecond < 2592000) // 30 * 24 * 60 * 60
{
return timeSpan.Days + " days ago";
}
if (totalSecond < 31104000) // 12 * 30 * 24 * 60 * 60
{
int months = Convert.ToInt32(Math.Floor((double)timeSpan.Days / 30));
return months <= 1 ? "one month ago" : months + " months ago";
}
var years = Convert.ToInt32(Math.Floor((double)timeSpan.Days / 365));
return years <= 1 ? "one year ago" : years + " years ago";
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>4. WorkingDay()/IsWeekend()/NextWorkday()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> When you want to display like 'Today is working day, weekend or determine the next working day' then:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static bool WorkingDay(this DateTime date)
{
return date.DayOfWeek != DayOfWeek.Saturday && date.DayOfWeek != DayOfWeek.Sunday;
}
public static bool IsWeekend(this DateTime date)
{
return date.DayOfWeek == DayOfWeek.Saturday || date.DayOfWeek == DayOfWeek.Sunday;
}
public static DateTime NextWorkday(this DateTime date)
{
var nextDay = date;
while (!nextDay.WorkingDay())
{
nextDay = nextDay.AddDays(1);
}
return nextDay;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>5. Next()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> Determine the Next date by passing in a DayOfWeek (i.e. From this date, when is the next Tuesday?)</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static DateTime Next(this DateTime current, DayOfWeek dayOfWeek)
{
int offsetDays = dayOfWeek - current.DayOfWeek;
if (offsetDays <= 0)
{
offsetDays += 7;
}
DateTime result = current.AddDays(offsetDays);
return result;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>6. str.ToStream()/stream.ToString()/CopyTo()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> If you want to take a large string and convert it to a Stream or vice-versa then use these:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static Stream ToStream(this string str)
{
byte[] byteArray = Encoding.UTF8.GetBytes(str);
return new MemoryStream(byteArray);
}
public static string ToString(this Stream stream)
{
var reader = new StreamReader(stream);
return reader.ReadToEnd();
}
public static void CopyTo(this Stream fromStream, Stream toStream)
{
if (fromStream == null)
{
throw new ArgumentNullException("fromStream");
}
if (toStream == null)
{
throw new ArgumentNullException("toStream");
}
var bytes = new byte[8092];
int dataRead;
while ((dataRead = fromStream.Read(bytes, 0, bytes.Length)) > 0)
{
toStream.Write(bytes, 0, dataRead);
}
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>7. Between() </b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> Check to see if a date is between two dates. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static bool Between(this DateTime dateTime, DateTime rangeStart, DateTime rangeEnd)
{
return dateTime.Ticks >= rangeStart.Ticks && dateTime.Ticks <= rangeEnd.Ticks;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "verdana" , sans-serif;"><b>8.RemoveLast() / RemoveLastCharacter() / RemoveFirst() / RemoveFirstCharacter()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> These tricky method save lot of time in the heat of string manipulation. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static string RemoveLastCharacter(this String str)
{
return str.Substring(0, str.Length - 1);
}
public static string RemoveLast(this String str, int number)
{
return instr.Substring(0, instr.Length - number);
}
public static string RemoveFirstCharacter(this String instr)
{
return str.Substring(1);
}
public static string RemoveFirst(this String str, int number)
{
return str.Substring(number);
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>9. ToFileSize</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> If you want to read the file of size then this method is easier to read the file size.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static string ToFileSize(this long size)
{
if (size < 1024) { return (size).ToString("F0") + " bytes"; }
if (size < Math.Pow(1024, 2)) { return (size / 1024).ToString("F0") + "KB"; }
if (size < Math.Pow(1024, 3)) { return (size / Math.Pow(1024, 2)).ToString("F0") + "MB"; }
if (size < Math.Pow(1024, 4)) { return (size / Math.Pow(1024, 3)).ToString("F0") + "GB"; }
if (size < Math.Pow(1024, 5)) { return (size / Math.Pow(1024, 4)).ToString("F0") + "TB"; }
if (size < Math.Pow(1024, 6)) { return (size / Math.Pow(1024, 5)).ToString("F0") + "PB"; }
return (size / Math.Pow(1024, 6)).ToString("F0") + "EB";
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>10. ToXmlDocument()/ToXDocument()</b></span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"> This extension method is very handy and will save you a load of time when you need to convert an XmlDocument into an XDocument and vice-versa:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code>public static XmlDocument ToXmlDocument(this XDocument xDocument)
{
var xmlDocument = new XmlDocument();
using (var xmlReader = xDocument.CreateReader())
{
xmlDocument.Load(xmlReader);
}
return xmlDocument;
}
public static XDocument ToXDocument(this XmlDocument xmlDocument)
{
using (var nodeReader = new XmlNodeReader(xmlDocument))
{
nodeReader.MoveToContent();
return XDocument.Load(nodeReader);
}
}
public static XmlDocument ToXmlDocument(this XElement xElement)
{
var stringBuilder = new StringBuilder();
var xmlWriterSettings = new XmlWriterSettings {OmitXmlDeclaration = true, Indent = false};
using (var xmlWriter = XmlWriter.Create(stringBuilder, xmlWriterSettings))
{
xElement.WriteTo(xmlWriter);
}
var xmlDocument = new XmlDocument();
xmlDocument.LoadXml(stringBuilder.ToString());
return xmlDocument;
}
public static Stream ToMemoryStream(this XmlDocument xmlDocument)
{
var memoryStream = new MemoryStream();
xmlDocument.Save(memoryStream);
memoryStream.Flush();//Adjust this if you want read your data
memoryStream.Position = 0;
return memoryStream;
}
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Hope these custom extension methods will helps you to reduce your development time and efforts. Stay tuned!</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Karachi, Pakistan24.8614622 67.00993879999998624.400996699999997 66.364491799999982 25.3219277 67.655385799999991tag:blogger.com,1999:blog-4870227446731382568.post-61021096309035408192014-11-12T23:24:00.005+05:002019-01-26T23:38:59.837+05:00Getting started with WPF<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Windows Presentation Foundation (WPF) is a new GUI framework of Microsoft as compare with Win Forms. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Graphical User Interface (</span><span style="font-family: "verdana" , sans-serif;">GUI)</span><span style="font-family: "verdana" , sans-serif;"> allows you to create an application with the wide variety of GUI controls.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">For .NET developers the more interesting frameworks are WinForms and WPF. WPF is the newest GUI framework by Microsoft and developer have a choice to use either WinForms or WPF because Microsoft still support the earlier version GUI framework called "WinForms".</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Both frameworks serves the same purpose but still there is LOT of differences between them like major difference is that The WinForms is a layer on top of the standard windows control while WPF is build from scratch and doesn't relies on windows control.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">This is the just one difference but when you will start working on WPF, you'll see many more differences. Let me give you some advantages of both frameworks</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>WPF Advantages:</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. </b>It's more flexible, so you can do more things without having to write or buy new controls.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. </b>Uses hardware acceleration for drawing the GUI, for better performance.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. </b>It allows you to make user interfaces for both Windows applications and web applications.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>WinForms Advantages:</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>1. </b>It's older and thereby more tried and tested.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>2. </b>There are already a lot of 3rd party controls that you can buy or get for free.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><b>3. </b>The designer in Visual Studio is still, as of writing, better for WinForms than for WPF, where you will have to do more of the work yourself with WPF.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Now back to WPF, it is a combination of XAML (markup) and C#/VB.NET/any other .NET language. XAML, which stands for eXtensible Application Markup Language, is Microsoft's variant of XML for describing a GUI.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">So let get started with very basic and most popular example "Hello, World!".</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In Visual Studio, click on New project from the File menu. On the left, focus on C# and select Windows from tree. Now from right panel you can see "WPF Application" template. Select a WPF Application and named the project as "HelloWorld", then press the Ok button.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Now once project is created successfully, open the "MainWindow.xaml". MainWindow.xaml is the primary window of this project whenever you run the application it will show there unless you change this to another window.</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Default XAML code of MainWindow.xaml file will look like this:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"></span><br />
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span style="font-family: "verdana" , sans-serif;"><code><Window x:Class="HelloWorld.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
</code></span></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Here we want to display the "Hello, World!" text whenever application load, so place the text there in window as:</span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><Window x:Class="HelloWorld.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Main Window" Height="350" Width="525">
<Grid>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="72">
Hello, World!
</TextBlock>
</Grid>
</Window>
</code></pre>
</div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">Try running the application now (select Debug -> Start debugging or press F5) and see the beautiful result of your hard work - your first WPF application. </span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "verdana" , sans-serif;">In future, I'll post the more tutorials related to WPF and those will help you to learn the WPF quickly. Let me know if any query remains. Cheers!</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com1Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-84443551141124993212014-09-16T20:38:00.001+05:002019-01-26T23:39:28.544+05:00Story about Imran Khan<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;">ﺑﺎﮐﺴﺘﺎﻧﯿﻮ ﻭﮦ 103 ﺑﺨﺎﺭ ﻣﯿﮟ ﺗﭗ ﺭﮨﺎ ﺗﮭﺎ ، ﻭﮦ ﮔﺰﺷﺘﮧ ﭼﺎﻟﯿﺲ ﮔﮭﻨﭩﻮﮞ ﺳﮯ ﺳﻔﺮ ﻣﯿﮟ ﺗﮭﺎ ﺍﯾﮏ ﺁﻧﮑﮫ ﻧﮩﯿﮟ ﺳﻮﯾﺎ ﻭﮦ ﺑﺎﺭﺵ ﻣﯿﮟ ﺑﮭﯿﮓ ﮐﺮ ﻣﺰﯾﺪ ﺑﯿﻤﺎﺭ ﮨﻮ ﮔﯿﺎ ﺗﮭﺎ. ﻟﯿﮑﻦ ﺳﻮﭼﻨﮯ ﮐﯽ ﺑﺎﺕ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﺲ ﮐﮯ ﻟﯿﺌﮯ ﻭﮨﺎﮞ ﮐﮭﮍﺍ ﺗﮭﺎ ؟ ﺍﭘﻨﮯ ﻟﯿﺌﮯ ؟ ﺍﺱ ﮐﮯ ﭘﺎﺱ ﮐﺲ ﭼﯿﺰ ﮐﯽ ﮐﻤﯽ ﮨﮯ ؟</span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"> ﺁﺝ ﺍﮔﺮ ﻭﮦ ﮐﺴﯽ ﺳﭙﻮﺭﭨﺲ ﭼﯿﻨﻞ ﮐﮯ ﻟﯿﺌﮯ ﺁﺭﭨﯿﮑﻞ ﻟﮑﮭﮯ ﯾﺎ ﭼﻨﺪ ﻣﯿﭽﺰ ﻣﯿﮟ ﮐﻤﻨﭩﺮﯼ ﮐﺮ ﺩﮮ ﺗﻮ ﻻﮐﮭﻮ ﮈﺍﻟﺮ ﺍﻭﺭ ﭘﻮﻧﮉ ﮐﻤﺎ ﺳﮑﺘﺎ ﮨﮯ ﮔﮭﺮ ﺑﯿﭩﮭﮯ ﮨﻮﺋﮯ , ﻭﮦ ﮔﮭﺮ ﺑﯿﭩﮫ ﮐﺮ ﭘﯿﺴﮯ ﮐﻤﺎ ﺳﮑﺘﺎ ﮨﮯ ﺍﺱ ﺳﮯ ﻧﮧ ﺗﻮ ﮐﻮﺋﯽ ﺍﺳﮑﯽ ﮐﺮﺩﺍﺭ ﮐﺸﯽ ﮐﺮﮮ ﮔﺎ ﻧﮧ ﮐﻮﺋﯽ ﭘﭩﻮﺍﺭﯼ ﺍﺳﮯ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﮔﺎ , ﻧﮧ ﮐﻮﺋﯽ ﺍﺱ ﭘﺮ ﺟﮭﻮﭨﮯ ﺍﻭﺭ ﻣﻦ ﮔﮭﮍﺕ ﺍﻟﺰﺍﻡ ﻟﮕﺎﺋﮯ ﮔﺎ .ﻭﮦ ﺁﺭﺍﻡ ﺳﮯ ﺑﯿﭩﮫ ﮐﺮ ﻋﯿﺎﺷﯽ ﺳﮯ ﺁﺳﻮﺩﮦ ﺯﻧﺪﮔﯽ ﮔﺰﺍﺭ ﺳﮑﺘﺎ ﮨﮯ </span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"> ﻣﮕﺮ ﻭﮦ ﺩﻥ ﺭﺍﺕ ﺧﻮﺍﺭ ﮨﻮ ﺭﮨﺎ ﮨﮯ ﭨﮑﮯ ﭨﮑﮯ ﮐﻮ ﻟﻮﮔﻮﮞ ﮐﯽ ﮔﺎﻟﯿﺎﮞ ﺳﻦ ﺭﮨﺎ ﮨﮯ ﺍﺳﮑﯽ ﮐﺮﺩﺍﺭ ﮐﺸﯽ ﮐﯽ ﺟﺎ ﺭﮨﯽ ﮨﮯ ﺩﻥ ﺭﺍﺕ ﺍﺱ ﭘﺮ ﮨﺎﺗﮫ ﺑﮭﺮ ﺑﮭﺮ ﮐﮯ ﮐﯿﭽﮍ ﺍﭼﮭﺎﻻ ﺟﺎ ﺭﮨﺎ ﮨﮯ ، ﻃﺮﺡ ﻃﺮﺡ ﮐﮯ ﮔﮭﭩﯿﺎ ﺍﻟﺰﻣﺎﺕ ﻟﮕﺎﺋﮯ ﺟﺎ ﺭﮨﮯ ﮨﯿﮟ ﺟﻦ ﮐﻮ ﮔﻠﯽ ﮐﺎ ﮐﺘﺎ ﻧﮩﯿﮟ ﺟﺎﻧﺘﺎ ﺁﺝ ﻭﮦ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﺭﮨﮯ ﮨﯿﮟ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﺟﺲ ﻧﮯ ﺍﺱ ﻣﻠﮏ ﮐﮯ ﻟﯿﮯ ﺍﭘﻨﯽ ﺯﻧﺪﮔﯽ ﺩﺍﺅ ﭘﺮ ﻟﮕﺎ ﺩﯼ ﺍﺱ ﺍﻧﺴﺎﻥ ﮐﻮ ﮔﺎﻟﯿﺎﮞ ﺩﮮ ﺭﮨﮯ ﮨﯿﮟ ﺟﺲ ﻧﮯ ﺍﺱ ﻣﻠﮏ ﮐﻮ ﮐﯿﻨﺴﺮ ﺍﺳﭙﺘﺎﻝ ﺟﯿﺴﺎ ﺍﺩﺍﺭﮦ ﺑﻨﺎ ﮐﺮ ﺩﯼ ﺍﺱ ﮐﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﺮﭘﺸﻦ ﮐﮯ ﺧﻼﻑ ﺑﺎﺕ ﮐﺮﺗﺎ ﮨﮯ</span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"> ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﻟﻮﭨﯽ ﮨﻮﺋﯽ ﺩﻭﻟﺖ ﻭﺍﭘﺲ ﻣﻠﮏ ﻣﯿﮟ ﻻﺋﯽ ﺟﺎﮰ ﺍﻭﺭ ﻋﻮﺍﻡ ﭘﺮ ﺧﺮﭺ ﮐﯽ ﺟﺎﮰ ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﻋﻮﺍﻡ ﮐﮯ ﭨﯿﮑﺲ ﮐﺎ ﭘﯿﺴﮧ ﻭﺍﻡ ﭘﺮ ﺧﺮﭺ ﮐﯿﺎ ﺟﺎﮰ . ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮧ ﮨﮯ ﮐﮧ ﻭﮦ ﭼﺎﮨﺘﺎ ﮨﮯ ﮐﮧ ﺍﻣﺮﯾﮑﮧ ﺍﻭﺭ ﺩﻭﺳﺮﮮ ﻣﻤﺎﻟﮏ ﮐﯽ ﻏﻼﻣﯽ ﮐﺎ ﻃﻮﻕ ﮔﻠﮯ ﺳﮯ ﺍﺗﺎﺭﺍ ﺟﺎﮰ ﺍﺳﮑﺎ ﺟﺮﻡ ﯾﮩﯽ ﮨﮯ ﮐﮧ ﻭﮦ ﮐﮩﺘﺎ ﮨﮯ ﮐﮧ ﺑﯿﺮﻭﻧﯽ ﻗﺮﺿﮯ ﺑﻨﺪ ﮐﺮ ﺍﯾﮏ ﻣﻠﮑﯽ ﻭﺳﺎﺋﻞ ﮐﻮ ﺑﺮﻭﺋﮯ ﮐﺎﺭ ﻟﯿﺎ ﺟﺎﮰ ﺍﺳﮑﮯ ﺟﺮﺍﺋﻢ ﮐﯽ ﻓﮩﺮﺳﺖ ﺑﮩﺖ ﻟﻤﺒﯽﮨﮯ ﺩﻭﺳﺘﻮ ﮐﺎﺵ ﮐﮧ ﯾﮧ ﺟﺮﺍﺋﻢ ﺍﺱ ﻣﻠﮏ ﮐﺎ ﮨﺮ ﻓﺮﺩ ﮐﺮﮮ ﺗﻮ ﯾﮧ ﻣﻠﮏ ﺟﻨﺖ ﺑﮯ ﻧﻈﯿﺮ ﺑﻦ ﺟﺎﮰ ﮐﺎﺵ ﮐﮧ ﺍﯾﺴﮯ ﻣﺠﺮﻡ ﭘﺎﮐﺴﺘﺎﻥ ﻣﯿﮟ ﺳﺒﮭﯽ ﮨﻮ ﺟﺎﺋﯿﮟ ﺗﻮ ﯾﮧ ﻣﻠﮏ ﺩﻧﯿﺎ ﭘﺮ ﺭﺍﺝ ﮐﺮﮮ </span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-48070071177939123272014-09-15T19:00:00.001+05:002019-01-26T23:39:48.326+05:00C# 6 Language Enhancements<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Here I'd like to discuss some new features in C# 6, the upcomming version of C# that will ship with next version of Visual studio. The initial buzz about the next version of C# is that C# compiler complete rewrite, written in C# from ground up. C# 6 gives you a lot of features that enhance your productivity both writing and reading C# code.</span></div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
1. <u>PRIMARY CONSTRUCTORS:</u></h3>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">C# 6 introduces the "Primary Constructor" concept, a way to express an initializing constructor in more concise syntax. </span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>===========</b></span></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">NEW WAY:</span></b></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>===========</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public class Person(string first, string last) </div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
public string First { get; } = first;</div>
<div style="text-align: justify;">
public string Last { get; } = last;</div>
<div style="text-align: justify;">
}</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">===============</span></b></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">CURRENT WAY:</span></b></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">===============</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public class Person</div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
private string first;</div>
<div style="text-align: justify;">
private string last;</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public Person(string first, string last)</div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
this.first = first;</div>
<div style="text-align: justify;">
this.last = last;</div>
<div style="text-align: justify;">
}</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public string First { get { return first; } }</div>
<div style="text-align: justify;">
public string Last { get { return last; } }</div>
<div style="text-align: justify;">
}</div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
2. <u>AUTO PROPERTY INITIALIZERS:</u></h3>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Another good feature C# 6 introduce is "Auto Property Initializer", syntax for initializing properties to set constant values on any property.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>=========</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>NEW WAY:</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>=========</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public class Person</div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
public string First { get; set; } = "Jane";</div>
<div style="text-align: justify;">
public string Last { get; set;} = "Doe";</div>
<div style="text-align: justify;">
} </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
And, it works on read only properties:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
public class Person</div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
public string First { get; } = "Jane";</div>
<div style="text-align: justify;">
public string Last { get; } = "Doe";</div>
<div style="text-align: justify;">
}</div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
3. <u>MATH CLASS: </u></h3>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">C# 6 introduces the "<b>MATH</b>" class - a single class instead of entire namespace. It’s another small language change that removes some friction in writing and reading code.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">using System.Math;</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Once you add that, you can reference any members of the System.Math class without any namespace or class qualifer:</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">var x = Sqrt(3*3 + 4*4);</span></div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
4. <u>DICTIONARY INITIALIZERS: </u></h3>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">C# 6 introduced a feature called "Lightweight dynamic" the feature that has changed names as it was refined. The concept is grab from JavaScript and JSON language and this feature allow C# to create <b>DTO</b>s (data transfer objects) in much lighter way rather than going through the overhead of creating a strongly typed class that had no behavior.</span></div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
5. <u>EXCEPTION FILTERS: </u></h3>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">This feature brings C# up to parity with VB.NET. They work as follows:</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
try </div>
<div style="text-align: justify;">
{ </div>
<div style="text-align: justify;">
// … </div>
<div style="text-align: justify;">
} catch (MyException e) if (myfilter(e)) </div>
<div style="text-align: justify;">
{</div>
<div style="text-align: justify;">
// … </div>
<div style="text-align: justify;">
} </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The catch clause will only be executed if myfilter(e) returns true. Otherwise, any catch clauses that follow are evaluated, or the exception propagates up the call stack.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com1Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-56668478121839939042014-09-12T00:39:00.001+05:002019-01-26T23:40:17.471+05:00Difference Between A Resume, Bio-Data & CV<h3>
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">1. BIO DATA: </span></b></h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">One page consisting attributes, hobbies, interests and educational qualification of person.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">2. RESUME : </span></b><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">One to two pages "summary" of skills, education qualification and experience of person.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">3. CV : </span></b><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">A longer, more detailed synopsis, indicating professional experience of a person.</span>M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0tag:blogger.com,1999:blog-4870227446731382568.post-68738242872764966792014-09-01T18:11:00.001+05:002019-01-26T23:40:43.916+05:00WCF and ASP.NET Web API<table border="1" cellpadding="0" cellspacing="0" style="background-color: white; border-collapse: collapse; border: medium none; color: #333333; outline: none 0px;">
<tbody style="outline: none 0px;">
<tr style="outline: none 0px;">
<td style="border: 1pt solid windowtext; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<h2 style="text-align: center;">
<span style="outline: none 0px;"><b style="outline: none 0px;">WCF</b></span></h2>
</div>
<div style="margin-bottom: 0.0001pt; outline: none 0px;">
<br /></div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: solid solid solid none; border-top-color: windowtext; border-width: 1pt 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<h2 style="text-align: center;">
<span style="outline: none 0px;"><b style="outline: none 0px;">ASP.NET Web API</b></span></h2>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
HTTP only. First-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc enabling wide reach.
</span>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Enables building services that support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Enables building Web APIs that support wide variety of media types including XML, JSON etc.
</span>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Uses basic protocol and formats such as HTTP, WebSockets, SSL, JQuery, JSON, and XML. There is no support for higher level protocols such as Reliable Messaging or Transactions.
</span>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Supports Request-Reply, One Way, and Duplex message exchange patterns.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
HTTP is request/response but additional patterns can be supported through SignalRand WebSockets integration.
</span>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
WCF SOAP services can be described in WSDL allowing automated tools to generate client proxies even for services with complex schemas.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
There is a variety of ways to describe a Web API ranging from auto-generated HTML help page describing snippets to structured metadata for OData integrated APIs.
</span>
</div>
</td>
</tr>
<tr style="outline: none 0px;">
<td style="border-bottom-color: windowtext; border-left-color: windowtext; border-right-color: windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Ships with the .NET framework.
</span>
</div>
</td>
<td style="border-bottom-color: windowtext; border-right-color: windowtext; border-style: none solid solid none; border-width: medium 1pt 1pt medium; outline: none 0px; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div style="margin-bottom: 0.0001pt; outline: none 0px;">
<span style="outline: none 0px;">
Ships with .NET framework but is open-source and is also available out-of-band as independent download.
</span>
</div>
</td>
</tr>
</tbody>
</table>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-76704532116973389852014-08-27T00:40:00.000+05:002019-01-26T23:45:53.443+05:006 Key Points Helps You Better Start First Day At Work!<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">First day at work is like your first day in school. Sometimes people get nervous on 1st day relate to office environment and meet with different culture peoples. I'd like to share few points which helps you to make a better start.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>1. Punctual:</b> Make provisions to complete the task before hand; punctuality speaks volume. Being an early comer and an on-time departer adds to the impression, it shows your commitment towards work.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>2. Proper Dress:</b> Physical appearance will matter in order to communicate with others in office. When you are in college or university, you could simply wake up and grab unwashed jeans and it could still '<i>look</i>' appropriate. But when you are work in office then that is not appropriate.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>3. Silent the Phone:</b> Activate the silent mode of your phone. Your phone messages can wait, if there is something urgent then you will receive a call. Continuously reply messages is a sign of restlessness and is considered rude when you are in meeting with your colleagues.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>4. Be Positive:</b> Be grateful, not just in your verbal interactions but also thank everybody who helped you out. Its not necessary to keep a smile plastered to you face, but be interactive. Do not say you ‘cannot do’ something because you haven’t even taken up a project yet.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>5. Listen & Observe:</b> Always be patience and to wait, watch, absorb and then respond. Put off being ‘<i>Mr-Know-It-All</i>’ and control the urge to voice your opinion unless asked for, especially if you do not have any knowledge and there are two seniors deep in a conversation.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>6. Ask questions:</b> The biggest mistake one can do is to silently and dumbly follow without knowing why! If you have any queries, make a list and find a person who would be suitable to address them. Do not hold back and hesitate because if you do not understand the concept, you will be absolutely blank while executing in the future.</span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051tag:blogger.com,1999:blog-4870227446731382568.post-81512736650082219942014-08-26T22:51:00.001+05:002019-01-26T23:46:06.071+05:00The Ten People You Need in Your Network to Accelerate Your Career<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">There are many ways to advance your career, but it is rarely a straight path. You can advance your career by staying with one company and methodically climbing up the ladder, although this method is on the downswing.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">You can advance your career by leaving companies every 3 to 5 years. Or you can quit your job and start your own company, which often leads to new career opportunities, even if the company fails.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">In reviewing my career, I’ve realized that there are certain types of people that have consistently helped me advance to the next level. I’ve been able to use them as sounding boards and ask questions that I normally wouldn't ask, and they’d provide honest feedback. This was extremely important. These are the ten people you need to have relationships with in order to accelerate your career:</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>CAREER COACH</b> - Someone who has already done what you WANT to do, or someone who is advancing their career without being overworked. Overworked people are not good people to talk to.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>FINANCIAL ADVISOR</b> - Someone who lives the life you want to live and is better at saving and investing money than you are. Ideally this is someone who makes less money than you but lives a "better" life. This person doesn’t have to be a professional financial advisor - just someone who is good at it.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>AUTHOR / BLOGGER</b> - Someone who has written a book, or who blogs consistently. It's important to watch them as they handle criticism of their work. Writing in public opens you up to criticism, and the best writers respond to that criticism constructively</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>CEO / VP OF A LARGE COMPANY</b> - Someone who manages big accounts or big teams for a large company. These resources are obviously the toughest to make a connection and build a relationship with unless you have one already. If you do get the chance, it is important to try to build a relationship with them. These resources know how business works and can give you insight into navigating large companies.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>ENTREPRENEUR - STARTER</b> - Someone who has started something from scratch and still works on it. I find that these types of people motivate me to keep going. It's also great to keep your ears and eyes close to the startup scene.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>ENTREPRENEUR - SUCCESSFUL</b> - Someone who has started and built a successful company. Ideally they have given multiple talks on their success or how to be successful. You can learn a lot from these types of people and many of the successful entrepreneurs WANT to give back.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>NON TRADITIONAL CAREER</b> - Someone who doesn't have a traditional job (i.e. who travels and works remotely. Has no home.) I have always been amazed by this type of person. They’ve figured out how to manage their finances and earn an income without having to go to the same office every day. Ask them how they do it.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>SPOUSE</b> - Someone you get along with and who doesn't hate you. Someone that listens to you! I would be nowhere if my wife weren’t supportive of me. I'm very happy that my wife supports my work.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>RESOURCEFUL TECH GUY/GIRL</b> - Someone you can call with any tech question. NOT the guy you call to ask, “My computer is broken. Can you fix it?” The one you ask, "How would I create a super simple website for my business?" type of question that tech guys can answer. Tech people are slowly taking ove the world. There are resources online for almost anything that you are looking to accomplish.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>SUPER CONNECTOR</b> - Someone who knows everyone or can get you to someone who knows someone quickly. If you build a great relationship with a super connector, finding the above people will become much easier! Obviously, you have to have something to offer to entice the super connector to connect you with others who can help you.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The core principal of all these types is that they must have energy and integrity. Integrity in the business world is a must, but you will find plenty of people who do not believe that mantra. Have integrity in everything you do and surround yourself with others who believe in living a life with integrity.</span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>Author:</b> <a href="https://www.linkedin.com/today/post/article/20140826124159-9522584-the-ten-people-you-need-in-your-network-to-accelerate-your-career?trk=mp-details-rc" target="_blank">Robbie A.</a></span></div>
M Atif Nadeemhttp://www.blogger.com/profile/06055704971520572194noreply@blogger.com0Lahore, Pakistan31.55460609999999 74.35715809999999231.121273099999989 73.711711099999988 31.987939099999991 75.0026051