To

From Java To Kotlin 2:Kotlin 类型系统与泛型

上期主要分享了 From Java To Kotlin 1 :空安全、扩展、函数、Lambda。 这是 From Java to Kotlin 第二期。 From Java to Kotlin 关键在于 **思维的转变**。 ......
Kotlin 类型 系统 From Java

Git 的SSL certificate problem: unable to get local issuer certificate问题

D:\temp>git clone https://github.com/xxxxxx/yyyyyy.git Cloning into 'yyyyyy'... fatal: unable to access 'https://github.com/xxxxxx/yyyyyy.git/': SSL c ......
certificate problem issuer unable 问题

[LeetCode] 1347. Minimum Number of Steps to Make Two Strings Anagram 制造字母异位词的最小步骤数

You are given two strings of the same length `s` and `t`. In one step you can choose **any character** of `t` and replace it with **another character* ......
字母 LeetCode 步骤 Anagram Minimum

cpp test write content speed to ssd and usual disk respectively 1M,10M,100M rows data,the fact has illustrated the write speed of ssd is 4-5 times faster than usual disk

#include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <thread> #include <uuid/uuid. ......
speed write usual disk respectively

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

这个异常在springboot,是一个常见的异常,我们引入了mybatis依赖,确没有在.yml文件中配置数据源,这次我配置了数据源,但是因为有二个application.yml和application-dev.yml,没有指定yml的环境,在application.yml中添加指定dev即可 ......

[LeetCode] 2460. Apply Operations to an Array

You are given a 0-indexed array nums of size n consisting of non-negative integers. You need to apply n - 1 operations to this array where, in the ith ......
Operations LeetCode Apply Array 2460

git clone 报错 fatal: unable to access ‘仓库地址’: Could not resolve host: xxx

来源:https://blog.csdn.net/liuxinxaut/article/details/121276620 解决方法: 执行以下命令: git config --global http.proxy git config --global --unset http.proxy ......
仓库 resolve 地址 access unable

火山引擎DataLeap的Catalog系统搜索实践(三):Learning to rank与后续工作

Learning to rank Learning to rank主要分为数据收集,离线训练和在线预测三个部分。搜索系统是一个Data-driven system,因此火山引擎DataLeap的Catalog系统设计之初就需要考虑数据收集。收集的数据可以用来评估和提升搜索的效果。数据收集和在线预测前 ......
火山 DataLeap Learning Catalog 引擎

Failed to start docker.service: Unit docker.service not found.

1、卸载docker 2、添加Docker官方的GPG密钥 3、更新源 4、导入证书 5、更新 6、安装docker 7、验证是否安装成功 8、安装docker compose 9、验证是否安装成功 ......
service docker Failed start found

django 自定义FileField upload_to上传路径

def user_directory_path(instance, name): """ clean_data内容: for k ,v in clean_data: K: file V: record1301DL00220230602全部.txt K: name V: record1301DL002 ......
路径 FileField upload_to django upload

数据库管理工具远程连接MySQL实例服务失败Host ... is not allowed to connect to this MySQL server问题。

> MySQL社区版数据库8.0版本 [添加账号、分配权限、删除账号](https://dev.mysql.com/doc/refman/8.0/en/creating-accounts.html) [MySQL安全连接失败问题排查](https://dev.mysql.com/doc/refman ......
MySQL 管理工具 实例 allowed connect

How to Update Kali Linux 2023.1 to Kali Linux 2023.2 | Kali Linux 2023.2

修改源: sudo vim /etc/apt/sources.list 修改为: deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contribdeb-src https://mirrors.ustc.edu.cn/ka ......
Linux 2023 Kali 2023.2 2023.1

nohup execute command,both write info to file and print on console

nohup ./h1 >>write.log |tail -f write.log ......
execute command console nohup write

2023-06-03 Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

运行一个py文件,问题定位到: html=self.get_html(url) soup=BeautifulSoup(html,'lxml') 解决方案:打开cmd,运行下面代码: pip install lxml 等待安装成功,再次运行py文件就不会报这个错了。 ......
requested you features builder install

pandas str to int 批量转换

df[['列名1', '列名2']] = df[['列名1', '列名2']].apply(pd.to_numeric, errors='ignore') pandas.to_numeric补充 用法: pandas.to_numeric(arg, errors=’raise’, downcast ......
pandas int str to

【Pytorch】ValueError: not enough values to unpack (expected 2, got 1)问题解决

在运行开源项目时出现了这个问题,网上很多说删回车或者都改成英文符号,但是我都试了,没用 后来自己摸索出的方法是: 先更改数据集的格式,之前分隔符是`\t`,把数据集中的分隔符改成空格,再把语句中的`\t`也换成空格,然后就不会报错了。 改前: ![image](https://img2023.cnb ......
ValueError expected Pytorch enough values

anaconda运行install命令报错:Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'

运行命令: conda install mpi4py 报错: Retrieving notices: ...working... ERROR conda.notices.fetch:get_channel_notice_response(63): Request error <HTTPSConnec ......

How to fix the for...in loop errors in Python All In One

How to fix the for...in loop errors in Python All In One Python 3 TypeError: string indices must be integers ......
errors Python in loop How

How to check function arguments type in Python All In One

How to check function arguments type in Python All In One Python & argument type check ......
arguments function Python check type

sqlalchemy.orm.exc.DetachedInstanceError: Instanceis not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)

在使用sqlalchemy 的orm时,在一个循环中,如果一开始select时用了session,中间update某条记录后,session被关闭,就会出现对象not bound to a Session的问题. DBSession = sessionmaker(bind=self.engine,e ......

LINQ to SQL

@@sql linq into group LINQ to SQL八大子句 一、LINQ查询子句概述 1.查询(Query)是一组指令,这些指令可以从一个或多个给定的数据源中检索数据,并指定检索结果的数据类型和表现形式。 2.查询表达式是一种查询语法表示的表达式,由一组用类似于SQL的声明性语法编写 ......
LINQ SQL to

How to Find Django ImageField URL

This setup is working for me, maybe it will help you. It is for latest version of Django. Many answers in OS are for older Django versions. URLS: from ......
ImageField Django Find How URL

ssh远程redhat6报错:Unable to negotiate with *.*.*.* port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

报错:Unable to negotiate with *.*.*.* port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss 分析:openssh觉得ssh-rsa加密方式不安全, 直接从8.8开始默认不允许这种 ......
ssh negotiate matching redhat6 ssh-rsa

How to use variable in Python String All In One

How to use the variable in Python String All In One 如何在 Python 字符串中使用变量 Python 字符串插值 All In One Python 字符串中使用变量的 5 种方式 ......
variable Python String How All

How to use Vim copy line and paste line All In One

How to use Vim copy line and paste line All In One 如何使用 Vim 复制行和粘贴行 ......
line paste copy How All

Using platform encoding (Cp1252 actually) to copy filtered resources

[INFO] maven-resources-plugin:2.6:resources (default-resources) @ z-test [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resource ......

ceph使用ipv6部署,创建osd:unable to find any IPv4 address in networks 'x:x::0/64' interfaces

使用 **ipv6** 部署 **ceph** 多节点集群 ceph.conf 配置文件如下: ``` public_network = 2001::0/64 cluster_network = 2001::0/64 ms_bind_ipv6 = true ``` 在进行osd创建时无报错,创建好之 ......
interfaces networks address unable ceph

Bad substitution | unable to access jarfile | Syntax error: "(" unexpected

如果你遇到了以上的问题,首先检查一下 sh 脚本 是否可执行(权限) ls -l 查看(x) 这是罪魁祸首,会引起各种诡异的问题。 如果只有 read write 权限,没有 excute 权限 请授权 chmod 777 *.sh 再考虑常规的解决办法。 验证是否可执行可以./ + Tab 会列出 ......
quot substitution unexpected jarfile access

【Python】 auto-py-to-exe模块_图形化程序打包

auto-py-to-exe 图形化程序打包 安装 pip install auto-py-to-exe 执行 # 命令行输入 auto-py-to-exe 图形界面 < 选择好python文件之后点击convert .py to .exe 就可以进行打包了> ......
auto-py-to-exe 模块 图形 程序 Python

TortoiseSVN Update to revision

一个文件有多个历史版本,当你想要恢复到某一版本时: 第一种:恢复到HEAD 第二种:恢复到指定的Revision 点击Show log 查看 revision 号 填写 revision 号 ......
TortoiseSVN revision Update to