- 博客(8)
- 收藏
- 关注
原创 Linux mysql 8.0.20安装 初始root密码设置
安装 sudo apt install mysql-server sudo apt install mysql-client sudo apt install libmysqlclient-dev 第一次登录 #这里有你需要的用户名和密码 sudo cat /etc/mysql/debian.cnf 进入mysql更改密码 ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘你的密码’; ...
2020-07-18 19:35:53
2157
原创 python 高阶函数map sorted reduce filter的lambda用法
l1=[1,2,3] 1.map() 传入一个函数和一个可迭代对象 遍历对象依次使用传入的函数得到一个map对象 转换为想要的数据结构 def lam(x): return x**x print(list(map(lam,l1))) #lambda print(list(map(lambda x:x**x,l1))) 2.filter() 传入一个函数和一个可迭代对象 遍历对象依次使用传入的函数得到一个filter对象 转换为想要的数据结构 print(list(filter(lambda x:x
2020-06-18 19:19:15
202
原创 Python 知识点
and or 运算 v1 = 1 or 2 # 1 v2 = 1 and 2 # 2 v3 = 0 and 1 and 2 # 0 v4 = 0 and 1 or 2 # 2 v5 = 0 and 1 or 2 or 3 # 2 v6 = 0 or False and 1 # False v=0 and 1 or 2 and 3 or False or True #推导式 --> # (0 and 1) or (2 and 3) or False or T
2020-06-16 00:01:49
207
原创 ubuntu 20.04换源
1.备份源 cd /etc/apt sudo cp sources.list sources.list.bak 2.替换sources.list sudo vi sources.list 阿里云 ubuntu20.04 deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted
2020-06-12 12:22:57
1166
原创 MC个人服务器搭建
1.首先需要一台服务器(废话) 我使用的服务器是阿里云ubuntu18.04 登录进去 ssh root@<你的服务器公网IP> ps:下列的命令提示权限不够前面加sudo就可以了 2.安装java 查看java版本 java -version 我的版本 openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09) OpenJDK 64-Bit Server VM
2020-06-11 20:23:32
1258
原创 jq瀑布流加载防止多次触发
$(window).scroll(function () { var scrollerh = $(document).scrollTop(); var viewbody = $(window).height(); var allbody = $(document).height(); //判断位置 if (scrollerh + viewbody > allbody - 200) {
2020-06-01 09:27:02
267
原创 JQ动态加载点击事件
$('页面中存在的父元素').on('click','需要添加点击事件的元素', function () { console.log('点了一下') }) on()之前的选择器必须存在于页面 on()参数里的元素可以反复删除添加 $('.blog').on('click','.keyword_btn', function () { console.log('点了一下') keyword = $(this).text()
2020-05-26 16:45:59
465
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅