对Mission Planner 集成添加功能 数据 思路

现在 我想要对Mission Planner 软件添加集成自己的功能 我应该如何入手呢?请大神指教。。。

1个回答

wang527262
wang527262 谢谢您
接近 3 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
地面站 Mission planner编译很多遍有以下几个问题编译不过去,请指教
按照WIKi操作,Mission planner编译很多遍有以下几个问题编译不过去,问题如图。 win10+VS2017(15.9.17) mission planner 最新master 本地安装mission planner 1.3.68,项目中已进行引用添加MP安装地址 编译多次出现以下问题,烦请大家指导,谢谢 ![图片说明](https://img-ask.csdn.net/upload/201911/02/1572663210_991788.jpg)![图片说明](https://img-ask.csdn.net/upload/201911/02/1572663220_296510.jpg)
运行mission planner遇到如下错误
![图片说明](https://img-ask.csdn.net/upload/201803/23/1521791465_588420.jpg) 引用和框架也改了,引用途径也有更改,但还是有这些问题
关于PGSQL每天晚上12点15卡死的问题
之前服务器用 了10来天后 每天12点15就死机 我以为是服务器问题,就换了台服务器,10来天后又出现同样的问题,晚上12点15就准时卡死 重装PGSQL还原之前备份后不再卡死(10天后不敢保证,date还原后小了10G。原来是27G还原后变17G) 发现每天12点15出现这样的日志 (重装PGSQL后不卡死排除服务器问题。服务器配置是独立服务器16核16G,我这开多个JAVA采集。正常情况是CPU5%以内,内存使用8-10GB,句柄有点高到10W,线程2000,进程250,PGSQl连接150) ``` 2019-12-15 00:15:39 HKT LOG: checkpoints are occurring too frequently (21 seconds apart) 2019-12-15 00:15:39 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-15 00:15:54 HKT LOG: checkpoints are occurring too frequently (15 seconds apart) 2019-12-15 00:15:54 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-15 00:16:09 HKT LOG: checkpoints are occurring too frequently (15 seconds apart) 2019-12-15 00:16:09 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". ``` ``` 2019-12-14 00:15:22 HKT LOG: checkpoints are occurring too frequently (22 seconds apart) 2019-12-14 00:15:22 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-14 00:15:38 HKT LOG: checkpoints are occurring too frequently (16 seconds apart) 2019-12-14 00:15:38 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-14 00:15:51 HKT LOG: checkpoints are occurring too frequently (13 seconds apart) 2019-12-14 00:15:51 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-14 00:23:26 HKT ERROR: value too long for type character varying(50) ``` ``` 2019-12-13 00:15:07 HKT LOG: checkpoints are occurring too frequently (7 seconds apart) 2019-12-13 00:15:07 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-13 00:15:18 HKT LOG: checkpoints are occurring too frequently (11 seconds apart) 2019-12-13 00:15:18 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-13 00:15:34 HKT LOG: checkpoints are occurring too frequently (16 seconds apart) 2019-12-13 00:15:34 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-13 00:15:40 HKT LOG: checkpoints are occurring too frequently (6 seconds apart) 2019-12-13 00:15:40 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". 2019-12-13 00:16:06 HKT LOG: checkpoints are occurring too frequently (26 seconds apart) 2019-12-13 00:16:06 HKT HINT: Consider increasing the configuration parameter "checkpoint_segments". ``` 下面是我的配置 ``` #wal_level = minimal # minimal, archive, or hot_standby # (change requires restart) #fsync = on # turns forced synchronization on or off #synchronous_commit = on # synchronization level; # off, local, remote_write, or on #wal_sync_method = fsync # the default is the first option # supported by the operating system: # open_datasync # fdatasync (default on Linux) # fsync # fsync_writethrough # open_sync #full_page_writes = on # recover from partial page writes #wal_buffers = -1 # min 256kB, -1 sets based on shared_buffers # (change requires restart) #wal_writer_delay = 200ms # 1-10000 milliseconds #commit_delay = 0 # range 0-100000, in microseconds #commit_siblings = 5 # range 1-1000 # - Checkpoints - #checkpoint_segments = 32 # in logfile segments, min 1, 16MB each #checkpoint_timeout = 15min # range 30s-1h #checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 #checkpoint_warning = 30s # 0 disables # - Archiving - #archive_mode = off # allows archiving to be done # (change requires restart) #archive_command = '' # command to use to archive a logfile segment # placeholders: %p = path of file to archive # %f = file name only # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' #archive_timeout = 0 # force a logfile segment switch after this # number of seconds; 0 disables #------------------------------------------------------------------------------ ``` ``` # QUERY TUNING #------------------------------------------------------------------------------ # - Planner Method Configuration - #enable_bitmapscan = on #enable_hashagg = on #enable_hashjoin = on #enable_indexscan = on #enable_indexonlyscan = on #enable_material = on #enable_mergejoin = on #enable_nestloop = on #enable_seqscan = on #enable_sort = on #enable_tidscan = on # - Planner Cost Constants - #seq_page_cost = 1.0 # measured on an arbitrary scale #random_page_cost = 4.0 # same scale as above #cpu_tuple_cost = 0.01 # same scale as above #cpu_index_tuple_cost = 0.005 # same scale as above #cpu_operator_cost = 0.0025 # same scale as above #effective_cache_size = 2GB # - Genetic Query Optimizer - #geqo = on #geqo_threshold = 12 #geqo_effort = 5 # range 1-10 #geqo_pool_size = 0 # selects default based on effort #geqo_generations = 0 # selects default based on effort #geqo_selection_bias = 2.0 # range 1.5-2.0 #geqo_seed = 0.0 # range 0.0-1.0 # - Other Planner Options - #default_statistics_target = 100 # range 1-10000 #constraint_exclusion = partition # on, off, or partition #cursor_tuple_fraction = 0.1 # range 0.0-1.0 #from_collapse_limit = 8 #join_collapse_limit = 8 # 1 disables collapsing of explicit # JOIN clauses #------ ``` 1:请问为什么每天晚上12点15会出现这样的日志(别的时段我查询了没有出现) 2:请大佬给我一个配置优化方案
Time Planner
Description Background Problems in computer science are often classified as belonging to a certain class of problems (e.g. NP, NP complete, unsolvable, . . . ). Whatever class of problems you have to solve in a team, there is always one main problem: To find a date where all the programmers can meet to work together on their project. Problem Your task is to write a program that finds all possible appointments for a programming team that is busy all the time and therefore has problems in finding accurate dates and times for their meetings. Input The first line of the input contains the number of scenarios. For each scenario, you are first given the number m of team members in a single line, with 2 <= m <= 20.For every team member, there will be a line containing the number n of entries in this members calender (0 <= n <= 100), followed by n lines in the following format: YYYY MM DD hh mm ss YYYY MM DD hh mm ss some string here Each such line contains the year, month, day, hour, minute, and second of both starting and ending time for the appointment, and a string with the description of the appointment. All numbers are zero padded to match the given format, with single blanks in-between. The string at the end might contain blanks and is no longer than 100 characters. The dates are in the range January 1, 1800 midnight to January 1, 2200 midnight. For simplification, you may assume that all months (even February) have 30 days each, and no invalid dates (like January 31) will occur. Note that the ending time of a team member's appointment specifies the point in time where this team member is ready to join a meeting. Output The output for each scenario begins with a line containing Scenario #i:, where i is the number of the scenario starting at 1. Then print a line for each possible appointments that follows these rules: at any time during the meeting, at least two team members need to be there at any time during the meeting, at most one team member is allowed to be absent the meeting should be at least one hour in length all team members are willing to work 24 hours a day For example, if there are three team members A, B and C, the following is a valid meeting: It begins solely with A and B. Later C joins the meeting and before the end, A may leave. Always print the longest appointment possible satisfying these conditions, even if it is as long as 400 years. Sort these lines by date and time, and use the following format: appointment possible from MM/DD/YYYY hh:mm:ss to MM/DD/YYYY hh:mm:ss The numbers indicating month, day, year, hour, minute, and second should be zero padded in order to get the required number of characters. If no appointment is possible, just print a line containing no appointment possible Conclude the output for each scenario with a blank line. Sample Input 2 3 3 2002 06 28 15 00 00 2002 06 28 18 00 00 TUD Contest Practice Session 2002 06 29 10 00 00 2002 06 29 15 00 00 TUD Contest 2002 11 15 15 00 00 2002 11 17 23 00 00 NWERC Delft 4 2002 06 25 13 30 00 2002 06 25 15 30 00 FIFA World Cup Semifinal I 2002 06 26 13 30 00 2002 06 26 15 30 00 FIFA World Cup Semifinal II 2002 06 29 13 00 00 2002 06 29 15 00 00 FIFA World Cup Third Place 2002 06 30 13 00 00 2002 06 30 15 00 00 FIFA World Cup Final 1 2002 06 01 00 00 00 2002 06 29 18 00 00 Preparation of Problem Set 2 1 1800 01 01 00 00 00 2200 01 01 00 00 00 Solving Problem 8 0 Sample Output Scenario #1: appointment possible from 01/01/1800 00:00:00 to 06/25/2002 13:30:00 appointment possible from 06/25/2002 15:30:00 to 06/26/2002 13:30:00 appointment possible from 06/26/2002 15:30:00 to 06/28/2002 15:00:00 appointment possible from 06/28/2002 18:00:00 to 06/29/2002 10:00:00 appointment possible from 06/29/2002 15:00:00 to 01/01/2200 00:00:00 Scenario #2: no appointment possible
如何使用VS2013编译apm_planner源代码?
如何使用VS2013编译apm_planner源代码?,使用qt5.5.1,vs2013,c++编译器编译 两个月之前,网上很多资料,不知道现在怎么了,没有资料了,真愁人, 好像在cmd下,用qmake,就能生成vs2013的项目文件,关键是我命令参数忘记了
JAVA 排班规划算法 planner有人了解过吗?
场景: 我现在要安排两个员工做玩具 比方现在要做足球跟篮球 做成这两种球需要有3个工序 工序A是做出形状,规定在A类机器才能做 工序B是画纹,只有B类机器才能做 工序C是缝合成球,只有C类机器才能做 这里有3个工序,每个工序用时不同,同个工序做不同的玩具时用时也不一样 这里有3类机器,每类机器都有不同的台数,只要空闲,就可以使用 请问这种情况要怎么自动给两个员工排班、安排任务才能实现最大限度发挥员工的价值 有什么算法能解?
FPGA cyclone3代芯片,利用lvds_rx IP核进行LVDS信号采集出现问题
在Quartus软件里进行Pin Planner设置出现了以下错误提示: 希望各位大神能帮忙解答! 错误提示1: Error: The input pin RX_IN has I/O standard LVDS_E_3R, but the selected device does not support input pin operation with I/O standard LVDS_E_3R 错误提示2: Error: Pad 106 of non-differential I/O pin 'RX_IN1[2]' in pin location AB5 is too close to pad 105 of differential I/O pin 'RX_IN1[3]' in pin location AB6 -- pads must be separated by a minimum of 4 pads. Use the Pad View of Pin Planner to debug. 楼主初级入门,不太明白。因为检查了cyclone3的引脚表,都是支持差分IO的 但是在软件里设置就老出问题。
ros中的navigation包可以用python写base_local_planner导航插件吗?
非C++科班出身。因为项目需要自己写一个局部路径规划,但是navigation包的wiki只说有稳定的C++ API。 想问一下可以用python写代码接上navigation的API实现自己的算法吗?
一个未能加载文件或程序集异常 :求教
在 System.Configuration.ConfigurationErrorsException 中第一次偶然出现的“System.Configuration.dll”类型的异常 在 System.Configuration.ConfigurationErrorsException 中第一次偶然出现的“System.Configuration.dll”类型的异常 log4net:ERROR Failed to parse config file. Is the <configSections> specified as: <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a" /> System.Configuration.ConfigurationErrorsException: 创建 log4net 的配置节处理程序时出错: 未能加载文件或程序集“log4net”或它的某一个依赖项。系统找不到指定的文件。 (E:\Project\20151223_misson planner\MissionPlanner-master\bin\Debug\MissionPlanner.exe.config line 4) ---> System.IO.FileNotFoundException: 未能加载文件或程序集“log4net”或它的某一个依赖项。系统找不到指定的文件。 在 System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError) 在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) 在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) 在 System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord) 在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere) --- 内部异常堆栈跟踪的结尾 --- 在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere) 在 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) 在 System.Configuration.BaseConfigurationRecord.GetSection(String configKey) 在 System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName) 在 System.Configuration.ConfigurationManager.GetSection(String sectionName) 在 log4net.Config.XmlConfigurator.InternalConfigure(ILoggerRepository repository)
怎样将适用于cyclone4的pfga板子的工程应用于另一块fpga(cyclone5)
本人刚学,导师买了个ov5640的摄像头,摄像头带了应用于fpga的程序,但是这个程序所适用的板子和我需要用的板子不同。想请问如何办呢。。。麻烦说的详细点,尤其是引脚分配这个问题。。。 qsf文件里的引脚分配和pin planner里的引脚分配到底是什么关系?
Markov Trains
Description Business is not going well for the Dutch Railway Company NS. Due to technical problems, they are forced to cancel many train services without advance notice. This is, of course, extremely frustrating for students who travel from home to school by train. The worst thing about the whole situation is the randomness of the cancellations. Nobody knows in advance whether a train service will be cancelled; a cancellation is not announced until the official departure time. Since there is usually more than one possible route from home to school,people are often left with an 'if I had known this in advance I would have taken the other route' sort of feeling. Recently, the statistics department of the NS found a revolutionary solution to this problem.They noticed that some train services are cancelled more often than others. In order to help the passengers, they decided to publish this information. The new timetables will state not just the time of departure and arrival of each service, but also its probability of cancellation. The travel-planner software from the NS, which normally finds the fastest route between stations,must be updated to find the route which gives the best chance of arriving in time. This helps passengers to avoid trains that are likely to cause problems, instead taking a slightly longer, but more reliable route to school. Given the new timetables, a departure station and time, a destination station and a desired arrival time, find the route which gives the best chance of arriving at the destination in time. A route in this case is simply an ordered list of stations visited by the passenger, starting with the departure station and ending with the destination. The passenger will stick to the route, each time taking the first possible train to the next station. If a train is cancelled, he will just wait for the next train to that station. The chance of arriving in time is taken to be the probability that the passenger, when following the route as described above, arrives at the destination station before or at the desired arrival time.When calculating this probability, we assume that train services are cancelled independently of each other and according to the probabilities stated in the timetable. Input The first line of the input contains a single positive integer indicating the number of runs. For each run, the input is as follows: A line with a single positive integer n, the number of trains in the timetable (n <= 100). n lines describing the timetable. Each line describes one train, stating its departure station x, the time of departure tx, its destination station y (x != y), the time of arrival ty (tx < ty) and its probability of cancellation p.Stations are identified by capital letters in the range 'A' . . . 'L'. Times are in the format hh:mm with 00 <= hh < 24 and 00 <= mm < 60. The probability p is a decimal real number with 0.0 <= p < 1.0. Input elements are separated by spaces. A line with a departure station a, earliest departure time ta, destination station b (a != b) and desired arrival time tb (ta < tb). Station identifiers and times are like those in the timetable. Output The output consists of two lines for each run. The first line of each run contains the best possible route for the passenger as a list of station identifiers separated by spaces. The second line contains the probability that the passenger, when following the given route, arrives on time.The probability must be formatted as a decimal real number with exactly one digit before the decimal point, and exactly 4 digits after. The usual rules for rounding apply: round up if the next digit would be >= 5, otherwise round down. Notes When changing trains at an intermediate station, the earliest possible departure time is one minute after the time of arrival. All times are on the same day; the journey does not cross midnight. It never happens that two or more trains depart from the same station at the same time to the same destination station. The input is such that there is a unique route with maximum probability. The passenger will stick to his route, always taking the first available train to the next station. If a train is cancelled he will wait for the next train to that station. He will never try to be smart by taking faster trains or different routes. Sample Input 2 3 A 12:00 B 12:15 0.1 A 12:10 B 12:14 0.23 A 12:20 B 12:30 0.456 A 12:00 B 12:30 4 A 12:00 B 12:15 0.1 A 12:05 B 12:13 0.15 B 12:20 C 12:35 0.12 A 12:15 C 12:33 0.4 A 12:00 C 13:00 Sample Output A B 0.9895 A B C 0.8668
C# 最短路径问题,取出最短路径Node编号
我参考[最短路径](http://www.cnblogs.com/zhuweisky/archive/2006/03/26/246677.html "")网页的代码实现寻找最短路径。 请问,如何将result中的passNodeID取出来并赋值到新数组? 谢谢大家!! 代码如下 public class Edge { public string StartNodeID; public string EndNodeID; public double Weight; //权值,代价 } public class Node { private string iD; private ArrayList edgeList;//Edge的集合--出边表 public Node(string id) { this.iD = id; this.edgeList = new ArrayList(); } #region property public string ID { get { return this.iD; } } public ArrayList EdgeList { get { return this.edgeList; } } #endregion } /// <summary> /// PassedPath 用于缓存计算过程中的到达某个节点的权值最小的路径 /// </summary> public class PassedPath { private string curNodeID; private bool beProcessed; //是否已被处理 private double weight; //累积的权值 private ArrayList passedIDList; //路径 public PassedPath(string ID) { this.curNodeID = ID; this.weight = double.MaxValue; this.passedIDList = new ArrayList(); this.beProcessed = false; } #region property public bool BeProcessed { get { return this.beProcessed; } set { this.beProcessed = value; } } public string CurNodeID { get { return this.curNodeID; } } public double Weight { get { return this.weight; } set { this.weight = value; } } public ArrayList PassedIDList { get { return this.passedIDList; } } #endregion } /// <summary> /// PlanCourse 缓存从源节点到其它任一节点的最小权值路径=》路径表 /// </summary> public class PlanCourse { private Hashtable htPassedPath; #region ctor public PlanCourse(ArrayList nodeList, string originID) { this.htPassedPath = new Hashtable(); Node originNode = null; foreach (Node node in nodeList) { if (node.ID == originID) { originNode = node; } else { PassedPath pPath = new PassedPath(node.ID); this.htPassedPath.Add(node.ID, pPath); } } if (originNode == null) { throw new Exception("The origin node is not exist !"); } this.InitializeWeight(originNode); } private void InitializeWeight(Node originNode) { if ((originNode.EdgeList == null) || (originNode.EdgeList.Count == 0)) { return; } foreach (Edge edge in originNode.EdgeList) { PassedPath pPath = this[edge.EndNodeID]; if (pPath == null) { continue; } pPath.PassedIDList.Add(originNode.ID); pPath.Weight = edge.Weight; } } #endregion public PassedPath this[string nodeID] { get { return (PassedPath)this.htPassedPath[nodeID]; } } } public class RoutePlanResult { public string[] passNodeID; //通过的点的ID public double pPathWeirht; //路径的权值 public RoutePlanResult(string[] passID, double weight) { passNodeID = passID; pPathWeirht = weight; } } /// <summary> /// RoutePlanner 提供图算法中常用的路径规划功能。 /// 2005.09.06 /// </summary> public class RoutePlanner { public RoutePlanner() { } #region Paln //获取权值最小的路径 public RoutePlanResult Paln(ArrayList nodeList, string originID, string destID) { PlanCourse planCourse = new PlanCourse(nodeList, originID); Node curNode = this.GetMinWeightRudeNode(planCourse, nodeList, originID); #region 计算过程 while (curNode != null) { PassedPath curPath = planCourse[curNode.ID]; foreach (Edge edge in curNode.EdgeList) { if (edge.EndNodeID == originID) continue; PassedPath targetPath = planCourse[edge.EndNodeID]; double tempWeight = curPath.Weight + edge.Weight; if (tempWeight < targetPath.Weight) { targetPath.Weight = tempWeight; targetPath.PassedIDList.Clear(); for (int i = 0; i < curPath.PassedIDList.Count; i++) { targetPath.PassedIDList.Add(curPath.PassedIDList[i].ToString()); } targetPath.PassedIDList.Add(curNode.ID); } } //标志为已处理 planCourse[curNode.ID].BeProcessed = true; //获取下一个未处理节点 curNode = this.GetMinWeightRudeNode(planCourse, nodeList, originID); } #endregion //表示规划结束 return this.GetResult(planCourse, destID); } #endregion #region private method #region GetResult //从PlanCourse表中取出目标节点的PassedPath,这个PassedPath即是规划结果 private RoutePlanResult GetResult(PlanCourse planCourse, string destID) { PassedPath pPath = planCourse[destID]; if (pPath.Weight == int.MaxValue) { RoutePlanResult result1 = new RoutePlanResult(null, int.MaxValue); return result1; } string[] passedNodeIDs = new string[pPath.PassedIDList.Count]; for (int i = 0; i < passedNodeIDs.Length; i++) { passedNodeIDs[i] = pPath.PassedIDList[i].ToString(); } RoutePlanResult result = new RoutePlanResult(passedNodeIDs, pPath.Weight); return result; } #endregion #region GetMinWeightRudeNode //从PlanCourse取出一个当前累积权值最小,并且没有被处理过的节点 private Node GetMinWeightRudeNode(PlanCourse planCourse, ArrayList nodeList, string originID) { double weight = double.MaxValue; Node destNode = null; foreach (Node node in nodeList) { if (node.ID == originID) { continue; } PassedPath pPath = planCourse[node.ID]; if (pPath.BeProcessed) { continue; } if (pPath.Weight < weight) { weight = pPath.Weight; destNode = node; } } return destNode; } #endregion #endregion } //[STAThread] static void Main(string[] args) { ArrayList nodeList = new ArrayList(); //***************** A Node ******************* Node aNode = new Node("A"); nodeList.Add(aNode); //A -> B Edge aEdge1 = new Edge(); aEdge1.StartNodeID = aNode.ID; aEdge1.EndNodeID = "B"; aEdge1.Weight = 10; aNode.EdgeList.Add(aEdge1); //A -> C Edge aEdge2 = new Edge(); aEdge2.StartNodeID = aNode.ID; aEdge2.EndNodeID = "C"; aEdge2.Weight = 20; aNode.EdgeList.Add(aEdge2); //A -> E Edge aEdge3 = new Edge(); aEdge3.StartNodeID = aNode.ID; aEdge3.EndNodeID = "E"; aEdge3.Weight = 30; aNode.EdgeList.Add(aEdge3); //***************** B Node ******************* Node bNode = new Node("B"); nodeList.Add(bNode); //B -> C Edge bEdge1 = new Edge(); bEdge1.StartNodeID = bNode.ID; bEdge1.EndNodeID = "C"; bEdge1.Weight = 5; bNode.EdgeList.Add(bEdge1); //B -> E Edge bEdge2 = new Edge(); bEdge2.StartNodeID = bNode.ID; bEdge2.EndNodeID = "E"; bEdge2.Weight = 10; bNode.EdgeList.Add(bEdge2); //***************** C Node ******************* Node cNode = new Node("C"); nodeList.Add(cNode); //C -> D Edge cEdge1 = new Edge(); cEdge1.StartNodeID = cNode.ID; cEdge1.EndNodeID = "D"; cEdge1.Weight = 30; cNode.EdgeList.Add(cEdge1); //***************** D Node ******************* Node dNode = new Node("D"); nodeList.Add(dNode); //***************** E Node ******************* Node eNode = new Node("E"); nodeList.Add(eNode); //C -> D Edge eEdge1 = new Edge(); eEdge1.StartNodeID = eNode.ID; eEdge1.EndNodeID = "D"; eEdge1.Weight = 20; eNode.EdgeList.Add(eEdge1); RoutePlanner planner = new RoutePlanner(); RoutePlanResult result = planner.Paln(nodeList, "A", "D"); planner = null; ``` ```
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
Android 9.0系统新特性,对刘海屏设备进行适配
其实Android 9.0系统已经是去年推出的“老”系统了,这个系统中新增了一个比较重要的特性,就是对刘海屏设备进行了支持。一直以来我也都有打算针对这个新特性好好地写一篇文章,但是为什么直到拖到了Android 10.0系统都发布了才开始写这篇文章呢?当然,一是因为我这段时间确实比较忙,今年几乎绝大部分的业余时间都放到写新书上了。但是最主要的原因并不是这个,而是因为刘海屏设备的适配存在一定的特殊性
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
碎片化的时代,如何学习
今天周末,和大家聊聊学习这件事情。 在如今这个社会,我们的时间被各类 APP 撕的粉碎。 刷知乎、刷微博、刷朋友圈; 看论坛、看博客、看公号; 等等形形色色的信息和知识获取方式一个都不错过。 貌似学了很多,但是却感觉没什么用。 要解决上面这些问题,首先要分清楚一点,什么是信息,什么是知识。 那什么是信息呢? 你一切听到的、看到的,都是信息,比如微博上的明星出轨、微信中的表情大战、抖音上的...
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法不过,当我看了源代码之后这程序不到50
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
MySQL数据库总结
文章目录一、数据库简介二、MySQL数据类型(5.5版本)三、Sql语句(1)Sql语句简介(2)数据定义语言DDLcreate,alter,drop(3)数据操纵语言DMLupdate,insert,delete(4)数据控制语言DCLgrant,revoke(5)数据查询语言DQLselect(6)分组查询与分页查询group by,limit四、完整性约束(单表)五、多表查询六、MySQL数
记一次腾讯面试:进程之间究竟有哪些通信方式?如何通信? ---- 告别死记硬背
有一次面试的时候,被问到进程之间有哪些通信方式,不过由于之前没深入思考且整理过,说的并不好。想必大家也都知道进程有哪些通信方式,可是我猜很多人都是靠着”背“来记忆的,所以今天的这篇文章,讲给大家详细着讲解他们是如何通信的,让大家尽量能够理解他们之间的区别、优缺点等,这样的话,以后面试官让你举例子,你也能够顺手拈来。 1、管道 我们来看一条 Linux 的语句 netstat -tulnp | gr...
20行Python代码爬取王者荣耀全英雄皮肤
引言 王者荣耀大家都玩过吧,没玩过的也应该听说过,作为时下最火的手机MOBA游戏,咳咳,好像跑题了。我们今天的重点是爬取王者荣耀所有英雄的所有皮肤,而且仅仅使用20行Python代码即可完成。 准备工作 爬取皮肤本身并不难,难点在于分析,我们首先得得到皮肤图片的url地址,话不多说,我们马上来到王者荣耀的官网: 我们点击英雄资料,然后随意地选择一位英雄,接着F12打开调试台,找到英雄原皮肤的图片
程序设计的5个底层逻辑,决定你能走多快
阿里妹导读:肉眼看计算机是由CPU、内存、显示器这些硬件设备组成,但大部分人从事的是软件开发工作。计算机底层原理就是连通硬件和软件的桥梁,理解计算机底层原理才能在程序设计这条路上越走越快,越走越轻松。从操作系统层面去理解高级编程语言的执行过程,会发现好多软件设计都是同一种套路,很多语言特性都依赖于底层机制,今天董鹏为你一一揭秘。 结合 CPU 理解一行 Java 代码是怎么执行的 根据冯·诺...
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问