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
| // | |
| // main.swift | |
| // ShitWeb | |
| // | |
| // Created by Yung-Luen Lan on 2020/5/14. | |
| // Copyright © 2020 Yung-Luen Lan. All rights reserved. | |
| // | |
| import Foundation | |
| import Network |
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
| FROM openjdk:8u201-jdk-alpine3.9 | |
| RUN apk update && apk add mysql-client && rm -f /var/cache/apk/* | |
| ENTRYPOINT ["sh"] | |
| CMD ["-c" , "tail -f /dev/null"] |
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 formatXml(xml) { | |
| var formatted = ''; | |
| var reg = /(>)(<)(\/*)/g; | |
| xml = xml.toString().replace(reg, '$1\r\n$2$3'); | |
| var pad = 0; | |
| var nodes = xml.split('\r\n'); | |
| for(var n in nodes) { | |
| var node = nodes[n]; | |
| var indent = 0; | |
| if (node.match(/.+<\/\w[^>]*>$/)) { |

