My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com









Tuesday, June 19, 2012

VC++: See line numbers in Visual Studio IDE

Microsoft Visual Studio, by default does not show line numbers in the Source Code editor window. Though it is much required at times, but because of some vague statistics (in my opinion :) ), Micrsoft has preferred to not make it a default option. All said, enabling it on is pretty easy. Though a lot of developer community still struggles to use Edit->Goto line number option. The steps to do this is:-

Goto Tools->options->Text editor->All languages (on some versions only  languages)->General->Display->Check the line numbers and press Apply or OK.

See the attached screenshot:


And in case you want to set this change only for one language you can select that language instead of all languages.
For eg. see below where I made changes only for VC++ coding:

Happy coding ;)
-Anwar

Friday, June 1, 2012

turn off (disable) pc speaker. Stop system beep noice- It annoys!

At times you may start getting that irritable beep sound out of you PC speakers. Once I was such annoyed that I literally banged on my CPU to stop it. And, you nothing happened! After all you need some software interrupts to start it, and other sort of interrupt to stop it.

Sometimes it really occurs so continuously that one would become ultra ultra resilient to even one instance of beep. And sometimes you execute some scripts and it keeps on making that irritable sound. Here is a quick way to put off this noice.

So basically I discovered two ways to do that.

GUI Method: Goto Device Manager->Non Plug and Play Drivers-->Beep. A window pops up. Click on Stop.


Commandline method:
And this is pretty smart and handy way to do that. The command used are net start beep and net stop beep.

This was pretty easy..Huh!
Read more often and traverse the entire list of posts to learn some seriously good tricks.
Cheers!!

Photos of Anwar Faiz with Ankit Fadia in Adobe

This post is in continuation with my old post Meeting with Ankit Fadia. Similar article is also published at My meetinng detail with Mr. Fadia on MeOnShow Forum++

Strings tool from Sysinternals: String Obfuscation Testing to find Hardcoded Strings in source code

It was in 1996, that Sysinternals website was Created. Mark Russinovich and Bryce Cogswell hosted their advanced system utilities and technical information. The Sysinternals utilities help you manage, troubleshoot and diagnose your Windows systems and applications.

One of these Tools is Strings. Current version is v2.5

At times, DLL, executable, .lib and object files have embedded UNICODE/ Ascii strings that you cannot easily see with a standard ASCII strings or grep programs. Strings is a utility that scans the file you pass it. By default, it searches for strings of length of 3 or more. Wonderful part is that it works on nearly all flavors of Windows including Win 95!

This became such a hit that even Microsoft has given great interest in this project. And, the result is that today you can download this utility directly from Microsoft Website. Yes!! MS holds it now!!
Download from: http://technet.microsoft.com/en-us/sysinternals/bb897439.aspx

Using Strings program:-
1. Open a command prompt
2. Run strings
3. There are multiple options that are described as below:-

usage: strings [-a] [-f offset] [-b bytes] [-n length] [-o] [-q] [-s] [-u]
Strings takes wild-card expressions for file names, and additional command line parameters are defined as follows:
-o Print offset (not of much use)
-n This is the minimum string length (default is 3)
-q Quiet mode
-s Recursive traversal of subdirectories
-a ASCIIonly search [default is Unicode and Ascii]
-b how many Bytes in file to scan
-f File offset from which to start scanning.
-u Unicode-only search (Unicode and Ascii is default)
Happy catching your hardcoded strings. Make your product more secure.