C#如何从double数组中选出最大值的下标?
很好奇有没有直接的方式得到double数组里面最大值的下标,查了一下好像没有。
也就是说,你先max出最大值,再遍历一遍获得下标。
微软好像没提供最直接的方法,不过我有注意到即使是double类型,C#也能用linq语句了。
参考来源:
let today = new Beginning();
Click the left button to use the catalog.
C#如何从double数组中选出最大值的下标?
很好奇有没有直接的方式得到double数组里面最大值的下标,查了一下好像没有。
也就是说,你先max出最大值,再遍历一遍获得下标。
微软好像没提供最直接的方法,不过我有注意到即使是double类型,C#也能用linq语句了。
参考来源:
This article was last edited at 2020-09-03 03:52:17
674 Reads
查询是否存在父Id和该表其他Id一致的数据: SELECT * FROM Comments A WHERE EXISTS(SELECT * FROM Comments B WHERE A.`ParentId`=B.`Id`) 这一条可以查询出来到底还要多少条合法子数据。 非法子数据直接加NOT会把父Id=0也筛选出来: SELECT * FROM Comments A WHERE NOT EXISTS(SELECT * FROM Comments B WHERE A.`ParentId`=B.`Id` ) 所以应该再加一句AND ParentId!=0: SELECT * FROM Comments A WHERE NOT EXISTS(SELECT * FROM Comments B WHERE A.`ParentId`=B.`Id`) AND ParentId!=0 但是最后删除的话,用这句其实是不行... OR | From:EKsumic
587 Reads
「敢えて」means I think I can do something, there's no fear. But 「敢えてしない」doesn't mean I cannot do beacause I am afraid to do it. 日本語の「敢えてしない」の意味は「問題なく出来るんだけど、状況を考えて、自主的にしないという選択をする」 I can do it without any problems, but considering the situation, I choose not to do it. This is to not cause trouble to others. 「私は敢えてあなたに迷惑をかけない」意味として... OR | From:EKsumic
578 Reads
How to Force Uninstall Microsoft Edge 1. Open Explorer and navigate to the Edge installation directory, usually C:\Program Files(x86)\Microsoft\Edge\Application. 2. Go to the folder corresponding to the current Edge version number, and go to the "Installer" folder to find setup.exe. 3. After selecting setup.exe, click "Open PowerShell as administrator" in the window "File" 4. Enter the following... OR | From:EKsumic
301 Reads
I think this is a very interesting conversation and I want to share it.この最低賃金で、 1日6時間で月25日間働いたら、 月収はいくらだと思いますか? 13万3200円です。 例えば、働く学生が毎月ここから3万5000円のアパート代払って、 携帯料金払って、で、大学の学費払って、 で、遊ぶ金はゼロだとして、 1日の生活費はいくらだと思います? 770円です。 例えば、この学生がコンビニで、 アルバイトをしたとして... OR | From:EKsumic