我需要一种简单的方法来设置多个单元格的边框,如下所示:

我发现的只是1个细胞的边界,合并细胞,这不是我需要的.
我期待的是:
worksheet.range_border(first_row, first_col, last_row, last_col)
Run Code Online (Sandbox Code Playgroud)
有没有办法可以做到这一点(不涉及为每个单元格单独设置top_border,bottom_border,left_border,right_border)?
在阻止方式中,我可以这样做:
from scapy.all import *
sniff(filter"tcp and port 80", count=10, prn = labmda x:x.summary())
# Below code will be executed only after 10 packets have been received
do_stuff()
do_stuff2()
do_stuff3()
Run Code Online (Sandbox Code Playgroud)
我希望能够以非阻塞的方式用scapy嗅探数据包,如下所示:
def packet_recevied_event(p):
print "Packet received event!"
print p.summary()
# The "event_handler" parameter is my wishful thinking
sniff(filter"tcp and port 80", count=10, prn=labmda x:x.summary(),
event_handler=packet_received_event)
#I want this to be executed immediately
do_stuff()
do_stuff2()
do_stuff3()
Run Code Online (Sandbox Code Playgroud)
总结一下:我的问题非常清楚,我希望能够继续执行代码而不用阻止它的嗅探功能.一种选择是为此打开一个单独的线程,但我想避免它并尽可能使用scapy本机工具.
环境细节:
python:2.7
scapy:2.1.0
os:ubuntu 12.04 64bit
我是Boost新手,正在尝试编译包括boost / asio / ssl的最基本程序。我正在研究ubuntu 13.10 64bit并安装了如下的最新增强功能:
sudo apt-get install boost-all-dev
Run Code Online (Sandbox Code Playgroud)
这是我要编译的宏伟代码:
#include <stdio.h>
#include <boost/asio/ssl/stream.hpp>
int main(){
printf("Hi\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我在谷歌上搜索,发现的一些提示表明我使用了一些boost库标志。所以我做了:g ++ my_prog.cpp -o my_prog.bin -lboost_system -lboost_thread -lpthread
而且我总是收到相同的错误消息(无论推入多少-li):
/tmp/cci6dJdZ.o: In function `boost::asio::ssl::detail::openssl_init_base::do_init::do_init()':
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x2c): undefined reference to `SSL_library_init'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x31): undefined reference to `SSL_load_error_strings'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x36): undefined reference to `OPENSSL_add_all_algorithms_noconf'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x47): undefined reference to `CRYPTO_num_locks'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0xcc): undefined reference to `CRYPTO_set_locking_callback'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0xd6): undefined reference to `CRYPTO_set_id_callback'
/tmp/cci6dJdZ.o: In function `boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x13): undefined reference to `CRYPTO_set_id_callback'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x1d): undefined reference to `CRYPTO_set_locking_callback'
my_prog.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x22): …Run Code Online (Sandbox Code Playgroud) 我有2个屏幕,我正在连接到一个vncserver,它在我的Windows笔记本电脑上使用VNC Viewer(v5.2.1)在centos机器上运行.这将打开一个窗口,我可以从一个屏幕移动到另一个屏幕.我希望会议使用两个屏幕,我不是这个意思:
(a)在一个屏幕上连接到2个vncservers的2个单独的VNC会话
(b)在2个屏幕上拉伸1个VNC窗口
(c)使用像Xming这样的东西
我不喜欢上述变通方法的原因是因为(a)我不能将窗口从一个会话移动到另一个会话而且我也无法在它们两个上打开eclipse(eclipse不喜欢在两个中运行不同的实例).
使用(b)它非常不方便,因为屏幕没有完美对齐,我尝试最大化的每个窗口都在两个屏幕上最大化,我必须手动调整我的窗口为每个屏幕,更不用说由于之间的差距令人烦恼的东西削减2个屏幕.
解决方法(c)给出了我在使用屏幕方面所需要的但是有一个主要的垮台以及我的会话无法在我的笔记本电脑重新启动后继续存在的事实(使用vncserver工作的远程稳定的centos机器我可以随时连接到同一会议).
请注意,我知道解决方案:
这给了我解决方法(b),这不是我想要的.
谢谢你的帮助.
我想在我的应用程序中执行JavaScript,这是用GWT编写的.这是在常规HTML中运行的代码:
<html>
<head>
</head>
<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<script src="jquery.js"></script>
<script src="jquery.roundabout.js"></script>
<script>
$(document).ready(function() {
$('ul').roundabout();
});
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
(假设jquery.js并且jquery.roundabout.js在同一个文件夹中.)
我有一个somePresenter(有someView.java和someView.ui.xml),我想要上面的代码工作someView.ui.xml.
我复制粘贴上面的代码到XML(<html>标签我有<g:HTMLPanel>标签除外),但似乎没有执行JavaScript(我看到的只是在脚本之前的列表).
我怎样才能使它工作?
相关问题:我可以用一些如何使用GQuery(类似于:GQuery.$().getScript(jquery.roundabout.js)加载外部js脚本)?
提前致谢
boost ×1
c++ ×1
centos ×1
excel ×1
g++ ×1
gwt ×1
java ×1
javascript ×1
python ×1
python-2.7 ×1
scapy ×1
sniffing ×1
ssl ×1
ubuntu-13.10 ×1
uibinder ×1
vnc-server ×1
vnc-viewer ×1
x11 ×1
xlsxwriter ×1