import httpx, json, openpyxl, timedeeplx_api = “http://127.0.0.1:1188/translate”wb = openpyxl.load_workbook(“c2023.xlsx”)sheet = wb[“Sheet1”]for i in range(sheet.max_row):row_line = str(i + 1)time.sleep(2)data = {“text”: sheet[“A” + row_line].value,“source_lang”: “ZH”,“target_lang”: “EN”,}post_data = json.dumps(data)r = httpx.post(url=deeplx_api, data=post_data).textdata = json.loads(r)name = data[“data”]print(“data: “, name)sheet[“B” + row_line] = nameprint(i)wb.save(“translated.xlsx”)
分类目录归档:挨踢
Microsoft Activation Scripts (MAS)
- download url:https://massgrave.dev/
- On Windows 8.1/10/11, right-click on the Windows start menu and select PowerShell or Terminal (Not CMD).
- Copy and paste the code below and press enter
irm https://get.activated.win | iex - You will see the activation options. Follow the on-screen instructions.
- That’s all.
端口号 ,进程 ,pid
netstat -aon|findstr 8075
taskkill /F /pid 15220
弃坑帆软
鉴于帆软的安装文件越来越大,二开的jar包越来越臃肿,决定弃坑帆软,转战JasperReports
优点,少了很多用不到的依赖,体积和启动速度明显快
几个常用私服仓库地址
帆软:
nexus
http://mvn.finedevelop.com/#browse/
code:
https://code.fanruan.com/
百特搭
nexus-new
http://47.92.98.61:8081/#browse/browse
nexus-老
http://120.27.140.65:8081/nexus/
code
https://git-repo.baiteda.com/
github 操作示例
git init
git add README.md
git commit -m “first commit”
git branch -M main
git remote add origin https://github.com/xxx/xxx.git
git push -u origin main
git remote add origin https://github.com/xxx/xxx.git
git branch -M main
git push -u origin main
git init # 把项目初始化,相当于在项目的跟目录生成一个 .git 目录
git add . # 把项目的所有文件加入暂存区
git commit -am ‘项目初始化’ # 把项目提交到本地仓库,引号里面的是这次提交的注释,方便以后查看。
git remote rm origin # 先删除远程 Git 仓库
git remote add origin https://github.com/xxx/xxx.git #为本地的仓库创建一个远程仓库.
git pull –rebase origin master
git push origin master
git config –global http.https://github.com.proxy socks5://192.168.1.190:8582 # 设置代理
java encodeuri 中文
String string = attachmentURL; Pattern p = Pattern.compile("[\u4e00-\u9fa5]+"); Matcher m = p.matcher(string); StringBuffer b = new StringBuffer(); while (m.find()) { m.appendReplacement(b, URLEncoder.encode(m.group(0), "utf-8")); } m.appendTail(b); System.out.println(b.toString()); String resultURL = b.toString();
帆软 10 问题汇总
因为之前一直是用帆软报表,特别是是用api导出文件功能,最近因为并发原因导致: 错误代码:1120 当前Hsql数据库已被另一线程锁定 的错误,参考帆软在线文档 https://help.fanruan.com/finereport/doc-view-735.html#5ba53a99f6ea5bb4 随将原来的7.0版本升级为10.0的版本.
1.关于版本,因为众所周知的原因,选择了2010.04.26之前的版本.
2.关于补丁,补丁
关于tomcat独立部署:
2.关于多版本jdk的环境中,指定是用特定版本的jdk:找到bin下的setclasspath.bat文件;在文件的开始出添加如下代码:
set JAVA_HOME=D:\Program Files\Java\jdk7\jdk1.7.0_51 set JRE_HOME=D:\Program Files\Java\jdk7\jre7
3.关于tomcat增加 java agent
For Tomcat as non-service installation:
In Windows, edit <TOMCAT_HOME>\bin\catalina.bat and add the following entry to the top and save the file.set JAVA_OPTS=%JAVA_OPTS% -javaagent:<agent_directory_full_path>/apminsight-javaagent.jarIn Linux, edit <TOMCAT_HOME>/bin/catalina.sh and add the following entry to the top and save the file.
export JAVA_OPTS=”$JAVA_OPTS -javaagent:<agent_directory_full_path>/apminsight-javaagent.jar”
windows ping 带时间
windows powershell 执行:
ping.exe -t 202.96.209.5 |Foreach{“{0} – {1}” -f (Get-Date),$_}
ping.exe -t 192.168.0.254 | Foreach {“{0} – {1}” -f (Get-Date), $_} | Tee-Object -FilePath “D:\ping_log.txt”