List view
Edit view with a ref (lookup) field and a select field
ffmpeg -r 2 -f image2 -i %05d.jpg out.mp4
ffmpeg -r 2 -f image2 -i %05d.jpg -pix_fmt yuv420p out2.mp4
doctype 5 html head ... link(rel='stylesheet', href='http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css') script(src='/javascripts/jquery.min.js') script(src='/javascripts/jquery-ui.custom.min.js') ... script $(function() { $(".draggable").draggable(); $(".resizable").resizable({ aspectRatio: 320 / 240 }); }); body #grid .linha #cam01.camera.draggable .image img#img01.resizable(src='#', width=320, height=240) .info ...
void acquire_file_lock(int fd, int retry_ms) { int rc; for (;;) { rc = flock(fd, LOCK_EX | LOCK_NB); // grab exclusive lock, fail if can't obtain. if (rc == -1) { // fail - sleep retry_ms (ms) and try again xsleep(0, retry_ms); } else { // success - return return; } } }
static void mainloop(void) { ... while (1) { acquire_file_lock(fd, 10); init_device(); // read the device - capture frame ... release_file_lock(fd); ... } // while (1) }
table#cameras
thead
tr.head
th Camera
th Description
th Type
th Device
th Channel
th Format
th Palette
th Width
th Height
th Fps
tbody
- var i = -1
each val, key in cameras
- ++i
tr(class=(i % 2 == 0) ? 'odd' : 'even')
td #{key}
td #{val.descr}
td #{val.type}
td #{val.device}
td #{val.channel}
td #{val.format}
td #{val.palette}
td #{val.width}
td #{val.height}
td #{val.fps}
Note the lines prefixed with a hyphen (-), the first one creates a var and the second increments this var inside the each loop.
table#cameras tr.odd
background-color: #444
table#cameras tr.even
background-color: #888