Monday, October 11, 2010

Zoom in/out with Visual Studio 2010

Visual Studio 2010 now supports the ability to zoom in and out of the text editor by using the mouse wheel. Ctrl + Mouse wheel up/down to Zoom in and Out. I love this feature for a couple of reasons:

  • Very nice when showing code to a group, such as during a demo to a large audience, or during team code reviews.
  • Makes it easy to pop in and out of your code to toggle between the “big picture” and “code level” views.

But what if you don’t have a mouse wheel? It turns out that there are keyboard shortcuts for this.

Functionality Command Keyboard Shortcut
Zoom in View.ZoomIn Ctrl+Shift+period
Zoom out View.ZoomOut Ctrl+Shift+comma

Friday, October 08, 2010

Disable User Account Control (UAC) For Administrators Only

If you can’t stand the User Account Control prompts, but you’d still like to retain a little bit of security, you can disable it for Administrator accounts only.

To configure this setting on Windows 7 / Vista Business and Ultimate, you can use the Local Security Policy configuration. Just type in secpol.msc into the Start menu search box and hit enter.

Brose down to Local Policies \ Security Options

image

Find the following in the list: “User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode” and double-click on it.

image

Change the setting to “Elevate without prompting”. You should be all done and good to go…

Note: Disabling UAC will lead to a less secure system, so better be warned :-)

Disabling User Account Control on Windows 7

Windows 7 makes it much easier to deal with UAC settings, and in fact you don’t have to completely disable UAC if you don’t want to. Just type UAC into the start menu or Control Panel search box or find how to go to UAC from my previous post.

image

Adjust the notification bar as per your choice. if you drag it all the way down to the bottom then it’ll be disabled entirely.

Note: Disabling UAC will lead to a less secure system, so better be warned :-)

User Account Control in Windows 7

User Account Control (UAC) helps defend your PC against hackers and malicious software. Any time a program wants to make a major change to your computer, UAC lets you know and asks for permission.

Introduced in Windows Vista, UAC is now less intrusive and more flexible. Fewer Windows 7 programs and tasks require your consent. If you have administrator privileges on your PC, you can also fine-tune UAC's notification settings in Control Panel. You can find this at Control Panel –> System and Security –> Action Center. Click on Change User Account Control Settings. (See Figure below) This window will allow user to choose when to be notified about changes in the computer.

uac_settings

Monday, October 04, 2010

JavaScript: Display Clock

Displaying a clock is very similar to making a countdown timer. All we have to do is to create a new date and get it's hours, minutes, and seconds.

Here is a example:

<!-- This span is where the clock will appear -->
<div id='clockDiv'></div>
<script type="text/javascript">
function clock() {
   var now = new Date();
   var outStr = now.getHours()+':'+now.getMinutes()+':'+now.getSeconds();
   document.getElementById('clockDiv').innerHTML=outStr;
   setTimeout('clock()',1000);
}
clock();
</script>

Hope this helps :-)