工程
文章平均质量分 71
笔墨遗迹
这个作者很懒,什么都没留下…
展开
-
代码演示:float 是如何存储的,2进制如何还原为float
代码#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>/**演示float是如何存储的*/void float_to_bits(float f_num, char bits[]){ int *f = (int*)(&f_num); for (int i=0; i<32; i++) { bits原创 2021-08-25 08:48:40 · 257 阅读 · 0 评论 -
Linux (syscall)系统调用& (mutex)锁的开销
环境采用虚拟机Intel® Core™ i5-3470 CPU @ 3.20GHzLinux Jimmy 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:06:37 UTC 2016 i686 i686 i686 GNU/Linux目的测试系统调用、线程调度、进程调度等操作耗时。目的只是给出耗时在哪个量级的概念。数据操作耗时syscall600nsclock_gettime600nsmalloc(b原创 2020-09-03 17:25:08 · 706 阅读 · 0 评论 -
C++ format string (格式化字符串)
为什么要单独做C++字符串格式化?C++中可以使用stringstream来格式化字符串如下:stringstream sstream;sstream << "I have made " << 500 << " dollars on this product.";string formated_str = sstream.str();但是,这种方式并不好用。有没有类似printf操作的方式呢?在opencv中有类似的封装。怎么做?怎么用?string f原创 2020-09-03 17:23:05 · 8024 阅读 · 1 评论 -
C++ 容器&Move&各种构造函数
目的研究在容器相关操作中,类的各种构造函数的调用时机。试验采用c++11编译#include <vector>#include <iostream>#include <algorithm>using namespace std;class A{private: int m_a;public: A(int a):m_a(a){cout << "Construct" << m_a << endl;}; A(co原创 2020-08-18 08:38:02 · 591 阅读 · 0 评论 -
从clock_gettime和gettimeofday开始谈linux下函数耗时计算
从clock_gettime和gettimeofday开始谈linux下函数耗时计算引言在OpenCV中有如下的两个函数用来获取当前时间。static long long getTickCount(void){#if defined _WIN32 || defined WINCE LARGE_INTEGER counter; QueryPerformanceCounter( &counter ); return (long long)counter.QuadPart原创 2020-08-07 14:50:57 · 4444 阅读 · 0 评论 -
Introduction to Scrum - 7 Minutes
敏捷的价值观个体和交互胜过过程和工具可以工作的软件胜过面面俱到的文档客户合作胜过合同谈判响应变化胜过遵循计划虽然右项有价值,但我们更重视左项敏捷的原则我们最优先要做的是通过尽早的、持续的交付有价值的软件来使客户满意。即使到了开发的后期,也欢迎改变需求。敏捷过程利用变化来为客户创造竞争优势。经常性地交付可以工作的软件,交付的间隔可以从几个星期到几个月,交付的时间间隔越短越好。在整个项目开发期间,业务人员和开发人员必须天天都在一起工作。围绕被激励起来的个体来构建项目。给他们提供所需的原创 2020-07-18 11:25:04 · 262 阅读 · 0 评论