php code to check if function exists or not

when we are doing coding a project,their is a chance of misspelling the function name it will end up with an error function does not exists error php,so before calling a function you have to check if the function is already define or not,for we have simple php code to check if function exists or not here is the syntax

function_exists(FUNCTION_NAME_HERE);

This will Return true if the function is defined

e.g

if(function_exists('new_func')){
  //new_func is defined

  new_func();  call that function  
}

This function we can use at the time of defining a function,otherwise you will get an error message saying already the function “new_func” is defined

So for before all fucntion declare case you have to use function_exists(‘new_func’) fucntion to double confirm no where the function is define more than one times

see the error message here

php-code-to-check-if-function-exists-or-not

if(!function_exists('new_func')){
 function new_func()
 {
  echo "php code to check if function exists or not";	 
 }
}

Out put
php code to check if function exists or not

Multi Item Carousel slide sample code

Here am going to show you how to add Multi Item Carousel slide in your website here is the Multi Item Carousel slide sample code

1) Script files to include in the header

<link rel="stylesheet" href="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/assets/owl.carousel.min.css">
<link rel="stylesheet" href="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/assets/owl.theme.default.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/owl.carousel.js" type="90e6e4b8e06878c6e6ff42b7-text/javascript"></script>

2)  CSS Part


<style type="text/css">
 .carousel-wrap {
 width: 1000px;
 margin: auto;
 position: relative;
 }
 .owl-carousel .owl-nav{
 overflow: hidden;
 height: 0px;
 }

 .owl-theme .owl-dots .owl-dot.active span, 
 .owl-theme .owl-dots .owl-dot:hover span {
 background: #2caae1;
 }


 .owl-carousel .item {
 text-align: center;
 }
 .owl-carousel .nav-btn{
 height: 47px;
 position: absolute;
 width: 26px;
 cursor: pointer;
 top: 100px !important;
 }

 .owl-carousel .owl-prev.disabled,
 .owl-carousel .owl-next.disabled{
 pointer-events: none;
 opacity: 0.2;
 }

 .owl-carousel .prev-slide{
 background: url(img/icon.png) no-repeat scroll 0 0;
 left: -33px;
 }
 .owl-carousel .next-slide{
 background: url(img/icon.png) no-repeat scroll -24px 0px;
 right: -33px;
 }
 .owl-carousel .prev-slide:hover{
 background-position: 0px -53px;
 }
 .owl-carousel .next-slide:hover{
 background-position: -24px -53px;
 }

 span.img-text {
 text-decoration: none;
 outline: none;
 transition: all 0.4s ease;
 -webkit-transition: all 0.4s ease;
 -moz-transition: all 0.4s ease;
 -o-transition: all 0.4s ease;
 cursor: pointer;
 width: 100%;
 font-size: 23px;
 display: block;
 text-transform: capitalize;
 }
 span.img-text:hover {
 color: #2caae1;
 }
</style>

 

3) JQuery script to initialize

 

 <script type="text/javascript">
 $(document).ready(function() {

 $('.owl-carousel').owlCarousel({
 loop: true,
 dots: false,
 margin: 10,
 nav: true,
 navText:["<div class='nav-btn prev-slide'></div><div class='nav-btn next-slide'></div>"],
 responsive: {
 0: {
 items: 1
 },
 600: {
 items: 3
 },
 1000: {
 items: 3
 }
 }
 });
 });
 </script>

4) Finally HTML

 

<div class="carousel-wrap" style="text-align: center;">
<div class="owl-carousel owl-theme">
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item"><img src="/img/tutorialshore.jpeg" />
<span class="img-text">tutorialshore</span></div>
<div class="item"><img src="/img/tutorialshore.jpeg" />
<span class="img-text">tutorialshore</span></div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
<div class="item">

<img src="/img/tutorialshore.jpeg" /><span class="img-text">tutorialshore</span>

</div>
</div>
<script src="https://ajax.cloudflare.com/cdn-cgi/scripts/2448a7bd/cloudflare-static/rocket-loader.min.js" ></script>

</div>

See Demo>

Prove that tanq+Secq-1÷tanq-secq+1=cosq÷1-sinq

Here am going to explain the steps Prove that tanq+Secq-1÷tanq-secq+1=cosq÷1-sinq

LHS => tanq+Secq-1/tanq-secq+1

=> (sinQ/cosQ+1/cosQ-1)/(sinQ/cosQ-1/cosQ+1) (divide nominator and denominate by cosQ)

=> (sinQ+1-cosQ)/(sinQ-1+cosQ) (Multipy nominator and denominate by (1-sinQ))

=> (1-sinQ)(sinQ+1-cosQ)/(1-sinQ)(sinQ-1+cosQ)

=> (sinQ+1-cosQ-sinQ2-sinQ+sinQ*cosQ)/(1-sinQ)(sinQ-1+cosQ)

=> (1-cosQ-sinQ2+sinQ*cosQ)/(1-sinQ)(sinQ-1+cosQ)
=> (1-sinQ2-cosQ+sinQ*cosQ)/(1-sinQ)(sinQ-1+cosQ)

=> (cosQ2-cosQ+sinQ*cosQ)/(1-sinQ)(sinQ-1+cosQ)
=> cosQ(cosQ-1+sinQ)/(1-sinQ)(sinQ-1+cosQ)

=> cosQ(cosQ-1+sinQ)/(1-sinQ)(cosQ-1+sinQ)
=> cosQ/(1-sinQ) = RHS

Hence proved

How to regenerate HDFC bank new ATM OTP

For security reason all banks are planning to upgrade their ATM card to chip Level, so bank will automatically send new ATM to registered address and the 6 digit OTP they will send as SMS to your mobile number,the validity for that ATM is 30 days,so if you not used within that days it will expire. so the question is How to regenerate HDFC bank new ATM OTP, here are going to explain you how to regenerate HDFC bank new ATM OTP.

Send SMS

Send below sms to 5676712
REPIN [LAST FOUR DIGIT OF YOUR ATM CARD NUMBER]

if you send this sms ,within second you will get a 6 digit otp,we can use this otp to set new atm pin from any of the hdfc bank atm,you should type the new opt followed by your registered mobile number
if your not registered with phone banking,you have to register to phone banking first,below is the structure to register for phone banking

Send SMS to Register Phone banking

Send an SMS to 5676712
REGISTER [YOUR CUSTOMERID][LAST FOUR DIGIT OF YOUR ACCOUNT NUMBER]