Snippets Collections
<!-- Html -->
<div id="timer">
  <div id="days"></div>
  <div id="hours"></div>
  <div id="minutes"></div>
  <div id="seconds"></div>
</div>

<!-- Js Code -->
function makeTimer() {
  //	var endTime = new Date("29 April 2018 9:56:00 GMT+01:00");	
  var endTime = new Date("30 July 2022 12:00:00 GMT+01:00");			
  endTime = (Date.parse(endTime) / 1000);
  var now = new Date();
  now = (Date.parse(now) / 1000);
  var timeLeft = endTime - now;
  var days = Math.floor(timeLeft / 86400); 
  var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
  var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
  var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
  if (hours < "10") { hours = "0" + hours; }
  if (minutes < "10") { minutes = "0" + minutes; }
  if (seconds < "10") { seconds = "0" + seconds; }
  $("#days").html(days + "<span>Days</span>");
  $("#hours").html(hours + "<span>Hours</span>");
  $("#minutes").html(minutes + "<span>Minutes</span>");
  $("#seconds").html(seconds + "<span>Seconds</span>");		
}
setInterval(function() { makeTimer(); }, 1000);
// Navbar Link Js
$('.nav-link').on('click', function() {
  $('.nav-link').removeClass('active');
  $(this).addClass('active');
});

$('.nav-link').on('click', function() {
  $('.navbar-collapse').collapse('hide');
});
<ul class="navbar-nav mx-auto">
  <li class="nav-item ">
  		<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='index.php'){ ?>active <?php } ?>" href="index.php">Home  </a>
  </li>
  <li class="nav-item">
  		<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='mestropolis.php'){ ?>active <?php } ?>" href="mestropolis.php">Neotropolis</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='story.php'){ ?>active <?php } ?>" href="story.php">Story</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='cards.php'){ ?>active <?php } ?>" href="cards.php">Cards</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='packs.php'){ ?>active <?php } ?>" href="packs.php">Packs</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='Collectibles.php'){ ?>active <?php } ?>" href="Collectibles.php">Collectibles</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='faq.php'){ ?>active <?php } ?>" href="faq.php">FAQ</a>
  </li>
</ul>
<!DOCTYPE html>
<html>
<head>
<title>Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
</head>
<body>
<script>

  function statusChangeCallback(response) {  // Called with the results from FB.getLoginStatus().
    console.log('statusChangeCallback');
    console.log(response);                   // The current login status of the person.
    if (response.status === 'connected') {   // Logged into your webpage and Facebook.
      testAPI();  
    } else {                                 // Not logged into your webpage or we are unable to tell.
      document.getElementById('status').innerHTML = 'Please log ' +
        'into this webpage.';
    }
  }


  function checkLoginState() {               // Called when a person is finished with the Login Button.
    FB.getLoginStatus(function(response) {   // See the onlogin handler
      statusChangeCallback(response);
    });
  }


  window.fbAsyncInit = function() {
    FB.init({
      appId      : '{app-id}',
      cookie     : true,                     // Enable cookies to allow the server to access the session.
      xfbml      : true,                     // Parse social plugins on this webpage.
      version    : '{api-version}'           // Use this Graph API version for this call.
    });


    FB.getLoginStatus(function(response) {   // Called after the JS SDK has been initialized.
      statusChangeCallback(response);        // Returns the login status.
    });
  };
 
  function testAPI() {                      // Testing Graph API after login.  See statusChangeCallback() for when this call is made.
    console.log('Welcome!  Fetching your information.... ');
    FB.api('/me', function(response) {
      console.log('Successful login for: ' + response.name);
      document.getElementById('status').innerHTML =
        'Thanks for logging in, ' + response.name + '!';
    });
  }

</script>


<!-- The JS SDK Login Button -->

<fb:login-button scope="public_profile,email" onlogin="checkLoginState();">
</fb:login-button>

<div id="status">
</div>

<!-- Load the JS SDK asynchronously -->
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
</body>
</html>
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.fit_transform(X_test)
star

Wed Jul 20 2022 09:26:56 GMT+0000 (UTC)

#code #html #javascript
star

Wed Jul 20 2022 09:25:40 GMT+0000 (UTC)

#code #html #php
star

Fri Feb 18 2022 19:07:02 GMT+0000 (UTC) https://www.pluralsight.com/guides/code-splitting-your-redux-application

#react #code
star

Wed Feb 16 2022 06:52:44 GMT+0000 (UTC) https://developers.facebook.com/docs/facebook-login/web#logindialog

#code
star

Mon Jan 31 2022 00:50:55 GMT+0000 (UTC) https://developers.facebook.com/docs/instant-articles/crawler-ingestion#ia-markup

#code
star

Sat Jan 29 2022 06:21:25 GMT+0000 (UTC) https://developers.facebook.com/docs/sharing/webmasters/crawler/

#code
star

Tue Jan 19 2021 17:19:38 GMT+0000 (UTC)

#standardscaler #code #scalling

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension