- 博客(226)
- 资源 (21)
- 收藏
- 关注
原创 python使用requests模拟multipart/form-data请求
# python使用requests模拟multipart/form-data请求模拟multipart/form-data请求,会遇到:*Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7RgPwjW5Gf1JZ9SX*的情况。以下使用库 **requests_toolbelt** 实现安装```powershellpip install requests_toolbelt```下面是简单的请求示例
2024-09-05 15:13:15 260
原创 python 加了try except之后如何打印报错信息
当你运行这段代码时,如果发生异常,traceback.print_exc()会打印出错误信息,包括错误类型、错误消息和错误发生的位置。这样你就可以根据错误信息找到并修复问题。在Python中,如果你加了try…except但不知道错误在哪一行发生,可以在except块中使用traceback模块打印出错误信息。
2024-06-19 15:29:42 416
原创 Swift 5 数组如何获取集合的索引和对应的元素值
值得注意的是,使用enumerated()方法获得的索引默认从0开始。如果你想从一个非零索引开始,可以通过传递一个参数到enumerated()方法中来指定起始索引。在Swift 5中,你可以使用enumerated()方法来获取集合的索引和对应的元素值。在上述示例中,我们使用了enumerated()方法来遍历数组array的每个元素。在这个示例中,我们使用了enumerated(startingFrom: 1)来指定索引从1开始。这样,输出的索引值会从1开始递增。
2023-08-10 11:23:20 1835
原创 golang1.18+ go mod 导入本地包
golang 1.11+ 加入了go mod来替代GOPATH,传统的go项目需要将包导入到$GOPATH/src目录下,比较麻烦。golang1.18+ go.work文件。
2023-06-06 20:30:00 1694
原创 【Cocoapods】遇到 undefined method `targets‘ for nil:nilclass 的问题
就会出现undefined methodtargets’ for nil:NilClass`的提示,提示:targets找不到了。看到这个警告一般会在Podfile的最底部添加以下代码:会报错。但是在新版本cocoapods中使用了新特性。老项目删除pods文件夹,执行。
2023-04-23 15:28:25 2243 1
原创 Swift下如何使用#if条件编译
# Swift下如何使用#if条件编译> Swift 不像ObjectC一样,通过定义一个变量,然后使用**#if #endif** 方法。OC代码如下:```objectivec#define USE_IMSDK使用#if USE_IMSDK//其他代码#endif```## Swift如果想和OC一样使用,需要设置一下才能使用。1、点击项目**targets**,点击**build setting**,搜索 **Swift Compiler Custom Flags**设
2023-02-16 11:33:07 711
原创 iOS上架审核之IDFA以及审核被拒问题
# iOS上架审核之IDFA以及审核被拒问题We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are still unable to locate the App Tracking Transparency permission request when
2022-12-08 10:52:47 2343
原创 App Store上架出现“二进制文件无效“的处理方法
# App Store上架出现"二进制文件无效"的处理方法App Store上架点击审核之后,出现**二进制文件无效**,最后发现是Analyze设成了debug模式。![在这里插入图片描述](https://img-blog.csdnimg.cn/8d6ace5bc6a6439791a12b9ccf77f489.png#pic_center)解决方法:第一步:Product ---->Scheme---->editScheme,![在这里插入图片描述](https://img-blog
2022-11-30 10:29:24 2916 2
原创 uni-app使用slot插槽的不生效的问题
# uni-app使用slot插槽不生效的问题> slot 元素作为组件模板之中的内容分发插槽。 元素自身将被替换。详情看vue 官方文档最近使用z-paging的demo时,遇到了slot使用不能生效的问题。```css ```## 解决思路如下:查看问题:slot 一直未编译,最后发
2022-09-14 12:38:25 3355
原创 【uniapp】onPullDownRefresh触发多次的解决方法
# 在uniapp中onPullDownRefresh触发多次的解决方法由于在uniapp中onPullDownRefresh触发多次的,多次下拉会导致圆圈一直再转,而不消失。pages.json文件 enablePullDownRefresh 一定要设置为**true**,才可以执行刷新的操作。```css { "path": "pages/business/demo", "style": { "navigationBarTitleText": "测试",
2022-09-13 19:02:23 2252
原创 vue-echarts出现Uncaught TypeError: Cannot read property ‘dispatchAction‘ of undefined
# vue-echarts出现Uncaught TypeError: Cannot read property 'dispatchAction' of undefined在vue项目中,使用自动展示的功能,能运行,但是一直报错*Uncaught TypeError: Cannot read property 'dispatchAction' of undefined*。虽然可以运行,一直打印错误看着挺闹心的。试了好久找了解决办法。# 报错代码实现部分摘录播放代码实现:```javascript
2022-08-29 16:24:45 507
原创 SpringBoot2.x+MybatisPlus+HikariCP多数据源动态配置
# SpringBoot2.x+MybatisPlus+HikariCP多数据源动态配置>环境>SpringBoot 2.7.0>MybatisPlus 3.5.2> [项目源码地址](https://gitee.com/248048936/SpringBootDemos/tree/master/DynamicMultiDatabase)
2022-08-12 18:30:00 997
原创 canal.deployer-1.1.6 遇到dump address has an error, retrying. caused by问题
# canal.deployer-1.1.6 遇到dump address has an error, retrying. caused by问题canal.deployer-1.1.6 遇到 dump address has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=114
2022-07-19 16:15:44 952
原创 mysql-connector-java-下载地址
# mysql-connector-java-下载地址mysql-connector-java-5.1.46-bin.jarmysql-connector-java-5.1.47-bin.jarmysql-connector-java-5.1.48-bin.jarmysql-connector-java-5.1.49-bin.jar[官方下载地址](https://downloads.mysql.com/archives/c-j/)下载步骤如下:1、打开网址[官方下载地址](https
2022-07-12 17:39:32 4228
原创 vue动态加载js和css以及部分页面加载特定的js和css
# vue动态加载js和css以及部分页面加载特定的js和cssvue项目第一次加载很慢的,发现在第一次加载要很大的js导致卡顿、可以使用cdn加速和其他gzip方式效果不是很明显。因此考虑每个页面动态加载js和css的方式来解决。## 第一种方式 直接在index.html直接引入js和css> 注意这种方式,第一次加载大量js会很慢、很慢、很慢!```html ......
2022-07-06 11:22:20 8354
原创 springboot遇到java.sql.SQLSyntaxErrorException: Unknown database问题
springboot遇到java.sql.SQLSyntaxErrorException: Unknown database问题## java.sql.SQLSyntaxErrorException: Unknown database 'springboot'```bashERROR o.a.c.c.C.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in
2022-07-01 10:30:22 1479
原创 Vue动态组件Component的:is命名规则以及简单实现
# Vue动态组件Component的:is命名规则以及简单实现* 当组件使用**短横线分隔命名** (kebab-case) 定义一个组件为**my-component-name**时,你在引用这个自定义元素时也必须使用 kebab-case,则必须使用**my-component-name**引用组件。vue3 不能使用短横线* 当组件使用 **帕斯卡命名法**(PascalCase)组件命名MyComponentName,**my-component-name** 、**myComponen
2022-06-22 12:00:22 2326
原创 SpringBoot2.x简单实现定时任务功能
# SpringBoot2.x简单实现定时任务功能## 1、新建一个SpringBoot项目可以使用[https://start.spring.io/](https://start.spring.io/)快速新建一个SpringBoot项目。> 本教程使用的是2.7.4版本## 2、启动类启用定时在启动类上面加上@EnableScheduling即可开启定时```java@EnableScheduling@SpringBootApplicationpublic class Can
2022-06-16 15:45:45 212
原创 解决Could not find a declaration file for module ‘vue-xxx‘问题
# 解决Could not find a declaration file for module 'vue-xxx'问题Could not find a declaration file for module 'vue-json-pretty'. '/Users/apple/Desktop/workspace/H5/vue/packapp/node_modules/vue-json-pretty/lib/vue-json-pretty.js' implicitly has an 'any' type.
2022-05-02 22:33:36 6638 2
原创 Failed to execute script ‘first‘ due to unhandled exception:cannot import name问题
pyinstaller 打成exe,遇到Failed to execute script 'first' due to unhandled exception:cannot import name问题.Failed to execute script 'first' due to unhandled exception:cannot import name 'recordclient' from 'recordtool' (unknown location)
2022-05-01 15:21:02 7837
原创 遇到/bin/sh: mysql_config: command not found的问题
# 遇到/bin/sh: mysql_config: command not found的问题在执行 pip install mysqlclient的时候出现以下错误:/bin/sh: mysql_config: command not found/bin/sh: mariadb_config: command not found/bin/sh: mysql_config: command not found```bash/bin/sh: mysql_config: command not
2022-04-28 11:30:22 6808 2
原创 遇到ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’问题
遇到ImportError: cannot import name ‘soft_unicode’ from 'markupsafe’问题
2022-04-27 17:21:32 15696 10
原创 iOS获取设备唯一标识和UUID方案
# iOS获取设备唯一标识和UUID方案以下获取**uuidString**的方法,每次重启都会改变。```swiftUIDevice.current.identifierForVendor?.uuidString``` 但是项目的要求是不变,并且删除app 只有也有有保留的需求。显然这个无法满足我们的需求。## 使用KeyChain解决> 来了解一下一KeyChain。keychain(钥匙串)存储在iOS系统中,并且恢复iPhone会使keychain的内容也恢复.但是删除App是
2022-03-10 18:10:44 1379
原创 Springboot实战之spring-boot-starter-data-elasticsearch搭建ES搜索接口
Springboot实战之spring-boot-starter-data-elasticsearch搭建ES搜索接口
2022-03-09 13:59:01 3212
原创 【iOS开发】dyld: Symbol not found: ___chkstk_darwin 问题解决
【iOS开发】dyld: Symbol not found: ___chkstk_darwin 问题解决Xcode 13.2.1 运行到iOS12.x版本上崩溃报错如下:dyld: Symbol not found: ___chkstk_darwindyld: Symbol not found: ___chkstk_darwin Referenced from: /private/var/containers/Bundle/Application/A424CEFD-51DB-450E-9D62-B8
2022-03-01 18:09:57 5865 2
原创 【iOS开发】CMSampleBuffer 和 UIImage 相互转换
iOS CMSampleBuffer 转换 UIImageCMSampleBuffer 转换 UIImage第一种方法: /// Convert CMSampleBuffer to UIImage func WM_FUNC_sampleBufferToImage(_ sampleBuffer:CMSampleBuffer) -> UIImage { let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffe
2022-02-22 18:05:39 2865
原创 canal-adapter出现com.alibaba.druid.pool.DruidDataSource errorCode 0, state 08S01的问题
环境:系统:Ubuntu 20.04数据库:MySQL5.7.37canal-adapter:1.1.15出现问题 ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:mysql://127.0.0.1:3306/canal_test?useUnicode=true, errorCode 0, state 08S01com.mysql.jdbc.exceptions.j.
2022-02-18 13:40:58 1683
原创 MySql5.7出现ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘的问题
MySQL5.7.37 修改canal密码时候,使用update user set password=password('canal') where user='canal';出现了ERROR 1054 (42S22): Unknown column ‘password’ in 'field list’的问题系统:Ubuntu20.04mysql> update user set password=password('canal') where user='canal';ERROR 1054
2022-02-18 11:58:27 1880
原创 canal 启动遇到error while reading from client socket java.io.IOException: Received error packet:
canal 启动遇到error while reading from client socketjava.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file的问题canal server 对应的是 canal-deployer使用 tail -f canal_server/l
2022-02-18 10:25:14 1377
原创 Ubuntu遇到W: GPG error: The following signatures couldn‘t be verified问题
Ubuntu遇到W: GPG error: The following signatures couldn’t be verified问题如下:W: GPG error: http://repo.mysql.com/apt/ubuntu bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29解决方
2022-02-17 14:11:04 5220 3
原创 Ubuntu出现dpkg: error processing package mysql-community-server (--configure):问题
Ubuntu出现dpkg: error processing package mysql-community-server (–configure):问题无论使用 sudo apt upgrade 还是 sudo apt autoremove 问题依旧。使用mysql deb包安装出错sudo apt upgradeReading package lists... DoneBuilding dependency treeReading state information... DoneCalc
2022-02-17 13:35:36 6157 1
原创 Ubuntu 遇到 bin/stop.sh: 52: kill: No such process和bin/stop.sh: 58: [: unexpected operator的问题
Ubuntu 遇到 bin/stop.sh: 52: kill: No such process和bin/stop.sh: 58: [: unexpected operator的问题bin/stop.sh: 47: [: 25893: unexpected operator-e ubuntu01: stopping canal 25893 ...bin/stop.sh: 52: kill: No such processbin/stop.sh: 58: [: unexpected operator
2022-02-16 16:03:10 2125
原创 SwiftUI界面显示预览窗口的两种方式
# SwiftUI界面显示预览窗口的两种方式## 1.在“project”导航器中,随便选择一个使用SwiftUI的文件,然后选择“Editor”>“Canvas”。
2022-01-17 18:13:42 5016
原创 Python Chrome 96版本以上获取cookie
Python Chrome 96版本以上获取cookieChrome96版本更新之后,chookie的位置变更,导致获取不到cookie的值。
2022-01-17 15:20:06 606
原创 mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?
修复 mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?出现问题 not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?no
2022-01-15 22:04:36 3019 3
原创 js中function函数的特殊用法
先科普一下,在看下面代码就不会疑惑Function每个 JavaScript 函数实际上都是一个 Function 对象。运行 (function(){}).constructor === Function // true 便可以得到这个结论。构造函数Function 构造函数创建一个新的 Function 对象。直接调用此构造函数可用动态创建函数,但会遇到和 eval 类似的的安全问题和(相对较小的)性能问题。然而,与 eval 不同的是,Function 创建的函数只能在全局作用域中运行。一开
2021-11-23 18:00:48 4068 1
原创 开始创建第一个npm的微信小程序项目
微信小程序-第一个npm项目创建简单的创建方式1、微信开发工具正常流程新建小程序2、在根目录添加package.json文件{ "name": "master_weapp", "version": "1.0.0", "description": "", "main": "index.js", "scripts": {}, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@
2021-11-18 14:07:03 302
103976个英语单词库(sql版,csv版,Excel版)
2023-09-22
java面试大集合一共485页
2023-08-29
Mounty for NTFS 最新版1.14
2022-06-23
nsis制作 windows 安装程序的工具
2019-10-11
nisedit203-src.zip
2019-10-09
Qt Designer Setup2019-09-28.exe
2019-09-28
Qt Designer 2019-09-27.dmg
2019-09-28
screenshot.zip
2019-09-19
CC301子佩录音盒子二次开发SDK6.9.zip
2019-09-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人