nginx.conf
server {
listen 80;
server_name example.com;
root /var/www/html/;
index index.html;
access_log /var/log/nginx/access_log hogehoge;
| <?php | |
| abstract class Enum | |
| { | |
| private $scalar; | |
| function __construct($value) | |
| { | |
| $ref = new ReflectionObject($this); | |
| $consts = $ref->getConstants(); | |
| if (! in_array($value, $consts, true)) { |
You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:
name = name || 'joe';This is quite common and very helpful. Another option is to do:
name || (name = 'joe');| <html> | |
| <style> | |
| #ver-minimalist | |
| { | |
| font-family: "Lucida Sans Unicode", "Lucida Grande", Sans- | |
| Serif; | |
| font-size: 12px; | |
| margin: 45px; | |
| width: 480px; |
| /* | |
| WorkCrew - a WebWorker work queue library | |
| Usage: | |
| // Create an 8 worker pool using worker.js. | |
| var crew = new WorkCrew('worker.js', 8); | |
| // Do something whenever a job is completed. | |
| // The result object structure is |