更新: | 2024-05-22 |
---|---|
作者: | @voluntas |
バージョン: | 2024.1 |
URL: | https://voluntas.github.io/ |
typo などは https://x.com/voluntas までご連絡ください。
#!/usr/bin/python | |
# Equivalent of "tail -f" as a webpage using websocket | |
# Usage: webtail.py PORT FILENAME | |
# Tested with tornado 2.1 | |
# Thanks to Thomas Pelletier for it's great introduction to tornado+websocket | |
# http://thomas.pelletier.im/2010/08/websocket-tornado-redis/ | |
import tornado.httpserver |
<?php | |
$number_of_workers = 5; | |
$children = array(); | |
$pair = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_DGRAM, STREAM_IPPROTO_IP); | |
stream_set_blocking($pair[0], 0); | |
stream_set_blocking($pair[1], 0); | |
function do_work($fd) { | |
$pid = getmypid(); | |
for ($i = 0; $i < 10; $i++) { |
> perl -E 'say "生" & "死"' | |
愛 | |
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111 | |
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011 | |
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011 |
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request | |
navigationType:(UIWebViewNavigationType)navigationType { | |
NSString *urlString = [[request URL] absoluteString]; | |
if ([urlString hasPrefix:@"js:"]) { | |
NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject] | |
stringByReplacingPercentEscapes]; | |
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; | |
NSError *error; |
更新: | 2024-05-22 |
---|---|
作者: | @voluntas |
バージョン: | 2024.1 |
URL: | https://voluntas.github.io/ |
typo などは https://x.com/voluntas までご連絡ください。
PHP 7.1.0alpha1 (cli) (built: Jun 28 2016 12:53:16) ( NTS ) | |
Copyright (c) 1997-2016 The PHP Group | |
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies | |
with Zend OPcache v7.1.0alpha1, Copyright (c) 1999-2016, by Zend Technologies | |
simple 0.037 | |
simplecall 0.011 | |
simpleucall 0.034 | |
simpleudcall 0.037 | |
mandel 0.140 |