打开 『选择文件夹』对话框,支持指定默认路径 Function SelectFolder( myStartFolder ) ' Version: 0.1.0 ' Updated: 2021-08-07 ' Standard housekeeping Dim objFolder, objItem, objShell ' Custom error handling On Error Resume Next SelectFolder = "" ' Create a dialog object Set objShell = CreateObject( "Shell.Application" ) Set objFolder = objShell.BrowseForFolder( 0, "
将传入的文件路径分割为路径、文件名、扩展名三部分。 dim example example="c:\windows\a.txt" Function get_file_parts(in_file) ' Version: 0.1.0 ' Updated: 2021-08-07 dim input_path,input_filename, ext_name, left_part_name input_path=Left(in_file, InStrRev(in_file,"\") - 1) input_filename=Right(in_file,Len(in_file)-InStrRev(in_file,"\")) ' msgbox input_path ' msgbox input_filename left_part_name=Left(input_filename, InStrRev(input_filename,".") - 1) ext_name=Right(input_filename,Len(input_filename)-InStrRev(input_filename,".")+1) get_file_parts=input_path & "," & left_part_name & "," & ext_name End Function msgbox get_file_parts(example) '
使用选项 -filter_complex 滤镜语法: filtername=option1=value1:option2=value2:option3=value3... 完整命令语法: ffmpeg -i 输入0 -i 输入1 -i 输入N -filter_complex "多滤镜组合表达式" output.mp4 其中多滤镜组合表达式语法思路是:[
如:在当前目录下的 test.txt 文本文件中随机读取一行数据 .bat @echo off setlocal enabledelayedexpansion for /f "tokens=*" %%i in (test.txt) do ( set /a h+=1 & set r!h!=%%i ) set /a s=%random% %% h+1 echo !r%s%! pause
有时候只是需要 Git 仓库里某个子文件夹里的源代码文件,并不想克隆整个仓库(可能整个仓库比较大)。例如只想下载某个课程系列里第一课的源代码案例 ch
re.sub 语法re.sub(pattern, repl, string, count=0, flags=0) 参数:^Ref pattern 匹配模式 repl 匹配处将被替换成的文本 string 待替换的原文 count 限制替换数量 flags: - re.IGNORECASE 忽略
守护程序是:systemd 管理命令是:systemctl 守护进程确保程序定期执行或持续运行。systemd 基础知识可参考阮一峰的文章: 以定时
PM2 是一个守护进程管理器,它将帮助您管理和保持您的应用程序在线 24/7。 更多内容可访问 pm2 官方文档。 pm2 的安装,请参考 https://pm2.io/docs/runtime/guide/installation/ 以下是常用命令: 启动应用p
Dim exApp As Excel.Application Set exApp = new Excel.Application exApp.VBE.ActiveVBProject.VBComponents.Import "xxx.bas"
创建 Excel 应用实例 'create new excel application object Set app = New Excel.Application 'set the applications visible property to false app.Visible = False '默认就是隐藏窗口。可以省略掉此行奢者 关闭 Excel 应用实例 'close the application app.Quit 'release outstanding object references Set app = Nothing