sudo privileges to an existing user in ubuntu
sudo privileges to an existing user in ubuntu If you have already created the user, you can add the user to the sudo group by running the following command in a Terminal: sudo usermod -a -G sudo username
sudo privileges to an existing user in ubuntu If you have already created the user, you can add the user to the sudo group by running the following command in a Terminal: sudo usermod -a -G sudo username
MySQL Server Logs MySQL Server has several logs that can help you find out what activity is taking place. By default, no logs are enabled, except the error log on Windows. (The DDL log is always created when required, and has no user-configurable options. The following logspecific sections provide information about the server options that … Read more
C Program to check whether a Number is a Palindrome A palindrome is a number or a string which is similar when read from the front and from the rear. For example: 121 or Oppo etc. Below is a program to check whether a number is a palindrome or not. #include<stdio.h> #include<conio.h> void main() { int a, … Read more
how to get date of yesterday using php <?php $test=date(‘d.m.Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘d-m-Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘y-m-d’,strtotime(“-1 days”)); echo $test; ?>
PHP readfile() Function – file handling The readfile() function reads a file and writes it to the output buffer. Assume we have a text file called “blog.eduguru.txt”, stored on the server, that looks like this: “Hi, This is a test file. This is created to show the example of readfile function in php.” The PHP code to … Read more
mysqld dead but subsys locked Backup for future Safety: cp /var/lock/subsys/mysqld /root/mysqld than delete it rm /var/lock/subsys/mysqld then close all services that depends on mysql: service httpd stop and after that: service mysqld restart service httpd restart
C Program to find LCM of two Numbers using Recursion What is LCM LCM: Least Common Multiple of two numbers is the number that is a common multiple of the both the numbers. Below is a program to find LCM of two numbers using recursion. #include<stdio.h> int find_lcm(int, int); // function prototype declaration int main() { … Read more
PHP print Statement The print statement can be used with or without parentheses: print or print(). Display Text The following example shows how to output text with the print command (notice that the text can contain HTML markup): Example <?php print “<h2>PHP is Fun!</h2>”; print “Hello world!<br>”; print “I’m about to learn PHP!”; ?> Output: PHP is Fun! Hello world! I’m about to learn PHP! … Read more
<?php // PHP program to illustrate substr() function Substring($str){ $len = strlen($str); echo substr($str, 8), “\n”; echo substr($str, 5, $len), “\n”; echo substr($str, -5, 10), “\n”; echo substr($str,-8, -5), “\n”; } // Driver Code $str=”blogsforblogs”; Substring($str); ?> Output: blogs forblogs blogs for The substr() is a built-in function in PHP that is … Read more
Impact of web hosting on online business Now a days, e-commerce has moved online – and not just for big guys like Amazon, but for millions of smaller companies selling their wares and capabilities. At the same time, these business owners have also seen an increase in the options available for how they host and … Read more