Posts

Sign in with Facebook notes

 Sign in with Facebook notes  visit  Facebook for Developers  website.   Then login through your Account. Click on Get Started and verify your account. Now , We have create new app for that click on Create App button. after that , select Facebook login   through   web .  Insert the sdk code in web page and place your app id in code properly . download facebook sdk in your project folder root. using command composer require facebook/graph-sdk Create config.php file Add following code in  config.php  file <?php //start session on web page session_start ();    $fb  =   new  \Facebook\ Facebook ([      'app_id'  =>  '379937770193328' ,      'app_secret'  =>  '969eba7d010dc91ca38213ef3ba6fb56' ,      'default_graph_version'  =>  'v3.0' ]); ? >   in index.php file include...

sign in with Google Account in php , notes

 sign in with Google Account in php , notes Error :    Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\coretechtive\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 67 Solution :  The problem is in PHP 7.2 the parameter for count() can't be NULL. The warning gets displayed when $this->handles equals NULL. Just replace line 67 in CurlFactory.php with the following: if (($this->handles ? count($this->handles) : 0) >= $this->maxHandles) { Error : Notice : Undefined index: expires_in in  C:\xampp\htdocs\coretechtive\vendor\google\apiclient\src\Google\Client.php  on line  470 Solution  :       $expired  = ( $created       + ( $this -> token [ 'expires_in' ] -  30 )) <  time (); replace above with  below : $expired  = ( $created ) <  time (); Error : ...

Hadoop MapReduce

                                         HADOOP To Start and Stop Hadoop $ start-dfs.sh           --> To start hadoop $ start-yarn.sh         ---> To start yarn $ jps                         --> to view processes status $ stop-yarn.sh         --> To Stop yarn $ stop-dfs.sh           --> To stop hadoop To Copy File $ hadoop fs -mkdir vrush $ hadoop fs -ls $ hadoop fs -ls vrush $ ls -l $ hadoop fs -copyFromLocal data/*txt vrush MapReduce for Word Counting $ cd myc $  ls -l $  vi map.c $  press esc button :q  --> To escape from vi editor $  cc -o mymapper map.c $  cc -o myreduce reduce.c $  ls -l $  hado...

Redirect in React Router tut 20

Redirect in React Router Redirect can use to redirect page to given path        when page doesn't exsist , it can be used instead of        showing 404 error page, so when user enter in wrong url        it will redirect to certain given path import   React   from   'react' import  { Route  ,  Switch ,  Redirect }  from   "react-router-dom" import   Contact   from   './RContact' import   About   from   './RAbout' import   ErrorMsg   from   './ErrorMsg' import   Navbar   from   './Navbar' import   User   from   './UseParams' import   Search   from   './RSearch' ; let   Service ...

useHistory in React Router Tut 19

useHistory in React Router import   React   from   'react' ; import  { useHistory }  from   'react-router-dom' ; let   User  = ()  => {         var   history  =  useHistory ();      return (          < >    <h1> user page </h1>     < button   onClick = { () => history . goBack () } > GO Back </ button >   < br />< br />< hr />     < button   onClick = { () => history . push ( '/' ) } > Hompage </ button >          </ >     ) } export   default   User ; useHistory gives the information about pages with visited , so that we can go back to previous  page using goBack()   function and can visit to any page we want using pu...

useLocation in React Router tut 18

         useLocation in React Router import   React   from   'react' ; import  { useParams ,  useLocation }  from   'react-router-dom' ; let   User  = ()  => {      var  { fname ,  lname } =  useParams ();  // variable name must be same as you metion in route path                                      // we have to get it as object in {}        var   location  =  useLocation ();      // console.log(location);      return (          < >    ...

useParams in React Router tut 17

              useParams in React Router 1 st create Link user :  < NavLink    activeClassName = "active_class"   to = "/user" >  User  </ NavLink > 2nd metion link in route : < Switch >      { /* To Pass The Props to bellow about component */ }        < Route   exact   path = "/"   component = { () => < About   text = "About US"   /> } />        { /* We can also use render in place of component like bellow */ }        < Route   exact   path = "/contact"   render = { Contact } />          < Route   path = "/contact/service"   component = { Service } />     ...