<?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: CodePassion</title>
    <description>The latest articles on DEV Community by CodePassion (@code_passion).</description>
    <link>https://dev.to/code_passion</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%2F1722901%2F3b11c339-c648-4812-82ed-fcab579d7d9c.png</url>
      <title>DEV Community: CodePassion</title>
      <link>https://dev.to/code_passion</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/code_passion"/>
    <language>en</language>
    <item>
      <title>Leveraging JavaScript's Set and Map for an Efficient Content Management System</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Mon, 02 Sep 2024 05:32:30 +0000</pubDate>
      <link>https://dev.to/code_passion/leveraging-javascripts-set-and-map-for-an-efficient-content-management-system-38c0</link>
      <guid>https://dev.to/code_passion/leveraging-javascripts-set-and-map-for-an-efficient-content-management-system-38c0</guid>
      <description>&lt;p&gt;JavaScript provides several powerful data structures to handle collections of data. Among these, Map and Set are particularly useful for certain types of tasks. In this blog, we'll explore real-world examples of using Map and Set to solve common programming problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Map and Set&lt;/strong&gt;&lt;br&gt;
Before diving into examples, let's quickly recap what &lt;a href="https://skillivo.in/how-to-master-javascript-maps-sets-10-methods-3-real-world-use-cases/" rel="noopener noreferrer"&gt;Map and Set&lt;/a&gt; are in JavaScript.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Map&lt;/strong&gt;&lt;br&gt;
A Map is a collection of key-value pairs where both keys and values can be of any type. It maintains the order of elements, and you can iterate over the entries in the order they were added.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores key-value pairs&lt;/li&gt;
&lt;li&gt;Keys can be of any type&lt;/li&gt;
&lt;li&gt;Maintains insertion order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Set&lt;/strong&gt;&lt;br&gt;
A Set is a collection of unique values. It is similar to an array, but a Set can only contain unique values, meaning no duplicates are allowed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores unique values&lt;/li&gt;
&lt;li&gt;Can be of any type&lt;/li&gt;
&lt;li&gt;Maintains insertion order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;JavaScript's Set and Map for an Efficient Content Management System&lt;/strong&gt;&lt;br&gt;
Managing articles and their associated tags efficiently is crucial for any content management system (CMS). JavaScript provides powerful data structures like Map and Set that can significantly streamline this process. In this blog, we'll explore how to utilize Map and Set to build a simple yet effective CMS for managing articles and their tags. (&lt;a href="https://skillivo.in/how-to-master-javascript-maps-sets-10-methods-3-real-world-use-cases/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Map and Set?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Map: A Map is a collection of keyed data items, just like an object. However, the key difference is that a Map allows keys of any type, not just strings. This makes it a perfect choice for mapping articles to their details.&lt;/li&gt;
&lt;li&gt;Set: A Set is a collection of unique values. It ensures that each tag is unique within an article, eliminating the risk of duplicate tags.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Creating the Articles Map&lt;/strong&gt;&lt;br&gt;
First, we initialize a Map to store our articles. Each article will have a unique identifier and details including the title and tags.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const articles = new Map();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Adding Articles with Tags&lt;/strong&gt;&lt;br&gt;
Next, we add some articles to our Map. Each article is represented as an object with a title and a Set of tags.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Adding articles with tags
articles.set('article1', {
  title: 'Understanding JavaScript',
  tags: new Set(['JavaScript', 'Programming', 'Web Development'])
});
articles.set('article2', {
  title: 'Introduction to CSS',
  tags: new Set(['CSS', 'Design', 'Web Development'])
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Adding a New Tag to an Article&lt;/strong&gt;&lt;br&gt;
We can easily add new tags to an article using the add method of the Set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Adding a new tag to an article
articles.get('article1').tags.add('ES6');
console.log(articles.get('article1').tags); // Output: Set { 'JavaScript', 'Programming', 'Web Development', 'ES6' }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Checking for a Specific Tag&lt;/strong&gt;&lt;br&gt;
To check if an article has a specific tag, we use the has method of the Set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Checking if an article has a specific tag
console.log(articles.get('article2').tags.has('Design')); // Output: true

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5: Iterating Over Articles and Their Tags&lt;/strong&gt;&lt;br&gt;
Finally, we can iterate over the articles and their tags using a for...of loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Iterating over articles and their tags
for (let [articleId, articleDetails] of articles) {
  console.log(`${articleDetails.title}: ${[...articleDetails.tags].join(', ')}`);
}
// Output:
// Understanding JavaScript: JavaScript, Programming, Web Development, ES6
// Introduction to CSS: CSS, Design, Web Development

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read Full Article- &lt;a href="https://skillivo.in/how-to-master-javascript-maps-sets-10-methods-3-real-world-use-cases/" rel="noopener noreferrer"&gt;How to Master JavaScript Maps and Sets &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Using Map and Set in JavaScript provides a powerful way to manage articles and their tags in a CMS. Map allows us to store and access articles efficiently using unique identifiers, while Set ensures that each tag is unique within an article. This combination offers a robust solution for handling content and its associated metadata, making your CMS more efficient and easier to maintain.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Understanding the Fetch API: The Future of Network Requests in Web Development</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Tue, 20 Aug 2024 06:34:49 +0000</pubDate>
      <link>https://dev.to/code_passion/understanding-the-fetch-api-the-future-of-network-requests-in-web-development-5191</link>
      <guid>https://dev.to/code_passion/understanding-the-fetch-api-the-future-of-network-requests-in-web-development-5191</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/javascript-fetch-api-guide/" rel="noopener noreferrer"&gt;The Fetch API&lt;/a&gt; represents a major evolution in how web applications interact with servers and retrieve content over the network. Introduced as a modern alternative to the XMLHttpRequest (XHR), the Fetch API offers more power, flexibility, and simplicity for developers. With its integration into modern browsers, Fetch has become a crucial tool in building contemporary web applications, enabling more natural and efficient handling of asynchronous operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the Fetch API?&lt;/strong&gt;&lt;br&gt;
The Fetch API is a JavaScript interface that simplifies sending HTTP requests and handling network responses. Unlike the older XMLHttpRequest, which was notorious for its complexity and clunky syntax, Fetch provides a streamlined interface that seamlessly integrates with JavaScript’s Promise API. This integration not only makes it easier to manage asynchronous operations but also improves code readability and maintainability, making your codebase cleaner and more manageable.&lt;/p&gt;

&lt;p&gt;At its core, Fetch is built around the fetch() function, a global function available in modern browsers that sends a network request. This function returns a Promise that resolves to a Response object, providing developers with easy access to the response data, headers, and status. This allows for a more intuitive and organized approach to handling the outcomes of network requests. (&lt;a href="https://skillivo.in/javascript-fetch-api-guide/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Syntax&lt;/strong&gt;&lt;br&gt;
The Fetch API revolves around the fetch() function, which is designed to be both simple and powerful. The function is used to initiate network requests and comes with two primary arguments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;URL: The URL string of the resource you want to fetch.&lt;/li&gt;
&lt;li&gt;Options (Optional): An object containing various settings or configurations for the request, such as the HTTP method, headers, body content, and mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Structure of a Simple Fetch Call&lt;/strong&gt;&lt;br&gt;
A basic fetch call is straightforward and looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch(url)
  .then(response =&amp;gt; {
    // Handle the response here
  })
  .catch(error =&amp;gt; {
    // Handle any errors here
  });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;url is the address of the resource to be fetched.&lt;/li&gt;
&lt;li&gt;The then() method handles the Promise resolved by the Fetch API, providing the Response object.&lt;/li&gt;
&lt;li&gt;The catch() method deals with any errors that may occur during the request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example of a Basic Fetch Request&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('https://api.example.com/data')
  .then(response =&amp;gt; {
    console.log(response);
  })
  .catch(error =&amp;gt; {
    console.error('Error:', error);
  });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example demonstrates how a simple Fetch request is made, with the response logged to the console upon success and errors handled gracefully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Fetch?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Using Fetch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Promises:&lt;/strong&gt; One of the most significant advantages of Fetch is its use of Promises. Promises provide a cleaner and more manageable way to handle asynchronous tasks compared to the callback-based approach of XHR. With Promises, you can chain .then() methods for handling successful responses and .catch() methods for managing errors, resulting in code that is more readable and easier to debug.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('https://api.example.com/data')
  .then(response =&amp;gt; response.json())
  .then(data =&amp;gt; console.log(data))
  .catch(error =&amp;gt; console.error('Error:', error));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Additionally, the Fetch API pairs excellently with async/await syntax, making asynchronous code even more straightforward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example using async/await:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function fetchData() {
  try {
    let response = await fetch('https://api.example.com/data');
    let data = await response.json();
    console.log(data);
  } catch (error) {
    console.error('Error:', error);
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cleaner Syntax:&lt;/strong&gt; Fetch offers a modern and less verbose syntax compared to XHR. The configuration object passed to fetch() makes it easy to set request parameters like the HTTP method, headers, and body content, leading to cleaner and more maintainable code.(&lt;a href="https://skillivo.in/javascript-fetch-api-guide/" rel="noopener noreferrer"&gt;Read full article&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('https://api.example.com/data', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ key: 'value' })
})
  .then(response =&amp;gt; response.json())
  .then(data =&amp;gt; console.log(data))
  .catch(error =&amp;gt; console.error('Error:', error));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Stream Handling:&lt;/strong&gt; Fetch supports response streaming, which allows developers to handle large amounts of data more efficiently. While XHR could struggle with large responses, leading to performance issues or requiring additional handling for processing in chunks, Fetch’s Response object provides methods like .body.getReader() to read data in chunks. This is particularly useful for streaming and managing large data sets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('https://api.example.com/large-data')
  .then(response =&amp;gt; {
    const reader = response.body.getReader();
    let decoder = new TextDecoder();
    let result = '';

    return reader.read().then(function processText({ done, value }) {
      if (done) {
        console.log('Stream finished.');
        return result;
      }
      result += decoder.decode(value, { stream: true });
      return reader.read().then(processText);
    });
  })
  .then(data =&amp;gt; console.log(data))
  .catch(error =&amp;gt; console.error('Error:', error));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read Full Article- &lt;a href="https://skillivo.in/javascript-fetch-api-guide/" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The Fetch API has revolutionized how developers make network requests in web applications. With its cleaner syntax, seamless integration with Promises, and support for modern features like async/await and streaming, Fetch offers a powerful and flexible tool for handling HTTP requests. As web development continues to evolve, the Fetch API will remain a critical component in building efficient, maintainable, and modern web applications.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>A Beginner's Guide to JavaScript</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Fri, 16 Aug 2024 09:54:42 +0000</pubDate>
      <link>https://dev.to/code_passion/a-beginners-guide-to-javascript-bk0</link>
      <guid>https://dev.to/code_passion/a-beginners-guide-to-javascript-bk0</guid>
      <description>&lt;p&gt;JavaScript is a cornerstone of web development, powering the dynamic and interactive elements you encounter on nearly every website. From simple animations to complex web applications, JavaScript plays a vital role. If you're aiming for a career in web development, mastering JavaScript is not just beneficial—it's essential.&lt;/p&gt;

&lt;p&gt;JavaScript stands out for its versatility, supporting various programming paradigms like procedural, object-oriented, and functional programming. It can run on both browsers and servers through environments like Node.js, making it a powerful full-stack language. Thanks to its seamless integration with HTML and CSS and universal browser support, JavaScript has become the most popular language for web development. (&lt;a href="https://skillivo.in/mastering-javascript-fundamentals-syntax-variables-comments-2/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding JavaScript Syntax&lt;/strong&gt;&lt;br&gt;
To effectively code in JavaScript, grasping its syntax is crucial. Syntax in programming is similar to grammar in human languages—it dictates the rules and structures that must be followed to create and interpret code correctly. This section delves into what syntax means, how JavaScript syntax forms meaningful instructions, the basic structure of a JavaScript program, the role of semicolons, and the importance of case sensitivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Syntax in Programming?&lt;/strong&gt;&lt;br&gt;
Syntax in programming can be compared to grammar in spoken languages. Just as sentences in English must adhere to grammatical rules to convey meaning, code in programming languages must follow syntactical rules to function correctly. These rules guide how keywords, operators, variables, and symbols are arranged to form valid instructions.&lt;/p&gt;

&lt;p&gt;For instance, in English, the sentence "The cat sits on the mat" follows a subject-verb-object structure. If rearranged to "Sits cat the mat on," it loses meaning. Similarly, in JavaScript, the order in which code is written is critical. Misplacing a semicolon, omitting a keyword, or incorrectly nesting code can lead to syntax errors, rendering the code unreadable to the interpreter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert("Hello, World!");

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Storing Data in JavaScript with Variables&lt;/strong&gt;&lt;br&gt;
Variables in JavaScript serve as containers for storing data that your program will use. For example, you can store a user's name, a calculation result, or even an entire list of items in a variable. Once stored, the data can be referenced, updated, or manipulated throughout your code. (&lt;a href="https://skillivo.in/mastering-javascript-fundamentals-syntax-variables-comments-2/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let userName = "Alice";
let userAge = 25;

console.log("User Name:", userName); // Outputs: User Name: Alice
console.log("User Age:", userAge);   // Outputs: User Age: 25

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;var, let, and const: Understanding the Differences&lt;br&gt;
Scope:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;var: Function-scoped or globally scoped.&lt;/li&gt;
&lt;li&gt;let and const: Block-scoped.
Consider the following examples to see how scope affects variable behavior:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function testVar() {
    var x = 1;
    if (true) {
        var x = 2;  // Same variable!
        console.log(x);  // Outputs: 2
    }
    console.log(x);  // Outputs: 2
}

function testLet() {
    let x = 1;
    if (true) {
        let x = 2;  // Different variable
        console.log(x);  // Outputs: 2
    }
    console.log(x);  // Outputs: 1
}

testVar();
testLet();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the testVar function, the x variable inside the if block is the same as the x outside the block, due to var being function-scoped. On the other hand, the testLet function shows that let is block-scoped, meaning the x inside the if block is distinct from the x outside it.&lt;/p&gt;

&lt;p&gt;Read Full Article- &lt;a href="https://skillivo.in/mastering-javascript-fundamentals-syntax-variables-comments-2/" rel="noopener noreferrer"&gt;Mastering JavaScript Fundamentals: Syntax, Variables, and Comments&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Creating a Translate Hover Effect with HTML and CSS</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Fri, 09 Aug 2024 06:19:34 +0000</pubDate>
      <link>https://dev.to/code_passion/creating-a-translate-hover-effect-with-html-and-css-49ad</link>
      <guid>https://dev.to/code_passion/creating-a-translate-hover-effect-with-html-and-css-49ad</guid>
      <description>&lt;p&gt;In modern web design, creating visually engaging and interactive experiences is key to capturing user interest. One of the most effective ways to achieve this is through hover effects, which provide immediate feedback when a user interacts with elements on a page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Translate Hover Effect?&lt;/strong&gt;&lt;br&gt;
A &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;translate hover effect&lt;/a&gt; involves shifting an element along the X or Y axis when a user hovers over it with their mouse. This effect gives the illusion that the element is moving or floating, providing a more interactive and responsive user experience.&lt;/p&gt;

&lt;p&gt;Output-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwaqqu2entoeelmo4i3k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwaqqu2entoeelmo4i3k.gif" alt="Creating a Translate Hover Effect with HTML and CSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML-&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Translate Hover Effect&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div class="image-container"&amp;gt;
    &amp;lt;img src="image1.jpg" alt="Image 1" class="hover-image"&amp;gt;
    &amp;lt;img src="image2.jpg" alt="Image 2" class="hover-image"&amp;gt;
    &amp;lt;img src="image3.jpg" alt="Image 3" class="hover-image"&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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;

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.image-container {
  display: flex;
  gap: 20px;
  max-width: 1000px;
    flex-wrap:wrap;
}

.hover-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.hover-image:hover {
  transform: translateY(-10px);
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;display: flex;: The display: flex; property is used to create a flexible container. This attribute makes it easy to create a flexible and responsive layout structure without requiring floats or positioning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits of display: flex; :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy alignment options for horizontal and vertical items.&lt;/li&gt;
&lt;li&gt;Customize the visual order of things without affecting the HTML structure.&lt;/li&gt;
&lt;li&gt;Flexibility: Items can adjust to fit the available area, resulting in a responsive design.&lt;/li&gt;
&lt;li&gt;Efficiently arrange space within items along main axis (row or column).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;flex-wrap: wrap;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The flex-wrap: wrap; property, used in conjunction with display: flex;, controls how flex objects wrap across several lines. (&lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits of flex-wrap: wrap;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Responsive Design: Allows objects to migrate to the next line when there is insufficient space on an one line, essential for responsive layouts.&lt;/li&gt;
&lt;li&gt;Better Utilization of Space: Allowing things to wrap improves space utilisation and prevents overflow issues.&lt;/li&gt;
&lt;li&gt;Consistency: It contributes to a uniform and organised layout regardless of screen size.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read Full Article - &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Click here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The translate hover effect is a great tool to have in your web design toolkit. It’s simple to implement, lightweight, and can add a professional touch to your website. Whether you’re showcasing images, buttons, or other interactive elements, this effect helps engage users and enhance the overall user experience.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating a Draggable Element Using HTML, CSS, and JavaScript</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Tue, 06 Aug 2024 05:23:03 +0000</pubDate>
      <link>https://dev.to/code_passion/creating-a-draggable-element-using-html-css-and-javascript-54g7</link>
      <guid>https://dev.to/code_passion/creating-a-draggable-element-using-html-css-and-javascript-54g7</guid>
      <description>&lt;p&gt;In modern web development, interactivity is key to engaging users and creating a dynamic user experience. One way to add interactivity is by making elements draggable. In this post, we will explore how to create a &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;draggable element&lt;/a&gt; using HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh23zy3ipqs3npixp9lk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh23zy3ipqs3npixp9lk.gif" alt="draggable element"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML Structure&lt;/strong&gt;&lt;br&gt;
Let's start with the basic HTML structure. We will create a simple div element that we want to make draggable. Here's the code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="UTF-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
&amp;lt;title&amp;gt;Draggable Element&amp;lt;/title&amp;gt;
&amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div class="draggable" id="draggableElement"&amp;gt;Drag me!&amp;lt;/div&amp;gt;
&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this code, we have a div with the class draggable and an ID of draggableElement. This will be the element that we make draggable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styling the Draggable Element with CSS&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

.draggable {
    position: absolute;
    cursor: grab;
    width: 100px;
    height: 100px;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    line-height: 100px;
    border-radius: 8px;
    user-select: none;
}

.draggable.dragging {
    cursor: grabbing;
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this CSS, we define the .draggable class to style our element. We set its position to absolute so that we can move it freely around the page. The cursor property is set to grab to indicate that the element is draggable. We also define the width, height, background color, text color, text alignment, and line height to center the text vertically and horizontally. The border-radius is added for rounded corners, and user-select: none is used to prevent text selection while dragging. &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding Interactivity with JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

let draggableElement = document.getElementById('draggableElement');
let offsetX, offsetY;

draggableElement.addEventListener('mousedown', startDragging);
draggableElement.addEventListener('mouseup', stopDragging);

function startDragging(e) {
    e.preventDefault();
    offsetX = e.clientX - draggableElement.getBoundingClientRect().left;
    offsetY = e.clientY - draggableElement.getBoundingClientRect().top;
    draggableElement.classList.add('dragging');
    document.addEventListener('mousemove', dragElement);
}

function dragElement(e) {
    e.preventDefault();
    let x = e.clientX - offsetX;
    let y = e.clientY - offsetY;
    draggableElement.style.left = x + 'px';
    draggableElement.style.top = y + 'px';
}

function stopDragging() {
    draggableElement.classList.remove('dragging');
    document.removeEventListener('mousemove', dragElement);
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Start Dragging:&lt;/strong&gt; The startDragging function is triggered when the user presses the mouse button down on the element. This function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prevents the default behavior of the event using e.preventDefault().&lt;/li&gt;
&lt;li&gt;Calculates the offsets by subtracting the element's top-left corner position from the mouse position.&lt;/li&gt;
&lt;li&gt;Adds the dragging class to change the cursor.&lt;/li&gt;
&lt;li&gt;Adds an event listener for the mousemove event to the document, which will trigger the dragElement function.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Drag Element:&lt;/strong&gt; The dragElement function is triggered when the mouse moves. This function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prevents the default behavior of the event.&lt;/li&gt;
&lt;li&gt;Calculates the new position of the element based on the mouse position and the offsets.&lt;/li&gt;
&lt;li&gt;Updates the left and top CSS properties of the element to move it to the new position.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Stop Dragging:&lt;/strong&gt; The stopDragging function is triggered when the user releases the mouse button. This function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Removes the dragging class to revert the cursor back to its original state.&lt;/li&gt;
&lt;li&gt;Removes the mousemove event listener from the document to stop the dragging. &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;conclusion:&lt;/strong&gt;&lt;br&gt;
By understanding the basics of event listeners and DOM manipulation, we can add interactivity to our web projects, enhancing the user experience.&lt;/p&gt;

&lt;p&gt;Read full article- &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;click here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating a Slide-In Navigation Menu with HTML, CSS, and JavaScript</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Mon, 05 Aug 2024 04:55:22 +0000</pubDate>
      <link>https://dev.to/code_passion/creating-a-slide-in-navigation-menu-with-html-css-and-javascript-4gkm</link>
      <guid>https://dev.to/code_passion/creating-a-slide-in-navigation-menu-with-html-css-and-javascript-4gkm</guid>
      <description>&lt;p&gt;In modern web design, navigation menus are a crucial component that greatly enhance user experience. One trendy and user-friendly design is the slide-in navigation menu. In this blog, we will walk through the creation of a slide-in navigation menu using HTML, CSS, and JavaScript. This tutorial is ideal for web developers looking to enhance their websites with a sleek and functional navigation system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transition property in css&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;The transition property&lt;/a&gt; in CSS is used to create smooth animations when CSS properties change from one state to another. It allows you to specify which properties should be animated, the duration of the animation, the timing function (how the animation progresses), and the delay before the animation starts. Here's a detailed breakdown of the transition property and how it's used:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

transition: property duration timing-function delay;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Components&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;property: This specifies the CSS property you want to animate. You can animate almost any CSS property, such as width, height, background-color, opacity, etc. You can also use the keyword all to animate all the properties that can be transitioned.&lt;/li&gt;
&lt;li&gt; duration: This defines how long the transition should take. It's specified in seconds (e.g., 1s for 1 second) or milliseconds (e.g., 500ms for 500 milliseconds).&lt;/li&gt;
&lt;li&gt;timing-function: This describes how the intermediate values of the transition are calculated. Common values include:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;linear: The transition is even from start to finish.&lt;/li&gt;
&lt;li&gt;ease: The transition starts slowly, then speeds up, and then slows down again (default value).&lt;/li&gt;
&lt;li&gt;ease-in: The transition starts slowly.&lt;/li&gt;
&lt;li&gt;ease-out: The transition ends slowly.&lt;/li&gt;
&lt;li&gt;ease-in-out: The transition starts and ends slowly.&lt;/li&gt;
&lt;li&gt;You can also define custom timing functions using the cubic-bezier function.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;delay: This defines how long to wait before starting the transition. Like the duration, it's specified in seconds or milliseconds. The default value is 0s (no delay).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First, let's begin with the HTML structure. This will define the elements needed for our slide-in menu.(&lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bywzaw9hu727ksuqqi2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bywzaw9hu727ksuqqi2.gif" alt="Creating a Slide-In Navigation Menu with HTML, CSS, and JavaScript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="UTF-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
&amp;lt;title&amp;gt;Slide-in Navigation Menu&amp;lt;/title&amp;gt;
&amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;!-- Menu Toggle Button --&amp;gt;
&amp;lt;button onclick="toggleMenu()"&amp;gt;Toggle Menu&amp;lt;/button&amp;gt;

&amp;lt;!-- Navigation Menu --&amp;gt;
&amp;lt;div class="menu" id="menu"&amp;gt;
    &amp;lt;a href="#" class="menu-item"&amp;gt;Home&amp;lt;/a&amp;gt;
    &amp;lt;a href="#" class="menu-item"&amp;gt;About&amp;lt;/a&amp;gt;
    &amp;lt;a href="#" class="menu-item"&amp;gt;Services&amp;lt;/a&amp;gt;
    &amp;lt;a href="#" class="menu-item"&amp;gt;Contact&amp;lt;/a&amp;gt;
    &amp;lt;a href="#" class="menu-item" onclick="closeMenu()"&amp;gt;Close&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, let's add the CSS to style the menu and control its sliding behavior. Create a file named styles.css and add the following styles:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

.menu {
    position: fixed;
    top: 0;
    left: -250px; /* Initially off-screen */
    height: 100%;
    width: 250px; /* Adjust as needed */
    background-color: #ee3646;
    transition: left 0.3s ease; /* Only transition the left property */
    z-index: 1000; /* Ensure it's above other content */
}

.menu.active {
    left: 0; /* Slide the menu into view */
}

/* Example styling for menu items */
.menu-item {
    padding: 10px;
    color: #fff;
    text-decoration: none;
    display: block;
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now, let's add JavaScript to handle the menu's sliding behavior. Create a file named script.js and add the following code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function toggleMenu() {
    const menu = document.getElementById('menu');
    menu.classList.toggle('active');
}

function closeMenu() {
    const menu = document.getElementById('menu');
    menu.classList.remove('active');
}



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here's what the JavaScript does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;toggleMenu(): This function toggles the active class on the menu, causing it to slide in and out of view.&lt;/li&gt;
&lt;li&gt;closeMenu(): This function removes the active class from the menu, ensuring it slides out of view when the close link is clicked.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Putting It All Together&lt;/strong&gt;&lt;br&gt;
To see the &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;slide-in navigation menu&lt;/a&gt; in action, ensure all three files (index.html, styles.css, script.js) are in the same directory and open index.html in a web browser. Clicking the "Toggle Menu" button should smoothly slide the menu into view from the left. Clicking the "Close" link within the menu should slide it back out of view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Creating a slide-in navigation menu with HTML, CSS, and JavaScript is a straightforward process that can significantly enhance the user experience on your website. By experimenting with different styles, animations, and functionalities, you can create a unique and user-friendly navigation to your website's needs.&lt;/p&gt;

&lt;p&gt;Read the full article- &lt;a href="https://skillivo.in/css-translate-property-guide/" rel="noopener noreferrer"&gt;Mastering the Art of CSS Translate Property &lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Web Storage API Essentials</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Wed, 31 Jul 2024 06:25:54 +0000</pubDate>
      <link>https://dev.to/code_passion/web-storage-api-essentials-4io8</link>
      <guid>https://dev.to/code_passion/web-storage-api-essentials-4io8</guid>
      <description>&lt;p&gt;In today’s web development market, effective client-side data management is critical for providing seamless user experiences. Web Storage API gives developers a simple way to store data locally within the user’s browser. Understanding the online Storage API can significantly improve your development process, whether you’re creating a simple online application or a complex single-page application (SPA). We’ll cover all you need to know to get started with Web Storage API in this extensive guide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Web Storage API&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/web-storage-api-essentials/" rel="noopener noreferrer"&gt;Web Storage API&lt;/a&gt; is a vital component of modern web development, providing developers with a simple yet powerful method for storing data locally within the user’s browser. It has two main methods for saving data: sessionStorage and localStorage. In this section, we’ll explore deeper into the Web Storage API’s capabilities, benefits, and best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Concepts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sessionStorage&lt;/strong&gt;&lt;br&gt;
Session storage is intended to hold data for the duration of a page session. This means that data is retained as long as the browser tab or window is open and removed when it is closed. It allows you to keep state information across numerous sites in a single browsing session without relying on server-side storage or cookies. (&lt;a href="https://skillivo.in/web-storage-api-essentials/" rel="noopener noreferrer"&gt;Read Full Article&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;localStorage&lt;/strong&gt;&lt;br&gt;
LocalStorage, on the other hand, provides permanent storage that remains even when the browser is closed and reopened. Data stored with localStorage is accessible between browser sessions, making it ideal for cases requiring long-term storage of user preferences or settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key-Value Pairs&lt;/strong&gt;&lt;br&gt;
Both sessionStorage and localStorage work on a key-value basis. This implies that data is stored and accessed using unique keys, allowing developers to organize and access data more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Differentiation guide – Local Storage, Session Storage, and Cookies&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Persistence&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local storage data is retained permanently unless erased by the user or programmatically.&lt;/li&gt;
&lt;li&gt;Session storage data is only stored for the life of the page session and is removed when the tab or window is closed.&lt;/li&gt;
&lt;li&gt;Cookies can have different lifespans, including session cookies, which expire when the browser session ends, and persistent cookies, which have expiration dates defined by the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage Capacity&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Local storage has a bigger storage capacity than session storage and cookies, usually around 5-10MB per origin.&lt;/li&gt;
&lt;li&gt; Session storage often has a smaller storage capacity than local storage.&lt;/li&gt;
&lt;li&gt; Cookies have a limited storage capacity, typically around 4KB per cookie. (&lt;a href="https://skillivo.in/web-storage-api-essentials/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local storage is ideal for storing long-term data such user preferences, settings, and cached resources.&lt;/li&gt;
&lt;li&gt;Session storage is ideal for storing short-term data or session-specific information that should only be available during the current session.&lt;/li&gt;
&lt;li&gt;Cookies are often used to preserve session state, authenticate users, track user behavior, and personalize content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Transmission to Server&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data stored in local and session storage is not automatically sent to the server with each HTTP request.&lt;/li&gt;
&lt;li&gt;Cookies, including cookies specific to that domain, are automatically sent to the server with each HTTP request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Client-Side vs. Server-Side&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local storage and session storage take place exclusively on the client side of the user’s browser.&lt;/li&gt;
&lt;li&gt;Cookies are exchanged between a web application’s client and server components, allowing server-side processing and manipulation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The online Storage API is an effective tool for client-side data storage in online applications. Understanding its features and best practices will enable you to successfully improve the performance and user experience of your applications. Whether you’re creating a small-scale website or a large-scale web application, Web Storage API provides a straightforward yet robust solution for managing client-side data. Begin implementing it into your projects immediately to open up new possibilities for web development. (&lt;a href="https://skillivo.in/web-storage-api-essentials/" rel="noopener noreferrer"&gt;Read Full Article&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Read More Article-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://skillivo.in/advanced-local-storage-techniques/" rel="noopener noreferrer"&gt;- Advanced Local Storage Techniques&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Mastering Local Storage in Web Development</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Wed, 24 Jul 2024 05:54:52 +0000</pubDate>
      <link>https://dev.to/code_passion/mastering-local-storage-in-web-development-fl5</link>
      <guid>https://dev.to/code_passion/mastering-local-storage-in-web-development-fl5</guid>
      <description>&lt;p&gt;&lt;a href="https://skillivo.in/local-storage-in-web-development-practical-examples/" rel="noopener noreferrer"&gt;Local storage&lt;/a&gt; is a useful web development tool that enables developers to save data within the user’s browser. In this article, we’ll look at different features of local storage, starting with beginner-level examples and continuing to more complex techniques. By the end of this guide, you will have a basic understanding of how to successfully use local storage in web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginner level Examples on Local storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Storing User Preferences :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;User Preferences&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;label for="theme"&amp;gt;Choose a theme:&amp;lt;/label&amp;gt;
    &amp;lt;select id="theme"&amp;gt;
        &amp;lt;option value="light"&amp;gt;Light&amp;lt;/option&amp;gt;
        &amp;lt;option value="dark"&amp;gt;Dark&amp;lt;/option&amp;gt;
        &amp;lt;option value="medium"&amp;gt;Medium&amp;lt;/option&amp;gt;
    &amp;lt;/select&amp;gt;
    &amp;lt;button onclick="savePreference()"&amp;gt;Save Preference&amp;lt;/button&amp;gt;

    &amp;lt;script&amp;gt;
        function savePreference() {
            const selectedTheme = document.getElementById('theme').value;
            localStorage.setItem('theme', selectedTheme);
            console.log('Preference saved:', selectedTheme);
            alert('Preference saved!' + " " + selectedTheme);
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the user selects a theme and hits the “Save Preference” button, this code logs the theme to the console. To read this log, open the browser’s developer tools (typically by pressing F12 or right-clicking on the page and selecting “Inspect”) and go to the console tab.(&lt;a href="https://skillivo.in/local-storage-in-web-development-practical-examples/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Remembering User Input :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Remember User Input&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;input type="text" id="userInput"&amp;gt;
    &amp;lt;button onclick="saveInput()"&amp;gt;Save Input&amp;lt;/button&amp;gt;

    &amp;lt;script&amp;gt;
        function saveInput() {
            const userInput = document.getElementById('userInput').value;
            localStorage.setItem('savedInput', userInput);
            console.log(userInput + " " + 'saved !');
            alert('Input saved!');
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This HTML example generates a simple web page that allows users to enter text into a text field and save it to their browser’s local storage.&lt;/p&gt;

&lt;p&gt;When a user types text into the input box and hits the “Save Input” button, the text is saved in the browser’s local storage. This implies that even if users refresh the website or close and reopen the browser, the saved input will remain accessible. The console log and alert notify the user that their input has been successfully saved. (&lt;a href="https://skillivo.in/local-storage-in-web-development-practical-examples/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Shopping Cart Persistence :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Shopping Cart&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Shopping Cart&amp;lt;/h1&amp;gt;
    &amp;lt;ul id="cartItems"&amp;gt;&amp;lt;/ul&amp;gt;

    &amp;lt;script&amp;gt;
        document.addEventListener('DOMContentLoaded', () =&amp;gt; {
            const savedCart = JSON.parse(localStorage.getItem('cart')) || [];
            const cartItemsElement = document.getElementById('cartItems');

            savedCart.forEach(item =&amp;gt; {
                const li = document.createElement('li');
                li.textContent = item;
                cartItemsElement.appendChild(li);
            });
            console.log('Saved cart items:', savedCart);
        });

        function addToCart(item) {
            const savedCart = JSON.parse(localStorage.getItem('cart')) || [];
            savedCart.push(item);
            localStorage.setItem('cart', JSON.stringify(savedCart));
            console.log('Added', item, 'to cart');
            location.reload(); // Refresh the page to reflect changes
        }
    &amp;lt;/script&amp;gt;

    &amp;lt;button onclick="addToCart('Item 1')"&amp;gt;Add Item 1 to Cart&amp;lt;/button&amp;gt;
    &amp;lt;button onclick="addToCart('Item 2')"&amp;gt;Add Item 2 to Cart&amp;lt;/button&amp;gt;
    &amp;lt;button onclick="addToCart('Item 3')"&amp;gt;Add Item 3 to Cart&amp;lt;/button&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example shows how to save a shopping cart using local storage. Items added to the cart are saved as an array in local storage under the key ‘cart’. When the page loads, the saved cart items are pulled from local storage and shown.&lt;/p&gt;

&lt;p&gt;When you click one of the “Add Item X to Cart” buttons, the appropriate item is added to the shopping cart, and the updated cart contents are displayed in the console. To inspect these logs, open the browser’s developer tools (typically by pressing F12 or right-clicking on the page and selecting “Inspect”) and go to the console tab.&lt;/p&gt;

&lt;p&gt;You can also view the local storage directly through the browser’s developer tools. Most browsers allow you to do this by right-clicking on the page, selecting “Inspect” to get the developer tools, and then navigating to the “Application” or “Storage” tab. From there, expand the “Local Storage” section to view the website’s key-value pairs. In this example, the key “cart” includes the JSON string representing the saved cart items.&lt;br&gt;
Read full article - &lt;a href="https://skillivo.in/local-storage-in-web-development-practical-examples/" rel="noopener noreferrer"&gt;Mastering Local Storage in Web Development: 8 Practical Examples, From Novice to Expert!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Learn Json- &lt;a href="https://skillivo.in/json-tutorial/" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Introduction to Virtual and Augmented Reality (VR/AR)</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Thu, 18 Jul 2024 06:27:38 +0000</pubDate>
      <link>https://dev.to/code_passion/introduction-to-virtual-and-augmented-reality-vrar-ab9</link>
      <guid>https://dev.to/code_passion/introduction-to-virtual-and-augmented-reality-vrar-ab9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
In today’s digital age, reality is no longer limited to what we can see and touch. Virtual and Augmented Reality (VR/AR) technology have transformed how we interact with our surroundings, blurring the distinction between the real and the virtual. From immersive gaming experiences to practical applications in fields such as healthcare and education, VR/AR has emerged as a transformational force with limitless possibilities. In this article, we’ll go on a voyage to discover the fascinating world of VR/AR, including its differences, applications, and future potential. (&lt;a href="https://skillivo.in/introduction-to-virtual-and-augmented-reality-vr-ar/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Virtual Reality (VR)&lt;/strong&gt;&lt;br&gt;
Virtual Reality (VR) is one of the most fascinating and revolutionary technological advancements of the last few years, within the rapidly developing field of technology. Virtual reality (VR) surpasses the confines of physical reality by submerging users in virtual worlds, providing countless chances for creation, interaction, and discovery. We delve into the complexities of virtual reality (VR) in this exploration, revealing its basic concepts, technological components, applications, and the significant influence it has on several facets of our life. (&lt;a href="https://skillivo.in/introduction-to-virtual-and-augmented-reality-vr-ar/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Augmented Reality (AR)&lt;/strong&gt;&lt;br&gt;
Augmented Reality (AR) develops as a compelling and disruptive technological innovation, changing how we view and interact with our surroundings. Unlike Virtual Reality (VR), which immerses users totally in digital settings, Augmented Reality (AR) superimposes digital content onto the actual world, seamlessly mixing virtual and physical aspects. In this research, we will delve into the complexities of augmented reality, examining its basic concepts, technological components, applications, and the significant impact it has on numerous facets of our life.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the Differences Between VR and AR&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Immersion vs. Augmentation:&lt;/strong&gt; Virtual reality and augmented reality differ in how they modify our view of reality. Virtual reality immerses users in totally digital worlds, with the physical world replaced by a simulated one. AR, on the other hand, improves our experience of reality by superimposing digital content over the real world, supplementing our surrounds with virtual features while keeping us aware of our physical environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Interaction Paradigms:&lt;/strong&gt; VR and AR have different interaction paradigms and user experiences. In VR, users often interact with virtual environments via handheld controllers or motion-tracking devices, which allow them to manipulate things, explore the virtual realm, and interact with virtual characters or elements. In AR, engagement is frequently assisted via touch gestures, voice instructions, or natural interactions with physical objects in the real world, allowing users to interact with virtual material while keeping aware of their surroundings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Use Cases and Applications:&lt;/strong&gt; VR and AR provide diverse options for creativity and discovery. VR has uses in gaming and entertainment, training and simulation, healthcare, and architecture and design, providing immersive experiences that transport users to virtual worlds while facilitating hands-on learning and training. AR, on the other hand, has applications in marketing and advertising, education and training, navigation and wayfinding, and industrial and enterprise applications, providing interactive and contextual experiences that improve our daily interactions with the world around us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Hardware Requirements:&lt;/strong&gt; VR and AR have distinct hardware and form factors. VR experiences often necessitate the use of dedicated VR headsets or goggles, which include displays, lenses, and motion sensors for immersing users in virtual surroundings. AR experiences, on the other hand, are accessible via a range of devices, including smartphones, tablets, and AR glasses, which use built-in cameras and sensors to overlay digital material onto the user’s perspective of the actual world.&lt;br&gt;
(&lt;a href="https://skillivo.in/introduction-to-virtual-and-augmented-reality-vr-ar/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In conclusion, &lt;a href="https://skillivo.in/introduction-to-virtual-and-augmented-reality-vr-ar/" rel="noopener noreferrer"&gt;Virtual Reality (VR)&lt;/a&gt; and Augmented Reality (AR) are two unique but complementary techniques to changing our perspective of reality. While VR immerses users in totally digital surroundings, AR improves our impression of reality by superimposing digital content over the actual world. Regardless of their differences, VR and AR provide unique opportunities for innovation and discovery, revolutionizing how we learn, work, play, and interact with our surroundings. As technology advances, the lines between VR and AR blur, giving rise to new paradigms like Mixed Reality (MR), which combines components of each to create immersive experiences that push the limits of what is possible.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering Pattern Programs in C Programming</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Tue, 16 Jul 2024 05:47:38 +0000</pubDate>
      <link>https://dev.to/code_passion/mastering-pattern-programs-in-c-programming-2434</link>
      <guid>https://dev.to/code_passion/mastering-pattern-programs-in-c-programming-2434</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction of c Programming Patterns:&lt;/strong&gt;&lt;br&gt;
A fascinating introduction to c programming logic and aesthetics is provided by pattern programs. These programs bring life to the console by generating beautiful patterns that change from basic shapes to complex symmetrical masterpieces, all created through the manipulation of loops and conditional statements. This blog post takes you on a fascinating tour through the fascinating realm of C programming language pattern programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Importance of Pattern Programs:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pattern programs are a great resource for strengthening fundamental programming principles and problem-solving abilities.&lt;/li&gt;
&lt;li&gt;They offer an accessible way to comprehend conditional expressions, loop structures, and algorithmic design’s iterative process.&lt;/li&gt;
&lt;li&gt;Being proficient with pattern programming encourages programmers to approach complex issues critically and analytically, which stimulates creativity and inventiveness.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Examples-&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Square Pattern in c Programming:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

    int main() {
        int n = 5, c = 5;
        for (int i = 0; i &amp;lt; n; i++) {
            for (int j = 0; j &amp;lt; c; j++) {
                printf("* ");
            }
            printf("\n");
        }
        return 0;
    }

/*
Output :

* * * * * 
* * * * * 
* * * * * 
* * * * * 
* * * * *

*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://skillivo.in/pattern-programs-in-c-programming/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt; Pattern Programs in C Programming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Triangle Pattern in c Programming:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

    int main() {
        int n = 5;
        for (int i = 1; i &amp;lt;= n; i++) {
            for (int j = 1; j &amp;lt;= i; j++) {
                printf("* ");
            }
            printf("\n");
        }
        return 0;
    }

/*

Output :
* 
* * 
* * * 
* * * * 
* * * * *

*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://skillivo.in/pattern-programs-in-c-programming/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt; Pattern Programs in C Programming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hourglass Pattern in c Programming:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt; 
int main() 
{ 
    int n = 5,i,j,k; 
  int c;
    // this loops for rows
    for ( i = 0; i &amp;lt; 2 * n - 1; i++)
 {                 
        if (i &amp;lt; n)
        { 
            c = 2 * i + 1; 
        } 
        else { 
            c = 2 * (2 * n - i) - 3; 
        } 

        for (j = 0; j &amp;lt; c; j++) { 
            printf(" ");         // print leading spaces 

        } 

           for (k = 0; k &amp;lt; 2 * n - c; k++) 
          { 
            printf("* ");  // print star * 

          } 
        printf("\n"); 
    } 
    return 0; 
}

/*

Output:

* * * * * * * * * 
   * * * * * * * 
     * * * * * 
       * * * 
         * 
       * * * 
     * * * * * 
   * * * * * * * 
 * * * * * * * * *


*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://skillivo.in/pattern-programs-in-c-programming/" rel="noopener noreferrer"&gt;Read More&lt;/a&gt; Pattern Programs in C Programming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Half Diamond in c Programming:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;  

int main()  
{  
    int n,m=1; 
    int i,j;
    printf("Enter the number of columns : ");  
    scanf("%d",&amp;amp;n);  
for( i=1;i&amp;lt;=n;i++)  
{  
  for( j=1;j&amp;lt;=i;j++)  
  {  
    printf("* ");  
  }  
  printf("\n");  
}  
i=0;
j=0;
 for( i=n-1;i&amp;gt;=1;i--)  
 {  
   for( j=1;j&amp;lt;=i;j++)  
   {  
     printf("* ");  
   }  
   printf("\n");  
 }    

    return 0;  
}


/*
Output:

* 
* * 
* * * 
* * * * 
* * * * * 
* * * * 
* * * 
* * 
*


*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Discover more articles -&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;Mastering Loops and Conditional Statements in C Programming&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/pattern-programs-in-c-programming/" rel="noopener noreferrer"&gt;Pattern programs&lt;/a&gt; epitomize the fusion of artistry and logic within the realm of programming, offering a canvas for creative expression and algorithmic ingenuity. By mastering the art of pattern programming in C, aspiring developers can unlock new dimensions of problem-solving prowess and unleash their boundless imagination upon the digital landscape. So, let us embark on this exhilarating journey, where each line of code weaves a tapestry of beauty and intellect, illuminating the path to programming enlightenment.&lt;/p&gt;

</description>
      <category>c</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Mastering Loops and Conditional Statements in C Programming</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Sun, 14 Jul 2024 04:30:00 +0000</pubDate>
      <link>https://dev.to/code_passion/mastering-loops-and-conditional-statements-in-c-programming-3mke</link>
      <guid>https://dev.to/code_passion/mastering-loops-and-conditional-statements-in-c-programming-3mke</guid>
      <description>&lt;p&gt;&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;C Programming&lt;/a&gt; – For those who are new to programming, one of the essential languages is C. Since they are the foundation of most programs, understanding loops and conditional statements is essential. This blog post will discuss some standard loop and condition techniques in C programming that all newcomers should be familiar with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Conditional Statements and Loops in C Programming&lt;/strong&gt;&lt;br&gt;
Certain code blocks can be executed based on conditions thanks to conditional statements. If a condition is true, the if statement assesses it and then runs a block of code. You can check multiple criteria with the else if statement, and it also gives a default action in the event that none of the circumstances are met.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Positive number program&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

int main() {
 int num = 10;

if (num &amp;gt; 0) {
  printf("Number is positive.\n");
 } else if (num &amp;lt; 0) {
  printf("Number is negative.\n");
 } else {
 printf("Number is zero.\n");
 }
 return 0;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt; about positive number in c)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Reversing a Number&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

int RevNum(int num) {
    int R = 0;

    // Reversing the number
    while (num != 0) {
        int remainder = num % 10;
        R = R * 10 + remainder;
        num /= 10;
    }    
    return R;
}
int main() {
    int num;
    printf("Enter a number: ");
    scanf("%d", &amp;amp;num);
    printf("Reversed number: %d\n", RevNum(num));
    return 0;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt; about Reversing number in c)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Armstrong Number&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;math.h&amp;gt;

// Function to calculate the number of digits in a number
int countDigits(int num) {
    int count = 0;
    while (num != 0) {
        num /= 10;
        ++count;
    }
    return count;
}

// Function to check if a number is an Armstrong number
int isArmstrong(int num) {
    int No, remainder, result = 0, n = 0, power;

    No = num;

    // Count number of digits
    n = countDigits(num);

    // Calculate result
    while (No != 0) {
        remainder = No % 10;

        // Power of remainder with respect to the number of digits
        power = round(pow(remainder, n));
        result += power;
        No /= 10;
    }

    // Check if num is an Armstrong number
    if (result == num)
        return 1; // Armstrong number
    else
        return 0; // Not an Armstrong number
}


int main() {
    int num;

    printf("Enter a number: ");
    scanf("%d", &amp;amp;num);

    if (isArmstrong(num))
        printf("%d is an Armstrong number  =  ", num);
    else
        printf("%d is not an Armstrong number  =  ", num);

    return 0;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt; about Armstrong number in c)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Palindrome number&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
// Function to check if a number is palindrome or not
int P(int num) {
    int i = 0, no = num;
        // Reversing the number
    while (num != 0) {
        int remainder = num % 10;
        i = i * 10 + remainder;
        num /= 10;
    }    
    // Checking if the reversed number is equal to the original number
    if (no == i)
        return 1; // Palindrome no
    else
        return 0; // Not a palindrome
   end if
}
int main() 
{
    int num;
    printf("Enter a number: ");
    scanf("%d", &amp;amp;num);
    if (P(num))
        printf("%d palindrome no.\n", num);
    else
        printf("%d is not a palindrome no .\n", num);
 end if
    return 0;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://skillivo.in/c-programming-loops-conditional-statements/" rel="noopener noreferrer"&gt;Read more&lt;/a&gt; about Palindrome number in c)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
These programs are crucial for novices to comprehend as they illustrate basic C programming ideas. Effective understanding of these ideas will be aided by practice and experimenting with these examples.&lt;/p&gt;

</description>
      <category>c</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Advanced Local Storage Techniques: Applying the Power of JSON</title>
      <dc:creator>CodePassion</dc:creator>
      <pubDate>Fri, 12 Jul 2024 10:07:01 +0000</pubDate>
      <link>https://dev.to/code_passion/advanced-local-storage-techniques-applying-the-power-of-json-3ok9</link>
      <guid>https://dev.to/code_passion/advanced-local-storage-techniques-applying-the-power-of-json-3ok9</guid>
      <description>&lt;p&gt;Local storage is an important feature of web development because it allows users to store data locally within their browsers. It provides a smooth browsing experience by retaining user data across sessions, improving performance, and decreasing the need for frequent server queries. JSON (JavaScript Object Notation) is a versatile and efficient storage format that is easy to read and compatible with JavaScript. Using JSON in sophisticated local storage techniques can greatly improve data management, retrieval, and manipulation in online applications. To read more (&lt;a href="https://skillivo.in/advanced-local-storage-techniques/" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;) &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding JSON&lt;/strong&gt;&lt;br&gt;
JSON, a lightweight data transfer format, is widely used in web development due to its simplicity and versatility. Data is represented in a structured style utilizing key-value pairs, arrays, and nested structures, making it extremely understandable for both humans and machines. JavaScript’s native support for JSON facilitates data manipulation and allows for easy integration with local storage systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
JSON syntax is simple for developers who are familiar with JavaScript to understand because it is based on JavaScript object notation. Enclosed in square brackets [] for arrays and curly braces {} for objects, it contains data. There are colons between each key-value pair and commas between each individual element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;br&gt;
JSON supports a variety of data types, including strings, numbers, booleans, arrays, objects, and nulls. JSON’s flexibility enables it to express a diverse range of data structures, from simple values to sophisticated data hierarchies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Objects and Arrays&lt;/strong&gt;&lt;br&gt;
JSON objects are collections of key-value pairs, where the keys are strings and the values can be any JSON type. Arrays are ordered lists of values that enable the storage of several things in a single variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parsing and Serialization&lt;/strong&gt;&lt;br&gt;
JSON parsing converts a JSON string into a native data structure, such a JavaScript object, whereas serialization converts a native data structure back into a JSON string. These processes are necessary for sharing data between systems or platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;br&gt;
JSON is widely used in web development for activities like as transmitting data between a client and server via AJAX (Asynchronous JavaScript and XML) requests, storing configuration settings, and exchanging data through APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding JSON.stringify and JSON.parse in Local Storage&lt;/strong&gt;&lt;br&gt;
JSON.stringify and JSON.parse are two crucial techniques for storing and retrieving structured data in local storage. Here, we’ll look at JSON.stringify and JSON.parse, how they work with local storage, and how to use them in practice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON.stringify()&lt;/strong&gt;&lt;br&gt;
JSON.stringify() is a JavaScript function that turns a JavaScript object or value into a JSON string. This strategy is frequently used for saving data locally to maintain compatibility and consistency across multiple platforms and environments.&lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JSON.stringify(value);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;example-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const data = { name: 'Bob', age: 26 };
const jsonString = JSON.stringify(data);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the object data is converted into a JSON string jsonString, which can then be stored in local storage. &lt;a href="https://skillivo.in/advanced-local-storage-techniques/" rel="noopener noreferrer"&gt;Learn More&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON.parse()&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://skillivo.in/json-tutorial/" rel="noopener noreferrer"&gt;JSON.parse()&lt;/a&gt; is a JavaScript method that parses a JSON string and creates the JavaScript value or object represented by the string. When getting data from local storage, this function converts the stored JSON string back to its original JavaScript object or value.&lt;br&gt;
&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JSON.parse(jsonString);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const jsonString = '{"name": "Kate", "age": 32}';
const data = JSON.parse(jsonString);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the JSON string jsonString is parsed back into the original object data, which can then be used in JavaScript code. &lt;br&gt;
(&lt;a href="https://skillivo.in/json-tutorial/" rel="noopener noreferrer"&gt;JSON Tutorial&lt;/a&gt;) &lt;/p&gt;

</description>
      <category>json</category>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
