上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 43 下一页
摘要: 1.编译方式选package 2.在文件夹的target目录下有war包 阅读全文
posted @ 2022-09-19 19:00 lwx_R 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1.父容器设置为flex布局,并允许折行 .flex-outer { display: flex; flex-wrap: wrap; } 2.通过修改子容器百分比实现 是n列就把百分比变为100/n(%) 阅读全文
posted @ 2022-09-19 15:37 lwx_R 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1.使用flex布局 <style> #back{ border: red solid 1px; width: 800px; height: 500px; display: flex; align-items: center; } #left{ border: blue 1px solid; wid 阅读全文
posted @ 2022-09-19 12:24 lwx_R 阅读(408) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/hellocd/p/10443237.html 阅读全文
posted @ 2022-09-19 12:14 lwx_R 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 1.在父元素使用 display: flex; justify-content: center; align-items: center 其中justify-content是左右居中,align-items是上下居中 阅读全文
posted @ 2022-09-19 12:04 lwx_R 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1.在子元素使用display:inline-block 注意子元素宽度加上边距不能超过父元素宽度,否则就在下一行展示 <style> #back{ border: red solid 1px; width: 800px; height: 500px; } #back div{ border: bl 阅读全文
posted @ 2022-09-19 11:52 lwx_R 阅读(216) 评论(0) 推荐(0) 编辑
摘要: int singleNumber(vector<int>& nums) { int l=nums.size(); sort(nums.begin(),nums.end()); if(l==1){ return nums[0]; } for(int i=0;i<l;i++){ //cout<<nums 阅读全文
posted @ 2022-09-16 13:59 lwx_R 阅读(9) 评论(0) 推荐(0) 编辑
摘要: uint32_t reverseBits(uint32_t n) { long ans=0; //从第一位算,计算完移位 for(int i=31;i>=0;i--){ if(n&1){ ans=ans+pow(2,i); } n=n>>1; } return ans; } 阅读全文
posted @ 2022-09-16 13:58 lwx_R 阅读(16) 评论(0) 推荐(0) 编辑
摘要: /* 使用 n & 1 得到二进制末尾是否为 1; 把 n 右移 1 位,直至结束。 */ int hammingWeight(uint32_t n) { int ans=0; for(int i=0;i<32;i++){ if(n&1){ ans++; } n=n>>1; } return ans 阅读全文
posted @ 2022-09-16 13:58 lwx_R 阅读(15) 评论(0) 推荐(0) 编辑
摘要: //如果 n 是正整数并且 n & (n - 1) = 0那么 n 就是 2 的幂 //如果 n 是正整数并且 n \& (-n) = n,那么 n 就是 2 的幂。 bool isPowerOfTwo(int n) { if(n<=0){ return false; }else{ if((n&(n 阅读全文
posted @ 2022-09-16 13:57 lwx_R 阅读(11) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 43 下一页