- 博客(85)
- 资源 (10)
- 收藏
- 关注
原创 【NVIDIA NIM 黑客松训练营】利用大模型作词一首
没有GPU,也可以尝试一下NVIDIA提供的免费大模型环境。这里准备的demo调用了3.8B参数的轻量级模型:microsoft/phi-3-mini-4k-instruct, 加上Flask做一个简单的网页调用演示。
2024-10-20 18:05:47
286
原创 Putty反向连接windows远程桌面
用putty命令行效果一样,但是操作putty窗口容易导致反向连接卡死,使用plink工作稳定。执行BAT, 首先查找本地的指定网段的地址,然后连接远程的windows ssh 服务器,最后建立了windows ssh服务器的13389端口到本地的3389端口的反向连接。
2023-11-14 17:27:56
490
原创 almaLinux 8 安装docker报错
无论怎么调整防火墙的规则都无效,原因是nftables不能正确处理规则,需要换回iptables。重新启动docker搞定。
2023-04-10 22:16:30
1913
原创 Selenium操作Chrome的等待
一般会用隐式等待,但是 这个等待只是等待某个元素的可用性webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);元素可用后,未必可操作,比方还在动画中,此时不可点击, 否则会报告错误:org.openqa.selenium.WebDriverException:element click intercepted: Element <button id="submitLogin" type="submit"..
2022-04-22 13:09:31
522
原创 Selenium调用ChromeDriver在headless模式下的NoSuchElementException问题
正常模式下好好的,headless下就不行了,最后用网页截图发现了问题: File scrFile = ((TakesScreenshot)webDriver).getScreenshotAs(OutputType.FILE); // Now you can do whatever you need to do with it, for example copy somewhere FileUtils.copyFile(scrFile, new File("c:\\tmp\\screensh
2022-04-12 20:32:29
956
原创 vc2019 runtime 无法安装的神奇错误
报错:Product: Microsoft Visual C++ 2019 X86 Minimum Runtime - 14.28.29334 -- Error 1402. Could not open key: UNKNOWN\Components\8F139CF91DE936230A1FA8ED33D0E0EC\218A10D01A28F1845864E8829E678FFD. System error 5. Verify that you have sufficient access to...
2021-12-21 20:36:05
5578
1
原创 thinkpad x1 carbon gen 6 无法充电(静电故障?)
突然发现无法通过usb-c 充电,或许后面还会导致电池亏电无法开机,只能通过bios放电临时解决;这次通过更新Intel ThuderBolt 固件解决,后续持续观察。参考文章:联想中国(Lenovo China)联想知识库Lots of Lenovo laptops have USB-C issues, but there's a fix | Windows Central...
2021-12-16 11:38:01
8747
1
原创 HtmlUnit 自动登录的例子
HtmlUnit 是headless/GUI-lessbrowser的一个基于Java的实现,可以用于自动测试和爬虫。支持Javascript自动解析和css,用起来很方便。下面是一个自动登录的例子,其中使用了fiddler的代理,用于debug: String loginUrl = "http://mmcloud.com/login/sso/login"; try ( WebClient webClient = new WebClient(BrowserVersi.
2021-12-01 16:07:25
579
原创 clickhouse的常用引擎
1)Distributed 引擎 这个引擎是为了实现分布式的查询的,另外一个功能就是插入的时候实现Shard(分片) 可以理解为一个特别的视图,用来支持分布查询和分片插入数据。 反应到配置中的就是remote_servers的定义部分,下面的例子定义了三个shard支持分布式查询: <!-- Configuration of clusters that could be used in Distributed tables. https://cli...
2021-11-24 14:40:43
2866
原创 Arduino(avr)之AES-128 CBC加密和解密
Ciphering doesn't match with others generated with Java or Nodejs · Issue #17 · DavyLandman/AESLib · GitHub由于AESLib限制,使用了CBC-NoPadding对应的Arduino代码:#include <AESLib.h>const PROGMEM char HEX_VALUES[] = { '0', '1', '2', '3', '4', '5', '6', '7
2021-11-09 22:09:28
1981
原创 clickhouse-server:20.5.4.40 修改用户配置允许替换null值为默认值
定义表格:CREATE TABLE test( `created_at` DateTime DEFAULT now(), `created_by` Nullable(Int64))ENGINE=TinyLog; 插入数据:insert into test ( created_at,created_by) values(null,null) 在 clickhouse-server:21.9.4.35 版本,上述语句可以正常执行,插入数据:03f1f51b76a
2021-11-03 16:36:22
897
原创 minikube ingress 404 问题
参考一份指南尝试了一下minikube的ingress配置,最后出现404问题:https://awkwardferny.medium.com/getting-started-with-kubernetes-ingress-nginx-on-minikube-d75e58f52b6c确认svc可以访问,比如:D:\minikube>kubectl get svc meow-svcNAME TYPE CLUSTER-IP EXTERNAL-I
2021-09-09 14:01:42
1291
原创 单点登录的选择考虑
单点登录的协议不少,接触过的有spnego,saml,cas, 简单记录一下:1) spnego 之前的实现都是基于微软的AD认证
2021-06-05 14:07:49
158
原创 Springboot 的 @Cacheable注解的设置
Springboot的默认缓存注解用起来很方便,但是也有一些设置方面的问题这个@Cacheable 注解,默认会缓存null 值的,这个行为不是我的期望行为,可以通过设置避免此问题:@Cacheable(value = "unitCache", key = "#unitId", unless="#result == null")另外,这个cache默认是永久存储的,即使重启Eclipse也能读取缓存的值;如果测试的时候,需要手工清除: @CacheEvict(value = "u.
2021-04-28 10:19:17
977
原创 Java 多线程的一个小例子
Java 多线程的一个小例子,保存结果到StringBuffer: /** * * @date: Apr 21, 2021 5:16:38 PM * @author haifeng.li * @throws ExecutionException * @throws InterruptedException */ @Test public void testMutilpeThread() throws I.
2021-04-28 10:13:20
117
原创 阿里OSS文件上传的中文名乱码问题,Java中Multipart的TextBody怎么设置utf8编码
使用http client 提交文件到aliyunoss存储文件,发现英文文件名可以顺利上传,而中文文件名就报错:<?xml version="1.0" encoding="UTF-8"?><Error> <Code>AccessDenied</Code> <Message>Invalid according to Policy: Policy Condition failed: ["eq", "$key", "tid53036/a
2020-11-25 09:28:39
8164
转载 soapui直接下载响应内容为本地的文件
参考:https://www.soapui.org/getting-started/working-with-soapui/saving-responses/设置一下dump file 属性就好了
2020-09-18 16:10:14
909
原创 斐讯K2无法运行KCPTUN占用CPU特别高的问题
斐讯K2配置KCPTUN后,CPU就变得特别的忙,高达100%,反应特别慢。观察日志,发现内存溢出了:[RT-AC54U /tmp]# tail -f syslog.log...Feb 16 09:16:02 kernel: crond invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=...
2020-02-16 10:11:05
1682
原创 Redmine的CKEditor插件升级到4.13.1,同时支持word直接粘贴图片
Redmine的CKEditor插件默认版本是4.7.1,其实最新的CKEditor4版本4.13.1已经对word格式粘贴支持的更好。从CKEditor4.7.1升级到最新4.13.1的步骤如下:1) 首先要确定使用哪些CKEditor插件,参考 文件 redmine_ckeditor\assets\ckeditor\build-config.js 使用这个build-co...
2020-02-07 17:37:37
1686
原创 TorchScript的TracedModule和ScriptModule的区别
最近在读TorchScript的入门介绍,看了官方链接的文章,然后感觉是云山雾罩,不知所云。然后搜索到了Rene Wang的文章,才感觉明白了好多。官方的介绍TracedModule的缺点例子是这样的:class MyDecisionGate(torch.nn.Module): def forward(self, x): if x.sum() > 0:...
2020-01-31 21:29:48
3176
4
原创 去掉win2012屏幕右下角的charms bar
不知道M$怎么脑残设计出这么一个讨厌的功能,鼠标往屏幕右下角一晃就出来这么个垃圾玩意,而且还没有办法去掉,修改注册表也白搭!最后发现早就有人搞定这个垃圾功能了:Winaero Charms Bar Killerhttps://winaero.com/comment.php?comment.news.219设置也很简单:这样就清净多了!...
2020-01-22 15:56:04
631
原创 运行Ruby On Rails TypeError: 对象不支持此属性或方法
运行Ruby On Rails 报错:ActionView::Template::Error (TypeError: 对象不支持此属性或方法): 4: <title>ToyApp</title> 5: <%= csrf_meta_tags %> 6: 7: <%= stylesheet_link...
2019-12-06 21:44:33
1736
原创 Rails 安装报错
C:\>gem install railsTemporarily enhancing PATH for MSYS/MINGW...Building native extensions. This could take a while...ERROR: Error installing rails: ERROR: Failed to build gem native e...
2019-12-04 09:55:45
1730
原创 RedMine 3.4.12安装CKEditor富文本编辑器4.71
RedMine自带的Markdown编辑器不算太好用。CKEditor自4.70版本开始支持word/excel文档的拷贝,这个很有用。现在还在活跃的ckeditor插件链接:http://www.redmine.org/plugins/redmine-ckeditorhttps://github.com/a-ono/redmine_ckeditor0)git安装,第三步需要gi...
2019-11-29 13:21:26
1734
原创 Ubuntu16.04安装redmine3.4
基本上按照下面的步骤,值得注意的是有几个地方不一样https://www.untrustedconnection.com/2018/01/redmine-passenger-and-nginx-on-ubuntu.html1) 不要用3.4.4版本,会报告文件找不到的错误,是由于Sprockets升级引起的.这个是错误的信息:https://stackoverflow.com/que...
2019-11-27 09:47:24
318
原创 jdk8对于字符串拼接的优化
首先看单个的字符串拼接:public class Stringdeom1 { /** * Java8会自动对 字符串加+ 做优化,用到了Stringbuilder. * @param args */ public static void main(String[] args) { String result =""; result += "abc"; Sy...
2019-11-02 16:23:23
3119
2
原创 SQL Server 的 count(1) 是什么意思呢
可能很多人一直在用这个 count(1) 可是并没有深入理解它的含义。实际上这里的 count(1) 和count(*) 是一个含义,都是作为表达式对待的。查看SQL server的 execution plan 并没有看到差异,结果也没有差异的。即使运行 count(100) 或者 count(0) 也是一样的结果。参考:https://stackoverflow.com...
2019-10-27 21:59:22
5955
转载 SQL express 2005 安装到win10
参考链接:https://eddiejackson.net/wp/?p=16941从MS下载安装文件,大概有53.5MB,还算小巧,然后正常安装,失败后安装两个补丁文件,再试。还有配套的managementstudio, 下载64位的即可:https://www.microsoft.com/en-us/download/details.aspx?id=14630...
2019-10-25 20:57:16
1395
原创 Eclipse取消 Access restriction 错误
打算使用Unsafe类,默认Eclipse是不允许的,需要设置JDK允许此操作。菜单Window-->Preferences-->Java-->Compiler-->Errors/Warnings->Deprecated and restricted API中->Forbidden references(access rules)设置成Warning,这样e...
2019-10-25 17:08:45
218
原创 编译 tensorflow2.0rc1 windows gpu
编译的原因是现有的whl无法直接安装,估计因为CPU不支持AVX。参考的文章很多,google的最有参考意义:https://tensorflow.google.cn/install/source_windows要点是必须安装好MSYS环境,要手工安装patch命令,否则会报错的。pacman -S unzip patchpacman -S msys/patch还有提前安...
2019-09-21 13:37:42
1342
原创 Win7系统的Python无法找到ucrtbased.dll
运行python报告错误:弹出应用程序: python.exe - 系统错误: 无法启动此程序,因为计算机中丢失 ucrtbased.dll。尝试重新安装该程序以解决此问题。发现这个文件其实是在本地的C盘有的,在目录C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt\ucrtbased.dll但是windows目录没有,...
2019-09-17 16:59:40
2293
原创 cuda 9.0安装错误:The driver installation is unable to locate the kernel source.
安装cuda 9.0到阿里云ubunut 16.04总是报告错误,尝试了各种办法也无解:Installing the NVIDIA display driver...The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages a...
2019-08-31 23:40:34
4754
1
翻译 xrdp链接unbuntu 16.04
http://c-nergy.be/blog/?p=8952非常简单,几条指令搞定sudo apt-get install xrdpsudo apt-get updatesudo apt-get install mate-core mate-desktop-environment mate-notification-daemonsudo sed -i.b...
2019-08-30 10:19:13
266
原创 转换Caffe模型权重文件到Chainer的npz格式
首先要去下载何恺明大神的Caffee权重文件,然后使用Chainer提供的功能直接转换。按照网页https://github.com/KaimingHe/deep-residual-networks指示,需要去onedrive下载.https://onedrive.live.com/?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%21...
2019-08-28 16:31:47
420
原创 tensorflow 报告 warning FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated
最近每次启动tensorflow总是报告一堆warning,没有什么影响,但是看着烦人。它的问题根本是numpy的版本和tensorflow不匹配导致的。C:\Users\Joy9\MyPythonWork>pythonPython 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (...
2019-08-19 16:07:13
849
原创 Websocket无法连接问题
websocket 连接在刚开始运行正常,运行10分钟后新建连接则报告错误:failed: WebSocket is closed before the connection is established或者Opcode -1此时查看websocket连接,会发现有256个连接已经建立,但是无法建立新的连接。如果关闭当前的Chrome tab网页,则其他tab的网页立刻可以建立...
2019-08-06 11:20:57
16223
原创 Springboot Maven yaml 自动多环境打包工具
在很多情况下,我们需要为开发环境,集成测试环境,生产环境打包.它们的配置文件有细微的差异,最好是一次能够生产所有环境的war包.比较常见的是设置application.properties中的spring.profiles.active环境变量 但是yml的精简特性很值得称道,用过之后就不能忍受property 文件的臃肿了.试着google基于yml的多环境打包,并没有一个很直观...
2019-07-16 20:03:16
1619
原创 网页拷贝内容到剪贴板
之前只能用flash来粘贴,太麻烦。github就不用flash也能粘贴,参考例子:https://clipboardjs.com/<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Copy测试页面&...
2019-06-18 10:57:01
295
tensorflow-gpu-2.0.0rc2-cp36-cp36m-win_amd64.whl
2019-09-23
multiple-profiles-yaml.7z
2019-07-16
ESP370&560;&400;_ocx_v4.1.0.9_20180628.rar
2019-06-04
Maven-overlay-spring-example.zip
2019-05-25
tensorflow GPU v1.12.2 for ubuntu 16.04 (sse2)
2019-05-04
icu-release-62-1.tar.gz
2019-05-03
Alfresco ECM(企业内容管理) Activity BPM(工作流) 电子书
2019-01-24
禅道10.4的SSL配置(完美版)
2018-10-23
禅道10.4的SSL配置
2018-10-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人