现在位置: 首页 > derma发表的所有文章
  • 09月
  • 10日
综合 ⁄ 共 328字 评论关闭
private Handler handler = new Handler(){ public void handleMessage(Message msg) { super.handleMessage(msg); if(msg.waht == 1){ //todo something.... } } }; private Timer timer = new Timer(true); //任务 private TimerTask task = new TimerTask() { public void run() { Message msg = new Message(); msg.waht = 1; handler.sendMessage(msg); } }; //启动定时器 timer.schedule(task, 0, 10*60*1000);
阅读全文
  • 03月
  • 12日
综合 ⁄ 共 2537字 评论关闭
 文/一觉亮天 The Channel Bonding Module [ref2]   Red Hat Enterprise Linux allows administrators to bind NICs together into a single channel using the bonding kernel module and a special network interface, called a channel bonding interface. Channel bonding enables two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy.   To channel bond multiple network interfaces, the administrator must perform the following steps:   1.Add the fo......
阅读全文
  • 12月
  • 16日
综合 ⁄ 共 1620字 评论关闭
unity中调用dll文件总结 根据收集的资料,对unity中调用dll文件进行总结,目前常用的两种,在给出vs中封装dll文件的步骤。 一、调用c#中的dll文件 1.1封装dll文件 首先新建一个项目 然后创建一个类库,例如命名为Csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Csharp { public class Class1 { public static string getName(string name) { return name; } } } 然后编译成dll文件,名字为Csharp.dl......
阅读全文
  • 05月
  • 20日
综合 ⁄ 共 486字 评论关闭
           实体完整性:实体与数据库中表的映射关系;         域完整性:实体的部分如何保证值是正确的;        参照完整性:实体与其他实体的关系,有主外键的关系;        用户自定义完整性:从用户的角度,如何保证实体或者实体的一部分是正确的;                 主键是不允许空值,它唯一标识一个实体;                                                                                                                                                                                                        ......
阅读全文
  • 05月
  • 07日
综合 ⁄ 共 1266字 评论关闭
/**  * 加码解码工具  * @author lwm  *  */ public class Encode {    /*   * 对应javascript的escape()函数, 加码后的串可直接使用javascript的unescape()进行解码   */  public static String escape(String src) {   int i;   char j;   StringBuffer tmp = new StringBuffer();   tmp.ensureCapacity(src.length() * 6);   for (i = 0; i < src.length(); i++) {    j = src.charAt(i);    if (Character.isDigit(j) || Character.isLowerCase(j)      || Character.isUpperCase(j))     tmp.append(j);    else if (j &l......
阅读全文
http://www.cnblogs.com/BillChen/archive/2008/10/28/1321461.html 一、提供服务         有时候我们在利用WCF开发SOA服务时,可能需要使用编码的方式来提供服务,而没有使用配置文件的方式。这里我写了一个助手方法来方便实现这方面的需求,还是先来看一下代码:     public static class ServiceHelper     {         public static void OpenPipeHost<S, C>(                 ServiceHost serviceHost, string netPipeAddress, string timeout) where S : class, C, new()          {             Uri baseAddress......
阅读全文
  • 03月
  • 20日
综合 ⁄ 共 1270字 评论关闭
http://cyxinda.blog.163.com/blog/static/36596186201272012130112/ 在开发的过程中,通常会用到EditText,如何让虚拟键盘来适应输入框中内容的类型,通常我们都会在xml文件中加入android:inputType=""。 android:inputType="none"android:inputType="text"android:inputType="textCapCharacters"//前3个输入普通字符android:inputType="textCapWords"//单词首字母大小 android:inputType="textCapSentences"//仅第一个字母大小 android:inputType="textAutoCorrect"android:inputType="textAutoComplete"//前两个自动完成 ......
阅读全文
  • 03月
  • 15日
综合 ⁄ 共 2421字 评论关闭
以前的公司上班上网或者收发邮件都得小心翼翼的,怕一不小心被有心人瞧见,又得被说说。为了能发邮件而不被发现,嘿嘿,我就用python写了个邮件发送程序,用控制台控制,不了解的人一定以为哥还在编程工作呢。哈哈。         下面简单介绍下如何使用python发送邮件,包括普通文本内容,也可以带附件,或者HTML内容的邮件。可以说有了python,一切都变得非常的容易。         smtplib 模块是用来发送email的标准module,另外配合email.mime内的几个module实现起来就非常的简单。 [python] view plaincopyprint? def se......
阅读全文
  • 02月
  • 18日
综合 ⁄ 共 478字 评论关闭
none or internal:类智能在当前工程中访问 public:类可以在任何地方访问 abstract or internal abstract:类只能在当前工程访问,不能实例化,只能继承 public abstract:类可以在任何地方访问,不能实例化,只能继承 sealed or internal abstract:类只能在当前工程中访问,不能派生,只能实例化 public sealed:类可在任何地方访问,不能派生,只能实例化 C#是单继承,编译器不允许派生类的可访问性比其基类更高。 类名 冒号 基类 接口1,接口2,。。。即基类必须紧跟在冒号后面,之后接口的顺序无要求。 接口成员定义为publi......
阅读全文
  • 01月
  • 23日
综合 ⁄ 共 2648字 评论关闭
使用PHP的最大1个优势就是速度快。一般情况下,PHP总是具有足够的速度支持Web内容动态生成,许多时候甚至无法找出比它更快的方法。然而,当面对庞大的访问量、高负荷的应用、有限的带宽,以及其他各种带来性能瓶颈的因素时,就需要考虑怎样提高PHP的性能了     1、代码优化   代码优化不仅仅是写出干净和清晰的代码,而是对代码进行一定的简化。可以使用Zend Optimizer来自动帮助完成这些繁杂的工作。Zend Optimizer可以从Zend Technologies的网站http://www.zend.com/免费得到,但必须同意它的许可约定,因为它不是以GPL方式......
阅读全文
  • 01月
  • 20日
综合 ⁄ 共 658字 评论关闭
/* 第 24 题: 链表操作, (1).单链表就地逆置, (2)合并链表 */ node * reverseNonrecurse(node *head) { if(head==NULL) return head; node *p=head,*previous=NULL,*next=NULL; while(p->next!=NULL) { next=p->next;//保存下一个 p->next=previous;//p下一个为他前面的 previous=p; p=next; } p->next=previous; return p; } //两个排好序的合并 Node *merge(Node *h1, Node *h2) { if (h1==NULL) return h2; if (h2==NULL) return h1; Node *head; if (h1->data>h2->......
阅读全文
  • 01月
  • 10日
综合 ⁄ 共 2931字 评论关闭
hciattach的功能是:建立串口和蓝牙协议层的数据连接通道。 源代码参考 tools/hciattach.c 先看hciattach的用法 hciattach [-n] [-p] [-b] [-r] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr] hciattach -l hciattach的结构体 struct uart_t { char *type; int  m_id; int  p_id; int  proto; int  init_speed; int  speed; int  flags; char *bdaddr; int  (*init) (int fd, struct uart_t *u, struct termios *ti); int  (*post) (int fd, struct uart_t *u, struct termio......
阅读全文