This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h - write your route method, handling requests.
- call
serve_forever("12913")to start serving on port 12913
| // from c++ version: https://gist.github.com/timshen91/f6a3f040e5b5b0685b2a | |
| // author: wangxiaochi | |
| function ConcatExpr (Left,Right) {this.Left = Left;this.Right=Right} // ab | |
| function AltExpr(Left,Right) {this.Left = Left;this.Right=Right} // a|b | |
| function RepeatExpr(SubExpr) {this.SubExpr= SubExpr;} // a* | |
| function OptionalExpr(SubExpr) {this.SubExpr= SubExpr;} // a? | |
| function MatchExpr(ch) { | |
| this.ch= ch | |
| } |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParenthttp://www.gamesjobsjapan.com/