C Program to check whether a Number is a Palindrome

palindrome program in c

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 how to example

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

php how to example

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

mysql 5.7

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

LCM program example in c

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

php_print_statement

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 substr() function

php substr function

<?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

Compare and choose the best web hosting provider

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

Creating and Selecting a Database

creating and selecting a database in mysql on cli

Creating and Selecting a Database If the database administrator creates your database for you when setting up your permissions, you can begin using it. Otherwise, you need to create it yourself: mysql> CREATE DATABASE test2; Under Unix, database names are case-sensitive (unlike SQL keywords), so you must always refer to your database as test2, not … Read more

C Program to wish happy new year

wish happy new year

C Program to wish happy new year #include<stdio.h> #include<conio.h> #include<graphics.h> void shoot(); void shootagain(); void area(); void explode(int,int,int); void main() { int gm,gd=DETECT; initgraph(&gd,&gm,”C:\\TURBOC3\\BGI”); shoot(); getch(); closegraph(); } void shoot() { int i=0; int x=0,y=480,x1=15,y1=460; while(i<350) { area(); line(x+i,y-i,x1+i,y1-i); delay(50); i=i+10; cleardevice(); } explode(x+350,y-350,5); shootagain(); } void shootagain() { int i=0; int x=600,y=480,x1=585,y1=460; while(i<250) { … Read more