Tuesday, September 13, 2016

How to install TexStudio with Miktex ?

In order to work with Latex,  texStudio is one of the best solutions as TeX editor.
See the comparison of TexStudio with other other text editor.

Download the following software.

  1. Latex editor: TeXstudio 
    1. Select according to your OS environment.
  2. Repository: miktex repository 
    •  
      select the version according your OS environment
    •  Save the installer file, such as "setup-2.9.6050.exe"
    • If you have very good internet connection, better you download 'net install' which allow you to download the complete MikTeX repository.
So, now you must have the following software packages

Downloading and Installing MikTeX repository

1.  Open the miktex installer file. Here it is "Setup-2.9.6050.exe"
2.  Click on 'Next' button....

3.  Select 'Download MiKTeX' option to keep the repository for future purpose. <4.JPG>
4.  Select "Complete MiKTeX" option to install all packages.

5.  Now the choose the download source and click on 'Next' button.

6.  Give the location, where you want to keep the downloaded repository.

7.  Now the final step to download the repository. Click on "Start" button.

8. Now you need to wait until the download finish.
9. Once the download is finished, click on "Next" button.

10. Click on "Close" button.

      Here we finish downloading the MiKTeX repository. Now we perform the installation process.
11. Open the same miktex installer file again and follow step 2. Here it is "Setup-2.9.6050.exe"
12. Now Select "Install MiKTeX" option and click on "Next" button.

13. Now select "Complete MiKTeX" option and click on "Next" button.
14. Select the user based on your requirement and click on "Next" option.

15. Now you need to specify the path of already downloaded MikTeX repository. Click on "Next" button.

16. Now click on "Next" button, leaving the default installation directory.
17. Leave the default setting, and press "Next" button.
18. Click on "Start" button after reviewing the settings.
19. After the installation process finish, click on "Next" button and then click on "Close" button.

Installing TeXstudio   
Now install TeXstudio editor. Installing TeXstudio is quite easy. Just follow the installation wizard and leave all the setting as default. Below are some screenshot given for reference.
1
2

3

4

5

6

7










Thursday, September 8, 2016

Golang and Shell Script : Execute sh file from Go file and vice-versa.

We will see here today, executing a Go file from Shell script file and vice-versa.

Don't know, how to create and run a shell script file ?
Shell script file name : hello_sh.sh
Content of hello_sh.sh :

echo "Hello, I am inside 'hello_sh.sh' file."
echo "Now, I am going to call 'hello_go.go' file. The output: "
go run hello_go.go


Hello world ! program in Golang.
Go file name : hello_go.go
Content of hello_go.go :


package main
import (
        "bytes"
        "fmt"
        "log"
        "os/exec"
        "strings"
)
func main() {
        fmt.Printf("Hello, I am from 'hello_go.go' file.");
        fmt.Printf("\nNow, I am going to execute 'hello_sh.sh' file\n");
        cmd := exec.Command("bash", "hello_sh.sh");
        cmd.Stdin = strings.NewReader("");
        var out bytes.Buffer;
        cmd.Stdout = &out;
        err := cmd.Run();
        if err != nil {
                log.Fatal(err);
        }
        fmt.Printf("Output \n",out.String());
}


*For beginner change the file name "hello_sh.sh" and  "hello_go.go" according to your requirement.
*For advanced programmer, try this recursion and you can comment your output below.


-Thank you