- 博客(55)
- 资源 (1)
- 收藏
- 关注

原创 [Ubuntu]从开始到编程
1.安装svnsudo apt-get install subversion2.安装flash:sudo apt-get install ubuntu-restricted-extras -y3.安装BeautifulSoup4 方法一:# 下载:http://www.crummy.com/software/BeautifulSoup/bs4/download/4...
2020-07-13 13:52:05
4268
原创 优快云每日一练
试计算在区间1到n的所有整数中,数字x(0≤x≤9)共出现了多少次?例如,在1到11中,即在1,2,3,4,5,6,7,8,9,10,11中,数字1出现了4次。2个整数n,x,之间用一个空格隔开。1个整数,表示x出现的次数。
2022-07-19 15:31:56
751
原创 CSS文本溢出截断省略
原本的样式:<div class="test-text"> <div class="text-content">this is a test, this is a test, this is a text.</div></div>.test-text { width: 130px; background: aliceblue; margin: 200px;}图示:单行文本溢出:.text-content { //
2021-02-02 15:18:14
424
原创 浏览器宽度以及滚动条宽度计算
在获取页面宽度的时候从网上找到如下方法:getClientWidth() { let clientWidth = 0; if (document.body.clientWidth && document.documentElement.clientWidth) { clientWidth = Math.min(document.body.clientWidth, document.documentElement.clientWidth); } else { cl
2020-07-10 15:57:10
2614
1
原创 [IE] 在IE浏览器遇到的兼容问题或者非兼容问题
问题:使用display: flex样式的元素和Chrome上面看到的不太一致解决:需要具体问题具体分析,最终修改成了display: block,对项目样式没有太大影响问题:ES6语法问题,原本项目中已经在使用webpack打包是使用了进行语法转化,但是还是出现了语法问题,最终定位为使用的第三方库query-string的版本为6.+,其语法为ES6解决:降低了query-str...
2020-03-05 11:34:50
385
原创 [IDE] 使用教育邮箱申请免费激活JetBrains
教育邮箱格式:xxx@xxx.edu.*的格式官方 https://www.jetbrains.com/store/?fromMenu#discounts 网页上是免费情况列举,其中包含教师和学生在 https://www.jetbrains.com/zh/student/ 这个页面点击 立即申请填入你的个人信息和edu结尾的教育邮箱填写完毕提交会有以下提示:Thank you!...
2020-02-13 11:01:37
4227
原创 [Ubuntu 18.04]配置Git以及连接Github
配置Git1.安装Git:sudo apt install git2.本地生成ssh key:ssh-keygen -t rsa -C "myname@email.com"默认生成的key在.ssh/id_rsa.pub,可使用cat查看3.在github中添加ssh key:登录github ——> Account Settings ——> SSH Keys ——&...
2020-02-01 21:24:13
1897
原创 [Ubuntu]无法正常启动 报错/dev/sda2:contains a file system with errors.check forced
看到这个链接:https://askubuntu.com/questions/955467/dev-sda1-contains-a-file-system-with-errors-check-forced/955504有一个高赞答案:At the (initramfs) prompt, type fsck -f /dev/sda1 to check/repair your file system...
2019-12-17 09:37:46
3903
原创 python库——ast.literal_eval
参考文献:https://docs.python.org/zh-cn/3/library/ast.htmlhttps://kite.com/python/docs/asthttps://kite.com/python/docs/ast.literal_evalliteral_evalSafely evaluate an expression node or a Unicode o...
2019-12-10 17:03:48
2664
原创 区别clientHeight、offsetHeight、scrollHeight、offsetTop、scrollTop
最近在做组件的过程中遇到滚动在切换过程中没有恢复到顶部,于是发现这几个容易混淆的属性。每个HTML元素都具有clientHeight offsetHeight scrollHeight offsetTop scrollTop 这5个和元素高度、滚动、位置相关的属性,单凭单词很难搞清楚分别代表什么意思之间有什么区别。clientHeight:包括padding但不包括border、水平滚动条、m...
2019-11-25 11:40:47
527
翻译 PEP 8 -- Python编码风格指南 中文版
英文原文:https://www.python.org/dev/peps/pep-0008/PEP:8Title:Style Guide for Python Code––Author:Guido van Rossum 介绍(Introduction)
2019-11-08 16:41:31
435
原创 [Ubuntu]查看文件内容
查看文件内容常用命令:cat, tac, more, less, head, tail, nl,cat 由第一行开始显示文件内容tac 从最后一行开始显示,可以看出 tac 是 cat 的倒着写!more 一页一页的显示文件内容less 与 more 类似,但是比 more 更好的是,他可以往前翻页!head 只看头几行tail 只看尾巴几行nl 显示的时候,同时输出行号!...
2019-11-08 11:06:23
2583
转载 Python time.time()方法
描述(菜鸟教程)Python time time() 返回当前时间的时间戳(1970纪元后经过的浮点秒数)。语法time()方法语法:time.time()
2019-10-16 10:13:38
1506
原创 Rails 表名字符串转换成表的实体对象
查询拿到一个表名,本以为可以直接使用,发现是报错的:NoMethodError: undefined method `all' for "Organization":String然后发现取到的表名是String,于是查询变成了 "Organization".all经过查询发现这样是可以的"Organization".constantize.all一个文档里面这么写:https://...
2019-10-14 12:08:09
222
原创 [ubuntu]Chrome浏览器无法登录Google账号
提示错误:Can't sync to *@gmail.com// 无法同步*@gmail.com把 *.googleapis.com 加入代理即可正常,不是 *.ajax.googleapis.com
2019-09-05 10:39:34
10051
原创 [Ubuntu]Heroku使用
登录:➜ ~ heroku login先要生成一个公钥,使用命令:➜ ~ ssh-keygen -t rsaGenerating public/private rsa key pair....把公钥加入到Heroku:➜ ~ heroku keys:addFound an SSH public key at /home/user/.ssh/id_rsa.pub? Wou...
2019-08-26 14:20:37
830
原创 [Ubuntu]使用DataDog集成跟踪Django项目
DataDog的API_KEY和APP_KEY是自己在页面上可以生成看到的。Github中docker-compose.yml配置:version: "3"# remember to use this compose file __ONLY__ for development/testing purposesservices: # other settings... dda...
2019-03-28 21:29:46
693
原创 [Ubuntu]安装Cmd Markdown
首先解压缩得到4个文件输入:sudo apt-get updatesudo apt-get install apt-filesudo apt updateapt-file search libgconf-2apt-file search libgconf-2-4再运行Cmd_Markdown就可以了...
2019-01-07 21:33:33
1815
原创 Vue.js文档中注意的地方
重新仔细看 Vue.js 文档,发现很多之前没注意的地方,因此记录下来留个印象。在 &amp;amp;amp;amp;amp;amp;lt;template&amp;amp;amp;amp;amp;amp;gt; 元素上使用 v-if 条件渲染分组因为 v-if 是一个指令,所以必须将它添加到一个元素上。但是如果想切换多个元素呢?此时可以把一个 &amp;amp;amp;amp;amp;amp;lt;template&amp;amp;a
2018-12-29 17:24:06
372
转载 ubuntu安装配置aria2
https://blog.youkuaiyun.com/xueyubingfeng1/article/details/81268752
2018-09-14 18:41:38
1116
原创 [Ubuntu] 使用dpkg来安装/卸载deb包
在Ubuntu下,你可以使用 dpkg(Debian package system) 来安装和卸载软件包,安装/卸载软件的最简单办法就是使用 dpkg 。1、使用 dpkg -i 安装 deb 包 语法:➜ ~ dpkg -i package-file-name-i is to install a package.下例为使用dpkg来安装bcloud➜ ~ sudo dp...
2018-09-14 18:40:03
23332
原创 [Ubuntu] Github的使用
github使用:~/mygit$ git status # 查看状态~/mygit$ git add testSocket # 添加~/mygit$ git commit -m 'add for ss' # 提交~/mygit$ git push -u origin master # 上传,加参数-u是远程仓库没有分支~/mygit$ rm huoche_12306/...
2018-09-14 14:58:16
248
原创 打印功能的几种实现方式 [print]
HTML:<iframe frameborder="0" id="printIframebBtn" name="printIframe" style="width:0;height:0;"></iframe>最终版本:$.ajax({ url: '/print/', type: 'GET', xhrFields: { response
2018-09-14 14:49:41
3666
原创 使用 docker compose 开发中出现的问题及解决
主要Error:postgres: address already in use~$ docker-compose upStarting postgres_1 ...Starting postgres_1 ... errorERROR: for postgres_1 Cannot start service postgres: driver failed programming exte...
2018-09-14 14:27:22
5571
转载 python中eval和ast.literal_eval的区别
Python中,如果要将字符串型的list,tuple,dict转变成原有的类型呢?这个时候你自然会想到eval. eval函数在Python中做数据类型的转换还是很有用的。它的作用就是把数据还原成它本身或者是能够转化成的数据类型.string <=> listIn [1]: s = '[1, 2, 3, 4]'In [2]: l = eval(s)In [3]: s...
2018-09-05 11:02:53
10916
原创 [ESLint] 关于eslint使用规则,和各种报错应对书写规则
大部分转载自:http://www.cnblogs.com/nklong/p/7233631.html 另外补充部分原文中没有的。为了方便查看和使用所以进行了整理,以下。“no-alert”: 0,//禁止使用alert confirm prompt“no-array-constructor”: 2,//禁止使用数组构造器“no-bitwise”: 0,//禁止使用按位运算符...
2018-08-21 17:26:05
6238
转载 [ubuntu]安装最新稳定版本的node及npm
背景 通过ubuntu官方apt安装工具安装的node是最新LTS版本的,而本人是个有点强迫症的人,喜欢追求新的东西,也就是想方设法想要去安装最新版本的node,所以本文也就产生了,附上ubuntu安装node和npm的命令行命令:sudo apt install nodejs-legacysudo apt install npm最新版本安装方法 1、安装npmsudo ...
2018-08-07 10:10:18
3370
2
原创 Cookie
js里面有关cookie: setCookie: function setCookie(name, value, survivalTime) { var d = new Date(); d.setTime(d.getTime() + (survivalTime)); var expires = "expires=" + d.toUTCStr...
2018-07-31 17:49:52
147
转载 [Ubuntu] Pycharm打开 脚本报错 Gtk-Message: Failed to load module "canberra-gtk-module"
解决方法:sudo apt-get install libcanberra-gtk-module
2018-07-06 15:25:08
2905
1
转载 Rails中使用flash总结
这个flash与Adobe/Macromedia Flash没有任何关系。 用于在两个actions间传递临时数据,flash中存放的所有数据会在紧接着的下一个action调用后清除。 一般用于传递提示和错误消息。使用示例: controller代码class PostsController < ActionController::Base def create ...
2018-07-03 10:07:06
353
原创 Elasticsearch笔记 [ Kibana ]
原本只是了解内容,然后莫名继续深入深入再深入…然后,还是记录一下吧…Console命令: set max_map_count value (Linux):sudo sysctl -w vm.max_map_count=262144查看版本:curl -X GET "localhost:9200/_cat/nodes?v&h=id,ip,port,v,m"To ch...
2018-06-19 15:58:43
182
原创 [Ubuntu]Git保存用户名和密码
Git保存用户名和密码1、进入Git 配置文件。~$ vim ~/.gitconfig 2、修改配置文件,添加下面这一行。[credential] helper = store 使用的时候,在输入一次用户名和密码之后,就不需要再提交用户名和密码。...
2018-06-08 11:00:12
3511
原创 [Ubuntu]在服务器上部署Jenkins+Python持续集成服务 (Continuous Integration,简称 CI)
首先惯例贴出原文档 —&gt; https://jenkins.io/doc/tutorials/build-a-python-app-with-pyinstaller/
2018-05-24 20:35:34
577
原创 添加弹窗并跳转
$.ajax({ type: 'POST', url: '', data: formData, success: function(response){ if (response.status == 'ok'){ $('.container').prepend('&lt;div id="alertBanne...
2018-05-24 10:54:01
1519
翻译 富文本编辑框:Quill
项目中有一个文本编辑框,研究后觉得甚是神奇,打算整理总结一下。 官方请走这边 —&gt; https://quilljs.com/docs/quickstart/
2018-05-22 16:28:18
1002
转载 在富文本编辑框中复制粘贴时去掉html格式
DOM: document.querySelector("div.pasteEditor").addEventListener("paste", function(e) { e.preventDefault(); var text = e.clipboardData.getData("text/plain"); document.execC...
2018-05-22 11:33:27
9198
2
转载 [Ubuntu]安装 Elastic Beanstalk 命令行界面 (EB CLI)
原汁原味的教程请转向这边 —> https://docs.aws.amazon.com/zh_cn/elasticbeanstalk/latest/dg/eb-cli3-install.html
2018-05-18 18:42:31
478
原创 pip安装django-iprestrict[geoip] 报错:error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
使用pip安装django-iprestrict[geoip]:➜ ~ sudo pip3 install django-iprestrict\[geoip\]...此处省略好多行 Running setup.py bdist_wheel for GeoIP ... error Complete output from command /usr/bin/python3 -u -c ...
2018-05-18 11:28:44
1929
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人