Skip to content

Instantly share code, notes, and snippets.

View Konctantin's full-sized avatar
🎯
Focusing

Konctantin Konctantin

🎯
Focusing
View GitHub Profile
unit DirectoryMonitor;
interface
uses SysUtils, Classes, Windows, Messages;
const WMUSER_DIRECTORYCHANGED = WM_USER + 1;
type
TActionToWatch = (awChangeFileName, awChangeDirName, awChangeAttributes, awChangeSize, awChangeLastWrite, awChangeLastAccess, awChangeCreation, awChangeSecurity);
[guitool "git clean -fd"]
cmd = git clean -f -d
[guitool "git reset --hard"]
cmd = git reset --hard
[guitool "git pull origin master"]
cmd = git pull origin master
[guitool "git submodule update --init --recursive"]
cmd = git submodule update --init --recursive
[guitool "git stash"]
cmd = git stash
# todo: check errors
# todo: save log
# todo: remove bat proxy files
$ftpDir = "E:\FTP"
$tempDir = "E:\FTP\TMP"
$directory = "E:\VagTK"
$project = "vagTK_Dll.groupproj"
$outputDir = "Win32\Debug"
$vagTKdproj= "VAG_SOBSTV\VagTK.dproj"
unit commonUnit.Wait2;
interface
type
TWait = class
/// <summary>
/// Показывает диалог ожидания.
/// </summary>
/// <param name="_title">
-- ****************************************
-- ****************************************
-- x86
53 push ebx
8B DC mov ebx, esp
51 push ecx
51 push ecx
83 E4 F8 and esp, 0FFFFFFF8h
83 C4 04 add esp, 4
CREATE DATABASE [arx]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'arx', FILENAME = N'd:\db\arx\arx.mdf' , SIZE = 5120KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'arx_log', FILENAME = N'd:\db\arx\arx_log.ldf' , SIZE = 2048KB , MAXSIZE = 20480000KB , FILEGROWTH = 10%)
GO
ALTER DATABASE [arx] SET COMPATIBILITY_LEVEL = 100
GO
use [arx]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Гавриляко К.Г.
-- Create date: 2018.03.01
ALTER PROCEDURE [dbo].[pTHP_BackupKCMOD]
@isFullBackup tinyint = 0 -- признак полного выполнения
AS
BEGIN
SET NOCOUNT ON;
declare @arxTdl table(dbName nvarchar(7), isFull tinyint not null default 0, prioritet tinyint);
-- Основная база данных
insert into @arxTdl (dbName, prioritet) values ('kcmod', 1);
-- 3 последних месяца
Send: 4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 48 83 EC 40 33 C0 48 8D
Recv: 48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 41 56 48 83 EC 40 FF 05
@Konctantin
Konctantin / tsql_xml_exchample.sql
Created October 15, 2018 07:42
Exchamples: T-SQL select from XML
declare @xml xml;
set @xml = '
<data>
<row UID="88888888" Date="2014-05-06" DateTime="2014-10-22T13:02:10.17" Value="123" />
<row UID="88883488" Date="2014-10-11" Value="153" />
<row UID="88883488" Date="2014-10-11" DateTime="20141022 13:02" Value="153" />
</data>
'
-- Case 1: xml.nodes
SELECT