How to enable NTLM in windows using regedit?

November 11th, 2009

Using Windows Registry – Creating a .reg file

 a.     Create a text file.

b.    Copy the following entries (in bold) and paste in the text file (it is very important to keep these entries as it is with the blank spaces and line breaks):

 Windows Registry Editor Version 5.00

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]

“lmcompatibilitylevel”=dword:00000000

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]

“ntlmminclientsec”=dword:00000000

“ntlmminserversec”=dword:00000000

 

c.     Save the file as ntlm.reg.

d.    Double click on ntlm.reg and click “Yes” in the dialog box that appears next asking you whether you want to save the changes in the registry.

 

Note: Please ensure that the first line of your .reg file reads “Windows Registry Editor Version 5.00” for Windows 2000, Windows XP and Windows Server 2003 based machines or “REGEDIT4” for Windows 98 and Windows NT 4.0 based computers.

How to close a window without prompt?

November 10th, 2009

How to close a window without prompt?

For servlet:

        out.println (”<script>”);
        out.println (”window.opener = top;”);
        out.println (”window.close()”);
        out.println (”</script>”);

For html or jsp:

         <script>
        window.opener = top;
        window.close();
        </script>

How To Export and Import of .csv data out of and into MySQL

October 26th, 2009

How To Export and Import of .csv data out of and into MySQL

 This method works for the MySQL 5  and not sure about other versions.

Exporting the MySQL data into a comma delimited (.csv) file

 SELECT * INTO OUTFILE ‘ /data.csv’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\n’ FROM table1;

This will dump your table into a file with each row from the database being on it’s own line, columns separated by commas, and if there are any spaces or funny business going on with the data in a field, the data will be enclosed in double quotes. You can make changes to this if you like by, for instance, substituting ‘,’ with ‘\t’ would result in a tab delimited file.

Importing the comma delimited (.csv) file back into MySQL

 First thing, you’ll need to clear out your old table (otherwise the keys would collide):

DELETE FROM table;

Then you can proceed with the import:

LOAD DATA INFILE ‘ /data.csv’ INTO TABLE table1 FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\n’;

Please read this article to know more about Load data query.

Ping not recognized as internal or external command

October 22nd, 2009

Ping not recognized as internal or external command 

Solution :

Right click on My computer

Go to Properties

Click on the advance tab.

click on Environment Variables

Scroll to Path but if there is none please just create a new one and write Path under variable name and paste this: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem under variable value and click on ok.

Otherwise Select Path and click on Edit and paste the same.

It should fix the issue.