自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

转载 【转载】 谷歌公司管理中的几条关键原则

抓住知识型工人将是未来四分之一世纪企业成功的关键。下面就是Google在这方面的做法。    在Google,我们认为商业管理学的宗师彼得•德鲁克对于如何管理“知识型员工”的理解最为深刻。毕竟,这个词是由德鲁克于1959年发明。德鲁克说知识型员工相信自己拿工资是为了出效率,而不是为了完成朝九晚五的呆板工作,而聪明的企业会“排除任何影响‘知识型员工’工作的障碍”。这些成功经验将吸引最好的...

2015-07-30 14:58:00 245

转载 关于同步/异步,阻塞/非阻塞的一个经典解释

转自知乎http://www.zhihu.com/question/19732473同步和异步关注的是消息通信机制(synchronous communication/ asynchronous communication)所谓同步,就是在发出一个*调用*时,在没有得到结果之前,该*调用*就不返回。但是一旦调用返回,就得到返回值了。换句话说,就是由*调用者*主动等...

2015-07-13 14:38:00 118

转载 算法题之有序数组被折断后的查找

给出一个有序数组,假设其为升序,随机找到一个点,将这个点后面的序列移到数组前面,构成一个新的序列。要求对这个新的数组进行查找,找不到返回-1,否则返回其在数组中的位置。比如输入数组[7,8,9,1,2,3,4,5,6]查找1,返回3;查找8,返回1;查找0,返回-1;int searchDisorderedArray(int a[], int key, ...

2015-06-09 16:07:00 361

转载 迭代器失效

STL容器迭代器存在失效的情况,需要了解STL容器的实现方式,才能理解那种迭代器在何种情况下会失效。Vector,Vector迭代器的实质是指针,而vector空间是连续的,在分配空间的时候,vector实际分配的空间一般会大于所需的空间,可以通过capacity来获得vector实际分配的空间大小,通过size获得实际使用的空间大小。当vector增加成员,导致成员数大于cap...

2015-04-14 15:09:00 109

转载 算法题之无序数组找到任一高点

假设某无序数组A,首尾元素都是0,其余元素值都大于零,且不重复。每一个数值都代表一个高度。要求找出A[1] 到A[N-2]之间的任一高点(高点定义是:某点的值大于其前后元素值),要求时间复杂度为O(Log(N)).比如数组{0,8,9,4,5,1,3,6,7,0},其中高点为9,5,7.      /\    /\ / \/\ / ...

2014-07-24 10:48:00 188

转载 Procedures to enable crash dump in windows server

Right click ‘Computer’ and select ‘Properties’;Click the ‘Advanced system settings’ and in the dialog tab of ‘Advanced’ click button ‘Environment Variables…’;Click ‘New…’ to add a new varia...

2014-07-22 18:10:00 62

转载 C String

What would happen if we compile and run this code ?void main(){ // Option A. char str1[] = "example"; str1[1] = 'a'; // Option B. char* str2 = "examp...

2014-07-16 23:18:00 47

转载 Writing Portable Programs

Size of Data TypesAlways use sizeof() to get the size of types(sizeof(char), sizeof(short), sizeof(int)...)Do not depend on the order of evaluation in an expressionChar type may be sing...

2014-07-16 13:37:00 93

转载 parse string once and convert it to float

一个小题目,模拟stof()功能,网上答案很多,但是感觉都不够简洁。主要是整数部分和小数部分实现由一定区别,这里尝试不区分整数和小数部分,先忽略小数点,然后最后在做一个除操作。比如输入:100.123,先转换为100123,然后除1000float _stof(string s){ float res = 0; int flag = 1; if(s....

2014-05-22 00:14:00 52

转载 Interface和abstract class

这两个概念在C#和Java类似,从语法上看Interface和abstract class都不能实例化。可以继承多个Interface,但不能继承多个abstract class。继承Interface的子类必须实现Interface全部的方法,而abstract class子类可以选择是否实现基类的方法。Interface除包含方法外,还可以包含属性,索引器,事件,...

2014-05-21 00:43:00 67

转载 how to create a random number

看似简单的一个题目,相信大部分人都会第一时间说出rand()函数,但是我们的做法真的正确么?生成的随机数确实真的随机么?1. 看下面代码,用rand()生成随机数int main(){ cout<<"rand() traps by Sparkles."<<endl; int N = 10; for (int i = 0;...

2014-04-06 15:00:00 86

转载 (转载)Adapter Design Pattern in C++

An adapter pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.It ...

2013-07-01 18:20:00 85

转载 (转载)Parameter Passing in C# - Preamble

Preamble: what is a reference type?In .NET (and therefore C#) there are two main sorts of type: reference types and value types. They act differently, and a lot of confusion about parameter p...

2013-06-28 18:11:00 171

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除