- 博客(13)
- 收藏
- 关注
原创 android px转dp
public final class UIUtil { public UIUtil() { } public static int dip2px(Context context, double dpValue) { float density = context.getResources().getDisplayMetrics().density; return (int)(dpValue * (double)density + 0.5D); } public static int get
2021-10-17 12:33:30
939
原创 IDEA快捷键
自己总结的一些常用的IDEA快捷键,有需要的拿走: ctrl+shift+alt:多行操作 psvm:生成main()方法; fori:生成for循环; Ctrl+Alt+v:自动补齐返回值类型 ctrl+o:覆写方法 ctrl+i:实现接口中的方法 ctrl+shift+u:大小写转换 CTRL+SHIFT+Z:取消撤销 Alt+Insert:生成构造方法、getter、setter ctrl+y:删除当前行 Ctrl+Shift+J:将选中的行合并成一行 ctrl+g:定位到某一行 Ctrl+Shitf
2021-09-24 16:22:20
145
原创 01.javaweb一个网站如何访问的
检查本机配置文件下有没有域名映射 1.有:直接返回对应ip地址,这个地址中有我们需要访问的web程序可以直接访问 2.没有:去DNS服务器查找 https://archive.apache.org/dist/tomcat/tomcat-9/ Tomcat 源 3.可以配置 tomcat环境变量 4.发布一个web 将文件放在webapp下 ...
2021-09-22 10:39:02
379
原创 快速搭建 docker minio 环境
先上minio 官网地址 https://docs.min.io/ docker 一键搭建 docker run -p 9000:9000 -p 50000:50000 --name minio1 -e “MINIO_ACCESS_KEY=admin” \ -e “MINIO_SECRET_KEY=12345678” -v /mnt/data:/data \ 挂载数据地址 -v /mnt/config:/root/.minio \ 配置文件地址 minio/minio se
2021-09-14 15:30:40
471
原创 js 执行顺序
promise 是微任务 setTimeOut 是宏任务 js 会先处理 promise 的微任务 然后处理 setTImeout 的宏任务
2021-06-16 16:22:55
99
原创 一个很牛逼的填充数组里对象的方法
newsList:new Array(5).fill({}).map(v=>( { categoryName:‘公告’, title:‘6月2号全服不停机跟新公告’, data:‘06/01’ } )) 填充5个 空对象 遍历 再将改对象替换为箭头函数内的内容
2020-10-15 10:32:52
449
1
原创 vue-awesome-swiper
//引用 import { Swiper, SwiperSlide, directive } from ‘vue-awesome-swiper’; import ‘swiper/swiper-bundle.css’ import Swiper2, {Navigation, Pagination} from ‘swiper’; // 这行代码很关键 Swiper2.use([Navigation, Pagination]); // 这行代码很关键 轮播图小圆点没出来,加上这串代码就成了 ...
2020-10-14 22:16:58
171
原创 nodejs登录管理
const mongoose =require(‘mongoose’) const scheama =new mongoose.Schema({ username: {type:String}, password: { type:String, select:false, set(val){ return require(‘bcrypt’).hashSync(val,10) } }, }) module.exports =mongoose.model(‘AdminUser’,scheama) //selec
2020-10-13 20:57:07
270
原创 数据赋值
// this.categories = res.data; this.model=Object.assign({},this.model,res.data) 使用第一种赋值方法会吧服务端返回数据覆盖 res.data会影响到现用数据 第二种方法-this.model+res.data
2020-10-13 08:58:24
566
原创 2020-10-12
const multer=require(‘multer’) const upload=multer({dest: __dirname+’/…/…/uploads’}) app.post(’/admin/api/upload’,upload.single(‘file’),async(req,res)=>{ const file =req.file file.url=http://localhost:3000/uploads/${file.filename} res.send(file) }) 在app
2020-10-12 15:31:36
137
原创 nodejs
module.exports =app =>{ const express =require(‘express’) const router = express.Router({ mergeParams:true }) router.post('/',async(req,res)=>{ const model=await req.Model.create(req.body) res.send(model) }) router.put('/:id',async(req,res)=
2020-10-12 12:32:47
229
原创 jq增删改查
$(function() { // alert(11); // 1. 按下回车 把完整数据 存储到本地存储里面 // 存储的数据格式 var todolist = [{title: “xxx”, done: false}] load(); KaTeX parse error: Expected 'EOF', got '#' at position 3: ("#̲title").on("key…(this).val() === “”) { alert(“请输入您要的操作”); } else { // 先读取
2020-08-22 21:19:30
342
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅