CSharp: Greedy Algorithm

发布时间:2026/9/10 7:09:15

CSharp: Greedy Algorithm 项目结构/* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Algorithms # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : Const.cs */ using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Common { /// summary /// 全局精度常量 /// /summary public static class Const { public const int CaratDecimal 3; public const int MoneyDecimal 2; public const double Eps 1e-6; } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : Erro.cs */ using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Common { /// summary /// 自定义业务异常 /// /summary public class GemBaseException : Exception { public GemBaseException(string msg) : base($珠宝配石异常{msg}) { } } /// summary /// 参数非法克拉/价格小于等于0 /// /summary public class GemParamInvalidException : GemBaseException { public GemParamInvalidException(string msg) : base($参数非法{msg}) { } } /// summary /// 预算为0或负数 /// /summary public class BudgetZeroException : GemBaseException { public BudgetZeroException() : base(预算必须大于0) { } } /// summary /// 库存无宝石 /// /summary public class StockEmptyException : GemBaseException { public StockEmptyException() : base(宝石库存为空无法执行配石) { } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : Util.cs */ using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Common { /// summary /// 克拉、金额四舍五入工具 /// /summary public static class Util { /// summary /// 克拉保留3位小数 /// /summary /// param nameval/param /// returns/returns public static double RoundCarat(double val) { var mul Math.Pow(10, Const.CaratDecimal); return Math.Round(val * mul) / mul; } /// summary /// 金额保留2位小数 /// /summary /// param nameval/param /// returns/returns public static double RoundMoney(double val) { var mul Math.Pow(10, Const.MoneyDecimal); return Math.Round(val * mul) / mul; } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemAllocateItem.cs */ using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Entity { /// summary /// 配石明细 /// /summary public class GemAllocateItem { /// summary /// /// /summary public string StoneName { get; set; } /// summary /// /// /summary public double UseCarat { get; set; } /// summary /// /// /summary public double UseCost { get; set; } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemAllocateResultDTO.cs */ using System; using System.Collections.Generic; using System.Text; using CSharpAlgorithms.Greedy.Common; namespace CSharpAlgorithms.Greedy.Entity { /// summary /// 对外返回DTO /// /summary public class GemAllocateResultDTO { /// summary /// /// /summary public double BudgetTotal { get; set; } /// summary /// / /// /summary public double CostActual { get; set; } /// summary /// /// /summary public double BudgetRemain { get; set; } /// summary /// /// /summary public double TotalCarat { get; set; } /// summary /// /// /summary public ListGemAllocateItem DetailList { get; set; } new ListGemAllocateItem(); /// summary /// 转字典输出结构与Python/Go完全一致 /// /summary public Dictionarystring, object ToDict() { var detail DetailList.Select(item new Dictionarystring, object { [宝石名称] item.StoneName, [取用克拉] Util.RoundCarat(item.UseCarat), [花费金额] Util.RoundMoney(item.UseCost) }).ToList(); return new Dictionarystring, object { [预算总额] Util.RoundMoney(BudgetTotal), [实际花费] Util.RoundMoney(CostActual), [剩余预算] Util.RoundMoney(BudgetRemain), [总匹配克拉] Util.RoundCarat(TotalCarat), [选用裸石明细] detail }; } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemStone.cs */ using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Entity { /// summary /// 库存宝石实体 /// /summary public class GemStone { /// summary /// 宝石名称 /// /summary public string StoneName { get; set; } /// summary /// 批次总克拉 /// /summary public double TotalCarat { get; set; } /// summary /// 整批总价 /// /summary public double BatchPrice { get; set; } /// summary /// 单位预算对应克拉性价比排序指标 /// /summary public double UnitCaratValue TotalCarat / BatchPrice; } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemMemoryRepo.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Repository { /// summary /// 内存仓储实现 /// /summary public class GemMemoryRepo : IBaseGemRepo { private readonly ListGemStone _storage new ListGemStone(); /// summary /// /// /summary /// param namegem/param public void AddGem(GemStone gem) { _storage.Add(gem); } /// summary /// /// /summary /// returns/returns public ListGemStone GetAllGems() { // 返回拷贝防止外部篡改内部集合 return new ListGemStone(_storage); } /// summary /// /// /summary public void ClearAll() { _storage.Clear(); } /// summary /// /// /summary /// returns/returns public int Count() { return _storage.Count; } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : IBaseGemRepo.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Repository { /// summary /// 仓储抽象接口 /// /summary public interface IBaseGemRepo { void AddGem(GemStone gem); ListGemStone GetAllGems(); void ClearAll(); int Count(); } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemAllocateService.cs */ using CSharpAlgorithms.Greedy.Algorithm; using CSharpAlgorithms.Greedy.Common; using CSharpAlgorithms.Greedy.Entity; using CSharpAlgorithms.Greedy.Repository; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Service { /// summary /// 业务门面服务层 /// /summary public class GemAllocateService { private readonly IBaseGemRepo _repo; private readonly IBaseGreedy _alg; // 依赖注入 public GemAllocateService(IBaseGemRepo repo, IBaseGreedy alg) { _repo repo; _alg alg; } /// summary /// 添加库存宝石统一参数校验 /// /summary /// param namestoneName/param /// param nametotalCarat/param /// param namebatchPrice/param /// exception crefGemParamInvalidException/exception public void AddStoneStock(string stoneName, double totalCarat, double batchPrice) { if (totalCarat Const.Eps || batchPrice Const.Eps) throw new GemParamInvalidException($宝石[{stoneName}]克拉/价格必须大于0); var gem new GemStone { StoneName stoneName, TotalCarat totalCarat, BatchPrice batchPrice }; _repo.AddGem(gem); } /// summary /// 执行业务配石完整流程 /// /summary /// param namebudget/param /// returns/returns /// exception crefStockEmptyException/exception public GemAllocateResultDTO Allocate(double budget) { var gemList _repo.GetAllGems(); if (gemList.Count 0) throw new StockEmptyException(); var items _alg.Calculate(gemList, budget); double totalCarat 0; double totalCost 0; foreach (var item in items) { totalCarat item.UseCarat; totalCost item.UseCost; } double remain budget - totalCost; return new GemAllocateResultDTO { BudgetTotal budget, CostActual totalCost, BudgetRemain remain, TotalCarat totalCarat, DetailList items }; } /// summary /// 清空库存复用服务实例处理下一笔订单 /// /summary public void ClearStock() { _repo.ClearAll(); } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GemFractionGreedy.cs */ using CSharpAlgorithms.Greedy.Common; using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Algorithm { /// summary /// 分数背包贪心核心 /// /summary public class GemFractionGreedy : IBaseGreedy { private readonly ISortStrategy _sortStrategy; /// summary /// /// /summary /// param namesortStrategy/param public GemFractionGreedy(ISortStrategy sortStrategy null) { _sortStrategy sortStrategy ?? new UnitValueDescStrategy(); } /// summary /// /// /summary /// param namegemList/param /// param namebudget/param /// returns/returns /// exception crefBudgetZeroException/exception public ListGemAllocateItem Calculate(ListGemStone gemList, double budget) { if (budget Const.Eps) throw new BudgetZeroException(); var sorted _sortStrategy.Sort(gemList); double remainBudget budget; var result new ListGemAllocateItem(); foreach (var gem in sorted) { if (remainBudget Const.Eps) break; double useCarat, useCost; if (gem.BatchPrice remainBudget) { useCarat gem.TotalCarat; useCost gem.BatchPrice; } else { double ratio remainBudget / gem.BatchPrice; useCarat gem.TotalCarat * ratio; useCost remainBudget; } result.Add(new GemAllocateItem { StoneName gem.StoneName, UseCarat useCarat, UseCost useCost }); remainBudget - useCost; } return result; } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : IBaseGreedy.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Algorithm { /// summary /// 贪心算法顶层接口 /// /summary public interface IBaseGreedy { ListGemAllocateItem Calculate(ListGemStone gemList, double budget); } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : ISortStrategy.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Algorithm { /// summary /// 排序策略抽象 /// /summary public interface ISortStrategy { ListGemStone Sort(ListGemStone gemList); } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : MaxCaratDescStrategy.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Algorithm { /// summary /// 扩展策略优先大克拉宝石 /// /summary public class MaxCaratDescStrategy : ISortStrategy { public ListGemStone Sort(ListGemStone gemList) { return gemList .OrderByDescending(g g.TotalCarat) .ToList(); } } } /* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : UnitValueDescStrategy.cs */ using CSharpAlgorithms.Greedy.Entity; using System; using System.Collections.Generic; using System.Text; namespace CSharpAlgorithms.Greedy.Algorithm { /// summary /// 默认策略性价比从高到低 /// /// /summary public class UnitValueDescStrategy : ISortStrategy { public ListGemStone Sort(ListGemStone gemList) { return gemList .OrderByDescending(g g.UnitCaratValue) .ToList(); } } }调用/* # encoding: utf-8 # 版权所有 2026 ©涂聚文有限公司™ ® # 许可信息查看言語成了邀功盡責的功臣還需要行爲每日來值班嗎 # 描述 Greedy Algorithm 贪心算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : vs2026 c# .net 10 # os : windows 10 # database : mysql 9.0 sql server 2019, postgreSQL 17.0 Oracle 21c Neo4j # Datetime : 2026/07/06 22:16 # User : geovindu # Product : Visual Studio 2026 # Project : DesignAlgorithm # File : GreedyBll.cs */ using CSharpAlgorithms.Greedy.Algorithm; using CSharpAlgorithms.Greedy.Common; using CSharpAlgorithms.Greedy.Repository; using CSharpAlgorithms.Greedy.Service; using System; using System.Collections.Generic; using System.Text; using System.Text.Encodings.Web; using System.Text.Json; namespace CSharpAlgorithms.Bll { /// summary /// /// /summary public class GreedyBll { // 全局统一Json配置关闭中文Unicode转义、格式化输出 private static readonly JsonSerializerOptions _jsonOpts new JsonSerializerOptions { WriteIndented true, // 使用不转义的编码器中文直接输出 Encoder JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; static void DemoCase1() { Console.WriteLine( 案例1性价比优先配石结果 ); IBaseGemRepo repo new GemMemoryRepo(); IBaseGreedy alg new GemFractionGreedy(); var svc new GemAllocateService(repo, alg); svc.AddStoneStock(0.8ct白钻, 0.8, 10500); svc.AddStoneStock(0.5ct白钻, 0.5, 6800); svc.AddStoneStock(0.3ct白钻, 0.3, 4200); svc.AddStoneStock(0.2ct粉钻, 0.2, 2800); var dto svc.Allocate(18000); var dict dto.ToDict(); // 使用自定义配置序列化 string json JsonSerializer.Serialize(dict, _jsonOpts); Console.WriteLine(json); } static void DemoCase2() { Console.WriteLine(\n 案例2优先大克拉配石结果 ); IBaseGemRepo repo new GemMemoryRepo(); ISortStrategy bigCaratSort new MaxCaratDescStrategy(); IBaseGreedy alg new GemFractionGreedy(bigCaratSort); var svc new GemAllocateService(repo, alg); svc.AddStoneStock(0.8ct白钻, 0.8, 10500); svc.AddStoneStock(0.5ct白钻, 0.5, 6800); var dto svc.Allocate(12000); var dict dto.ToDict(); string json JsonSerializer.Serialize(dict, _jsonOpts); Console.WriteLine(json); } /// summary /// /// /summary public void Demo() { try { DemoCase1(); DemoCase2(); } catch (GemBaseException ex) { Console.WriteLine($业务异常{ex.Message}); } catch (Exception ex) { Console.WriteLine($系统异常{ex.Message}); } } } }输出
延伸阅读

更多相关文章

2026/9/9 9:00:55

AI Agent如何推动舱驾一体芯片技术革新

1. 从聊天到执行:AI Agent如何重塑汽车芯片需求格局最近两年,AI Agent技术正在经历从实验室到产业化的关键跃迁。最初我们看到的AI助手只能进行简单的对话交互,而现在的AI Agent已经能够理解复杂指令、自主规划任务流程、调用各类工具API完成…

2026/9/9 19:37:22

Unity Burst编译器实战:原理、调优与性能提升指南

1. 项目概述:为什么Unity开发者必须关注Burst?如果你是一个Unity开发者,尤其是对性能有要求的项目参与者,那么“Burst”这个词大概率已经在你耳边萦绕了很久。它常常和ECS(实体组件系统)一起出现&#xff0…

2026/9/10 7:06:40

AI生成代码时代,能力断层如何弥补?Code to Learn训练闭环实践

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/9/10 7:06:40

RK3576开发板RTC完整配置指南:从内核到Android时区避坑

前阵子调一块RK3576开发板,功能问题都处理完了,结果客户那边反馈说设备重启后时间总是回到出厂值,日志时间戳全乱了。查了一圈,发现是RTC这块没配置干净。RK3576这颗芯片在AIoT和边缘计算项目里用得越来越多,配Linux或…

2026/9/10 7:06:40

AI文本太假怎么办?humanizer人性化改写实操指南

早上打开后台,看到一位读者的留言:“能不能出一篇关于 humanizer 的内容?我写文章基本都是 AI 帮我起草,但总觉得发出去的效果不对,说不出来哪里假。”这条留言让我挺有感触。做内容这行几年,我自己也被“A…

2026/9/10 7:01:40

T507平台适配长江存储EC150的工程级兼容性实践

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/9/9 13:11:35

超人会飞不算本事:系统稳定依赖清晰规则与边界设计

开头先不绕弯子。“#斯坦李吐槽dc 所以超人是无缘无故会飞的嘛哈哈哈哈哈哈哈锤哥真是技术人才啊!#雷神 #复联”这类调侃式短标题,第一波冲击力在于它把两个宇宙的角色塞进同一个吐槽箱里,但细想一下就能发现,它真正碰到的根本不是…

2026/9/8 7:15:15

超人VS蜘蛛侠:拆解超级IP的影响力与传播方法论

把“蜘蛛侠 vs 超人”放在 CSDN 上聊,可能很多人第一反应是走错片场了。但如果把这两个角色看成“两个持续运营了 80 多年的文化产品”,你会发现,这场比较本质上是两个不同 IP 策略的长期结果对比:超人赢在定义了整个超级英雄题材…

2026/9/9 16:31:09

基于CNN的调制信号识别:MATLAB实现时频图分类实战

简介:本资源是一套面向通信工程与信号处理方向学习者、研究者的深度学习实践方案,聚焦调制信号自动检测与识别这一典型无线通信任务,解决传统方法依赖人工特征、低信噪比下性能下降等痛点。压缩包共12个文件(10.73MB)&…

2026/9/10 0:00:55

目录对比去重实战:用哈希算法精准清理重复文件

我电脑里现在还有一块换了三次机的“数据墓地”硬盘,里面存着2016年以前所有旧笔记本的完整备份。平时不觉得有什么,直到前阵子想把它整理归档,发现同一个安装包、同一批照片、同一份论文草稿,在几个不同的备份目录里反复出现。更…

2026/9/10 0:00:55

Leaflet离线地图完整Demo合集:内网部署与坐标纠偏实战

简介:这是一份面向Web GIS开发者的LeafLet离线地图示例合集,帮助开发者快速掌握离线地图从搭建到交互的完整流程。压缩包共723个文件,大小14.06MB,以319个js脚本、175个html页面和29个css样式文件为主体,配合png/svg图…

2026/9/10 0:00:55

MATLAB读取Rinex 3.02观测文件:多系统GNSS数据解析实战

简介:基于MATLAB开发的Rinex3.02版观测文件(o文件)读取代码包,面向卫星定位导航方向的学习者与研究人员,用于解决新版观测文件的数据解析、历元提取与时间转换问题。压缩包共4个文件,包含两个m脚本、一个19…

2026/9/7 16:23:03

USB Type-C PCB布局分区设计:电源、高速信号与PD协议全攻略

做硬件这行,Type-C接口算是典型的“看着简单,做起来全坑”的东西。光引脚就24个,高低速信号、电源、控制线全部塞在一个小小的连接器里,如果PCB布局不做规划,打样回来基本就是“插上没反应”、“高速掉线”、“静电一打…

2026/9/7 22:46:00

系统编程学习原型如何补齐稳定性边界

系统编程学习原型如何补齐稳定性边界预算有限时&#xff0c;我先优化明显多余的复制&#xff0c;而不是猜测性地换容器。用借用传递只读数据通常就能减少分配&#xff1a; fn parse(line: &str) -> Result<Item, Error> { /* ... */ }用基准确认热点确实在分配&am…

2026/9/9 10:21:54

雨花区哪家财务公司代理记账比较好?

在雨花区&#xff0c;企业处理财税事务常常面临诸多挑战&#xff0c;选择一家靠谱的财务公司至关重要。湖南巨勤财务管理咨询有限公司就是本地正规实体财税服务机构&#xff0c;深耕本地工商财税行业多年&#xff0c;熟悉当地工商局、税务局最新政策与申报流程。主营公司注册、…

还想了解更多?直接咨询顾问

免费诊断 + 免费方案 + 透明报价。

全国咨询热线400-8866-253
免费获取方案
咨询二维码