Friday, December 18, 2009

How to identify the overwritten buffer's in C/C++ programming.

How to identify the overwritten buffer's in C/C++ programming.

Usually when we allocate memory using malloc(),
CRT does that with the hex value "FD" before and
after the memory being allocated. We can do the
check of them by looking into the memory view of
that allocated particular memory address.

While writing to the buffer if we examine
these memory locations, we can able to identity
whether we are using memory over than the allocated
size.

This is a simple method or a quick examining
method to override memory issues becuase of wrong
allocation.

Wednesday, December 2, 2009

Error in AVG Exchange Extension

I am using Outlook 2007. I have been left pop up with the following errors, while starting Outlook after recent updates from AVG.

The Add-in "AVG Exchange Extension" (C:\PROGRA~1\AVG\AVG8\avgxch32.dll) cannot be loaded and has been disabled by Outlook. Please contact the Add-in manufacturer for an update. If no update is available, please uninstall the Add-in.

The Add-in "AVG Exchange Extension" (C:\PROGRA~1\AVG\AVG8\avgxch32.dll) cannot be loaded and has been disabled by Outlook. Please contact the Add-in manufacturer for an update. If no update is available, please uninstall the Add-in.

The Add-in "AVG Exchange Extension" (C:\PROGRA~1\AVG\AVG8\avgxch32.dll) cannot be loaded and has been disabled by Outlook. Please contact the Add-in manufacturer for an update. If no update is available, please uninstall the Add-in.

Inorder to disable the AVG Exchange Extension I have followed the following steps:

1. Open Outlook 2007.
2. Follow the path. Tools -> Trust Center -> Add ins(in the left column).
3. Select "Client Exchange Extensions" in the combo box at the right hand side bottom and press "Go".
4. You will get the Pop-up of extensions listed with the outlook from various clients.
5. Disable "AVG Exchange Extension" by unchecking that from the checkbox list.
6. Click Okay and restart Outlook to confirm error free.

Enjoy error free Outlook.......

IMPORTANT:

It is better to follow if you have outlook configured for Official mails. Usage of other mail ids are at your own risk.


Monday, November 30, 2009

How to identify Windows OS architecture(whether a computer is running a 32-bit version or 64-bit version)

Determine the operating system bit count

Locate the operating system that is running on your computer in this section, and then follow the steps to determine the bit count of your operating system.

Windows Vista

If you have Windows Vista, there are two methods to determine whether you are running a 32-bit or a 64-bit version. If one does not work, try the other.
Method 1: View System window in Control Panel

  1. Click Start
    Collapse this imageExpand this image
     Start button
    , type system in the Start Search box, and then click system in the Programs list.
  2. The operating system is displayed as follows:
    • For a 64-bit version operating system: 64-bit Operating System appears for the System type under System.
    • For a 32-bit version operating system: 32-bit Operating System appears for the System type under System.
Method 2: View System Information window

  1. Click Start
    Collapse this imageExpand this image
     Start button
    , type system in the Start Search box, and then click System Information in the Programs list.
  2. When System Summary is selected in the navigation pane, the operating system is displayed as follows:
    • For a 64-bit version operating system: x64-based PC appears for the System type under Item.
    • For a 32-bit version operating system: x86-based PC appears for the System type under Item.
If you cannot determine the operating system bit count with these methods, go to the "Next Steps" section.

Windows XP

If you have Windows XP, there are two methods to determine whether you are running a 32-bit or a 64-bit version. If one does not work, try the other.
Method 1: View System Properties in Control Panel

  1. Click Start, and then click Run.
  2. Type sysdm.cpl, and then click OK.
  3. Click the General tab. The operating system is displayed as follows:
    • For a 64-bit version operating system: Windows XP Professional x64 Edition Version <> appears under System.
    • For a 32-bit version operating system: Windows XP Professional Version appears under System.
    Note is a placeholder for a year.
Method 2: View System Information window

  1. Click Start, and then click Run.
  2. Type winmsd.exe, and then click OK.
  3. When System Summary is selected in the navigation pane, locate Processor under Item in the details pane. Note the value.
    • If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of Windows.
    • If the value that corresponds to Processor starts with ia64 or AMD64, the computer is running a 64-bit version of Windows.
If you cannot determine the operating system bit count with these methods, go to the "Next Steps" section.

Windows Server 2003

If you have Windows Server 2003, there are two methods to determine whether you are running a 32-bit or a 64-bit version. If one does not work, try the other.
Method 1: View System Properties in Control Panel

  1. Click Start, and then click Run.
  2. Type sysdm.cpl, and then click OK.
  3. Click the General tab. The operating system is displayed as follows:
    • For a 64-bit version operating system: Windows Server 2003 Enterprise x64 Edition appears under System.
    • For a 32-bit version operating system: Windows Server 2003 Enterprise Edition appears under System.
Method 2: View System Information window

  1. Click Start, and then click Run
  2. Type winmsd.exe, and then click OK.
  3. When System Summary is selected in the navigation pane, locate Processor under Item in the details pane. Note the value.
    • If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of Windows.
    • If the value that corresponds to Processor starts with EM64T or ia64, the computer is running a 64-bit version of Windows.
If you cannot determine the operating system bit count by using these methods, go to the "Next Steps" section.

Notes
  • To find the computer’s bit count, see the documentation that was included with the computer, or contact the hardware manufacturer.
  • Intel Itanium-based computers can run only 64-bit versions of Windows. Intel Itanium-based computers cannot run 32-bit versions of Windows. Currently, 64-bit versions of Windows run only on Itanium-based computers and on AMD64-based computers.

Link Followed:
http://support.microsoft.com/?kbid=827218

Saturday, November 7, 2009

காயகல்பம் பற்றிய சில குறிப்புகள்

காயகல்பம் என்றால் என்ன?

காயமாகிய உடலை கல்பம் செய்வது - சித்தம் செய்வது.
மூப்பு, நோய், மெலிதல், பெருத்தல், பசி, தாகம், களைப்பு, அதிக தூக்கம்
ஆகியவை இல்லாமல் இருத்தல்; ஐம்புலன்கள் கூர்மை மாறாமல் இருத்தல்; மலம்,
சிறுநீர், வியர்வை அதிகம் வெளியிடாமல் இருத்தல், குளிக்கவில்லையென்றாலும்
துர்நாற்றமில்லாமல் இருத்தல் போன்ற தன்மைகளைப் பெற்றிருத்தல் காயகல்பத்தில் அடங்கும்.
உடலைக் கல்பம் செய்துவிடுவதால் அதில் சிரமமில்லாமல் உயிர் இருப்பதற்கு வசதி ஏற்படுவிடுகிறது.
உணவோ நீரோ அதிகம் தேவைப்படமாட்டாது.
நீண்டகாலத்துக்கு உயிர் உடலில் தங்கியிருப்பதற்கு முடியும் நிலையில்
உடல் இருக்கும்.
ஆனால் அளவில்லாத காலத்துக்கு உயிரை வைத்துக்கொள்ள முடியுமா?
ஆயுட் காலம் என்பது இருக்கிறது அல்லவா.
சமாதி நிலையில் இருப்பது, நிர்விகல்ப சமாதி, உயிரை/
ஆவியுடலை வெளியில் உலவச் செய்வது, கூடுவிட்டுக் கூடு பாய்தல்
போன்றவையெல்லாம் இதன் தொடர்பாக உள்ள சமாச்சாரங்கள் தாம்.
காயக்ல்பம் செய்துகொண்டாலும்கூட உயிரை அந்த
உடலில் நீண்ட காலம் தங்க வைப்பதற்கு விசேஷமான
பிராணாயமம் போன்ற முறைகள் இருக்கின்றன.
எத்தனை சுழி மூச்சு ஒரு மனிதனுக்குக் கொடுக்கப் பட்டிருக்கிறது
என்பதற்கு வரையறை உண்டு.
அந்த சுழியைச் சேமித்து வைத்துக்கொள்ளும் முறைகள் உண்டு. அவ்வாறு
சேமிப்பில் போட்டுக்கொள்ளும்போது அந்த
சுழிகளின் கணக்குக்கு ஏற்ப ஆயுளும் நீடிக்கும் அல்லவா?
நாளொன்றுக்கு சராசரி மனிதன் 25920 முறை மூச்சு
விடுகிறான். அவனுடைய நாடி 103,680 தடவை அடிக்கிறது.
இந்த வேகத்தைக் குறைத்துக் கொள்ளமுடிந்தால்....?
யோகியருக்கும் சித்தர்களுக்கும் இது முடியும்.

மிக மிக மிக எளிமைப் படுத்திச் சொல்லியிருக்கிறேன். மேலும் சொல்கிறேன்.
காயகல்பத்திற்குப் பல முறைகளும் பயிற்சிகளும் இருக்கின்றன.
தோஷமற்ற உணவு, குறைவான உணவு, ஒரு நேர உணவு, குடலைக் கழுவுதல், குறைவான
தூக்கம், பிராணாயாமம், தியானம், இயமம், நியமம், ஆசனம் போன்ற பல சங்கதிகள்
சம்பந்தப் பட்டிருக்கும். சில மருந்துகளும் உட்கொள்வார்கள்.
தங்க பஸ்பம்கூட காயகல்பம் சம்பந்தப்பட்டதுதான்.

அமூரிதாரணை என்றொரு முறை உண்டு. காலையில்
எழுந்தவுடன் சிறிது சிறுநீரைக் கழியவிட்டு, அதன் பின்னர் ஓர்
உள்ளங்கையளவு - நூறு மிளகு அளவுக்குச் சிறுநீரைப் பிடித்து,
வெறும் வயிற்றில் குடிப்பதுதான் அமூரிதாரணை.

காயகல்ப மூலிகை மருந்துகளில் ஒரு மருந்தைப் பற்றி
டாக்டர் சர்மா ஒருமுறை சொன்னார்.
பல ஆண்டுகள் வயதாகிய முற்றிய நெல்லிமரத்தை
வெட்டிவிடுவார்கள். அதன் அடிப்பாகம் வெளியில் நீட்டிக்
கொண்டிருக்கும். அதைக் குடைந்து ஒரு குடம்பை உருவாக்கிக் கொள்வார்கள்.
அதற்குள் தொண்ணூற்றாறு வகை மூலிகைகள், மருந்துப்
பொருட்களைச் சித்தப்படுத்தி, சுத்தப்படுத்தி சேர்மானம் செய்து
வைப்பார்கள். அந்த தொண்ணூற்றாறு பொருட்களில் நெல்லிக்
கனியும் இருக்கும். அதற்குமேல் வேடுகட்டி களிமண்¨ணைப்
பூசிவிடுவார்கள். அதன்பின்னர் அதற்கு நெருப்பு மூட்டி மெதுவாகக் கனன்று
கொண்டிருக்குமாறு செய்வார்கள். நாட்கணக்கில்
நெல்லிமரத்தின் அடிப்பாகம் எரிந்து கனன்று கொண்டிருக்கும்.
குறிப்பிட்ட காலம் கனன்றுகொண்டிருந்த பிறகு மேலேயுள்ள களிமண்ணால்
கட்டப்பட்டிருந்த வேடை உடைத்து நீக்குவார்கள்.
அதற்குள் இருக்கக்கூடிய மருந்தை எடுத்து நன்கு சுத்தப்படுத்தி
பயன்படுத்துவார்கள்.

இது ஒரு காயகல்ப மருந்து.

I got this information from a yahoo group.

Wednesday, November 4, 2009

How to unpack a WAR file

A WAR file is a web application, zipped into a single file. It is basically just a ZIP file with a special folder structure. It is called a WAR file to identify it as a web application.

Why would I want to unpack my WAR file?

    * WAR files are sometimes more difficult to undeploy, and have problems such as not being able to determine the application root, it is sometimes preferable to unpack the WAR file.
    * Some packages such as JSPWiki have the properties files in the WAR, so it must be unpacked to edit settings before deployment.

How to unpack

    * Rename the file as a zip file (eg: myapp.war becomes myapp.zip)
    * Unzip as you would with any other zip file




Saturday, October 31, 2009

Get Samba to Work with Higher Version of Windows.

Accessing network drives shared on Samba protocol cannot be accessed in higher versions of Microsoft Windows . The technical reason for this failure is Microsoft changed its default security policy to use NTLMv2 authentication only.

Inorder to overcome this we change this security policy to meet our requirements.

Steps are as follows:

1. Run "secpol.msc" from the command prompt / Run utility in Windows. (Start->Run.)
2. It will display Microsoft Security Console for "Local Security Policy".
3. Select the "Local Policies" from the tree of "Security Setting" in the Left hand tab.
4. Select the "Security Options" from the tree of "Local Policies".

Security Settings->
Local Policies->
Security Options

5. Select the policy "Network Security: LAN Manager authentication level" from the list of policies in the right hand side.
6. Right click and open the "Properties".
7. Select the tab "Local Security Setting".
8. Change the drop down menu from "NTVLM2 responses only" to "LM and NTLM – use NTLMV2 session security if negotiated".
9. Apply and close the property window.

Now you can access network drives shared on Samba protocol.

Enjoy sharing.

Monday, October 12, 2009

Presenting a word in various most popular encodings

Here's the file "Hello" in various encodings:

48 65 6C 6C 6F

This is the traditional ANSI encoding.

48 00 65 00 6C 00 6C 00 6F 00

This is the Unicode (little-endian) encoding with no BOM.

FF FE 48 00 65 00 6C 00 6C 00 6F 00

This is the Unicode (little-endian) encoding with BOM. The BOM (FF FE) serves two purposes: First, it tags the file as a Unicode document, and second, the order in which the two bytes appear indicate that the file is little-endian.

00 48 00 65 00 6C 00 6C 00 6F

This is the Unicode (big-endian) encoding with no BOM. Notepad does not support this encoding.

FE FF 00 48 00 65 00 6C 00 6C 00 6F

This is the Unicode (big-endian) encoding with BOM. Notice that this BOM is in the opposite order from the little-endian BOM.

EF BB BF 48 65 6C 6C 6F

This is UTF-8 encoding. The first three bytes are the UTF-8 encoding of the BOM.

2B 2F 76 38 2D 48 65 6C 6C 6F

This is UTF-7 encoding. The first five bytes are the UTF-7 encoding of the BOM. Notepad doesn't support this encoding.