https://leetcode.com/problems/search-in-rotated-sorted-array/ 解法一:本来有序的数组经过rotate后,分成了两部分。以最大值为分割点。通过二分搜索找最大值。然后在[0 , maxi] , 和[maxi + 1 , nums.size() ...
分类:
其他好文 时间:
2020-04-04 00:17:58
阅读次数:
61
原题链接在这里:https://leetcode.com/problems/rotate-string/ 题目: We are given two strings, A and B. A shift on A consists of taking string A and moving the le ...
分类:
其他好文 时间:
2020-03-21 14:31:02
阅读次数:
42
1 //1、先转置 2 //2、第一列与最后一列交换、第二列与倒数第二列交换、... 3 class Solution 4 { 5 public: 6 void rotate(vector<vector<int>>& matrix) 7 { 8 int n = matrix.size(); 9 fo ...
分类:
其他好文 时间:
2020-03-18 18:24:44
阅读次数:
44
这道题只需要搞明白矩阵位置跳转逻辑即可,首选是反着赋值,只花费额外变量存储第一个值即可,然后弄清跳转过程。 class Solution { public: void rotate(vector<vector<int>>& matrix) { if(matrix.empty()&&matrix[0] ...
分类:
其他好文 时间:
2020-03-14 12:48:36
阅读次数:
38
对于小白来说,一个炫酷的装x特效是必不可少的,下面教你5分钟成功装x。 效果图如下: 很简单,首先我们先定义一个ul标签,然后在里面插入li标签,如下: <ul> <li class="top"><img src="C:/Users/User/Desktop/3D-rotate/image/timg ...
分类:
其他好文 时间:
2020-03-09 15:03:01
阅读次数:
56
2D <!-- transform transform:旋转 rotate(30deg); translate值(50px,100px)是从左边元素移动50个像素,并从顶部移动100像素。transform: translate(50px,100px); scale()方法,该元素增加或减少的大小, ...
分类:
其他好文 时间:
2020-03-08 13:47:21
阅读次数:
72
Nginx的日志文件是没有切割(rotate)功能的,但是我们可以写一个脚本来自动切割日志文件。 首先我们要注意两点: 1.切割的日志文件是不重名的,所以需要我们自定义名称,一般就是时间日期做文件名。 2.既然是自动切割日志文件,那当然需要定时任务来进行操作,但是这里还涉及一个问题,Nginx的日志 ...
分类:
其他好文 时间:
2020-02-24 15:21:57
阅读次数:
79
translate()移动坐标,rotate()旋转角度,scale比列 ...
分类:
移动开发 时间:
2020-02-23 18:21:57
阅读次数:
104
浏览器样式前缀 为了让CSS3样式兼容,需要将某些样式加上浏览器前缀: -ms- 兼容IE浏览器-moz- 兼容firefox-o- 兼容opera-webkit- 兼容chrome 和 safari 比如: div { -ms-transform: rotate(30deg); -webkit-t ...
分类:
Web程序 时间:
2020-02-23 18:19:31
阅读次数:
70
CSS3 transform变换 1、translate(x,y) 设置盒子位移2、scale(x,y) 设置盒子缩放3、rotate(deg) 设置盒子旋转4、skew(x-angle,y-angle) 设置盒子斜切5、perspective 设置透视距离6、transform-style fla ...
分类:
Web程序 时间:
2020-02-23 17:53:48
阅读次数:
73