
工作
twglinda
android中级工程师
展开
-
计算蓝牙信号计算距离rssi
public double rssiTodistance(int rssi) { int rssiM = Math.abs(rssi); // 发射端和接收端相隔1米时的信号强度 int Amount = 59; // 环境噪声衰减因子 double n = 2.0; double power = (rssiM- Amount ) / (10 * n...原创 2020-01-08 22:12:53 · 1601 阅读 · 0 评论 -
Push to origin/master was rejected解决
androidstudio 提价代码是提示Push to origin/master was rejected解决方法是在项目目录下如下操作:1.Git Bash 命令到项目目录下git pull origin master --allow-unrelated-historiesgit push -u origin master -f如果没有提示错误再次push就...原创 2019-12-22 16:02:09 · 203 阅读 · 0 评论 -
查看手机的app的内存
内存泄漏:$adb shell getprop dalvik.vm.heapgrowthlimit 320m$adb shell getprop dalvik.vm.heapsize 512mhttp://huyuxin.top/2017/10/22/memoryleak/转载 2017-12-07 20:36:04 · 709 阅读 · 0 评论 -
android socket长连接
MinaSockethttps://github.com/Jeromeer/MinaSocket转载 2017-12-08 10:14:57 · 330 阅读 · 0 评论 -
cmake处理多源文件目录的方法
http://blog.youkuaiyun.com/a794226986/article/details/18616511总结:https://www.cnblogs.com/Free-Thinker/p/6163315.html转载 2018-01-12 14:56:55 · 2485 阅读 · 0 评论 -
源代码常用网址
https://sourceforge.net/projects/jdnp3/?source=typ_redirectwww.sf.net原创 2018-01-30 21:00:46 · 239 阅读 · 0 评论 -
Service Intent must be explicit
http://blog.youkuaiyun.com/shenzhonglaoxu/article/details/42675287转载 2018-01-24 10:56:44 · 202 阅读 · 0 评论 -
ModBuspoll+Slave模拟modBus通信
https://jingyan.baidu.com/article/39810a2383bafdb636fda6b0.html原创 2018-02-01 00:34:15 · 1306 阅读 · 1 评论 -
studio 统计代码的行数
使用工具: staticstic原创 2018-01-24 19:31:25 · 391 阅读 · 0 评论 -
retrofit2.0 解析string
public class StringConverterFactory extends Converter.Factory { public static StringConverterFactory create() { return new StringConverterFactory(); } public Converter responseBod原创 2017-12-07 16:05:42 · 564 阅读 · 0 评论 -
Android沉浸式状态栏SystemBarTint
http://blog.youkuaiyun.com/hwe_xc/article/details/50553758转载 2017-10-15 00:44:17 · 279 阅读 · 0 评论 -
json, recyclerView问题
springMVC:The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and原创 2017-12-15 08:43:02 · 1940 阅读 · 0 评论 -
android一行代码实现沉浸式布局效果
http://blog.youkuaiyun.com/huangxiaoguo1/article/details/54928446首先要引入statusbaruitl库 compile 'com.jaeger.statusbaruitl:library:1.3.5'1在Activity中一行代码实现: //目的是让状态栏全透明 StatusBarU原创 2017-12-15 08:37:31 · 315 阅读 · 0 评论 -
Recycler表格(excelPanel)
excelPanel:一个二维RecyclerView,它可以加载历史数据。(https://www.ctolib.com/excelPanel.html)地址:https://github.com/zhouchaoyuan/excelPanel转载 2017-12-11 11:54:45 · 899 阅读 · 0 评论 -
Android中应用程序如何获得系统签名权限
有些库的使用条件比较苛刻,要求同一签名的程序才可以获得访问权。此时即便是在AndroidManifest.xml中添加了相应的permission,依旧会得到没有xx访问权限的问题。比如android.permission.ACCESS_SURFACE_FLINGER 。 第一个方法简单点,不过需要在Android系统源码的环境下用make来编译: 1. 在应转载 2017-12-01 19:27:45 · 564 阅读 · 0 评论 -
MPAndroidChart 动态更新
http://blog.youkuaiyun.com/u014136472/article/details/50383454转载 2017-12-09 23:17:26 · 3316 阅读 · 0 评论 -
无法登陆ubuntu系统解决方法
进入ubuntu登陆界面,输入正确的登陆密码,屏幕闪一下,又回到登陆界面,无法登陆到系统解决方法: 按--键,通过console进入系统,删除home目录下的.Xauthor*文件:root@kevin:/home# find -name .Xauthor* ./twg123/.Xauthority-c ./twg123/.X原创 2017-10-25 23:33:22 · 1023 阅读 · 0 评论 -
Android 程序员必须掌握的三种自动化测试方法
http://blog.youkuaiyun.com/whatnamecaniuse/article/details/52451782http://blog.desmondyao.com/android-test/http://www.cnblogs.com/muxinyue/p/4301678.html1.智慧农业app:http://os-android.liqucn.转载 2017-10-16 20:49:14 · 337 阅读 · 0 评论 -
NIO编写Socket服务器
下面程序接收客户端输入一行文本(以“\r\n”)结束,并向客户端回显输入的文本。如果输入的文本是 “get file:xxxx”模式,则把“xxxx” 解析为服务器class path下的一个文件,如果找到该文件,则回显该文件的内容,如果找不到文件,回显文件不能找到的消息。[java] view plain copyimport java.io.IOException; import java....原创 2018-02-08 23:42:14 · 225 阅读 · 0 评论 -
设备二进位浮点算数标准
32位浮点数IEEE754格式: 1位符号位 + 8位指数位 + 23位尾数转换思路:1、计算整数部分的二进制格式;2、计算小数部分的二进制格式;3、位移并计算指数4、合并package com.holon.sample; import java.util.ArrayList; import原创 2018-02-04 22:31:52 · 227 阅读 · 0 评论 -
python2.7.13交叉编译移植到arm
1、linux主机:Ubuntu14.04 2、嵌入式linux内核版本:3.14.26 3、嵌入式硬件:M6GxC Cortex-A7内核 4、交叉编译工具: gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux(arm-linux-gnueabihf-gcc) 步骤:1.官网下载python-2.7.132.进...原创 2018-07-26 17:14:13 · 1708 阅读 · 0 评论 -
卸载python3.4
1、卸载python3.4sudo apt-get remove python3.42、卸载python3.4及其依赖sudo apt-get remove --auto-remove python3.43、清除python3.4sudo apt-get purge python3.4orsudo apt-get purge --auto-remove python3.4...原创 2018-06-29 19:44:56 · 3668 阅读 · 0 评论 -
python-ble开发
https://draapho.github.io/2016/11/15/1616-python-ble/转载 2018-06-10 01:11:44 · 3544 阅读 · 0 评论 -
python 串口工具界面及调试代码
https://gitee.com/jakey.chen/Serial-Tool转载 2018-06-24 23:09:58 · 2970 阅读 · 0 评论 -
PLC 固定时间切换
原创 2018-06-22 11:23:15 · 1120 阅读 · 0 评论 -
蓝牙4.0 BLE 多设备连接
http://www.cnblogs.com/xqxacm/p/7488444.html转载 2018-05-30 16:11:58 · 3035 阅读 · 0 评论 -
andriod 自动配对
https://blog.youkuaiyun.com/qq_25827845/article/details/52997523转载 2018-05-30 14:49:17 · 717 阅读 · 0 评论 -
修改mac地址,防止远程软件过期
https://jingyan.baidu.com/article/597a06432e6833312b5243f3.html转载 2018-06-12 15:54:17 · 383 阅读 · 0 评论 -
修改linux网络ip及配置
https://jingyan.baidu.com/article/76a7e409daca52fc3b6e15e5.html转载 2018-05-25 11:58:15 · 515 阅读 · 0 评论 -
蓝牙BLE4.0服务及特性UUID
https://blog.youkuaiyun.com/zjy323520/article/details/52164025https://blog.youkuaiyun.com/qq_30552993/article/details/51822726(Android BLE最完整的工具类(扫描/连接/读写/通知设备),可以手机与设备进行通讯)...转载 2018-05-04 10:44:13 · 4138 阅读 · 0 评论 -
android studio 不能调试
1.在我们手机上把开发者模式打开,调试打开,依然不能在android studio上调试及debug模式安装app解决方法:在gradle.properties:android.injected.testOnly=false原创 2018-05-03 14:35:57 · 717 阅读 · 0 评论 -
pyserial 16进制接收显示与发送
def hexShow(argv): result = '' hLen = len(argv) for i in xrange(hLen): hvol = ord(argv[i]) hhex = '%02x'%hvol result += hhex+' ' print 'hexShow:',...原创 2018-03-13 21:11:20 · 1886 阅读 · 0 评论 -
字符数组和16进制互换
//字符数组转换16进制public static String bytes2HexString(byte[] b) { String r = ""; for (int i = 0; i String hex = Integer.toHexString(b[i] & 0xFF); if原创 2018-01-30 09:22:17 · 548 阅读 · 0 评论 -
byte[] 转 16进制字符串 及 16进制字符串转int
public class HtoInt { private static final char[] HEX_CHAR = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; public static void main(String[] arts) { // String h...原创 2018-02-09 21:15:21 · 1204 阅读 · 0 评论 -
svn服务器搭建
http://blog.youkuaiyun.com/daobantutu/article/details/60467185转载 2017-10-25 12:22:54 · 156 阅读 · 0 评论 -
RecyclerView baseadapter
RecyclerView 开源Adapter,可以加载更多,但是不能下拉刷新。 可以 头内容布局,多种布局显示,空布局;可以节省70%的代码.确定不能XrecyclerView一起用,XrecyclerView可以下拉刷新,加载更多。 android:id="@+id/swipeLayout" android:layout_width="match原创 2017-11-09 19:43:06 · 286 阅读 · 0 评论 -
TextView 背景设置无效解决
android 的TextView控件,有时设置了背景,但是点击看不到效果,原因是我们在代码里必须给它设置一个点击监听事件,即使是空的监听,也需要设置一个,这样就可以看到设置的背景了。哈哈原创 2017-08-23 10:52:01 · 1635 阅读 · 1 评论 -
JNI日志打印
studio下配置NKD参数:添加 ldLibs "log","z","m" ndk { moduleName "jniTest" ldLibs "log", "z", "m"// abiFilters "armeabi"// abiFilters "armeabi", "armea原创 2017-08-25 14:31:45 · 279 阅读 · 0 评论 -
android Modbus-RTU
Modbus-RTU 相关链接文章:http://download.youkuaiyun.com/download/cmsaint/5500243(安卓ModbusRTU客户端)2013https://github.com/JBInvestments/Modbus-RTU-Serial-for-Android (Modbus-RTU-Serial-for-Android)原创 2017-08-21 22:58:01 · 3280 阅读 · 0 评论 -
Your project contains C++ files but it is not using a supported native build system
http://www.cnblogs.com/qianyukun/p/6405291.html转载 2017-08-11 20:03:53 · 3508 阅读 · 0 评论