自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

心向暖的博客

努力不一定有收获,不努力一定没有收获

  • 博客(218)
  • 收藏
  • 关注

原创 论文撰写格式-------Mathtype分隔符隐藏

Word 格式->样式和格式,在右侧出现文档中使用的样式; 找到MTEquationSection,点右边下拉箭头“修改样式”; 在弹出的“修改样式”对话框中,点左下角的“格式”按钮,选“字体”; 在“字体”对话框中勾选“隐藏文字”勾上。在Word中插入MathType公式编号的方法,可以参考我的另一篇博文论文撰写格式-------Mathtype公式分章节自动编号及引用编号...

2020-03-08 09:43:27 5376

原创 MATLAB将多个图画在同一个图中并标注(a)(b)(c)(d)

MATLAB将多个图画在同一个图中并标注(a)(b)(c)(d)subplot(2,1,1);stem(x),'ko-');xlabel({'采样点';'(a)'});

2020-03-06 16:46:56 16731

原创 论文撰写格式-------Mathtype公式分章节自动编号及引用编号

又到了一年一度的毕业季,一个头两个大,毕设论文好不容易接近尾声了,迎来了撰写的必经之路---- ­­­­­­­­修改格式。仅以此文稍作记录,预祝正在阅读本文的同学们和我毕业顺利,一起走花路!论文撰写格式-------Mathtype公式分章节自动编号及引用编号论文撰写格式------参考文献自动编号及正文中引用编号第一步,在word加载的Mathtype中给正文分章节以便按照章节...

2020-03-05 13:35:33 25404 8

原创 MATLAB跳出多重for循环

Matlab中有关控制循环的有三个命令,break,continue和return。break就是直接跳出该层循环。continue就是直接进入该层循环的下一次迭代。return就是直接退出程序或函数返回了。方法1设置flag标志位。for for if(满足条件) ...

2019-12-01 16:14:00 31140

转载 两个矩阵相乘在空间意义

转自https://www.zhihu.com/question/21351965马同学的答案特别通俗易懂

2019-08-28 17:13:12 1227

原创 no matching function for call to 'transform(std::__cxx11::basic_string<char>

刷题遇到的问题,transform(s.begin(), s.end(), s.begin(), tolower);将string类型全部转换成小写。报错no matching function for call to 'transform(std::__cxx11::basic_string<char>。错误原因:既有C版本的toupper/tolower函数,又有STL...

2019-07-21 22:13:17 5739

原创 169. 求众数

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"#include "queue"using namespace std;int majorityElement(vector<int>&...

2019-07-21 22:08:31 98

原创 125. 验证回文串

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"#include "queue"using namespace std;//bool isPalindrome(string s) //{// ...

2019-07-21 21:37:59 97

转载 公钥、私钥、数字签名、数字证书

1.公钥与私钥原理1)鲍勃有两把钥匙,一把是公钥,另一把是私钥2)鲍勃把公钥送给他的朋友们----帕蒂、道格、苏珊----每人一把。3)苏珊要给鲍勃写一封保密的信。她写完后用鲍勃的公钥加密,就可以达到保密的效果。4)鲍勃收信后,用私钥解密,就看到了信件内容。这里要强调的是,只要鲍勃的私钥不泄露,这封信就是安全的,即使落在别人手里,也无法解密。5)鲍勃给苏珊回信,决定采用"数字签名"。他写...

2019-07-16 20:41:28 209

转载 iSIM卡是个什么鬼?它和eSIM卡到底啥关系?

转自http://www.sohu.com/a/325752166_116178提起eSIM卡,经常关注CFan的小伙伴肯定不会陌生,这种没有实体卡片,而是将芯片直接集成在终端设备(如手机、笔记本、可穿戴设备)内,理论上可以让用户自主选择移动网络的运营商,堪称携号转网的一大助力。在刚刚结束的MWC19上海上,中国联通在展示5G业务之余,也开放了eSIM展示区,参观者可以清晰地看到eS...

2019-07-16 20:39:02 1912

原创 111. 二叉树的最小深度

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"#include "queue"using namespace std;struct TreeNode { int val; TreeNode ...

2019-07-13 11:39:55 82

原创 107. 二叉树的层次遍历 II

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"#include "queue"using namespace std;struct TreeNode { int val; TreeNode ...

2019-07-13 11:14:05 86

原创 104. 二叉树的最大深度

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode ...

2019-07-13 10:30:48 76

原创 101. 对称二叉树

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode ...

2019-07-13 10:05:40 71

原创 136. 只出现一次的数字

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;int singleNumber(vector<int>& nums) { int r...

2019-07-12 21:26:22 63

原创 118

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;vector<vector<int>> generate(int numRows) ...

2019-07-10 22:09:51 146

原创 100. 相同的树

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode...

2019-07-10 21:25:42 77

原创 88. 合并两个有序数组

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;void merge(vector<int>& nums1, int m, vector&...

2019-07-07 21:55:25 99

原创 83. 删除排序链表中的重复元素

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"#include "set"using namespace std;struct ListNode { int val; ListNode *next; ListNode...

2019-07-07 21:22:15 79

原创 70. 爬楼梯

直接使用递推公式,会超时。改用通项公式,可以通过,但内存消耗仍然有待改进。#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;//int climbStairs(int n) //...

2019-07-07 18:03:00 92

原创 69. x 的平方根

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int mySqrt(int x){ return int(sqrt(x));}int main(){ cout<&l...

2019-07-07 17:48:56 119

转载 HTTP中GET和POST两种基本请求方法的区别

转自https://www.cnblogs.com/logsharing/p/8448446.htmlGET和POST是HTTP请求的两种基本方法,要说它们的区别,接触过WEB开发的人都能说出一二。最直观的区别就是GET把参数包含在URL中,POST通过request body传递参数。你可能自己写过无数个GET和POST请求,或者已经看过很多权威网站总结出的他们的区别,你...

2019-07-02 11:43:36 11299

转载 堆和栈的区别 之 数据结构和内存

转自https://www.cnblogs.com/llfy/p/9405120.html数据结构的栈和堆首先在数据结构上要知道堆栈,尽管我们这么称呼它,但实际上堆栈是两种数据结构:堆和栈。堆和栈都是一种数据项按序排列的数据结构。栈就像装数据的桶或箱子我们先从大家比较熟悉的栈说起吧,它是一种具有后进先出性质的数据结构,也就是说后存放的先取,先存放的后取。这就如同我们要取出放...

2019-07-01 15:05:15 175

原创 67. 二进制求和

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;string addBinary(string a, string b) { if (a.empty() && b.em...

2019-07-01 11:44:33 111

原创 66. 加一

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;//测试用例过大,遍历数组转为数字,加一后,再生成数组返回的方式行不通,即使用long long,也过不了后面那个更长的测试用例//vec...

2019-07-01 11:20:41 74

原创 58. 最后一个单词的长度

//需要考虑"a "的情况#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;//int lengthOfLastWord(string s) //{ //if (s.size() =...

2019-07-01 10:12:02 70

原创 53. 最大子序和

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int maxSubArray(vector<int>& nums) { int sumMax = nums[0];...

2019-06-30 21:30:59 78

原创 内存对齐

内存对齐规则:按照成员的声明顺序,依次安排内存,其偏移量为成员大小的整数倍,0看做任何成员的整数倍,最后结构体的大小为最大成员的整数倍。内存对齐原因:1.平台原因(移植原因):不是所有的硬件平台都能访问任意地址上的任意数据的;某些硬件平台只能在某些地址处取某些特定类型的数据,否则抛出硬件异常。2.性能原因:数据结构(尤其是栈)应该尽可能地在自然边界上对齐。原因在于,为了访问未对齐...

2019-06-30 10:48:58 76

转载 如何防止一个类被继承

转自https://blog.csdn.net/omg_orange/article/details/82696060Java中,可将不允许扩展的类被称为final类。c++中,可以直接把这个类的构造函数设置成私有的,杜绝了其他类的继承,但也相当于毁掉了这个类。借助友元来实现,因为友元是不可以被继承的。如果一个类的构造函数要借助它的友元类,那么继承了这个类的类就无法构造自己的对象。从而...

2019-06-30 10:32:09 703

原创 35. 搜索插入位置

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int searchInsert(vector<int>& nums, int target) { int i = 0...

2019-06-29 21:22:26 62

原创 28. 实现strStr()

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int strStr(string haystack, string needle) { if (haystack.size() <...

2019-06-29 18:05:27 96

原创 解决谷歌浏览器打开新页面会覆盖原网页(无效)

设置->高级->系统->打开代理设置;点击常规-选项卡设置,配置成如图所示。

2019-06-29 17:17:14 64210 3

原创 设计模式(常见的)

单例模式:单例模式主要解决一个全局使用的类频繁的创建和销毁的问题。单例模式下可以确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。单例模式有三个要素:一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例。为了保证单例模式在多线程下的线程安全,一般采用下面几种方式实现单例模式:1)饿汉式2)懒汉式C++的实现有两种,...

2019-06-25 22:27:15 88

原创 27. 移除元素

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int removeElement(vector<int>& nums, int val) { int i=0,j ...

2019-06-25 22:16:55 76

原创 26. 删除排序数组中的重复项

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;int removeDuplicates(vector<int>& nums) { int i = 0, j = 0;...

2019-06-23 22:25:38 78

原创 21. 合并两个有序链表

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x)...

2019-06-23 17:38:19 77

原创 20. 有效的括号

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "stack"using namespace std;bool isValid(string s) { stack<char>v; for (int i = 0; i < ...

2019-06-23 16:47:49 100

原创 15. 三数之和

#include <iostream>#include <algorithm>#include "string"#include "vector"#include "set"using namespace std;vector<vector<int>> threeSum(vector<int>& nums){...

2019-06-23 15:44:19 89

原创 14. 最长公共前缀

#include <iostream>#include <algorithm>#include "string"#include "vector"using namespace std;string longestCommonPrefix(vector<string>& strs){ string res = ""; if (str...

2019-06-23 11:13:37 81

原创 13. 罗马数字转整数

#include <iostream>#include <algorithm>#include "string"#include "vector"using namespace std;int romanToInt(string s) { int num = 0,pirror = 0; for (int i = 1; i < s.length();...

2019-06-22 22:25:18 93

空空如也

空空如也

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

TA关注的人

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