<?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: Sarmin Akter Dipty</title>
    <description>The latest articles on DEV Community by Sarmin Akter Dipty (@sarminakterdipty).</description>
    <link>https://dev.to/sarminakterdipty</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%2F780296%2Fb8c14481-3b7e-42e9-98f8-87461bcea12b.png</url>
      <title>DEV Community: Sarmin Akter Dipty</title>
      <link>https://dev.to/sarminakterdipty</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sarminakterdipty"/>
    <language>en</language>
    <item>
      <title>CRUD Operation,Relational database (MySql),Express
</title>
      <dc:creator>Sarmin Akter Dipty</dc:creator>
      <pubDate>Sat, 25 Dec 2021 14:43:19 +0000</pubDate>
      <link>https://dev.to/sarminakterdipty/crud-operationrelational-database-mysqlexpress-2pfg</link>
      <guid>https://dev.to/sarminakterdipty/crud-operationrelational-database-mysqlexpress-2pfg</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a_iX1vvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhulzxpws5lcv3uqaott.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a_iX1vvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhulzxpws5lcv3uqaott.jpg" alt="Image description" width="300" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CRUD Operation&lt;/p&gt;

&lt;p&gt;CRUD Meaning: CRUD is an acronym that comes from the world of computer &lt;/p&gt;

&lt;p&gt;programming and refers to the four functions that are considered necessary to &lt;/p&gt;

&lt;p&gt;implement a persistent storage application: create, read, update and delete.&lt;/p&gt;

&lt;p&gt;Relational database (MySql)&lt;/p&gt;

&lt;p&gt;Enhance Your MySQL Databases For Free With Amazon Web Services.&lt;/p&gt;

&lt;p&gt;Get Started Today. Flexible &amp;amp; Secure Open Source Relational Database &lt;/p&gt;

&lt;p&gt;Services. Try It For Free For 12 Months. Sign Up For Free. Create a Free Account. Free Tier Details. Hands-On Experience.&lt;/p&gt;

&lt;p&gt;Express&lt;/p&gt;

&lt;p&gt;Express is a minimal and flexible Node.js web application framework &lt;/p&gt;

&lt;p&gt;that provides a robust set of features for web and mobile applications. &lt;/p&gt;

&lt;p&gt;APIs. With a myriad …&lt;br&gt;
Mongoose&lt;/p&gt;

&lt;p&gt;Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose.&lt;br&gt;
const mongoose = require('mongoose');&lt;br&gt;
mongoose.connect('mongodb://localhost:27017/test');&lt;/p&gt;

&lt;p&gt;const Cat = mongoose.model('Cat', { name: String });&lt;/p&gt;

&lt;p&gt;const kitty = new Cat({ name: 'Zildjian' });&lt;br&gt;
kitty.save().then(() =&amp;gt; console.log('meow'));&lt;/p&gt;

</description>
      <category>express</category>
      <category>mongodb</category>
      <category>node</category>
      <category>react</category>
    </item>
    <item>
      <title>React Virtual DOM and diffing- algorithm Simplified, Context API</title>
      <dc:creator>Sarmin Akter Dipty</dc:creator>
      <pubDate>Sat, 25 Dec 2021 14:22:40 +0000</pubDate>
      <link>https://dev.to/sarminakterdipty/react-virtual-dom-and-diffing-algorithm-simplified-context-api-24b2</link>
      <guid>https://dev.to/sarminakterdipty/react-virtual-dom-and-diffing-algorithm-simplified-context-api-24b2</guid>
      <description>&lt;p&gt;React Virtual DOM and diffing- algorithm Simplified&lt;br&gt;
Virtual DOM&lt;/p&gt;

&lt;p&gt;The virtual DOM (VDOM) is a programming concept where an ideal, or “virtual”, representation of a UI is kept in memory and synced with the “real” DOM by a library such as ReactDOM. ... Since “virtual DOM” is more of a pattern than a specific technology, people sometimes say it to mean different things.&lt;/p&gt;

&lt;p&gt;Diffing-Algorithm:&lt;br&gt;
React uses the "Diff" algorithm to do this comparison. With that, React can understand which places have changed. React then changes only the part of the dom where the change was made.&lt;/p&gt;

&lt;p&gt;Context API&lt;/p&gt;

&lt;p&gt;You might think to yourself: "Well, I'm convinced. How do I implement Context API in my app?" First, make sure you need it. Sometimes people use shared state across nested components instead of just passing it as props. And if you do need it you should follow these very few steps:&lt;br&gt;
Create a folder under your app root named contexts (not required. just a convention)&lt;br&gt;
Create a file named Context.js, e.g. userContext.js&lt;br&gt;
import and create a context like so:&lt;br&gt;
import React, { createContext } from "react";&lt;br&gt;
const UserContext = createContext();&lt;br&gt;
Create a component that will wrap the provider named Provider e.g. UserProvider&lt;br&gt;
Example using React Hooks:&lt;br&gt;
const UserProvider = ({ children }) =&amp;gt; {&lt;br&gt;
  const [name, setName] = useState("John Doe");&lt;br&gt;
  const [age, setAge] = useState(1);&lt;br&gt;
  const happyBirthday = () =&amp;gt; setAge(age + 1);&lt;br&gt;
  return (&lt;br&gt;
    &lt;br&gt;
      {children}&lt;br&gt;
    &lt;br&gt;
  );&lt;br&gt;
};&lt;br&gt;
Create a higher order component to consume the context named: with e.g. withUser&lt;br&gt;
Example using React Hooks:&lt;br&gt;
const withUser = (Child) =&amp;gt; (props) =&amp;gt; (&lt;br&gt;
  &lt;br&gt;
    {(context) =&amp;gt; }&lt;br&gt;
    {/* Another option is:  {context =&amp;gt; }*/}&lt;br&gt;
  &lt;br&gt;
);&lt;br&gt;
The difference between the two options above is if you want the context to be a single nested property by this name, to explode it to its properties (which in my opinion is more convenient).&lt;br&gt;
Finally export them&lt;br&gt;
export { UserProvider, withUser };&lt;/p&gt;

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

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>API, event loop stack and queue,DOM</title>
      <dc:creator>Sarmin Akter Dipty</dc:creator>
      <pubDate>Sat, 25 Dec 2021 13:53:09 +0000</pubDate>
      <link>https://dev.to/sarminakterdipty/api-event-loop-stack-and-queuedom-543e</link>
      <guid>https://dev.to/sarminakterdipty/api-event-loop-stack-and-queuedom-543e</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GY3s_aSO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8zsb5wu4e8mkzkheo6a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GY3s_aSO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8zsb5wu4e8mkzkheo6a.jpg" alt="Image description" width="500" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More Javascript&lt;br&gt;
What is an API?&lt;/p&gt;

&lt;p&gt;An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices. &lt;br&gt;
GET – Gathers information (Pulling all Coupon Codes)&lt;br&gt;
PUT –  Updates pieces of data (Updating Product pricing)&lt;br&gt;
POST – Creates (Creating a new Product Category)&lt;br&gt;
DELETE – (Deleting a blog post)&lt;br&gt;
How Javascript works event loop stack and queue&lt;br&gt;
The Event Loop has one simple job — to monitor the Call Stack and the Callback Queue. If the Call Stack is empty, the Event Loop will take the first event from the queue and will push it to the Call Stack, which effectively runs it. Such an iteration is called a tick in the Event Loop.&lt;br&gt;
What is DOM&lt;br&gt;
The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document &lt;br&gt;
For example, the DOM specifies that the querySelectorAll method in this code snippet must return a list of all the &lt;/p&gt;
&lt;p&gt; elements in the document:&lt;br&gt;
const paragraphs = document.querySelectorAll("p");&lt;br&gt;
// paragraphs[0] is the first &lt;/p&gt;
&lt;p&gt; element&lt;br&gt;
// paragraphs[1] is the second &lt;/p&gt;
&lt;p&gt; element, etc.&lt;br&gt;
alert(paragraphs[0].nodeName);&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>dom</category>
      <category>event</category>
    </item>
    <item>
      <title>Arguments and Parameters,Generator Functions</title>
      <dc:creator>Sarmin Akter Dipty</dc:creator>
      <pubDate>Sat, 25 Dec 2021 13:23:15 +0000</pubDate>
      <link>https://dev.to/sarminakterdipty/arguments-and-parametersgenerator-functions-2o4g</link>
      <guid>https://dev.to/sarminakterdipty/arguments-and-parametersgenerator-functions-2o4g</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OiM5rTF7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0xser7jejlxwh6j05vj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OiM5rTF7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0xser7jejlxwh6j05vj.jpg" alt="Image description" width="500" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arguments and Parameters&lt;br&gt;
In the following code block, you will create a function that returns the cube of a given number, defined as x:&lt;/p&gt;

&lt;p&gt;The x variable in this example is a parameter—a named variable passed into a function. A parameter must always be contained in a variable and must never have a direct value.&lt;br&gt;
Now take a look at this next code block, which calls the cube function you just created:&lt;/p&gt;

&lt;p&gt;// Invoke cube function cube(10)&lt;br&gt;
This will give the following output:&lt;br&gt;
1000&lt;br&gt;
In this case, 10 is an argument—a value passed to a function when it is invoked. Often the value will be contained in a variable as well, such as in this next example:&lt;/p&gt;

&lt;p&gt;// A&lt;br&gt;
ssign a number to a variable const number = 10 // Invoke cube function cube(number)&lt;br&gt;
This will yield the same result:&lt;br&gt;
1000&lt;br&gt;
If you do not pass an argument to a function that expects one, the function will implicitly use undefined as the value:&lt;br&gt;
// Invoke the cube function without passing an argument cube()&lt;br&gt;
This will return:&lt;br&gt;
NaN&lt;/p&gt;

&lt;p&gt;Generator Functions&lt;/p&gt;

&lt;p&gt;A generator function is a function that returns a Generator object, and is defined by the function keyword followed by an asterisk (*), as shown in the following:&lt;/p&gt;

&lt;p&gt;// Generator function declaration function* generatorFunction() {}&lt;/p&gt;

&lt;p&gt;Occasionally, you will see the asterisk next to the function name, as opposed to the function keyword, such as function &lt;em&gt;generatorFunction(). This works the same, but function&lt;/em&gt; is a more widely accepted syntax.&lt;/p&gt;

&lt;p&gt;Generator functions can also be defined in an expression, like regular functions:&lt;br&gt;
// Generator function expression const generatorFunction = function* () {}&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Position Sticky With CSS Grid, Conditional Border Radius In CSS, Custom Scrollbars In CSS</title>
      <dc:creator>Sarmin Akter Dipty</dc:creator>
      <pubDate>Sat, 25 Dec 2021 06:20:00 +0000</pubDate>
      <link>https://dev.to/sarminakterdipty/position-sticky-with-css-grid-conditional-border-radius-in-css-custom-scrollbars-in-css-28ff</link>
      <guid>https://dev.to/sarminakterdipty/position-sticky-with-css-grid-conditional-border-radius-in-css-custom-scrollbars-in-css-28ff</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bBXtd9H6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bf1eo0m28s9vem6gufgs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bBXtd9H6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bf1eo0m28s9vem6gufgs.jpg" alt="Image description" width="500" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS Blogs&lt;/p&gt;

&lt;p&gt;Position Sticky With CSS Grid&lt;br&gt;
Have I ever come across a case where the sticky position isn’t working as expected with a child of a grid container? A few days ago, I was helping youtube in fixing that exact problem and wanted to finally write about it.&lt;/p&gt;

&lt;p&gt;HTML__:&lt;br&gt;
     &lt;/p&gt;
&lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;


&lt;p&gt;CSS__:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; .wrapper {
display: grid;
grid-template-columns: 250px minmax(10px, 1fr);
grid-gap: 1rem;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;Conditional Border Radius In CSS&lt;br&gt;
We have a card component with a border-radius of 8px. When the card doesn’t have margin or is taking the full viewport width, we want to flip the border-radius to 0.&lt;/p&gt;

&lt;p&gt;CSS__:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; @media (min-width: 700px) {
.card {
    border-radius: 8px;    
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;Custom Scrollbars In CSS&lt;/p&gt;

&lt;p&gt;First, we need to define the size of the scrollbar. This can be the width for vertical scrollbars, and the height for horizontal ones.&lt;br&gt;
CSS__:&lt;br&gt;
.section::-webkit-scrollbar {&lt;br&gt;
    width: 10px;&lt;/p&gt;

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

&lt;p&gt;CSS Scroll Snap&lt;br&gt;
To create a scrolling container, here are the basic things that you will need:&lt;br&gt;
Using the overflow with a value other than visible.A way to display the items next to each other inline.&lt;br&gt;
HTML__:&lt;/p&gt;

&lt;p&gt;Item 1&lt;br&gt;
  Item 2&lt;br&gt;
  Item 3&lt;br&gt;
  Item 4&lt;br&gt;
  Item 5&lt;/p&gt;

&lt;p&gt;CSS__:&lt;br&gt;
.section {&lt;br&gt;
  white-space: nowrap;&lt;br&gt;
  overflow-x: auto;&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
