Alex Onsman

Alex Onsman

144 Articles Published

Articles by Alex Onsman

Page 3 of 15

What is the difference between height and line-height?

Alex Onsman
Alex Onsman
Updated on 16-Mar-2026 3K+ Views

The height property defines the vertical measurement of an element's content area, while line-height controls the spacing between lines of text within that element. The height property sets the overall vertical size of a container, such as a div or paragraph. When content exceeds this height, it may overflow or be clipped depending on the overflow settings. The line-height property specifies the minimum height of line boxes within the element. It determines the vertical space between lines of text, affecting readability and visual spacing. Line-height can be specified in pixels, percentages, or as a unitless number (multiplier of ...

Read More

Open Source Databases

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 1K+ Views

Open source databases have publicly available source code that anyone can view, study, or modify. They can be relational (SQL) or non-relational (NoSQL), and they significantly reduce database costs compared to proprietary solutions. Why Use Open Source Databases? Database licensing is a major software expense for companies. Open source databases offer a cost-effective alternative − free to use, with community support, and no vendor lock-in. Many also offer commercial support tiers for enterprise needs. Popular Open Source Databases Database Type Key Feature MySQL Relational (SQL) Most widely used open source DB; community ...

Read More

Examples of E-R model

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 20K+ Views

The ER (Entity-Relationship) model represents real-life scenarios as entities. The properties of these entities are their attributes, and their connections are shown as relationships. ER models help visualize how data is structured in a database system. Hospital ER Model This ER model has three entities − Patient, Doctor, and Tests ? Patient ID (PK), Name Age, Visit_date Doctor ID (PK), Name Specialization Tests ...

Read More

Unique Key in RDBMS

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 980 Views

A Unique Key is a constraint in RDBMS that ensures all values in a column (or set of columns) are distinct. Many users confuse Primary Key with Unique Key since both enforce uniqueness, but they differ in NULL handling, volume, and modifiability. The unique key constraint is essential for maintaining data integrity by preventing duplicate entries while providing more flexibility than primary keys. It's commonly used for columns like email addresses, phone numbers, or social security numbers where uniqueness is required but the field may not serve as the primary identifier. Primary Key vs Unique Key Feature ...

Read More

Entity Integrity Rule in RDBMS

Alex Onsman
Alex Onsman
Updated on 14-Mar-2026 6K+ Views

The Entity Integrity Rule in RDBMS states that every table must have a primary key, and the primary key column(s) cannot contain NULL values. This ensures that every row in a table is uniquely identifiable. Example 1: Student Table Consider the following Student table ? Student_ID (PK) Student_Name Student_Awards S001 Alice Gold Medal S002 Bob NULL S003 Charlie Silver Medal Here Student_ID is the primary key. We cannot use Student_Awards as the primary key since not every student would have received an award (it can be ...

Read More

How to disable right click using jQuery?

Alex Onsman
Alex Onsman
Updated on 13-Mar-2026 3K+ Views

To disable right click on a page, use the jQuery bind() method. This prevents users from accessing the context menu that typically appears when right-clicking on web elements. Example You can try to run the following code to learn how to disable right click − $(document).ready(function(){ $(document).bind("contextmenu", function(e){ return false; ...

Read More

How to bind events on dynamically created elements using jQuery?

Alex Onsman
Alex Onsman
Updated on 13-Mar-2026 4K+ Views

When working with dynamically created elements in jQuery, regular event binding methods like click() or on() directly on elements won't work because these elements don't exist in the DOM when the page loads. To solve this, you need to use event delegation by binding events to a parent element that exists at page load. The key is to use $(document).on(event, selector, handler) or bind to a specific parent container. This way, the event is attached to an existing element and will trigger when the specified selector matches any current or future child elements. Example Here's a complete ...

Read More

How to bind jQuery events within dynamic content returned via Ajax?

Alex Onsman
Alex Onsman
Updated on 13-Mar-2026 823 Views

To bind jQuery events within dynamic content, use event delegation. Event delegation allows you to attach events to elements that don't exist yet in the DOM, which is essential when working with content loaded dynamically via Ajax. The key is to bind events to a parent element that already exists (like document) and specify the target selector as the second parameter. This way, when new elements are added dynamically, they will automatically respond to the events. Event Delegation Syntax Use the following syntax for event delegation − $(document).on('event', 'selector', function() { ...

Read More

How to handle when checkbox 'checked state' changed event in jQuery?

Alex Onsman
Alex Onsman
Updated on 13-Mar-2026 3K+ Views

To handle the checkbox checked state, use the change event. It will check whether the checkbox is checked or not. The change event is triggered whenever the state of a checkbox changes from checked to unchecked or vice versa. You can use different jQuery methods to detect the checked state: .prop("checked") − Returns true/false (recommended method) .is(":checked") − Returns true/false .attr("checked") − Returns the attribute value Example You can try to run the following code to learn how to handle when checkbox checked state changed ...

Read More

Can I wrap a JavaScript event in a jQuery event?

Alex Onsman
Alex Onsman
Updated on 13-Mar-2026 342 Views

Yes, you can wrap a JavaScript event in a jQuery event. For wrapping, use the jQuery event object and the $.Event() constructor. This allows you to create a jQuery event wrapper around a native JavaScript event, giving you access to jQuery's event handling methods and properties. Example You can try to run the following code to wrap a JavaScript event in a jQuery event − $(document).ready(function(){ ...

Read More
Showing 21–30 of 144 articles
« Prev 1 2 3 4 5 15 Next »
Advertisements