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
version: '3.4' | |
services: | |
samba: | |
image: dperson/samba | |
environment: | |
TZ: 'EST5EDT' | |
networks: | |
- default | |
ports: |
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
// Dependencies: | |
// npm install request request-promise-native | |
var request = require('request-promise-native') | |
request.post('http://120.107.172.236:3000/devices/').then(v => { | |
console.dir(JSON.parse(v)) | |
}).catch(e => { | |
console.error(e) | |
}) |
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 express = require('express'); | |
let router = express.Router(); | |
// route that devices will automatically connect and reqister their current ip:port | |
router.use('/', (req, res) => { | |
// Device information object | |
// { | |
// serial: <string> product serial number | |
// mac: <string> mac address of remote device | |
// ip: <string> ip address |
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
#include <sstream> | |
template <typename T> | |
std::string to_string(const T& value) { | |
std::stringstream ss; | |
ss << value; | |
return ss.str(); | |
} | |
int i = 0; |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>微積分:第九章</title> | |
<link rel="stylesheet" href="https://stackedit.io/res-min/themes/base.css" /> | |
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> | |
</head> | |
<body><div class="container"><h1 id="第九章">第九章</h1> |