<?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: kavita gupta</title>
    <description>The latest articles on DEV Community by kavita gupta (@kavitagupta972).</description>
    <link>https://dev.to/kavitagupta972</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%2F589859%2F847ed64f-683b-4d2e-a896-2cbded49926d.png</url>
      <title>DEV Community: kavita gupta</title>
      <link>https://dev.to/kavitagupta972</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kavitagupta972"/>
    <language>en</language>
    <item>
      <title>Hackerrank coding challenge</title>
      <dc:creator>kavita gupta</dc:creator>
      <pubDate>Thu, 01 Sep 2022 08:04:11 +0000</pubDate>
      <link>https://dev.to/kavitagupta972/hackerrank-coding-challenge-3p5j</link>
      <guid>https://dev.to/kavitagupta972/hackerrank-coding-challenge-3p5j</guid>
      <description>&lt;p&gt;Yesterday, I came across one problem in Hackerrank platform, which needs to be solved as part of pair programming challenge.&lt;br&gt;
Sharing the problem and solution with all of you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A friend of Alex has gifted a movie collection, and Alex is excited to watch them all as quickly as possible. The duration of the movies is given in array durations[n], where n is the number of movies, and each movie duration lies between 1.01 and 3.00 units of time (up to two decimal places). Every day, Alex wants to spend no more than 3.00 units of time watching the movies but also wants to complete the movies in the least number of days possible. Alex does not leave a movie in between. That is, if Alex has picked up a movie, Alex watches the complete movie on the same day. Find the minimum number of days needed to watch all the movies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hope, most of us will have more optimized solution.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Seeking to hear from all of you on the same.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Link&lt;/em&gt;&lt;/strong&gt; : [&lt;a href="https://github.com/kavitagupta972/coding-challenges/blob/main/1_heckerrank_challenge"&gt;https://github.com/kavitagupta972/coding-challenges/blob/main/1_heckerrank_challenge&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>codepen</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Callbacks in JavaScript</title>
      <dc:creator>kavita gupta</dc:creator>
      <pubDate>Tue, 16 Aug 2022 11:10:00 +0000</pubDate>
      <link>https://dev.to/kavitagupta972/callbacks-in-javascript-39n6</link>
      <guid>https://dev.to/kavitagupta972/callbacks-in-javascript-39n6</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I started with season2 of Namaste Javascript Series.&lt;br&gt;
Hope, most of us are already aware of this free series on youtube by @akshaysaini. &lt;/p&gt;

&lt;p&gt;Today, I have completed first chapter of season2, and here are my learnings for the same.&lt;/p&gt;

&lt;p&gt;What are callbacks.&lt;br&gt;
What are the problems with callbacks.&lt;/p&gt;

&lt;p&gt;Callbacks are the functions in JavaScript, which are heavily used to perform async operations. It can be passed as an argument to other function. Since, JavaScript is a synchronous single threaded language. To perform async operations, callbacks play a vital role.&lt;/p&gt;

&lt;p&gt;Callbacks are powerful way to achieve async behavior, but there are some limitations with it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Callback Hell&lt;/li&gt;
&lt;li&gt;Inversion of control&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;0. Callback Hell :&lt;/strong&gt; In case of callbacks, if there are multiple callbacks hierarchy i.e. nested callbacks. which leads to callback hell. And, sometime, it becomes difficult to manage, read such codes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Inversion of control :&lt;/strong&gt; When we pass our function to other function, we lose the control of our function. We don't know, how other function is going to use our function.&lt;/p&gt;

&lt;p&gt;Hope this article makes sense to all the JavaScript developers. &lt;br&gt;
Please provide your inputs in comments.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>namastejavascript</category>
    </item>
    <item>
      <title>Eclipse Shortcuts</title>
      <dc:creator>kavita gupta</dc:creator>
      <pubDate>Thu, 22 Jul 2021 08:44:00 +0000</pubDate>
      <link>https://dev.to/kavitagupta972/eclipse-shortcuts-7m1</link>
      <guid>https://dev.to/kavitagupta972/eclipse-shortcuts-7m1</guid>
      <description>&lt;p&gt;There are many ways to work on a system. But, it is good practice if we know about the shortcuts or I would say keyboard shortcuts to operate on a system.&lt;br&gt;
As being a corporate trainer, I am working on different assignments, work with different sets of people. I came to know that, shortcuts are very valuable and everyone wants to learn about them.&lt;br&gt;
In my current training assignment, working on eclipse. Most of the students are asking about eclipse shortcuts.&lt;br&gt;
Here, I am listing down the shortcuts of eclipse that I am using currently.&lt;/p&gt;

&lt;p&gt;Below is the list :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ctrl+D&lt;/strong&gt; — to remove a line.&lt;br&gt;
&lt;strong&gt;ctrl+shift+t&lt;/strong&gt; — to open an already existing resource or API or utility class. e.g. String class, Comparator, Comparable&lt;br&gt;
&lt;strong&gt;ctrl+shift+r&lt;/strong&gt; — to open any resource file that you have created, or that is there in your workspace&lt;br&gt;
&lt;strong&gt;ctrl+shift+o&lt;/strong&gt; — to organize your imports in the existing current file.&lt;br&gt;
&lt;strong&gt;ctrl+o&lt;/strong&gt; — to see the existing list of variables, constants, and methods in the current file.&lt;br&gt;
&lt;strong&gt;ctrl+alt+up arrow, ctrl+alt+down arrow&lt;/strong&gt; — to make a copy of the existing line on which cursor exists currently.&lt;br&gt;
&lt;strong&gt;ctrl+f **— to find/replace in current file&lt;br&gt;
**ctrl+h&lt;/strong&gt; — to search in the workspace or a specific project depend on configuration.&lt;br&gt;
&lt;strong&gt;alt+up arrow, alt+down arrow&lt;/strong&gt; — to move the current selection up and down.&lt;br&gt;
&lt;strong&gt;alt+shift+r&lt;/strong&gt; — to refactor rename. This means the name will be renamed in every reference.&lt;br&gt;
&lt;strong&gt;ctrl+1&lt;/strong&gt; — a quick fix. will give you suggestions if there is an error in your file.&lt;br&gt;
There are other shortcuts as well, I will update this list accordingly.&lt;br&gt;
There is a path is to see all the keyboard shortcuts, eclipse has provided. &lt;/p&gt;

&lt;p&gt;Go to eclipse and follow the below path to know :&lt;br&gt;
See &lt;strong&gt;Help &amp;gt; Help Contents &amp;gt; Java Development User Guide &amp;gt; Reference &amp;gt;List of JDT Key Bindings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Please add more shortcuts in comment section. I will be happy to know more.&lt;br&gt;
Hope you find this article useful. Stay tuned for more articles.&lt;/p&gt;

&lt;p&gt;Kavita Gupta&lt;br&gt;
Full Stack Developer&lt;/p&gt;

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