enable firewall - sudo ufw enable reload firewall - sudo ufw reload disable firewall - sudo ufw disable allow port ya service - sudo ufw allow port/service-name (like - sudo ufw allow ssh or sudo ufw allow 22 or sudo ufw allow from sourceip to any port 22) allow rule delete - sudo ufw delete allow port/service-name (like - sudo ufw delete allow ssh or sudo ufw delete allow 22 or sudo ufw delete allow from sourceip to any port 22)
Month: September 2021
install ffmpeg in ubuntu
sudo add-apt-repository ppa:jonathonf/ffmpeg-4 sudo apt-get update sudo apt-get install ffmpeg
Disable apache server status in ubuntu
sudo a2dismod status
sudo systemctl restart apache2.service
Use of Hindi (unicode) character from request parameter in java
String str = request.getParameter("sentence"); System.out.println("before convert - " + str); str = new String(request.getParameter("sentence").getBytes("ISO-8859-1"),"UTF-8"); System.out.println("after convert - " + str);
Round a double to any decimal places in java
int n = 2;
round(xxxx.xxxxx, n); // Return xxxx.xx