Catatan

Virtual Serial Port Control

 Get Started with Virtual Serial Port Control -  Virtual Serial Port Control - Quick Start (virtual-serial-port-control.com) DLL API Integration -  Virtual Serial Port Control SDK - DLL API Integration (virtual-serial-port-control.com) ActiveX Component Integration -  Virtual Serial Port Control SDK - ActiveX Component Integration (virtual-serial-port-control.com) Microsoft Visual Studio 2005, Visual C# -  Virtual Serial Port Control SDK - Microsoft Visual Studio 2005, Visual C# (virtual-serial-port-control.com) using System; using System.Net.Sockets; using System.Threading; class Program {     static void Main()     {         string host = "192.168.8.202"; // Set IP         int port = 4196;               // Set port         byte[] cmd = new byte[8];         cmd[0] = 0x01;  // Device address         cmd[1] = 0x05;  // Command         using (Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))         {             s.Connect(host, port); // C

Modbus POE ETH Relay dry interface data communication references

Imej
  Product datasheet - 8-ch Ethernet Relay Module, Modbus RTU/Modbus TCP Protocol, PoE port Communication, With Various Isolation And Protection Circuits - https://www.waveshare.com/modbus-poe-eth-relay.htm Documentation Modbus POE ETH Relay -  https://www.waveshare.com/wiki/Modbus_POE_ETH_Relay   help me about read data by using modbus c# -  https://www.plctalk.net/threads/help-me-about-read-data-by-using-modbus-c.95485/ Advantech User Manual PCI-1761 - 8-ch Relay & 8-ch Isolated Digital Input PCI Card -  https://advdownload.advantech.com/productfile/Downloadfile1/1-11P6657/PCI-1761.pdf +++

Compiler : Finite State Machine code sample

Sample 0 :  import java.io.*; import java.util.*; /* String containing an even number of one     0   1 ------------ A*  A   B B   B   A ------------ */ public class FSM {     final static int STATES=2, INPUTS=2;         public static void main (String[] args) throws IOException{                 boolean [] accept = new boolean[STATES];         int [][] fsm = new int[STATES][INPUTS];         accept[0] = true;         accept[1] = false;                 fsm[0][0] = 0;         fsm[0][1] = 1;         fsm[1][0] = 1;         fsm[1][1] = 0;                 // State A = 0, State B = 1         int inp = 0;         int state = 0;                 try{             inp = System.in.read() - '0';                         while(inp >= 0 && inp < INPUTS){                 state = fsm[state][inp];                 inp = System.in.read() - '0';             }         }         catch(IOException ioe){             System.out.println("IO error " + ioe);         }           

Trigger synchronization between two tables in Microsoft SQL Server

To trigger synchronization between two tables in Microsoft SQL Server when the source table is updated, you can use SQL Server triggers. Triggers are special stored procedures that are automatically executed or fired in response to specific events, such as INSERT, UPDATE, or DELETE operations on a table. Here's an example of how you can create a trigger to synchronize updates from a source table (SourceTable) to a destination table (DestinationTable):\ CREATE TRIGGER SyncTrigger ON SourceTable AFTER INSERT, UPDATE, DELETE AS BEGIN     SET NOCOUNT ON;     -- Check if the operation is an INSERT or UPDATE     IF EXISTS(SELECT 1 FROM inserted)     BEGIN         -- Perform synchronization for INSERT or UPDATE         MERGE INTO DestinationTable AS dest         USING inserted AS src         ON (dest.PrimaryKey = src.PrimaryKey)  -- Replace PrimaryKey with actual primary key column(s)         WHEN MATCHED THEN             UPDATE SET dest.Column1 = src.Column1,  -- Replace Column1 with act

JAVA EE : Servlet notes

Imej
  References : Servlet RequestDispatcher forward vs include https://codersathi.com/servlet-requestdispatcher-forward-vs-include/ CRUD in Servlet https://www.javatpoint.com/crud-in-servlet

How to check port used by other application

Imej
  1. Open command prompt as Administrator 2. Type command below; > netstat -aon | findstr 8080 > tasklist | findstr <PID>  Refer this article : https://dzone.com/articles/how-to-check-which-process-is-using-port-8080-or-a

How to Do Web Forms in VS 2022 (Even Though Microsoft Recommends Blazor/.NET 6)

Imej
  https://visualstudiomagazine.com/articles/2022/05/16/vs2022-web-forms-tip.aspx