Karen110 Karen110
4年前
盘点Python列表生成式的三种方法
一、前言列表生成式即ListComprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式。二、案例分析三种方法要生成list\1,2,3,4,5,6,7,8,9,10\可以用list(range(1,11))。print(list(range(1,11)))如果要生成\1x1,2x2
Easter79 Easter79
3年前
SpringBoot2单元测试
引入maven依赖引入powermock是为了解决静态方法mock的问题。<dependency<groupIdorg.powermock</groupId<artifactIdpowermockmodulejunit4</artifactId<versi
Stella981 Stella981
3年前
JavaScript 对象和包装类
对象的创建方法{}varobj{}系统自带的构造函数varobjnewObject()//Array()//Number()自定义的构造函数functionPerson(){}varperson1newPe
Stella981 Stella981
3年前
BigDecimal去除末尾多余的0
Java有自带的stripTrailingZeros()方法用于去除末尾多余的0BigDecimalnumnewBigDecimal("100.000");BigDecimalnumNoEndZeronum.stripTrailingZeros();//numNoEndZero:1E2Sys
Wesley13 Wesley13
3年前
mysql错误:Column ‘id’ in field list is ambiguous的解决方法
\Err\1052Column'modify\_time'inwhereclauseisambiguous出错的语句:SELECTAVG(T.se)%60FROM(SELECTTIMESTAMPDIFF(SECOND,first\_transfer\_time,modify\_time)seFROM
Stella981 Stella981
3年前
JavaScript实现字符串逆置的几种方法
1\.一般来说js实现字符串逆置输出的一般思路是:1、将字符串转为数组,一个字符为数组的一个元素; 2、将数组倒置; 3、再将数组元素拼接为字符串。2\.一般用到的方法有:join():该方法用于把数组中的所有元素放入一个字符串。元素是通过指定的分隔符进行分隔的。 split():将一个字符串分割为子字符串数
Stella981 Stella981
3年前
GitHub访问速度慢的一种优化方法
GitHub是一个面向开源及私有软件项目的托管平台,因为只支持Git作为唯一的版本库格式进行托管,故名GitHub。由于GitHub是一个国外网站,在国内访问速度如何呢?我们通过浏览器访问下https://github.com(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fg