2022年4月30日 星期六

Algorithms

 https://www.geeksforgeeks.org/fundamentals-of-algorithms/?ref=lbp

2022年4月29日 星期五

Delphi IDE Tools and Plug-Ins

 Delphi IDE Tools and Plug-Ins
 
Delphi IDE - Integrated Development Eenvironment provides all the tools you need to design, develop, test, debug, and deploy applications, allowing rapid prototyping and a shorter development time. Want more? Here's how to add more functionality to Delphi IDE and make your job easier.
• GExperts
GExperts is a free set of tools built to increase the productivity of Delphi and C++Builder programmers by adding several features to the IDE. GExperts is developed as Open Source software.  More »
• ModelMaker Code Explorer
ModelMaker Code Explorer is a Class Explorer and Refactoring Browser fro Delphi IDE. More »
• Delphi SpeedUp
DelphiSpeedUp is an IDE plugin for Delphi and C++Builder. It improves the IDE’s startup speed and increases the general speed of the whole IDE. This is achieved by replacing some often used RTL functions by FastCode function that are optimized for the used CPU and some other faster implementations. It also employs caches when the IDE loads.  More »
• CnPack IDE Wizards
CnWizards includes the following experts/wizards: Code Input Helper, Enhanced Units/Forms List, Project Extension Tools, Roll Windows and Set to Topmost, Source Codes Statistics, DFM File Convertor, DE Config Backup/Restore Tool, including IDE History Cleaner, ...  More »
• Brilliant Code for Delphi
Automatically search and filling variables, methods, constants, types in selected color, Highlight structures begin .. end, try .. finally .. end and other, Highlight brackets (..) and [..], Error correction offset lines for debugging, ...  More »
• Visual Forms
Visual Forms is a thumbnail viewer for the forms in your project.  More »
• Pascal Analyzer
This program parses Delphi source code and produces reports that help you understand your source code better. You will also be able to identify potential errors and anomalies. Your code will be more readable and maintainable. Pascal Analyzer can also check how coding standard guidelines are followed.  More »
• VssConneXion
VssConneXion provides an integration between CodeGear RAD Studio, Delphi and C++Builder and Visual SourceSafe.  More »
• Castalia for Delphi
Castalia transforms the Delphi programming environment into an amazing development platform. Castalia lives on the bleeding edge of IDE technology, giving you cutting edge tools to write better code faster, understand code more accurately, and improve code you've already written.  More »

ㄅㄅㄅl496456404

 l496456404ㄅㄅㄅl496456404

low temperature Ceramic material spring ceramic spring elasticity Preparation composite ceramic sponges PDMS Sponges

 low temperature Ceramic material spring ceramic spring elasticity Preparation composite ceramic sponges PDMS Sponges

https://www.nature.com/articles/s41467-020-17533-6 

Ajay Giri Prakash Kottapalli PDMS MLG PDMS spongy  Ultralightweight and 3D Squeezable

2022年4月28日 星期四

delphi TFile Stream binary file reader embarcadero

 https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Streams,_Reader_and_Writers

Streams, Reader and Writers - RAD Studio - Embarcadero ...
https://docwiki.embarcadero.com › Strea...
 
This topic lists all stream, reader and writer classes. ... TFileStream enables applications to read from and write to a file on disk. System.Classes.


    Using Streams to Read or Write Data - RAD Studio
    https://docwiki.embarcadero.com › Sydney

 
Stream classes all share several methods for reading and writing data. ... Read is useful when the number of bytes in the file is not known.

Using File Streams - RAD Studio - Embarcadero DocWiki
https://docwiki.embarcadero.com › Sydney
 
Creating and opening files using file streams — The TFileStream class enables applications to read from and write to a file on disk. Because ...

System.IOUtils.TFile.ReadAllBytes - Embarcadero DocWiki
https://docwiki.embarcadero.com › Syste...
 
Reads the contents of the file into a byte array. Use ReadAllBytes to read the contents of a binary file. ReadAllBytes returns a new byte array containing ...

Opening Binary File w/ TFileStream - delphi
http://www.delphigroups.info › delphi
 
 Opening Binary File w/ TFileStream. I'd like some tips on how to go about opening certain types of data files, which I guess would be binary ...
  embarcadero  embarcadero


https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_the_Eof_and_Bof_Properties

http://www.pjh2.de/delphi/articles/files/files.php

Dateizugriffe
Inhaltsverzeichnis:

Einführung
TextFile / Read
File / BlockRead
TFileStream
TFileStream / TReader


template book front cover title subtitle publisher translator author summary blurb table of contents chapter appendix glossary index reference


 

https://tex.stackexchange.com/questions/573047/how-to-format-bibliography-in-table-of-contents-as-part-instead-of-chapter-with

 https://en.wikipedia.org/wiki/Book_design

https://www.iuniverse.com/en/resources/publishing/parts-of-your-book

2022年4月26日 星期二

如何使用 Win32 API 存取 RS232

 http://www.finetech.idv.tw/techdoc/bcbrs232/bcbrs232.htm

 https://stackoverflow.com/questions/820817/low-level-control-of-rs232-com-port-rts-cts-dtr-dsr-possible

Win32 API Communication Functions  

BOOL SetCommState(
    HANDLE hFile,    // handle of communications device
    LPDCB lpDCB            // address of device-control block structure
   );

 
    Windows App Win32 API System Services Winbase.h

SetCommState function (winbase.h)

 
http://delphi-kb.blogspot.com/2009/03/how-to-communicate-with-com-port.html
https://docs.microsoft.com/zh-tw/windows/win32/api/winbase/nf-winbase-setcommstate 


unit ComPort;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TComPort = class(TObject)
  private
    ComID, ComError: Integer;
    DcbOld: TDCB;
    CommTimeoutsOld: TCommTimeouts;
  protected
  public
    function Open(PortNo: integer): boolean;
    procedure Close;
    function Config(Baudrate: DWORD; ByteSize, StopBits, Parity: Byte): boolean;
    function ReadBlock(var Ch: array of char; BlockSize: dword): integer;
    function ReadChar(var Ch: char): boolean;
    function WriteBlock(var Ch: array of char; BlockSize: dword): boolean;
    function WriteChar(Ch: char): boolean;
    procedure Purge;
    function Error: integer;
    constructor Create;
  published
  end;



https://docs.microsoft.com/en-us/previous-versions/ms810467(v=msdn.10)?redirectedfrom=MSDN

Serial Communications in Win32
multiple threading and synchronization in Win32. In addition, a basic understanding of the Win32 heap functions is useful to fully comprehend the memory management methods used by the Multithreaded TTY (MTTTY) 

spcomm mscomm Tcomm Cport CnRS232 MScom SPCOM

Delphi串口通信技术与工程实践

 

https://github.com/MHumm/ComPortDriver

https://github.com/CWBudde/ComPort-Library

https://github.com/joelsernamoreno/WSD/blob/master/tools/nodemcu-flasher-master/SPComm.pas

https://torry.net/pages.php?id=198

http://www.tetraedre.com/advanced/serial/msdn_serial.htm

powershell "$port= new-Object System.IO.Ports.SerialPort

https://theitbros.com/how-to-delete-com-ports-in-use/

Docs Windows Server Windows 命令 參考
mode
顯示 [系統狀態]、[變更系統設定] 或 [重新設定埠] 或 [裝置]。 如果使用時不含參數,則 模式 會顯示主控台和可用 COM 裝置的所有可控制屬性。

https://docs.microsoft.com/zh-tw/windows-server/administration/windows-commands/mode

DLL "LoadLibrary " +"delphi" import dll Libraries and Packages Delphi

 "LoadLibrary "  +"delphi"   import dll Libraries and Packages Delphi

 Dr.Bob's Delphi Clinic: Using C DLLs with Delphi (and HeadConv v4.20)

 https://www.drbob42.com/Delphi/headconv.htm

 http://www.drbob42.com/tools/drbob.htm

 Dr.Bob's SwarTools: Dr.Bob's Collection of Delphi Experts/Wizards v2.50

 https://infosys.beckhoff.com/english.php?content=../content/1033/tcsample_bdelphi/html/TcAdsOcx_Setup_Delphi.htm&id=

 https://www.mql5.com/en/articles/96

https://blogs.embarcadero.com/how-to-use-a-c-dll-in-any-delphi-program/

 http://etutorials.org/Programming/mastering+delphi+7/Part+II+Delphi+Object-Oriented+Architectures/Chapter+10+Libraries+and+Packages/Creating+a+DLL+in+Delphi/

 https://github.com/PacktPublishing/Delphi-High-Performance/tree/master/Chapter%208

 http://etutorials.org/Programming/mastering+delphi+7/Part+II+Delphi+Object-Oriented+Architectures/Chapter+10+Libraries+and+Packages/Using+Existing+DLLs/

http://theprofessionalspoint.blogspot.com/2014/01/calling-conventions-in-delphi-safecall.html

 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Program_Control_(Delphi)

Delphi DLL function stdcall external

COM Component Object Model  

COM+ 

DCOM Distributed Component Object Model

 https://stackoverflow.com/questions/17937225/delphi-how-to-import-type-library-for-new-itextrange2-type-interfaces

 tlibimp Embarcadero Type Library Exporter

 RegAsm

https://blogs.embarcadero.com/using-a-net-assembly-via-com-in-delphi/ 

 DLL external COM Component Object Model  interface

https://docwiki.embarcadero.com/RADStudio/Sydney/en/Overview_of_COM_Technologies

Using Visual C++ DLLs in a C++Builder Project

https://blogs.embarcadero.com/use-the-dll-created-by-visual-c-2017-with-c-builder-win64/

https://www.marshallsoft.com/wsc_4c.pdf

Windows Standard Serial Communications for C/C++ ...

https://github.com/sefcom/honeyplc/blob/master/snap7/doc/Snap7-refman.pdf

https://github.com/sefcom/honeyplc

https://sourceforge.net/projects/libusb-win32/

embarcadero import tools  DLL external COM Component Object Model Importing Type Library Information

https://www.c-sharpcorner.com/UploadFile/nipuntomar/describing-com-component-object-model/

Component Object Model Importing Type Library Information guid interface

 CoCreateInstance IDispatch IUnknow

The following is a list of tips and tricks that might be useful to COM developers of all levels. If you have an interesting tip that's not listed here, please submit it to me and I'll add it to the list if I think it's useful.

http://www.techvanguards.com/com/tutorials/tips.asp

https://www.codeproject.com/Questions/373094/In-the-c-plus-plus-to-Delphi

GPIB-488

 This is one-purpose program created for management of experiment on custom  aparatus. His goal take measurements of values for computation if Seebeck  coefficient

 https://github.com/pinkavaj/seebrez/blob/master/GPIB-488/Language%20Interfaces/Delphi/GPIB.PAS

 seebrez/GPIB-488/Language Interfaces/Delphi/

 https://www.ni.com/zh-tw/support/downloads/drivers/download.ni-488-2.html#442610

  NI-488.2 with LabVIEW

 

 

 

 

 

 

 

 

https://github.com/pinkavaj/seebrez/tree/master/TPCM.

Base64 Image System.NetEncoding.TBase64Encoding

https://github.com/emn178/hi-base64

 https://github.com/whatwg/wattsi/blob/main/src/lib/base64encoder.pas

 https://docwiki.embarcadero.com/Libraries/Sydney/en/System.NetEncoding.TBase64Encoding

unction BaseImage(fn: string): string;
var
    m1: TMemoryStream;
    m2: TStringStream;
    str: string;
begin
    m1 := TMemoryStream.Create;
    m2 := TStringStream.Create('');
    m1.LoadFromFile(fn);
    EncdDecd.EncodeStream(m1, m2);                       
    str := m2.DataString;
    str := StringReplace(str, #13, '', [rfReplaceAll]); 
    str := StringReplace(str, #10, '', [rfReplaceAll]);
    result := str;                                      
    m1.Free;
    m2.Free;
end;

 https://flixengineering.com/archives/270

 http://www.delphimagazine.com/2019/05/21/5-minute-snack-base64-encode-and-decode-images-in-delphi/

  1. procedure TFrmMain.btnLoadImageClick(Sender: TObject);
  2. var
  3. LInput : TMemoryStream;
  4. LOutput: TMemoryStream;
  5. begin
  6. // show open file dialog
  7. if
  8. dlgOpen.Execute then
  9. begin
  10. // load image into image component (TPicture)

  11. Image.Picture.LoadFromFile(dlgOpen.FileName);
  12. LInput := TMemoryStream.Create;
  13. LOutput := TMemoryStream.Create;

  14. // write picture to stream and encode
  15. try
  16. Image.Picture.SaveToStream(LInput);
  17. LInput.Position := 0;
  18. TNetEncoding.Base64.Encode( LInput, LOutput );
  19. LOutput.Position := 0;
  20. Memo.Lines.LoadFromStream( LOutput );
  21. finally
  22. LInput.Free;
  23. LOutput.Free;
  24. end;
  25. end;
  26. end;
  27.  

 

  1. procedure TFrmMain.btnLoadTextClick(Sender: TObject);
  2. var
  3. LInput: TMemoryStream;
  4. LOutput: TMemoryStream;
  5. begin
  6. if dlgOpen.Execute then
  7. begin
  8. Memo.Lines.LoadFromFile(dlgOpen.FileName);
  9. LInput := TMemoryStream.Create;
  10. LOutput := TMemoryStream.Create;

  11. try
  12. Memo.Lines.SaveToStream(LInput);
  13. LInput.Position := 0;
  14. TNetEncoding.Base64.Decode( LInput, LOutput );
  15. LOutput.Position := 0;
  16. Image.Picture.LoadFromStream(LOutput);
  17. finally
  18. LInput.Free;
  19. LOutput.Free;
  20. end;
  21. end;
  22. end;

unit uPublicSHA256WithRsa;

interface

uses Winapi.Windows,System.Classes, System.SysUtils,libeay32,ComObj;


const
  BIO_FLAGS_BASE64_NO_NL = $100;

type
  TSHA1Buffer = array [1..20] of byte;
  TSHA256Buffer= array[1..32] of Byte;
  TRSA_Buf_1024 = array[1..128] of byte; //1024bit RSA 樓躇怀堤
  TRSA_Buf_2048 = array[1..256] of byte; //2048bit RSA 樓躇怀堤

  TAES_Key_128 = array[1..16] of byte;

  TMD5_Digest = array[1..16] of byte;//md5 靡賦彆

  THA256_Digest = array[1..16] of byte; //SHA256 靡賦彆


  PsfAES_CBC_Data=^TsfAES_CBC_Data;
  TsfAES_CBC_Data = record
    InBuf:Pointer;
    InLen:Integer;
    Key:TAES_Key_128;
    ivec:TAES_Key_128;
  end;

  psfRSA = ^libeay32.RSA;

  TSHA256WithRSAOpenSSL=class
  protected
    FstrPublicKey:AnsiString;
    FstrPrivateKey:AnsiString;
  protected
   
    function base64_decode(Data:PAnsiChar;DataLen:Cardinal;bSingleRow:Boolean=FALSE):AnsiString;
 
    function base64_encode(Data:Pointer;Len:Integer;bSingleRow:Boolean=FALSE):AnsiString;

    function LoadPublicKey(PUBLIC_Key:AnsiString):pEVP_PKEY;
    function LoadPrivateKey(PRIVATE_Key:AnsiString):pEVP_PKEY;
  public
    function SHA256WithRSASign(const TextBuf:PAnsiChar;BufLen:Integer):AnsiString;
    function SHA256WithRSASign_verify(Data:PAnsichar;RsaSign:PAnsichar):Boolean;

    constructor Create(PUBLIC_Key,PRIVATE_Key:AnsiString);
    destructor Destroy; override;
  end;


implementation

uses
  uLogThread;

{ TSHA256WithRSAOpenSSL }

function TSHA256WithRSAOpenSSL.base64_decode(Data: PAnsiChar; DataLen: Cardinal;
  bSingleRow: Boolean): AnsiString;
var
  BIO,b64:PBIO;
  L:Integer;
begin
  b64 := Libeay32.BIO_new(BIO_f_base64());
  if bSingleRow then
    BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
  bio := Libeay32.BIO_new_mem_buf(Data,DataLen);
  bio := Libeay32.BIO_push(b64, bio);
  SetLength(Result,DataLen);
  L := Libeay32.BIO_read(bio,PAnsichar(Result),Length(Result));
  SetLength(Result,L);
  Libeay32.BIO_free_all(bio);

end;

function TSHA256WithRSAOpenSSL.base64_encode(Data: Pointer; Len: Integer;
  bSingleRow: Boolean): AnsiString;
var
  bio,b64:libeay32.pBIO;
  bptr: libeay32.PBUF_MEM ;
  pbptr:libeay32.PPBUF_MEM;
  I:Integer;
begin
  b64 := libeay32.BIO_new(BIO_f_base64());
  TRY
    if bSingleRow then
    begin
      libeay32.BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
    end;

    bio := libeay32.BIO_new(BIO_s_mem());

    b64 := BIO_push(b64, bio);

    I := libeay32.BIO_write(b64, Data, Len);
    if I < 0 then
      Exit;
    I := libeay32.BIO_flush(b64);

    pbptr := @bptr;
    I := libeay32.BIO_get_mem_ptr(b64, pbptr); //頗蔚BIO_C_GET_BUF_MEM_PTR紱釬換菰跤bio
    if I < 0 then
    begin
      Result := '';
      Exit;
    end;

    SetLength(Result,bPtr^.length);
    Move(bPtr^.data^,Result[1],bPtr^.length);
  FINALLY
    libeay32.BIO_Free_All(b64); //坻頗庋溫淕跺蟈沭
  END;

end;

constructor TSHA256WithRSAOpenSSL.Create(PUBLIC_Key, PRIVATE_Key: AnsiString);
begin
  try
    OpenSSL_add_all_algorithms;
    OpenSSL_add_all_ciphers;
    OpenSSL_add_all_digests;
    ERR_load_crypto_strings;
    ERR_load_RSA_strings;

    FstrPublicKey :=PUBLIC_Key;
    FstrPrivateKey :=PRIVATE_Key;

    if FstrPublicKey='' then
      raise Exception.Create('PublicKey Invalid');

    if FstrPrivateKey='' then
      raise Exception.Create('Privatekey Invalid');
  except
    on e:Exception do
    begin
      aiLog.Info(Format('[TSHA256WithRSAOpenSSL.Create][message=%s]',[e.Message]));
      raise e;
    end;
  end;
end;

destructor TSHA256WithRSAOpenSSL.Destroy;
begin
  try
    EVP_cleanup;
    ERR_free_strings;
    inherited;
  except
    on e:Exception do
    begin
      aiLog.Info(Format('[TSHA256WithRSAOpenSSL.Destroy]',[e.Message]));
      raise e;
    end;
  end;
end;


function TSHA256WithRSAOpenSSL.LoadPrivateKey(
  PRIVATE_Key: AnsiString): pEVP_PKEY;
var
  keyBO : PBIO;
  aRsa:pEVP_PKEY;
  iRet:integer;
begin
  aRsa :=nil;
  keyBO :=nil;

  keyBO := BIO_new_mem_buf(PAnsiChar(PRIVATE_Key),Length(PAnsiChar(PRIVATE_Key)));
  try
    Result := PEM_read_bio_PrivateKey(keyBO,aRsa,nil,nil);
  finally
    BIO_free_all(keyBO);
  end;
end;

function TSHA256WithRSAOpenSSL.LoadPublicKey(PUBLIC_Key: AnsiString): pEVP_PKEY;
var
  keyBO: PBIO;
  aRsa:pEVP_PKEY;
begin

  aRsa :=nil;
  keyBO :=nil;

  keyBO := BIO_new_mem_buf(PAnsiChar(PUBLIC_Key),Length(PAnsiChar(PUBLIC_Key)));
  try
    Result :=PEM_read_bio_PUBKEY(keyBO,aRsa,nil,nil)
  finally
    BIO_free_all(keyBO);
  end;
end;

function TSHA256WithRSAOpenSSL.SHA256WithRSASign(const TextBuf: PAnsiChar;
  BufLen: Integer): AnsiString;
var
  outSHA256: TSHA256Buffer;
  RSA_SignBinValue: TRSA_Buf_2048;
  CTX:EVP_MD_CTX;
  mLen:cardinal;
  SigLen,iRet:Integer;
  priKey:pEVP_PKEY;
begin
  ZeroMemory(@outSHA256,Length(outSHA256));
  ZeroMemory(@RSA_SignBinValue,Length(RSA_SignBinValue));

  priKey :=LoadPrivateKey(FstrPrivateKey);

  if priKey=nil then exit;

  EVP_MD_CTX_init(@CTX);
  try
    EVP_SignInit(@CTX,EVP_sha256());
    EVP_SignUpdate(@CTX,TextBuf,BufLen);
    EVP_DigestFinal(@CTX,@outSHA256,mLen);
    iRet := libeay32.RSA_sign(EVP_sha256()._type,
                                @outSHA256,
                                mLen,
                                @RSA_SignBinValue,
                                @SigLen,
                                priKey.pkey.rsa);

    if iRet > 0 then
      Result := base64_encode(@RSA_SignBinValue,SizeOf(RSA_SignBinValue),TRUE);
  finally
    EVP_PKEY_free(priKey);
    EVP_MD_CTX_cleanup(@CTX);
  end;
end;

function TSHA256WithRSAOpenSSL.SHA256WithRSASign_verify(Data,
  RsaSign: PAnsichar): Boolean;
var
  Sha256Buf:TSHA256Buffer;
  ctx: EVP_MD_CTX;
  RsaBuf: AnsiString;
  mlen: DWORD;
  iRet: Integer;
  pEVPKey:pEVP_PKEY;
begin
  Result :=false;
  pEVPKey :=LoadPublicKey(FstrPublicKey);

  if pEVPKey=nil then Exit;

  RSA_memory_lock(pEVPKey.pkey.rsa);
  libeay32.EVP_MD_CTX_init(@ctx);
  try
    EVP_SignInit(@ctx,EVP_sha256());
    EVP_SignUpdate(@ctx,Data,StrLen(Data));
    EVP_DigestFinal(@ctx,@Sha256Buf,mlen);
    RsaBuf := base64_decode(RsaSign,StrLen(RsaSign),TRUE);
    iRet := RSA_verify(EVP_sha256()._type,@Sha256Buf,SizeOf(Sha256Buf),PAnsichar(RsaBuf),Length(RsaBuf),pEVPKey.pkey.rsa);
    Result := (iRet = 1);
  finally
    EVP_PKEY_free(pEVPKey);
    libeay32.EVP_MD_CTX_cleanup(@ctx);
  end;
end;

end.

2022年4月25日 星期一

delphi +"Recurs" recursive Recurse TTreeView TTreeNode rtti Reconstruct full paths from a TreeView in delphi

 https://tech-story.net/reconstruct-full-paths-from-a-treeview-in-delphi/

https://delphisources.ru/pages/faq/master-delphi-7/content/LiB0053.html

http://www.drbob42.com/uk-bug/hood-01.htm

https://theroadtodelphi.com/2010/10/10/fun-with-delphi-rtti-dump-a-trttitype-definition/

2022年4月24日 星期日

Delphi Vcl.Ribbon Ribbon Controls office style

 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Creating_an_Application_that_Uses_Ribbon_Controls

 https://stackoverflow.com/questions/6327845/creating-ribbon-styled-applications

https://www.add-in-express.com/add-in-delphi/com-addins.php

 https://bilsen.com/windowsribbon/index.shtml

https://github.com/JAM-Software/RibbonFramework 



Delphi  Vcl.ActnMan Vcl.ActnList Vcl.ActnMenus Vcl.ActnCtrls

https://docwiki.embarcadero.com/RADStudio/Sydney/en/Handling_VCL_Actions_Using_an_Action_List

https://github.com/orwah/Arabic-Delphi-VCL-Units

https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.ActnMan

2022年4月22日 星期五

Awesome Pascal Awesome Communications Serial port

 https://asmen.icopy.site/awesome/awesome-pascal/#serial-port

Awesome Pascal Awesome

Communications

Serial port


https://sourceforge.net/projects/comport/
https://sourceforge.net/projects/tpapro/
https://sourceforge.net/p/synalist/code/HEAD/tree/trunk/synaser.pas

讓你的代碼變好看

http://delphi.org/2019/10/pretty-printing-your-source-code/ 

https://github.com/EnlighterJS/EnlighterJS

https://team411.github.io/src2img/

https://carbon.now.sh/

https://codeimg.io/

https://highlightjs.org/

https://wsmoak.net/2015/09/16/presenting-source-code.html

螢幕抓圖

https://getgreenshot.org/screenshots/

https://delphiaball.co.uk/2014/09/08/using-ttask-from-the-parallel-programming-library/

 https://delphiaball.co.uk/2014/09/08/using-ttask-from-the-parallel-programming-library/

Using TTask from the Parallel programming library
 

Parallel Programming with Delphi XE7; a quick introduction
Next PostTTask.IFuture from the Parallel Programming Library

Snippet

Object Pascal C++ Code snippets 13 Things About C++ Software You May Not Know

 https://blogs.embarcadero.com/13-things-about-c-software-you-may-not-know/

Table of Contents

    1. How to build and compile your applications at maximum speed with TwineCompile
    2. Did you know how easy it is to run Python in C++ Builder apps?
    3. Can I run Delphi / Object Pascal code in my C++ apps?
    4. Have you used folding scopes in your code yet?
    5. Do you create debugging breakpoints the easy way?
    6. Are you using Ctrl+Space for Code Completion and Code Insight?
    7. Did you know you can hit the Tab key for Code Template completion?
    8. Are you using Error Insight to speed up your development?
    9. How to use RAD Studio Deployment Manager to add your application’s sounds, images and other ad-hoc files
    10. How do I use the Ctrl+ F1 Help key to find details about a method?
    11. Use Ctrl+Enter to open file in that line
    12. How do I set up icons for my application?
    13. Did you know you can compile C++ projects by using msbuild command in console/terminal window?

 https://community.embarcadero.com/index.php/article/technical-articles/1044-coderage-9-snippet-consuming-object-pascal-code-from-c-apps-using-c-11-lambdas

 https://castle-engine.io/modern_pascal_introduction.html#_loops_for_while_repeat_for_in

Coderage 9 Snippet - Consuming Object Pascal code from C++ apps using C++11 Lambdas

package manager DelphI

 https://memnarch.bplaced.net/blog/delphinus/#projects

 
https://github.com/DGH2112/Package-Viewer
DGH Package Viewer

You can install Delphinus package manager and then install Package Viewer there. (Delphinus-Support)

Delphinus | Sparetime-Development

delphi tools api get all installed packages IOTAToDoServices IOTAProjectFileStorage IOTAProjectFileStorageNotifier IOTAProjectFileStorageNotifier

 delphi tools api get all installed packages IOTAToDoServices IOTAProjectFileStorage IOTAProjectFileStorageNotifier IOTAProjectFileStorageNotifier

 https://www.davidghoyle.co.uk/WordPress/

Notify me of everything… – Part 1 – Dave's Development Blog

https://www.davidghoyle.co.uk/WordPress/?p=1272

Delphi Class RTTI Explorer Hierarchy IDE Explorer Expert

 https://stackoverflow.com/questions/691989/full-vcl-class-browser-for-delphi

 https://blog.dummzeuch.de/delphi-ide-explorer-expert/

 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Viewing_Hierarchy_of_Classes,_Interfaces,_and_Types_in_the_Class_Explorer

 https://theroadtodelphi.com/2010/10/04/fun-with-delphi-rtti-rtti-explorer-lite/

 https://theroadtodelphi.com/2010/10/04/fun-with-delphi-rtti-rtti-explorer-lite/types-view/

 http://etutorials.org/Programming/mastering+delphi+7/Part+IV+Delphi+the+Internet+and+a+.NET+Preview/Chapter+22+Using+XML+Technologies/Programming+with+the+DOM/

 https://blog.dummzeuch.de/delphi-ide-explorer-expert/

https://www.delphipraxis.net/140771-delphi-2010-rtti-demo-delphidiver%99.html  

Delphi 2010 RTTI-Demo: DelphiDiver™

 http://essmodel.sourceforge.net/

 https://www.drbob42.com/delphi/property.htm

 https://torry.net/pages.php?id=270

 https://www.delphipraxis.net/

 http://www.festra.com/eng/les03.htm

 https://smartmobilestudio.com/

 https://blog.dummzeuch.de/delphi-ide-explorer-expert/

 https://www.drbob42.com/delphi/property.htm

http://www.choosepill.com/components/cpcrbtree.htm 

https://delphisources.ru/pages/faq/master-delphi-7/content/LiB0097.html

DELPHI Object Inspector TPropertyAttributes 

 https://blog.karatos.in/a?ID=00100-8e5ec27e-d7c6-49f6-a6ab-4da08ef2cf04

RegisterPropertyEditorProc  DesignEditors.TVariantProperty.GetAttributes


https://www.davidghoyle.co.uk/WordPress/

Delphi JSON Viewer

 https://edn.embarcadero.com/article/40882

https://sourceforge.net/projects/radstudiodemos/

 

 A JSON Media Type for Describing the Structure and Meaning of JSON
                               Documents
                        draft-zyp-json-schema-02

https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-02

 

2022年4月21日 星期四

Current mirror drives multiple pulsed-current mirror comprising drives thermal-runaway effect

 Current mirror drives multiple  pulsed-current mirror comprising  drives  thermal-runaway effect

 MOSFET - Current Mirror Explained

 https://www.edn.com/current-mirror-drives-multiple-leds-from-a-low-supply-voltage/

https://www.youtube.com/watch?v=Jmu02dErhdg

 

2022年4月20日 星期三

路徑規劃

 Tool Path Planning algorithm Contour Raster Zigzag Contour  Spiral Hybrid Hilbert filling

concorde directory TSP  Solver  

concorde directory TSP Solver  TSP ETSP directly ATSP

Traveling Salesperson Problem

2022年4月19日 星期二

油包水

 paraffin Pickering emulsion

https://zh.wikipedia.org/wiki/%E7%9A%AE%E5%85%8B%E6%9E%97%E4%B9%B3%E6%B6%B2

 https://www.sciencedirect.com/science/article/abs/pii/S1226086X17302824

https://www.mdpi.com/2073-4360/11/7/1115/htm

 https://www.researchgate.net/publication/343387125_Water-in-oil_emulsions_stabilized_by_surfactants_biopolymers_andor_particles_A_review

 surfactants emulsification water-in-oil emulsion wax

 Saponification esterification Petrochemistry

SIO2  Sol-gel

iscussion of Sol-gel Preparation of Nanoscaled SiO2 Particles

2022年4月18日 星期一

concorde directory Concorde TSP Travelling Salesperson Problems Solver qsopt

 https://hackaday.io/project/158802/logs

   https://www.swmath.org/?term=traveling%20salesman

concorde directory Concorde TSP Travelling Salesperson Problems  Solver   qsopt 

    TSPLIB
    Referenced in 696 articles [sw00983]
    following problem classes are available. Symmetric traveling salesman problem (TSP) Hamiltonian cycle problem (HCP) Asymmetric ... traveling salesman problem (ATSP) Sequential ordering problem (SOP) Capacitated vehicle routing problem (CVRP...

    Concorde
    Referenced in 312 articles [sw04770]
    computer code for the symmetric traveling salesman problem (TSP) and some related network optimization problems...

    LKH
    Referenced in 138 articles [sw04735]
    Kernighan heuristic for solving the traveling salesman problem. Computational experiments have shown that...

    TSPTW
    Referenced in 37 articles [sw04709]
    with time windows. The Traveling Salesman Problem with Time Windows (TSPTW) is the problem...

    GTSP Instances Library
    Referenced in 14 articles [sw14651]
    Generalized Traveling Salesman Problem (GTSP) is an extension of the Traveling Salesman Problem (TSP), where...


Using the NEOS Server for concorde/TSP

Web Submission Form
Concorde data(xy-list file, L2 norm)
Enter the complete path to the file with the xy-list (distances measured in the Euclidean(L2) norm)
Concorde data(xy-list file, L1 norm)
Or, enter the complete path to the file with the xy-list (distances measured in the Manhattan(L1) norm)
Concorde data(TSPLIB format file)
Or, enter the complete path to the symmetric TSPLIB file
Algorithm Choose the algorithm (cqs=QSopt, con=CPLEX [default], lk=Lin-Kernighan) Concorde(CPLEX)
Concorde(QSopt)
Lin-Kernighan

2022年4月14日 星期四

jpg 圖檔 中繼 標記 資料 內嵌文字欄位 IPTC IIF XMP EXIF

 CCR Exif  
 
CCR Exif is a Delphi library to read and write Exif, IPTC and XMP metadata from JPEG, TIFF and PSD images. Requires Delphi 2006 or later to compile

compilers.net > directory > free > compilers > pascal

 http://www.compilers.net/Dir/Free/Compilers/Pascal.htm

 

....
Symantec Think Pascal Compiler
Think Pascal (FTP)
TinyPascal
TMT Pascal
Turbo51
Virtual Pascal Compiler
Vector Pascal

 

工程塑膠材質

 https://haolitechs.com/%E5%B7%A5%E7%A8%8B%E5%A1%91%E8%86%A0%E6%9D%90%E8%B3%AA-tw/

2022年4月13日 星期三

delphi - How to display BLOB Image from database in the TAdvStringGrid with the help of DataSet https://vigges.net/qa/?qa=1132506/

 
CreateBlobStream Picture LoadFromStream

delphi - How to display BLOB Image from database in the TAdvStringGrid with the help of DataSet
https://vigges.net/qa/?qa=1132506/

CreateBlobStream is creating a TStream object, not a TMemoryStream.
Since you do not want to write the JPG to the database you should use bmRead instead of bmReadWrite.
I am not used to SQLite, but you will have to make sure that you are using a suitable binary datetype (BLOB).

  JPG := TJpegImage.Create;
  Picture:= TPicture.Create;
  try
    st := results.CreateBlobStream(TBlobField(results.FieldByName('image')), bmRead);
    try
      JPG.LoadFromStream(st);
      Picture.Assign(JPG);
      sg.AddPicture(i,j,Picture,True,ShrinkWithAspectRatio,0,haLeft,vaTop);
    finally
      st.Free;
    end;
  finally
    JPG.Free;
    Picture.Free;
  end;

To ensure that the stored image is really a JPG you should write the JPG for testing with something like:

var
  ms: TMemoryStream;
begin
  ads.Open;
  ads.Append;
  ms := TMemoryStream.Create;
  try
    Image1.Picture.Graphic.SaveToStream(ms); // make sure having loaded a JPG
    ms.Position := 0;
    TBlobField(ads.FieldByName('image')).LoadFromStream(ms);
  finally
    ms.Free;
  end;
  ads.Post;
end;
https://kifmesoft.wordpress.com/2006/06/09/memorystream-untuk-menampung-blob-field-image-picture/
 https://codeverge.com/embarcadero.delphi.database/saving-a-jpg-in-a-graphicsfield/1067238
 https://stackoverflow.com/questions/40357324/trying-to-save-a-bmp-from-pc-to-a-database-blob-field
https://www.chestysoft.com/ximage/access1.asp 
https://forum.lazarus.freepascal.org/index.php?topic=43499.0 

8051 IAR Keil Mikro SDCC

 8051  IAR Keil Mikro SDCC

 https://turbo51.com/

 http://www.openrtos.net/RTOS_ports.html

 https://www.intorobotics.com/8051-microcontroller-programming-tutorials-simulators-compilers-and-programmers/

 

8051 assembly machine code  The following table lists the 8051 instructions by HEX code. 


translate pascal 8051 Assembler Translation
http://www.8051projects.info/resources/8051-assemblers-and-ides.22/
https://stackoverflow.com/questions/15204459/is-there-any-8051-assembly-language-to-c-code-converter
https://www.microapl.com/asm2c/sample8051.html

Relogix™ Sample Translation (8051)


This sample translation uses the source code of a software-implemented I2C driver for the 80C51 based microcontroller.


http://bit.kuas.edu.tw/~8051/

8051 Development Tools

2022年4月12日 星期二

Varnish HTTP Varnish cache (Varnish) web server

 
Varnish cache (Varnish)

Varnish cache,或稱Varnish,是一套高效能的反向網站快取伺服器。 Varnish目前被用在挪威最大的報社Verdens Gang上。 維基百科


Varnish Server - Free Technical Support eBook
 https://info.varnish-software.com/varnish/support
The Guide To All Things Varnish. VCL, Caching Principles & More. Sign Up For A Free Copy! Talk To An Expert。Request A Free Trial。View Pricing Details。Sign Up For Newsletters。Highlights: Videos & Demos Available, Chat Option Available。

 Varnish Cache
https://varnish-cache.org
 
Varnish HTTP Cache¶. I'm new here, please explain this Varnish thing. What is happening¶. 2022-03-15 - Varnish 7.1.0 is released¶.

2022年4月9日 星期六

Vanilla JS vue Svelte Notify JavaScript Bulletin Local storage Security Message Queuing communication

Vanilla JS vue Svelte Notify JavaScript Bulletin Local storage  Security Message Queuing communication 


https://github.com/vuejs/awesome-vue

2022年4月7日 星期四

SET Display Monitor Light

 

        [DllImport("dxva2.dll")]
        public static extern bool SetMonitorBrightness(IntPtr hMonitor, short brightness);

        [DllImport("dxva2.dll")]
        public static extern bool GetMonitorBrightness(IntPtr hMonitor, ref short pdwMinimumBrightness,
            ref short pdwCurrentBrightness, ref short pdwMaximumBrightness);

        [DllImport("dxva2.dll")]
        public static extern bool GetNumberOfPhysicalMonitorsFromHMONITOR(IntPtr hMonitor,
            ref uint pdwNumberOfPhysicalMonitors);

        [DllImport("dxva2.dll")]
        public static extern bool GetPhysicalMonitorsFromHMONITOR(IntPtr hMonitor,
            uint dwPhysicalMonitorArraySize, [Out] PhysicalMonitor[] pPhysicalMonitorArray);

        [DllImport("user32.dll")]
        public static extern IntPtr MonitorFromWindow([In] IntPtr hwnd, uint dwFlags);

2022年4月6日 星期三

Serial Port Programming using Win32 API

 https://www.xanthium.in/Serial-Port-Programming-using-Win32-API#account

 https://github.com/search?l=Pascal&q=tcomport&type=Code

 https://github.com/manashmandal/SerialPort

https://github.com/GCY/SerialPortLibrary

https://torry.net/pages.php?s=89

delphi comport library  asynchronous serial communications

 

 https://www.codeproject.com/Articles/992/Serial-library-for-C

Windows Std Serial Comm Lib for Delphi 5.4.1      Review     Screenshots     Technical   From: MarshallSoft Computing

5: Generation 2 Steam Heated Group Head - La Pavoni Lever Espresso Machine

 https://www.youtube.com/watch?v=qQaqW0SAJjs

2022年4月5日 星期二

maXbox a script tool engine, Precompiled Object Based Scripting Tool maXbox maXbox3 Precompiled Object Based Scripting Tool maXbox

 

maXbox3

Precompiled Object Based Scripting Tool maXbox maXbox3  Precompiled Object Based Scripting Tool maXbox

 

 

http://www.softwareschule.ch/maxbox.htm

 

 maXbox a script tool engine, compilerlib all in one exe! Build to teach/ develop under Windows and Linux (CLX) to set Delphi with no install. maXbox has RemObjects PascalScript smart code. With include,events print, decompile, syncheck, templates, VM-, and DLL support. +Indy,Jedi,CGI,DMath,CAI,FLC5 & Systools.4.0 with CryptoBox4 and ComPort for Arduino!, OS Lib mX4- Build mX4.7.6.10
maXbox Pure Code Blaise Pascal Mag

2022年4月2日 星期六

temperature

 CS5532AS Schematics  channel temperature logger Schematics  max3370  max1673 dg409dy ADC CS5532AS MAX854  channel  teardown TC08  max31855 CS5532 module Schematics   temperature couple esd ovp protection ad650 ads1256 AD7740 Mechatronics Project PSN-ADC24 4-Channel 24-Bit Analog to Digital Board