欢迎访问我的独立博客
摘要: 先su切换进超级账户#hostname //查看机器名#hostname -i //查看本机器名对应的ip地址1 # vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=yourname (在这修改hostname,把yourname换成想用的名字)2.修改/etc/hosts里面的名字# vi /etc/hosts127.0.0.1 localhost.localdomain localhost (在这修改hostname,把末尾的localhost换成想用的名字)3.最后在终端下执行:# hostname ***** (*****为修改后的hos 阅读全文
posted @ 2012-11-09 18:46 github.com/starRTC 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 打开最顶层文件夹的时候用右键,选择里面的“浏览文件夹”里面的子文件夹再打开的时候都不会在新窗口中打开了。 阅读全文
posted @ 2012-11-09 12:59 github.com/starRTC 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 打开Xcode,选择Command Line Tool,类型选择Foundation;其中.m为源文件;例1:#import <Foundation/Foundation.h>int main(int argc, const char * argv[]){ NSLog(@"Hello, World!"); return 0;}例2:BOOL与NSString的使用#import <Foundation/Foundation.h>BOOL isDiff(int a, int b){ if(a==b) { return (NO); } else ... 阅读全文
posted @ 2012-11-09 01:44 github.com/starRTC 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 编辑:Ctrl+E到行尾Ctrl+A到行首调试:添加断点: 在对应代码行的左边栏目,点左键去掉断点:选中断点 ->按着 Ctrl 点左键–>在弹出的菜单中选择“删除断点”打断点之后,点击Run按钮,会运行到断点处,然后点击界面下方的Step Over按钮就可以单步跟踪了。Step into是进入,step out是跳出,continue program execution是执行到下一个断点处。在窗口右上角“View”栏中点击“Hide or show the Debug area”可以打开调试窗口(包含输出窗口) 阅读全文
posted @ 2012-11-09 01:32 github.com/starRTC 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 最有价值的!最有用的引用计数型智能指针,可以被拷贝和赋值,可以作为STL容器的元素;1,基本用法:#include <boost/smart_ptr.hpp>#include <assert.h>using namespace boost;int main(){ shared_ptr<int> sp(new int(10)); assert(sp.unique()); shared_ptr<int> sp2 = sp; assert(sp == sp2 && sp.use_count() == 2); *sp2 = 100; as 阅读全文
posted @ 2012-11-08 17:03 github.com/starRTC 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 1,libc(Linux下的ANSI C的函数库)char * strcat(char * dest, const char * src){ char *tmp = dest; while (*dest) dest++; while ((*dest++ = *src++) != '\0') ; return tmp;}2,微软char* strcat ( char * dst , const char * src ){char * cp = dst;while( *cp )cp+... 阅读全文
posted @ 2012-11-08 08:23 github.com/starRTC 阅读(5093) 评论(3) 推荐(1) 编辑
摘要: WAMP是Windows下的Apache+Mysql+Perl/PHP/Python;1, 下载wampserver并安装;安装前请先安装VC 2010运行库,否则会提示没有找到MSVCR100.dll而导致安装失败;2, 打开wampserver,在托盘处右击启动所有服务。(如果有IIS,打开IIS,删除默认网站);安装wordpress1, 下载wordpress;2, 设置wamp:apache—-apache模块—-勾上rewrite_module,这个很重要,如果你没有修改这一项,你就不能在wordpress中设置永久链接。3, 添加数据库。运行phpMyAdmin,创建数据库:在右 阅读全文
posted @ 2012-11-06 23:00 github.com/starRTC 阅读(970) 评论(0) 推荐(0) 编辑
摘要: fill对区间填充原型:template < class ForwardIterator, class T >void fill ( ForwardIterator first, ForwardIterator last, const T& value ){ while (first != last) *first++ = value;}填充区间[first,last)示例:#include <iostream>#include <algorithm>#include <vector>using namespace std;int mai 阅读全文
posted @ 2012-11-06 19:50 github.com/starRTC 阅读(777) 评论(0) 推荐(0) 编辑
摘要: float 型只能保证 6 位有效数字(后面的数字不准确), double 型至少可以保证 10 位有效数字,能满足大多数计算的需要。%运算两侧均为整型数据vc中int占4B\b:移到前一列 \r移到本行开头 \’输出单引号两整数相除结果为整数,如5/3=1 -5/3=-1而不是-2(取整后向0靠拢)int i=3.56//结果i=3(舍弃小数部分)double赋给float时,截取前7位有效数字,反之,扩展到16位putchar输出字符puts输出字符串char c=getchar();printf(“%c”,getchar());%10.2f(共10列,2位小数) %.2f相当于%2.2f 阅读全文
posted @ 2012-11-06 19:35 github.com/starRTC 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 用于删除表中的行。语法DELETE FROM 表 WHERE 列 = 值Person:LastNameFirstNameAddressCityGatesBillXuanwumen 10BeijingWilsonFredZhongshan 23Nanjing删除某行删除"Fred Wilson" :DELETE FROM Person WHERE LastName = 'Wilson'结果:LastNameFirstNameAddressCityGatesBillXuanwumen 10Beijing删除所有行DELETE FROM 表 阅读全文
posted @ 2012-11-06 19:10 github.com/starRTC 阅读(230) 评论(0) 推荐(0) 编辑