Story (Skip it if you don’t have time)
I had a tough time once when i was processing text. I usually work on linux machines. I got this text file that was made on a windows machine and I was going to process it. The process involved adding a few characters at the start of every line. To do this. The usual thing to do is to replace ‘\n’ with ‘\nabc’ assuming abc are those characters to be placed at the beginning of every line. This just did not work on this particular file that i received. It was only after i used a tool that displays every single character on the file that i realized that text made on windows machines add something called a carriage return ‘\r’, along with the line feed character ‘\n’. Thus the need for a post.
TL;DR Start reading from here..
So all this goes long back to the age of the typewriter. LF stands for Line Feed. It would just move the paper up by a line space and keep the same horizontal position. CR on the other hand stands for Carriage Return and moves to the start of the line on the same line.
So intuitively it seems that the windows people have got this right. Because CR and LF would move the pointer to the start of the next line. But is it necessary in the current age? That is another question. On linux, only the line feed character is used. On Mac, only the carriage return character is used.
The ASCII codes are given below,
CR = \r = ASCII code 13
LF = \n = ASCII code 10
CRLF = \r\n = ASCII code 13 and then ASCII code 10
Keep this in mind when you are processing text files originating from these operating systems.
Thanks for reading.
For long, I have always been confused about how word creates a hyphen in some places while it is just a short minus in other places. If you are wondering about the difference, the hyphen is usually longer than a minus in MS Word. Quite curious as I am, No one ever bothers about such small things as a hyphen so I have never searched about it anywhere. But recently I stumbled upon the solution.
It just so happens that when you add a minus plus a word after that and a space after the word, the minus becomes a hyphen when you hit space. It doesn’t matter if you have a space between the hyphen and the word though.
So if for some reason you don’t get the hyphen you probably must’ve hit Enter instead of space.
Dropbox is a great application to use on windows. Syncing everything dynamically with no human intervention. All you have to install the application and copy paste the stuff you want to upload to the cloud for usage from another computer or for sharing photos and documents. But do you really want to keep all the stuff you store on drop box on your computer as well. I don’t think so. No matter how much memory you have, any extra GB of space is much appreciated. Besides there is no point in keeping a copy of things you don’t need on your pc.
But the good news is. There is a solution. You can actually decide what folders you want to have on your pc.
How do you do it
Right click on the drop box icon on the task bar and click on preferences.
When a new menu opens, click on the advanced tab and click selective sync.
A new window appears, There you can select which folders you want both in your pc and the cloud. If you want it, click on the check box if not, uncheck it and click on update.
That is all.
Thanks for reading.
Things you can skip unless you are bored
If you are a One note user. Well then you’ve been using ‘one good software’ I can tell you. I personally use One note to document my project work. Its just awesome. More about One Note later. Right now I want to get right to the point. One Notes screen capture tool for taking notes.
Ok lets say, you are working on something. You have some output on the screen. You have a graph. Well your software, such as MATLAB can help you save the graphs. But in other cases,
One note runs in the background if you don’t know that. Its there in your taskbar. Take a look. So at any point of time. All you need to do is press “windows + s” keys together and you get a crosshair which you can use to drag a box around the object you want to take a screen shot of.
It saves you a lot of time.
After you take a screen shot one note automatically saves it to its unfiled notes from where you can cut and paste it to your notebook.
Shown below is a screenshot of this blog I’m writing which automatically got saved to the unfiled notes, of which I took another screen shot using the same one note and then pasted it here.
Have fun with this tip.
Thanks for reading..
Click the link below to know how to use your laptop as a router. This is a great website where you can learn a lot of cool stuff.
But before you click it. Do not close this page because you would most probably come back because there is one just tiny detail missing.
So I’ve assumed that you’ve read the whole thing and if you are back here its probably because you want to know what to do with this particular thing… What do you click.?… Click on “Wireless Network Connection” and click ok. That should do it. You are clicking on Wireless network connection because that’s what you are going to use to create you home network with the devices you want to share your internet connection with.
So basically what you do is. Create a network (ad-hoc) with your devices and then use your laptop as a gateway to the internet using the 3G modem or the LAN connection. If you get it. Its good. If not. Have fun using your new wifi connection without worrying about all this.
Reopen the properties dialog box and click on the sharing tab and you should have this.
This could be very useful for all those iPod users out there like me. You need an internet connection badly. You don’t have a router with you. You could use your phone as a wifi hotspot. That would be a good option. But how many times would you recharge your phone in a day. The battery dries out so quickly. If you want to know how to use your Nokia phone as a hotspot though, Check out this blog post!.
Another easy way is to get one of those small pocket routers. This one from TP LINK was impressive and cheap. It costs 1900 INR. 1850 INR in Flipkart as of today. That would be about 30 to 35 USD I guess. Try it out if you have the cash and if you think you shouldn’t put your laptop through too much work, if you think this is too much work. *wink
I would write a whole article about this. But then, I read this wonderful article which explained the complete process wonderfully. You can skip to the website if you are in a hurry, But just read the sentence in bold 😉 before you carry on.
Moving from Ubuntu 10.10 to Fedora 17 to Linux Mint, I guess I did something bad to the bootloader files. Besides that I had installed some software in windows which could not be removed properly so i used to get the occasional errors. Plus my windows 7 slowed down. So i thought i should format my whole hard drive and re install everything. I spent a day with this, backing up all my data in my external hard drive and then formatting everything on my Laptop’s hard disk and reloading everything. Coming to think of it, This feels pretty good. Feels like a brand new start.
Through it all, This blog and the links inside the blog as you read on. Helped me learn a lot and now I am really really confident about how the installation works and i guess i can troubleshoot some of the issues in my friend’s laptops too. I feel it would be of great help to you whether you are going for a Dual boot or not. The method explained here is really neat. I love it. Plus it helps you avoid the annoying Grub boot menu and helps you create a simplified Boot Menu where you can choose from one of two choices, Windows or Ubuntu, and even help you keep windows as your default OS to boot. Which is the most interesting thing about this article.
Burning DVD or CD images on Windows 7 is a bliss. There is absolutely no trouble at all. With the included burning software that comes along with windows. You don’t need anything more.
If you have disc images that you want to burn. Then Burning them is just as simple as right clicking and clicking on ‘Burn disc image’ as shown below.
You will be prompted with a screen with an options to..
1. Burn the Disc
2. Select the Disc drive
3. Option to Verify disc after burning.
That is it. Click on burn and it runs smooth as silk. No problems at all.
This is mainly for people who try to burn their Ubuntu or Fedora or Linux Mint image files into a DVD. The website recommends software like Infra recorder. But if you are a windows 7 user. Why should you install another software when windows 7 does the job so perfectly!
In my next post I will be talking about the best ways to burn images in winXp.