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
| // npm install ejs | |
| const ejs = require('ejs'); | |
| // define our template | |
| const template = ` | |
| <h1>Hello, <%= name %>!</h1> | |
| `; | |
| // render it |
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 | |
| if(isset($_GET['debug'])){ | |
| highlight_file(__FILE__); | |
| exit(); | |
| } | |
| ?> | |
| <html> | |
| <head> | |
| <title>HAAS</title> | |
| <link rel="stylesheet" href="assets/index.css"> |
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(require, host) { /* global host */ | |
| /* eslint-disable block-spacing, no-multi-spaces, brace-style, no-array-constructor, new-cap, no-use-before-define */ | |
| 'use strict'; | |
| // eslint-disable-next-line no-invalid-this, no-shadow | |
| const global = this; | |
| const local = host.Object.create(null); | |
| local.Object = Object; |
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 *fetchHttpBin(){ | |
| const data = yield fetch('https://httpbin.org/get'); // 等待返回值 | |
| console.log(data); | |
| } | |
| function main2(){ | |
| const g = fetchHttpBin(); // 获得生成器 | |
| g.next() | |
| .value // 执行到next,此时生成器返回 {done, value} | |
| .then( (data)=> data.json()) // 执行到yield,此时会返回promise |
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
| cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.14/modules .. | |
| cmake --build . | |
| sudo make install | |
| 详情可以参考 https://docs.opencv.org/4.5.2/d7/d9f/tutorial_linux_install.html | |
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
| # 参考 https://bbs.pediy.com/thread-256000.htm | |
| 利用FPU获取EIP | |
| section .text | |
| BITS 32 | |
| global CMAIN | |
| CMAIN: | |
| fldz |
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
| # 寻找文件大于100M | |
| sudo find / -type f -size +1000M | |
| # 提示app不安全 | |
| sudo spctl --master-disable | |
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
| # git 只克隆最近的分支 | |
| git clone --depth=1 https://github.com/c-smile/sciter-sdk |
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
| # 静态路由协议配置 | |
| ip route 202.114.66.0 255.255.255.0 202.114.67.5 | |
| ip route 202.114.64.0 255.255.255.0 202.114.67.5 | |
| ip route 202.114.65.0 255.255.255.0 202.114.67.5 | |
| ip route 192.168.1.0 255.255.255.0 202.114.67.5 | |
| # RIP配置 |
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
| def Work_thread(self,root,panel): | |
| stOutFrame = MV_FRAME_OUT() | |
| img_buff = None | |
| buf_cache = None | |
| numArray = None | |
| while True: | |
| ret = self.obj_cam.MV_CC_GetImageBuffer(stOutFrame, 1000) | |
| if 0 == ret: | |
| if None == buf_cache: | |
| buf_cache = (c_ubyte * stOutFrame.stFrameInfo.nFrameLen)() |