Monday, December 24, 2012

To set up virtual network

http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/259c7ef2-3770-4212-8fca-c58936979851/

- very useful for web application which is set up at PC and which does not have internet connection.

Monday, December 17, 2012

how to disable third party repositories

     Sam_ (and-sam) said : #2
System administration -> software sources -> third party
https://help.ubuntu.com/community/Repositories/Ubuntu#Third-Party%20Software%20Tab
## Fix broken packages
via CLI method (other apps, such as Synaptic, Software Sources, Update Manager should be closed):
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
## Clean up package cache
sudo apt-get autoclean
sudo apt-get autoremove
## Update
sudo apt-get update
sudo apt-get upgrade
Reference:
http://library.gnome.org/users/gnome-terminal/stable/gnome-terminal-get-started.html.en
https://help.ubuntu.com/community/RootSudo#Usage
https://help.ubuntu.com/community/AptGet/Howto
https://help.ubuntu.com/community/SynapticHowto


From : https://answers.launchpad.net/ubuntu/+source/apt/+question/99388

Friday, September 21, 2012

Build Failed for Install Task in Tomcat

Class InstallTask is deprecated & replaced by DeployTask, so later version catalina-ant.jar (tomcat set up) doesn't have class InstallTask. It's just the case of replacing InstallTask by DeployTask to see it working again. For example, following entry in build.xml in spring mvc tutorial 
 
 

 

should be replaced as 

 
 

From http://www.coderanch.com/t/108375/tools/Failed-build-InstallTask-cannot-found

Wednesday, September 12, 2012

Change Mysql Password in WAMP server

1.Install wamp2 server

2.Start->run->cmd->

3.Type cd\ and press enter

4.Locate your mysql directory(like this is my default directory C:\wamp
\bin\mysql\mysql5.1.36\bin)


5.After like this you should have do C:\wamp\bin\mysql\mysql5.1.36
\bin> 
mysql -u root -h 127.0.0.1 -P 3306 -p press enter after you got 
Enter Password don't put anything simply click enter button

6.After like this mysql>

7.simply type mysql>use mysql;
mysql>show tables;
mysql>select * from user \G;

8.You can set your new password: mysql> UPDATE mysql.user SET
Password=PASSWORD('xxxx') WHERE User='root';
 (where replace 'xxxx' 
with your new password) 
(eg.mysql> UPDATE mysql.user SET Password=PASSWORD('muthu') WHERE
User='root';
)

9.Finally type mysql> FLUSH PRIVILEGES; 
mysql>exit;

10.Check your settings: mysql> mysql -u root -p
enter password:*****
 
press enter button.....


Add/Change password in phpMyadmin's config file(named config.inc.php under phpMyadmin folder) and change false to change.

From : http://www.kirupa.com/forum/showthread.php?279644-How-to-reset-password-in-WAMP-server

Friday, August 24, 2012

CSS, JS, and Images are not accessible in Window Server 2008

It need to add Static Content server in the IIS. At window server 2008, need to right click on Web Server IIS > Add Role Services > tick on Static Contents and finish the installation. And then restart the IIS.

credited to : Henk De Groot  from 

http://www.dailycomputersolutions.com/blog/index.php/2010/04/23/iis-not-showing-images-and-css/


Henk De GrootCollapse
Wow man, many thanks....a real life saver.
To do this in windows 2008 R2, you need to go to the Server Manager.
Then select Add Role Services.
Now find the "Static Content" feature under the Webserver->Commen HTTP Features.
Enable this and complete the wizard.
Work for me and I can get some sleep now.

Wednesday, August 15, 2012

Saving \x text from Power Point to Excel into MySQL

FROM http://php.net/manual/en/function.iconv.php

berserk220 at mail dot ru 29-Feb-2008 06:44
So, as iconv() does not always work correctly, in most cases, much easier to use htmlentities(). 
Example: =htmlentities(file_get_contents("incoming.txt"), ENT_QUOTES"Windows-1252");  file_put_contents("outbound.txt"html_entity_decode($content,ENT_QUOTES "utf-8")); ?>

Monday, August 6, 2012

Downloading CSV over https

header("Pragma: public");
  header("Expires: 0");
  header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  header("Cache-Control: private",false);
  header("Content-Type: application/octet-stream");
  header("Content-Disposition: attachment; filename=\"$filename\";" );
  header("Content-Transfer-Encoding: binary");
    print $out;

http://stackoverflow.com/questions/2232103/how-do-i-get-csv-file-to-download-on-ie-works-on-firefox