Skip to content

Instantly share code, notes, and snippets.

SmiSoft

Block or report user

Report or block SmiSoft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SmiSoft
SmiSoft / PropOwner.php
Last active Jul 29, 2018
Automatic read-only and read-write properties support in PHP
View PropOwner.php
<?php
/**
* Automatic read-only and read-write properties support in PHP
*
* Summary:
* protected $r_readonlyProp=12; - an read-only property, read with print($class->readonlyProp);
* write $class->readonlyProp=1; will trigger warning
* protected $rw_readwriteProp=44; - an read-write property, read with print($class->readwriteProp);
* write $class->readwriteProp=1; without restrictions
* protected $rw_getsetProp=7; - a property, that will be read using getter and write using setter.
@SmiSoft
SmiSoft / FileWatch.pas
Created Jan 9, 2019
Компонент для отслеживания изменений в файловой системе
View FileWatch.pas
unit FileWatch;
interface
Uses
Windows, SysUtils, Classes;
Const
MAX_FAILS=12;
FAIL_TIMEOUT=12;
@SmiSoft
SmiSoft / DirectoryWatch.pas
Created Jan 9, 2019
Компонент для отслеживания изменений в файловой системе
View DirectoryWatch.pas
{
Модуль слежения за изменениями в файловой системе.
Пример применения:
Создание:
var
Waiter:TDirectoryWatch;
...
Waiter:=TDirectoryWatch.Create;
// подключение объектных, или простых обработчиков
Waiter.OnObjectAdd:=GetAdd;
You can’t perform that action at this time.