常见问题集锦

Integer是普通类型int的封装类,它提供了多个操作整数的方法;可以表示出0(int的默认值)和null(Integer的默认)的区别,因此Integer更适合web表单数据类型。

数据库工程师怎样

在把本地新项目推送至GitHub仓库时的大致流程和步骤,首先现在GitHub上面新建一个项目,复制该项目的 带.git 后缀的地址,比如

[email protected]:XXX/XXX.git

然后在本地项目上 git init 初始化一个仓库,然后 使用
git add .
git commit -m "commit message"
git remote add origin [email protected]:XXX/XXX.git
然后 git push -u origin master


Eclipse注释:多行//注释:选中多行+Ctrl+/;用/**/注释:选中+Ctrl+Shift+/;方法的解释说明注释:在该方法前/**+回车

VS2008提示快捷键查看

工具->选项->环境->键盘->编辑.完成单词(Edit.CompleteWord)

解决scanf_s错误

项目->属性->配置属性->C/C++->预处理器->预处理器定义->编辑->加上_CRT_SECURE_NO_DEPRECATE

string转化为其他类型

stoi(string) stol(string) stof(string) stod(string)
其他类型转化为string,统一用to_string(otherType)

#include<sstream>
通过中间变量stringstream ss;ss<<原类型数据;ss>>新类型数据;

小顶堆,优先队列实现
#include<queue>
#include<functional>
priority_queue<int, vector<int>,greater<int>> Q;

大顶堆
#include<queue>
priority_queue<int> Q;

使用STL的排序
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
http://blog.csdn.net/bz201/article/details/543001
http://blog.csdn.net/piaoxuezhong/article/details/54348787

猜你喜欢

转载自blog.csdn.net/baidu_35758682/article/details/80538572