- 博客(300)
- 收藏
- 关注
原创 MySQL 报错: Subquery returns more than 1 row
MySQL 报错: Subquery returns more than 1 row查询 demoSET @tableNameList := (SELECT id FROM `tableName`);查询多条记录SET @tableNameList := (SELECT GROUP_CONCAT(id) FROM `tableName`);查询数量 LIMIT 1 (仅仅避开...
2019-07-16 16:14:56
4237
原创 error: could not delete '/usr/local/lib/python3.6/site-packages/pip/_internal/configuration.py': Per
brew install python 报错: error: could not delete ‘/usr/local/lib/python3.6/site-packages/pip/_internal/configuration.py’: Permission deniedcd /usr/local && sudo chown -R $(whoami) bin etc in...
2018-05-14 15:44:02
5608
原创 Could not start the julia language server. Make sure the configuration setting julia.executablePath
Could not start the julia language server. Make sure the configuration setting julia.executablePath points to the julia binary.VSCode julia 配置路径:打开julia查看应用程序路径VSCode 中 command + , 打开配...
2018-03-23 17:09:07
4142
1
原创 微信小程序: swiper 的 swiper-item 下 scroll-view 无法滚动
微信开发工具 v1.02.1802080swiper-item 和 scroll-view 及其中间的所有 view 都需要设置 height: 100%;设置具体初始高度: style="height:{{winHeight}}px"如果仍然有问题, 需要设置scroll-view的滚动方向 :scroll-x="false" scroll-y="true"示例代码...
2018-02-14 23:54:08
26858
4
原创 微信小程序: 设置 Button 边框 border
微信开发工具 v1.02.1802080微信小程序自定义 Button 边框 border主要代码: .myButton{ border: 1px solid #70bcf6; border-radius: 2px; background-color: white;}.myButton::after{ border: none; }效果如下:...
2018-02-11 21:30:10
28854
转载 LuaAuxLib 方法
整理自: lua插件中LuaAuxLib调用按键、触摸、找色、找图等功能基本命令触摸命令KeyPress --(virtual_key, 0)=KeyPress --(virtual_key, 1)=KeyDown --(virtual_key, 2)=KeyUpSwipe
2017-09-26 12:33:33
6170
1
原创 IDEA 报错:Can't start Git: /usr/bin/git Probably the path to Git executable is not valid.
IDEA 报错: Can’t start Git: /usr/bin/git Probably the path to Git executable is not valid.错误原因: 打开 IDEA 的 Teminal 就可以看到错误原因: Agreeing to the Xcode/iOS license requires admin privileges, please run “sud
2017-09-25 11:13:30
8772
原创 Mac 端口常用操作
查看某一端口占用lsof -i:9009 9009为要查看的端口号打印结果:COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnode 34825 soindy 15u IPv4 0x9fde46ebada29821 0t0 TCP localhost:pichat (LIST
2017-09-15 14:42:34
5583
原创 Redis 启动报错: Creating Server TCP listening socket *:6379: bind: Address already in use
Redis 启动报错:➜ ~ redis-server44436:M 15 Sep 13:59:39.847 # Creating Server TCP listening socket *:6379: bind: Address already in use原因: Redis已经启动解决: 关掉Redis,重启即可redis-cli shutdownredis-server然后你就能看到Re
2017-09-15 14:14:58
6169
2
原创 R 语言基础知识
R 赋值赋值 :x <- 2console :[1] 2 注: index 从 1 开始向量 (vector)只能包含同一类型的对象 # vector(mode = "logical", length = 0L) (类型,长度)x <- vector("character",length = 4)console :chr [1:4] "" "" "" ""或x1 <- 1:4 cons
2017-07-13 00:15:37
923
1
原创 Mac 通过 Homebrew 安装 R 和 RStudio
Mac 通过 homebrew 安装 R: 安装 homebrew (如果没有) :ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"安装 Rbrew tap homebrew/sciencebrew install r或者 brew install homebrew
2017-07-12 15:45:48
10072
原创 man: can't change directory to '/root': Permission denied
执行 man 命令报错: man: can’t change directory to ‘/root’: Permission denied man: command exited with status 255: sed -e错误原因: 用户权限不够解决办法: 修改用户权限即可
2017-07-12 10:19:23
5949
原创 Mac 通过 SSH 控制 Linux
Linux 配置首先 Linux 安装 SSH :sudo apt install openssh-server修改 SSH 配置 :vim /etc/ssh/sshd_config 添加以下代码 :#PermitRootLogin without-passwordPermitRootLogin yes重启 SSH :systemctl restart sshd查看本地地址ifconfigMac
2017-07-11 16:37:39
868
原创 dpkg: error processing package ***(--install): dependency problems - leaving unconfigured
依赖错误, 安装相应的依赖即可. 或者自动安装缺少依赖:sudo apt install -f
2017-07-11 14:44:19
19579
3
原创 Linux: could not open lock file /var/lib/dpkg/lock -open (13: Permission denied)
报错: could not open lock file /var/lib/dpkg/lock -open (13: Permission denied) Unable to lock the administration directory (/var/lib/dpkg)Permission denied 的话使用sudo执行即可, 比如:sudo apt install -f
2017-07-11 13:43:04
1666
原创 Linux 使用 dpkg 安装 Debian 包
安装一个 Debian 包文件,如你手动下载的文件: dpkg -i file比如:sudo dpkg -i /home/soindy/Downloads/nets.deb
2017-07-11 12:33:04
1301
原创 Linux: sudo 和 su 命令异同
sudo通常 ‘Permission denied’ 错误的时候,需要执行 sudo 命令. 该命令会提高执行权限(通常是 root). 当然 使用 sudo -u username 会指定特定用户. 并不是所有的用户都可以执行 sudo 命令, 只有在 sudoers file 中存在的用户才能执行. 具体请看这里: sudoers file编辑 sudoers file 时建议使用 visud
2017-06-28 10:55:37
17861
原创 MD5 使用 md5sum hash 校验文件完整性与是否被篡改
基本概念MD5算法可以被用来验证文件的完整性和是否被篡改。MD5 全称是报文摘要算法(Message-Digest Algorithm 5),通过对任意长度的信息逐位进行计算,产生一个二进制长度为128位(十六进制长度就是32位)的 hash 值, 不同的文件产生相同的hash的可能性是非常小。md5sum -option filename其中 filename 就是需要校验的文件, option
2017-06-27 15:48:34
11235
原创 在脚本(script)中判断某个命令是否存在
在脚本(script)中判断某个命令是否存在: $ command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }command -v 可以使用 type , hash 或者 which. 但是后三者都有系统限制.具体请看这里: stackoverfl
2017-06-27 14:26:49
2862
原创 文件权限和属性: drwxr-xr-x 具体含义
查看文件属性:r - readw - writex - execute权限:7 = all rights6 = read and write5 = read and execute4 = read only3 = execute and write2 = write only1 = execute only0 = no rights比如: drwxrwxrwx+其中第一位表示文件类
2017-06-26 19:20:01
11054
原创 Linux shell报错: ** is not allowed to run sudo on **
Linux报错: soindy is not allowed to run sudo on localhost错误原因sudoers file 配置错误解决办法确保 sudoers file 配置正确:具体请看这里: 配置sudoers file
2017-06-26 18:42:00
8393
原创 Linux ** is not in the sudoers file. This incident will be reported.
Linux 报错: ** is not in the sudoers file. This incident will be reported.错误原因顾名思义,该用户没有在 sudoers file 里面.解决办法在 sudoers file 里面添加该用户即可:1. 切换到管理员用户su root2. 修改文件权限chmod 777 /etc/sudoers3. 修改 sudoers file
2017-06-26 17:48:00
14267
原创 HTML 界面之间共享数据
HTML 界面之间共享数据: // 存储keyvar loginDataStoreKey = 'App.loginDataStoreKey';// 存储 window.sessionStorage.setItem(loginDataStoreKey, jsonData);// 读取var tempData = window.sessionS
2017-06-14 18:19:25
6979
原创 JavaScript 将 JSON 字符串转换成 JSON 对象的数组
JavaScript 将 JSON 字符串转换成 JSON 对象的数组: var str = '{"id":1,"name":"Test1"},{"id":2,"name":"Test2"}';var jsonObject = $.parseJSON('[' + str + ']');
2017-06-14 18:09:51
571
原创 AngularJS 刷新指令(directive)
Link 函数是工厂方法,只会在编译器第一次匹配到指令时调用一次.需要使用$watch 方法来监听数据(model)的变化.function collapseNav() { var directive = { restrict: 'A', link: link }; return directive; function link(sco
2017-06-14 10:25:47
3158
原创 AngularJS 使用 ng-repeat 为标签设置唯一ID
AngularJS 使用 ng-repeat 为标签设置唯一ID: <li data-ng-repeat="data1 in data.subNaviMenu track by $index"> <a ng-href={{data1.routing}} id="rout-{{$index}}"> <span data-translate={{data1.internation
2017-06-14 10:07:11
4780
原创 EChart 3.0 设置Y轴反转
注意: 这是3.0以后新加的属性!EChart 设置Y轴反转,只需要将 yAxis 的 inverse 设为 true 即可:yAxis : [ { inverse:true, type : 'value' }]效果是这样滴: X 轴会在上面显示,而 X 轴的数据会在下面显示,这样通常比较丑,所有我们把 X 轴和刻度线都隐藏掉:xAxis : [
2017-06-05 15:16:12
10928
原创 ECharts 设置地图(map)值变化颜色(visualMap)
ECharts 设置地图(map)值变化颜色(visualMap):visualMap: { min: 800, max: 50000, inRange: { color: ['lightskyblue','yellow', 'orangered'] } }
2017-06-01 22:32:44
57155
4
原创 ECharts 去掉地图(map)的指示图(visualMap)
ECharts 去掉地图(map)的指示图(visualMap): 只需要将visualMap的show改为false即可(只是隐藏指示,设置的颜色,最大最小值等映射都不会影响): myChart.setOption(option = { visualMap: { show: false } });
2017-06-01 22:20:34
15744
原创 EChart 去掉坐标轴刻度线
EChart 去掉坐标轴刻度线,以Y轴为例,同理X轴:yAxis: { axisTick: { show: false }}效果如下:
2017-05-17 16:06:36
52557
1
原创 EChart 设置折线图圆角
EChart 设置折线图圆角: 只需要在series中设置"barBorderRadius": 0 即可."series": [ { "name": "seriesName", "itemStyle": { "normal": { "barBorderRadius": 0 },
2017-05-12 23:14:51
8948
1
原创 Mac 安装 adb (Android调试桥)
Mac 安装 adb (Android调试桥) 最简单的办法就是通过homebrewhomebrew安装homebrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"安装adbbrew cask install android-platform-tools启
2017-05-12 01:53:15
44433
3
原创 AngularJS 设置img (ng-src 和 src 区别)
AngularJS 使用 ng-src 替换了src :<img ng-src="{{imageUrl}}">错误写法:<img src="http://www.coderlady.com/avatar/{{hash}}"/>正确写法<img ng-src="http://www.coderlady.com/avatar/{{hash}}"/>这是因为在加载页面的时候, 在Angular加载完成之
2017-05-11 00:00:04
25342
原创 JavaScript 判断元素为空(null, undefined, NaN,empty string (""),0,false)
if( value ) {}会判断以下情况: * null * undefined * NaN * empty string (“”) * 0 * false 以上情况包含所有的JavaScript的falsy值.单独判断某种情况的话可以用typeofif( typeof foo !== 'undefined' ) { // foo 为undefined}
2017-05-10 23:40:55
6979
原创 AngularJS 设置元素样式
AngularJS 设置元素样式,代码如下:<div class="panel-body" ng-style="{display: '{{date.display}}'}"> <div ng-style="{height: '{{data.height}}px'}"></div></div>
2017-05-10 23:24:22
4243
原创 Dom’s width & height should be ready before init
EChart 需要提前初始化容器大小. 设置width和height即可
2017-05-10 14:33:41
7398
原创 HTML img 设置border: none; 仍显示边框
上图所示,设置了border: none 仍然有边框,这是因为设置了height 和 weight, 去掉即可. 原理稍后研究~
2017-05-09 13:53:58
9481
原创 URLs are treated as unique security origins.
出于安全考虑,最新版的浏览器默认本地的 XML 已经不能访问本地的XSLT 文件了,不过 HTML 文件仍能访问项目目录下的 CSS 文件.解决办法:只需要本地起个server即可: 1. Python 2.x python -m SimpleHTTPServerPython 3.xpython3 -m http.server然后访问: http://localhost:8000/yourfi
2017-05-04 19:34:29
4313
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人