Рубрики
PHP

Настройка WordPress

  • Настройка стиля WordPress
    • Внешний вид
      • Темы
        • Twenty Twenty = Активировать
  • привязка php файла к файлу php в WordPress по теме
    • Внешний вид\Редактор тем
  • Раздел Функций
    • localhost\wp-content\themes\twentytwenty\functions.php
      • include_once $_SERVER[‘DOCUMENT_ROOT’].’/IDE/wp/wp_functions.php’;
    • localhost\IDE\wp\wp_functions.php
      • include_once__DIR__.»/ajax_wp/main.php»;
  • localhost\wp-content\themes\twentytwenty\footer.php
    • include_once__DIR__.»/ajax_wp/main.php»;
include_once $_SERVER['DOCUMENT_ROOT'].'/IDE/src/WordPress/ToolTip/main.php';
Рубрики
PHP Visual Studio Code WordPress project

Настройка проекта в локальном редакторе VSCode для WordPress хостинга

  • настройка IDE
    • F:\project\VSCode\Web\OSPanel\domains\localhost\IDE
      • локальный путь редактирование проекта
    • добавить в список проектов IDE
      • плагин Projects Manager
  • создание GIT
    • .gitignore
    • структура проекта
      • src
      • dist
    • создание репозитория в GitHub
    • создание туннеля SSH на хостинг с WordPress (плагин SFTP)
      • .vscode\sftp.json
      • настройка на хостинге (на примере Джино)
        • добавить доступ для своего IP
      • uploadFolder
        • отправить файлы с локального проекта

Рубрики
Delphi Desktop App development Windows

Delphi «Сохранение/Загрузка значения из Регистра ОС»

  • unit Main;
    • interface
      • uses
        • Winapi.Windows, Winapi.Messages,
        • System.SysUtils, System.Variants, System.Classes,
        • Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls,Vcl.StdCtrls;
      • type TfmUnity = class(TForm)
        • pg: TPageControl;
        • TabSheet1: TTabSheet;
        • tabOptions: TTabSheet;
        • gbField: TGroupBox;
        • editField: TEdit;
        • procedure gbFieldClick(Sender: TObject);
        • procedure FormCreate(Sender: TObject);
        • private { Private declarations }
        • public { Public declarations }
      • end;
    • var fmUnity: TfmUnity;
    • implementation
      • uses Registry, FileCtrl; //путь к файлу
      • {$R *.dfm}
      • procedure ЗаписатьВРеестр(val:string; name:string=Str1;project:string=namespace_unity);
        • var reg : tregistry;
        • begin
          • reg := tregistry.create;
          • try
            • reg.RootKey := HKEY_CURRENT_USER; reg.OpenKey(Software\Microsoft\Windows\+project,true);
            • reg.WriteString(name, val);
          • finally
            • reg.free;
          • end;
        • end;
      • function ПрочитатьВРеестре(name:string=Str1;project:string=namespace_unity):string;
        • var reg : tregistry;
        • begin
          • reg := tregistry.create;
          • try
            • reg.RootKey := HKEY_CURRENT_USER;
            • reg.OpenKey(Software\Microsoft\Windows\+project,true);
            • Result := reg.ReadString(name);
          • finally
            • reg.free;
          • end;
        • end;
      • procedure TfmUnity.FormCreate(Sender: TObject);
        • begin
          • editField.Text:=ПрочитатьВРеестре(i+editField.tag.ToString());
        • end;
      • procedure TfmUnity.gbFieldClick(Sender: TObject);
        • var SelectedFolder: string;
        • begin
          • if (SelectDirectory(Выберите директорию,»,SelectedFolder)) then
            • begin
              • editField.Text:=SelectedFolder;
              • ЗаписатьВРеестр(SelectedFolder,i+editField.tag.ToString());
            • end;
        • end;
  • end.
Рубрики
Основы.Операторы.Условные Синтаксис

Switch

  • числовой, bool
    • Switch (Значение){…}
      • case  Литерал:
        • БлокКода;
        • break;
      • default:
        • БлокКода;
  • Сокращенный
    • int fun(int op, int a, int b)=>
      • op switch {…};
        • 1 => a + b,
        • 2 => a — b,
        • 3 => a * b,
        • _ => 0
  • охранное условие
    • switch ((a, b)) {…}
      • case (> 0, > 0) when a == b:
        • БлокКода;
        • break;
      • case (> 0, > 0):
        • БлокКода;
        • break;
      • default:
        • БлокКода;
        • break;
Рубрики
public static class stCube256_triangles

Unity(скрипты C#) «Триангуляция Блока по Кубу»

public static readonly byte[,] УникальныеТреугольники=new byte[300, 3]{
{0,2,4},//0
{0,6,3},//1
{2,4,3},//2
{3,4,6},//3
{1,5,2},//4
{0,1,4},//5
{1,5,4},//6
{4,1,5},//7
{4,3,1},//8
{4,6,3},//9
{1,3,7},//10
{0,7,1},//11
{0,6,7},//12
{1,2,7},//13
{4,6,7},//14
{4,7,2},//15
{2,3,5},//16
{3,7,5},//17
{0,3,4},//18
{3,5,4},//19
{0,6,2},//20
{2,7,5},//21
{2,6,7},//22
{4,7,5},//23
{4,10,8},//24
{0,2,10},//25
{0,10,8},//26
{2,8,3},//27
{6,3,8},//28
{2,10,8},//29
{0,1,8},//30
{1,5,10},//31
{1,10,8},//32
{1,6,3},//33
{1,8,6},//34
{1,5,8},//35
{5,10,8},//36
{0,6,1},//37
{1,6,7},//38
{2,8,7},//39
{8,6,7},//40
{2,3,7},//41
{3,5,10},//42
{0,3,10},//43
{0,5,2},//44
{0,7,5},//45
{6,7,8},//46
{8,7,10},//47
{5,10,7},//48
{6,8,11},//49
{0,8,3},//50
{3,8,11},//51
{3,4,8},//52
{1,4,8},//53
{1,8,3},//54
{0,8,1},//55
{1,8,7},//56
{7,8,11},//57
{2,4,1},//58
{1,4,11},//59
{1,11,7},//60
{4,8,11},//61
{0,5,4},//62
{0,3,7},//63
{0,7,2},//64
{0,11,7},//65
{0,8,11},//66
{4,8,5},//67
{5,8,7},//68
{8,11,7},//69
{4,10,6},//70
{6,10,11},//71
{0,10,11},//72
{0,11,6},//73
{0,4,10},//74
{0,10,3},//75
{3,10,11},//76
{2,11,3},//77
{2,10,11},//78
{4,10,11},//79
{4,11,6},//80
{0,1,6},//81
{6,1,11},//82
{1,5,11},//83
{5,10,11},//84
{1,11,3},//85
{1,10,11},//86
{0,10,6},//87
{1,2,10},//88
{1,10,7},//89
{7,10,11},//90
{0,3,6},//91
{0,4,11},//92
{5,9,10},//93
{1,9,2},//94
{2,9,10},//95
{1,9,10},//96
{0,10,4},//97
{0,1,10},//98
{1,4,3},//99
{1,10,4},//100
{1,2,4},//101
{1,4,6},//102
{2,3,10},//103
{3,9,10},//104
{3,7,9},//105
{4,7,10},//106
{7,9,10},//107
{0,7,4},//108
{0,10,2},//109
{0,6,10},//110
{6,7,10},//111
{4,6,10},//112
{4,9,8},//113
{4,5,9},//114
{0,2,5},//115
{0,5,8},//116
{5,9,8},//117
{2,8,6},//118
{2,5,8},//119
{2,6,3},//120
{1,4,2},//121
{1,8,4},//122
{1,9,8},//123
{0,1,9},//124
{0,9,8},//125
{0,4,2},//126
{0,2,8},//127
{1,2,5},//128
{7,9,8},//129
{2,7,9},//130
{2,9,4},//131
{0,7,9},//132
{6,9,8},//133
{6,7,9},//134
{1,10,2},//135
{1,9,4},//136
{4,9,10},//137
{1,9,3},//138
{3,9,11},//139
{4,8,10},//140
{7,9,11},//141
{1,8,10},//142
{1,10,5},//143
{2,8,10},//144
{2,3,8},//145
{3,6,8},//146
{0,8,10},//147
{4,9,11},//148
{0,2,11},//149
{2,5,11},//150
{5,9,11},//151
{0,4,5},//152
{0,5,3},//153
{3,5,11},//154
{2,5,3},//155
{1,9,11},//156
{1,11,4},//157
{1,11,6},//158
{1,6,0},//159
{4,5,6 },//160
{5,9,6},//161
{6,9,11},//162
{0,4,1},//163
{1,4,5},//164
{2,3,4},//165
{3,6,4},//166
{7,11,9},//167
{2,4,6},//168
{1,3,9},//169
{3,11,9},//170
{1,11,9},//171
{6,11,1},//172
{1,2,6},//173
{1,6,9},//174
{6,11,9},//175
{3,9,5},//176
{0,3,5},//177
{3,11,5},//178
{5,11,9},//179
{0,6,11},//180
{0,11,2},//181
{2,11,5},//182
{4,6,5},//183
{5,6,9},//184
{2,10,3},//185
{3,10,9},//186
{3,9,7},//187
{6,11,8},//188
{2,1,5},//189
{5,10,9},//190
{1,7,3},//191
{1,10,9},//192
{0,3,8},//193
{3,11,8},//194
{1,4,10},//195
{8,6,11},//196
{6,8,7},//197
{7,8,9},//198
{3,8,9},//199
{2,4,8},//200
{3,8,7},//201
{0,8,7},//202
{0,7,3},//203
{5,8,9},//204
{1,8,9},//205
{1,6,8},//206
{1,3,6},//207
{0,9,1},//208
{0,8,9},//209
{4,8,9},//210
{1,4,9},//211
{4,9,5},//212
{0,8,5},//213
{6,10,7},//214
{7,10,9},//215
{9,7,10},//216
{3,10,7},//217
{1,7,6},//218
{6,10,9},//219
{0,10,1},//220
{2,6,4},//221
{2,3,6},//222
{5,7,10},//223
{7,11,10},//224
{5,11,10},//225
{5,7,11},//226
{3,5,7},//227
{6,11,10},//228
{1,11,10},//229
{1,7,11},//230
{2,11,10},//231
{1,3,10},//232
{3,11,10},//233
{0,11,10},//234
{0,3,11},//235
{0,11,4},//236
{4,11,10},//237
{4,6,11},//238
{4,5,8},//239
{5,7,8},//240
{7,11,8},//241
{5,8,2},//242
{0,4,3},//243
{3,4,5},//244
{2,5,7},//245
{2,7,3},//246
{1,7,8},//247
{0,1,7},//248
{0,7,8},//249
{1,11,8},//250
{1,3,11},//251
{3,8,4},//252
{5,7,6},//253
{5,6,8},//254
{5,8,10},//255
{6,8,10},//256
{7,8,10},//257
{1,7,10},//258
{0,8,2},//259
{8,10,3},//260
{4,5,7},//261
{4,7,6},//262
{0,2,7},//263
{0,7,6},//264
{3,4,7},//265
{4,1,7},//266
{1,6,4},//267
{0,5,1},//268
{2,1,11},//269
{3,7,6},//270
{6,7,11},//271
{8,11,9},//272
{8,9,10},//273
{0,8,4},//274
{0,6,8},//275
{3,7,11},//276
{3,11,6},//277
{8,4,2},//278
{8,2,1},//279
{1,5,9},//280
{1,9,7},//281
{8,4,0},//282
{8,0,6},//283
{4,5,2},//284
{5,4,10},//285
{0,2,3},//286
{2,1,3},//287
{6,3,11},//288
{4,0,8},//289
{7,1,8},//290
{10,5,9},//291
{3,10,4},//292
{9,10,11},//293
{8,11,10},//294
{0,2,1},//295
{0,1,3},//296
{3,10,6},//297
{6,10,8},//298
{1,10,3},//299
}