-
MY PROJECTS
-
Recent Posts
- SQL.How can you compare two nullable values safely, and how does IS DISTINCT FROM differ from <>?
- SQL.How are NULL values ordered by ORDER BY, how do defaults differ between databases, and how can you control their placement?
- SQL.How does NULL propagate through arithmetic expressions, and how can COALESCE and NULLIF help handle missing values and division by zero?
- SQL.How does NULL affect join conditions, and why can filtering the right-hand table in WHERE remove unmatched rows from a LEFT JOIN?
- SQL.How do GROUP BY and DISTINCT treat NULL values, even though NULL = NULL evaluates to UNKNOWN?
- SQL.How do aggregate functions handle NULL, and what is the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column)?
- SQL.How does NULL affect IN and NOT IN, and why can NOT EXISTS be a safer choice when a subquery returns nullable values?
- SQL.How do WHERE, HAVING, and CHECK constraints treat conditions that evaluate to UNKNOWN?
- SQL.Why do column = NULL and column <> NULL not work as expected, and when should you use IS NULL and IS NOT NULL?
- SQL.What is SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), and how do AND, OR, and NOT behave with UNKNOWN?
- ChromeDevTools.Watch all failed requests
- SQL.What are domain types (or constraints on data types), and how do they help enforce data correctness?
- SQL.How does SQL handle comparisons between different data types (for example, string vs number), and why is this dangerous?
- SQL.What is the difference between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ, and which one should be used for business events?
- SQL.How do numeric types like INTEGER, BIGINT, DECIMAL, and FLOAT differ in terms of precision and use cases?
- SQL.What problems can arise from implicit type casting in SQL, and how can it affect indexes?
- SQL.How does NULL differ from 0, an empty string, or FALSE in SQL?
- SQL.What is the difference between CHAR, VARCHAR, and TEXT, and when would you choose each?
- SQL.What is MVCC ?
- SQL.What is AutoVacuum Postgres ?
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Category Archives: Delphi
Delphi IDE Colorizer – did you know about?
Yesterday opened for myself Delphi IDE Colorizer (DIC). Cool thing – see attachment pic !!! It has dozens of themes, transparent menu, with Delphi Theme Editor together you can customize IDE as you wish. And it is free. I downloaded … Continue reading
Posted in Delphi
Comments Off on Delphi IDE Colorizer – did you know about?
Delphi. UniGUI. Synchronious and ASynchronious modes
about ShowModal in VCL and not only http://www.unigui.com/doc/online_help/synch-and-asynch-operations.htm
Posted in Delphi
Comments Off on Delphi. UniGUI. Synchronious and ASynchronious modes
Delphi. Converting TRichView2PDF
According to this and this i created my wrapper unit to convert trichview docs to pdf like this download and install SynopsePDF use my unit 09_SynopsePDF to convert to PDF from trichView like this also helpful for me was that forum having sRichView which … Continue reading
Posted in Delphi
Comments Off on Delphi. Converting TRichView2PDF
MySQL. Seconds to hours / min / sec
example from project
|
1 2 3 4 |
select 4827 div 60 div 60 into @h; select (4827-@h*60*60) div 60 into @m; select (4827-(@h*60*60)-(@m*60)) into @s; select @h,@m,@s; |
elementary, but in practice… or just select SEC_TO_TIME(4827); documentation is your friend!
Posted in Delphi
Comments Off on MySQL. Seconds to hours / min / sec
Delphi. Tiobe. November 2017 – 9th and growing!
https://tproger.ru/news/tiobe-november-2017/amp/
Posted in Delphi
Comments Off on Delphi. Tiobe. November 2017 – 9th and growing!
Delphi. Pearson criteria for testing normal distribution
Ok, Pearson criteria may be used for any distribution you like, but most popular is normal theory from book “Econometrics” of Kochetkov and Tolokonnikov Pearson criteria will help to understand if distribution in normal?
Posted in Delphi
Comments Off on Delphi. Pearson criteria for testing normal distribution
Delphi. Descriptive statistics. Intro
libs that i found on the net tpmath alglib example of counting Pearson Correlation and binom probability
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
unit uMyMath; interface uses System.SysUtils, System.Classes, Math; type TMyMath = class(TDataModule) public class function CorrelPearson(x, y: TArray<double>): double; class function Factorial(aNumber: Integer): extended; class function BinomProbability(k, n: Integer; p: double): extended; class function BinominalKoeff(k, n: Integer): extended; class function AlphaCronbah(avCorr:Double; n: Integer): extended; end; implementation {%CLASSGROUP 'Vcl.Controls.TControl'} {$R *.dfm} class function TMyMath.AlphaCronbah(avCorr:Double; n: Integer): extended; var d1, d2, d3:double; begin d1 := avCorr * n; d2 := 1 + (n-1) * avCorr; result := d1 / d2; end; class function TMyMath.BinominalKoeff(k, n: Integer): extended; var d1, d2, d3: extended; begin d1 := Factorial(n); d2 := Factorial(n - k); d3 := Factorial(k); Result := d1 / (d2 * d3); end; class function TMyMath.BinomProbability(k, n: Integer; p: double): extended; var bk: Double; p1, p2: Extended; begin bk := BinominalKoeff(k, n); p1 := Power(p, k); p2 := Power(1 - p, n - k); Result := bk * p1 * p2; end; class function TMyMath.CorrelPearson(x, y: TArray<double>): double; var d1, d2, d3, d4: double; i: Integer; begin d1 := 0.00; d2 := 0.00; d3 := 0.00; d4 := 0.00; for i := Low(x) to High(x) do begin d1 := d1+(x[i]-mean(x))*(y[i]-mean(y)); d2 := d2+Power((x[i]-mean(x)),2); d3 := d3+Power((y[i]-mean(y)),2); end; d4 := Sqrt(d2 * d3); Result := d1 / d4; end; class function TMyMath.Factorial(aNumber: Integer): extended; var i: Integer; begin if aNumber < 0 then raise Exception.Create('The factorial function is not defined for negative integers.'); Result := 1; for i := 1 to aNumber do Result := Result * i; end; end. |
Posted in Delphi
Comments Off on Delphi. Descriptive statistics. Intro
Delphi. FastReport. VCL. Even and not even table strings
Link
Posted in Delphi, FastReport
Comments Off on Delphi. FastReport. VCL. Even and not even table strings
Delphi.FastReport. fr3 and fp3 difference
Hello. Has a task to save prepared reports and open them later in fastReportViewer, Spend 4 days to write this .fr3 is a model – it doesn’t contains data .fp3 is a data, prepared report So, how to save prepared … Continue reading
Posted in Delphi
Comments Off on Delphi.FastReport. fr3 and fp3 difference
MySQL. Cursor. Example from project
What is cursor – it is like query that returns some dataset… but all code works on SQL server side… Code by my friend…
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
CREATE DEFINER=`root`@`localhost` PROCEDURE `CopyOrders`(lid_ord int,lid_firm int,ldt_begin date,ldt_end date,lworker int) BEGIN DECLARE aDate date default ldt_begin; DECLARE aid_ord int; DECLARE aold_id_oj int; DECLARE anew_id_oj int; DECLARE done INT DEFAULT FALSE; DECLARE old_cur CURSOR FOR select id_oj from ord_job where id_ord=lid_ord order by id_oj; DECLARE new_cur CURSOR FOR select id_oj from ord_job where id_ord=aid_ord order by id_oj; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK; DECLARE EXIT HANDLER FOR SQLWARNING ROLLBACK; START TRANSACTION; select ADDDATE(aDate, INTERVAL -1 DAY) into aDate; REPEAT select ADDDATE(aDate, INTERVAL 1 DAY) into aDate; insert into orders (id_firm,dt_ord) values (lid_firm,aDate); SET aid_ord = (select LAST_INSERT_ID()); insert into ord_job (id_ord,id_job,count,time_begin,time_end,sex,age,ethnic,memo,med_book) (select aid_ord,id_job,count,time_begin,time_end,sex,age,ethnic,memo,med_book from ord_job where id_ord=lid_ord and fl_active=1); if lworker=1 then Open old_cur; Open new_cur; SET done = FALSE; read_loop: LOOP FETCH old_cur INTO aold_id_oj; FETCH new_cur INTO anew_id_oj; IF done THEN LEAVE read_loop; END IF; insert into orders_b (id_ord,id_oj,id_user,id_worker,id_job,time_begin,time_end,tarif,shtraf,bonus) (select aid_ord,anew_id_oj,id_user,id_worker,id_job,time_begin,time_end,tarif,shtraf,bonus from orders_b where id_oj=aold_id_oj and fl_active=1); END LOOP; Close old_cur; Close new_cur; end if; UNTIL aDate >= ldt_end END REPEAT; COMMIT; END |
Posted in Delphi
Comments Off on MySQL. Cursor. Example from project