Menu

How to find the CDN used by a Website using Domain or URL?

Content Delivery Network (CDN) is an important thing in the world of internet, to render or deliver the content faster to users. CDN Checker of CDN Planet is a good online tool to quickly check and find the which CDN is being use by a website. Using CDN cheker, with the help of website URL or domain name of website we can easily check the CDN use by a website. Following are the process steps to find the CDN.

1. Open CDN Checker (https://www.cdnplanet.com/tools/cdnfinder/)

2. Put the resource URL or website domain or website address to check the CDN

3. Select respected option from Website or Hostname/URL

4. Click on Run CDN Finder button

Below is an sample screenshot.

CDN Checker - way to check CDN - Check which CDN is being use
CDN Finder/ CDN Checker



Mindfulness (smriti) in Indian philosophy

Mindfulness, known as "smriti" in Indian philosophy, has deep roots in various ancient traditions such as Hinduism, Buddhism, and Jainism. It encompasses a multifaceted approach to cultivating awareness, presence, and focus. Here are some key aspects of mindfulness in Indian philosophy:

1. Samprajnata and Asamprajnata: Indian philosophy recognizes two levels of mindfulness. Samprajnata, also known as "savikalpa samadhi," refers to a state of mindfulness with conceptual awareness. Asamprajnata, or "nirvikalpa samadhi," is a higher level of mindfulness devoid of conceptualization, where the mind transcends all thoughts and experiences pure awareness.

2. Satipatthana: In Buddhism, the practice of mindfulness is embodied in the Satipatthana Sutta, which outlines four foundations of mindfulness: mindfulness of the body, feelings, mind, and mental objects. This comprehensive framework encourages practitioners to observe and investigate their experiences without judgment or attachment.

3. Vipassana: Vipassana is a form of meditation that aims to develop insight and wisdom through mindfulness. By observing bodily sensations, thoughts, and emotions, individuals gain deep insights into the impermanent, unsatisfactory, and selfless nature of existence. Vipassana meditation is widely practiced in Buddhism and has gained popularity globally.

4. Anapanasati: Anapanasati is a mindfulness practice focused on the breath. It involves observing the inhalation and exhalation, anchoring the attention to the breath, and cultivating present-moment awareness. This technique is commonly practiced in both Hindu and Buddhist traditions to develop concentration and mindfulness.

5. Sati: Sati, often translated as mindfulness, is a central concept in Hindu philosophy, particularly in the Yoga Sutras of Patanjali. It refers to the state of focused attention and awareness, enabling individuals to disengage from distractions and connect with the present moment. Sati is seen as a powerful tool for self-transformation and liberation.

6. Smriti: Smriti, meaning memory or recollection, is another aspect of mindfulness in Indian philosophy. It involves the intentional remembrance of spiritual teachings, values, and experiences, fostering a continuous awareness of one's moral and ethical commitments. Smriti serves as a guide for virtuous living and spiritual growth.

7. Karma Yoga: In the Bhagavad Gita, a sacred Hindu scripture, mindfulness is integrated into the practice of Karma Yoga, the path of selfless action. By performing duties without attachment to the results, individuals cultivate mindfulness in every action, recognizing their interconnectedness with the world and the divine.

These aspects of mindfulness in Indian philosophy emphasize the cultivation of present-moment awareness, self-inquiry, non-judgmental observation, and the development of wisdom. By incorporating mindfulness into their lives, practitioners seek to transcend suffering, gain insight into the nature of reality, and attain spiritual liberation.

UNESCO World Heritage Sites in Delhi, India

There are three UNESCO World Heritage Sites in Delhi. Those three sites are:

  1. Qutub Minar (declared in year 1993)
  2. Humayun’s Tomb (declared in year 1993)
  3. Red Fort (declared in year 2007)


Qutub Minar, Image Source: AudleyTravel.com


The Importance of Computer in the 21st Century

In the 21st century, computers have become an integral part of our daily lives, revolutionizing the way we communicate, work, learn, and entertain ourselves. Their importance cannot be overstated, as they have become essential tools for individuals, businesses, and societies at large. This essay will explore the various reasons why computers hold immense significance in our rapidly evolving world.

Enhanced Communication 

Computers have transformed communication, breaking down geographical barriers and enabling instantaneous global connectivity. With the advent of the internet, email, social media, and messaging platforms, people can now communicate, collaborate, and share information with ease. The digital realm has fostered cross-cultural understanding, promoted knowledge exchange, and facilitated efficient communication channels for businesses and individuals alike.

Empowering Education 

Computers have revolutionized the education sector, offering endless opportunities for learning and knowledge acquisition. Digital platforms, online courses, and educational software provide accessible and personalized learning experiences. With computers, students can access vast amounts of information, engage in interactive learning activities, and develop crucial digital literacy skills that are essential for their future success in the job market.

Advancements in Science and Research: Computers play a pivotal role in scientific research and technological advancements. Complex simulations, data analysis, and modeling are made possible through powerful computing systems. Researchers can analyze vast datasets, simulate experiments, and make groundbreaking discoveries at an accelerated pace. From climate modeling to genetic research, computers have become indispensable tools in pushing the boundaries of human knowledge.

Economic Growth and Efficiency 

In the realm of business and economics, computers have become the backbone of operations. From small startups to multinational corporations, computer systems automate processes, streamline operations, and enhance productivity. E-commerce has flourished, enabling businesses to reach global markets and consumers to enjoy convenient online shopping experiences. The digital infrastructure powered by computers has also given rise to new industries, creating jobs and contributing to economic growth.

Empowering Creativity and Innovation 

Computers have unleashed a new era of creativity and innovation. Graphic designers, filmmakers, musicians, and artists utilize powerful software tools to bring their visions to life. From 3D modeling to video editing, computers enable the realization of artistic endeavors that were once unimaginable. Additionally, programmers and developers constantly push the boundaries of software and technology, driving innovation in diverse fields and propelling society forward.

Conclusion

In conclusion, computers have become a cornerstone of the 21st century, permeating every aspect of our lives. From communication and education to science, business, and creativity, their importance cannot be understated. Computers have revolutionized the way we interact with the world, empowering us with unprecedented opportunities for growth, connectivity, and knowledge. As we continue to embrace technological advancements, the role of computers in shaping our future is bound to become even more significant.

ReferenceError: fetch is not defined

If you are seeing this error while using the node that means your node version doesnt support out of the box fetch API. There could be two possible solution

1. Upgrade the node version

Check installed node version using command >> node -version

Then using this command update node version to latest node version. npm install -g node

2. Install node-fetch

You could use the fetch with your existing project and node version as well. For that you have to install the node-fetch and use it.


a). Node install command
npm install node-fetch@2

b). After successful install create a fetch constant in your JS file where you are usign the fetch. Like below.

const fetch = require("node-fetch");

Code Quality Rules in AEM Cloud Manager

Sonar code quality rules in Adobe cloud manager








Callback function JavaScript and NodeJS

Lets understand the callback fucntion in NodeJS using the below geocode example.

Here we have created geoCode function with two paramters, first parameter will take input of the location name and second parameter the function that needs to call. Similary, we can add or pass any number of paramters in fucntion as per need.

const geoCode = (location, callback) => {
    const data = {
        location: location,
        latitude: 0,
        longitude: 0
    }
    callback(data)
}

 

When we call the geoCode function, we are here passing a city name and second paramter a fucntion itself that print the return data from callback on console.
 
geoCode('New Delhi', (callbackData) => {
    console.log(callbackData)
});

Return

{ location: 'New Delhi', latitude: 0, longitude: 0 }

Immediately Invoked Function Expression (IIFE) in JavaScript

There is a situation where we want to make a function and execute that function immediately at the same place where we have written. These function can be written in JavaScript without any function name. The approach which we follow to do so is called Immediately Invoked Function Expression (IIFE). Let's see an example of this.

(function() {

//write something in IIFE

}

Hence, if a develop come to any point where there is no need to function name then they could use Immediately Invoked Function Expression (IIFE). 

How to write JavaScript function without function name? and Write an immediate invoke function in JavaScript?

Answer of all these questions is Immediately Invoked Function Expression. 

Type of Snakes

Snakes are a diverse group of reptiles that belong to the suborder Serpentes. They are found in various parts of the world and exhibit a wide range of physical characteristics, behaviors, and habitats. In this essay, we will explore some of the different types of snakes and highlight their distinct features.

1. Vipers:

Vipers are venomous snakes that can be found in both the Old World and the New World. They are characterized by their triangular-shaped heads and long, hollow fangs that inject venom into their prey. Vipers include species such as rattlesnakes, copperheads, and bushmasters. They typically have a heat-sensing pit organ between their eyes and nostrils, which aids in locating warm-blooded prey.

2. Cobras:

Cobras are another group of venomous snakes that are famous for their ability to expand their necks into a hood when threatened. They are found primarily in Africa and Asia. Cobras possess potent neurotoxic venom and can deliver a lethal bite. The King Cobra, the largest venomous snake in the world, belongs to this group.

3. Pythons:

Pythons are non-venomous constrictor snakes that are known for their impressive size and strength. They are found in tropical regions of Africa, Asia, and Australia. Pythons use their muscular bodies to suffocate and constrict their prey before swallowing it whole. The reticulated python and the Burmese python are among the largest snake species on Earth.

4. Boas:

Boas are large constrictor snakes that can be found in various parts of the world, including North, Central, and South America, as well as Africa, Asia, and some Pacific Islands. They have muscular bodies and are capable of consuming large prey. Boas give birth to live young, as opposed to laying eggs like many other snake species. The boa constrictor is a well-known representative of this group.

5. Colubrids:

Colubrids make up the largest family of snakes, with numerous species distributed worldwide. They exhibit great diversity in terms of size, coloration, and behavior. Some colubrids, such as the corn snake and the garter snake, are popular as pets due to their relatively docile nature and attractive patterns. Not all colubrids are harmless, though, as some species, like the boomslang and the mangrove snake, are venomous.

6. Sea Snakes:

Sea snakes are a unique group of venomous snakes adapted to marine environments. They are found predominantly in the waters of the Indian and Pacific Oceans. Sea snakes possess a flattened tail and a paddle-shaped tail, which allow them to swim efficiently. They can stay underwater for extended periods and feed on fish and other marine creatures.

These are just a few examples of the diverse types of snakes found around the world. Each group has its own set of characteristics, adaptations, and ecological roles. Whether venomous or non-venomous, snakes are fascinating creatures that have captured human curiosity for centuries. They play vital roles in their respective ecosystems and contribute to the overall biodiversity of our planet.


Related Articles:

Snakes in World
Snakes in Sea
Snakes in Mountain

Indigo Snake

The Indigo Snake (Drymarchon couperi), also known as the Eastern Indigo Snake, is a non-venomous, large and powerful snake species that can be found in the southeastern United States. It is the longest snake native to North America, reaching up to 8 feet in length, and is an important predator in its ecosystem. In this essay, we will discuss the physical characteristics, habitat, diet, behavior, and conservation status of the Indigo Snake.

Eastern Indigo Snake

Physical Characteristics

The Indigo Snake is a shiny blue-black snake with a reddish-orange chin and throat. The scales on its back are smooth, and it has a slender and elongated body with a large, broad head. The average length of the snake is around 6 to 7 feet, but some individuals can grow up to 8 feet in length. The male is generally larger than the female, and the average weight of the snake is around 5 to 10 pounds.

Habitat

The Indigo Snake can be found in a wide range of habitats, including pine forests, hardwood hammocks, grasslands, and wetlands. It prefers open areas with low vegetation and is often found near water sources such as streams and ponds. The snake's range extends from southern Georgia through Florida and into southern Alabama and Mississippi.

Diet

The Indigo Snake is a carnivore and feeds primarily on small mammals, such as rodents, rabbits, and other snakes, including venomous species such as the Copperhead and Diamondback Rattlesnake. The snake is also known to eat birds, frogs, lizards, and turtles. The Indigo Snake is an active hunter and uses its keen sense of smell to locate prey.

Behavior

The Indigo Snake is a solitary creature and is active during the day. It is a strong and fast-moving snake that can move quickly over open terrain. The snake is also an excellent climber and swimmer. The Indigo Snake is known for its docile temperament, and despite its size and strength, it is rarely aggressive towards humans. However, when threatened, the snake will puff up its body, hiss, and vibrate its tail, and may strike if provoked.

Conservation Status

The Indigo Snake is listed as a threatened species under the Endangered Species Act due to habitat loss and fragmentation, degradation of its habitat, and over-collection for the pet trade. The loss of habitat due to urbanization and agriculture has significantly impacted the snake's population. Additionally, the snake is vulnerable to road mortality, as it is often hit by vehicles while crossing roads. Several conservation programs have been implemented to protect the Indigo Snake, including habitat restoration, captive breeding programs, and public education campaigns to raise awareness about the importance of conserving this species.

In conclusion, the Indigo Snake is a remarkable species that plays an important role in its ecosystem. Its unique physical characteristics, habitat, diet, behavior, and conservation status make it a fascinating subject for research and study. It is essential that we continue to work towards protecting and conserving this species to ensure its survival for future generations.
This post is written with the help of ChatGPT.

Literacy rate in India after Independence

India is acountry ot billion of people, majority of population are young between the age of 16-27. Here we have data from Ministry of Home Affairrs. The date is slipitted into states and overall in total. 



PS: The cencus for year 2021 is delay for one year and then delay delay and delay...now it is propsed to start on October 2023. 

Reference 

https://rbidocs.rbi.org.in/rdocs/Publications/PDFs/6TABLE4134B659E3B243EE9CB292D36ABC281B.PDF

Karnataka assembly election result 2023 | List of winners

 List of candidates who won the assembly election 2023 in Karnataka state.

ConstituencyWinning CandidateWinning Party
NippaniJolle Shashikala AnnasahebBJP
Chikkodi-SadalgaGanesh Prakash HukkeriCongress
AthaniLaxman Sangappa SavadiCongress
KagwadBharamgouda Alagouda KageCongress
Kudachi (SC)Mahendra Kallappa TammannavarCongress
Raibag (SC)Aihole Duryodhan MahalingappaBJP
HukkeriKatti Nikhil UmeshBJP
ArabhaviBalachandra Laxmanrao JarkiholiBJP
GokakJarkiholi Ramesh LaxmanraoBJP
Yemkanmardi (ST)Satish Laxmanrao JarkiholiCongress
Belgaum UttarAsif (Raju) SaitCongress1
Belgaum DakshinAbhay PatilBJP
Belgaum RuralLaxmi R. HebbalkarCongress
KhanapurVithal Somanna HalagekarBJP
KitturBabasaheb PatilCongress
BailhongalKoujalagi Mahantesh ShivanandCongress
Saundatti YellammaVishwas Vasant VaidyaCongress
RamdurgAshok Mahadevappa PattanCongress
Mudhol (SC)Ramappa TimmapurCongress
TerdalSiddu SavadiBJP
JamkhandiJagadeesh Shivayya GudaguntiBJP
BilgiJT PatilCongress
BadamiBB ChimmanakattiCongress
BagalkotMeti Hullappa YamanappaCongress
HungundKashappanavara Vijayanand ShivashankrappaCongress
MuddebihalAppaji Aliyas Channabasavaraj S/O Shankarao NadagoudaCongress
Devar HippargiBhimanagouda (Rajugouda) Basanagouda PatilJanata Dal (Secular)
Basavana BagevadiShivanand PatilCongress
BabaleshwarMB PatilCongress
Bijapur CityBasangouda Patil (Yatnal)BJP
Nagathan (SC)Katakdhonda Vitthal DhondibaCongress
IndiYashvantraygoud. Vittalagoud. PatilCongress
SindagiAshok Mallappa ManaguliCongress
AfzalpurMY PatilCongress
JevargiAjay SinghCongress
Shorapur (ST)Raja Venkatappa NaikCongress
ShahapurSharanabasappa Gouda DarshanapurCongress
YadgirChannareddy Patil TunnurCongress
GurmitkalSharana Gowda KandakurJanata Dal (Secular)
Chittapur (SC)Priyank KhargeCongress
SedamSharanprakash Rudrappa PatilCongress
Chincholi (SC)Avinash Umesh JadhavBJP
Gulbarga Rural (SC)Basawaraj MattimuduBJP
Gulbarga DakshinAllamprabhu PatilCongress
Gulbarga UttarKaneez FatimaCongress2
AlandBhojarajCongress
BasavakalyanSharanu SalagarBJP
HumnabadSiddu PatilBJP
Bidar SouthDr Shailendra BeldaleBJP
BidarRahim KhanCongress3
BhalkiEshwar KhandreCongress
Aurad (SC)Prabhu B ChavanBJP
Raichur Rural (ST)Basanagouda DaddalCongress
RaichurDr Shivaraj PatilBJP
Manvi (ST)G Hampayya NayakCongress
Devadurga (ST)KaremmaJanata Dal (Secular)
Lingsugur (SC)Manappa D VajjalBJP
SindhanurHampanagouda BadarliCongress
Maski (ST)Basanagouda TurvihalCongress
KushtagiDoddanagouda Hanamagouda PatilBJP
Kanakagiri (SC)Tangadagi Shivaraj SangappaCongress
GangawatiG Janardhan ReddyKalyana Rajya Pragathi Paksha
YelburgaBasavaraj RayareddyCongress
KoppalK Raghavendra HitnalCongress
Shirahatti (SC)Dr Chandru LamaniBJP
GadagHK PatilCongress
RonGurupadagouda Sanganagouda PatilCongress
NargundC. C. PatilBJP
NavalgundNingaraddi Hanamaraddi KonaraddiCongress
KundgolMR PatilBJP
DharwadVinay KulkarniCongress
Hubli-Dharwad East (SC)Abbayya PrasadCongress
Hubli-Dharwad CentralMahesh TenginakaiBJP
Hubli-Dharwad WestArvind BelladBJP
KalghatgiSantosh S LadCongress
HaliyalDeshpande RaghunathCongress
KarwarSatish Krishna SailCongress
KumtaDinakar Keshav ShettyBJP
BhatkalMankal VaidyaCongress
SirsiBhimanna T NaikCongress
YellapurArbail Shivaram HebbarBJP
HangalMane SrinivasCongress
ShiggaonBasavaraj BommaiBJP
Haveri (SC)Rudrappa Manappa LamaniCongress
ByadgiBasavaraj Neelappa ShivannanavarCongress
HirekerurUjaneshwar Basavannappa BanakarCongress
RanebennurPrakash KoliwadCongress
Hadagalli (SC)Krishna NayakaBJP
Hagaribommanahalli (SC)Nemarajanaik KJanata Dal (Secular)
VijayanagaraHR GaviyappaCongress
Kampli (ST)JN GaneshCongress
Siruguppa (ST)BM NagarajaCongress
Bellary Rural (ST)B NagendraCongress
Bellary CityNara Bharath ReddyCongress
Sandur (ST)E TukaramCongress
Kudligi (ST)Srinivas NTCongress
Molakalmuru (ST)NY GopalakrishnaCongress
Challakere (ST)T RaghumurthyCongress
ChitradurgaKC Veerendra PuppyCongress
HiriyurSudhakarCongress
HosadurgaBG GovindappaCongress
Holalkere (SC)M ChandrappaBJP
Jagalur (ST)B DevendrappaCongress
HarapanahalliLatha MallikarjunIndependent
HariharBP HarishBJP
Davanagere NorthSS MallikarjunCongress
Davanagere SouthShamanur ShivashankarappaCongress
Mayakonda (SC)K S BasavanthappaCongress
ChannagiriBasavaraju V ShivagangaCongress
HonnaliShanthana Gowda DGCongress
Shimoga Rural (SC)Sharada PuryanaikJanata Dal (Secular)
BhadravatiBK SanagameshwaraCongress
ShimogaChannabasappa (Chenni)BJP
TirthahalliAraga JnanendraBJP
ShikaripuraVijayendra YediyurappaBJP
SorabMadhu BangarappaCongress
SagarGopala Krishna BeluruCongress
ByndoorGururaj Shetty GantiholeBJP
KundapuraA Kiran Kumar KodgiBJP
UdupiYashpal Anand SuvarnaBJP
KapuGurme Suresh ShettyBJP
KarkalaV Sunil KumarBJP
SringeriT D RajegowdaCongress
Mudigere (SC)Nayana MotammaCongress
ChikmagalurHD ThammaiahCongress
TarikereG H SrinivasaCongress
KadurAnand KSCongress
ChikknayakanhalliCB Suresh BaabuJanata Dal (Secular)
TipturK ShadakshariCongress
TuruvekereMT KrishnappaJanata Dal (Secular)
KunigalDr HD RanganathCongress
Tumkur CityGB Jyothi GaneshBJP
Tumkur RuralB Suresh GowdaBJP
Koratagere (SC)Dr G ParameshwaraCongress
GubbiSR Srinivas (Vasu)Congress
SiraT B JayachandraCongress
Pavagada (SC)HV VenkateshCongress
MadhugiriKyathasandra N RajannaCongress
GauribidanurKH Puttaswamy Gowda (KHP)Independent
BagepalliSN Subbareddy (Chinnakayalapalli)Congress
ChikkaballapurPradeep EshwarCongress
SidlaghattaBN Ravi KumarJanata Dal (Secular)
ChintamaniDr MC SudhakarCongress
SrinivaspurG K VenkatashivareddyJanata Dal (Secular)
Mulbagal (SC)Samruddhi V ManjunathJanata Dal (Secular)
Kolar Gold Field (SC)Roopa Kala MCongress
Bangarapet (SC)SN Narayanaswamy KMCongress
KolarKothur G ManjunathaCongress
MalurK. Y. NanjegowdaCongress
YelahankaSR VishwanathBJP
KrishnarajapuramBA BasavarajaBJP
ByatarayanapuraKrishna ByregowdaCongress
YeshvanthapuraST SomashekarBJP
RajarajeshwarinagarMunirathnaBJP
DasarahalliS MunirajuBJP
Mahalakshmi LayoutK GopalaiahBJP
MalleshwaramDr Ashwathnarayan CNBJP
HebbalSuresha BSCongress
Pulakeshinagar (SC)AC SrinivasaCongress
SarvagnanagarKelachandra Joseph GeorgeCongress
C. V. Raman Nagar (SC)S RaghuBJP
ShivajinagarRizwan ArshadCongress4
Shanti NagarNA HarisCongress5
Gandhi NagarDinesh Gundu RaoCongress
Rajaji NagarS Suresh KumarBJP
Govindraj NagarPriyakrishnaCongress
Vijay NagarM KrishnappaCongress
ChamrajpetBZ Zameer Ahmed KhanCongress6
ChickpetUday B GarudacharBJP
BasavanagudiRavi Subramanya LABJP
PadmanabhanagarR AshokaBJP
B.T.M. LayoutRamalinga ReddyCongress
JayanagarSowmya ReddyCongress
Mahadevapura (SC)Manjula SBJP
BommanahalliSathish Reddy MBJP
Bangalore SouthM KrishnappaBJP
Anekal (SC)B ShivannaCongress
HoskoteSharath Kumar BachegowdaCongress
Devanahalli (SC)KH MuniyappaCongress
DoddaballapurDheeraj MunirajBJP
Nelamangala (SC)Shreenivasaiah NCongress
MagadiHC BalakrishnaCongress
RamanagaramHA Iqbal HussainCongress7
KanakapuraDK ShivakumarCongress
ChannapatnaHD KumaraswamyJanata Dal (Secular)
Malavalli (SC)PM NarendraswamyCongress
MaddurUdaya K MCongress
MelukoteDarshan PuttannaiahSarvodaya Karnataka Paksha
MandyaRavikumar Gowda (Ganiga)Congress
SrirangapatnaA.B. Ramesha BandisiddegowdaCongress
NagamangalaN Chaluvaraya SwamyCongress
KrishnarajapetHT ManjuJanata Dal (Secular)
ShravanabelagolaCN BalakrishnaJanata Dal (Secular)
ArsikereKM Shivalinge GowdaCongress
BelurHK Suresh (Hullalli Suresh)BJP
HassanSwaroop PrakashJanata Dal (Secular)
HolenarasipurHD RevannaJanata Dal (Secular)
ArkalgudA. ManjuJanata Dal (Secular)
Sakleshpur (SC)Cement ManjuBJP
BelthangadyHarish PoonjaBJP
MoodabidriUmanatha KotianBJP
Mangalore City NorthBharath Shetty YBJP
Mangalore City SouthD Vedavyasa KamathBJP
MangaloreUT Khader FareedCongress8
BantvalRajesh Naik UBJP
PutturAshok Kumar RaiCongress
Sullia (SC)Bhagirathi MurulyaBJP
MadikeriDr Mantar GowdaCongress
VirajpetAS PonnannaCongress
PeriyapatnaK VenkateshCongress
KrishnarajanagaraRavishankar DCongress
HunsurGD Harish Gowda
Heggadadevankote (ST)Anil ChikkamadhuCongress
Nanjangud (SC)Darshan DhruvanarayanaCongress
ChamundeshwariGT DevegowdaJanata Dal (Secular)
KrishnarajaT S SrivathsaBJP
ChamarajaK Harish GowdaCongress
NarasimharajaTanveer SaitCongress9
VarunaSiddaramaiahCongress
T Narasipur (SC)Dr HC MahadevappaCongress
HanurMR ManjunathJanata Dal (Secular)
Kollegal (SC)A.R.KrishnamurthyCongress
ChamarajanagarC PuttarangashettyCongress
GundlupetHM Ganesh PrasadCongress

JavaScript closest() method

JavaScript closest() method of the Element interface traverses the element until it finds a node that matches the specified CSS selector. 
Syntax of JavaScript closest method syntax is element.closest(css selector).

HTML code snippet


<article>
  <div id="article">
    This is article 
    <div id="title">
      Here is article title
      <div id="description">Here is article description</div>
    </div>
  </div>
</article>

JavaScript closest example

const desElement = document.getElementById("description");

// the closest ancestor with the id of "title"
console.log(desElement.closest("#title")); //this will return <div id="title">

// the closest ancestor which is a div in a div
console.log(desElement.closest("div div")); //this will return <div id="description">

// the closest ancestor which is a div and has a parent article
console.log(desElement.closest("article > div")); //this will return <div id="article">

// the closest ancestor which is not a div
console.log(desElement.closest(":not(div)")); //this will return <article>


Reference

-- https://developer.mozilla.org/en-US/docs/Web/API/Element/closest

Decimal number check using JavaScript

While working with numbers specially decimal number or price or balance. A developer may face an issue where number is not coming in decimal format, and just appearing in round figure or only with one digit after decimal. like 12.2, 20, and 5.5

In this situation how to handle this on frond-end and show balance or price always in two decimal digits. Below is the code sample. 


if (cardBalanceData) {
	console.log('card balance '+cardBalanceData.balance);
	var gcBalance = cardBalanceData.balance;
	gcBalance = (gcBalance.toString().indexOf('.') >= 0) ? gcBalance : gcBalance+'.00';
	console.log("card balance in 2 decimal value:: "+ gcBalance);
}

Here in above JavaScript code, line #4 checking the gcBalance has decimal (.) into this, in case gcBalance doesn't have decimal value then append .00 into gcBalance otherwise print gcBalance as it is. 

First Human on the Earth and Adam | ChatGPT

We asked ChatGPT "who was the first human on the earth?" And this is what we have receive as answer.

The concept of a "first human" is a complex one, as the evolution of humans from earlier hominids is a gradual and ongoing process that occurred over millions of years. 

The earliest known members of the Homo genus (of which modern humans are a part) are believed to have emerged in Africa around 2.5-3 million years ago. However, these early humans were very different from modern humans, both physically and in terms of their behavior and cognitive abilities.

The species Homo sapiens (modern humans) is believed to have emerged in Africa around 300,000 years ago, and gradually spread throughout the world over the following tens of thousands of years. However, it's important to note that even among early Homo sapiens, there was likely significant genetic diversity and variation in appearance, behavior, and culture.

Therefore, it's not possible to point to a single "first human" who emerged at a specific time and place. Rather, human evolution is an ongoing process that has produced a wide range of human forms and cultures over time.

who was the first human on the earth?
Who was the first human on the earth?



Then, we asked follow-up question "doesnt Adam was the first man?" and got this response;

The idea of Adam as the first man comes from religious traditions, specifically from the Abrahamic religions of Judaism, Christianity, and Islam. According to these traditions, Adam was created directly by God and was the first human being on Earth.

However, from a scientific perspective, the concept of Adam as the first man is not supported by the evidence. Human evolution is an ongoing process that occurred over millions of years, and there was no single individual who can be identified as the "first man" in a scientific sense. Instead, the evolution of humans involved the gradual development and diversification of populations over time. Therefore, while the concept of Adam as the first man is meaningful in religious contexts, it is not a scientifically supported idea.

doesnt Adam was the first man?
Doesnt Adam was the first man?