Monday, March 23, 2026

Displaying Different Texts Sequentially from an Array with javascript

 const outputElement = document.getElementById('output');

const textArray = ['First text message.', 'Second text message.', 'Third text message.'];

let currentIndex = 0;


function displayNextText() {

    if (currentIndex < textArray.length) {

        // Replace the entire content with the current text

        outputElement.innerHTML = textArray[currentIndex];

        currentIndex++;

        // Schedule the next text to be displayed after a delay (e.g., 2 seconds)

        setTimeout(displayNextText, 2000); // 2000 milliseconds = 2 seconds

    }

}


// Start the display sequence

displayNextText();

===============================
Text Sequentially with CSS
<div class="text-container">
  <div class="text-item">First Text</div>
  <div class="text-item">Second Text</div>
  <div class="text-item">Third Text</div>
</div>
.text-container {
  display: grid;
  grid-template-areas: "content";
}

.text-item {
  grid-area: content;
  opacity: 0;
  animation: slideIn 6s infinite;
}

/* Stagger animation with delays */
.text-item:nth-child(1) { animation-delay: 0s; }
.text-item:nth-child(2) { animation-delay: 2s; }
.text-item:nth-child(3) { animation-delay: 4s; }

@keyframes slideIn {
  0% { opacity: 0; }
  10% { opacity: 1; }
  30% { opacity: 1; }
  40% { opacity: 0; }
  100% { opacity: 0; }
}

Infinite for loop in javascript

 for (let i = 0; i < 10; i--) {

  // 'i' starts at 0 and keeps decreasing (0, -1, -2, ...), 

  // so the condition 'i < 10' is always true.

}


======================
for (;;) {
  // Code to be executed indefinitely
}

==================
for (let i = 0; true; i++) {
  // This condition is always true
}
====================
for (let i = 0; i !== 10; i += 2) {
  // 'i' takes values 0, 2, 4, 6, 8, 10, 12...
  // The condition 'i !== 10' is true for all these values,
  // including 10 because the exact value of 10 is skipped.
  // Better to use '<=' or '>=' for numeric range conditions.
}

cheet codes in c# - cheatcode in c#

 https://zerotomastery.io/cheatsheets/csharp-cheat-sheet/


var anon = new { Name = "John", Age = 25 };

var person = Tuple.Create("John", 25); // Creates a tuple with two items.

Tuesday, March 17, 2026

Text blur effect in css

 backdrop-filter: blur(0px);


-webkit-backdrop-filter: blur(0px);


or simple use, if above is not working

.element-to-blur {

  filter: blur(0.2px); /* The radius value controls the intensity of the blur */

}


Note:- There are lot of property in filer property example contrast, brightnexx, saturate, hue etc.

Thursday, March 12, 2026

Typing effect with CSS - Typing with CSS - Typing with Javascript

     <style>

        .typing-effect {

    overflow: hidden; /* Hide the full text initially */

    border-right: .15em solid orange; /* Blinking cursor effect */

    white-space: nowrap; /* Prevent text from wrapping */

    margin: 0 auto; /* Center the text */

    letter-spacing: .15em; /* Spacing between characters */

    width: 0; /* Start with a width of 0 */

    animation: 

        typing 30.5s steps(150, end) forwards, /* Typing animation */

        blink-caret 0.5s step-end infinite; /* Blinking cursor animation */

}


/* Keyframes for the typing animation */

@keyframes typing {

    from { width: 50 }

    to { width: 100% }

}


/* Keyframes for the blinking cursor */

@keyframes blink-caret {

    from, to { border-color: transparent }

    10% { border-color: orange; }

}

    </style>


<html>

  <p class="typing-effect">Hello, world! This is a CSS typing effect.</p>

</html>

=======================

Typing with javascript

const element = document.getElementById('sequence');

const fullText = 'IT Solutions Professional Work Ethic';

let index = 0;


function typeText() {

    if (index < fullText.length) {

        // Use the addition assignment operator (+=) to append the next character

        element.innerHTML += fullText[index]; //

        index++;

        // Schedule the next character to be added after a delay (e.g., 100ms)

        setTimeout(typeText, 100);

    }

}


// Start the sequence

typeText();


Note: for demo you can check CSS framework https://picocss.com/

Saturday, March 7, 2026

How to add multiple insert values with for loop in SQL Server

 

    DECLARE @i INT =  1; -- Declare a variable for the loop counter

    DECLARE @max_value INT = 500; -- Set the loop limit

    -- Start the WHILE loop

    WHILE @i <= @max_value 

begin

        -- 3. The INSERT query inside the loop

         SET @i = @i + 1;

INSERT INTO [dbo].[AgentMaster]

           ([AgentName])

     VALUES

           ('test')

        end


  /****** Script for SelectTopNRows command from SSMS  ******/

SELECT [AgentNo]

      ,[AgentName]

  FROM [testdb].[dbo].[AgentMaster]

Tuesday, March 3, 2026

How to add multiple records with insert query in MYSQL

   INSERT INTO new_registration

(

`Ownership_Category`,

`Is_Govt_Org`,

`Title_Category`,

`Nationality`,

`Owner_Name`,

`Owner_Pan_Card`,

`Upload_pan_card_Document`,

`Mobile_No`,

`Email_ID`,

`PinCode`,

`State`,

`District`,

`City`,

How to add multiple rows in MySQL with for loop with stored procedure

 -- 1. Change the statement delimiter

DELIMITER $$

DROP PROCEDURE IF EXISTS insert_data_loop;

-- 2. Create the stored procedure

CREATE PROCEDURE insert_data_loop()

BEGIN

    DECLARE i INT DEFAULT 1; -- Declare a variable for the loop counter

    DECLARE max_value INT DEFAULT 50; -- Set the loop limit


    -- Start the WHILE loop

    WHILE i <= max_value DO

        -- 3. The INSERT query inside the loop

         SET i = i + 1;

        INSERT INTO new_registration

(

`Ownership_Category`,

`Is_Govt_Org`,

`Title_Category`,

`Nationality`,

`Owner_Name`,

`Owner_Pan_Card`,

`Upload_pan_card_Document`,

`Mobile_No`,

`Email_ID`,

`PinCode`,

`State`,

`District`,

`City`,

`Address`,

`DOB`,

`Upload_DOB_Certificate`,

`GST_No`,

`Upload_GST_Certificate`)

VALUES

(

'Individual',

1,

'News Paper',

'Indian',

'Yash Kapoor','45YYH87Y','Documents/test1.jpg',

457851,'test@test.com',

110022,'Haryana',

'Sonepat','Sonepat','Jangpura, Delhi',

' 15/01/1945', 'Documents/test1.jpg' ,

'JHJDFHJDF8787DF',

'Documents/test1.jpg');

        

        -- Increment the counter

       

    END WHILE;

END $$


-- 4. Reset the delimiter

DELIMITER ;


-- 5. Call the procedure to run the insert loop

CALL insert_data_loop();


-- Optional: verify the results

SELECT * FROM new_registration;


Note:- You cannot use for loop without Creating stored procedure.


How to add auto increment in column in MySQL

 https://stackoverflow.com/questions/33602936/mysql-workbench-auto-increment-disabled

How to add auto date in column in MySQL

 NOW() 

 CURRENT_DATE

CURRENT_TIMESTAMP 


in Default/Expression Column

Insert query in MYSQL - with now() - with update date

  INSERT INTO `test`.`new_registration`

(

`Ownership_Category`,

`Is_Govt_Org`,

`Title_Category`,

`Nationality`,

`Owner_Name`,

`Owner_Pan_Card`,

`Upload_pan_card_Document`,

`Mobile_No`,

`Email_ID`,

`PinCode`,

`State`,

`District`,

`City`,

`Address`,

`DOB`,

`Upload_DOB_Certificate`,

`GST_No`,

`Upload_GST_Certificate`)

VALUES

(

'Individual',

1,

'News Paper',

'Indian',

'Yash Kapoor','45YYH87Y','Documents/test1.jpg',

457851,'test@test.com',

110022,'Haryana',

'Sonepat','Sonepat','Jangpura, Delhi',

' 15/01/1945', 'Documents/test1.jpg' ,

'JHJDFHJDF8787DF',

'Documents/test1.jpg');



Monday, March 2, 2026

How to generate Create Query in MYSQL

 Right Click on Table(New_Reg_Table) 

>Click on Send to SQl Editor

> Click on Create Statement