上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: session.query(func.sum(Money.amount)).filter(.....).scalar() 阅读全文
posted @ 2020-12-15 12:24 乱炖er 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: 方案1: 该方案根据实际情况,会出现几种问题,参考:https://www.jianshu.com/p/a5cd3cff2f1b rv.smoothScrollToPosition(position) 方案2: 该方案可以解决方案1中出现的问题,但不是平滑的滚动到指定位置 layoutManager 阅读全文
posted @ 2020-12-11 16:09 乱炖er 阅读(1712) 评论(0) 推荐(0) 编辑
摘要: a = [1,2,3,4,5,6,7,8,9] b = [str(x) for x in a if x%2==1] s = ''.join(b) =>'13579' 阅读全文
posted @ 2020-12-10 17:14 乱炖er 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: 当我们不满足于系统默认的activity动画交互方式,我们可以通过在主题里面,指定activity动画样式来实现自定义交互效果 在style里面定义样式 <style name="DarkTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item 阅读全文
posted @ 2020-12-09 22:40 乱炖er 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 效果截图如下 实现如下 public class FriendsCircleImageLayout extends ViewGroup { /** * 显示的行数 */ private int mColumnCount; /** * 默认间距 */ private final float DEFAU 阅读全文
posted @ 2020-12-03 21:24 乱炖er 阅读(1404) 评论(0) 推荐(0) 编辑
摘要: 方案1: 自定义 layoutmanager public class MyGridLayoutManager extends GridLayoutManager { private boolean isScrollEnabled = true; public MyGridLayoutManager 阅读全文
posted @ 2020-12-03 16:06 乱炖er 阅读(427) 评论(0) 推荐(0) 编辑
摘要: android 关闭软键盘有两种方案 方案1: 建议在 onPause 里调用,或页面有多个 edittext 时按需调用 public static void hideKeyboard(Activity activity){ InputMethodManager imm = (InputMetho 阅读全文
posted @ 2020-12-03 14:57 乱炖er 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: 如果直接使用 Math.pow(x, y) 会有精度丢失问题 该用如下方法即可 (long)(Math.pow(x, t) + 0.5) 必须加上一个小数,然后强转成自己需要的类型,long 或 int 建议小数范围 (0,0.5] 均可 阅读全文
posted @ 2020-12-01 23:49 乱炖er 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1、开启端口(以80端口为例) 方法一: /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT #写入修 阅读全文
posted @ 2020-12-01 21:39 乱炖er 阅读(3719) 评论(0) 推荐(0) 编辑
摘要: 安装 php sudo yum -y install php php-fpm php-json 启动php-fpm服务 #执行以下命令启动php-fpm sudo systemctl start php-fpm #查看php-fpm启动状态 systemctl status php-fpm #查看自 阅读全文
posted @ 2020-12-01 15:48 乱炖er 阅读(333) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页