Saturday, October 21, 2023

Age is just a number, keep learning, keep growing

 In 2021, Sankarapandian entered into an exam hall and took the GATE Exam at 67. The previous year a civil engineer wrote the GATE (Graduate Aptitude Test for Engineering) at the age of 80. In Quora, we can find people writing CAT(Common Admission Test), with their daughters and joining MBA in IIM. Writing these exams at such old age is because of family problems at a younger age, or some write to inspire their grandchildren or children. Age is just a number, the enthusiasm to continue their learning quest is what makes life lively. At the age of 40, in the quest to excel at my knowledge, I thought to prepare for CAT and GATE. How much old you may be, thinking to write these tough exams, will increase your horizon of knowledge. The CAT exam has changed a lot over the years, the logical reasoning part is becoming tougher and tougher and the Electrical GATE exam becoming more and more innovative. If you are a graduate, it's always a challenge to write CAT at any age, because with time the exam becomes quite challenging and interesting. Age is just a number, taking challenges and increasing the IQ by trying some different things is good.

Friday, October 20, 2023

Trying to solve jigsaw of life

 How to live life, depends upon choose of that person. Everyone wants to live a successful life. What success means, depends on social standards. God, when we born, sets successful and a failed path. Seeing into the jigsaw, that God planned for you, and taking the path of success, needs extra effort. Life lived to the fullest is life lived for the purpose. Life lived for the betterment of others is, life of noble, and earnest being. What is a satisfying life, depends on person, for some money is satisfying, others it may be betterment of others. According to my humble understanding, Life lived for money is must, but with a noble head is a most satisfying. Living and setting a benchmark for others is life of purpose. I prefer a thoroughly planned and noble emblemed life. Adversity will keep smacking the door, make it a mettle to progress a successful life. Successful life is a sweet melody, interrupted by abrupt coarse tune.



Thursday, October 19, 2023

A Trip into 2030

I worked with a crazy scientist who discovered a time machine secretly in 2023. The scientist instructed me to board the time machine and the travel into the future began. I landed in India in 2030 and wrote my diary, seeing the events occurring.    

 It, On 28 February 2030, the second batch of settlers on the moon, prepared to make their trip to the moon. Varuna Rocket, with launch vehicle PSLVD-15, is waiting, to onboard these passengers, for the moon trip. The batch consists of 15 Indians, from different parts of the country. In this family of four, are started to be interviewed in a room, before they leave for the moon. The scene is jubilant. The first batch of settlers on the moon was sent 3 months before, they had established a basic colony on the moon. Everything on the moon is on vigil. The plan is to send a batch of 15, in every 3 months' time.5 families were selected for the trip, and the government is charging 1 crore from each family for the trip. The first batch has established an Oxygen plant, on the moon and made all basic needs available, other things that are needed are sent with the second batch of settlers. An announcement is made for passengers to board the Varuna rocket, with the announcement, all 15 were given send-off, by their dear ones. It was a cool evening and all 15 passengers, occupied their seats in Varuna Rocket. The countdown began, with all craving for the future. The lift-off took place, and the journey started for 15 passengers, who were onboard. The mood inside the rocket is euphoric. Everything is being live telecasted and broadcasted in Doordarshan. It's a 15-day journey to the moon. Days passed, the second batch of passengers landed on the moon, were welcomed by the first batch, and everything was being telecasted live. The technology in 2030 is very sophisticated and very advanced. The moon settlers can fulfill their needs by traveling to space stations, that are placed at some distance. The moon is inhabited by 2,000 people from 200 countries around the world. From India, there are 30 people, living on the moon. Each country has its observing station. Water is being stored in the new machines, which are unimaginable for us in 2023. Houses, in the Indian contingent, were made with ceramic deco. On the moon everything is areal, Travel on the moon is through advanced vehicles.

After seeing this I erroneously, commutated the back button, into 2023, with ever-refreshing advancements, that tickle my mind.

Wednesday, October 18, 2023

Why Pablo Picasso's painting so costly?

Pablo Picasso, a Spanish painter, and sculptor is considered to be the creator of the greatest paintings. I write my analysis of the paintings of the Great Pablo Picasso. The factor that makes his paintings priceless is his depth of creativity. There are many a million painters in the world of imagination, but what separates him from others is, the cryptic message a painting envisages. Many famous paintings of him, envisages the current situation of upheaval in society. The painting depicts a situation in political, and cultural happening in the society at that time. Drawing a painting, to educate society is seen as a noble upbringing. Pablo Picasso's magical jigsaw of colors depicts his complicated mind, trying to sculpt a veiled message to voice the concerns of society. The depth of his intellect is reflected in his scribbled paintings of him. His painting takes the client into the world of colors ringing the bells of the unseen, this is the reason, why his paintings are considered to be the costliest, owning a Pablo Picasso Painting is considered to be an elitist.

Monday, October 16, 2023

Our terrace garden.

 Idea began in my dad's head, for a terrace garden. And the start of a terrace garden at my sweet home terrace began. My father is plant enthusiast, and an ardent nature connoisseur. In the moderate area of home terrace, to make a successful garden was a really challenging task to execute. In the year 2019, with nature in unison, put the beginning, to enthralling idea of terrace garden. Initially, with the small beginning, having two brinjal seeds in hand. With my foray, to help my parents, ordered two plant pots from amazon. Our terrace garden started from a brinjal indentation. With the vision of a larger goal in mind, we took small strides into the colossal world of nature. The visitors (variety of birds ,squrrals,pigions) to our terrace garden were skeptical, seeing the indentured garden. The visiting creatures, small in count, put a smile to our face. My mind thinking of a garden, full of colorful butterfies,small but chirpy birds, riveting squrrels,envisioned a heaven on earth, that was my impetus to stive for a larger picture. Our plan was to have a mix of vegetable plants and garden of flowers (Rose etc). Garden of flowers were, targeted for our sweet visitors (variety of birds etc). With brinjal plantation at the start and moved towards Rose and other flowers plantation. In a 5-month period, garden started to make a thrust, visitors started to increase, which made our smile latitudinous. With the years' time, with trail and errors and a bit of tumbles, Garden started to blossom into a forte. More chirpy sounds, started to ring our eardrum, our garden produces a reverberating sound of nature. Augmenting nature's activity considered a fortuitous sign for our house. We see a cooling visitor to hysterical habitue. Good thing about our place is nature responding in concordance. In 2023, garden became big and having variety of species to interweave. In line of tomato plants, between okra and grape, seeing a colorful mix, enchanting to our eyes. This is the exhilarating story of our terrace garden.

Sunday, October 15, 2023

Victory of Hope Over pessimism (An imaginary story On Uttarakhand floods)

The day was bright and sunny, on the banks of river Nandini, a family of four, in their small abode resides. The happy family consists of parents and their two children. Ravi, being the head of the family, is a Shapard and a worker in the countryside factory. The day was 12 August, and the sun with its furious fury of heat, baking the river Nandakini.Ravi took leave from his daily activity, to stay with the family. Ravi, with his wife Parimala and children Kosi and Amber, in the shade of their abode resting. Parimala is busy with her daily chores. Ravi with his children, hooked on to the television, were seriously imbibed into the content. The family was happy and content, with whatever they did. Ravi has the financial muscle, and can even stay in the countryside. His love for nature, made him decorate a house near the Nandakini river. The equation was simple for the family, to work hard and stay happy inside their tiny reside of theirs. The furious sun was at its animated best, with the unbearable heat. The family was drenched with sweat. The cooler in the corner, which was bought by Ravi lately, was not sufficient to enervate the sun's fury. Suddenly, breaking news started to flash on the glassy-donning television set. The sweating Ravi was moved by the news that was mirrored by his TV set. Ravi, says to Parimala, dear there is a piece of breaking news on TV, regarding heavy rains in our area, and they are warning people, who live near the banks of a river, to leave their abode. Seeing the weather, Ravi was perplexed, because at present sun is sending heat waves in their place. Ravi not a believer of forecast stations, was cozily moved to the nearest chair and started to mount on it. Ravi, who was moved at first glance by the breaking news, went into the normal state and continued to follow the incoming programs on TV. Unconcerned, a look of the family, not measuring the future rumble was a concern to heavenly gods. It was noon, and with her sweet smile, Parimala invited the complete family to take their lunch. With a hefty smile Ravi, the family of four, having their lunch in carving customs. Something peaches in their mind of Ravi, indicating that it's a lull before the storm. Ravi was disturbed but stashed his feelings from his family. Suddenly, the weather became overcast, and signs of rumble started to disturb the family. Unnerved by the weather, the family started to have their lunch, sirens in their area were ringing and the family thought about leaving their abode. Suddenly, with the irate lightning, striking the river Nandakini, heavy rains started its downpour. In no time their abode got washed away, in mighty Nandakini, all four in the river trying to hold on to the timber of their abode washed away by the heavy flow.5 minutes into the furious Nandakini River, the existence was a miracle.15 minutes into the river Nandakini, a family of four, snapped onto the timber, ever losing hope. With the firmness of their belief, made them hold on to the timber, Suddenly Army helicopter's eye, fell on them and they were rescued, with the horrific experience, Ravi bestowed on the feet of the Army people and thanked their brave act.

We can mourn for a minute to the people, who survived and who perished, in the flash flood and remember our defense personnel's brave act. Ending the story, realizing the hardship gone to save them and saluting the Indian Army.

Saturday, October 14, 2023

Corner the fear of failure

Rise above the epithet of failure,

Mind full of prompting optimism.

Never give up, to fear of failure.

Trump over the vehement, fear of failure.

Stormy, fear of failure, will ruckus your thundering confidence. 

Donning Confidence, should destroy, fear of failure.

Get over, the enigma of failure, there lies the key to success.

Life is an adventures journey, with ever pealing fear of failure.

Master Over it, to make it a captive.

Snarling, fear of failure, should be turned into syrupy music.

That is how, you Corner the fear of failure.





.



Story of destitute in Telangana(poem)

 Fear of future existence, linger large, with the untold crusade.

 Fear for the dearest tinker, enable the power to live.

War to exist or perish stumble over the wildness of mind.

Fear of not getting Bread, butter for the day, peal in the astounding mind.

Trembling confidence, trave the optimism.

In the dilapidated hut, everything left for God's grace to enter.

This is the story of a destitute slum dweller, in parts of Telangana.

 


 

Friday, October 13, 2023

Importance of planning the future

 Planning plays a major role in success of the individual. Seeing into the future and setting the prior plan is the credence of the mighty. Like our Indian government or any government in the world have unfold five-year plans. Planning can be many types, it can be.

1)Economic Planning (Health, Daily budget etc.)

2)Educational Planning

3)Holiday Planning

and many things.

For an economy to flourish, Economic Planning and Educational Planning plays a pivotal role. Any developed economy in the world we see, have these two Planning at the zenith. For example, United states,Singapore,China and other developed countries have their Economic Planning and Educational Planning topnotch.Firstly,we will focus our attention on Economic Planning.

                                                  Economic Planning 

I like to involve health into Economic Planning. Let's first see Health. "Health is Wealth". According to myself, don't live life, thinking some miracle will protect us from abrupt disaster. Think your house as a unit of planning, don't go into wider world. Never know what will happen in near future. Think about, the most disastrous situation, that can happen for you regarding health and start planning money to be put aside. The money should be placed for that disastrous event, in the source where it multiplies in future. Thinking into the future, will remove all thorn in the flesh.

                                                  Educational Planning 

Education is the weapon of developed world to lead the other world. Plan Education of your House, such that, A research scholar should exist in your micro world. Seeing into the powerful economies of world, we can see the power of Education. United States ,China,Russia,Singapore and other developed economies, do very well at research. United States leads the noble price category because of their strong Educational Planning. Make your small unit, which is your house, a powerful research unit. The basics of economics, if your Exports are more than Imports, then you have a strong economy.  

I like to conclude, seeing into the future is what makes your life smooth. 

 

Wednesday, October 11, 2023

Tribute to Indian Soldiers

 The life of immense selflessness, there Only aim to guard India from the ghostly evil.

Into the Wuthering, In the frightening darkness, On the rigorous mount with their determined soul, there Only aim, to guard Indians from threatening forces.

Not to forget, our peaceful sleep, prosperity belongs to their courageous detour, there only aim to drape the besieging demur.  

Sacrificing their happiness, there only aim to contour their anger against berating thunder. 

In the border with ever lynching, life threatening Challenges, there only aim to seize the evil.

Into a war, like a rigorous shield resting on Indian border, there only aim to sacrifice for better good of countrymen.

Like a burning ether, there only aim to make India peaceful.

Into the skies, on land, in water, having a stringent vigil, there only aim to win over vicious.





Thursday, September 28, 2023

How Spring is different from core java

 Mostly Spring differs from Core java has it reduces dependency of one element on other. In spring the code is made loosely coupled and hence dependency on one element on other is completely eliminated.

With the help of dependency injection (dependency is injected through annotations or xml). Code is made loosely coupled. For good programming practice, the code should be loosely coupled. Which in core java, we cannot do. It can be done in spring.


For Example

Class Employee{

private String empID=null;

private Address add=null;


public String getEmpId(){

return empID;}

public void setEmpId(String empID){

this.empID=empID;}

public Address getAddress(){

return add;}

public void setAddress(Address add){

this.add=add;}




}

Class Address{

}

In the above example Class Employee depends on Class Address in Core Java. The example is said to be tightly coupled code. In spring Injection of Class Address is either done by .xml file or annotation. Hence the dependency is reduced, and code is made loosely coupled. 


Monday, September 25, 2023

Brain neuron's siphon at zero cost

 Brain which is considered to be one of the most important parts in human body, is contemplated to be the powerhouse of human advancements. Either excelling at business or education or any activity, brain power is must. Measure of intelligence is directly correlated to, how striking is electric neurons activity. Advancement in science, medicine or in any field majorly revolves around the brain. From early man to the human being now, brain played major role in human advancements. In this article, I like to reveal some secrets that can increase our brain activity with zero cost involved.

With my experiments from past 12 years, I got to know, how to make brain electric.

                                                          Chess

Thing, I like the best with chess is, that it makes people think, which will definitely lubricate the brain. I recommend solving chess puzzles are best to increase your brain power. The title of this article is with no cost involved; I will improve your brain activity. With my experience with chess, it will be more rewarding if you only solve chess puzzles. I like to reveal some free chess puzzles sites and applications which are free.

                


   




www.lichess.org (There chess puzzles are free, I find those puzzles having depth and will increase your creativity and imagination) 

   

TACTICS FRENZY

This App, which belongs to world number 1(according to FIDE Rating) Magnus Carlsen's a chess app.Chess  puzzles are free of cost and very deep. I will guarantee you for a complete neuronlitement(joke).

You can get this app in play store.

Note:Even for people with chess background also can daily, solve 10 puzzles will improve their brain activity.

                                                        SUDOKU

With my experience, I find solving sudoku's are good for brain. I like to give free sudoku site, that you can find on the internet.


You will get mind bending sudoku's here.The swordfish sudoku's and X-Wings puzzles are the best here.From beginner to advance geeks, everybody can find the recipe over here.


                                           MATH AND RESONING

MATH and RESONING provides much needed inputs to brain. I like to list some really good YouTube channels, that can make you excited.

           

                       (1476) LOGICALLY YOURS - YouTube
The above YouTube channel have good puzzles and interview questions, which will definitely enrich your view.


                   (1476) MindYourDecisions - YouTube
Good YouTube channel. We can get the puzzle books of the author in different sites.


                                              PUZZLE BOOKS

Solving puzzles from puzzle book. You might be confused because you have to purchase books, but that is no need. If you type pdfroom or pdfdrive in google you will go to the site, there type puzzle books, you will get many puzzle books there. 


 These are the things and habits done regularly and with a dedicated discipline can increase our IQ and the brain power. Getting the things done with no cost and greater optimization is what this blog post refers to, Hope this post is engaging and interesting.




---------------------                              Comment and share                                                                                                            ----------------

                                  

 

Sunday, September 24, 2023

How To Make A telegram Blot using SpringBoot (java)

 To Make a Telegram Bot ,first you have to create a bot in telegram,type BotFather in telegram search 

type /newbot in the telegram (like there in pic)

Here, I gave bot name as (satishbot),has shown in the pic.



we will get the token,like there in above pic ,In the above pic you can see(Use this token HTTP API),there at the botton ,you will see the token.This is all you have to do with telegram App

With the use of Spring Iniatializer create a SpringBoot project


  

The above pic is the package structure of a chatbot application using Eclipse IDE.


The above pic shows classes in the package.I will give the code below of each class in the package

ChatbotApplication main class

Here we have  to register out bot class with telegram

package com.example.chatbot.chatbot;


import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.telegram.telegrambots.meta.TelegramBotsApi;

import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import org.telegram.telegrambots.meta.generics.BotSession;

import org.telegram.telegrambots.meta.generics.LongPollingBot;

import org.telegram.telegrambots.meta.generics.TelegramBot;

//import org.telegram.telegrambots.meta.TelegramBotsApi;

//import org.telegram.telegrambots.meta.TelegramBotsApi;

/*import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import org.telegram.telegrambots.meta.generics.BotSession;

import org.telegram.telegrambots.meta.generics.LongPollingBot;

import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;*/

import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;


import com.example.chatbot.config.TelegramBotConfig;


//import com.pengrad.telegrambot.TelegramBot;


@SpringBootApplication(scanBasePackages={ "com.example.chatbot.config"})

public class ChatbotApplication {


public static void main(String[] args) {

SpringApplication.run(ChatbotApplication.class, args);

///TelegramBot telegramBot = new TelegramBot();

//TelegramBot telegramBot = new TelegramBot();

    try {

        TelegramBotsApi botsApi = new TelegramBotsApi(DefaultBotSession.class);

        botsApi.registerBot(new TelegramBotConfig());

        System.out.println("bot registered successfully");

    } catch (TelegramApiException e) {

        e.printStackTrace();

    }

}


}

TelegramBotConfig :: class code 

package com.example.chatbot.config;

import com.example.chatbot.UserState.UserStateEnum;

import com.pengrad.telegrambot.TelegramBot;

//import com.pengrad.telegrambot.request.SendMessage;


import java.util.HashMap;

import java.util.Map;


//import com.pengrad.telegrambot.TelegramBotAdapter;

import org.springframework.beans.factory.annotation.Value;

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

import org.springframework.stereotype.Component;

import org.telegram.telegrambots.bots.DefaultAbsSender;

import org.telegram.telegrambots.bots.TelegramLongPollingBot;

import org.telegram.telegrambots.meta.api.methods.send.SendMessage;

import org.telegram.telegrambots.meta.api.objects.Message;

import org.telegram.telegrambots.meta.api.objects.Update;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboard;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboardRemove;

import org.telegram.telegrambots.meta.bots.AbsSender;

import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import static  com.example.chatbot.UserState.UserStateEnum.AWAITING_NAME;

import com.example.chatbot.KeyBoardFac.*;

import static com.example.chatbot.UserState.UserStateEnum.FOOD_DRINK_SELECTION;

import static com.example.chatbot.UserState.UserStateEnum.AWAITING_CONFIRMATION;

import static com.example.chatbot.UserState.UserStateEnum.PIZZA_TOPPINGS;


@Component

public class TelegramBotConfig extends TelegramLongPollingBot  {

private final HashMap<Long, UserStateEnum> chatStates =new HashMap<>();

 

@Override

public void onUpdateReceived(Update update) {

String userMessage=update.getMessage().getText();

Long chatId=update.getMessage().getChatId();

SendMessage message = new SendMessage();

   if(userMessage.equalsIgnoreCase("/start")) {

   replyToStart(chatId);

   

  }

  

   if(!userMessage.equalsIgnoreCase("/start")) {

  switch (chatStates.get(chatId)) { case AWAITING_NAME ->

  replyToName(chatId, update); case FOOD_DRINK_SELECTION ->

replyToFoodDrinkSelection(chatId, update);

case PIZZA_TOPPINGS -> 

  replyToPizzaToppings(chatId, update); case AWAITING_CONFIRMATION ->

  replyToOrder(chatId, update); default -> unexpectedMessage(chatId); }

   }

   }

   

@Override

public String getBotUsername() {

return "satred35bot";

}



  @Override public String getBotToken() { return "6467366090:AAE-1eCSTPVhbeu0O0VlqYjODeaOu8_jHWE"; }

 


public void replyToStart(Long chatId) {

try {

SendMessage message=    new SendMessage();

message.setChatId(chatId.toString());

message.setText("Welcome to satishbot ,please enter your name");

execute(message);

chatStates.put(chatId,AWAITING_NAME ); 

}catch (TelegramApiException e) {

        e.printStackTrace();

    }

    

}

private void unexpectedMessage(Long chatId) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText("I did not expect that.");

    try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

private void replyToName(Long chatId, Update message) {

    promptWithKeyboardForState(chatId, "Hello " + message.getMessage().getText() + ". What would you like to have?",

      KeyboardFactory.getPizzaOrDrinkKeyboard(),

     FOOD_DRINK_SELECTION);

}

private void promptWithKeyboardForState(Long chatId, String text, ReplyKeyboard YesOrNo, UserStateEnum awaitingReorder) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText(text);

    sendMessage.setReplyMarkup(YesOrNo);

   try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}


  chatStates.put(chatId, awaitingReorder);

 }

private void replyToPizzaToppings(Long chatId, Update message) {

    if ("margherita".equalsIgnoreCase(message.getMessage().getText())) {

        promptWithKeyboardForState(chatId, "You selected Margherita Pizza.\nWe will deliver it soon. Thank you!\nOrder again?",

                KeyboardFactory.getYesOrNo(), AWAITING_CONFIRMATION);

    } else if ("pepperoni".equalsIgnoreCase(message.getMessage().getText())) {

        promptWithKeyboardForState(chatId, "We finished the Pepperoni Pizza.\nSelect another Topping",

                KeyboardFactory.getPizzaToppingsKeyboard(), PIZZA_TOPPINGS);

    } else {

        SendMessage sendMessage = new SendMessage();

        sendMessage.setChatId(chatId.toString());

        sendMessage.setText("We don't sell " + message.getMessage().getText() + " Pizza.\nSelect the toppings!");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaToppingsKeyboard());

        try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void replyToFoodDrinkSelection(Long chatId, Update message) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    if ("drink".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We don't sell drinks.\nBring your own drink!! :)");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    } else if ("pizza".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We love Pizza in here.\nSelect the toppings!");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaToppingsKeyboard());

        try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

chatStates.put(chatId, PIZZA_TOPPINGS); 

    } else {

        sendMessage.setText("We don't sell " + message.getMessage().getText() + ". Please select from the options below.");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void replyToOrder(Long chatId, Update message) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    if ("yes".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We will deliver it soon. Thank you!\nOrder another?");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

chatStates.put(chatId, FOOD_DRINK_SELECTION); 

    } else if ("no".equalsIgnoreCase(message.getMessage().getText())) {

        stopChat(chatId);

    } else {

        sendMessage.setText("Please select yes or no");

        sendMessage.setReplyMarkup(KeyboardFactory.getYesOrNo());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void stopChat(Long chatId) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText("Thank you for your order. See you soon!\nPress /start to order again");

chatStates.remove(chatId); 

    sendMessage.setReplyMarkup(new ReplyKeyboardRemove(true));

   try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}



}


class KeyboardFactory code::::


package com.example.chatbot.KeyBoardFac;


import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboard;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboardMarkup;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.KeyboardRow;


import java.util.List;


public class KeyboardFactory {

public static ReplyKeyboard getPizzaToppingsKeyboard() {

KeyboardRow row = new KeyboardRow();

row.add("Margherita");

row.add("Pepperoni");

return new ReplyKeyboardMarkup(List.of(row));

}


public static ReplyKeyboard getPizzaOrDrinkKeyboard(){

KeyboardRow row = new KeyboardRow();

row.add("Pizza");

row.add("Drink");

return new ReplyKeyboardMarkup(List.of(row));

}


public static ReplyKeyboard getYesOrNo() {

KeyboardRow row = new KeyboardRow();

row.add("Yes");

row.add("No");

return new ReplyKeyboardMarkup(List.of(row));

}

}




Enum UserStateEnum





package com.example.chatbot.UserState;


public enum UserStateEnum {

AWAITING_NAME, FOOD_DRINK_SELECTION, PIZZA_TOPPINGS, AWAITING_CONFIRMATION

}





OUTPUT WILL BE LIKE 






Friday, June 16, 2023

Paparazzi pilaster

 lease Rate This Story


In a bustling suburb of Mumbai, a school named Mumbai public school, on the eve of Independence Day is sprouting with activity. School with its legendary past, known to invite a famous personality of the year, for its independence day. The climate serenity, with the gigantic crowd collocated, echoed an aura of happiness. With the Indian flag entwined

On the podium, looking to be unfurled by the chief guest, all sight rested on the chief guest of the day,
The crowd is in a cryptic dilemma, with high dignitaries of the school refusing to reveal the name of the guest,
Every face in the crowd was mazed by the question, who will be the chief guest for this year? Into the
Grim silence, a BMW choke its tethering flow, and a man with a pale emblemed face, thin in appearance entered from the BMW, with he left the residing, crowd at the end of the cusp, seeing the principal rushing towards the entry of auditorium, to invite the guest of the day. With an affable smile, the principal of the school invited the guest into the auditorium. With Forlorn walking in front of the audience, the crowd got a glimpse of the guest, murmur broke into the crowd, with some part of the audience recognizing the famous figure. The principal and the guest, stepping ahead on the podium of the auditorium, found their chair to be seated. With the guest settled and having a glimpse of the curious crowd, the crowd enjoyed the full view of the guest. The senior teacher of the school nears the Mike on podium, to start the proceedings of the day. The senior teacher, called on the principal of the school, to introduce the chief guest. With a beaming flash the principal took Mike into his hand and started introducing the guest. The principle says: "Good morning to enthused gathering. I like to introduce to the audience our chief guest. He is Mr susheel, a paparazzi, with his mystic photos winning many awards, in and outside our country. Recently, he won a world-famous award in paparazzi. I like him to unfurl our tricolor ".Part of the crowd already knew the guest's name before the introduction, so were unmoved.
With that, the principal and Mr susheel took great steps toward the flag pole. Mr susheel, unfurled the tricolor, and petals of flowers graced the guest. A Crescendo of the Indian National anthem spread through the auditorium. The guest, principal, and crowd stand to the National anthem, with patriotic fervor running in the veins of people. The last lines of the anthem saw, the crowd in a serene pose. The anthem ended, principal moved towards Mike, to invite Mr susheel to engross his an inspiring journey to the crowd filled with students and their parents. Mr susheel moved towards Mike in brisk style, the crowd seeing Mr susheel, where into conundrum, how come Mr susheel made a living and went from rags to riches, while being a paparazzi?, the crowd was spellbound by the magnetic personality of Mr susheel. Mr susheel taking Mike into his hand started with a sober mood overtook the jubilant state, which he was previously in. Mr susheel started addressing the crowd, and became emotional, Mr susheel says, "Good morning parents and students, Success in any field depends on knowing the intricacies of the field as well as the luck involved. My journey is moved by two wheels of luck and hard work both balancing my paparazzi vehicle equally. Never in my budding days, dreamed about my success being so big. I want these tech-savvy, Hitech parents not to draw a boundary to their child's career plan. I saw in India, very few risks with new fields like paparazzi. In the U.S., European countries, take up different fields. My story is no less engrossing than a super-hit Bollywood movie, having all types of shades visible. (Mr susheel, took a pause, sipping water, from the glass on the table, with his stern glance towards the audience, saw the crowd mesmerized). Mastery of any field, depends on the intellectual depth you have in that field, I can take the example of the great Picasso, why is his art, so famous and costly? It is because of the Intellectual depth his art emulates. Similarly in any field may be it Engineering, paparazzi, maths, etc, talent in these fields depends on Intellectual depth. My story goes back to 30 years earlier Telangana, born in the slums of Adilabad. My parents both toddy toppers, have their profession. In the grim reality, my parents in one room stay, deprived of basic amenities. With the family income of 1000 rs per month, life was very tough and rough. Those were the day, our family struggled for every piece of bread. My success in paparazzi is because of my mind filled with terrifying scenes of childhood struggles, I had seen, and my surroundings filled with sorrow. Recently, I won a prize because my photo unfolded, the cryptic story of a hungry person, which I experienced. The success of today mostly depends on the tough ride, I go through in my childhood. Going to school was travel for 20 km, outside our slum, and my parents decided to enroll me in school, that was the crucial decision my parents took, which paid off, in my later quest for success. In early schooling, i was studious and always liked by my teacher. When I was in 2 class of schooling, an incident completely changed the course of my life. I was coming from school, and there I found a person, holding a camera in his hands, taking some, interesting photos of our slum, seeing him taking photos, I was curious, some questions encountered my thought, about why he was taking the photos of these grim realities? What he will get?, because of the curious mind, I have, the questions made me inquire, I started moving towards the photographer, and started asking my questions, I found him very friendly, he told, he was a paparazzi, representing a Hindu newspaper and told, that I am very small to know the meaning of the word. I asked him to give, me the camera for a moment, which he did, and my fascination for my weapon (camera) started. But I got to know, the thing he was doing, behind the grim reality of an empty stomach, there started my, adventure for photography. In the 5 class of schooling, I was collecting photos from the magazines I encountered. To my surprise, one day, I saw the same paparazzi, whom I met 3 years back. I met him, and with the first glace of his sight, he recognized me. I told, him to wait for me, went to the house, and got the collection of photos, I collected, he was my first guide, who took me into his stride, and was impressed by my interest in Paparazzi. His name was Mr. Shyam, he was a struggling paparazzi but a generous and kind-hearted person. He inquired about my family, (he told, he was impressed by my keen eye for photography and liked to help me, his salary is rs 10000 per month, he told, he will help me). He got the complete whereabouts of my place, left the place, promising me to help. He appeared in front of me, after 3 months gap, and to my surprise, he gifted me Kodak 240, an entry model, to me. I thanked the generosity shown by him towards me. He told me to click some photos of a variety of birds in and around the Adilabad slums. He left the place, never after that, incident, we ever met again. After two years, in the Hindu newspaper, I found the news of Mr. Shyam's obituary. On that day, I cried a lot, with my tears, telling Mr Shyam, to rest in peace. Mr Shyam concomitant, played a crucial part in the marvelous success, I am enjoying. Into the 8 class of schooling, being a backbencher, I studied the intricacies of Steven's photos, which are like a bible for paparazzi. With the camera( kodak 240, which was gifted by Mr Shyam), I had a complete collection of photos of birds, and slums captured every minute detail in my photos. My first success came when I was in 10 class of schooling, the picture I took of my slum, was figured out in Hindu and I was paid Rs 5000 for that, it was my first salary, my parents were happy about it, my friends in the slum, were in the jubilant state, with my photo appearing in Hindu, Hyderabad edition, started my professional career in paparazzi. From that day, my photos appeared in newspapers like the Hindu, and Indian Express regularly. I was earning respectable money at the age of 16, and my life which was on tenterhooks before transformed into reasonable living. With my reasonable salary, I was able to buy, my parent's dress, which braced my confidence, with their sanguine words. I prayed to Ganesha (god), known to be a words magician. I joined Vivekananda junior college, known to finance budding talent, and got a scholarship for my further endeavors. Soon after completing of my college, got a job in an elite American company, where the glitters of the Royal elite, made me part of the elite. With my skills sharpened, in the company of the elite, in the span of 12 years, went from rags to riches. Where I am now, is the story of the hard work and dedication I gave to my field. Thanking the gathering of parents, children, and respectable teachers, I like to end my speech. The whole crowd gave a standing ovation to Mr susheel, moved by the grand ovation, and tears roll out of Mr susheel eyes. The principal addressed the gathering, "Mr susheel is an inspiration to many, who want to reach the skies. Thank you Mr susheel".Mr susheel left the podium of the auditorium, Principle accompanied him and gave a send-off. Curtains to the inspiring life.

Saturday, May 6, 2023

crescendo of deaf

                                                  

 

I am perplexed whether being deaf is really an imprecation. Close enculturation into the premiate of deafness. I conclude it can be boom also. To exonerate the maze of the above thinking, I like to delve into Mother nature's deafness. Being deaf to human cruelty, nature's deaf crescendo inculcates love into humans. The deaf crescendo of nature tunes a string of notes, that fills love. Human's arrogance is tamed by sweet crescendo of nature.