Mysql无法连接
1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure |
如果出现SSLHandshakeException 可尝试添加&useSSL=false 到mysql连接地址
1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure |
如果出现SSLHandshakeException 可尝试添加&useSSL=false 到mysql连接地址
//进入/system/xbin目录下,查看是否有sqlite3
cd /system/xbin
ls -a | grep sqlite3
//有sqlite3,退回到windows系统
exit
//将sqlite3复制到windows下面
adb -s emulator-5554 pull /system/xbin/sqlite3
mount -o remount,rw /system
//退回到windows系统
exit
//将sqlite3复制到/system/xbin目录下面
adb -s 127.0.0.1:7555 push sqlite3 /system/xbin/
//重新进入MuMu模拟器,确保是root#用户
adb -s 127.0.0.1:7555 shell
// 给sqlite3命令可执行权限
chmod 755 /system/xbin/sqlite3
//重现将/system目录变为只读
mount -o remount,ro /system
1.Glide使用.placeholder()展占位图之后,下载图片之后会缩放一下。这是因为你的展位图跟下载的图片的尺寸不一样,而Glide本身有一个淡入淡出效果的动画来显示加载的图片,这样两张不一样的图片造成图片下载刚开始是占位尺寸之后淡入淡出到实际加载图片大小,只要使用.dontanimate()取消淡入淡出效果即可。
2.Glide加载图片之后,点击本图片跳转到查看图片详情的大图,这时候大图会重新加载。我的产品说两张图一样,为什么要重新加载,呃大哥其实两张尺寸不一样哦!算了实现吧,我第一个想法就是通过.override(500, 500)方法来把大图的尺寸跟原来的尺寸配置一样,这时候确实点击原图不需要重新加载直接显示了大图预览,但是大图预览需要可以拉伸,需要缩放,这时候限定大小的图片就难以实现放大功能,只能在一个500*500的框里进行。最后找到解决方案–> Glide.with(this).load(URL)).override(Target.SIZE_ORIGINAL,Target.SIZE_ORIGINAL).placeholder(R.mipmap.uf_uf).into(imageview);即是直接下载图片的原图,Target.SIZE_ORIGINAL是指图片原图的大小,这样就可以保证图片的一致性,本地和预览界面可以搁置设置。
3.Glide加载图片出现空白问题,问题描述:Recyclerview嵌套Recyclerview时,被嵌套的Recyclerview的适配器Adapter中的图片设置自适应,那么滑动到之前的位置,图片有时显示空白,解决方案是要给Adapter图片设置具体大小,这样glide不会每次都去下载新的图片而是复用之间就有的。
‘com.fivehundredpx:blurringview:1.0.0’
compile’com.github.bumptech.glide:glide:3.7.0’
compile’jp.wasabeef:glide-transformations:2.0.1’
1、如果系统的api在16以上,可以使用系统提供的方法直接处理图片
1 | if (VERSION.SDK_INT > 16) {undefined |
2、 如果Api条件不满足,可以使用如下方法
1 | @SuppressLint("NewApi") |
3、以上方法都存在一个问题,性能较低,下面提供一个C实现
1 | static int* StackBlur(int* pix, int w, int h, int radius) {undefined |
1 | fun RecyclerView.setItemCount( |
1 |
|
1 | public boolean zipFile(String zipFileName, File inputFile) { |
show global variables like ‘%lower_case%’;
1 | +------------------------+-------+ |
此状态为区分大小写
编辑 /etc/mysql/mysql.conf.d/mysqld.cnf
增加 lower_case_table_names=1
再次查看
1 | +------------------------+-------+ |
1 | show session variables where variable_name ='wait_timeout' or variable_name = 'interactive_timeout'; |