蒙特卡洛法,也称为统计模拟方法,是二十世纪四十年代中期由于科学技术的发展和电子计算机的发明,而被提出的一种以概率统计理论为指导的一类非常重要的数值计算方法。是指使用随机数(或更常见的伪随机数)来解决很多计算问题的方法。【摘自维基百科】
- 用蒙地卡羅方法模拟某一过程时,需要产生各种概率分布的随机变量
- 用统计方法把模型的数字特征估计出来,从而得到实际问题的数值解
| /** | |
| This snippet is a c++ version of the c# code from http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm | |
| */ | |
| #include <iostream> | |
| #include <string> | |
| #include <cmath> | |
| using namespace std; | |
| double LD(string sRow,string sCol){ |
| #!/bin/bash | |
| site_available_dir=/etc/apache2/sites-available/ | |
| site_enabled_dir=/etc/apache2/sites-enabled/ | |
| [email protected] | |
| action=() | |
| name= | |
| port= | |
| usage (){ | |
| echo "$0 -C|-R -N site_name -P port_number -D document_root" |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <iostream> | |
| using namespace std; | |
| inline int rightshiftindex(int index,int offset, int len){ | |
| if(index+offset>=len){ | |
| return (index+offset)-len; | |
| } |
| <?php | |
| /** | |
| * Created by IntelliJ IDEA. | |
| * User: bill | |
| * Date: 2018/11/06 | |
| * Time: 13:24 | |
| */ | |
| use InvalidArgumentException; |
| q |
| // 打开要导出的腾讯文档 Excel 页面 | |
| // Control+Shift+I,打开 Chrome/Edge 网页调试工具 | |
| // Control+Shift+F,源代码搜索 this.app.workbook.worksheetManager.activeSheet | |
| // 双击搜索结果,在定位到的行的左侧加上断点(加完断点后,显示一个红色的点或者蓝色的标签) | |
| // 刷新页面,等断点停止后,在控制台运行:window.workbook = this.app.workbook; | |
| // 按下 F8 继续代码运行。等页面中表格全部显示后,控制台运行: | |
| let lines = []; | |
| window.workbook.worksheetManager.sheetList.forEach((sheet) => { | |
| sheet.cellDataGrid.blockMatrix.forEach((row) => { |
| import { from, of, Observable, merge, interval } from "rxjs"; | |
| import { | |
| mergeMap, | |
| map, | |
| toArray, | |
| catchError, | |
| distinct, | |
| share, | |
| take, | |
| last, |