Catatan

Tunjukkan catatan dari Mei, 2024

MySQL failed to start due to data corrupt

Imej
2024-05-26 12:20:54 0 [ERROR] mysqld: Table '.\mysql\proxies_priv' is marked as crashed and last (automatic?) repair failed 2024-05-26 12:20:54 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\proxies_priv' is marked as crashed and last (automatic?) repair failed 2024-05-26 12:20:54 0 [ERROR] Aborting Refer Chatgpt :  https://chatgpt.com/share/73109e3b-a5c5-4b92-a51d-067ce10ffed3 The error message indicates that the proxies_priv table in the MySQL system database is corrupted and the automatic repair attempt has failed. This is preventing MariaDB from starting up because it cannot access the necessary privilege tables. Here's how you can manually repair the table and potentially resolve the issue: Steps to Repair the Corrupted Table Stop the MariaDB Server : Ensure that the MariaDB server is stopped before attempting to repair the table. You can stop the server from the XAMPP Control Panel or by running: net stop mysql Start MariaDB i...

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         ...

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 +++ Check modbus using Wireshark

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; ...

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...

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