摘要: 软件构架师是技术主管首先,软件构架师是技术主管,这意味着除了他要有技术上的技能外,还要有很好的领导才能。构架师的领导能力在团队中和项目质量控制中起着十分重要的作用。在团队中,构架师是项目的技术总管,他需要有丰富的知识背景,以便作出技术上的决定。相对于构架师来说,项目经理是来管理项目的资源,时间进度和花费的。使用电影制作来做类比的话,项目经理就是制片人(他要确定工作被完成了),而构架师是导演(他需要... 阅读全文
posted @ 2009-03-11 10:01 iDEAAM 阅读(383) 评论(0) 推荐(0) 编辑
备份文件,从 D盘 到Z盘。并且保留15天的文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
import shutil
from datetime import datetime, timedelta
 
def move_and_clean_folders(a_folder, b_folder, keep_count=15):
    try:
        # 获取前两天的日期
        yesterday = datetime.now() - timedelta(days=2)
        yesterday_str = yesterday.strftime('%Y-%m-%d')
 
        # 构建昨天的文件夹路径
        source_folder = os.path.join(a_folder, yesterday_str)
 
        # 检查昨天的文件夹是否存在
        if not os.path.exists(source_folder):
            print("Yesterday's folder does not exist.")
            return
 
        # 将昨天的文件夹剪切到 b 文件夹
        destination_folder = os.path.join(b_folder, yesterday_str)
        shutil.move(source_folder, destination_folder)
        print(f"Moved folder {source_folder} to {destination_folder}")
 
        # 在 b 文件夹中保留最近的 keep_count 个文件夹,按文件名排序
        folder_list = sorted([os.path.join(b_folder, d) for d in os.listdir(b_folder)
                              if os.path.isdir(os.path.join(b_folder, d))], key=lambda x: os.path.basename(x))
         
        # 删除除了最新的 keep_count 个文件夹之外的所有文件夹
        for folder in folder_list[:-keep_count]:
            shutil.rmtree(folder)
            print(f"Deleted folder {folder}")
 
    except Exception as e:
        print(f"An error occurred: {e}")
 
# 设置文件夹路径
a_folder = r"D:\自动备份\备份文件2"
b_folder = r"z:\自动备份\备份文件2"
 
# 调用函数 业务库
move_and_clean_folders(a_folder, b_folder, 15)
 
 
# 设置文件夹路径 挖掘库
a_folder = r"D:\自动备份\备份文件1"
b_folder = r"z:\自动备份\备份文件1"
 
# 调用函数
move_and_clean_folders(a_folder, b_folder, 15)

  

posted @ 2024-10-31 11:19 iDEAAM 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 要在.gitignore文件中排除所有子目录下的bin和obj文件夹,可以使用以下内容: # 排除所有子目录下的 bin 和 obj 文件夹 **/bin/ **/obj/ 说明: **/bin/:表示排除所有子目录中的bin文件夹及其内容。 **/obj/:表示排除所有子目录中的obj文件夹及其内 阅读全文
posted @ 2024-08-15 16:13 iDEAAM 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1. 下载 mkcerthttps://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-windows-amd64.exe2. 执行 .\mkcert.exe aa.com.cn会生成 aa-key.pem a 阅读全文
posted @ 2024-07-23 15:35 iDEAAM 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 1. 新增一个.ps1文件 # Define the URI $uri = "http://xxx.com/api/test" # Invoke the REST method $response = Invoke-RestMethod -Uri $uri # Output the response 阅读全文
posted @ 2024-07-18 16:47 iDEAAM 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 在Linux上,可以轻松的使用forever或者pm2来部署nodejs应用。但是在windows下就麻烦了,pm2明确的说支持Linux & MacOS,forever在windows下貌似问题多多: 另外还有一个选择就是iisnode,这个有空研究一下,今天先说下比较简单的nssm。nssm会监 阅读全文
posted @ 2024-04-22 18:29 iDEAAM 阅读(181) 评论(0) 推荐(0) 编辑
摘要: q.bat for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (%windir%\System32\tscon.exe %%s /dest:console) 阅读全文
posted @ 2024-04-15 11:24 iDEAAM 阅读(178) 评论(0) 推荐(0) 编辑
摘要: java -jar extractpdfexcel-0.1.jar source.pdf result.xcl https://github.com/eadgyo/Extract-PDF-Excel 阅读全文
posted @ 2024-03-13 13:44 iDEAAM 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 同时快速编辑多行内容: 五种方式:1,鼠标选中多行,按下 Ctrl Shift L (Command Shift L) 即可同时编辑这些行; 2,鼠标选中文本,反复按 CTRL D (Command D) 即可继续向下同时选中下一个相同的文本进行同时编辑; 3,鼠标选中文本,按下 Alt F3 (W 阅读全文
posted @ 2024-02-18 12:10 iDEAAM 阅读(861) 评论(0) 推荐(0) 编辑
摘要: //同步方法调用异步方法 public static string Test(string cName) { AutoResetEvent autoResetEvent = new AutoResetEvent(false); ThreadPool.QueueUserWorkItem(async ( 阅读全文
posted @ 2024-01-09 16:52 iDEAAM 阅读(78) 评论(0) 推荐(0) 编辑
摘要: windows 2008 r2 是老系统了,但是项目需要安装https。安装时,遇到问题,需要以下步骤解决。1. 安装系统补丁 Windows6.1-KB3080079-x64.msu https://download.microsoft.com/download/F/4/1/F4154AD2-21 阅读全文
posted @ 2023-12-27 10:19 iDEAAM 阅读(407) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示