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
| <template> | |
| {{text}} | |
| </template> | |
| <script> | |
| export default { | |
| props: ['text'] | |
| } | |
| </script> |
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
| scrollToTop = (scrollDuration) => { | |
| if(navigator.userAgent.match(/Trident\/7\./)) { // if IE | |
| window.scrollTo(0, 0); | |
| } else { | |
| const scrollHeight = window.scrollY, | |
| scrollStep = Math.PI / (scrollDuration / 15), | |
| cosParameter = scrollHeight / 2; | |
| var scrollCount = 0, | |
| scrollMargin, | |
| scrollInterval = setInterval(function() { |
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
| <?php | |
| class Product { | |
| /** | |
| * Compare obj by price | |
| * Compare obj by name if prices are equal | |
| * @param stdClass $a product a | |
| * @param stdClass $b product b | |
| * @return int -1, 0, 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
| # Linux command to lowercase files inside the current directory (pwd). | |
| for f in `find`; do mv -v "$f" "`echo $f | tr '[A-Z]' '[a-z]'`"; 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <div id="app"> | |
| <input type="text" v-model="item.value"> | |
| <button type="button" @click="addItem" :disabled="!item.value">Add</button> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Count Down</title> | |
| </head> | |
| <body> | |
| <h1 id="countDownContainer"></h1> |
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
| self.on('*.submitOnepass', function () { | |
| var countryCode = (self.get('displayCountryCode')) ? self.get('selectedCountryCode') + '-' : ''; | |
| this.set('ssoLoginUserid', countryCode + self.get('loginid')); | |
| this.set('countryCode', countryCode); | |
| this.set('username', countryCode + self.get('loginid')); | |
| this.set('tempCcode', ((self.get('displayCountryCode')) ? '+' : '') + countryCode); | |
| this.set('loginUserid', self.get('loginid')); | |
| this.set('loading', 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Test</title> | |
| </head> | |
| <body> | |
| <div id="app"> | |
| <div class="row"> | |
| <input type="text" name="" v-model="keyword"> |
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 o1 = o1 || {}; | |
| o1.panel0 = document.getElementsByClassName('sd-component-imagetextbanner-singtel')[0], | |
| o1.panel1 = document.getElementsByClassName('sd-component-imagetextbanner-singtel')[1], | |
| o1.panel2 = document.getElementsByClassName('sd-component-imagetextbanner-singtel')[2], | |
| o1.panel3 = document.getElementsByClassName('sd-component-imagetextbanner-singtel')[3], | |
| o1.panel4 = document.getElementsByClassName('sd-component-imagetextbanner-singtel')[4] | |
| o1.panel5 = document.getElementsByClassName('sd-component-pagesection-singtel')[0], | |
| o1.panel6 = document.getElementsByClassName('sd-component-pagesection-singtel')[1], | |
| o1.panel0Trigger = false, | |
| o1.panel1Trigger = false, |
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
| window.axios = require('../../../node_modules/axios/dist/axios'); | |
| Vue.prototype.$http = axios; | |
| axios.interceptors.request.use(function(config){ | |
| config.headers['X-CSRF-TOKEN'] = Laravel.csrfToken | |
| return config; | |
| }) |