Tuesday, May 19, 2015

[Latex] Installing packages like mathtools, enumitem, etc on Windows 8 using MikTek 2.9

You can directly download a .sty file and refer it in your .tex file but not always this works as sometimes a single package may require other sub-packages to be installed.

Inorder to install a new package using MikTex on Windows 8, it is very simple. Here are the steps:

1. Search for cmd in the applications search option
2. And right click this option and choose 'Run as administrator'
3. Then go to the folder where MikTex 2.9 is installed. For me it is: 'C:\Program Files (x86)\MikTex 2.9'
4. Further go to the subdirectory: 'C:\Program Files (x86)\MiKTeX 2.9\miktex\bin'
5. Once you are in this folder, type the command mpm_mfc_admin on command prompt which pops out a MikTex Package Manager console showing the different packages available.
6. From here choose whatever package you want to install by selecting that and pressing the '+' option on the top.

Thats all folks! 

How to dump a .sql file into mysql database

There are different ways you can dump a .sql file into a mysql database. But here is a quick way to do this.

Assume that you want to load the file "datafile.sql" into database named "alldata" Simply use these commands:

>> mysql

>> use alldata;

>> source datafile.sql;

>> show tables; //Displays all the tables dumped into this database.