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 | |
| function DateThai($strDate){ | |
| $strMonthCut = Array("", "ม.ค.", "ก.ม.", "มี.ค.","ม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); | |
| $inputDate = array( | |
| 'year' => date("Y",strtotime($strDate))+543, | |
| 'month' => date("n",strtotime($strDate)), | |
| 'day' => date("j",strtotime($strDate)), | |
| 'hour' => date("H",strtotime($strDate)), | |
| 'minute' => date("i",strtotime($strDate)), | |
| 'seconds' => date("s",strtotime($strDate)), |
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 initMap() { | |
| var map = new google.maps.Map(document.getElementById('map'), { | |
| zoom: 2, | |
| center: {lat: -33.872, lng: 151.252}, | |
| }); | |
| map.data.loadGeoJson('location_of_the_worlds_petroleum_fields__xtl.json'); |
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
| map.data.setStyle(function(feature) { | |
| var RESINFO = feature.getProperty('RESINFO'); | |
| var color; | |
| var color_line; | |
| if(RESINFO == 'gas'){ | |
| color = 'blue'; | |
| color_line = 'blue'; | |
| }else if(RESINFO == 'oil'){ | |
| color = 'red'; | |
| color_line = 'red'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Node.js app Docker file | |
| FROM ubuntu:14.04 | |
| FROM node:8 | |
| RUN apt-get update && apt-get install apt-transport-https | |
| RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
| RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
| RUN apt-get update && apt-get install yarn |
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
| <div class="clip" > | |
| <a href="https://www.youtube.com/watch?v=GgswDxplkWM"/> | |
| <span class="play-btn" data-toggle="modal" data-target="#exampleModal"> | |
| <i class="fa fa-play fa-5x" aria-hidden="true"></i> | |
| </span> | |
| <a/> | |
| </div> | |
| <!-- Modal --> | |
| <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="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
| const puppeteer = require('puppeteer'); | |
| const _login = { | |
| data:{ | |
| USERNANE: '**********', | |
| PASSWORD: '**********' | |
| }, | |
| elem:{ | |
| USERNANE: 'body > div.content > form > div:nth-child(4) > div > input', | |
| PASSWORD: 'body > div.content > form > div:nth-child(5) > div > input', |
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
| const puppeteer = require('puppeteer'); | |
| async function run() { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| await page.goto('https://github.com'); | |
| await page.screenshot({path: 'screenshots/github.png'}); | |
| browser.close(); |
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
| const puppeteer = require('puppeteer'); | |
| const LOGIN = async (page) { | |
| const USER = { | |
| username : "<username>", | |
| password : "<password>" | |
| } | |
| // dom element selectors | |
| const USERNAME_SELECTOR = '#login_field'; | |
| const PASSWORD_SELECTOR = '#password'; |
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
| const puppeteer = require('puppeteer'); | |
| const _30s = 1000 * 30; | |
| const _1m = 1000 * 60; | |
| const _5m = _1m * 5; | |
| describe('Open Url: Google, Github.', () => { | |
| var browser, page; | |
| beforeEach(async () => { |
OlderNewer