08 2022 档案

摘要:void rotate(vector<int>& nums, int k) { int n = nums.size(); vector<int> newArr(n); for (int i = 0; i < n; ++i) { newArr[(i + k) % n] = nums[i]; } num 阅读全文
posted @ 2022-08-31 11:52 lwx_R 阅读(14) 评论(0) 推荐(0) 编辑
摘要:vector<int> sortedSquares(vector<int>& nums) { int l=nums.size(); vector<int> v; for(int i=0;i<l;i++){ v.push_back(nums[i]*nums[i]); } sort(v.begin(), 阅读全文
posted @ 2022-08-31 11:51 lwx_R 阅读(38) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #include <queue> #include <set> #include <iterator> #incl 阅读全文
posted @ 2022-08-30 20:04 lwx_R 阅读(6) 评论(0) 推荐(0) 编辑
摘要:long long firstBadVersion(int n) { long long l=1; long long r=n; long long mid=1; //执行完之后l=r 即为答案 while(l<r){ mid=(l+r)/2; mid = left + (right - left) 阅读全文
posted @ 2022-08-30 20:03 lwx_R 阅读(13) 评论(0) 推荐(0) 编辑
摘要:int searchInsert(vector<int>& nums, int target) { int l=0; int r=nums.size(); int mid=0; while(l<r){ mid=(l+r)/2; if(nums[mid]>target){ r=mid; }else i 阅读全文
posted @ 2022-08-30 20:01 lwx_R 阅读(18) 评论(0) 推荐(0) 编辑
摘要:int search(vector<int>& nums, int target) { int l=0; int r=nums.size()-1; cout<<r<<endl; int mid; while(l<r){ mid=(l+r)/2; if(nums[mid]<target){ l=mid 阅读全文
posted @ 2022-08-30 20:00 lwx_R 阅读(15) 评论(0) 推荐(0) 编辑
摘要:1.模板 int search(vector<int>& nums, int target) { int l=0; int r=nums.size(); int mid; while(l<r){ mid=(l+r)/2; if(nums[mid]<target){ l=mid+1; }else if 阅读全文
posted @ 2022-08-30 19:59 lwx_R 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1.日志处理的问题 2.什么是AOP? 通过代理模式,可以在指定位置执行对应流程。这样就可以将一些横向的功能抽离出来形成一一个独立的模块, 然后在指定位置插入这些功能。这样的思想,被称为面向切面编程,即AOP. Aspect Oriented Programing面向切面编程,相比较oop面向对象编 阅读全文
posted @ 2022-08-30 11:26 lwx_R 阅读(21) 评论(0) 推荐(0) 编辑
摘要:查看这些配置,确保版本一样 阅读全文
posted @ 2022-08-29 18:31 lwx_R 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#函数 def fun(a,b='b'): print("fun"+a+b) return a fun(b='b',a='a')#关键字实参 #传递任意数量实参 实参封装到元组里 def fun1(*arg): print(arg) for a in arg: print(a) fun1("lol" 阅读全文
posted @ 2022-08-29 16:11 lwx_R 阅读(23) 评论(0) 推荐(0) 编辑
摘要:print("Hello World") # 变量 a=" this is string " print(a) # 字符串方法 print(a.title())#首字母大写 print(a.strip())#去除开头和结尾空白 lstrip()开头 rstrip()结尾 print(a.upper( 阅读全文
posted @ 2022-08-22 18:10 lwx_R 阅读(28) 评论(0) 推荐(0) 编辑
摘要:ON DELETE restrict(约束):当在父表(即外键的来源表)中删除对应记录时,首先检查该记录是否有对应外键,如果有则不允许删除。 no action:意思同restrict.即如果存在从数据,不允许删除主数据。 cascade(级联):当在父表(即外键的来源表)中删除对应记录时,首先检查 阅读全文
posted @ 2022-08-01 18:05 lwx_R 阅读(1429) 评论(0) 推荐(0) 编辑
摘要:1.如果idea插件中搜索不到,直接到插件市场搜索gitee https://plugins.jetbrains.com/ 2.安装到本地后,有个zip包,不解压,进入idea–> plugins,选中刚刚下的zip包。(解压的话就选中里面的jar包) 阅读全文
posted @ 2022-08-01 17:39 lwx_R 阅读(147) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示