摘要: vi、touch是创建文件的命令 vi foo.txt cp、mv也算是吧,因为cp是拷贝文件,mv是移动文件 另外还有好多命令能够创建文件,之要该命令能够重定向输出到一个不存在的文件,就会创建文件。例如 tail -f -n 200 /usr/local/tomcat/logs/catalina.out > /tmp/tomcatlog.log //将tomcat日志文件的最后200行内容写入到/tmp/tomcatlog.log文件中,如果/tmp/tomcatlog.log文件不存在,则会创建该文件,如果存在,则覆盖原文件的内容。 下面的类同: echo nihao > /t 阅读全文
posted @ 2012-03-16 17:34 dbstone 阅读(3610) 评论(0) 推荐(0) 编辑
摘要: Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中。最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分别的。在编译时会出现这样的错IndentationError:expectedan indented block说明此处需要缩进,你只要在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。往往有的人会疑问:我根本就没缩进怎么还是错,不对,该缩进的地方就要缩进,不缩进反而会出错,,比如:if xxxxxx:(空格)xxxxx或者def xxxxxx:(空格)xxxxx还有forxxxxxx: 阅读全文
posted @ 2012-03-16 15:35 dbstone 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 注释:Ctrl + shift +cCtrl + /在MXML代码里加CDATA块Ctrl + shift + d代码格式化布局(按照标准排版)先:Ctrl+A后:Shift + tab帮助F1Context 帮助Shift + F2自动完成已经输过的词(Word completion (cycles through possible matches))Alt + / ——代码提示内容帮助Alt + . (本来是Alt + space,因为输入法所以改为 Alt + .)加或去除断点Ctrl + shift + bF1——Flex帮助F3——转到定义F11——开始调试F5——调试进入下一层代码 阅读全文
posted @ 2011-11-05 20:48 dbstone 阅读(390) 评论(0) 推荐(0) 编辑
摘要: ActionScript3.0语言和组件参考参考手册下载地址http://www.adobe.com/devnet/actionscript/references.html 阅读全文
posted @ 2011-10-09 19:33 dbstone 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 转自 http://plussai.iteye.com/blog/1161889题目中需要对0-8九个数的全排列计数(字典序),来完成一张对于的HASH表,显然状态空间中共有9!个状态,可以看成一颗树,第一层9个子节点,第二层每个节点8个子节点,第三层每个节点7个子节点,以此类推。 那么对于某中特定的排列,要求它的字典计数,只需求出每一层在该点之后的节点个数乘以该层对应的DP项。。。int dp[10]={1,1,2,6,24,120,720,5040,40320,362880}; int getHash(int code[9]) { int sum=0; bool flag[9]; i... 阅读全文
posted @ 2011-10-08 17:49 dbstone 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 转自 http://blog.csdn.net/wmbol/article/details/5546903/* * 1091.cpp * * Created on: Apr 29, 2010 * Author: wyy * */ #include<cstdio> #include<queue> using namespace std; struct point { int x, y, num; }; int dx[8] = {1, 1, -1, -1, 2, -2, 2, -2}; int dy[8] = {2, -2, 2, -2, 1, 1, -1, -1};... 阅读全文
posted @ 2011-10-08 13:30 dbstone 阅读(194) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<queue> 5 6 using namespace std; 7 8 queue<int>q; 9 int main() 10 { 11 int a, x, b, y; 12 int visit[9][9]; 13 char c1, c2, r1, r2; 14 15 while(cin>>c1>>r1>>c2>>r2) 16 { 17 memset 阅读全文
posted @ 2011-10-08 01:20 dbstone 阅读(261) 评论(0) 推荐(0) 编辑
摘要: pure specifier can only be specified for functions英语不好,好像大概意思是 specifier(标示符,说明符)只能被specified(指定 精确确定) 在函数中 阅读全文
posted @ 2010-12-01 22:50 dbstone 阅读(1036) 评论(0) 推荐(0) 编辑
摘要: 6chapter1.cppLinking...6chapter1.obj : error LNK2001: unresolved external symbol "public: __thiscall BTree::~BTree(void)" (??1BTree@@QAE@XZ)6chapter1.obj : error LNK2001: unresolved external symbol "public: __thiscall BTree::BTree(void)" (??0BTree@@QAE@XZ)Debug/6chapter1.exe : fa 阅读全文
posted @ 2010-12-01 21:03 dbstone 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 编译Beginning JSP WEB Development 里面的源代码出现这个问题,按英文意思,看了半天没找到什么问题,百度了下,把结果汇总下,好让自己分析搜集完,发现刷新下又没问题了,真够奇怪的....关于Tomcat: The value for the useBean class attribute is invalid 错误提示的解决方案文件夹结构(Note下有两个子文件夹):E:/javaStudy/Note/Note_DAOE:/javaStudy/Note/Note_jdbc而在Tomcat的service.xml中虚拟目标设置情况:path="/note&quo 阅读全文
posted @ 2010-11-24 00:24 dbstone 阅读(374) 评论(0) 推荐(0) 编辑