Friday, July 20, 2012

How To: Delete/Remove Services In Windows

Users can usually uninstall applications from their computers quite easily, however the same cannot be said for Windows services, of course you can disable a service, but the entry for it may still remain.

If you are looking for a way to completely delete a service from Windows here is how we can do this.

Open a command prompt, by going to Start > Run and type in cmd without the quotes and hit the Enter key.

Once a command prompt has opened up, type the command sc delete service name without the quotes

image

Once a service has been deleted you should see a message saying [SC] DeleteService SUCCESS, this should mean that the service has been deleted, to ensure that, just click on the refresh button in the services.msc window and confirm that the service has been deleted.

Note: You should always delete services in safe mode, just in case it causes you any problem, you may also want to create system restore points, just in case something goes wrong. But If you are a developer and its your own service then you don’t need to do this since you know about your service how it works.  Smile

Get time in AM/PM Time format in SQL Server

There are times that you want to display non-Military or AM/PM time format. The standard Convert formats do not have an option to return the time in this format. The SQL below will return only the time portion of the current date/time in the AM/PM format. 

 

SELECT substring(convert(varchar(20), GetDate(), 9), 13, 5)
+ ' ' + substring(convert(varchar(30), GetDate(), 9), 25, 2)


You can use this to update see your custom results by updating getdate() with your date object.

C#: How to Get Machine name of the webserver

Here is how you can do using C#,

Response.Write("machinename " +System.Environment.MachineName +"<BR>" )


This gives you name computer where your webserver is located.


If you need with the domain name here is how you can achieve using the following code snippet:


You need to import following namespace to use this,


using System.Net; 


public static string GetServerMachineName()
{
string domainName = System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName;
string hostName = Dns.GetHostName();
string sysdn = "";
if (!hostName.Contains(domainName))
sysdn = hostName + "." + domainName;
else
sysdn = hostName;

return sysdn;
}

Happy Coding Smile

Wednesday, July 18, 2012

Running 32-bit Applications in 64-bit Environment

WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. WOW64 is provided with the operating system and does not have to be explicitly enabled. For more information, see WOW64 Implementation Details.

The system isolates 32-bit applications from 64-bit applications, which includes preventing file and registry collisions. Console, GUI, and service applications are supported. The system provides interoperability across the 32/64 boundary for scenarios such as cut and paste and COM. However, 32-bit processes cannot load 64-bit DLLs for execution, and 64-bit processes cannot load 32-bit DLLs for execution. This restriction does not apply to DLLs loaded as data files or image resource files; for more information, see LoadLibraryEx.

A 32-bit application can detect whether it is running under WOW64 by calling the IsWow64Process function. The application can obtain additional information about the processor by using the GetNativeSystemInfo function.

Note that 64-bit Windows does not support running 16-bit Windows-based applications. The primary reason is that handles have 32 significant bits on 64-bit Windows. Therefore, handles cannot be truncated and passed to 16-bit applications without loss of data. Attempts to launch 16-bit applications fail with the following error: ERROR_BAD_EXE_FORMAT.

Translation libraries

The WoW64 subsystem comprises a lightweight compatibility layer that has similar interfaces on all 64-bit versions of Windows. It aims to create a 32-bit environment that provides the interfaces required to run unmodified 32-bit Windows applications on a 64-bit system. Technically, WoW64 is implemented using three dynamic-link libraries (DLLs):

  1. Wow64.dll, the core interface to the Windows NT kernel that translates between 32-bit and 64-bit calls, including pointer and call stack manipulations
  2. Wow64win.dll, which provides the appropriate entry-points for 32-bit applications
  3. Wow64cpu.dll, which takes care of switching the processor from 32-bit to 64-bit mode

Tuesday, July 03, 2012

Download: Microsoft® Visual Studio® LightSwitch™ 2011 Trial

Microsoft® Visual Studio® LightSwitch™ 2011 gives you a simpler and faster way to create professional-quality business applications for the desktop, the web, and the cloud. Using application templates, Visual Studio LightSwitch 2011 saves the time and effort of building from scratch, without sacrificing the flexibility needed to create custom applications.

Microsoft Visual Studio LightSwitch 2011 is a flexible, business application development tool that aides developers of all skill levels to quickly create and deploy desktop and web business applications. With timesaving tools and templates, and an intuitive development environment, Visual Studio LightSwitch helps speed the development and reduces the complexity of everything from UI design to Windows Azure Cloud Deployment. Now with Visual Studio LightSwitch it is finally practical to build affordable, scalable custom software solutions that bridge the gaps between existing systems and provide comprehensive, user-friendly views of your business data. For more information on Visual Studio LightSwitch 2011 visit http://www.microsoft.com/lightswitch

Download Trail

Monday, June 25, 2012

Download: Microsoft® SQL Server® 2008 R2 SP1 - Express Edition

Microsoft SQL Server 2008 R2 Express with Service Pack1 is a free, feature-rich edition of SQL Server that is ideal for learning, developing and powering desktop, web and small server applications, and for redistribution by ISVs

Download

Friday, May 18, 2012

How to: String to Pascal case from C#

We can return a string to Pascal case using regular expression or using our own logic. Here are two scenarios for doing this.

Method 1: Regular expression

public static string ToPascalCase(string pascalCaseString)
{
Regex r = new Regex("(?<=[a-z])(?<x>[A-Z])|(?<=.)(?<x>[A-Z])(?=[a-z])");
return r.Replace(pascalCaseString, " ${x}");
}


Method 2: String parsing.


/// <summary>
/// Convert the string to Pascal case.
/// </summary>
/// <param name="str">the string to turn into Pascal case</param>
/// <returns>a string formatted as Pascal case</returns>
public static string FormatPascalCase(string str)
{
StringBuilder sb = new StringBuilder(str.Length);
if (string.IsNullOrEmpty(str))
throw new ArgumentException("A null or empty value cannot be converted", str);

if (str.Length < 2)
return str.ToUpper();
// Split the string into words.
string[] words = str.Split(new char[] { }, StringSplitOptions.RemoveEmptyEntries);
foreach (string word in words)
sb.Append(string.Format("{0}{1}", word.Substring(0, 1).ToUpper(), word.Substring(1)));
return sb.ToString();
}

Hope this helps.

Friday, May 11, 2012

Zurker invitations, Join Zurker (Sign up now!)

Looking for a Zurker invitation? You have come to the right place. If you are not familiar with Zurker.

It is about a social networking platform that turns users into owners, a solution to the never-ending menace of data-sharing and wealth accumulation by social networking giants.

Scores of people have discussed the possibilities of the advertisement-heavy social media platforms like Facebook and twitter and now these platforms are abuzz with a new online site, which promises the users to be owners.

A hundred-odd Indian techies and other members/owners are now creating waves with the new platform which claims, “At Zurker, we’ve taken things a bit further. You don’t just own your data, you own the network. Every Zurker user can very easily become a co-owner (future shareholder) of Zurker.”

Interestingly, within three months, 88,053 Indians are into ‘Zurking’ online while the US has just 12,000.

 

Refer friends, own this networking site

Invite your friends to Zurker! Not only will your experience be more enjoyable, but you will be rewarded in the form of vShares. Zurker vShares become more and more valuable as the number of people using Zurker increases. The more people you refer, the more vShares you own, the more valuable those vShares become, and the more fun using Zurker becomes for you. It's a win-win-win!

Click here for Invitation

Thursday, April 12, 2012

Download: SQL Server 2008 e-book

SQL Server 2008 e-book for download.. This book is part conceptual, exploring the new features and abilities for this next generation enterprise database product; and it is part tangible, demonstrating features via C# code and improved T-SQL.

Download here.

SQL Server Builds and Hotfixes

I have found this wonderful site for list of all known KB articles, hotfixes and other builds of MS SQL Server 2012, 2008 R2, 2008, 2005, 2000 and 7.0 that have been released so far.

Please visit this URL for all the information.

Monday, April 09, 2012

SQL: Difference Between Union vs. Union All

UNION
The UNION command is used to select related information from two tables, much like the JOIN command. However, when using the UNION command all selected columns need to be of the same data type. With UNION, only distinct values are selected.

UNION ALL
The UNION ALL command is equal to the UNION command, except that UNION ALL selects all values.

The difference between Union and Union all is that Union all will not eliminate duplicate rows, instead it just pulls all rows from all tables fitting your query specifics and combines them into a table.

A UNION statement effectively does a SELECT DISTINCT on the results set. If you know that all the records returned are unique from your union, use UNION ALL instead, it gives faster results.

Tuesday, April 03, 2012

How to: Share Visual Studio Settings Between Computers or Visual Studio Versions

There's a real cool functionality that's built into Visual Studio that allows me to set up the Visual Studio environment just the way I like it, then I can export those settings out and then import them into another instance of Visual Studio. So say I have Visual Studio running on my development machine at work then I have a copy of Visual Studio on my laptop so that I can work at home or work on the weekends, or whatever. It'd be really cool if both of these environments matched. It's going to help productivity. It's going to make it easier for me just to live and get around. Well, first thing, if we go to Tools, Options I want to show you something. There's an Import-Export Settings and yours may look like this.

1

You will have to expand Environment and you will see Import Export Settings. Now it's going to tell you that I can use team settings files if I'm using a team server or I can automatically save my settings to this particular file. And if I click Browse I can jump out and put it wherever I would like, but you can notice by default here.

image

if I just click up here in the text box, the drop-down box, it's going to put it on C:\Users\nagasai\documents\Visual Studio 2010\Settings folder. And then I can give it a name, whatever I would like. So this is where I can work with that. Now, what's really cool is, if I go back to Tools you will notice down here we've been going to Options but right above Options is an Import and Export Settings, and so I will click on that and you will notice that I can export selected environment settings, or I can import. Well, let's say that I want to save the settings that I have out, so I click Next. And notice it says, What do you want to send out? I want all my Code Analysis, Database Tools, General Settings, my Team Foundation Server settings, and then notice on Options it's saying wait a minute. You've got some things here that you may want to go take a look at, and it is saying I may have some things on the Import-Export Settings that I need to go take a look at. This is warning me, notice up here, that it might expose intellectual property or other sensitive information, and so it's saying not to choose those and I can read F1, but for now we're just going to leave that alone. Actually, I'll just clear that for now, and I'll just choose Next and it's asking me, what do you want to name your settings file? And I will just call it MTL Exported VS Settings and I will tell it where to save those, and actually, just for the purpose of this I'll put it on the Desktop and I will click Save and then I will click Finish and notice my settings were exported out there.

3

Now if I minimize this and let me just make this easy on myself and go out to the Desktop, notice there are my exported files, so all I have to do is put that on a thumb drive, take it to another machine and import it into another Visual Studio instance and I will have everything there just like I wanted. Now, let me go back to something else. If you remember, I talked about this particular little guy right here that shows up the first time you start Visual Studio. Well, what if you chose something here that you don't like and now you want to go make a change to that? After the first time that you see this screen and you make a choice here and start Visual Studio you will never see this particular dialog box again. So what we're going to have to do to make changes to that, if you ever want to, is go into Import and Export Settings and you can tell it that you can Reset All Settings and you can say just Reset, and notice it's going to take you right back to that same screen with a couple of differences and I can say, you know what, just give me General Development Settings, or give me Visual Basic but let's say that we want to go back to General.

 

Now we just click Finish and it's resetting them and now when we start up we're going to see, in all of our projects and everything, General Settings out there.

image

image

So I hope this doesn't confuse you, but the way Microsoft did that with that screen, that dialog box popping up the first time and then never coming back, a lot of people are like, well, wait a minute. I don't like the choice I made. How do I get back to that and make changes on it? So, very easy to import and export settings so that you have the consistent environment across all your copies of Visual Studio. So, make sure that you use that to set up multiple copies so that you're the same everywhere you go

Hope this helps…Smile

Thursday, February 23, 2012

Infragistics: How to set Application Styling settings through Web.Config

You can use the AppStyling Visual Studio Add-in which is available from the Tools menu in Visual Studio or alternatively, you can manually add the settings into your web.config as seen below.
<configSections>  
   <section name="infragistics.web" 
type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, 
Culture=neutral, 
PublicKeyToken=b77a5c561934e089" />
</configSections>
<infragistics.web styleSetName="ElectricBlue" styleSetPath="~/ig_res" 
enableAppStyling="true" />


Good luck

Wednesday, February 22, 2012

Top 6 Firefox Extensions for Web Developer

Every one knows that Firefox has tons of plug-ins and add-on’s, but there are a few any web developer must know and use.

FireBug: Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

FireShot: FireShot is a Firefox extension that creates screenshots of web pages. Unlike other extensions, this plugin provides a set of editing and annotation tools, which let users quickly modify captures and insert text and graphical annotations. Such functionality will be especially useful for web designers, testers and content reviewers. It’s possible to choose whether entire web page or only visible part of this page should be captured.
Screenshots can be uploaded to server, saved to disk (PNG, JPEG, BMP), copied to clipboard, e-mailed and sent to external editor for further processing.

CSSMate: Inline CSS Editing Evolved. Originally a port of the fantastic EditCSS tool that I’ve been using for many months. I’ve gutted it, made each stylesheet load into a separate tab. Removed the save load clear functionality as i found it to be useless and added in support for loading stylesheets that have a media type of “all” instead of “screen”.

ViewSourceWith: The main goal consists to view page source with external applications but you can also…
- open page source as DOM document, read faq
- open CSS and JS files present on page
- open images using your preferred image viewer (e.g. GIMP or ACDSee)
- open PDF links with Acrobat Reader or Foxit Reader or what you prefer
- edit textboxes content with your preferred editor and automatically see modified text on browser when you re-switch focus on it, this simplifies wiki pages editing, read faq
- open server side pages that generate the browser content, this simplifies web developer’s debug, read server-faq
- open files listed in Javascript console. When editor open file the cursor can be moved to line number shown on javascript console, read js faq
For desperate cases you can add Microsoft IE to editor list.

Web Developer: Maybe the most succesfull of all, has great reviews. Adds a menu and a toolbar with various web developer tools.

These description are take from the Firefox add-ons site.

Wednesday, February 15, 2012

How to: WebDataGrid paging when there are more pages

QuickPages is a method of paging which will give links to a limited number of pages before and after the current page index.   Below is an example of the Paging behavior which is setup to display 3 quick pages along with a "First" and "Last" quick link.  This setup provides the best user experience for paged records which return more than 8 pages of data.

<ig:Paging PagerAppearance="Both" PagerMode="NumericFirstLast" 
QuickPages="3" PageSize="20"
FirstPageText="First" LastPageText="Last" >
</ig:Paging>

Hope this helps!

FSFS vs BDB

FSFS and BDB are Subversion file system implementations. Traditionally Berkeley DB (BDB) was the standard file system used by Subversion. It solves many serious concerns with BDB such as data corruption and added improvements such as smaller space requirements. Now the FSFS is the standard, the default setting, and recommended by Subversion developers.

How FSFS is Better

  • Write access not required for read operations
  • Little or no need for recovery
  • Smaller repositories
  • Platform-independent
  • Can host on network file system
  • No unmask issues
  • Standard backup software
  • Can split up repository across multiple spools
  • More easily understood repository layout
  • Faster handling of directories with many files
  • (Fine point) Fast "svn log -v" over big revisions
  • (Marginal) Can give insert-only access to revs subdir for commits

How FSFS is Worse

  • More server work for head checkout
  • Finalization delay
  • Lower commit throughput
  • Immature code
  • Big directories full of revision files
  • (Developers) More difficult to index

SVN and SVN Repository

Subversion (SVN) is a very popular open source versioning system. It manages files, directories, and changes made to files and directories over time by single of multiple users

SVN is a client-server application where the SVN repository serves the tasks of a server. It is a central storage place which stores information in the form of a file system tree. Users share data by reading and writing to the repository. The repository keeps track of all changes written to the file i.e. modifications to the files, file contents, and directory structure. Users see the latest version of the file system by default but they can view every change ever make to the contents of the repository.

A decade ago Concurrent Versioning System (CVS) was the most-widely used versioning. It is built on Revision Control System (RCS) and thus inherits its flaws and this inheritance is precisely the reason it is very difficult to fix these flaws in CVS. SVN was created to overcome the flaws of CVS. It offers all the benefits of CVS without its flaws.

Although SVN is primarily used by programmer to track their project, it is capable of managing any sort of file collection. Important features of SVN are:

  • users can store ongoing work (code, docs, data, etc.) in a central repository
  • users can access the latest versions in the central repository
  • automates the process of updating local working copy of the project with modifications made by others?
  • users can track all changes ever made and revert to previous versions

Following are some important features which make SVN a better choice over CVS.

  • Subversion versions entire trees i.e directories, renames, and file metadata
  • changes are atomic. If you commit files a.aspx and b.aspx.cs, either both will be updated or neither will be updated
  • tagging and branching are not resource intensive
  • Subversion is designed as a client/server application

Tuesday, February 07, 2012

Redirect HTTP to HTTPS in ASP.NET

Recently I got to do this when one of our site was hosted on Go Daddy Hosted Server. They don’t have SSL redirect functionality for Windows environment, so we need to write some script to support this.

I have done something like this by writing few lines of code in Global.asax file in your web project.

void Application_BeginRequest(Object sender, EventArgs e)
{
if (ConfigurationManager.AppSettings["APIEnvironment"].ToUpper() == "LIVE"
&& Request.ServerVariables["HTTP_HOST"].ToString().ToLower().Trim() != "localhost") // turn the mode OFF in development
{
if (HttpContext.Current.Request.IsSecureConnection.Equals(false))
{
Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"] + HttpContext.Current.Request.RawUrl);
}
}
}

Hope this helps. Coffee cup

Jeff Bridges - Hold On You Lyrics

 

I’ve been loved
And I’ve been alone
All my life I’ve been a rollin’ stone
Done everything that a man can do
Everything but get a hold on you
Done everything that a man can do
Everything but get a hold on you

I’ve been blessed
And I’ve been cursed
All my lies have been unrehearsed
A wall of fire that I’ve walked through
Only tryin’ to get a hold on you
A wall of fire that I walked through
Only tryin’ to get a hold on you

I saw you waitin’ at the gate
But I arrived a moment late
I saw you shed a single tear
And still I can’t get there from here

I’ve been high
And I’ve been low
I’ve been people that I don’t know
Been to China and old Peru
Only tryin’ to get a hold on you
Been to China and to Peru
I’m only tryin’ to get a hold on you
Only tryin’ to get a hold on you

This is a beautiful song. I Love this song.Smile

Thursday, February 02, 2012

Some of the healthiest Foods On Earth

 

Berries

    All berries are low in sugar and high in fiber. Blueberries have been shown to increase memory in lab studies, and raspberries and strawberries are loaded with ellagic acid, a powerful antioxidant that seems to have some anti-cancer properties, according to the American Cancer Society.

Beans

    Beans are extremely high in fiber, which helps to control weight, prevent or manage diabetes and blood sugar, and may help prevent colon cancer and protect against heart disease. The National Institute of Medicine recommends 25-38 grams of fiber a day. The average American gets only 4-11 grams. One cup of beans provides 11-17 grams. 

Nuts

    Some of the largest and most important long-term studies of diet and health have shown that eating nuts several times a week is consistent with a risk of heart attack and heart disease that is 30%-50% lower than the general population. Just one ounce of nuts--almonds, macadamia, Brazil, walnuts, pecans--eaten three to five times a week seems to be the magic number.

Wild Salmon

    Fish is the ultimate anti-aging food. Cold-water fatty fish like wild salmon, sardines, mackerel and herring contain omega-3 fats that protect the brain and the heart, improve mood, and lower blood pressure and triglycerides.

Raw Milk

    Raw, organic milk nearly always comes from grass-fed cows and contains high levels of cancer-fighting CLA (conjugated linoleic acid) as well as a rich assortment of vitamins, minerals and beneficial bacteria (like Lactobacillus acidophilus) .

Grass-Fed Meat

    Meat from grass-fed cows has a much different fat profile than ordinary supermarket meat: high in omega-3s, lower in potentially harmful omega-6s and loaded with CLA, a kind of fat known for its anti-cancer activity. A superb source of protein and vitamin B12, it's also missing the antibiotics, steroids and hormones found in the meat that comes from feedlot farms.

Eggs

    Considered by many to be nature's most perfect food, the egg is high in protein and relatively low in calories. The yolk contains choline, one of the most important nutrients for the brain, as well as lutein and xeazanthin, two critical nutrients for eye health

Brassica Vegetables

    Cabbage, Brussels sprouts, broccoli and kale all contain plant compounds called indoles that help reduce the risk of cancer. In addition to a stunning range of vitamins and minerals, they also contain sulforaphane, an important plant chemical that helps the body detoxify health-damaging chemicals.

Apples

    Not only do they keep the doctor away, they also appear to do the same for lung cancer, diabetes and asthma. An apple contains five grams of fiber and a rich blend of nutrients including the bone-building vitamin K and the anti-inflammatory nutrient quercetin. And there's no better way to control your appetite than an apple eaten about half an hour before a big meal.

Onions and Garlic

   In an impressive number of published studies, the consumption of onions and garlic has demonstrated protective effects against stomach, prostate and esophageal cancer. Along with broccoli, tea and apples, onions and garlic are among a select group of foods found to reduce mortality from heart disease by 20%.

Pomegranate Juice

   Called "a natural Viagra" by researchers at Tel Aviv University, pomegranate juice is loaded with antioxidants. Studies show it can reduce blood pressure and plaque in the arteries. New research indicates it also slows the progression of tumors. Four to eight ounces a day is highly recommended.

Green Tea

Though all teas are great for you, green tea has a unique profile of plant chemicals that have anti-cancer activity. It's now fairly established that green tea may help prevent the following types of cancers in humans: bladder, colon, esophagus, pancreas, rectum and stomach. If that's not enough, it also appears to help with weight control.

Go Banana, Eat Banana


Never, put your banana in the refrigerator!!! This is interesting.
After reading this, you'll never look at a banana in the same way again.

Bananas contain three natural sugars - sucrose, fructose and glucose combined with fiber. A banana gives an instant, sustained and substantial boost of energy.

Research has proven that just two bananas provide enough energy for a strenuous 90-minute workout. No wonder the banana is the number one fruit with the world's leading athletes.

But energy isn't the only way a banana can help us keep fit.

It can also help overcome or prevent a substantial number of illnesses and conditions, making it a must to add to our daily diet.

Depression: According to a recent survey undertaken by MIND amongst people suffering from depression, many felt much better after eating a banana. This is because bananas contain tryptophan, a type of protein that the body converts into serotonin, known to make you relax, improve your mood and generally make you feel happier.

PMS: Forget the pills - eat a banana. The vitamin B6 it contains regulates blood glucose levels, which can affect your mood.
Anemia: High in iron, bananas can stimulate the production of hemoglobin in the blood and so helps in cases of anemia.

Blood Pressure: This unique tropical fruit is extremely high in potassium yet low in salt, making it perfect to beat blood pressure. So much so, the US Food and Drug Administration has just allowed the banana industry to make official claims for the fruit's ability to reduce the risk of blood pressure and stroke.

Brain Power: 200 students at a Twickenham (Middlesex) school were helped through their exams this year by eating bananas at breakfast, break, and lunch in a bid to boost their brain power. Research has shown that the potassium-packed fruit can assist learning by making pupils more alert.

Constipation: High in fiber, including bananas in the diet can help restore normal bowel action, helping to overcome the problem without resorting to laxatives.

Hangovers: One of the quickest

ways of curing a hangover is to make a banana milkshake, sweetened with honey. The banana calms the stomach and, with the help of the honey, builds up depleted blood sugar levels, while the milk soothes and re-hydrates your system.

Heartburn: Bananas have a natural antacid effect in the body, so if you suffer from heartburn, try eating a banana for soothing relief.

Morning Sickness: Snacking on bananas between meals helps to keep blood sugar levels up and avoid morning sickness.

Mosquito bites: Before reaching for the insect bite cream, try rubbing the affected area with the inside of a banana skin. Many people find it amazingly successful at reducing swelling and irritation.

Nerves: Bananas are high in B vitamins that help calm the nervous system.

Overweight and at work? Studies at the Institute of Psychology in Austria found pressure at work leads to gorging on comfort food like chocolate and crisps. Looking at 5,000 hospital patients, researchers found the most obese were more likely to be in high-pressure jobs. The report concluded that, to avoid panic-induced food cravings, we need to control our blood sugar levels by snacking on high carbohydrate foods every two hours to keep levels steady.
Ulcers: The banana is used as the dietary food against intestinal disorders because of its soft texture and smoothness. It is the only raw fruit that can be eaten without distress in over-chronicler cases. It also neutralizes over-acidity and reduces irritation by coating the lining of the stomach.

Temperature control: Many other cultures see bananas as a "cooling" fruit that can lower both the physical and emotional temperature of expectant mothers. In Thailand, for example, pregnant women eat bananas to ensure their baby is born with a cool temperature.

Seasonal Affective Disorder (SAD): Bananas can help SAD sufferers because they contain the natural mood enhancer tryptophan.

Smoking & Tobacco Use: Bananas can also help people trying to give up smoking. The B6, B12 they contain, as well as the potassium! m and magnesium found in them, help the body recover from the effects of nicotine withdrawal.

Stress: Potassium is a vital mineral, which helps normalize the heartbeat, sends oxygen to the brain and regulates your body's water balance. When we are stressed, our metabolic rate rises, thereby reducing our potassium levels. These can be rebalanced with the help of a high-potassium banana snack.
Strokes: According to research in "The New England Journal of Medicine, 'eating bananas as part of a regular diet can cut the risk of death by strokes by as much as 40%!

Warts: Those keen on natural alternatives swear that if you want to kill off a wart, take a piece of banana skin and place it on the wart, with the yellow side out.. Carefully hold the skin in place with a plaster or surgical tape!

So, a banana really is a natural remedy for many ills. When you compare it to an apple, it has four times the protein, twice the carbohydrate, three times the phosphorus, five times the vitamin A and iron, and twice the other vitamins and minerals. It is also rich in potassium and is one of the best value foods around So maybe its time to change that well-known phrase so that we say, "A banana a day keeps the doctor away!"

Share this with friends, if you like the banana....

PS: Bananas must be the reason monkeys are so happy all the time! I will add one here; want a quick shine on our shoes?? Take the INSIDE of the banana skin, and rub directly on the shoe...polish with dry cloth.
Amazing fruit!!!

10 Great investing rules

  1. Put all your eggs in one basket and watch that basket!
  2. When the ducks quack, feed them
  3. Markets make opinions, not the other way round
  4. Buy low, sell high
  5. When the rest of the world is mad, we must imitate them in some measure
  6. During a bull market nobody needs a broker. During a bear market nobody wants one
  7. Every man his own broker
  8. Markets can remain irrational longer than you can remain solvent
  9. A mine is a hole in the ground with a liar standing over it
  10. Be diffident when others exalt, and with a secret joy buy when others think it in their interests to sell.

Interesting isn’t it.

How to: change DB owner name using T-SQL

Here is how you can do it using SQL Statement.

Method 1:

Using this method first we’ll get all the db objects and update with new db owner name.

DECLARE tabcurs CURSOR
FOR
SELECT 'olddbowner.' + [name]
FROM sysobjects
WHERE xtype = 'u'

OPEN tabcurs
DECLARE @tname NVARCHAR(517)
FETCH NEXT FROM tabcurs INTO @tname

WHILE @@fetch_status = 0
BEGIN

EXEC sp_changeobjectowner @tname, 'dbo'

FETCH NEXT FROM tabcurs INTO @tname
END
CLOSE tabcurs
DEALLOCATE tabcurs



Method 2:


This approach is simple and straight forward. Using this we will build the statements and you can copy them from the result window and execute


declare @OldOwner varchar(100) declare @NewOwner varchar(100) 
set @OldOwner = '353446_eda_db'
set @NewOwner = 'dbo'


SELECT 'sp_changeobjectowner ''[' + s.name + '].[' + p.name + ']'', ''' + @NewOwner + '''
GO'

FROm sys.Procedures p INNER JOIN
sys.Schemas s on p.schema_id = s.schema_id WHERE s.Name = @OldOwner
union
select 'sp_changeobjectowner ''[' + table_schema + '].[' + table_name + ']'', ''' + @NewOwner + '''
GO'

from information_schema.tables where Table_schema = @OldOwner


Hope this helps.

Tuesday, January 31, 2012

Microsoft Silverlight 4 Books

Here are some e books related to Silverlight 4.

http://libproject.net/programming/microsoft-silverlight-4-and-sharepoint-2010-integration.html

http://libproject.net/programming/microsoft-silverlight-business-application-development-beginners-guide.html

http://libproject.net/programming/pro-silverlight-in-vb.html

http://libproject.net/programming/microsoft-silverlight-business-application-development-beginners-guide.html

http://libproject.net/programming/pro-silverlight-in-c-2.html

http://libproject.net/programming/professional-silverlight.html

http://libproject.net/programming/foundation-expression-blend-with-silverlight.html

http://libproject.net/programming/microsoft-silverlight-data-and-services-cookbook.html

Hope these are useful. Good luck Thumbs up

How to add MIME types in Web.config on hosted Servers, Go Daddy, IIS 7 etc.

Ever wanted to add a custom mime type to your Web server?  I ran into this issue the other day when I tried to serve up .otf files related to fonts on my Web server and  I got this error: 404.3 error - mime type missing!

Thankfully, adding mime types is easier than ever thanks to the all-new distributed configuration option, which allows for IIS7 configuration to be stored in web.config files, along with asp.net configuration, to be deployed with your content. 

I'll show how easy it is to add mime types to your Web server.  This method will work on any IIS7 web server, and it will be ignored on all non-IIS7 web servers, so it should be safe to do no matter the type of application or content.  Since the <staticContent> section is delegated by default, the configuration snippets below should 'just work' on all IIS7 Web sites. 

  1. Open or edit the web.config in your site home directory.
  2. Add the following section in configuration section under web server.
<system.webServer>   
    <staticContent>
      <mimeMap fileExtension=".otf" mimeType="font/otf" />
    </staticContent>
</system.webServer>

This works even on Go Daddy hosted server also. You can add as many file times you want allow in this static content section.  For example these few MIME types you can add if you want on your Web server

<mimeMap fileExtension=".m4v" mimeType="video/m4v" />
<mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm"/>
<!-- For silverlight applicaitons -->
<mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" />
<mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
<mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" />

Hope this helps Thumbs up

How To Configure “BSNL” Nokia Siemens Router 1600 For Always ON with a secured WIFI Network

Recently I have configured my BSNL connection to always on for a secured WIFI network. In process I have learn that if you set "Network Authentication" to "Open" & "Enable" the "WEP Encryption" you can set a password to prevent unauthorized access. Both WPA - PSK, WPA2 - PSK are considered to be better than WPA & WPA2 encryptions as they were created to overcome the loop holes in WEP Encryption but, be advised that even they can be hacked in a matter of minutes.

To avoid entering user id & password on a Nokia Siemens Residential Router 1600 every time you connect do the following steps.

  1. Open the browser and type http://192.168.1.1 in the address bar, on being asked type both user id & password as admin, by default it will be admin/admin
  2. Now click on ADSL >> WAN
  3. In the 35_1 line (usually the first line) click on Edit
  4. Click on next, leave default
  5. Select PPP over Ethernet (PPPoE) & then click on Next
  6. In the page that appears next provide the user id & password you use to connect to the internet
    PPP Username: ((Type your user id in this field))
    PPP Password: ((Type your password in this field))
    leave the other options at default settings.
  7. Click on Next
  8. Ensure that Enable NAT & Enable Firewall are checked.
  9. Click on Next
  10. Click on Save


Hopefully this should do the trick Smile

Tuesday, January 17, 2012

IRCTC–MOBILE

IRCTC launches a smarter way to book tickets. Now book your rail ticket -ANYWHERE ANYTIME through your Mobile Phones.
IRCTC brings to you the mobile website https://www.irctc.co.in/mobile with just a few clicks you can book your tickets using your Mobile Phones. IRCTC mobile website is convenient and easy to use, can be accessed from any browser enabled mobile having basic GPRS activated on phone.
The following features are available:
Book Ticket/ Enquiry - Book tickets by providing source and destination.
Booked History - Tickets whose Date of Journey is due will be visible.
Cancel Ticket - Cancel any of the tickets whose date of journey is due.
Browse the URL using your mobile and book tickets using any of your credit/debit card for payment.

Tuesday, January 10, 2012

What is a MIME type?

There are times when you would want the IIS web server to serve a file that has an extension that it does not recognize. That is, a file whose MIME type has not been defined. In such a case, IIS would return http error code, 404.3 as shown below.

HTTP Error 404.3 – Not Found
Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and therefore is not allowed.

MIME stands for Multi-purpose Internet Mail Extensions. MIME types form a standard way of classifying file types on the Internet. Internet programs such as Web servers and browsers all have a list of MIME types, so that they can transfer files of the same type in the same way, no matter what operating system they are working in.

A MIME type has two parts: a type and a subtype. They are separated by a slash (/). For example, the MIME type for Microsoft Word files is application and the subtype is msword. Together, the complete MIME type is application/msword.

Here is the list of available MIME types that you can add and configure on IIS

Hope this is useful.

List of MIME Types with Content types

There are times when you would want the IIS web server to serve a file that has an extension that it does not recognize. That is, a file whose mime type has not been defined. In such a case, IIS would return http error code, 404.3. For the web server to serve the file with that new extension, you need to create a mapping between that extension and the MIME type.

The following MIME types are some MIME types with its File Extension and Content type.

File Extension Content type (MIME)
.323 text/h323
.aaf application/octet-stream
.aca application/octet-stream
.acx application/internet-property-stream
.afm application/octet-stream
.ai application/postscript
.aif audio/x-aiff
.aifc audio/aiff
.aiff audio/aiff
.applicati application/x-ms-application
.art image/x-jg
.asd application/octet-stream
.asf video/x-ms-asf
.asi application/octet-stream
.asm text/plain
.asr video/x-ms-asf
.asx video/x-ms-asf
.au audio/basic
.avi video/x-msvideo
.axs application/olescript
.bas text/plain
.bcpio application/x-bcpio
.bin application/octet-stream
.bmp image/bmp
.c text/plain
.cab application/octet-stream
.cat application/vnd.ms-pki.seccat
.cdf application/x-cdf
.chm application/octet-stream
.class application/x-java-applet
.clp application/x-msclip
.cmx image/x-cmx
.cnf text/plain
.cod image/cis-cod
.cpio application/x-cpio
.cpp text/plain
.crd application/x-mscardfile
.crl application/pkix-crl
.crt application/x-x509-ca-cert
.csh application/x-csh
.css text/css
.csv application/octet-stream
.cur application/octet-stream
.dcr application/x-director
.deploy application/octet-stream
.der application/x-x509-ca-cert
.dib image/bmp
.dir application/x-director
.disco text/xml
.dll application/x-msdownload
.dlm text/dlm
.dnl application/x-msdownload
.doc application/msword
.dot application/msword
.dsp application/octet-stream
.dtd text/xml
.dvi application/x-dvi
.dwf drawing/x-dwf
.dwp application/octet-stream
.dxr application/x-director
.easm application/octet-stream
.eml message/rfc822
.emz application/octet-stream
.eot application/octet-stream
.eps application/postscript
.etx text/x-setext
.evy application/envoy
.ex_ application/octet-stream
.exe application/octet-stream
.fdf application/vnd.fdf
.fif application/fractals
.fla application/octet-stream
.flr x-world/x-vrml
.flv video/x-flv
.gif image/gif
.gtar application/x-gtar
.gz application/x-gzip
.h text/plain
.hdf application/x-hdf
.hdml text/x-hdml
.hhc application/x-oleobject
.hhk application/octet-stream
.hhp application/octet-stream
.hlp application/winhlp
.hqx application/mac-binhex40
.hsf application/octet-stream
.hta application/hta
.htc text/x-component
.htm text/html
.html text/html
.htt text/webviewhtml
.hxt text/html
.ica application/x-ica
.ico image/x-icon
.ics application/octet-stream
.ief image/ief
.inf application/octet-stream
.ins application/x-internet-signup
.isp application/x-internet-signup
.IVF video/x-ivf
.jar application/java-archive
.java (Disabled in IIS 7) application/octet-stream
.jck application/liquidmotion
.jcz application/liquidmotion
.jfif image/pjpeg
.jpb application/octet-stream
.jpe image/jpeg
.jpeg image/jpeg
.jpg image/jpeg
.js application/x-javascript
.latex application/x-latex
.lit application/x-ms-reader
.lpk application/octet-stream
.lsf video/x-la-asf
.lsx video/x-la-asf
.lzh application/octet-stream
.m13 application/x-msmediaview
.m14 application/x-msmediaview
.m1v video/mpeg
.m3u audio/x-mpegurl
.man application/x-troff-man
.manifest application/x-ms-manifest
.map text/plain
.mdb application/x-msaccess
.mdp application/octet-stream
.me application/x-troff-me
.mht message/rfc822
.mhtml message/rfc822
.mid audio/mid
.midi audio/mid
.mix application/octet-stream
.mmf application/x-smaf
.mno text/xml
.mny application/x-msmoney
.mov video/quicktime
.movie video/x-sgi-movie
.mp2 video/mpeg
.mp3 audio/mpeg
.mp4 audio/mpeg
.mpa video/mpeg
.mpe video/mpeg
.mpeg video/mpeg
.mpg video/mpeg
.mpp application/vnd.ms-project
.mpv2 video/mpeg
.ms application/x-troff-ms
.msi application/octet-stream
.mvb application/x-msmediaview
.nc application/x-netcdf
.nsc video/x-ms-asf
.nws message/rfc822
.ocx application/octet-stream
.oda application/oda
.ods application/oleobject
.p10 application/pkcs10
.p12 application/x-pkcs12
.p7b application/x-pkcs7-certificates
.p7c application/pkcs7-mime
.p7m application/pkcs7-mime
.p7r application/x-pkcs7-certreqresp
.p7s application/pkcs7-signature
.pbm image/x-portable-bitmap
.pcx application/octet-stream
.pcz application/octet-stream
.pdf application/pdf
.pfb application/octet-stream
.pfm application/octet-stream
.pfx application/x-pkcs12
.pgm image/x-portable-graymap
.pko application/vnd.ms-pki.pko
.pma application/x-perfmon
.pmc application/x-perfmon
.pml application/x-perfmon
.pmr application/x-perfmon
.pmw application/x-perfmon
.png image/png
.pnm image/x-portable-anymap
.pnz image/png
.pot application/vnd.ms-powerpoint
.ppm image/x-portable-pixmap
.pps application/vnd.ms-powerpoint
.ppt application/vnd.ms-powerpoint
.prf application/pics-rules
.prm application/octet-stream
.prx application/octet-stream
.ps application/postscript
.psd application/octet-stream
.psm application/octet-stream
.psp application/octet-stream
.pub application/x-mspublisher
.qt video/quicktime
.qtl application/x-quicktimeplayer
.qxd application/octet-stream
.ra audio/x-pn-realaudio
.ram audio/x-pn-realaudio
.rar application/octet-stream
.ras image/x-cmu-raster
.rdf application/rdf+xml
.rf image/vnd.rn-realflash
.rgb image/x-rgb
.rm application/vnd.rn-realmedia
.rmi audio/mid
.roff application/x-troff
.rpm audio/x-pn-realaudio-plugin
.rtf application/rtf
.rtx text/richtext
.scd application/x-msschedule
.sct text/scriptlet
.sea application/octet-stream
.setpay application/set-payment-initiation
.setreg application/set-registration-initiation
.sgml text/sgml
.sh application/x-sh
.shar application/x-shar
.sit application/x-stuffit
.sldasm application/octet-stream
.sldprt application/octet-stream
.smd audio/x-smd
.smi application/octet-stream
.smx audio/x-smd
.smz audio/x-smd
.snd audio/basic
.snp application/octet-stream
.spc application/x-pkcs7-certificates
.spl application/futuresplash
.src application/x-wais-source
.ssm application/streamingmedia
.sst application/vnd.ms-pki.certstore
.stl application/vnd.ms-pki.stl
.sv4cpio application/x-sv4cpio
.sv4crc application/x-sv4crc
.svg application/octet-stream
.swf application/x-shockwave-flash
.t application/x-troff
.tar application/x-tar
.tcl application/x-tcl
.tex application/x-tex
.texi application/x-texinfo
.texinfo application/x-texinfo
.tgz application/x-compressed
.thn application/octet-stream
.tif image/tiff
.tiff image/tiff
.toc application/octet-stream
.tr application/x-troff
.trm application/x-msterminal
.tsv text/tab-separated-values
.ttf application/octet-stream
.txt text/plain
.u32 application/octet-stream
.uls text/iuls
.ustar application/x-ustar
.vbs text/vbscript
.vcf text/x-vcard
.vcs text/plain
.vdx application/vnd.visio
.vml text/xml
.vsd application/vnd.visio
.vss application/vnd.visio
.vst application/vnd.visio
.vsw application/vnd.visio
.vsx application/vnd.visio
.vtx application/vnd.visio
.wav audio/wav
.wax audio/x-ms-wax
.wbmp image/vnd.wap.wbmp
.wcm application/vnd.ms-works
.wdb application/vnd.ms-works
.wks application/vnd.ms-works
.wm video/x-ms-wm
.wma audio/x-ms-wma
.wmd application/x-ms-wmd
.wmf application/x-msmetafile
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wmp video/x-ms-wmp
.wmv video/x-ms-wmv
.wmx video/x-ms-wmx
.wmz application/x-ms-wmz
.world application/octet-stream
.wps application/vnd.ms-works
.wri application/x-mswrite
.wrl x-world/x-vrml
.wrz x-world/x-vrml
.wsdl text/xml
.wvx video/x-ms-wvx
.x application/directx
.xaf x-world/x-vrml
.xbm image/x-xbitmap
.xdr text/plain
.xla application/vnd.ms-excel
.xlc application/vnd.ms-excel
.xlm application/vnd.ms-excel
.xls application/vnd.ms-excel
.xlt application/vnd.ms-excel
.xlw application/vnd.ms-excel
.xml text/xml
.xof x-world/x-vrml
.xpm image/x-xpixmap
.xsd text/xml
.xsf text/xml
.xsl text/xml
.xslt text/xml
.xsn application/octet-stream
.xwd image/x-xwindowdump
.z application/x-compress
.zip application/x-zip-compressed

Saturday, January 07, 2012

Add-on: User Agent Switcher

The User Agent Switcher extension adds a menu to Mozilla browser and a toolbar button to switch the user agent of a browser. It is a wonderful tool for developers and designers to view different types of user agents in same browser. You can set a default user agent and can switch between different agents like Internet Explorer, Mozilla, IPhone and other Search robots. See the below image how you can switch between user agents.

image

You can edit the User agent options by editing user agents from toolbar menu. See this image to see available user agents.

image

You can download this add on for Mozilla here or you can search for this add on at Mozilla.

Wednesday, January 04, 2012

Time, Anger and Disrespect

Time is precious to everyone. It’s a bad habit to keep other people waiting. Almost everyone feels that one of their most valued commodities is their time. This being the case, one of the ultimate slaps and most sure way to annoy someone is to keep them waiting. While most people are somewhat forgiving, keeping them waiting is a sign of disrespect. The subtle message is, “My time is more important than yours.”
Deep down, we all know that no one likes to be kept waiting. Therefore, it’s highly stressful to keep other people waiting because you know you are disappointing someone. In the back of your mind, you know well the person is looking at his watch, wondering why you are late. You may be keeping him from personal or professional commitments and that could make him angry.
There are obviously exceptions to the rule – times when factors beyond your control prevent you from being on time. Things happen to all of us, and no one has a perfect record. Truthfully, however, a vast majority of the time, being late is preventable by planning ahead, allowing a little extra time, or making allowances for unexpected problems.
Many times we compound the problem by making excuse like “traffic was horrible,” when, in reality, traffic is virtually always horrible. The problem wasn’t traffic – but the fact that we didn’t factor enough time in our schedule for the traffic. It’s likely the case that, even if traffic was horrible, or you got off to a late start, or whatever the excuse, the other person isn’t going to be interested or impressed.
I wouldn’t underestimate the negative impact of making someone wait. It drives some people crazy. And, even if they don’t express their frustration to you directly, it can show up in other ways – not taking you seriously, avoiding you when possible, being disrespectful, choosing to spend their time with others instead of you, showing up late to your future appointments, etc.