Posts

Showing posts from January, 2019

How to make HTML input tag only accept numerical values?

Quick and Easy Code <input type = "text" onkeypress = "return (event.charCode !=8 && event.charCode ==0 || (event.charCode > = 48 && event.charCode <= 57))" /> This will permit usage of numbers and backspace only. If you need decimal part too, use this code fragment <input type = "text" onkeypress = "return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode > = 48 && event.charCode <= 57)))" />

Why does su fail with “authentication error”?

The root account is disabled by default in Ubuntu, so there is no root password, that's why  su  fails with an authentication error. type sudo su and then enter the password

A project with this name already exists eclipse

This is what I did. Go to Window --> Show View --> Project Explorer Then right click on the project name that you want to delete and Click Delete. In the dialogue box, check 'Delete Project Contents on disk' It worked. I was able to create the project with the same name again.

android eclipse import existing-code

select at least one folder to import as project Just delete the ".project" file in your project folder (it's hidden on Linux, use "ls -a" to show), then from Eclipse, choose Create Android Project from existing source. It worked for me.. Thats it.Cheerzz.. /eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources now go to .projects folder and delete already existed project with same name

Fix PHP Ubuntu 18.10 phpinfo shows blank Page (PHP 7.0)

get an error when trying to check phpinfo(), it shows blank page. That problem caused by, you have not installed libapache2-mod-php. So, install with : sudo apt install php libapache2-mod-php then restart apache  sudo service apache2 restart

How to install xampp in linux

https://www.apachefriends.org/download.html after finishing download you can also just press  Alt + Ctrl + T  to open a new Terminal window. then type   cd Downloads Make the downloaded file executable.  Type in  chmod +xchmod +x xampp-linux-x64-5.6.40-0-installer.run  and press Enter Enter the installation command. sudo ./xampp-linux-x64-5.6.40-0-installer.run then continue with the GUI

LAMP display php errors

in terminal: Code: sudo gedit /etc/php/apache2/php.ini Scroll down to about line 531 under the "Error handling and logging" title where you will find Code: display_errors = Off Change this to say Code: display_errors = On Once you've done this and saved the file, in terminal run: Code: sudo /etc/init.d/apache2 restart

mysqli_real_connect() (HY0001698) Access denied for user 'root'@'localhost'

Turns out you can't use the  root  user in 5.7 anymore without becoming a sudoer. That means you can't just run  mysql -u root  anymore and have to do  sudo mysql -u root  instead. That also means that it will no longer work if you're using the  root  user in a GUI (or supposedly any non-command line application). To make it work you'll have to create a new user with the required privileges and use that instead. Login to MySQL sudo mysql -p -u root then enter the password entered during mysql installation. CREATE USER CREATE USER 'admin'@'%' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;

Printer not detected on installing software for canon MP287

Image
when you try to install the software you will get an error that printer detected please wait but after some time it will display printer not detected so to solve this problem you need to go to control panel and then devices and printers and then manually install drivers.

system starting very slow after installing new 8gb RAM

you need to install OS after formatting the c (windows)drive as os saves some driver files for old rams that was installed previously.