现在位置: 首页 > semis发表的所有文章
  • 09月
  • 29日
综合 ⁄ 共 694字 评论关闭
作为libvirt自带的VMM管理工具,可以说是开发其他VMM管理工具的基础。虽然它是一个应用程序,但是自己分析的时候并没有那么顺利,现将自己的分析做一分析,不足之处,还请多多指点!   从main函数分析,C语言程序员都知道的事,但是好多稍微复杂点的程序,常常进入main函数后,让我们无从下手,因为做了太多的封装,致使分析受挫!可能稍微有些经验的会知道,命令行解析函数,肯能是一个重要的突破口,确实不知道的话,可以执行命令,根据命令行提示信息,在源代码里搜索,然后就可以找到解析了,比如virsh  --help |less,找到比......
阅读全文
文章目录 1.1Ubuntu文件下载: 1.2采用U盘方式安装:(注意分区/相当于Window的C系统盘, /home相当于用户的私有数据盘D盘) 2.X  Ubuntu下安装软件的方法: 2.2 开发类: 之前一直使用Window系统,现在工作中大家主流使用Ubuntu,同事帮忙装个Ubuntu系统,事后写一下安装过程,以备后续再次安装查阅。 1Ubuntu安装 1.1Ubuntu文件下载:     Ubuntu官网:http://www.ubuntu.com/index_kylin     Ubuntu桌面版14.04下载:http://ubuntu.com.cn/download/ubuntu-kylin-zh-CN     ......
阅读全文
  • 05月
  • 29日
综合 ⁄ 共 5558字 评论关闭
http://www.net-snmp.org/wiki/index.php/TUT:SNMPv3_Options Introduction The 3rd version of the SNMP protocol introduced a whole slew of new security related features that have been missing from the previous versions. In SNMPv1 and SNMPv2c, a simple community string was put in clear text into the packet to authenticate the request. This is obviously highly insecure. (If it's not obvious, then just trust me). SNMPv3 and Security Components = SNMPv3 introduces advanced security which split......
阅读全文
  • 04月
  • 19日
综合 ⁄ 共 1064字 评论关闭
http://haixiaoyang.wordpress.com/category/search-binary-search/ //Write a program to find the square root of a given numbe //Binary search again. double GetSquareRoot(double f, double exp) { assert((f > 0.0 || abs(f) < exp) && exp > 0.0); double dbBeg = 0.0; double dbEnd = f; //Pitfall, miss 0.0<f<1.0 situation!! which square root is bigger //under this situation, the only difference is to identify the end. //You can't search a number beyond the scope righ......
阅读全文
  • 03月
  • 22日
综合 ⁄ 共 168字 评论关闭
概述 http://comeandgone.blog.163.com/blog/static/16992233320108124525626/ 详述 1 http://bbs.ednchina.com/BLOG_ARTICLE_270813.HTM 2 http://bbs.ednchina.com/BLOG_ARTICLE_270825.HTM
阅读全文
  • 11月
  • 07日
综合 ⁄ 共 2346字 评论关闭
安装及下载client端 TortoiseSVN客户端安装包和语言包的官网下载地址:http://tortoisesvn.net/downloads.html 什么是SVN(Subversion)?    有一个简单易于理解的比喻:SVN=版本控制+备份服务器。 你可以把SVN当成备份服务器,它可以帮你记住每次上传到这个服务器的档案内容,并且自动的赋予每次的变更一个版本(也就是自动生成版本信息)。 我们称用来存放上传档案的地方就做Repository,也就是档案仓库的意思。基本上,第一次我们需要有一个新增add档案的动作,将想要备份的档案放到Repository上面。日后,当你有任何修改时,都......
阅读全文
字符串比较的方法: 相等比较:            $str1  =  $str2   //检查str1与str2是否相同            $str1 !=  $str2   //检查str1与str2是否不同 大小比较:            $str1  <  $str2   //检查str1是否小于str2            $str1  >  $str2    //检查str1是否大于str2 判断字符串是否为空:           -n str1          //检查str1的长度是否大于0           -z str1          //检查str1的长度是否为0 注意::        上面的6个字符串比较。“所有的符号两侧都有空格”,必须小心使用不然将会出现语法错误。同时字符串大......
阅读全文
gethostbyname、gethostbyaddr、uname #include<unistd.h> #include<netdb.h> #include<sys/utsname.h> int main() { struct hostent *pHost = NULL; in_addr_t addr = inet_addr("127.0.0.1"); pHost = gethostbyaddr((char*)&addr,4,AF_INET); //struct utsname Name; //uname(&Name); //pHost = gethostbyname(Name.nodename); printf("name:%s\n",pHost->h_name); char **pAliases = pHost->h_aliases; for(; NULL != *pAliases; pAliases++) printf("aliases:%s\n",*pAl......
阅读全文
  • 04月
  • 28日
综合 ⁄ 共 9291字 评论关闭
一. 什么是拷贝构造函数 首先对于普通类型的对象来说,它们之间的复制是很简单的,例如: [c-sharp] view plaincopyprint? int a = 100;  int b = a;   int a = 100; int b = a; 而类对象与普通对象不同,类对象内部结构一般较为复杂,存在各种成员变量。 下面看一个类对象拷贝的简单例子。 [c-sharp] view plaincopyprint? #include <iostream>  using namespace std;    class CExample {  private:       int a;  public:        //构造函数       CExample(int b)       { a = b;}     ......
阅读全文
  • 02月
  • 16日
综合 ⁄ 共 6158字 评论关闭
  通常我们使用popUpwindow的时候例如都是写一个布局文件然后设置到popUpwindow的自定义布局当中,但有时候我们可能有这样的需求,底部的取消按钮是一定的,但是上面的选项不是写死的两个或者三个而是更加我们的需求动态来决定的,这个时候我们不可能去写死一个布局了,那么就需要我们自定义一个pop,动态添加同时要可以监听各项的点击事件。。。    先说一下思路,我们先定义一个basepopwindow,来抽象几个公用方法,然后通过子类来实现   具体代码: A:抽象基类        public abstract class BasePopupWindow extends PopupWindo......
阅读全文
  • 01月
  • 31日
综合 ⁄ 共 8558字 评论关闭
package com.zxh.customer.hashmap.dao; import java.util.List; import java.util.Map; /**  *  * @author Administrator  *  * @param <T>  */ public interface IBaseDao {     /**      * 单表插入记录      * @param obj      */  public  <T>  int insert(String _mybitsId,  T obj);  /**   * 更新单表   * @param obj   */  public  <T>  int update(String _mybitsId, T obj);     /**      * 删除记录      * @param clz      * @param id      */  public  <T>  int delete(String _mybitsId,......
阅读全文
  • 01月
  • 12日
综合 ⁄ 共 1899字 评论关闭
文章目录 题目大意: 解题思路: 代码: Slash Maze 题目链接:http://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=17844 题目大意: 有一个斜的迷宫,如下图所示,其中有两个环,而最长的环为16格方格。题目就是给定一个斜的迷宫,问能否有环存在,如果存在,求出最长的环。 解题思路: 这道题目放了很久,之前一直不知道怎么建图。有想过把图放大两倍来处理,但是放大两倍之后搜索的条件比较麻烦(网上有该种解法的结题报告),我当时放弃了。后来看到有人把图放大了......
阅读全文