July 16, 2009

Create an EXE file from Windows Application

Visual Studio 2005 Setup and deployment Projects provides to make a exe in .NET windows application is easy and rapidly

Visual Studio provides templates for four types of deployment projects: Merge Module Project, Setup Project, Web Setup Project, and Cab Project. In addition, a Setup wizard is provided to help step you through the process of creating deployment projects. You can see the templates and the wizard in the New Project dialog box under the Setup and Deployment Projects node.

The following are guidelines for choosing the right type of deployment project for your project.

1)Merge Module Project : Packages components that might be shared by multiple applications.

2)Setup Project : Builds an installer for a Windows-based application.

3)Web Setup Project : Builds an installer for a Web application.

4)Cab Project : Creates a cabinet file for downloading to a legacy Web browser.

5)Smart Device Cab Project : Creates a Cab project to deploy device applications.

This topic demonstrates deployment using a Setup and Deployment Project.

Setup Projects

Setup projects allow you to create installers in order to distribute an application. The resulting Windows Installer (.msi) file contains the application, any dependent files, information about the application such as registry entries, and instructions for installation. When the .msi file is distributed and run on another computer, you can be assured that everything necessary for installation is included; if for any reason the installation fails (for example, the target computer does not have the required operating system version), the installation will be rolled back and the computer returned to its preinstallation state.

After you have developed your windows apllication,now you want to make a exe.how can? These steps are gives the guidance to you…

1, Go to file menu > click Add > new project >now “Add New Project” Dialog appear.

2.Select “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK.

3.New project appear in solution explorer,for example you give the name “MyEXE”..it will display with this name.

4.right click the MyEXE > go View > click “File System”

5.You can see the “File System on TargetMachine”under three folders
Application Folder
User’s Desktop
User’s Program Menu

6.Select Application Folder and right click Add>Project Output>select Primary output

7. select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to MyEXE

next >>

same procedure follows the user’s program menu also

8.If you want to change the Manufactures name for exe,just right click the project go to properties

change the properties as per you requirement

9.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)

EXE available @ this location

When you want to install the EXE on the client machine,you should be installed .NET Framework on that mc because,Applications and controls written for the .NET Framework version 2.0 require the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs.

July 14, 2009

Fruits

EATING FRUIT - Guide

We all think eating fruits means just buying fruits, cutting it and just popping it into our mouths. It's not as easy as you think It's important to know how and when to eat..

What is the correct way of eating fruits?

IT MEANS NOT EATING FRUITS AFTER YOUR MEALS! - FRUITS SHOULD BE EATEN ON AN EMPTY STOMACH.

If you eat fruit on an empty stomach, it will play a major role to detoxify your system, supplying you with a great deal of energy for weight loss and other life activities.

FRUIT IS THE MOST IMPORTANT FOOD - Let's say you eat two slices of bread and then a slice of fruit.. The slice of fruit is ready to go straight through the stomach into the intestines, but it is prevented from doing so.

In the meantime the whole meal rots and ferments and turns to acid.. The minute the fruit comes into contact with the food in the stomach and digestive juices, the entire mass of food begins to spoil.

So please eat your fruits on an empty stomach or before your meals! You have heard people complaining - every time I eat water-melon I burp, when I eat durian (fruit from Asia with a foul smell yet delicious flavor) my stomach bloats up, when I eat a banana I feel like running to the toilet etc. - actually all this will not arise if you eat the fruit on an empty stomach. The fruit mixes with the putrefying other food and produces gas and hence you will bloat!

Graying hair, balding, nervous outburst, and dark circles under the eyes - all these will not happen if you take fruits on an empty stomach.

There is no such thing as some fruits, like orange and lemon are acidic, because all fruits become alkaline in our body, according to Dr. Herbert Shelton who did research on this matter. If you have mastered the correct way of eating fruits, you have the Secret of beauty, longevity, health, energy, happiness and normal weight.

When you need to drink fruit juice - drink only fresh fruit juice, NOT from the cans.. Don't even drink juice that has been heated up. Don't eat cooked fruits because you don't get the nutrients at all. You only get to taste.
Cooking destroys all the vitamins.

But eating a whole fruit is better than drinking the juice. If you should drink the juice, drink it mouthful by mouthful slowly, because you must let it mix with your saliva before swallowing it.

You can go on a 3-day fruit fast to cleanse your body. Just eat fruits and drink fruit juice throughout the 3 days and you will be surprised when your friends tell you how radiant you look!

KIWI: Tiny but mighty. This is a good source of potassium, magnesium, vitamin E & fiber. Its vitamin C content is twice that of an orange.

APPLE: An apple a day keeps the doctor away? Although an apple has a low vitamin C content, it has antioxidants & flavonoid which enhances the activity of vitamin C thereby helping to lower the risks of colon cancer, heart attack & stroke.

STRAWBERRY: Protective Fruit. Strawberries have the highest total antioxidant power among major fruits & protect the body from cancer-causing, blood vessel-clogging free radicals.

ORANGE: Sweetest medicine, eating 2 to 4 oranges a day may help keep colds away, lower cholesterol, prevent & dissolve kidney stones as well as lessens the risk of colon cancer.

WATERMELON: Coolest thirst quencher. Composed of 92% water, it is also packed with a giant dose of glutathione, which helps boost our immune system. They are also a key source of lycopene - the cancer fighting oxidant. Other nutrients found in watermelon are vitamin C & Potassium.

GUAVA & PAPAYA: Top awards for vitamin C. They are the clear winners for their high vitamin C content. Guava is also rich in fiber, which helps prevent constipation. Papaya is rich in carotene; this is good for your eyes.

Drinking Cold water after a meal = Cancer! Can you believe this??

For those who like to drink cold water, this article is applicable to you.

It is nice to have a cup of cold drink after a meal. However, the cold water will solidify the oily stuff that you have just consumed. It will slow down the digestion.. Once this 'sludge' reacts with the acid, it will break down and be absorbed by the intestine faster than the solid food. It will line the intestine. Very soon, this will turn into fats and lead to cancer. It is best to drink hot soup or warm water after a meal.

A cardiologist says if everyone who gets this mail sends it to 10 people, you can be sure that we'll save at least one life. Read this...It could save your life!

July 13, 2009

C# Text/Excel Export

------------------> Text Dump <-----------------------

System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.Flush();
response.End();

------------------> Excel Dump <----------------------

public static void ExportDataSetToExcel(DataTable ds, string filename)
{
HttpResponse response = HttpContext.Current.Response;
// first let's clean up the response.object
response.Clear();
response.Charset = "";
// set the response mime type for excel
response.ContentType = "application/vnd.ms-excel";

response.AddHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");
// create a string writer
using (StringWriter sw = new StringWriter())
{
using (HtmlTextWriter htw = new HtmlTextWriter(sw))
{
//instantiate a datagrid
DataGrid dg = new DataGrid();
dg.DataSource = ds;
dg.DataBind();
dg.RenderControl(htw);
response.Write(sw.ToString());
response.End();
}
}
}

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...