摘要: 因为工作原因,开始学习java语言,对java基础补习。 hashMap,使用哈希算法,可能h(key1), h(key2)得到的结果相同,导致冲突出现,解决冲突的方法有很多,使用链接法,除/乘,多次探查来消除冲突,在java jdkHashMap中,看到了红黑树的影子,我想hashMap应该是使用 阅读全文
posted @ 2019-04-02 16:10 RedLight 阅读(132) 评论(0) 推荐(0) 编辑
 
摘要: 清明节前粗略读完了opengl编程指南第七版,对opengl有了一个大体的了解,并且了解的也很肤浅。有了计算机图形学,线性代数的基础,读起来也不像以前那么吃力了。从简单的绘制点,直线,多边形,到视图变换,再到详细讲解颜色,光照,显示列表,纹理贴图。后面几章忽略很多。很遗憾自己没有去实践书中的例子... 阅读全文
posted @ 2015-04-12 23:35 RedLight 阅读(194) 评论(0) 推荐(0) 编辑
  2019年1月28日
摘要: 求知若饥,虚心若愚,在求知的路上,能够做到谦虚,不骄傲,做到为了走的更远,不断进取,不断的提升自己。 阅读全文
posted @ 2019-01-28 17:14 RedLight 阅读(1684) 评论(0) 推荐(0) 编辑
  2016年8月16日
摘要: class A{ int a;}; class B : public A{ int b;}; class C : public A{ int c;}; class D : virtual B,virtual C{ int d;}; int _tmain(int argc, _TCHAR* argv[ 阅读全文
posted @ 2016-08-16 20:53 RedLight 阅读(131) 评论(0) 推荐(0) 编辑
  2016年7月19日
摘要: 最近在工作中,出现了严重的代码错误,对象的基类和子类的继承,代码大致如下: 阅读全文
posted @ 2016-07-19 21:34 RedLight 阅读(440) 评论(0) 推荐(0) 编辑
  2016年6月28日
摘要: /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Y... 阅读全文
posted @ 2016-06-28 21:52 RedLight 阅读(262) 评论(0) 推荐(0) 编辑
  2016年5月2日
摘要: class Vector2d { public: Vector2d():x(0.0),y(0.0){}; Vector2d(double _x,double _y) :x(_x),y(_y){} Vector2d(const Vector2d& _vect2d) { x = _vect2d.x; y = _vect2d.y; } double dotProduct... 阅读全文
posted @ 2016-05-02 21:20 RedLight 阅读(579) 评论(0) 推荐(0) 编辑
  2015年4月29日
摘要: 1 // SimpleTest1.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 #include 7 using namespace std; 8 void DrawTriggle() 9 {10 glPoi... 阅读全文
posted @ 2015-04-29 23:32 RedLight 阅读(740) 评论(0) 推荐(0) 编辑
  2015年4月15日
摘要: 大体看了看数据对齐,不知道是否正确,总结如下:struct A{ char name; double dHeight; int age;};sizeof(A) = (1+7+8+4+4) =24;这是编译器默认下的对齐方式,struct和class一致。如果人工添加代码设置对齐方式,如下#pa... 阅读全文
posted @ 2015-04-15 01:13 RedLight 阅读(1126) 评论(0) 推荐(0) 编辑
  2015年3月24日
摘要: #include int _tmain(int argc, _TCHAR* argv[]){ ShellExecute(NULL, _T("open"), _T("mailto:960547096@qq.com"), NULL,NULL, SW_SHOWNORMAL); Sleep(100); re... 阅读全文
posted @ 2015-03-24 15:54 RedLight 阅读(342) 评论(0) 推荐(0) 编辑