// * Центр распределения
$norm = 20;
// * Мягкость распределения
$soft = 4;
// * Считаем и возвращаем результат
return -log( ( ( $x + 1 ) * 1 / ( $norm + 1 ) ), 1.01 + ( 0.02 * $soft ) );
// * Результат такой:
x[0] = 39
x[1] = 30
x[2] = 25
x[3] = 21
x[4] = 18
x[5] = 16
x[6] = 14
x[7] = 12
x[8] = 11
x[9] = 9
x[10] = 8
x[11] = 7
x[12] = 6
x[13] = 5
x[14] = 4
x[15] = 3
x[16] = 2
x[17] = 2
x[18] = 1
x[19] = 0
x[20] = 0
x[21] = 0
x[22] = -1
x[23] = -1
x[24] = -2
x[25] = -2
x[26] = -3
x[27] = -3
x[28] = -4
x[29] = -4
x[30] = -5
x[31] = -5
x[32] = -5
x[33] = -6
x[34] = -6
x[35] = -7
x[36] = -7
x[37] = -7
x[38] = -8
x[39] = -8
x[40] = -8
// * Отлавливаем в browser переход по ссылке
procedure TForm1.WeberBeforeNavigate2(ASender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
var
S: String;
begin
// * Получаем ссылку
S := URL;
// * Сравниваем ссылку с условием
if ( S[1] = 'external.test()' ) then
begin
// * Отменяем переход по ссылке
Cancel := True;
// * Вызываем процедуру
test;
end
end;
SELECT ... FROM ... WHERE ... GROUP BY MONTH( datetime )
SELECT ... FROM ... WHERE ... GROUP BY DATE_FORMAT( datetime, '%m' )
SELECT ... FROM ... WHERE YEAR( datetime ) = 2014 GROUP BY MONTH( datetime )
SELECT ... FROM ... GROUP BY EXTRACT( YEAR_MONTH FROM datetime )
SELECT ... FROM ... GROUP BY DAYOFMONTH( datetime )
<?php
$data = 'Something stupid, ul_tra-sh.op@tut.by.ru.wio something stupid';
echo $data . '<br>';
$data = preg_replace( '/\s([a-zA-Z0-9\.\-\_]+@[a-zA-Z0-9\.\-\_]+\.\w+)\s+/', ' ', $data );
echo $data . '<br>';
?>
Something stupid, ul_tra-sh.op@tut.by.ru.wio something stupid
Something stupid, something stupid