Navigation Bar

Friday, October 2, 2026

Oracle News Oct 2026




Oracle Newsletter 29-Oct-26

ADT Secures AI Innovation with Oracle









Oracle Newsletter 19-Oct-26

Oracle Commits $1 Million to Doña Ana County Flood Recovery




God's Word for the day

The Evil Tongue
Those who pay heed to slander will not find rest,
  nor will they settle down in peace.
The blow of a whip raises a welt,
  but a blow of the tongue crushes the bones.
Many have fallen by the edge of the sword,
  but not as many as have fallen because of the tongue.
Happy is the one who is protected from it,
  who has not been exposed to its anger.
who has not borne its yoke,
  and has not been bound by its fetters. 
Sirach 28:16 - 19

Gospel teachings of Jesus

The authority of Jesus questioned

When he entered the temple, the chief priests and the elders 
  of the people came to Him as he was teaching, and said, 
"By what authority are you doing these things, and who gave
  you this authority? Jesus said to them, "I will also ask you
one question; If you tell me the answer then I will also tell 
  you by what authority I do these things; Did the baptism
of John come from heaven, or was it of human origin?" And
  they argued with one another, "If we say, 'From heaven' he
will say to us, 'Why then did you not believe him?' But if we
  say, 'Of human origin,' we are afraid of the crowd; for all
regard John as a prophet." So they answered Jesus, "We do
  not know." And he said to them, "Neither will I tell you by
what authority I am doing these things"
Mathew 21:23 - 27

Dewdrops Oct 2026

Dewdrop #111 10-Oct-26

React For Web Development


Dewdrop #112 15-Oct-26

React course : create a chatbot - state and event handlers


Dewdrop #113 10-Oct-26

React - Using CSS stylesheet with React

God's Word for the day

On Guaranteeing Debts
A good person will be surety for his neighbor,
But the one who has lost all sense of shame will fail him,
Do not forget the kindness of your guarantor,
For he as given his life for you.
A sinner wastes the property of his guarantor,
And the ungrateful person abandons his rescuer.
Sirach 29:14 - 17

Gospel teachings of Jesus

The Question about the Resurrection
The same day some Sadducees came to Him saying there is no
resurrection; and they asked him a question saying, "Teacher,
Moses said, 'If a man dies childless, his brother shall marry his
widow, and raise up children for his brother.' Now there were
seven brothers among us; the first married, and died childless,
leaving the widow to his brother. The second did the same, so
also the third, down to the seventh. Last of all the woman herself
died. In the resurrection then, whose wife of the seven will she be?
For all of them had married her."
Jesus answered them, "You are wrong, because you know neither
the scriptures, not the power of God. For in the resurrection, they
neither marry nor are given in marriage, but are like angels in
heaven. And as for the resurrection of the dead, have you not
read what was said to you by God, 'I am the God of Abraham, the
God of Isaac and the God of Jacob'? He is God not of the dead but
of the living." And when the crowd heard it, they were astounded
at his teaching.
Mathew 22:23 - 33

Thursday, October 1, 2026

React - Chatbot - Display response from the bot

Chatbot
Below is the final code for the chatbot.

 
<!DOCTYPE html>
<html>
  <head>
    <title>Chatbot</title>
  </head>
  <body>
    <div class="js-container"></div>
    

    <script src="https://unpkg.com/supersimpledev/react.js"></script>
    <script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
    <script src="https://unpkg.com/supersimpledev/chatbot.js"></script>
    <script src="https://unpkg.com/supersimpledev/babel.js"></script>
 
  <script type="text/babel">
    
       function ChatInput({chatMessages, setChatMessages}){
          const [inputText, setInputText] = React.useState('');

          function saveInputText(event) {
          // console.log(event.target.value);
            setInputText(event.target.value);
          }

          function sendMessage() {
         //   console.log(inputText);

         const newChatMessages = [
            ...chatMessages,
          {
              message : inputText,
              sender : 'user',
              id  : crypto.randomUUID()
          }
        ];
        setChatMessages(newChatMessages);
         
        const response = Chatbot.getResponse(inputText);
        //    console.log(response);  

          setChatMessages([
                ...newChatMessages,
              {
                  message : response,
                  sender : 'robot',
                  id  : crypto.randomUUID()
              }
              
            ]);

            setInputText('');  
          }
        return (
       
          <> {/* using fragment to remove extra div elements */}
             <input placeholder="Send a message to chatbot" 
             size="30"
             onChange={saveInputText}
             value={inputText}
             />
             <button
               onClick = {sendMessage}
             >Send</button>
          </>

        );
       }

    

      function ChatMessage({message, sender}){
          
          return (
              <div> {/* use div element to put the ChatMessage on a new line */}
              {sender === 'robot' && <img src="robot.jpeg" width= "50"/>}
                {message}
              {sender === 'user' && <img src="human.jpeg" width= "50"/>}
                </div>

              )
          
       }  

function ChatMessages({chatMessages}) {

/* in react we should not modify the data directly. 
We should create a copy of the data and modify the copy. */


return (
<>
{chatMessages.map((chatMessage) => {
return (
  <ChatMessage 
     message={chatMessage.message}
     sender={chatMessage.sender}
     key={chatMessage.id}
/>
);
} )}
</>
);
}

      function App (){
        const array = React.useState([{
            message: 'hello chatbot',
            sender: 'user',
            id : 'id1'
        }, {
            message: 'Hello! How can I help you?',
            sender: 'robot',
            id : 'id2'
        },
        {
            message: 'Can you get me todays date?',
            sender: 'user',
            id : 'id3'
        },
        {
            message: 'Today is September 26',
            sender: 'robot',
            id : 'id4'
        } ] );
 
        const chatMessages = array[0];
        const setChatMessages = array[1];
        return (<>
        <ChatInput 
           chatMessages={chatMessages}
           setChatMessages={setChatMessages}
         />
        <ChatMessages 
          chatMessages={chatMessages}
        />
      </>);  

      } 

      //const app = ( App );
      const container = document.querySelector('.js-container');
      ReactDOM.createRoot(container).render(<App />);
    </script>
  </body>
</html>

React - Chatbot - Save Messages to Chatbot

Chatbot
The code for the above functionality is as below
<!DOCTYPE html>
<html>
  <head>
    <title>Chatbot</title>
  </head>
  <body>
    <div class="js-container"></div>
    

    <script src="https://unpkg.com/supersimpledev/react.js"></script>
    <script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
    <script src="https://unpkg.com/supersimpledev/babel.js"></script>
 
  <script type="text/babel">
    
       function ChatInput({chatMessages, setChatMessages}){
          const [inputText, setInputText] = React.useState('');

          function saveInputText(event) {
          // console.log(event.target.value);
            setInputText(event.target.value);
          }

          function sendMessage() {
         //   console.log(inputText);
         setChatMessages([
              ...chatMessages,
            {
                message : inputText,
                sender : 'user',
                id  : crypto.randomUUID()
            }
            
          ]);
            setInputText('');  
          }
        return (
       
          <> {/* using fragment to remove extra div elements */}
             <input placeholder="Send a message to chatbot" 
             size="30"
             onChange={saveInputText}
             value={inputText}
             />
             <button
               onClick = {sendMessage}
             >Send</button>
          </>

        );
       }

    

      function ChatMessage({message, sender}){
          
          return (
              <div> {/* use div element to put the ChatMessage on a new line */}
              {sender === 'robot' && <img src="robot.jpeg" width= "50"/>}
                {message}
              {sender === 'user' && <img src="human.jpeg" width= "50"/>}
                </div>

              )
          
       }  

function ChatMessages({chatMessages}) {

/* in react we should not modify the data directly. 
We should create a copy of the data and modify the copy. */


return (
<>
{chatMessages.map((chatMessage) => {
return (
  <ChatMessage 
     message={chatMessage.message}
     sender={chatMessage.sender}
     key={chatMessage.id}
/>
);
} )}
</>
);
}

      function App (){
        const array = React.useState([{
            message: 'hello chatbot',
            sender: 'user',
            id : 'id1'
        }, {
            message: 'Hello! How can I help you?',
            sender: 'robot',
            id : 'id2'
        },
        {
            message: 'Can you get me todays date?',
            sender: 'user',
            id : 'id3'
        },
        {
            message: 'Today is September 26',
            sender: 'robot',
            id : 'id4'
        } ] );
 
        const chatMessages = array[0];
        const setChatMessages = array[1];
        return (<>
        <ChatInput 
           chatMessages={chatMessages}
           setChatMessages={setChatMessages}
         />
        <ChatMessages 
          chatMessages={chatMessages}
        />
      </>);  

      } 

      //const app = ( App );
      const container = document.querySelector('.js-container');
      ReactDOM.createRoot(container).render(<App />);
    </script>
  </body>
</html>

React - Chatbot Event Handler

<!DOCTYPE html>
<html>
  <head>
    <title>Chatbot</title>
  </head>
  <body>
    <div class="js-container"></div>
    

    <script src="https://unpkg.com/supersimpledev/react.js"></script>
    <script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
    <script src="https://unpkg.com/supersimpledev/babel.js"></script>
 
  <script type="text/babel">
    
       function ChatInput(){
        return (
       /*  <div>
            <input />
            <button>Send</button>
          </div>   */
          
          <> {/* using fragment to remove extra div elements */}
             <input placeholder="Send a message to chatbot" size="30"/>
             <button>Send</button>
          </>

        );
       }

    

      function ChatMessage({message, sender}){
          
          return (
              <div> {/* use div element to put the ChatMessage on a new line */}
              {sender === 'robot' && <img src="robot.jpeg" width= "50"/>}
                {message}
              {sender === 'user' && <img src="human.jpeg" width= "50"/>}
                </div>

              )
          
       }  

       function ChatMessages() {
          const chatMessages = [{
            message: 'hello chatbot',
            sender: 'user',
            id : 'id1'
        }, {
            message: 'Hello! How can I help you?',
            sender: 'robot',
            id : 'id2'
        },
        {
            message: 'Can you get me todays date?',
            sender: 'user',
            id : 'id3'
        },
        {
            message: 'Today is September 26',
            sender: 'robot',
            id : 'id4'
        } ] ;

   //      function sendMessage() {
//         console.log('send message');
//      }        

       function sendMessage() {
            chatMessages.push({
                message : 'test',
                sender : 'user',
                id : crypto.randomUUID()
            });
        }


        console.log(chatMessages);

        return (
          <>
          <button onClick={sendMessage}>Send Message </button> 
          {chatMessages.map((chatMessage) => {
          return (
            <ChatMessage 
              message={chatMessage.message}
              sender={chatMessage.sender}
              key={chatMessage.id}
          />
          );
          })}
        </>)
      }

      function App (){
        return (<>
        <ChatInput />
        <ChatMessages />
      </>);  

      } 

      //const app = ( App );
      const container = document.querySelector('.js-container');
      ReactDOM.createRoot(container).render(<App />);
    </script>
  </body>
</html>

React - Chatbot - Using State to refresh the website


Chatbot

The code for the above functionality is below.
Thus we see that when we click on SEND MESSAGE is prints the 'test' data on the console.
<!DOCTYPE html>
<html>
  <head>
    <title>Chatbot</title>
  </head>
  <body>
    <div class="js-container"></div>
    

    <script src="https://unpkg.com/supersimpledev/react.js"></script>
    <script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
    <script src="https://unpkg.com/supersimpledev/babel.js"></script>
 
  <script type="text/babel">
    
       function ChatInput(){
        return (
       /*  <div>
            <input />
            <button>Send</button>
          </div>   */
          
          <> {/* using fragment to remove extra div elements */}
             <input placeholder="Send a message to chatbot" size="30"/>
             <button>Send</button>
          </>

        );
       }

    

      function ChatMessage({message, sender}){
          
          return (
              <div> {/* use div element to put the ChatMessage on a new line */}
              {sender === 'robot' && <img src="robot.jpeg" width= "50"/>}
                {message}
              {sender === 'user' && <img src="human.jpeg" width= "50"/>}
                </div>

              )
          
       }  

function ChatMessages() {
const array = React.useState([{
            message: 'hello chatbot',
            sender: 'user',
            id : 'id1'
        }, {
            message: 'Hello! How can I help you?',
            sender: 'robot',
            id : 'id2'
        },
        {
            message: 'Can you get me todays date?',
            sender: 'user',
            id : 'id3'
        },
        {
            message: 'Today is September 26',
            sender: 'robot',
            id : 'id4'
        } ] );
 
        const chatMessages = array[0];
        const setChatMessages = array[1];
/* in react we should not modify the data directly. 
We should create a copy of the data and modify the copy. */

function sendMessage() {
  setChatMessages([
     ...chatMessages,
   {
      message : 'test',
      sender : 'user',
      id  : crypto.randomUUID()
   }
]);
}
return (
<>
<button onClick={sendMessage}>Send Message </button> 
{chatMessages.map((chatMessage) => {
return (
  <ChatMessage 
     message={chatMessage.message}
     sender={chatMessage.sender}
     key={chatMessage.id}
/>
);
} )}
</>
);
}

      function App (){
        return (<>
        <ChatInput />
        <ChatMessages />
      </>);  

      } 

      //const app = ( App );
      const container = document.querySelector('.js-container');
      ReactDOM.createRoot(container).render(<App />);
    </script>
  </body>
</html>

React Course - Chatbot - Save input text messages

Chatbot
Below is the code to save th input text message when the SEND buton is clicked. If we right click and inspect the code on the browser, on Console it will show the input messages typed when we click on SEND button.
<!DOCTYPE html>
<html>
  <head>
    <title>Chatbot</title>
  </head>
  <body>
    <div class="js-container"></div>
    

    <script src="https://unpkg.com/supersimpledev/react.js"></script>
    <script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
    <script src="https://unpkg.com/supersimpledev/babel.js"></script>
 
  <script type="text/babel">
    
       function ChatInput(){
          const [inputText, setInputText] = React.useState('');

          function saveInputText(event) {
          // console.log(event.target.value);
            setInputText(event.target.value);
          }

          function sendMessage() {
            console.log(inputText);
              
          }
        return (
       
          <> {/* using fragment to remove extra div elements */}
             <input placeholder="Send a message to chatbot" 
             size="30"
             onChange={saveInputText}
             />
             <button
               onClick = {sendMessage}
             >Send</button>
          </>

        );
       }

    

      function ChatMessage({message, sender}){
          
          return (
              <div> {/* use div element to put the ChatMessage on a new line */}
              {sender === 'robot' && <img src="robot.jpeg" width= "50"/>}
                {message}
              {sender === 'user' && <img src="human.jpeg" width= "50"/>}
                </div>

              )
          
       }  

function ChatMessages() {
const array = React.useState([{
            message: 'hello chatbot',
            sender: 'user',
            id : 'id1'
        }, {
            message: 'Hello! How can I help you?',
            sender: 'robot',
            id : 'id2'
        },
        {
            message: 'Can you get me todays date?',
            sender: 'user',
            id : 'id3'
        },
        {
            message: 'Today is September 26',
            sender: 'robot',
            id : 'id4'
        } ] );
 
        const chatMessages = array[0];
        const setChatMessages = array[1];
/* in react we should not modify the data directly. 
We should create a copy of the data and modify the copy. */

function sendMessage() {
  setChatMessages([
     ...chatMessages,
   {
      message : 'test',
      sender : 'user',
      id  : crypto.randomUUID()
   }
]);
}
return (
<>
<button onClick={sendMessage}>Send Message </button> 
{chatMessages.map((chatMessage) => {
return (
  <ChatMessage 
     message={chatMessage.message}
     sender={chatMessage.sender}
     key={chatMessage.id}
/>
);
} )}
</>
);
}

      function App (){
        return (<>
        <ChatInput />
        <ChatMessages />
      </>);  

      } 

      //const app = ( App );
      const container = document.querySelector('.js-container');
      ReactDOM.createRoot(container).render(<App />);
    </script>
  </body>
</html>