- 最新文章
- 蜗牛下载
- 桃夭下载
- 李夫人下载
-
名字
少游芷榆
-
C++ STL ranges
`C++20`在`STL`库里面提供`ranges`头文件,通过这个可以实现类似`Java`流一样的链式编程:```#include#include#includeintmain(){std::vectorv{1,2,3,4};autoc{v|std::ranges::views::filter([](constauto&i){returni%2==0;})|std::ranges::views::reverse|std::ranges::views::take(1)};for(constauto&x:v){std::cout<<x<<'\n';}std::cout<<"===="<<'\n';for(constauto&x:c){std::cout<<x<<'\n';}return0;}``````g++-std=c++20demo.cpp```
-
Android使用termux模拟Linux环境
最近研究怎么在`Android`上面运行`SpringBoot`项目,发现使用`termux`可以模拟`Linux`环境。参考地址:```https://github.com/termux/termux-app/releaseshttps://mirrors.tuna.tsinghua.edu.cn/help/termux/```##安装`SSH````#查看IPifconfig#安装服务pkginstallopenssh#查看账号whoami#设置密码passwd#启动服务sshd#查看端口(需要root权限)netstat-alt```>默认`ssh`端口`8022`##JDK11下载默认`JDK`版本`17`,其他版本下载:```https://github.com/Hax4us/javahttps://github.com/hfib/openjdk11-termuxhttps://github.com/xiliuya/openjdk11-termuxhttps://github.com/SHivnaTH13/Termux-OpenJDKhttps://github.com/Lzhiyong/te...
-
月季的雨季
今年真的是难受,月季的每一波花期都在连绵的阴雨天里面。其实下一两天雨对月季还是有好处的,但是现在一下就是两三周,上次差不多两个月😂😂😂长时间下雨会带走土壤肥力不说,最麻烦的就是让根系厌氧,然后突然暴晒就容易嗝屁,就算不嗝屁很多嫩叶也会直接焦掉,难受😑😑😑还有各种奇奇怪怪的病😱😱😱来波大图赏一下:![戴维](//static.acgist.com/resources/images/article/202408/d5cffbf4-f246-4945-9963-515f3edb33b5.jpg)![红龙](//static.acgist.com/resources/images/article/202408/c448967d-f249-427e-a536-d9dc4a6ea9d8.jpg)![红龙](//static.acgist.com/resources/images/article/202408/db773926-40f2-4ee8-9d4b-208500cd611e.jpg)![红龙](//static.acgist.com/resources/images/article/202408/...
-
Git重置提交记录
`Git`重置提交记录,删除旧的所有记录重新提交:```#创建空白分支gitcheckout--orphanresetgitadd.gitcommit-m"[+]init"#删除旧的分支gitbranch-Dmaster#修改新的分支gitbranch-mmaster#覆盖远程分支gitpush-foriginmaster```
-
C++泛型
```/data/lifuren/core/src/source/config/Config.cpp:Inlambdafunction:/data/lifuren/core/src/source/config/Config.cpp:90:55:error:expectedprimary-expressionbefore‘>’token90|autox=client.as();|^/data/lifuren/core/src/source/config/Config.cpp:90:57:error:expectedprimary-expressionbefore‘)’token90|autox=client.as();|^/data/lifuren/core/src/source/config/Config.cpp:Inlambdafunction:/data/lifuren/core/src/source/config/Config.cpp:25:55:error:expectedprimary-expressionbefore‘>’token25|conststd::string&vk=...
-
SpringAI Ollama
今天发现原来还有`SpringAI`这个东西,用来和`Ollama`对接非常方便。##ollama```mkdir-p/data/ollamacondacreate--nameollamapython=3.11condaactivateollamacurl-fsSLhttps://ollama.com/install.sh|shollamapullglm4ollamapullquentinz/bge-large-zh-v1.5condadeactivate```##添加依赖```io.springboot.aispring-ai-ollama-spring-boot-starter1.0.3```##测试代码```@TestpublicvoidtestApi(){finalOllamaApiapi=newOllamaApi("http://192.168.8.50:11434");finalOllamaChatClientclient=newOllamaChatClient(api,OllamaOptions.create().withModel("glm4"));finalScannerscanner=ne...
-
SpringBoot3.x学习
`SpringBoot3.x`支持了很多新的特性:`native`/`JDK17`/`WebClient`/`RestClient`/`HTTPInterface`等等。总结一些问题:####`RestClient`乱码```finalRestClientclient=RestClient.builder().baseUrl("https://www.acgist.com").messageConverters((list)->{list.forEach(v->{if(vinstanceofStringHttpMessageConverterx){x.setDefaultCharset(StandardCharsets.UTF_8);}});}).build();```###`WebClient`/`RestClient`/`RestTemplate````@Bean@ConditionalOnMissingBeanRestClient.BuilderrestClientBuilder(RestClientBuilderConfigurerrestClientBuilderConfigurer){...
-
RNNOISE模型训练
#RNNOISE模型训练##环境```sudoaptinstallvimparallelsudoaptinstallbuild-essentialsudoaptinstallpython3python3-pipsudoaptinstallffmpeglibtoolautoconfvim~/.pip/pip.conf---[global]index-url=https://pypi.tuna.tsinghua.edu.cn/simple---pip3installtqdmtorchnumpy```##数据```#提取ffmpeg.exe-i.\source.wav-ar48000-ac1-fs16le-c:apcm_s16lenoise.pcmffmpeg.exe-i.\source.ts-vn-ar48000-ac1-fs16le-c:apcm_s16lenoise.pcm#去掉超过0.4秒的静音ffmpeg-ar48000-ac1-fs16le-inoise.1.pcm-afsilenceremove=stop_periods=-1:stop_duration=0.4:stop_threshold=-60d...
-
C++字面量前后缀
```#自动推导usingnamespacestd::string_literals;autoa="1234"s;#自动推导usingnamespacestd::string_view_literals;autoa="1234"sv;#多行文本R"(acgistacgist)"#u8、u、U、Lchar8_t、char16_t、char32_t、wchar_t```
-
frp配置
#frps```#本地监听bindAddr="0.0.0.0"bindPort=7000vhostHTTPPort=7080vhostHTTPSPort=7443#TLStransport.tls.certFile="/data/project/frp_0.58.1_linux_amd64/certs/server.crt"transport.tls.keyFile="/data/project/frp_0.58.1_linux_amd64/certs/server.key"transport.tls.trustedCaFile="/data/project/frp_0.58.1_linux_amd64/certs/ca.crt"#监控页面webServer.addr="0.0.0.0"webServer.port=7500webServer.user="admin"webServer.password="admin"webServer.tls.certFile="/data/project/frp_0.58.1_linux_amd64/certs/server.crt"webServer.tls.keyFi...
-
openssl命令生成证书
#CA脚本```opensslgenrsa-outca.key2048opensslreq-new-x509-keyca.key-days3650-outca.crt-subj"/C=cn/ST=gd/L=gz/O=acgist/OU=acgist/CN=acgist"```#证书脚本```bashmkdir-p/tmp/servercd/tmp/serverecho"keyUsage=nonRepudiation,digitalSignature,keyEnciphermentextendedKeyUsage=serverAuth,clientAuthsubjectAltName=@SubjectAlternativeName[SubjectAlternativeName]IP.1=127.0.0.1IP.2=192.168.8.188DNS.1=*.acgist.com">server.extopensslgenrsa-outserver.key2048opensslreq-new-keyserver.key-outserver.csr-subj"/C=cn/ST=gd/L=gz/O=acgist/...
-
20240602
##06月02号星期日天气晴今年广州真的是天天都是下雨,下了快一个月了,我的月季都没来及的赏就全部没了。最惨的是连续下了很久的雨,然后突然就晴了,光照太强嫩叶直接就焦了。不过夏天还是雨后的晴天最为惬意,气温不会很高,但是被雨洗过的植物在阳光下显得格外嫩绿。吹着风,看着云,舒服💃💃💃💃💃💃![蓝天白云](//static.acgist.com/resources/images/article/202406/eb726a75-3740-4216-8c46-13c92fea8d84.jpg)![蓝天白云](//static.acgist.com/resources/images/article/202406/1e5b6af5-9163-4e7d-9c90-75a40a3a2cd0.jpg)![](//static.acgist.com/resources/images/article/202406/e06ac29f-4538-4a04-a11e-43fab5022a51.jpg)![](//static.acgist.com/resources/images/article/202406/c516e19...
-
JNI内存释放
不要手动释放:jint、jlong、jchar需要手动释放:jstring、jobject、jobjectArray、jintArray、jclass、jmethodID```FindClassDeleteLocalRefNewStringDeleteLocalRefNewStringUTFDeleteLocalRefNewObjectDeleteLocalRefNewXXXXArrayDeleteLocalRefGetObjectFieldDeleteLocalRefGetObjectClassDeleteLocalRefGetObjectArrayElementDeleteLocalRefGetStringCharsReleaseStringCharsGetStringUTFCharsReleaseStringUTFCharsGetXXXXArrayElementsReleaseXXXXArrayElements``````#入参jstringjProducerIdconstchar*producerId=env->GetStringUTFChars(jProducerId,nullptr);......
-
GraalVM加速启动
```https://github.com/graalvm/graalvm-ce-builds/releases?page=5./bin/guinstallnative-image./bin/guinstall-Lnative-image-installable-svm-java11-linux-amd64-20.2.0.jar./bin/native-image-Dspring.profiles.active=dev-jar./application-1.0.0.jarmvnspring-boot:build-imagemvnnative:compile```参考文章:*https://docs.oracle.com/zh-cn/learn/graalvm-native-image-quick-start/index.html*https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
-
2024年电视剧
惜花芷😂😂😂私藏浪漫:太甜了,晚上睡觉都笑醒💃💃💃💃柳舟记四海重明你比星光美丽少年白马醉春风
-
修复分区
```#格式查看parted-ldf-Th#卸载umount/data#修复分区fsck/dev/mapper/centos-homefsck.ext4/dev/mapper/centos-homexfs_repair-L/dev/mapper/centos-home#重新挂载mount/dev/mapper/centos-home/data``````ls:无法访问/data:输入/输出错误mount:将/dev/mapper/centos-home挂载到/data失败:结构需要清理```
-
git submodule
##添加```gitsubmoduleadd```##同步```gitsubmoduleupdate--init--recursive```##删除```#删除配置.gitmodulesgitconfig-f.gitmodules--remove-sectionsubmodule.#删除配置.git/configgitconfig--remove-sectionsubmodule.#删除目录rm-rf.git/modules/#删除模块gitrm--cached```
-
使用Tomcat部署多个SpringBoot项目减小内存
将多个`SpringBoot`部署到一个`Tomcat`项目中,单个进程减小内存占用。*将所有依赖直接复制到`Tomcat`的`lib`中配置如下:```devtruedev192.168.8.83:8848nacosnacosjar-Xms1024m-Xmx2048m-XX:SurvivorRatio=2org.apache.maven.pluginsmaven-assembly-plugin${pemc.path}/docs/assembly/package.xmlorg.springframework.bootspring-boot-maven-plugin-Dfile.encoding=UTF-8jarjar192.168.8.83:8848nacosnacosjar-Xms1024m-Xmx2048m-XX:SurvivorRatio=2org.apache.maven.pluginsmaven-assembly-plugin${pemc.path}/docs/assembly/package.xmlorg.springframework.bootspring-boot-maven-plugin-D...
-
人工智能
#人工智能整理一些人工智能相关知识##分类*人工智能(AI)*机器学习(ML)*神经网络(NN)*深度学习(DL)##应用*传统任务:回归、分类、聚类*深度学习:机器视觉、自然语言####机器视觉图像分类、物体检测、图像分割等等####自然语言语音识别、机器翻译、自动摘要、观点提取、文本分类、问题回答等等##回归算法####线性回归算法(LinearRegression)####多项式回归算法(PolynomialRegression)##分类算法####邻近算法(KNN)####支持向量机(SVM)####隐马尔可夫模型(HMM)####随机森林算法(RandomForest)####逻辑回归算法(LogisticRegression)####Softmax逻辑回归算法(SoftmaxRegression)##聚类算法####K均值聚类算法(K-Means)####基于密度的聚类算法(DBSCAN)##神经网络算法&深度学习算法&生成网络算法####人工神经网络(ANN)####卷积神经网络(CNN)机器视觉######视觉几何组(VGG)######残差神经网络(ResNet)####循环...
Snail(蜗牛)
基于Java、JavaFX开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。