自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

原创 [python] dict 和 Namespace 之间的转换

dict => Namespacedic = dict(a = 1, b = 2)import argparsens = argparse.Namespace(**dic)Namespace => dictdic = vars(ns)https://blog.csdn.net/itnerd/article/details/106243837

2021-07-07 11:41:36 708

原创 os.environ[“CUDA_VISIBLE_DEVICES“]设置GPU不成功

sol:需要在import torch之前先设置os.environ[“CUDA_VISIBLE_DEVICES”] = “6,7”在import之前需要将数据配置好,否则会使用默认GPU 0

2020-12-21 11:27:48 4487 1

原创 springboot shiro拦截返回自定义code

需求:springboot结合shiro,开启端口登录拦截,shiro会自动返回302(记不清了),项目需求要返回自己封装的result,code 401主要借鉴:http://chenrd.com/detail-141.html实现新建类:public class ShiroLoginFilter extends FormAuthenticationFilter { /** * 在访问controller前判断是否登录,返回json,不进行重定向。 * *

2020-12-14 10:48:21 578 1

原创 权限管理shiro

设置接口拦截package com.example.demo.shiro;import org.apache.shiro.spring.web.ShiroFilterFactoryBean;import org.apache.shiro.web.mgt.DefaultWebSecurityManager;import org.springframework.beans.factory.annotation.Qualifier;import org.springframework.context.

2020-11-17 16:20:46 93

转载 今天差点被MySQL单杀了,密码报错无法登录解决办法

https://blog.csdn.net/feisongfeiqin/article/details/50210453感谢大佬!

2020-10-15 17:28:42 59

转载 springboot项目 maven导入,提示not found

项目需要导入导出CSV文件,引入新包Commons-CSV,下划线红线提示not found。sol:重新导入,文章

2020-09-02 10:47:13 772

原创 Vue Springboot Nginx跨域问题

跨域问题分为开发和生产环境开发环境:不需要Nginx前端:在axios封装module.exports = { dev: { // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { '/api': { target: 'http://localhost:1234', changeOrigin: true,

2020-08-26 11:51:08 389

原创 el-menu中文字过长,显示省略号,鼠标悬停显示全文

感觉前端就是花式百度,然后莫名其妙就有一个方法可以了。之前title没法赋值title={{item}},换了一种形式赋值成功<el-menu :default-active="'/index'" class="categories" @select="handleSelect" active-text-color="#BF9C38" style="min-height: 100%;"> <e

2020-08-25 17:36:52 5495 3

原创 vue springboot nginx部署配置遇到的问题

1、路径无法访问(access deny)sol: 查看/var/log/nginx/error.log查看错误原因,没有文件夹访问权限,换地方存放vue build生成的文件2、访问后网页没有内容sol: index.js router中增加 { path: '/', redirect: 'login' },这块属于对Vue没有详细了解,增加重定向跳转3、刷新后提示404sol: 在Nginx的conf文件中增加配置 location/ tr

2020-08-24 15:48:48 263

原创 Aggregation MongoDB踩坑记录

对某些筛选条件进行分页查询,开始每一页的有效data都不足pageSize,最后发现,aggregation 的pipeline是有先后顺序的。错误:agg = Aggregation.newAggregation(Aggregation.skip((curPage - 1) * pageSize), Aggregation.limit(pageSize), Aggregation.match(criteria), project);这样是先找出每一页的data,然后再进行筛选正确:agg =

2020-08-20 15:01:50 375

原创 v-viewer的应用

最近用到了v-viewer,使用方法:main.js中配置import Vue from 'vue'import Viewer from 'v-viewer'import 'viewerjs/dist/viewer.css'Vue.use(Viewer, { defaultOptions: { button: true, navbar: true, title: false, toolbar: false, }})table中配置,因

2020-08-17 14:05:54 1089

原创 Vue项目引用smilesDrawer

Q:项目需要画图,使用smilesDrawer工具包。结合GitHub文档给出的例子,需要改一下,让Vue 引用外部js包。参考链接SOL:index.html 中添加 <script src="https://unpkg.com/smiles-drawer@1.0.10/dist/smiles-drawer.min.js"></script>最终index.html<!DOCTYPE html><html> <head&gt

2020-08-10 17:11:14 529

原创 Vue 可编辑表格 function中更改edit状态,span中不会实时更新

这里写自定义目录标题需求:点击编辑按钮,可编辑表格内容,再次点击,可保存问题:第二次点击edit已取反,但是组件没有相应的跳转变化原因:主要参考了这个链接https://www.cnblogs.com/ckmouse/p/11490604.htmlsol:处理后台数据时,增加edit列code:<template> <div class="app-container"> <el-table :data="MoleDa

2020-08-08 15:29:47 558

原创 [c#]自学c#,完成仓库管理系统笔记四————系统架构之三层架构

大概做了一些功课,最后选择了三层架构的设计方法基本介绍和思路:https://blog.csdn.net/qq_36482772/article/details/77862799因为和之前很多项目的逻辑都非常相似,所以理解起来没有问题配置和依赖添加参考:https://jingyan.baidu.com/article/86f4a73ea9de6037d65269d1.html(博客看...

2019-08-30 12:01:59 928 1

原创 [c#]自学c#,完成仓库管理系统笔记三————文件读写之NPOI

安装:https://blog.csdn.net/lgxrobot/article/details/93966536直接使用nuget

2019-08-28 17:19:55 243

原创 [c#]自学c#,完成仓库管理系统笔记二————数据库连接

在登录界面实现了用户名密码检查,为空时有提示private void Button1_Click(object sender, EventArgs e) { string id = textBox1.Text.Trim().ToString(); string pw = textBox2.Text.Trim().ToString()...

2019-08-23 16:18:36 376

原创 [c#]自学c#,完成仓库管理系统笔记一————前端页面框架

先把前端大概的框架搭起来,美化后面再做。登录:左边空白应该会配公司的图主要功能模块具体数据项等数据库设计完成后再完善灰色是数据库显示块,等待连接数据库成功后可显示相关查询结果先简单搭个前端,下一步先把连接数据库调通了(sqlite),然后就是最重要的系统结构设计和数据库设计了。所有东西都是第一次接触,做个笔记记录自己成长的过程吧...

2019-08-23 11:30:12 1156 1

原创 LeetCode905

https://leetcode.com/problems/sort-array-by-parity/solution1两个指针,相向而行public int[] sortArrayByParity(int[] A) { if (A == null || A.length &lt; 2) { return A; } in...

2018-12-23 15:29:48 88

原创 LeetCode797

题目https://leetcode.com/problems/all-paths-from-source-to-target/Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order.The graph ...

2018-12-21 02:01:29 117

原创 Leetcode86

https://leetcode.com/problems/partition-list/Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the orig...

2018-12-20 04:45:50 80

原创 Leetcode 532

题目:https://leetcode.com/problems/k-diff-pairs-in-an-array/Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined ...

2018-12-20 04:01:46 150

原创 LeetCode873

网址:https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/题目:*A sequence X_1, X_2, …, X_n is fibonacci-like if:n &gt;= 3X_i + X_{i+1} = X_{i+2} for all i + 2 &lt;= nGiven a strict...

2018-12-18 04:53:52 171

原创 313. Super Ugly Number

网址:https://leetcode.com/problems/super-ugly-number/Write a program to find the nth super ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given prime list prim...

2018-12-17 11:57:43 124

原创 LeetCode373

网址:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/题目:You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k.Define a pair (u,v) which consists o...

2018-12-17 11:57:14 135

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除