之前使用Hexo
(https://sogrey.github.io/ github)和jekyll
(http://sogrey.gitee.io/ gitee(私有仓库))搭建过个人博客,这次选择Hugo
试试。
之前使用Hexo
(https://sogrey.github.io/ github)和jekyll
(http://sogrey.gitee.io/ gitee(私有仓库))搭建过个人博客,这次选择Hugo
试试。
由于项目需求,需要开发组件化App,开发过程中遇到些问题,特此记录,以防再遇。
Compilation is not supported for following modules: module1, module2, module3. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.
提示以上信息,当然其中的module1, module2, module3
是我举例,实际会报告项目中的mudule
的名字。
Then you should go to File
-> Invalidate Caches / Restart
-> Invalidate Caches & Restart
.
Then try to build the application again.
Click on the button:Sync Project with Gradle Files
1- close the project
2- close Android Studio
IDE
3- delete the .idea
directory
4- delete all .iml
files
5- open Android Studio
IDE and import the project
本地git bash 使用git clone git@github.com:***.git
方式下载github代码至本地时需要依赖ssh key,遇到权限不足问题时一般都是SSH key失效或者SSH key不存在,重新创建SSH key一般就可以解决问题;
一般我们在调试javascript代码时常用的调试方法有:console日志和借助浏览器断点调试。
今遇到要调试node.js。Nodejs提供了一个内建调试器来帮助开发者调试应用程序。想要开启调试器我们需要在代码中加入debugger标签,当Nodejs执行到debugger标签时会自动暂停(debugger标签相当于在代码中开启一个断点)。
先看下几个命令的 说明:
Stepping
cont
, c
- Continue execution 继续执行,直到遇到下一个断点next
, n
- Step next 单步执行step
, s
- Step in 单步执行并进入函数out
, o
- Step out 从函数中步出pause
- Pause running code (like pause button in Developer Tools)Breakpoints
setBreakpoint()
, sb()
- Set breakpoint on current line 当前行设置断点setBreakpoint(line)
, sb(line)
- Set breakpoint on specific line 在特定行上设置断点setBreakpoint('fn()')
, sb(...)
- Set breakpoint on a first statement in functions body 在函数f的第一行设置断点setBreakpoint('script.js', 1)
, sb(...)
- Set breakpoint on first line of script.js
在 script.js 的第20行设置断点clearBreakpoint('script.js', 1)
, cb(...)
- Clear breakpoint in script.js
on line 1 清除断点Information
backtrace
, bt
- Print backtrace of current execution frame 显示当前的调用栈list(5)
- List scripts source code with 5 line context (5 lines before and after) 显示当前执行到的前后5行代码watch(expr)
- Add expression to watch list 把表达式 expr 加入监视列表unwatch(expr)
- Remove expression from watch list 把表达式 expr 从监视列表移除watchers
- List all watchers and their values (automatically listed on each breakpoint) 显示监视列表中所有的表达式和值repl
- Open debugger’s repl for evaluation in debugging script’s context 在当前上下文打开即时求值环境exec expr
- Execute an expression in debugging script’s context 在调试脚本的上下文中执行表达式Execution control
run
- Run script (automatically runs on debugger’s start) 执行脚本,在第一行暂停restart
- Restart script 重新执行脚本kill
- Kill script 终止当前执行的脚本Various
scripts
- List all loaded scripts 显示当前已加载的所有脚本version
- Display V8’s version 显示v8版本这个问题遇到过好几次,起初是在开发Android是adb端口被占用,就连360都曾占用过;特此记录:
这次是 35729
被占用了,看操作:
1 . 查看占用端口的进程PID
1 | netstat -ano|findstr 35729 # 35729是我这边被占用的端口,你根据自己的情况下而定。 |
输出如下:1
2
3
4
5
6E:\workspace\VSCode\three.js\Three.js-start (master -> origin)
λ netstat -ano|findstr 35729
TCP 0.0.0.0:35729 0.0.0.0:0 LISTENING 8084
TCP [::]:35729 [::]:0 LISTENING 8084
TCP [::1]:10082 [::1]:35729 ESTABLISHED 10804
TCP [::1]:35729 [::1]:10082 ESTABLISHED 8084
2 . 看到 35729
端口的 PID 是 8084
,通过PID查看所有进程,看看谁在作祟
1 | tasklist /fi "PID eq 8084" |
1 | E:\workspace\VSCode\three.js\Three.js-start (master -> origin) |
3 . PID,干掉它:
1 | taskkill /pid 8084 /f |
1 | E:\workspace\VSCode\three.js\Three.js-start (master -> origin) |
完工。
Console 对象用于 JavaScript 调试。
JavaScript 原生中默认是没有 Console 对象,这是宿主对象(也就是游览器)提供的内置对象。 用于访问调试控制台, 在不同的浏览器里效果可能不同。
Console 对象常见的两个用途:
在windows 上:
从https://github.com/soimort/you-get/releases/latest下载,解压后在cmd中切换至目录下执行you-get即可
安装python,执行
1 | $ pip3 install you-get #安装 |
下载ffmpeg从ffmpeg.org并添加到PATH
即可在任意目录下使用you-get
1 | Usage: you-get [OPTION]... [URL]... |
默认情况下,下载最高清晰度视频
输入任意内容如:you-get “i love china” 可以从Google内搜索并下载视频,youtube-dl也有类似功能
bug地址:https://github.com/soimort/you-get/issues
-c和-p参数非常好用