ICode9

精准搜索请尝试: 精确搜索
  • 爬取狗狗图片2022-05-31 13:34:59

    最近小朋友喜欢狗狗,一个个下载太慢了,还得知道叫什么名字,安排 import requests import json import re from PIL import Image, ImageDraw, ImageFont url = 'https://www.bagong.cn/dog/' response = requests.get(url) decodestr = response.text aIter = re.finditer('

  • [python][flask] Flask 图片上传与下载例子(支持漂亮的拖拽上传)2022-05-31 09:35:31

    目录1、效果预览2、新增逻辑概览3、tuchuang.py 逻辑介绍3.1 图片上传3.2 图片合法检查3.3 图片下载4、__init__.py 逻辑介绍5、upload.html 介绍5.1 upload Jinja 模板介绍5.2 upload css 介绍(虚线框)5.3 upload js 介绍(拖拽)5.3.1 JS 拖拽框架5.3.2 JS 图片上传5.3.3 JS 图片上传

  • vue下载excel2022-05-30 14:04:48

    方法一:后台传入 http({                 url:'/statistical/exportPerson',                 method:'post',                 responseType:'blob',                 params:{                     name:this.name,          

  • 文档内容下载2022-05-30 11:34:29

    /** *下载blob文件 *@param data blob数据 @param filename 文件名 / export function downloadFile(data, filename) { if (!data) { return } const link = document.createElement('a') const blob = new Blob([data], { type: 'application/vnd.ms-excel' }) l

  • 写函数,用户传入修改的文件名,与要修改的内容,执行函数,完成整个文件的批量修改操作。2022-05-29 13:31:17

    """写函数,用户传入修改的文件名,与要修改的内容,执行函数,完成整个文件的批量修改操作。"""import osdef func(filename, old, new): """ :param filename: 要替换内容的文件名 :param old: 要替换的内容 :param new: 准备替换成的内容 :return: """ wit

  • ThinkPHP5.1及以上版本,在Nginx中 4042022-05-28 12:33:02

    nginx服务器部署Thinkphp 5.1框架报404解决方案   在nginx.conf中添加如下代码行 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } 如下图中位置:    或者 phpstudy 伪静态 添加  if (!-e $request_filename) { rewrite ^/(.*)$ /index.

  • laravel-自定义文件上传目录2022-05-27 20:32:59

    1.config/filesystems.php    2.文件上传和删除 //保存到本地 $fileName = $file->store('image', 'tmp'); //删除本地文件Storage::disk('tmp')->delete($fileName);  

  • 利用Python破解SMTP服务器用户名2022-05-26 19:04:16

      1 import socket 2 import optparse 3 import os 4 import sys 5 import termcolor 6 7 class SMTPUserCrack: 8 def __init__(self) -> None: 9 self.target = self.get_params()[0] 10 self.port = self.get_params()[1] 11 s

  • Z-Blog支持ppt一键粘贴2022-05-26 18:00:07

    ​ 如何做到 ueditor批量上传word图片? 1、前端引用代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>

  • Excel模板导出2022-05-26 14:03:48

    核心依赖包 <!-- poi相关依赖包 start --> <dependency> <groupId>opensymphony</groupId> <artifactId>webwork</artifactId> <version>2.2.2</version> </dependenc

  • 实验62022-05-24 23:04:01

    import random n = eval(input('输入抽取数目:')) with open('C:\\Users\\肖鑫\\Desktop\\实验6数据文件\\实验6数据文件\\data5.txt','r',encoding='utf-8') as f: x = [] for line in f: x.append(line.strip('\n�

  • 实验六2022-05-24 15:00:07

    task3 def is_valid(x): if len(x) != 18: return False for i in x: if not (i.isdigit() or i == 'X'): return False else: return True import csv l=[] with open('data3_id.txt', 'r'

  • Spring Boot 通过RestTemplat返回pdf转图片2022-05-24 14:36:11

    Springboot 通过 RestTemplat 返回 pdf转图片 开发环境: java 8 spring boot 2.x 前后端分离 需求:前端发送pdf文件路径来,后端获取文件并返回前端 废话不多说,直接开干 1、引用依赖 <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId>

  • LUA读写ini配置2022-05-23 14:31:56

    --读全部 function load(fileName) assert(type(fileName) == 'string', 'Parameter "fileName" must be a string.'); local file = assert(io.open(fileName, 'r'), 'Error loading file : ' .. fileName); loc

  • 利用Python Sqlite3模块提起Firefox Cookie数据库信息2022-05-22 19:03:55

      由于Firefox利用Sqlite存储各种上网数据,比如表单数据,Cookie数据,历史记录等,因此可用Python第三方模块Sqlite3对数据库进行操作,提取出响应的表的信息。 1 import sqlite3 2 import optparse 3 import sys 4 import os 5 6 class FirefoxCookies: 7 def __init__(se

  • CentOS 的终端中如何搜索文件2022-05-21 15:34:05

    如果需要在当前文件夹中搜索文件,那么可以使用命令: find -name filename #其中 filename 是你需要找的文件或文件夹的名称。我们没有指定搜索文件的路径,默认是当前文件夹。 如果你希望在所有文件夹中查找,那么可以使用命令: find / -name filename #这里的 / 是根目录的意思,当然,你也

  • 利用Python编写测试可以绕过上传文件扩展名限制的工具2022-05-20 17:00:25

      1 import requests 2 import sys 3 import optparse 4 import os 5 6 7 class ExtensionTest: 8 def __init__(self) -> None: 9 self.url = self.get_params()[0] 10 self.filename = self.get_params()[1] 11 self.extension_

  • 用jQuery实现文件上传的方法2022-05-19 17:33:26

    1、利用FormData实现文件上传 <input type="file" id="avatar" name="avatar"> <button type="button">保存</button> ('button').click(function(){ var files = $('#avatar').prop('files

  • 高可用的Spring FTP上传下载工具类2022-05-19 15:35:45

    前言 ftp服务器进行交互关于ftp上传下载的工具类大致有两种。   第一种是单例模式的类。   第二种是另外定义一个Service,直接通过Service来实现ftp的上传下载删除。   这两种感觉都有利弊。   第一种实现了代码复用,但是配置信息全需要写在类中,维护比较复杂。   第二种如

  • 2022-05-192022-05-19 11:33:46

    学习汇报2022-05-19 1 点云数据处理 1.1 预处理 读取pcap文件,保存为pointCloud格式 clc clear close filename= 'D:\leidashuji\LIDAR_0515\01.pcap'; %文件位置 veloReader = velodyneFileReader(filename,"VLP16"); % 读取.pcap文件 ptCloud_original=cell(1,veloReader.N

  • DOS命令2022-05-18 18:03:20

    打开CMD的方式 +系统+命令提示符 Win+R 输入cmd打开控制台 在任意的文件夹下面按住shift+鼠标右键,在此处打开命令行窗口 资源管理器的地址栏前面加上cmd路径,回车进入命令行窗口 注意:cmd后面有一个空格 管理员身份运行 常用Dos命令 盘符切换 查看当前目录下的所

  • 若依 前端框架部署 apache 代替nginx的try_file2022-05-18 18:02:01

    ngin是这样的 location / { try_files $uri $uri/ /index.html; index index.html index.htm; } apache是这样的 <Directory "/www/wwwroot/XXX.com"> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

  • 一个非常简单的加解密程序)2022-05-14 19:03:50

    #include <cstdio> #include <iostream> #include <fstream> #include <string> #include <cstring> using namespace std; const int maxn = 1e5 + 10; char str[maxn]; int main() { string filename; cout << "input

  • python--logging模块记录日志2022-05-07 20:34:51

    import logging import os from logging import handlers class Logger(object): # 日志级别关系映射 level_relations = { 'debug': logging.DEBUG, 'info': logging.INFO, 'warning': logging.WARNING, &#

  • linux解决“/bin/bash^M: bad interpreter“2022-05-07 20:32:24

    linux解决“/bin/bash^M: bad interpreter“ 原因: 在执行shell脚本时提示这样的错误主要是由于shell脚本文件是dos格式,即每一行结尾以\r\n来标识,而unix格式的文件行尾则以\n来标识 解决方法: (1)使用linux命令dos2unix filename,直接把文件转换为unix格式; (2)使用sed命令sed -i "s/\r//"

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有