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
| // CustomTime provides an example of how to declare a new time Type with a custom formatter. | |
| // Note that time.Time methods are not available, if needed you can add and cast like the String method does | |
| // Otherwise, only use in the json struct at marshal/unmarshal time. | |
| type CustomTime time.Time | |
| const ctLayout = "2006-01-02 15:04:05 Z07:00" | |
| // UnmarshalJSON Parses the json string in the custom format | |
| func (ct *CustomTime) UnmarshalJSON(b []byte) (err error) { |
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() { | |
| $(document).on('turbolinks:load', function() { | |
| // Khi nhấn nút khoảng cách tới trạm 1 | |
| $('#getDistance_1').click(function() { | |
| event.preventDefault(); | |
| console.log('get distance 1 clicked'); | |
| $('#getDistance_2').removeClass('active123'); | |
| $('#getDistance_1').addClass('active123'); | |
| return App.freechat.speak('getDistance_1'); //Hàm gửi tín hiệu đi | |
| }); |
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
| <h1 class="text-center">Adruino controller</h1> | |
| <center> | |
| <div> | |
| <h3>Chế độ điều khiển</h3> | |
| <a class="btn btn-primary" id="set_auto" href="">Auto</a> | | |
| <a class="btn btn-primary" id="set_manual" href="">Manual</a> | |
| </div> | |
| ******************************* | |
| <div> |
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 cluster = require('cluster') | |
| const dgram = require('dgram') | |
| const express = require('express') | |
| const crypt = require('crypto-js') | |
| const parser = require('body-parser') | |
| const request = require('request'); | |
| const fs = require('fs'); | |
| const transaction = { | |
| "From": "Trung", | |
| "To": "Hieu", |