<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sumit Joshi</title>
    <description>The latest articles on DEV Community by Sumit Joshi (@sumit489).</description>
    <link>https://dev.to/sumit489</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F451495%2Fec7b3b5d-5fbf-402c-9138-fa3e6305b6aa.jpeg</url>
      <title>DEV Community: Sumit Joshi</title>
      <link>https://dev.to/sumit489</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sumit489"/>
    <language>en</language>
    <item>
      <title>Notifications issue in Firefox</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Mon, 11 Apr 2022 17:36:15 +0000</pubDate>
      <link>https://dev.to/sumit489/notifications-issue-in-firefox-45nf</link>
      <guid>https://dev.to/sumit489/notifications-issue-in-firefox-45nf</guid>
      <description>&lt;p&gt;I was working on web notification module where I have to send notifications to web application users. In google chrome and edge push notifications works smoothly but when it comes to mozilla firefox its not the case. I was not able to receive any notification when I have signed in with firefox browser. After searching about this issue on the internet I found that its the thing with windows 10 action center.&lt;/p&gt;

&lt;p&gt;All web browsers have their own built in notification functionality. When windows 10 was launched it came with new action center. Some browsers have started using this action center. In google chrome its default setting.&lt;/p&gt;

&lt;p&gt;In the case of firefox user need to enable it manually by changing configuration.&lt;/p&gt;

&lt;p&gt;Here are steps to enable web notifications in firefox browser.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Step 1 *&lt;/em&gt;:- Open mozilla firefox and go to &lt;a href="https://dev.tourl"&gt;about:config&lt;/a&gt; &lt;br&gt;
, it will shows warning message, accept the risk and continue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; :- now type alerts in the textbox and it will shows a preference &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;alerts.useSystemBackend&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;mark this preference true - if you want to receive web notification in the firefox browser.&lt;br&gt;
mark this preference false - if you don't want to receive web notification in the firefox browser.&lt;/p&gt;

</description>
      <category>firefox</category>
    </item>
    <item>
      <title>Notifications issue in Firefox</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Mon, 11 Apr 2022 17:26:14 +0000</pubDate>
      <link>https://dev.to/sumit489/notifications-issue-in-firefox-210l</link>
      <guid>https://dev.to/sumit489/notifications-issue-in-firefox-210l</guid>
      <description>&lt;p&gt;I was working on web notification module where I have to send notifications to web application users. In google chrome and edge push notifications works smoothly but when it comes to mozilla firefox its not the case. I was not able to receive any notification when I have signed in with firefox browser. After searching about this issue on the internet I found that its the thing with windows 10 action center.&lt;/p&gt;

&lt;p&gt;All web browsers have their own built in notification functionality. When windows 10 was launched it came with new action center. Some browsers have started using this action center. In google chrome it's default setting.&lt;/p&gt;

&lt;p&gt;In the case of firefox user need to enable it manually by changing configuration.&lt;/p&gt;

&lt;p&gt;Here are steps to enable web notifications in firefox browser.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Step 1 *&lt;/em&gt;:- Open mozilla firefox and go to &lt;a href="https://dev.tourl"&gt;about:config&lt;/a&gt; &lt;br&gt;
, it will shows warning message, accept the risk and continue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; :- now type alerts in the textbox and it will shows a preference &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;alerts.useSystemBackend&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;mark this preference true - if you want to receive web notification in the firefox browser.&lt;br&gt;
mark this preference false - if you don't want to receive web notification in the firefox browser.&lt;/p&gt;

</description>
      <category>firefox</category>
    </item>
    <item>
      <title>Passing array of json to Postgresql Function / Procedure and access it</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Wed, 06 Apr 2022 13:54:59 +0000</pubDate>
      <link>https://dev.to/sumit489/passing-array-of-json-to-postgresql-function-procedure-and-accessing-it-24ac</link>
      <guid>https://dev.to/sumit489/passing-array-of-json-to-postgresql-function-procedure-and-accessing-it-24ac</guid>
      <description>&lt;p&gt;As a backend developer I prefer to develop database functions or procedures rather than using any ORMs(performance issues).&lt;/p&gt;

&lt;p&gt;So sometimes I have requirements to insert more than one row at a time to table and getting array of object in API's request body.Generally people prefers to loop over array and makes repetitive Insert call to database. &lt;/p&gt;

&lt;p&gt;In this article, I will show the way to Insert multiple entries into database from json array and without making Database calls for every array objects. I am using Postgresql Database language to solve this scenario &lt;/p&gt;

&lt;p&gt;First of all we will create one Postgresql Procedure or Postgresql Function Which takes array of objects as argument and process it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oc_99BBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9jmkvn3guc6khztfz3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oc_99BBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9jmkvn3guc6khztfz3b.png" alt="Procedure " width="880" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we are expecting argument of type json in this function.&lt;br&gt;
In the declare section of the postgresql function we have assigned this argument to over function's declared variable and have declared two others variable. "json_object" to hold one json object and "user_name" to hold key of json object.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON_ARRAY_ELEMENT&lt;/strong&gt; :- is a postgresql function to process json, this function expands the top-level of JSON array into a set of JSON values.&lt;/p&gt;

&lt;p&gt;So in our case JSON_ARRAY_ELEMENT will return JSON objects and We are looping through this JSON array and storing this json object into "json_object" variable.&lt;/p&gt;

&lt;p&gt;While iterating through array we are getting each JSON object in "json_object" variable. after that we are extracting over required or useful key from the json object and inserting it into our database table. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;user_name := json_object -&amp;gt;&amp;gt; 'user_name';&lt;/strong&gt;&lt;br&gt;
this code will extract "user_name" key from our json object.&lt;/p&gt;

&lt;p&gt;To Test this function in your postgresql environment.&lt;br&gt;
Create one table.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dduqwSWS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixxpi3vggy2kme3af2rx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dduqwSWS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixxpi3vggy2kme3af2rx.png" alt="Table Creation" width="494" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then execute above function to your postgresql environment &lt;br&gt;
And call the procedure with below mentioned call.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t7HDOJt2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imc1if4h0iarmbr9mr1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t7HDOJt2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imc1if4h0iarmbr9mr1p.png" alt="procedure execution" width="880" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you find this informative and in case have any doubts or queries, Feel Free to reach on below mentioned Details:&lt;br&gt;
EmailId: &lt;a href="mailto:ssquare489@gmail.com"&gt;ssquare489@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>database</category>
      <category>backend</category>
    </item>
    <item>
      <title>Flag Emoji rendering issue on google chrome | React JS</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Mon, 04 Apr 2022 17:56:34 +0000</pubDate>
      <link>https://dev.to/sumit489/flag-emoji-rendering-issue-on-google-chrome-react-js-270l</link>
      <guid>https://dev.to/sumit489/flag-emoji-rendering-issue-on-google-chrome-react-js-270l</guid>
      <description>&lt;p&gt;I was developing common react component for selecting country code for phone number input. In the testing I have observed that Flag emojis are getting rendered on Firefox browser but in google chrome it wasn't the same case. In google chrome its not able to render flag emoji based on the string.&lt;/p&gt;

&lt;p&gt;In Google Chrome It was getting rendered like following image.&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XFaKFAyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44705um3ugig6agkzr58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XFaKFAyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44705um3ugig6agkzr58.png" alt="Rendering on google" width="213" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And In Firefox It was getting rendered like following image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R5xczsms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npgs5q08wqt4t66ayy5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R5xczsms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npgs5q08wqt4t66ayy5a.png" alt="rendering on fire" width="214" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After going through some stack overflow and other articles get to know that it depends on the OS and sometimes the browser. In Apple platforms it renders the flag and in the windows platforms it shows two-letter country codes.&lt;/p&gt;

&lt;p&gt;Can refer this stack overflow question's answer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/54519758/flag-emojis-not-rendering"&gt;https://stackoverflow.com/questions/54519758/flag-emojis-not-rendering&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So came up with 2 solutions to  overcome this issue in my React JS Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Solution (this solution is also available in stackoverflow question's link I have shared above).
&lt;/h2&gt;

&lt;p&gt;Need to find All two letters country code and replace it with image from FlagCDN.&lt;/p&gt;

&lt;p&gt;Snippet to convert two-letter country code to png image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f4ktzx8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1vnulkmes1iro0kwall.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f4ktzx8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1vnulkmes1iro0kwall.png" alt="Image description" width="880" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;snippet to replace all occurence of two-letter country code to png&lt;br&gt;
"var reg = new RegExp('(?:\ud83c[\udde6-\uddff]){2}', 'g');&lt;br&gt;
    document.body.innerHTML = document.body.innerHTML.replaceAll(reg, flagemojiToPNG);"&lt;/p&gt;

&lt;h2&gt;
  
  
  Second Solution
&lt;/h2&gt;

&lt;p&gt;For this I have used React-select library to create dropdown.&lt;br&gt;
First Of all have created Data source for the select dropdown.&lt;/p&gt;

&lt;p&gt;"{&lt;br&gt;
      label: &lt;code&gt;${item.attributes.name} (${&lt;br&gt;
        item.id&lt;br&gt;
      }) +${item.attributes.country_code}&lt;/code&gt;,&lt;br&gt;
      value: &lt;code&gt;${item.attributes.country_code}&lt;/code&gt;,&lt;br&gt;
      emojiFlag: item.attributes.emoji_flag&lt;br&gt;
    };"&lt;br&gt;
Structure of my array's object was like above.&lt;br&gt;
Label:  To showcase Label with country name, country code(numeric).&lt;br&gt;
Value: this is supposed to be the value of dropdown&lt;br&gt;
emojiFlag: two-letter country code.&lt;/p&gt;

&lt;p&gt;Utilised above created function to convert two-letter country code to flag image.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tQodnOei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2rbkenjl5hibomlvsgz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tQodnOei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2rbkenjl5hibomlvsgz.png" alt="Image description" width="880" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To render country code select Dropdown:&lt;/p&gt;

&lt;p&gt;
          style={this.props.style}&lt;br&gt;
          options={this.state.dataSource}&lt;br&gt;
          formatOptionLabel={data =&amp;gt; (&lt;br&gt;
            &amp;lt;&amp;gt;{this.flagemojiToPNG(data.emojiFlag)}  {data.label} &lt;br&gt;
            &amp;lt;/&amp;gt;&lt;br&gt;
          )}&lt;br&gt;
          placeholder={this.state.placeHolder}&lt;br&gt;
          onChange={}&lt;br&gt;
          value={}&lt;br&gt;
          isDisabled={}&lt;br&gt;
        /&amp;gt;&lt;br&gt;
I have used formatOptionLabel property to render image flg.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Install ElasticSearch,Logstash and kibana on Local System(windows) Part -02</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Sat, 17 Oct 2020 12:24:08 +0000</pubDate>
      <link>https://dev.to/sumit489/install-elasticsearch-logstash-and-kibana-on-local-system-windows-part-02-gn6</link>
      <guid>https://dev.to/sumit489/install-elasticsearch-logstash-and-kibana-on-local-system-windows-part-02-gn6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Steps For Windows 10&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;.&lt;a href="https://www.elastic.co/downloads/elasticsearch"&gt;Download ElasticSearch&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.elastic.co/downloads/logstash"&gt;Download Logstash&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.elastic.co/downloads/kibana"&gt;Download Kibana&lt;/a&gt; :- Download zip files from this link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;.To start elastic search service&lt;br&gt;
-Extract downloaded zip and open bin directory in command prompt(As Admin)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type command "elasticsearch.bat"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3&lt;/strong&gt;. To start kibana service&lt;br&gt;
-Extract downloaded zip and open bin directory in command prompt(As Admin)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type command "kibana.bat"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4&lt;/strong&gt;. To start Logstash service&lt;br&gt;
-Extract downloaded zip and open bin directory in command prompt(As Admin)&lt;br&gt;
-create configuration file "logstash.conf" in configuration file you need to confgiure INPUT(from where you want to fetch data),OUTPUT(where you want to send data) in our example output will be elastic search (for example output{ elasticsearch { hosts =&amp;gt;["localhost:9200"] index =&amp;gt; "indexForLogstash }} ,hosts in which port your elasticsearch service is running.&lt;br&gt;
-Type command "logstash -f logstash.conf".&lt;/p&gt;

&lt;p&gt;You can visualise your data in kibana using index which is in logstash configuration.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Rotate Linked List with javascript (LEET CODE)</title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Mon, 05 Oct 2020 16:35:13 +0000</pubDate>
      <link>https://dev.to/sumit489/rotate-linked-list-with-javascript-leet-code-2d7</link>
      <guid>https://dev.to/sumit489/rotate-linked-list-with-javascript-leet-code-2d7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;:-&lt;br&gt;
Given a linked list, rotate the list to the right by k places, where k is non-negative.&lt;/p&gt;

&lt;p&gt;Example 1:&lt;/p&gt;

&lt;p&gt;Input: 1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5-&amp;gt;NULL, k = 2&lt;br&gt;
Output: 4-&amp;gt;5-&amp;gt;1-&amp;gt;2-&amp;gt;3-&amp;gt;NULL&lt;br&gt;
Explanation:&lt;br&gt;
rotate 1 steps to the right: 5-&amp;gt;1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;NULL&lt;br&gt;
rotate 2 steps to the right: 4-&amp;gt;5-&amp;gt;1-&amp;gt;2-&amp;gt;3-&amp;gt;NULL&lt;br&gt;
Example 2:&lt;/p&gt;

&lt;p&gt;Input: 0-&amp;gt;1-&amp;gt;2-&amp;gt;NULL, k = 4&lt;br&gt;
Output: 2-&amp;gt;0-&amp;gt;1-&amp;gt;NULL&lt;br&gt;
Explanation:&lt;br&gt;
rotate 1 steps to the right: 2-&amp;gt;0-&amp;gt;1-&amp;gt;NULL&lt;br&gt;
rotate 2 steps to the right: 1-&amp;gt;2-&amp;gt;0-&amp;gt;NULL&lt;br&gt;
rotate 3 steps to the right: 0-&amp;gt;1-&amp;gt;2-&amp;gt;NULL&lt;br&gt;
rotate 4 steps to the right: 2-&amp;gt;0-&amp;gt;1-&amp;gt;NULL&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Algorithm&lt;/strong&gt;:-&lt;br&gt;
Step 1 :- First we will find the length of linked list by traversing through it.&lt;br&gt;
step 2:- after traversing through linked list we are at tail node&lt;br&gt;
step 3:- connect tail node to head node &lt;br&gt;
step 4 :- comparing the length of linked list with passed rotation value(k) &lt;br&gt;
step 5:- after comaring it with k we will get new length to get new rotated linked list &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SOLUTION&lt;/strong&gt;:-&lt;/p&gt;

&lt;p&gt;var rotateRight = function(head, k) {&lt;br&gt;
    if(head == null || k == 0){&lt;br&gt;
        return head&lt;br&gt;
    }&lt;br&gt;
    let i = 1&lt;br&gt;
    let tail =head&lt;br&gt;
    while(tail.next != null){&lt;br&gt;
        i++&lt;br&gt;
        tail =tail.next&lt;br&gt;
    }                   //i = 5(length of list)&lt;br&gt;
    if(k == i){&lt;br&gt;
        return head&lt;br&gt;
    }&lt;br&gt;
    while(k &amp;gt; i){&lt;br&gt;
        k = k - i &lt;br&gt;
    }&lt;br&gt;
    let j = i-k // j = 5-2&lt;br&gt;
    tail.next =head;&lt;br&gt;
    let newTail = tail;&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while(j-- &amp;gt; 0){
    newTail = newTail.next
}
let newHead = newTail.next
newTail.next = null;
return newHead
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;}; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Basics of ELK Stack(Elasticsearch-Logstash-kibana) Part -01 </title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Wed, 30 Sep 2020 17:21:17 +0000</pubDate>
      <link>https://dev.to/sumit489/elk-elasticsearch-logstash-kibana-part-01-44of</link>
      <guid>https://dev.to/sumit489/elk-elasticsearch-logstash-kibana-part-01-44of</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is ELK Stack?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-Collection of three open source products&lt;br&gt;
 1.ElasticSearch - used for storing logs&lt;br&gt;
 2.Logstash - used for shipping as well as processing and storing &lt;br&gt;
              logs&lt;br&gt;
 3.Kibana - visualization tool&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Motive behind ELk&lt;/strong&gt;&lt;br&gt;
-Designed to take data from any source, in any format and to search ,analyze, and visualize that data in real-time.&lt;br&gt;
-Provide centralized logging that be useful when attempting to identify problems with servers or applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Architecture For ELK Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Log File -&amp;gt; Logstash(Data Processing) -&amp;gt; ElasticSearch(Storage) -&amp;gt; Kibana(Visualize)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logs&lt;/strong&gt; - Server Logs that need to be analyzed.&lt;br&gt;
&lt;strong&gt;Logstash&lt;/strong&gt; - Collect logs and events data and parses and &lt;br&gt;
               transfers data to ElasticSearch.&lt;br&gt;
&lt;strong&gt;Elasticsearch&lt;/strong&gt; - The transformed data from logstash is &lt;br&gt;
                   store,search and indexed.&lt;br&gt;
&lt;strong&gt;Kibana&lt;/strong&gt; - Kibana Uses ElasticSearch DB to Explore ,Visualize &lt;br&gt;
            and Share.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mountain Array with Java Script </title>
      <dc:creator>Sumit Joshi</dc:creator>
      <pubDate>Wed, 12 Aug 2020 16:53:13 +0000</pubDate>
      <link>https://dev.to/sumit489/mountain-array-with-java-script-1n6b</link>
      <guid>https://dev.to/sumit489/mountain-array-with-java-script-1n6b</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Mountain Array?&lt;/strong&gt;&lt;br&gt;
Given an array A of integers, return true if and only if it is a valid mountain array.&lt;/p&gt;

&lt;p&gt;Recall that A is a mountain array if and only if:&lt;/p&gt;

&lt;p&gt;A.length &amp;gt;= 3&lt;br&gt;
There exists some i with 0 &amp;lt; i &amp;lt; A.length - 1 such that:&lt;br&gt;
A[0] &amp;lt; A[1] &amp;lt; ... A[i-1] &amp;lt; A[i]&lt;br&gt;
A[i] &amp;gt; A[i+1] &amp;gt; ... &amp;gt; A[A.length - 1]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples Of Mountain Arrays.&lt;/strong&gt;&lt;br&gt;
Example 1:&lt;/p&gt;

&lt;p&gt;Input: [2,1]&lt;br&gt;
Output: false&lt;br&gt;
Example 2:&lt;/p&gt;

&lt;p&gt;Input: [3,5,5]&lt;br&gt;
Output: false&lt;br&gt;
Example 3:&lt;/p&gt;

&lt;p&gt;Input: [0,3,2,1]&lt;br&gt;
Output: true&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's very easy to keep track of a monotonically increasing or decreasing ordering of elements. You just need to be able to determine the start of the valley in the mountain and from that point onwards, it should be a valley i.e. no mini-hills after that. Use this information in regards to the values in the array and you will be able to come up with a straightforward solution.&lt;/p&gt;

&lt;p&gt;so as per above explanation,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;if(A.length &amp;gt; 3){&lt;br&gt;
    let n = A.length;&lt;br&gt;
    let i = 0;&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while(i+1 &amp;lt; n &amp;amp;&amp;amp; A[i] &amp;lt; A[i+1]){
    i++;
}

if(i==0 || i == n-1){
    return false
}

while(i+1 &amp;lt; n &amp;amp;&amp;amp; A[i] &amp;gt; A[i+1] ){
    i++;
}
return i == n-1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;br&gt;
else{&lt;br&gt;
    return false&lt;br&gt;
}&lt;br&gt;
*&lt;br&gt;
-&amp;gt; here A is Array.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
