自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 资源 (2)
  • 收藏
  • 关注

原创 x的平方根

实现int sqrt(int x)函数,计算并返回x的平方根。样例sqrt(3) = 1sqrt(4) = 2sqrt(5) = 2sqrt(10) = 3class Solution {public: /** * @param x: An integer * @return: The sqrt of x

2022-12-30 16:48:09 622 1

原创 分糖果问题

有N个小孩站成一列。每个小孩有一个评级。按照以下要求,给小孩分糖果:每个小孩至少得到一颗糖果。相邻小孩之间,评级越高的小孩可以得到更多的糖果。需最少准备多少糖果?class Solution {public: /** * @param ratings Children's ratings * @return the minimum

2022-12-30 16:46:54 349 1

原创 使用mybatis存储一条数据后返回自增主键的值

对于要存储的数据,有一个bean,bean中包含了自增主键id:public class realBean{ private int id; private String name; public realBean() { super(); } public realBean(String name) { this....

2018-09-10 10:33:08 673

转载 QT导出excel

在Qt中使用QAxObject类访问Com组件对象,需要在pro文件中添加下面的内容:QT       +=axcontainer  bool exportexcel(){ QString filePath = "test.xlsx"; QAxObject * work_book; QAxObject excel("Excel.Applicatio...

2018-04-12 13:18:58 788

原创 C++大楼轮廓

水平面上有 N 座大楼,每座大楼都是矩阵的形状,可以用三个数字表示(start, end, height),分别代表其在x轴上的起点,终点和高度。大楼之间从远处看可能会重叠,求出 N 座大楼的外轮廓线。外轮廓线的表示方法为若干三元组,每个三元组包含三个数字 (start, end, height),代表这段轮廓的起始位置,终止位置和高度。例如:给

2016-12-13 11:45:17 720

原创 Intersection of Two Arrays II 两数组的交

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as ma

2016-12-12 14:44:11 266

原创 Intersection of Two Arrays 两数组的交

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be unique.The res

2016-12-12 13:40:44 227

原创 接雨水问题(C++)

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,

2016-12-08 16:59:17 2015

gnu-make.pdf

本文比较完整的讲述 GNU make 工具,涵盖 GNU make 的用法、语法。同时重点 讨论如何为一个工程编写 Makefile。作为一个 Linux 程序员,make 工具的使用以及编写Makefile是必需的。系统、详细讲述make的中文资料比较少,出于对广大中文Linuxer的支持,这个中文版手册。本书不是一个纯粹的语言翻译版本,其中对 GNU make 的一些语法和用法根据我个人的工作经验进行了一些详细分析和说明,也加入了一些个人的观点和实践总结。本书的所有的例子都可以在支持V3.8版本的GNU make的系统中正确执行。

2018-02-09

corebook.pdf

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

2018-02-09

空空如也

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

TA关注的人

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