上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页
摘要: 声明:这篇文章非本人所写,转自:http://coolshell.cn/articles/4119.html昨天写了一篇如何学好C语言,就有人回复问我如何学好C++,所以,我把我个人的一些学习经验写在这里,希望对大家有用。首先,因为如何学好C语言中谈到了算法和系统,所以这里就只谈C++语言。C++是... 阅读全文
posted @ 2014-04-19 15:05 wiessharling 阅读(230) 评论(0) 推荐(0)
摘要: 出处:http://blog.csdn.net/pony_maggie/article/details/6748662很多人都知道指针访问比数组访问效率高, 但很少人明白其中的原理, 这篇文章从汇编级别上分析一下原因.我用一个"reverse"函数来作为例子, 分别用指针和数组的形式来实现这个函数.... 阅读全文
posted @ 2014-04-19 13:07 wiessharling 阅读(1250) 评论(0) 推荐(0)
摘要: 这周阅读了《架构师之美》,感觉无论是系统架构师还是软件架构师都是一个比较有挑战性的岗位,无论在技术的深度和技术的广度都有很高的要求。不仅需要基本的编程、设计技术等等,需要技术和经验的沉淀,因此并不是一般的学生就可以去应聘这个岗位的。 看这本书其实是因为看到别的同学也在看一些架构师之类的书籍,才... 阅读全文
posted @ 2014-04-19 11:04 wiessharling 阅读(198) 评论(0) 推荐(0)
摘要: class StringTokenizerObject to:break a string into tokens.ContructsStringTokenizer(Stringstr) Constructs a string tokenizer for the specified string.... 阅读全文
posted @ 2014-04-14 10:06 wiessharling 阅读(168) 评论(0) 推荐(0)
摘要: 一、static_cast 对于类型转换,我们常常这么做:(type) expression 引进了static_cast类型转换操作符后,我们只需这样做:static_cast(expression) 例如:int firstNumber, secondNumber;double result = ((double)firstNumber)/secondNumber;double result = static_cast(firstNumber)/secondNumber; 二、const_cast 简而言之,const_cast 最普通的用途就是转换掉(去掉)对象的 const 属... 阅读全文
posted @ 2014-04-08 20:24 wiessharling 阅读(227) 评论(0) 推荐(0)
摘要: 1、内建函数enumeratefriends = ['john', 'pat', 'gary', 'michael']for i, name in enumerate(friends): print "iteration {iteration} is {name}".format(iteration=i, name=name) 其中 i 表示:0, 1, 2, 3; name表示:friends下标为i的内容,即friends[i]2、print()格式化输出parents, babies = (1, 1)wh 阅读全文
posted @ 2014-04-08 10:18 wiessharling 阅读(256) 评论(0) 推荐(0)
摘要: #include #include #include #include struct hostent *h; QByteArray ba = ui->lineEdit->text().toLatin1(); h = gethostbyname(ba.data()); if(h == NULL) { qDebug()h_addr; char *ch = inet_ntoa(*in); QString str = QString(QLatin1String(ch)); qDebu... 阅读全文
posted @ 2014-04-07 22:42 wiessharling 阅读(1159) 评论(0) 推荐(0)
摘要: 数学计算要利用相关的数学计算函数,首先需要把数学模块包含进来:>>>import math进行计算:>>> math.pi3.141592653589793>>> math.sqrt(90)9.486832980505138>>> 随机数包含随机函数:>>> randomTraceback (most recent call last): File "", line 1, in randomNameError: name 'random' is not defined& 阅读全文
posted @ 2014-03-29 13:47 wiessharling 阅读(211) 评论(0) 推荐(0)
摘要: 1、判断文件是否存在 File file = new File("d:\\study\\temp\\test.java"); boolean bl = file.exists();2、更名文件名 File srcFile = new File("d:\\study\\temp\\test.javav"); File desFile = new File("d:\\study\\temp\\testnew.java"); boolean bln = srcFile.renameTo(desFile);3、删除文件File file = 阅读全文
posted @ 2014-03-26 20:25 wiessharling 阅读(497) 评论(0) 推荐(0)
摘要: 首先,我们看一个实际例子:class Test{ public static int X=100; public final static int Y=200; public Test(){ System.out.println("Test构造函数执行"); } static{ System.out.println("static语句块执行"); } public static void display(){ System.out.println("静态方法被执行"); }... 阅读全文
posted @ 2014-03-26 19:24 wiessharling 阅读(299) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页