- 博客(31)
- 收藏
- 关注
原创 Boost多线程实现生产者与消费者问题
首先,生产与消费的内容为自定义的一个简单的string类自定义string类的实现如下CMystring.h#ifndef GUARD_CMYSTRING_H#define GUARD_CMYSTRING_Hclass CMyString {public: CMyString(const char* pData=NULL); CMyString(const CMyStrin
2015-04-11 15:05:27
1403
原创 关于程序员话题的播客(podcast)
Teahour专注程序员感兴趣的话题,包括 Web 设计和开发,移动应用设计和开发,创业以及一切 Geek 的话题。http://teahour.fm/比特新声《比特新声》是由郝海龙和有才主持的中文科技类播客。在节目中,我们会尽量避免不加解释地使用过于抽象的科技术语,力争让每一个能够独立思考的人都能够听懂我们的节目。我们坚信凡实验性的东西都有一种独特的魅力,好奇
2015-04-06 21:10:21
1469
原创 "The Civil War in France" translation05
These same people now begged the Prussian government for the hasty return of the French soldiers taken prisoner at Sedan and Metz, in order that they might recapture Paris for them. From the beginning
2014-10-17 17:32:41
678
原创 "The Civil War in France" translation04
The inevitable result was the Paris Revolution of September 4, 1870.这无可避免的导致了1870年4月巴黎革命的爆发。Government of National Defence.国防政府But almost at once the antagonism between the almost
2014-06-30 19:18:41
709
原创 "The Civil War in France" translation03
It was the first time that the bourgeoisie showed to what insane cruelties of revenge it will be goaded the moment the proletariat dares to take its stand against them as a separate class, with its ow
2014-06-28 21:03:20
506
原创 "The Civil War in France" translation02
Thanks to the economic and political development of France since 1789, for fifty years the position in Pairs has been such that no revolution could break out there without assuming a proletariat chara
2014-06-27 15:17:58
476
原创 "The Civil War in France" translation01
Has that which was declared in the first Address not come to pass: that if Germany’s defensive war against Louis Bonaparte degenerated into a war of conquest against the French people, all the misfort
2014-06-26 21:18:49
579
原创 OpenGL学习记录6
Exercise 6:放大镜功能要求:1. 在练习5的基础上,实现放大镜功能,放大场景中的任意部分;2. 放大镜可以通过鼠标键盘进行控制;考察目的:1. 对OpenGL坐标系变换的理解;
2014-04-20 17:29:33
693
原创 OpenGL学习记录5
Exercise 5:alpha混合要求:1. 绘制若干个透明和非透明茶壶,并体现出它们之间正确的混合效果;考察目的:1. OpenGL中alpha混合的使用;2. 混合绘制透明和不透明物体的正确方法;3. 运算符的重载和基本STL的使用;by/scu xx#include #include #includ
2014-04-02 08:12:38
712
原创 Accelerated C++ 习题解答 第11章
EX.11-0#ifndef VEC_H#define VEC_H#include #include #include using std::max;template class Vec {public: typedef T* iterator; typedef const T* const_iterator; typedef size_t size_type;
2014-04-01 17:11:25
927
原创 Accelerated C++ 习题解答 第9章
部分解答来自网上已有解答EX.9-1Student_info.h#pragma once #include #include class Student_info { public: Student_info(); Student_info(std::istream&); std::string name() const { re
2014-03-16 15:22:30
793
原创 OpenGL学习记录4
Exercise 4:材质要求:1. 在练习3的基础中为每个茶壶加入不同的材质;2. 将练习3中的点光源改为不同的颜色;考察目的:1. OpenGL中的材质的使用;2. 理解光源和材质如何综合影响最终的光照结果;by/scu xx#include #include #define GLUT_DISA
2014-03-16 10:30:59
539
原创 OpenGL学习记录3
Exercise 3:光照要求:1. 绘制带有光照效果的场景;2. 场景包含3个茶壶,通过键盘1,2,3可以分别选中三个茶壶,然后用鼠标对每个茶壶进行分别的旋转;3. 使用点光源,点光源为白色,以白色的球体表示;4. 使用3个不同的点光源 i. 光源1的坐标设置在世
2014-03-13 16:34:06
976
原创 Acceierated C++ 习题解答 第8章
部分习题参考了网上已有解答,以后会继续完善未解答的习题EX.8-28_2.h#pragma once #include #include // 返回一个布尔类型的值,表示两个序列中的元素是否相等,第一个序列由输入迭代器b和e界定,// 第二个序列是从输入迭代器b2指向的元素开始的与第一个序列等长的序列template classInputIterator1,c
2014-03-12 20:25:32
627
原创 OpenGL学习记录2
Exercise 2: 纹理要求:1. 在练习1的基础上,绘制一个带纹理的三角形;2. 体现使用不同的纹理滤波方式(GL_NEAREST,GL_LINEAR)对结果的影响;3. 使用超出1的纹理坐标,体现使用不同wrap参数(GL_REPEAT,GL_CLAMP)对结果的影响;考察目的:1. 纹理图像的载入;2. OpenGL中基本纹理的使
2014-03-10 20:26:06
691
原创 OpenGL学习记录1
Exercise 1:基本图元的绘制要求:1. 使用glBegin()/glEnd()方法绘制如下图元:a) 点 (点要有不同大小)b) 线段(线段要有不同宽度)c) 三角形(要分别以list, fans, stripes三种方式进行绘制)d) 矩形2. 可以使用鼠标来对绘制图元进行旋转;3.
2014-03-10 18:35:12
750
原创 Accelerated C++ 习题解答 第7章
部分解答来自网上已有解答EX.7-01)#include #include #include #include using namespace std; int main(){ string s; mapint> counters; while (cin >> s) { ++counters[s]; } for (mapint>::con
2014-03-05 12:42:18
1043
原创 Accelerated C++ 习题解答 第6章
部分解答参考了网上已有解答EX.6-1#include #include #include #include #include using namespace std; string::size_type width(constvector& v){ string::size_typemaxlen = 0; for (vector::const_iterato
2014-02-28 10:29:42
964
原创 Accelerated C++ 习题解答 第5章
习题解答部分来自网上已有解答EX.5-01)#include #include #include #include #include using std::cin;using std::cout;using std::endl;using std::vector;using std::string; vector split (conststring& s){ vec
2014-02-26 16:28:46
1331
原创 Accelerated C++ 习题解答 第4章
部分习题参考了网上已有的解答Ex.4-0median.h#ifndef GUARD_median_h#define GUARD_median_h #includedouble median(std::vectordouble>);#endif median.cpp#include#include#include using std::
2014-02-20 20:35:05
2086
3
原创 Accelerated C++ 习题解答 第3章
部分习题参考了网上已有的解答Ex.3-0#include#include#include#include#include#include#include using std::cin;using std::cout;using std::endl;using std::string;using std::vec
2014-02-20 13:51:13
1324
原创 Accelerated C++ 习题解答 第2章
部分习题参考了网上以有的解答Ex.2-0#include#include#include using std::cin;using std::cout;using std::endl;using std::string; int main(){ cout "please enter your first name:"; string name; cin
2014-02-19 21:18:50
1461
原创 Accelerated C++ 习题解答 第1章
Ex.1-01)#include#include#include int main(){ std::cout "pleause enter your name:"; std::string name; std::cin >>name; std::cout "hello, " "!" getch();
2014-02-19 18:11:37
2069
原创 Accelerated C++ 习题解答 第0章
Ex.0-0#include#include int main(){ std::cout "Hello, world!" getch(); return 0;} Ex.0-13+4是一个表达式,产生的结果是7,此运算没有副作用。 Ex.0-2#include#include int main(){
2014-02-19 16:34:27
1392
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅