1. def fun:定义函数 def _initialize(self, key=16*'\0', iv=16*'\0'): .... 其中self相当于c/c++ this指针,可以不写,默认自带2. pass用法: 表示它不做任何事情,一般用做占位语句//在c/c++中if (a >...
分类:
其他好文 时间:
2014-12-04 21:17:55
阅读次数:
173
#!/usr/bin/perl
usestrict;
usewarnings;
useLWP::UserAgent;
useJSON;
useEncode;
my$mail=‘user‘;
my$pass=‘pass‘;
my$domain_info_url=‘https://dnsapi.cn/Domain.Info‘;
my$record_list_url=‘https://dnsapi.cn/Record.List‘;
subget_domain_id{
###获取数据
my($doma..
We can see this comment in nginx.conf.# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000Means: When the nginx handle PHP, the server...
分类:
Web程序 时间:
2014-12-04 17:19:37
阅读次数:
215
Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return...
分类:
其他好文 时间:
2014-12-04 17:16:00
阅读次数:
183
在编译bluez-utils-3.36时,遇到了一个非常头疼的问题,就是死活找不到D-bus,明明已经编译完成,而且已经成功了,路径也指定了,可就是找不到。网络也找了好久还是解决不了,最后看到.pc文件的文章,突然觉得是不是就是它的问题。就试试了。
首先我们找到D-bus的安装目录,我这里用xxxxxx代替。进入xxxxxx/lib/pkgconfig,然后会发现有一些.pc文件,看是否有blu...
分类:
其他好文 时间:
2014-12-04 12:15:31
阅读次数:
127
AXI(Advanced eXtensible Interface)是一种总协议,该协议是ARM公司提出的AMBA(Advanced Microcontroller Bus Architecture)3.0协议中最重要的部分,是一种面向高性能、高带宽、低延迟的片内总线。它的地址/控制和数据相位是分离...
分类:
其他好文 时间:
2014-12-04 11:44:14
阅读次数:
319
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-12-03 22:44:08
阅读次数:
134
一、让接口容易被正确使用,不易被误用
接口设计的原则是,方便日后和其他用户的使用,不要把问题留给接口使用者
(1)用常规的用法调用“特别”设计的接口。所以需要尽可能的把自己的设计往常规上靠:数据对象的行为要尽可能符合内建对象(比如int)的行为;接口的名字和意义要尽可能一致(比如STL中的容器基本都有一个叫做size的返回容器大小的接口)……这样做鼓励用户去正确的看待和使用你的接口。
...
分类:
编程语言 时间:
2014-12-03 17:15:35
阅读次数:
229
public class SendCommand : ICommand
{ public void Execute(object parameter) { var labels = ((object[]) parameter).OfType(); } public bool CanExecute(o...
#!/usr/bin/python#coding:utf-8importsmtplibfromemail.HeaderimportHeaderfromemail.MIMETextimportMIMETextmail_host=‘smtp.163.com‘mail_user=‘user‘mail_pass=‘password‘mail_postfix=‘163.com‘defsend_mail(to_list,subject,content):me=mail_user+"<"+mail_user+"@"+..
分类:
编程语言 时间:
2014-12-03 01:55:50
阅读次数:
240