Posts

How to access content area width and height in wp editor

 In some cases, we need to access the width & height of content area size in pixel. Here is the solution which I already tested during my working time. function checkEditorSection () {     // Select the editor content area     const editorSection = document . querySelector ( '.interface-interface-skeleton__content' );         if ( editorSection ) {         // Get the size of the editor section         const editorSize = editorSection . getBoundingClientRect ();                 // Output width and height         console . log ( 'Editor Width:' , editorSize . width );         console . log ( 'Editor Height:' , editorSize . height );     } else {         // Retry after a short delay if the section isn't found yet         console . log ( "Retrying... Editor section n...

Battery discharging formula

what is the general rules of discharging a battery for example 100ah, so per hourly how much amount of discharging suitable?   The general rule for discharging a battery, such as a 100Ah battery, involves understanding its C-rate. The C-rate is a measure of the rate at which a battery is discharged relative to its maximum capacity. Here's a breakdown of how it works: 1C Rate: Discharging at a 1C rate means the battery will discharge its entire capacity in one hour. For a 100Ah battery, this means discharging at 100A (amperes). 0.5C Rate: Discharging at a 0.5C rate means the battery will discharge its entire capacity in two hours. For a 100Ah battery, this means discharging at 50A. 2C Rate: Discharging at a 2C rate means the battery will discharge its entire capacity in half an hour. For a 100Ah battery, this means discharging at 200A.  Suitable Discharge Rates The suitable discharge rate depends on the battery type and its intended use. For most applications, it's advisable...

How to upgrade gradle version

go to android directory using command cd android run this command for upgrading desire version ./gradlew wrapper --gradle-version=7.6.1

Flutter Botton Background Color

  ElevatedButton( onPressed: () {}, style: ElevatedButton.styleFrom( primary: Colors.black, // Background color ), child: Text( 'Elevated Button', ), )

WP search query for custom table

When you need to make search query for custom table you can use it  $wpdb -> get_results ( $wpdb -> prepare ( " SELECT * FROM table_name WHERE column_name LIKE %s " , "%" . $wpdb -> esc_like ( $alpcode ) . "%" ) );

use multiple database with wordpress

Using wpdb class, you can access multiple database  new wpdb( DBuserName , DBpassword, DBName, localhot );

HTML CSS JS Animated Sidebar Menu

HTML < div id = "sidebar_menu" >         hello sidebar menu         Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </ div > CSS     /*     * Sidebar_menu     */     @media screen and ( min-width : 768px ) {       #sidebar_menu       {         position : fixed ; width : 350px ; left : 0px ; top : 0px ; z-index : 1000 ;   ...