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
| procedure TForm3.FormPaint(Sender: TObject); | |
| var | |
| x0,y0, i:integer; | |
| begin | |
| if insideNumber <> -1 then | |
| begin | |
| x0:= round(Form3.ClientWidth / 2); | |
| y0:= round(Form3.ClientHeight / 2); | |
| With Form3.Canvas do |
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
| procedure TForm1.N7Click(Sender: TObject); | |
| var | |
| i : integer; | |
| outputString: string; | |
| begin | |
| try | |
| // Resizing our arrays | |
| SetLength(lineArray, pairNumber); | |
| SetLength(circleArray, pairNumber); | |
| for i := 1 to pairNumber do // iterating over grid rows to create objects |
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
| procedure TForm1.btn1Click(Sender: TObject); | |
| var | |
| i: integer; | |
| begin | |
| try | |
| pairNumber := StrToInt(edt1.Text); | |
| if pairNumber <= 0 then // checking for negative values | |
| begin | |
| ShowMessage('×èñëî ïàð äîëæíî áûòü ïîëîæèòåëüíî.'); | |
| exit; |
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
| unit Unit1; | |
| interface | |
| uses | |
| Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
| Dialogs; | |
| type | |
| TForm1 = class(TForm) |
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
| def create_plot(grid_scores, plot_name): | |
| scores = [[item[0]['C'], | |
| item[1], | |
| (np.sum((item[2]-item[1])**2)/(item[2].size-1))**0.5] for item in optimizer.grid_scores_] | |
| scores = np.array(scores) | |
| plt.plot(scores[:,0], scores[:,1]) | |
| plt.title(plot_name) | |
| plt.xlabel('Parametr values') | |
| plt.ylabel('Sandard deviation') | |
| plt.show() |
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
| program ConsoleObj; | |
| {$APPTYPE CONSOLE} | |
| uses | |
| SysUtils, | |
| Math; | |
| Type line = class {объявление класса прямая} | |
| private | |
| Xstart, Ystart, Xend, Yend : real; | |
| public |
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
| program ConsoleObj; | |
| {$APPTYPE CONSOLE} | |
| uses | |
| SysUtils, | |
| Math; | |
| Type point = class {объявление класса точка} | |
| private | |
| X, Y : real; | |
| public | |
| constructor create(X, Y : real); |
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
| program ConsoleNoObj; | |
| {$APPTYPE CONSOLE} | |
| uses | |
| SysUtils, | |
| Math; | |
| Var pairNumber : integer; | |
| {число пар окружность - прямая} | |
| Xcircle, Ycircle, XlineStart, YlineStart, XlineEnd, YlineEnd : array of real; | |
| {координаты центров окружностей и начальных/конечных точек прямых} |
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
| program ConsoleNoObj; | |
| {$APPTYPE CONSOLE} | |
| uses | |
| SysUtils, Math; | |
| var | |
| R, x0, y0, x1, y1, xC, yC : real; | |
| ans : string; |
NewerOlder