This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let timer = setInterval(() => { | |
| if(window.cancelTimer && timer) { | |
| clearInterval(timer); | |
| } | |
| fetch('https://cdn-api.co-vin.in/api/v2/appointment/sessions/calendarByPin?pincode=403508&date=14-05-2021').then(res => res.json()).then(obj => { | |
| //Will have to check for the center and change it here | |
| console.log(obj.centers); | |
| obj.centers[1].sessions.forEach(slot => { | |
| console.log(slot.available_capacity, slot.date); | |
| if(slot.available_capacity) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //HTML | |
| <li>1</li> | |
| <li>2</li> | |
| <li>3</li> | |
| <li>4</li> | |
| <li>5</li> | |
| //JS | |
| var list = document.querySelectorAll('li'); | |
| var listArr = Array.prototype.slice.call(list); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var section = document.querySelector('.vs-section') | |
| var smooth = new Smooth({ | |
| native: true, | |
| section: section, | |
| ease: 0.1, | |
| callback: function(current) { | |
| console.log(current); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| entry: './app/index.js', | |
| output: { | |
| path: './dist/', | |
| filename: 'bundle.js' | |
| }, | |
| devServer: { | |
| inline: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _ago($tm,$rcs = 0) { | |
| $cur_tm = time(); $dif = $cur_tm-$tm; | |
| $pds = array('sec','min','h','d','w','m','y','decade'); | |
| $lngh = array(1,60,3600,86400,604800,2630880,31570560,315705600); | |
| for($v = sizeof($lngh)-1; ($v >= 0)&&(($no = $dif/$lngh[$v])<=1); $v--); if($v < 0) $v = 0; $_tm = $cur_tm-($dif%$lngh[$v]); | |
| $no = floor($no); if($no <> 1) $pds[$v] .='s'; $x=sprintf("%d %s ",$no,$pds[$v]); | |
| if(($rcs == 1)&&($v >= 1)&&(($cur_tm-$_tm) > 0)) $x .= time_ago($_tm); | |
| return $x; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .has-ripple { | |
| position: relative; | |
| overflow: hidden; | |
| @include transition(.4s all); | |
| } | |
| .ripple { | |
| background: #FFF; | |
| position: absolute; | |
| -webkit-animation: ripple 1s cubic-bezier(0.23, 1, 0.32, 1); | |
| animation: ripple 1s cubic-bezier(0.23, 1, 0.32, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cubic-bezier(0.77, 0, 0.175, 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myApp.animation('.repeated-items', function() { | |
| return { | |
| enter: function(element, done) { | |
| element.velocity("transition.slideUpIn", {stagger: 100, complete: done}); | |
| }, | |
| leave: function(element, done) { | |
| element.velocity("transition.shrinkOut", {stagger: 100, complete: done}); | |
| }, | |
| move: function(element, done) { | |
| element.velocity("transition.slideUpIn", {stagger: 100, complete: done}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.gpstraker; | |
| import android.app.AlertDialog; | |
| import android.content.Context; | |
| import android.content.DialogInterface; | |
| import android.content.Intent; | |
| import android.location.Location; | |
| import android.location.LocationListener; | |
| import android.location.LocationManager; | |
| import android.os.Bundle; | |
| import android.os.IBinder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var newTodo = todos.add(credentials).then( | |
| function(response) { | |
| $scope.todos.push(response); | |
| console.log(response); | |
| console.log($scope.todos); | |
| $scope.new_desc = ""; | |
| } | |
| ) |
NewerOlder