Pages

Saturday, August 31, 2013

Removing your traces from the internet


A few days back, I searched on the internet for my name and I was surprised to see how many accounts I created once were pointing towards me. It's a bit scary when almost any interested person can get access to the internet and get to know about me, my location, activities, photos from facebook, flicker, google+ profiles etc. So I went to each link separately and hid my personal data which I shared once a couple of years ago.

Anyway, after sometime I figured out what google account settings can do for me. They are actually pretty handy to handle this issue. Under these settings you can search for your name and it will show you all the results from google search. You can actually do the same without going to settings thing. But interestingly, it also provides you the option to get alerts from google whenever a new data on the web is linked to your profile. Cool na?

Step 1:

Go to account settings from this link. If you are not logged into your gmail account, it will ask for username and password to reach there, of course.

Step 2: (De)linking your other google accounts
 Go to Account ==> Dashboard as shown below:






Here you can actually see all of your accounts connected with your gmail account and saved on google servers. There might be other third party websites too where you logged in with your gmail account but they will not be displayed here.

You can see following things from this page:
-google account details
-alerts set up with your gmail account
-how many android devices are linked with this account
-blogger profile
-orkut profile
-picassa
-google calendars
-youtube channels list etc.

It provides a good summary of all these account and you can take appropriate action from here.


Step 3: Find your traces from internet


If you click on 'Me on web' link as shown below, you can do very interesting things. You can search yourself on google, set alerts for future data being linked to your profile and you can also review your g+ profile over here.






Step 4: De-linking other third party websites from your google accounts


Click on Security and scroll down the page to see 'Connected applications and sites'. This is where you can all the sites where you ever used your gmail account to login into their website quickly. You can actually revoke all the access from those websites.


Click on 'Review Permissions' and you shall see a screen like below.


So you can revoke access for all of the uninteresting website from this link. You don't have to go to each site separately.

Happy googling =)




Wednesday, August 14, 2013

Compile C programs with gcc/cygwin


Compile C programs with gcc/cygwin

Open Cygwin terminal and type $ 'cd /cygdrive; ls'. Go to particular directory of any of the shown drives.

$ cd /cygdrive; ls

$ gcc -o o.exe file1.c

If a program consists of more than one file;

$ gcc -o o.exe file1.c file2.c file3.c

If you want to take inputs from a file, instead of entering one by one from the keyboard for scanf() inputs;

$  ./o.exe < ../sum1.dat

sum1.dat is in one directory up to the current directory.















Friday, August 2, 2013

Adding vector graphics images (svg) in Latex/pdf files


Adding an image in svg format in Latex keeps the picture intact on performing reasonable zoom in  and zoom out which means, its quality is not distorted.

There are a few easy steps to create and add svg image. First we will create a very simple image using Inkscape and then add into the Latex file.

Step 1:

Download and install latest version of Inscape from here. I downloaded 'inkscape-0.48.4-1-win32.exe' file.

Step 2:
 
Create a new Default page in Inkscape and add some random rectangles and circles. You can definitely create your desired figure but right now, create only without adding any text.

Step 3:

For my test example, I created the following one. Click Save-as and choose .pdf format. There will be one dialogue shown up before pdf file is created. Choose following configurations. PDF+Latex checkbox is important here. When you click on OK button, two files are created; .pdf and .pdf_tex


I created following image for my testing which I changed later, never mind.


Step 4:

Go to top of your Latex document where you add/use other packages. Ctrl+c and Ctrl+v following lines there. {First line will add 'color' package}

\usepackage{color}
\newcommand{\executeiffilenewer}[3]{%
\ifnum\pdfstrcmp{\pdffilemoddate{#1}}%
{\pdffilemoddate{#2}}>0%
{\immediate\write18{#3}}\fi%
}
\newcommand{\includesvg}[1]{%
\executeiffilenewer{#1.svg}{#1.pdf}%
{inkscape -z -D --file=#1.svg %
--export-pdf=#1.pdf --export-latex}%
\input{#1.pdf_tex}%
}


Step 5:

Now we will add image we created in step-3. Add following lines in the latex document where you want to add image. We will give only name here without giving extension (.pdf_tex).


\begin{figure}
\centering
\def\svgwidth{\columnwidth}
\includesvg{test2}
\end{figure}



test2 is the file name we want to add and it should be in the same folder where .tex file is. At this point, this test2 image should be displayed in the pdf file.

However, if we add text to this file, its not displayed in the generated pdf file from Inkscape.

Step 6:

Add a text object by clicking text icon in the lower left corner as shown in following picture. Type  '$$' text here.


 Now click on arrow icon and right click on this object. Go to 'object properties'.


 Anything you type in Title and Description will be appeared in the output file. Set the value and save it as .pdf with the same settings.



Step 7:

Now recompile your latex file. It should show the text. Rest is just playing with these features.

Draw Figure with Visio:

Drawing figures in Inkscape seemed a little bit difficult to me as I was not able to figure out how to draw arrow and other simple shapes easily.

So create a figure in Microsoft Visio,

Ctrl+a, Ctrl+c and then Ctrl+v in Inkscape and save it as .pdf with the same settings.  

OR

Export it as .svg from visio, and import it into the Inkscape.