можно ли сделать встраивание только с помощью JS, чтобы обойтись статичным локальным приложением?
Важно: Следствием вышеуказанных пунктов является то, что механизм встраивания доступен только для серверных приложений!
{{url вебхука, который вам выдали}}/placement.bind?PLACEMENT=TASK_VIEW_TAB&HANDLER={{адрес из шага 3}}&TITLE={{My awesome APP}}
CREATE TABLE [Telemetry] (
[Id] bigint NOT NULL IDENTITY,
[Login] nvarchar(200) NULL,
[DisplayName] nvarchar(200) NULL,
[Url] nvarchar(400) NULL,
[Start] datetime2 NOT NULL,
[End] datetime2 NULL,
[Duration] int NULL,
[PageName] nvarchar(400) NULL,
[CourseId] uniqueidentifier NOT NULL,
[PageNumber] nvarchar(200) NULL,
CONSTRAINT [PK_Telemetry] PRIMARY KEY ([Id])
);
GO
CREATE INDEX [IX_Telemetry_CourseId] ON [Telemetry] ([CourseId]);
GO
CREATE INDEX [IX_Telemetry_Login] ON [Telemetry] ([Login]);
GO
CREATE INDEX [IX_Telemetry_PageNumber] ON [Telemetry] ([PageNumber]);
GO
CREATE INDEX [IX_Telemetry_Status] ON [Telemetry] ([Start]);
GO
------ Изменение размера -----------
DROP INDEX [IX_Telemetry_PageNumber] ON [Telemetry];
DECLARE @var0 sysname;
SELECT @var0 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Telemetry]') AND [c].[name] = N'PageNumber');
IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [Telemetry] DROP CONSTRAINT [' + @var0 + '];');
ALTER TABLE [Telemetry] ALTER COLUMN [PageNumber] nvarchar(20) NULL;
CREATE INDEX [IX_Telemetry_PageNumber] ON [Telemetry] ([PageNumber]);
GO
DROP INDEX [IX_Telemetry_Login] ON [Telemetry];
DECLARE @var1 sysname;
SELECT @var1 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Telemetry]') AND [c].[name] = N'Login');
IF @var1 IS NOT NULL EXEC(N'ALTER TABLE [Telemetry] DROP CONSTRAINT [' + @var1 + '];');
ALTER TABLE [Telemetry] ALTER COLUMN [Login] nvarchar(20) NOT NULL;
CREATE INDEX [IX_Telemetry_Login] ON [Telemetry] ([Login]);
GO
DECLARE @var2 sysname;
SELECT @var2 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Telemetry]') AND [c].[name] = N'DisplayName');
IF @var2 IS NOT NULL EXEC(N'ALTER TABLE [Telemetry] DROP CONSTRAINT [' + @var2 + '];');
ALTER TABLE [Telemetry] ALTER COLUMN [DisplayName] nvarchar(100) NULL;
GO
INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'20200922061931_ChangeSizes', N'3.1.8');
GO
-- изменение курса с гуида на строку
EXEC sp_rename N'[Telemetry].[IX_Telemetry_Status]', N'IX_Telemetry_Start', N'INDEX';
GO
DROP INDEX [IX_Telemetry_CourseId] ON [Telemetry];
DECLARE @var0 sysname;
SELECT @var0 = [d].[name]
FROM [sys].[default_constraints] [d]
INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id] AND [d].[parent_object_id] = [c].[object_id]
WHERE ([d].[parent_object_id] = OBJECT_ID(N'[Telemetry]') AND [c].[name] = N'CourseId');
IF @var0 IS NOT NULL EXEC(N'ALTER TABLE [Telemetry] DROP CONSTRAINT [' + @var0 + '];');
ALTER TABLE [Telemetry] ALTER COLUMN [CourseId] nvarchar(38) NOT NULL;
CREATE INDEX [IX_Telemetry_CourseId] ON [Telemetry] ([CourseId]);
GO
GO
class ViewController: UIViewController {
var backgroundImageView = UIImageView()
func viewDidLoad() {
super.viewDidLoad()
backgroundImageView.image = UIImage()
}
func changeBackground() {
// Пример смены фона по вызову функции. Объект UIImage должен быть ваш, для примера пустой.
backgroundImageView.image = UIImage()
}
}
Как SQL сообщить логин и пароль от доступа к папке?Насколько я понимаю, вы пытаетесь делать через план обслуживания. А вы вместо этого делайте cmd-скриптом через планировщик заданий. В cmd-скрипте легко можете прописать подключение сетевого диска с указанием пароля,
net use p: \\192.168.1.100\backup p@$$w0rd /USER:vpupkin
а затем уже команду резервного копирования базы. set DATABASENAME=ИмяБазыДанных
set DATESTAMP=%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%-%time:~0,2%-%time:~3,2%
if "%time:~0,1%" == " " set DATESTAMP=%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%-0%time:~1,1%-%time:~3,2%
set BACKUPFILENAME=p:\%DATABASENAME%-%DATESTAMP%.bak
set OSQL="C:\Program Files\Microsoft SQL Server\120\Tools\Binn\OSQL.EXE"
%OSQL% -E -Q "BACKUP DATABASE [%DATABASENAME%] TO DISK='%BACKUPFILENAME%' WITH FORMAT"