How to Creating batch file example.

Open note pad or any text editor.
Copy below test and paste. 
Save file as .bat.Then to run double click on file.


@ECHO OFF
CLS
IF "%1" == "" GOTO BLANK
IF NOT "%1" == "" GOTO SORTTXT
:BLANK
@ECHO.
@ECHO   * * * * * * * * * * * * * * * * * * *
@ECHO   *  Q U I C K - S O R T  B A T C H   *
@ECHO   * * * * * * * * * * * * * * * * * * *
@ECHO.
@ECHO   * * * * * * * * * * * * * *
@ECHO * Hello world* 
@ECHO               * * * * * * * ** * * * * * * 
@ECHO.
@ECHO   Copyright (C) 2002-2003 by Michael L. White.  All rights reserved.  See the
@ECHO   redistribution requirements listed at the end of this display.  Original 
@ECHO   release date:  21 December 2002.  Update for post-Win9x versions release 
@ECHO   date:  19 September 2003.  
@ECHO.
@ECHO.
@ECHO   You did not type in a file path.  You must execute this batch file from 
@ECHO   either the DOS prompt or the Run dialog on the Windows Start menu.  See 
@ECHO   directions below.
@ECHO.
@ECHO.
@ECHO   DIRECTIONS:
@ECHO.
@ECHO   1. Type or copy and paste the list you want sorted into a new file,
@ECHO      making sure each item to be sorted is on a separate line, and save
@ECHO      the file.  Quick Sort will place numbers in numerical order, too, so 
@ECHO      keep that in mind if your list contains arabic numerals.
@ECHO   2. Press the Start button, Windows Start key, or CTRL+ESC together.
@ECHO.
@ECHO.
PAUSE
CLS
@ECHO.
@ECHO   3. Select Run from the Start menu.
@ECHO   4. Type in C:\QKSORT.BAT (or whatever the path is where you stored
@ECHO      QKSORT.BAT; letter case does not matter), then type a blank space,
@ECHO      followed by the path for the file you want to sort, another blank
@ECHO      space, and finally the path for the destination file where you
@ECHO      want your results to be saved.  
@ECHO   5. At either the DOS prompt or in the Run dialog, follow the example 
@ECHO      below using the name by which you chose to save your file earlier.
@ECHO.
@ECHO.
@ECHO   EXAMPLE:  c:\qksort.bat c:\sample.txt c:\sample2.txt
@ECHO.
@ECHO.
@ECHO   Note that the destination file has a different name.  While Quick-Sort
@ECHO   will append your sorted results to the end of your source file, you are
@ECHO   wise to save them to a new file to avoid source file alteration.  You 
@ECHO   should also limit your filename to eight characters or less to 
@ECHO   accommodate DOS file naming restrictions.  
@ECHO.
@ECHO.
@ECHO.
set /p option=For handier reference, would you like to print the entire contents of this batch file?  Type Y or N and press ENTER now.  (Y=Yes N=No) 
CLS
@ECHO.
IF "%option%"=="N" GOTO CLOSE
IF "%option%"=="n" GOTO CLOSE
IF "%option%"=="" GOTO CLOSE
IF NOT EXIST C:\QKSORT.BAT COPY QKSORT.BAT C:\QKSORT.BAT
PRINT /D:PRN C:\QKSORT.BAT
DEL C:\QKSORT.BAT
:CLOSE
@ECHO.
@ECHO   If you chose to print this file, you may need to press the sheet feed
@ECHO   button when printing is complete to eject the final page from your
@ECHO   printer.  If the print option failed, you can edit this file using
@ECHO   a plain text editor such as Windows Notepad and print it from there.
@ECHO.
@ECHO.
@ECHO   Please press ALT+F4 together to close this window ...
@ECHO.
@ECHO.
@ECHO   Copyright (C) 2002-2003 by Michael L. White.  All rights reserved.  See the
@ECHO   redistribution requirements listed below.  Original release date:  
@ECHO   21 December 2002.  Update for post-Win9x versions release date:  
@ECHO   19 September 2003.  
@ECHO.
@ECHO.
@ECHO   REDISTRIBUTION REQUIREMENTS:
@ECHO   This file may be freely distributed PROVIDED it is unaltered from its 
@ECHO   present state and the copyright notice and this notice are included on 
@ECHO   each copy, and PROVIDED FURTHER that no charge is made for its 
@ECHO   redistribution.  Contact the author, Michael L. White, by email at 
@ECHO   info@parsonplace.com for permission to use Quick Sort in any way other 
@ECHO   than what is prescribed in this notice.  Visit Parson Place on the Web
@ECHO   at http://www.parsonplace.com for more great software!
@ECHO.
PAUSE
GOTO END
:SORTTXT
SORT < "%1" >> "%2"
@ECHO.
IF "%2" == "" GOTO DESTFILE
IF NOT "%2" == "" GOTO FINISH
:DESTFILE
@ECHO   Sorting is complete...  Open your sorted file at:
@ECHO   "%1"
GOTO CLOSE
:FINISH
@ECHO   Sorting is complete...  Open your sorted file at:
@ECHO   "%2"
GOTO CLOSE
:END



How to create a bat file.

Create a .bat file 
1. Open note pad.
2. Write some command.
3.Save as .bat file(Chhose allfiles from dropdown )

Run a .bat file from console application. And how to get project folder directory in console application.

How to start process in .bat file.
Check whether it is open. 
If it is open then need not to open again.
 If it is not open then open it.


using System;
using System.IO;
using System.Diagnostics;

namespace runBatFile
{
    class Program
    {
        private static bool isOpen = false;
        private static Process batProcess = null;
        static void Main(string[] args)
        {
            var dir = Directory.GetCurrentDirectory();
            var dir1 = Directory.GetParent(dir);
            var dir2 = Directory.GetParent(dir1.ToString());

            string filepath = dir2+ "/BatFile/Test.bat";// = Server.MapPath("testBat.bat");
            filepath = filepath.Replace(@"\", @"/");
            if (isOpen == false)
            {
                batProcess = Process.Start(filepath);
                isOpen = true;
            }
            if (batProcess.HasExited)
            {
                batProcess = Process.Start(filepath);
            }
            Console.ReadLine();
        }
    }
}

Check weather a batch file is open or not. If open no need to open, if close then open again. in web application.


1.open a batch file
2.If it opened earlier then need not to open again.
3.If you close, it will open again.


using System;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using System.Threading;

namespace runBatFile
{
    public partial class _Default : System.Web.UI.Page
    {
        private static bool isOpen = false;
        private static Process batProcess = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            string filepath = Server.MapPath("testBat.bat");
            filepath = filepath.Replace(@"\", @"/");

            //if (isOpen == false)
            //{
            //    batProcess = Process.Start(filepath);
            //    batProcess.EnableRaisingEvents = true;
            //   // isOpen = true;
            //}
            //if (batProcess.HasExited)
            //{
            //    batProcess = Process.Start(filepath);
            //}

            //if (IsAlreadyRunning(filepath) == false)
            //    batProcess = Process.Start(filepath);

            if (isOpen == false)
            {
                isOpen = true;
                try
                {
                    batProcess = Process.Start(filepath);
                    batProcess.EnableRaisingEvents = true;
                    batProcess.Exited += new EventHandler(batProcess_Exited);
                }
                catch (Exception ex)
                {
                    // handle exception
                }
            }

        }

        private void batProcess_Exited(object sender, System.EventArgs e)
        {
            batProcess.Start();
        }

        private static bool IsAlreadyRunning(string strLoc)
        {
            //string strLoc //= Assembly.GetExecutingAssembly().Location;
            FileSystemInfo fileInfo = new FileInfo(strLoc);
            string sExeName = fileInfo.Name;
            bool bCreatedNew;

            Mutex mutex = new Mutex(true, "Global\\" + sExeName, out bCreatedNew);
            if (bCreatedNew)
                mutex.ReleaseMutex();

            return !bCreatedNew;
        }

        public bool IsProcessOpen(string name)
        {
            foreach (Process clsProcess in Process.GetProcesses())
            {
                if (clsProcess.ProcessName.Contains(name))
                {
                    return true;
                }
            }
            return false;
        }
    }
}

Home made remadies

Ayurveda In Your Kitchen

Ginger (Adrak)
Ginger is known for its anti inflammatory properties. It can be used for headaches. For instance, mixing equal parts of ginger juice and lemon juice and consuming it once or two times a day can provide relief from headache. You can also make a paste of one teaspoon of dry ginger powder along with two teaspoons of water; apply it on the forehead for a few minutes. It is also helpful in reducing joint pains, improves digestion and helps in nausea and vomiting. 

Carom seeds (Ajwain)
Ajwain mixed with small amount of salt when sipped with warm water is very useful for treating indigestion and stomach pain. Paste of ajwain and jaggery is also helpful in asthma treatment. Drinking ajwain tea helps provide relief from cold.

Turmeric (Haldi)
It is an analgesic, anti-inflammatory and anti bacterial herb. It helps reduce joint pain and it also heals cuts, prevents infection and is used to treat wounds. Turmeric milk provides relief from aches and pains and also strengthens the spine and joints. It is a good remedy for cough and cold and also relieves headache

Basil leaves (Tulsi)
Basil leaves are used to treat ulcers, wounds and cuts due to its antiseptic properties. Grind basil leaves and mix with sandalwood powder, apply this mixture to reduce pain. A mixture of basil leaves juice and coconut oil can be applied on cuts and wounds to give relief. Chewing some fresh basil leaves gives relief from cold and flu. To get rid of sore throat, gargling with water boiled with basil leaves is a useful remedy.

Fenugreek (Methi) 
A spoon of fenugreek seeds mixed with a pinch of asafoetida (heeng) along with water provides relief from stomach pain. Fenugreek is also useful in diabetes as it has a high amount of soluble fibre which helps lower blood sugar by slowing down digestion of carbohydrates. Methi ladoos are used as a cure for joint or back pain.

Asafoetida (Hing)
It has antiviral, antioxidant, anti-inflammatory and antibacterial properties. It is very useful in treating stomach disorders and also helps to relieve chest congestion. Heating some asafoetida in about one and a half cup of water and drinking it a few times on a daily basis can provide relief from mild tension headaches. It can also help to alleviate toothache; keep a small piece of asafoetida on an aching tooth to get relief. 

Bitter gourd (Karela)
It is useful in joint pains, digestion and gas problems. Bitter gourd is a very good remedy for diabetes, drinking bitter gourd juice empty stomach in the mornings can help keep diabetes under control. It is also a rich source of vitamins A, B1, B2, C and Iron. 

Lemon (Nimbu)
Lemons are rich in vitamin C which protects against cold and flu. You can get relief from headache by drinking warm water mixed with lemon or have a steaming cup of lemon tea. Vitamin C is also significant for healthy glowing skin; it can be applied to scars or age spots to reduce their appearance. Drinking lemon water also helps get rid of toxins from the body which is useful in keeping the skin clear of blemishes. 



All important links and short cuts.


Typeahead link
https://github.com/bassjobsen/Bootstrap-3-Typeahead

English learning url:

You tube downloadder
1.http://www.computerhope.com/issues/ch001002.htm

English learning links

You tube link for How to write unit testing using xunit and moq.
https://www.youtube.com/watch?v=kInFI2x7yLY

MSDN link for MVC  -   https://msdn.microsoft.com/en-us/library/gg416514(v=vs.108).aspx

Link for Marshalling in c# -- https://www.codeproject.com/articles/66245/marshaling-with-%20c-chapter-%20introducing-marshaling

html5 games
http://codeincomplete.com/posts/2011/6/11/javascript_breakout/

Csharp Game development links
http://www.c-sharpcorner.com/Blogs/7519/ball-and-break-game-in-C-Sharp.aspx
http://msdn.microsoft.com/en-in/library/bb975644(v=xnagamestudio.31).aspx
http://www.codeproject.com/Tips/357063/A-very-simple-car-race-game-in-Csharp-and-OpenGL
http://kickass.to/learning-c-by-programming-games-pdf-t7902190.html
http://it-ebooks.info/book/3210/
http://it-ebooks.info/book/3256/


How to setup android in Mac link-http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started


C++ tutorials links
We have a bit more on programming from one of the stalwarts of the game development industry (3d gaming owes it to him):
http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/

For those who are not familiar with functional programming:
http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf
(this makes a good case for it)



To bring up the Task Manager directly in Windows Vista, Windows 7 & Windows 8, 
press CTRL + SHIFT + ESC instead. This is the Task Manager shortcut in Wndows 8.