Monday, November 24, 2025

HAProxy

 It is a reverse proxy to load balance traffic to the backend servers. It t operates on either tcp (layer 4) or http (layer X ) mode. To the backend servers, the. Kirby become the proxy. Therefore proxy can be configured to add the client ip by adding it as extra http headers. 

ACL can be used ti define a condition which in turn used in other statement to filter (limited) if a connection is to be forwarded to the backend. 

A HAProxy can be set up to forward different traffic received (interface and port) to different set of backend 

Sunday, November 16, 2025

CSS Class

HTML element can define a class attribute.  The class name can be referenced in CSS by prefix it with a dot.  For example, the following refers to the class named "big-text"

.big-text {font: 15}



HTML

 The anchor tag <a> s used to create hypertext link to another document or page. The href (hypertext reference) specifies the url. The target attribute specifies the frame to display the content of the link when clicked on. The value of “_blank” opens the link in a new tab. 

The div (divisions) is used to group a set of elements. The div is used by css to style the set. A span tag further group a subset of element in a div and be applied with a different style. 

Semantic element denotes a specific purpose in a general document. They included header, footer, aside (semantically similar to remark or side notes), article, section and main. 

Friday, November 14, 2025

CSS

Cascade style sheet is designed for to provide a standard look framework for large website with any pages. CSS “cascade the standard style to all the web pages on the site. 

CSS defines a standard formatting spec for a type of elements, or a group of different elements tagged with the same class id, or a single element tagged with an id. These are called element selector, class selector and id selector respectively.

Element selector will be overridden by class selector and in turn overridden by id selector   

Thursday, November 6, 2025

Sprite

A sprite is a small image that represent an object of character in game. Sprite can be animated. Sprite is drawn on 2D game and not so common in 3D. In 3D, sprite could be used for HUD or chart window that display message.

Monday, October 27, 2025

Windows Program Set Up

WinMain is the main program in Windows.  Windows passed in 4 parameter when WinMain starts - Instance handle (type HINSTANCE), Previous instance handle (HINSTANCE), a pointer to the command line string (LPTSTR) and the options for the window to be created (INT).

the first step is to register the window calling RegisterClassEx with a WINCLASSEX structure. The structure contains parameter about the main window to be created like if it is to be redrawn when the window is resized horizontally or vertically, the program instance, pointer to the window's call back function, pointer to the icon and mouse etc.  The system call returns an integer - 0 if error and non-zero if ok. 

The WinMain calls CreateWindow function to create the first window.  It passes information about the window to be created like the title string, window style (e.g. overlapping), size and the application instance handle.  CreateWindow returns a handle to a HWD structure.

At this point, the window is still not visible, WinMain calls ShowWindow and UpdateWindow, passing the HWND handle to draws the window.

This complete the initialization.  WinMain then goes into a message loop to listen for messages to process. It calls GetMessage which will block the program until a message come in.  It then call TranslateMessage and DispatchMassage which passes the message to the call back function to process.


Sunday, October 26, 2025

PCI

PCI was a parallel bus of 16 bit wide. PCI express change to use serial bus design. The protocol insert additional bits to achieve error for data inyegrity thus the data rate is less than the transfer capability.  The effective data rate improves from generation to generation by varying the amii pi unit of these overhead bits  

PCIe support full rate transfer bidirectionally. The standard support multi-lanes transfer from 1x to 32x.