class Solution:def funtcion(self,number):h=int(number/100)t=int(number%100/10)z=int(number%10)return 100*z+10*t+h
if __name__=='__main__':solution = Solution()num=123new_num = solution.funtcion(num)print("输入:{}".format(num))print("输出:{}".format(new_num))
二、合并两个数列
class Solution:def function(self,A,B):i,j=0,0lists=[]while i < len(A) and j < len(B):if A[i]<B[j]:lists.append(A[i])i+=1else:lists.append(B[j])j+=1while i < len(A):lists.append(A[i])i+=1while j < len(B):lists.append(B[j])j+=1return listsdef built(self,A,B):A.extend(B)A.sort()return A
if __name__ == '__main__':A=[1,2,3,4]B=[2,4,6,8]solution = Solution()print("输入:{}{}".format(A,B))print("输出:{}".format(solution.function(A,B)))print("使用内置函数:{}".format(solution.built(A,B)))
三、旋转字符串
class Solution:def function(self,S,offset):new_s=Sif len(new_s) > 0:offset = offset % len(new_s)temp = (new_s+new_s)[len(new_s)-offset:2*len(new_s)-offset]for i in range(len(temp)):s[i]= temp[i]return new_s
if __name__ == '__main__':s=["a","b","c","d","e","f","g"]offset = 3solution = Solution()print("输入:s={},off={}".format(s, offset))print("输入:s={}".format(solution.function(s,offset)))
在实际的开发中,我们会使用数据库连接池,但是如果不能很好的理解其中的含义,那么就可以出现生产事故。
HikariPool-1 - Connection is not available, request timed out after 30001ms.当系统的调用量上去,就出现大量这样的连接…
802.11-2020协议学习__专题__TxTime-Calculation__HR/DSSS 16.2.2 PPDU format16.2.2.1 General16.2.2.2 Long PPDU format16.2.2.3 Short PPDU format 16.3.4 HR/DSSS TXTIME calculation PREV: TBD NEXT: TBD 16.2.2 PPDU format
16.2.2.1 General
定…
目录
前言
正文
1.RH850U2A上的原子操作
1.1 Link
1.2 Link generation
1.3 Success in storing
1.4 Failure in storing
1.5 Condition for successful storing
1.6 Loss of the link
1.7 示例代码
2.Spinlock代码分析
2.1 尝试获取Spinlock
2.2 释放Spinlock
…