<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Home on Arpit J | Notes</title>
    <link>https://arpitjn.com/</link>
    <description>Recent content in Home on Arpit J | Notes</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 03 Oct 2025 02:06:53 +0530</lastBuildDate>
    <atom:link href="https://arpitjn.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Questions that will probably come back</title>
      <link>https://arpitjn.com/notes/first-questions/</link>
      <pubDate>Fri, 03 Oct 2025 02:06:53 +0530</pubDate>
      <guid>https://arpitjn.com/notes/first-questions/</guid>
      <description>&lt;h3 class=&#34;heading&#34; id=&#34;1-get-distinct-employee-names-in-a-company-using-java-8-streams-api&#34;&gt;&#xA;  1. Get distinct employee names in a company using Java 8 Streams API&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#1-get-distinct-employee-names-in-a-company-using-java-8-streams-api&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Company class&lt;/li&gt;&#xA;&lt;li&gt;Employee class&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Company can have multiple employees.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Objective&lt;/strong&gt;&lt;br&gt;&#xA;Return a list of the names of distinct employees in the company which have an ID greater than a given numeric ID.&lt;/p&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;Employee&lt;/span&gt; &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;implements&lt;/span&gt; EmployeeInterface {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;private&lt;/span&gt; String id;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;private&lt;/span&gt; String name;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;Employee&lt;/span&gt;(String id, String name) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;this&lt;/span&gt;.id = id;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;this&lt;/span&gt;.name = name;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; String &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;getId&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; id;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; String &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;getName&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; name;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;button class=&#34;copy-code-button&#34;&gt;copy&lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;Company&lt;/span&gt; &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;implements&lt;/span&gt; CompanyInterface {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;private&lt;/span&gt; List&amp;lt;Employee&amp;gt; employees;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;Company&lt;/span&gt;(List&amp;lt;Employee&amp;gt; employees) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;this&lt;/span&gt;.employees = employees;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; List&amp;lt;Employee&amp;gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;getEmployees&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; employees;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888;font-style:italic&#34;&gt;// originally implemented using Set&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888;font-style:italic&#34;&gt;// and .toSet() but this is better:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;font-style:italic;text-decoration:underline&#34;&gt;public&lt;/span&gt; List&amp;lt;String&amp;gt; &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;getEmployeesBasedOnEmployeeId&lt;/span&gt;(String idThreshold) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;int&lt;/span&gt; threshold = Integer.parseInt(idThreshold);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; employees.stream()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            .filter(employee -&amp;gt; Integer.parseInt(employee.getId()) &amp;gt; threshold)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            .map(employee -&amp;gt; employee.getName())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            .distinct()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            .collect(Collectors.toList());&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;button class=&#34;copy-code-button&#34;&gt;copy&lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;2-maximum-sub-array-sum-kadanes-algorithm&#34;&gt;&#xA;  2. Maximum sub-array sum (Kadane&amp;rsquo;s algorithm)&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#2-maximum-sub-array-sum-kadanes-algorithm&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;--- loop ---&#xA;1. maximum = Math.max(maximum + arr[i], arr[i]);&#xA;2. ans = Math.max(ans, maximum);&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;button class=&#34;copy-code-button&#34;&gt;copy&lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Include current element in &lt;code&gt;maximum&lt;/code&gt; sum OR start &lt;code&gt;maximum&lt;/code&gt; from current element (will happen when maximum till last element &amp;lt; 0).&lt;/li&gt;&#xA;&lt;li&gt;Update &lt;code&gt;ans&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Hint on doing this for a circular list: minimising the sub-array sum.&lt;/p&gt;</description>
    </item>
    <item>
      <title>atoi()</title>
      <link>https://arpitjn.com/notes/atoi/</link>
      <pubDate>Thu, 27 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/atoi/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://leetcode.com/problems/string-to-integer-atoi/&#34;&gt;LC8&lt;/a&gt; took all of my time today. Pseudocoding here for reference later &amp;ndash;&lt;/p&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;problem-statement&#34;&gt;&#xA;  Problem Statement&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#problem-statement&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Convert a string to integer -&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Leading whitespaces to be ignored&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;+&lt;/code&gt; or &lt;code&gt;-&lt;/code&gt; to be taken into account for the integer sign&lt;/li&gt;&#xA;&lt;li&gt;Non-digit characters to be ignored&lt;/li&gt;&#xA;&lt;li&gt;Digit characters to be converted to integers&lt;/li&gt;&#xA;&lt;li&gt;Constraint specifies a string length of 0 to 200, integer overflow is possible; answer in that case to be rounded off to the max/min integer value&lt;/li&gt;&#xA;&lt;li&gt;Return the final signed integer&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;pseudocode&#34;&gt;&#xA;  Pseudocode&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#pseudocode&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;index&lt;/span&gt; = 0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;answer&lt;/span&gt; = 0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;sign&lt;/span&gt; = 1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; string &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;length&lt;/span&gt; = 0, &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; 0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;while&lt;/span&gt; (index &amp;lt; string.length AND leading whitespaces) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    increment index&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; (index &amp;lt; string.length AND current character + or -) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;sign&lt;/span&gt; = 1 &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#666;font-style:italic&#34;&gt;&amp;#39;+&amp;#39;&lt;/span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    OR&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;sign&lt;/span&gt; = -1 &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#666;font-style:italic&#34;&gt;&amp;#39;-&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    increment index&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;while&lt;/span&gt; (index &amp;lt; string.length) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;digit&lt;/span&gt; = (int) current character  ----- [- &lt;span style=&#34;color:#666;font-style:italic&#34;&gt;&amp;#39;0&amp;#39;&lt;/span&gt; in Java (some ASCII math)]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; digit does not lie between 0 and 9, &lt;span style=&#34;font-weight:bold;font-style:italic&#34;&gt;break&lt;/span&gt; loop&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    check &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;for&lt;/span&gt; integer overflow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        - MAX_INT / 10 &amp;gt; answer OR&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        - MAX_INT / &lt;span style=&#34;color:#666;font-weight:bold;font-style:italic&#34;&gt;10&lt;/span&gt; == answer &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;then&lt;/span&gt; last digit of MAX_INT to be less than current digit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;if&lt;/span&gt; integer overflow - &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; MAX or MIN int (check with sign)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;else&lt;/span&gt; add digit to answer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;font-weight:bold;text-decoration:underline&#34;&gt;return&lt;/span&gt; answer&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;button class=&#34;copy-code-button&#34;&gt;copy&lt;/button&gt;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Advent of Code 2024</title>
      <link>https://arpitjn.com/notes/aoc-2024/</link>
      <pubDate>Mon, 02 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/aoc-2024/</guid>
      <description>&lt;p&gt;I have decided to challenge my problem solving by following through on &lt;a href=&#34;https://adventofcode.com/&#34;&gt;Advent of Code&lt;/a&gt; this year.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;&amp;ldquo;Advent of Code is an Advent calendar of small programming puzzles for a variety of skill levels that can be solved in any programming language you like. People use them as interview prep, company training, university coursework, practice problems, a speed contest, or to challenge each other.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I&amp;rsquo;m solving the problems in Java since I use it at work and feel most comfortable with it.&#xA;⚠️ Caution: This Java code works&amp;hellip; mostly. Optimization? wHAT&amp;rsquo;S THAT?&lt;br&gt;&#xA;(If you&amp;rsquo;re a recruiter; just kidding.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to fix messed up internal VPN on Ubuntu</title>
      <link>https://arpitjn.com/notes/systemd-resolved/</link>
      <pubDate>Mon, 09 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/systemd-resolved/</guid>
      <description>&lt;p&gt;For legal and sanity reasons, there’s no classified stuff here. To anyone from work: Yes, I fixed it. Crisis averted, lesson learnt.&lt;/p&gt;&#xA;&lt;p&gt;This is mostly a note to self in case I try to fix this issue when it happens again, and I need to revert everything.&lt;/p&gt;&#xA;&lt;h2 class=&#34;heading&#34; id=&#34;problem&#34;&gt;&#xA;  Problem&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#problem&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;WiFi works 10/10 on work laptop. VPN works 5/10. It connects, works for a few minutes and then it just stops working. Even after disconnecting from VPN, WiFi does not work normally and a system reboot is needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A/B Testing 101</title>
      <link>https://arpitjn.com/notes/ab-101/</link>
      <pubDate>Thu, 13 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/ab-101/</guid>
      <description>&lt;p&gt;Since this year started, I have been working on a project on controlled online experimentation system implemented from scratch, christened:&lt;br&gt;&#xA;&lt;strong&gt;Abacus: The A/B Testing Project™&lt;/strong&gt;.&lt;br&gt;&#xA;It&amp;rsquo;s currently in the SIT environment right now where I&amp;rsquo;m interning, with a few natural holdups that happen due to cross-team collaboration. Nevertheless, I&amp;rsquo;m confident we&amp;rsquo;ll take it to production soon.&lt;/p&gt;&#xA;&lt;h2 class=&#34;heading&#34; id=&#34;case-study&#34;&gt;&#xA;  Case Study&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#case-study&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s say I bake two different batches of cookies. The first batch I call &lt;strong&gt;Hide n&amp;rsquo; Sleep&lt;/strong&gt; (my favourite), and the second I call &lt;strong&gt;Padhle-G&lt;/strong&gt; (the classic). I&amp;rsquo;m not sure which batch would do better in the market if I was to sell them, so I conduct a small experiment on some 20 friends to see which cookie is more liked.&lt;br&gt;&#xA;I give 10 of my twenty friends Hide n&amp;rsquo; Sleep, and the remaining 10 get Padhle-G and let&amp;rsquo;s say&lt;/p&gt;</description>
    </item>
    <item>
      <title>DAO Design Pattern with Spring Boot</title>
      <link>https://arpitjn.com/notes/springboot-and-dao/</link>
      <pubDate>Sun, 26 May 2024 04:04:08 +0530</pubDate>
      <guid>https://arpitjn.com/notes/springboot-and-dao/</guid>
      <description>&lt;p&gt;It has been a couple of months to me developing a backend driven service for the organization where I&amp;rsquo;m interning. From hating the J of Java (irrationally) to easily writing complex controller classes and services with Spring Boot, this project has given me my first hands-on experience with Java, Spring Boot, and the DAO design pattern.&lt;/p&gt;&#xA;&lt;h2 class=&#34;heading&#34; id=&#34;spring-boot&#34;&gt;&#xA;  Spring Boot&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#spring-boot&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Spring Boot is a framework based on Java which is used to build web apps and microservices. Built on top of the Spring framework, it is used to quickly build new applications through a convention over configuration based approach to speed up development. The main Spring Boot components are:&lt;/p&gt;</description>
    </item>
    <item>
      <title>srcdit</title>
      <link>https://arpitjn.com/notes/srcdit/</link>
      <pubDate>Tue, 06 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/srcdit/</guid>
      <description>&lt;p&gt;There was a phase when I was editing my &lt;code&gt;.bashrc&lt;/code&gt; and &lt;code&gt;.zshrc&lt;/code&gt; a lot. Having to edit them and then source them again and again soon became torturous. It would have been so much better if I had a tool to edit and source the files in just one step.&lt;/p&gt;&#xA;&lt;p&gt;The best part about being someone who works with and understands software is that I can build a tool to meet this requirement myself.&#xA;I worked on &lt;a href=&#34;https://pypi.org/project/srcdit/&#34;&gt;srcdit&lt;/a&gt; for a few days before getting busy with my internship, and I&amp;rsquo;m glad to announce that it&amp;rsquo;s in a half-working condition. Check it out &lt;a href=&#34;https://pypi.org/project/srcdit/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Asking questions the smart way - summarized</title>
      <link>https://arpitjn.com/notes/smart-questions/</link>
      <pubDate>Tue, 09 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/smart-questions/</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;http://www.catb.org/~esr/faqs/smart-questions.html&#34;&gt;How To Ask Questions The Smart Way&lt;/a&gt;&lt;/strong&gt; is one of my favourite pieces of text related to software development (although the learnings can be extrapolated to other fields too). I adopted it as my Bible back in first semester and have referred it to my friends and juniors in conversations around taking-help a LOT of times ever since.&lt;br&gt;&#xA;I&amp;rsquo;ve also gone back to the document to read it again, but would agree to it being lengthy (it is highly recommend as an investment in yourself though).&lt;/p&gt;</description>
    </item>
    <item>
      <title>First 4 hours of using Neovim</title>
      <link>https://arpitjn.com/notes/learning-nvim/</link>
      <pubDate>Thu, 23 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/learning-nvim/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve finally decided to give scary Vim a try after I followed a few commands online and got stuck in it 2 years ago. After hacking at it for the past 4 hours, here are some short notes from what I&amp;rsquo;ve learned researching and using &lt;code&gt;neovim&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;what-is-vim&#34;&gt;&#xA;  What is Vim?&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#what-is-vim&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;In simple words, a text editor which considers the use of mouse to navigate/edit a blasphemy.&lt;br&gt;&#xA;Vim is a modal text editor (it uses different modes in which text can be manipulated). It is powerful and highly configurable. I&amp;rsquo;ve started getting my hands dirty with Neovim, which is an extensible fork of Vim through the use of highly functional plugins and comes with a better set of defaults like LSP, to support coding right out of the box.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Generating Sign Language</title>
      <link>https://arpitjn.com/notes/sign-language-generation/</link>
      <pubDate>Mon, 16 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/notes/sign-language-generation/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been working on creating a more accessible space online for the specially abled using AI/ML technologies under my university&amp;rsquo;s Centre of Excellence.&lt;/p&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;the-what-why-who-when-and-where&#34;&gt;&#xA;  The What, Why, Who, When and Where&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#the-what-why-who-when-and-where&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;About 5% of our country&amp;rsquo;s population suffers from auditory and speech impairment. Most of the educational content available on the internet caters to the &amp;ldquo;mainstream&amp;rdquo; population and &lt;strong&gt;lacks accessibility features&lt;/strong&gt; for those with special needs.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure class=&#34; img-small&#34;&gt;&#xA;&#xA;    &#xA;    &#xA;      &lt;div&gt;&#xA;          &lt;img loading=&#34;lazy&#34; alt=&#34;&#34; src=&#34;https://uploads.iasscore.in/image/Persons-with-Disabilities-%28Divyangjan%29-in-India.jpg#small&#34;&gt;&#xA;      &lt;/div&gt;&#xA;    &#xA;&#xA;    &#xA;&lt;/figure&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;In order to create a friendlier online space for them, we are working on modules which will essentially &lt;strong&gt;translate the content&lt;/strong&gt; on internet into a more comprehensible form.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why do I use Linux?</title>
      <link>https://arpitjn.com/notes/why-linux/</link>
      <pubDate>Sun, 09 Oct 2022 00:00:00 +0530</pubDate>
      <guid>https://arpitjn.com/notes/why-linux/</guid>
      <description>&lt;p&gt;To start with a small rant on Apple and Microsoft being giant monopolies in the global market for operating systems.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;On one hand, Apple boasts a fluid user experience (and ecosystem lock-in) with its macOS&lt;/li&gt;&#xA;&lt;li&gt;And on the other hand we have Microsoft&amp;rsquo;s Windows which brags its vast support of applications and (pseudo) customizability.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Linux, however, speaks for itself.&#xA;&lt;figure class=&#34;center-image&#34;&gt;&lt;img src=&#34;https://user-images.githubusercontent.com/70942982/194413882-04119517-00cd-46cf-95be-d48256a03771.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 class=&#34;heading&#34; id=&#34;linux&#34;&gt;&#xA;  Linux?&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#linux&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Linux is a &lt;strong&gt;free and open source&lt;/strong&gt; operating system (technically speaking 🤓☝️, it&amp;rsquo;s a &lt;em&gt;kernel&lt;/em&gt;, but for the scope of this post, let&amp;rsquo;s call it an OS).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning to make a Temperature Converting API using Express.js</title>
      <link>https://arpitjn.com/notes/express-api/</link>
      <pubDate>Sun, 12 Jun 2022 00:00:06 +0530</pubDate>
      <guid>https://arpitjn.com/notes/express-api/</guid>
      <description>&lt;p&gt;One of the first few tasks of the internship I recently got, was to develop a simple RESTful API which converted a given temperature from Farhenheit to Celsius and vice versa.&#xA;&lt;figure&gt;&lt;img src=&#34;https://i.morioh.com/8c8203b86e.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;The choice of technology was left up to me. Having worked with &lt;strong&gt;Node and Express.js&lt;/strong&gt; before, I decided it would be convenient for me to work on the API using these. It would be easier developing an understanding over the API structure and its nuances, without having to worry about learning the syntax of a new language.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Organizing OSDHack&#39;22</title>
      <link>https://arpitjn.com/notes/organizing-osdhack/</link>
      <pubDate>Sat, 12 Feb 2022 17:20:52 +0530</pubDate>
      <guid>https://arpitjn.com/notes/organizing-osdhack/</guid>
      <description>&lt;p&gt;&lt;strong&gt;OSDHack&lt;/strong&gt; is an annual hackathon, organized by the Open Source Developers Community of JIIT Noida, Sector-62. Previously organized at the intra-college level, this year we decided to scale it up and &lt;strong&gt;host a nation-wide open hackathon&lt;/strong&gt;. We saw registrations of &lt;strong&gt;450+ participants&lt;/strong&gt; and a whopping total of &lt;strong&gt;100+ teams&lt;/strong&gt;, which turned out to be way more than we had expected!&lt;/p&gt;&#xA;&lt;p&gt;Everything, right from planning till execution was handled by the students of the community and it wasn&amp;rsquo;t a piece of cake. It&amp;rsquo;s been an exceptionally challenging journey, which the team navigated through with each other&amp;rsquo;s help. Despite being a tiring and draining experience, it gave us learnings that were valuable, and made us realize how big of a task it is to organize a large scale event.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Documenting my OSDCodeJam’21 experience</title>
      <link>https://arpitjn.com/notes/codejam-experience/</link>
      <pubDate>Mon, 22 Feb 2021 02:16:29 +0530</pubDate>
      <guid>https://arpitjn.com/notes/codejam-experience/</guid>
      <description>&lt;p&gt;!!! Images broken !!!&lt;/p&gt;&#xA;&lt;p&gt;It’s New Year’s Day. We are idling away since it’s our semester break, when around 3 a.m. in the morning, seniors from our college’s &lt;a href=&#34;https://osdc.netlify.app/&#34;&gt;Open Source Developers Community (OSDC)&lt;/a&gt; made a big announcement. They had come up with a new and unique kind of event for us. OSDC was organizing its first Code Jam, OSDCodeJam’21.&lt;/p&gt;&#xA;&lt;h2 class=&#34;heading&#34; id=&#34;osdcodejam&#34;&gt;&#xA;  OSDCodeJam&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#osdcodejam&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;figure class=&#34;&#34;&gt;&#xA;&#xA;    &#xA;    &#xA;      &lt;div&gt;&#xA;          &lt;img loading=&#34;lazy&#34; alt=&#34;image&#34; src=&#34;https://arpitjn.com/codejam1.png&#34;&gt;&#xA;      &lt;/div&gt;&#xA;    &#xA;&#xA;    &#xA;&lt;/figure&gt;&#xA;&#xA;OSDCodeJam is a fun, collaborative (intra-college, but just for this year) competition organized by our seniors from the Open Source Developers Community at Jaypee Institute of Information Technology.&lt;/p&gt;</description>
    </item>
    <item>
      <title>KWoC&#39;21 Project Mentee Experience</title>
      <link>https://arpitjn.com/notes/kwoc-mentee-experience/</link>
      <pubDate>Thu, 07 Jan 2021 16:52:35 +0530</pubDate>
      <guid>https://arpitjn.com/notes/kwoc-mentee-experience/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://kwoc.kossiitkgp.org/&#34;&gt;Kharagpur Winter of Code (KWoC)&lt;/a&gt; is an initiative by IIT Kharagpur’s Open Source Society (KOSS) for students with little to no experience (such as myself) in open source software development.&lt;/p&gt;&#xA;&lt;p&gt;It aims to introduce students to the working of one of the most popular version control systems - Git. KWoC helps flatten the learning curve and allows students to prepare further for prestigious open source programs like Google Summer of Code (GSoC), Outreachy, Season of KDE, GNOME Internship program and others.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resume</title>
      <link>https://arpitjn.com/resume/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://arpitjn.com/resume/</guid>
      <description>&lt;p&gt;Feel free to look around! :)&lt;br&gt;&#xA;Download my resume as a PDF from Google Drive - &lt;a href=&#34;https://drive.google.com/file/d/1N2bkXuKuaClpz8jmsUmblfc3p5vp0Oyl/view&#34;&gt;here&lt;/a&gt;, or from below&#xA;&lt;script type=&#34;text/javascript&#34; src= &#39;/js/pdf-js/build/pdf.js&#39;&gt;&lt;/script&gt;&#xA;&#xA;&lt;style&gt;&#xA;  #embed-pdf-container {&#xA;    position: relative;&#xA;    width: 100%;&#xA;    height: auto;&#xA;    min-height: 20vh;&#xA;     &#xA;  }&#xA;  &#xA;  .pdf-canvas {&#xA;    border: 1px solid black;&#xA;    direction: ltr;&#xA;    width: 100%;&#xA;    height: auto;&#xA;    display: none;&#xA;  }&#xA;  &#xA;  #the-canvas {&#xA;    border: 1px solid black;&#xA;    direction: ltr;&#xA;    width: 100%;&#xA;    height: auto;&#xA;    display: none;&#xA;  }&#xA;  &#xA;  &#xA;  .pdf-loadingWrapper {&#xA;    display: none;&#xA;    justify-content: center;&#xA;    align-items: center;&#xA;    width: 100%;&#xA;    height: 350px;&#xA;  }&#xA;  &#xA;  .pdf-loading {&#xA;    display: inline-block;&#xA;    width: 50px;&#xA;    height: 50px;&#xA;    border: 3px solid #d2d0d0;;&#xA;    border-radius: 50%;&#xA;    border-top-color: #383838;&#xA;    animation: spin 1s ease-in-out infinite;&#xA;    -webkit-animation: spin 1s ease-in-out infinite;&#xA;  }&#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  #overlayText {&#xA;    word-wrap: break-word;&#xA;    display: grid;&#xA;    justify-content: end;&#xA;  }&#xA;  &#xA;  #overlayText a {&#xA;    position: relative;&#xA;    top: 10px;&#xA;    right: 4px;&#xA;    color: #000;&#xA;    margin: auto;&#xA;    background-color: #eeeeee;&#xA;    padding: 0.3em 1em;&#xA;    border: solid 2px;&#xA;    border-radius: 12px;&#xA;    border-color: #00000030;&#xA;    text-decoration: none;&#xA;  }&#xA;  &#xA;  #overlayText svg {&#xA;    height: clamp(1em, 2vw, 1.4em);&#xA;    width:  clamp(1em, 2vw, 1.4em);&#xA;  }&#xA;  &#xA;  &#xA;  &#xA;  @keyframes spin {&#xA;    to { -webkit-transform: rotate(360deg); }&#xA;  }&#xA;  @-webkit-keyframes spin {&#xA;    to { -webkit-transform: rotate(360deg); }&#xA;  }&#xA;  &lt;/style&gt;&lt;div class=&#34;embed-pdf-container&#34; id=&#34;embed-pdf-container-c509dc3d&#34;&gt;&#xA;    &lt;div class=&#34;pdf-loadingWrapper&#34; id=&#34;pdf-loadingWrapper-c509dc3d&#34;&gt;&#xA;        &lt;div class=&#34;pdf-loading&#34; id=&#34;pdf-loading-c509dc3d&#34;&gt;&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div id=&#34;overlayText&#34;&gt;&#xA;      &lt;a href=&#34;https://arpitjn.com/resume_arpit_jain.pdf&#34; aria-label=&#34;Download&#34; download&gt;&#xA;        &lt;svg aria-hidden=&#34;true&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 18 18&#34;&gt;&#xA;            &lt;path d=&#34;M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z&#34; /&gt;&#xA;        &lt;/svg&gt;&#xA;      &lt;/a&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;canvas class=&#34;pdf-canvas&#34; id=&#34;pdf-canvas-c509dc3d&#34;&gt;&lt;/canvas&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;div class=&#34;pdf-paginator&#34; id=&#34;pdf-paginator-c509dc3d&#34;&gt;&#xA;    &lt;button id=&#34;pdf-prev-c509dc3d&#34;&gt;Previous&lt;/button&gt;&#xA;    &lt;button id=&#34;pdf-next-c509dc3d&#34;&gt;Next&lt;/button&gt; &amp;nbsp; &amp;nbsp;&#xA;    &lt;span&gt;&#xA;      &lt;span class=&#34;pdf-pagenum&#34; id=&#34;pdf-pagenum-c509dc3d&#34;&gt;&lt;/span&gt; / &lt;span class=&#34;pdf-pagecount&#34; id=&#34;pdf-pagecount-c509dc3d&#34;&gt;&lt;/span&gt;&#xA;    &lt;/span&gt;&#xA;    &lt;a class=&#34;pdf-source&#34; id=&#34;pdf-source-c509dc3d&#34; href=&#34;https://arpitjn.com/resume_arpit_jain.pdf&#34;&gt;[pdf]&lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;noscript&gt;&#xA;View the PDF file &lt;a class=&#34;pdf-source&#34; id=&#34;pdf-source-noscript-c509dc3d&#34; href=&#34;https://arpitjn.com/resume_arpit_jain.pdf&#34;&gt;here&lt;/a&gt;.&#xA;&lt;/noscript&gt;&#xA;&#xA;&lt;script type=&#34;text/javascript&#34;&gt;&#xA;    (function(){&#xA;    var url = &#39;\/resume_arpit_jain.pdf&#39;;&#xA;&#xA;    var hidePaginator = &#34;true&#34; === &#34;true&#34;;&#xA;    var hideLoader = &#34;&#34; === &#34;true&#34;;&#xA;    var selectedPageNum = parseInt(&#34;&#34;) || 1;&#xA;&#xA;    &#xA;    var pdfjsLib = window[&#39;pdfjs-dist/build/pdf&#39;];&#xA;&#xA;    &#xA;    if (pdfjsLib.GlobalWorkerOptions.workerSrc == &#39;&#39;)&#xA;      pdfjsLib.GlobalWorkerOptions.workerSrc = &#34;https:\/\/arpitjn.com\/&#34; + &#39;js/pdf-js/build/pdf.worker.js&#39;;&#xA;&#xA;    &#xA;    var pdfDoc = null,&#xA;        pageNum = selectedPageNum,&#xA;        pageRendering = false,&#xA;        pageNumPending = null,&#xA;        scale = 3,&#xA;        canvas = document.getElementById(&#39;pdf-canvas-c509dc3d&#39;),&#xA;        ctx = canvas.getContext(&#39;2d&#39;),&#xA;        paginator = document.getElementById(&#34;pdf-paginator-c509dc3d&#34;),&#xA;        loadingWrapper = document.getElementById(&#39;pdf-loadingWrapper-c509dc3d&#39;);&#xA;&#xA;&#xA;    &#xA;    showPaginator();&#xA;    showLoader();&#xA;&#xA;    &#xA;&#xA;    function renderPage(num) {&#xA;      pageRendering = true;&#xA;      &#xA;      pdfDoc.getPage(num).then(function(page) {&#xA;        var viewport = page.getViewport({scale: scale});&#xA;        canvas.height = viewport.height;&#xA;        canvas.width = viewport.width;&#xA;&#xA;        &#xA;        var renderContext = {&#xA;          canvasContext: ctx,&#xA;          viewport: viewport&#xA;        };&#xA;        var renderTask = page.render(renderContext);&#xA;&#xA;        &#xA;        renderTask.promise.then(function() {&#xA;          pageRendering = false;&#xA;          showContent();&#xA;&#xA;          if (pageNumPending !== null) {&#xA;            &#xA;            renderPage(pageNumPending);&#xA;            pageNumPending = null;&#xA;          }&#xA;        });&#xA;      });&#xA;&#xA;      &#xA;      document.getElementById(&#39;pdf-pagenum-c509dc3d&#39;).textContent = num;&#xA;    }&#xA;&#xA;    &#xA;&#xA;    function showContent() {&#xA;      loadingWrapper.style.display = &#39;none&#39;;&#xA;      canvas.style.display = &#39;block&#39;;&#xA;    }&#xA;&#xA;    &#xA;&#xA;    function showLoader() {&#xA;      if(hideLoader) return&#xA;      loadingWrapper.style.display = &#39;flex&#39;;&#xA;      canvas.style.display = &#39;none&#39;;&#xA;    }&#xA;&#xA;    &#xA;&#xA;    function showPaginator() {&#xA;      if(hidePaginator) return&#xA;      paginator.style.display = &#39;block&#39;;&#xA;    }&#xA;&#xA;    &#xA;&#xA;    function queueRenderPage(num) {&#xA;      if (pageRendering) {&#xA;        pageNumPending = num;&#xA;      } else {&#xA;        renderPage(num);&#xA;      }&#xA;    }&#xA;&#xA;    &#xA;&#xA;    function onPrevPage() {&#xA;      if (pageNum &lt;= 1) {&#xA;        return;&#xA;      }&#xA;      pageNum--;&#xA;      queueRenderPage(pageNum);&#xA;    }&#xA;    document.getElementById(&#39;pdf-prev-c509dc3d&#39;).addEventListener(&#39;click&#39;, onPrevPage);&#xA;&#xA;    &#xA;&#xA;    function onNextPage() {&#xA;      if (pageNum &gt;= pdfDoc.numPages) {&#xA;        return;&#xA;      }&#xA;      pageNum++;&#xA;      queueRenderPage(pageNum);&#xA;    }&#xA;    document.getElementById(&#39;pdf-next-c509dc3d&#39;).addEventListener(&#39;click&#39;, onNextPage);&#xA;&#xA;    &#xA;&#xA;    pdfjsLib.getDocument(url).promise.then(function(pdfDoc_) {&#xA;      pdfDoc = pdfDoc_;&#xA;      var numPages = pdfDoc.numPages;&#xA;      document.getElementById(&#39;pdf-pagecount-c509dc3d&#39;).textContent = numPages;&#xA;&#xA;      &#xA;      if(pageNum &gt; numPages) {&#xA;        pageNum = numPages&#xA;      }&#xA;&#xA;      &#xA;      renderPage(pageNum);&#xA;    });&#xA;    })();&#xA;&lt;/script&gt;&#xA;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
