import xmlrpclib
server = xmlrpclib.Server('http://localhost:9001/RPC2')
status_response = server.supervisor.getAllProcessInfo()
print status_response
References :
XML-RPC API Documentation — Supervisor 3.1.3 documentation
import xmlrpclib
server = xmlrpclib.Server('http://localhost:9001/RPC2')
status_response = server.supervisor.getAllProcessInfo()
print status_response
import gearman
gm_admin_client = gearman.GearmanAdminClient(['localhost:4730'])
status_response = gm_admin_client.get_status()
print status_response
$ php composer.phar install
$ aplay -l
card 0: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
Subdevices: 1/1
Subdevice #1: subdevice #0
一般爲 Analog 那一個
# vi /etc/asound.conf defaluts.pcm.card 1 defaults.pcm.device 0 defaults.ctl.card 1 pcm.!default { type plug slave.pcm "hw:1,0" }
backgroundColor: '#ED1317'
$(this).css('border-color', 'red');eventClick - Documentation | FullCalendar
...
echo json_encode($myarray);
...
header("Content-type: application/json; charset=utf-8");
echo json_encode($myarray);
die;
function rerender_calendar(id, url)
{
// clear all event
$('#' + id).fullCalendar('removeEvents');
// render new event
$('#' + id).fullCalendar('addEventSource', url);
}
mysql> UPDATE FOO set FIELD2 = TRIM(Replace(Replace(Replace(FIELD2,'\t',''),'\n',''),'\r',''));
Template::set_message('Your message displayed just fine.', 'success');
echo Template::message();
$message['type'] = 'success';View :
$message['message'] = 'Your message displayed just fine.';
Template::set('message', $message);
<div class="alert alert-block alert-{type} fade in notification"> <a data-dismiss="alert" class="close" href="#">×</a> <div>{message}</div> </div>
$ git config --bool receive.denyCurrentBranch false
$ vi .git/hooks/post-receive
# Update working tree after receiving pushed branch
echo "*****************************************************"
echo "Post-receive hook: updating remote working directory"
echo "*****************************************************"
cd ..env -i git reset --hard
$ chmod +x .git/hooks/post-receive
alert(document.querySelectorAll('input[type="checkbox"]:checked').length);
alert(document.querySelectorAll('input[name="selectItem[]"]:checked').length);
References :
javascript - Count the number of checked checkboxes in html - Stack Overflow
# pip install pycallgraph$ pycallgraph graphviz -- ./mypythonscript.py
# /etc/init.d/carbon-cache restart
cffi.ffiplatform.VerificationError: importing '/usr/lib/python2.7/dist-packages/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.x86_64-linux-gnu.so': /usr/lib/python2.7/dist-packages/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.x86_64-linux-gnu.so: symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0 with link time reference
# apt-get install libssl1.0.0
Level | Numeric value |
---|---|
CRITICAL | 50 |
ERROR | 40 |
WARNING | 30 |
INFO | 20 |
DEBUG | 10 |
NOTSET | 0 |
http://pymbook.readthedocs.org/en/latest/testing.html
$ python -m unittest discover -v -s-p '*_test.py'
# ln -s /usr/lib/x86_64-linux-gnu/libhunspell-1.3.so.0.0.0 /usr/lib/x86_64-linux-gnu/libhunspell.so