This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module HelloExcelSplit | |
open ExcelDna.Integration | |
let splitIndex (group: int) (total: int): seq<seq<int>> = | |
let d = total / group | |
let m = total % group | |
let counts = seq { for i in 0 .. group - 1 do yield d + if i < m then 1 else 0 } | |
let (_, xs) = Seq.fold (fun (a, xs) x -> (a + x, Seq.append xs (Seq.singleton (seq { a .. a + x - 1 })))) (0, Seq.empty) counts | |
xs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// outer.exe | |
using System; | |
namespace ConsoleApplication1 | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// property省略 | |
#include <Controls\Dialog.mqh> | |
CAppDialog dialog; | |
int OnInit() { | |
dialog.Create(ChartID(), "Test Dialog", 0, 100, 100, 600, 400); | |
dialog.Run(); | |
return INIT_SUCCEEDED; |