Wednesday, December 16, 2009

Is it the same for everybody ?




Something to think..
Thought how true that is.... and will be....

Thursday, December 3, 2009

For Future Reference


The most common answer to this problem is to go to the Data menu and choose Show Data Sources. This option does not appear for me.
The Show Report Data Pane keyboard shortcut did work for me: CTRL+ALT+D. There is nothing in the menus that I could find that does this same thing.

WeakReference Class
http://msdn.microsoft.com/en-us/library/system.weakreference.aspx





Caching Dynamically Created Images
private void writeContent(HttpContext context, byte[] content, string contentType)
{

context.Response.Cache.SetExpires(DateTime.Now.AddMinutes(60));
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetValidUntilExpires(false);

context.Response.ContentType = contentType;
context.Response.BinaryWrite(content);
}

Use this SP when you need to find all the SP Names which contains a certain term :

e.g if i need to search for the term 'orders', the following will return all the SPs which contains it

declare @SearchTerm varchar(50)
SET @SearchTerm = 'orders'

SELECT
ROUTINE_NAME,
ROUTINE_DEFINITION
FROM
INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_DEFINITION LIKE '%' + @SearchTerm + '%'
ORDER BY
ROUTINE_NAME

Copy Data Between DB Tables:

INSERT INTO [DBDestination].[dbo].[TableA]([Col1],[Col2],[Col3],[Col4],[Col5],[Col6])

SELECT [Col1],[Col2],[Col3],[Col4],[Col5],[Col6]
FROM [DBSource].[dbo].[TableA]







Monday, September 7, 2009

Microsoft Web Platform Installer

One of the cool new releases coming out this year is a small download manager - the Microsoft Web Platform Installer - that makes installing and configuring web server and web development stacks really easy. It is a free tool that you can download from the www.microsoft.com/web site (here is the direct link to the installer – choose the 2.0 version). It works with Windows XP, Vista, Windows 7, Windows Server 2003 and Windows Server 2008.

The Web Platform Installer provides an easy way to quickly install and customize all the software you need to develop or deploy web sites and applications on a Windows machine. The tool automatically analyses what your system currently has installed, allows you to easily mark additional components to be added, and then automates installing them all at once when you click the install button (saving you from having to manually install each one yourself).

For example, you can click the “Web Server” section above to customize the individual IIS web server modules installed on the box. This includes both the built-in IIS modules that ship with Windows (like the directory browsing module), as well as additional modules available as separate downloads. Below I’ve selected two additional modules – the Application Request Routing and URL Rewrite modules – to be installed:

The URL Rewrite module is a free Microsoft module that enables you to publish custom URLs from your sites and optimize them for search engine optimization (SEO). You can enforce SEO rules (consistent casing, embedded keywords, etc) and customize how your site looks from an external perspective however you want (the admin tool will even help guide you to write the regular expression rules):

The Application Request Routing is a free Microsoft module that supports forward-proxy style scenarios, and enables dynamic load-balancing of requests across multiple web-server machines (allowing you to scale out, move machines behind DMZ firewall scenarios, and bring machines in and out of a farm for maintenance without disruption).

In addition to URL Rewrite and Application Request Routing, there are dozens of other web server modules you can select that enable WebDAV, Secure FTP, automated deployment, remote database management through the IIS admin tool for hosted scenarios, media server streaming scenarios, and more. You can also install framework additions like ASP.NET MVC, .NET 3.5 SP1, SQL Express and associated SQL administration tools, Visual Web Developer 2008 Express, and more.

Windows Web Application Gallery

The web platform installer also integrates with the new Windows Web Application Gallery now online: www.microsoft.com/web/gallery

This gallery allows you to easily install existing web applications onto your server. The gallery contains a variety of popular .NET open source applications (like DotNetNuke, ScrewTurn Wiki and Umbraco CMS) as well as PHP open source applications (including WordPress and Drupal). You can easily browse and install them using the Web Platform Installer as well (just click the “Web Applications” tab and check the applications you want to install):

;

In addition to downloading the application, the web platform installer will create a new site/application root and configure the appropriate site settings and optionally install the database.

Thursday, August 13, 2009

Business Drives The World

This was one of the sites i came across useful in my day today business activities. As it claims.. it's World’s biggest online space for Sri Lankan products.
eBizSriLanka offers high quality, high standard and trusted products from Sri Lanka, the pearl of the Indian Ocean

To experince the power ... Log On to,

Wednesday, July 22, 2009

Quick rules for Update Panels

Quick rules I follow with update panels ->

  • write your page without UpdatePanels as if they did not exist.
  • Then narrow down to the section or part of the markup that needs to be updated and only move that into update panels.
  • If you know if elements that have client side handlers hooked up for example the ok/cancel buttons for modal popup those should not be inside update panels because after the postback the handler will be rendered useless.

Saturday, June 6, 2009

It's Slippery.. Watch Out

"If you occupy yourself constructively, you will naturally be protected from being occupied destructively" by IM

Living a simple life is a strength for you and me where we always have the ability and strength to go back to a lower status than we are now and still be happy and content with what we are blessed with.

The higher on the ladder you are the higher the damage will be, through a simple slip. It won’t take that much time for me and for you to slip.

We are not getting anywhere if we think we are perfect and we need no assistance, guidance, consultation from anybody else; that is exactly where we begin to develop the disease within ourselves which is hard to cure and which will do no good for us neither for anybody else. This disease is called ‘Pride’ and in one way or the other which will strike on to you and me most of the time when we are in peak performance.

 Let me ask myself first…What is there for me to proud about? Die today.. That’s it. Anything I have earned will be of no use. The knowledge, vehicle, house, iPod, laptop, anything you name and even my partner will not be coming with me. Die today….That’s it. 

Who will be talking about you and me for how many days, months or years after death? Have we ever thought about that?

I want to emphasize on 3 items from a lot which should be used on good,

Use

  1. your youth before the old age overtakes
  2. your wealth before the poverty overtakes
  3. your health before the sickness overtakes

May us have the understanding to realize the truth of the life..

I personally believe we folks are so much after money we don’t care there is a family waiting for us.

Await…… That is what next on the plates

Monday, May 11, 2009

Life is awesome till you are simple AND professional

"The only successful beings in any field, including living itself, are those who have a professional viewpoint and make themselves and ARE professionals" — L. Ron Hubbard

  • A professional learns every aspect of the job. An amateur skips the learning process whenever possible.
  • A professional carefully discovers what is needed and wanted. An amateur assumes what others need and want.
  • A professional looks, speaks and dresses like a professional. An amateur is sloppy in appearance and speech.
  • A professional keeps his or her work area clean and orderly. An amateur has a messy, confused or dirty work area.
  • A professional is focused and clear-headed. An amateur is confused and distracted.
  • A professional does not let mistakes slide by. An amateur ignores or hides mistakes.
  • A professional jumps into difficult assignments. An amateur tries to get out of difficult work.
  • A professional completes projects as soon as possible. An amateur is surrounded by unfinished work piled on top of unfinished work.
  • A professional remains level-headed and optimistic. An amateur gets upset and assumes the worst.
  • A professional handles money and accounts very carefully. An amateur is sloppy with money or accounts.
  • A professional faces up to other people’s upsets and problems. An amateur avoids others’ problems.
  • A professional uses higher emotional tones: Enthusiasm, cheerfulness, interest, contentment. An amateur uses lower emotional tones: anger, hostility, resentment, fear, victim.
  • A professional persists until the objective is achieved. An amateur gives up at the first opportunity.
  • A professional produces more than expected. An amateur produces just enough to get by.
  • A professional produces a high-quality product or service. An amateur produces a medium-to-low quality product or service.
  • A professional earns high pay. An amateur earns low pay and feels it’s unfair.
  • A professional has a promising future. An amateur has an uncertain future.

The first step to making yourself a professional is to decide you ARE a professional.

Content was extracted from 'http://www.tipsforsuccess.org/professionalism.htm' thanks to Mr.Dammika

I found that this content Could be refactored since it has a lot of repetitive words like "A professional, An amateur". May be i should learn how to Format a Doc :)

Note : I am NOT a Professional as yet as per this content and i do not agree with all of this content... but Hope to become one soon

Also you might wonder where the hell i have mentioned about being Simple...

Await... it's on the way...



Thursday, May 7, 2009

Is LINQ2SQL another name for NHibernate?

May .NET User Group Meeting - 2009 was a superb Experience.
It was my very first time @micrsoft centre Sri Lanka. And of course impressed with a super presentation on LINQ2SQL => DAL.I really thought i would not understand anything @d start of the Session with the very 1st question("Familiar with LINQ?") from the presenter. By the clock started to tick by, i realized she was talking about a substitute for "NHibernate". 

By the end of the session i could see "LINQ2SQL is very similar to "NHibernate" and just the terminology is different..

Some say LINQ2SQL is better..

Some ask to  wait until LINQ2Entities framework fleshes out a bit :

Special thanks goes out to (Miss/Mrs) Dilrukshi ( Super Presenter ) who inspired me unintentionally to start blogging! 

Here We Come!!!
There is very little people whome i admire..  :) I cant lie you know.