<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Nirdesh Pokharel's blog]]></title><description><![CDATA[Nirdesh Pokharel's blog]]></description><link>https://blog.nirdeshpokhrel.com.np</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 07:42:26 GMT</lastBuildDate><atom:link href="https://blog.nirdeshpokhrel.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Mystery of Leading Zeros in JavaScript: A Fun Discovery]]></title><description><![CDATA[One day, our intern, Mr. Shailendra, whom we call Lala Ji, found something strange. While working on a JavaScript project, he noticed that numbers with leading zeros were acting weird. This made me curious, so I decided to look into it more. What I f...]]></description><link>https://blog.nirdeshpokhrel.com.np/the-mystery-of-leading-zeros-in-javascript-a-fun-discovery</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/the-mystery-of-leading-zeros-in-javascript-a-fun-discovery</guid><category><![CDATA[JavaScript Leading Zeros]]></category><category><![CDATA[parseInt Function]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[javascript tips]]></category><category><![CDATA[#javascript-best-practices]]></category><category><![CDATA[coding tips]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Fri, 31 May 2024 17:51:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1717177593783/49b3b351-cfbc-4190-bc2f-250b99c14feb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>One day, our intern, Mr. Shailendra, whom we call Lala Ji, found something strange. While working on a JavaScript project, he noticed that numbers with leading zeros were acting weird. This made me curious, so I decided to look into it more. What I found was interesting and taught me a lot about JavaScript's quirks and oddities.</p>
<h2 id="heading-why-does-javascript-interpret-leading-zeros-differently">Why does JavaScript interpret leading zeros differently?</h2>
<p>A long time ago, in many programming languages like C, numbers with leading zeros were treated as octal (base 8) numbers. JavaScript followed this rule too. So, when a number starts with a zero (<code>0</code>), JavaScript thinks it’s an octal number.</p>
<h2 id="heading-surprising-examples-of-leading-zeros-in-javascript">Surprising Examples of Leading Zeros in JavaScript</h2>
<p>Here’s what Lala Ji found:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> number = <span class="hljs-number">010</span>;
<span class="hljs-built_in">console</span>.log(number); <span class="hljs-comment">// Output: 8</span>
</code></pre>
<p>You might think <code>number</code> would be <code>10</code>, but it's actually <code>8</code>! That’s because <code>010</code> is seen as an octal number, which is <code>8</code> in decimal (base 10).</p>
<h2 id="heading-understanding-different-number-bases-in-javascript">Understanding Different Number Bases in JavaScript</h2>
<p>JavaScript also understands other bases:</p>
<ul>
<li><p><strong>Hexadecimal (base 16)</strong>: Starts with <code>0x</code> or <code>0X</code>.</p>
</li>
<li><p><strong>Binary (base 2)</strong>: Starts with <code>0b</code> or <code>0B</code>.</p>
</li>
<li><p><strong>Octal (base 8)</strong>: In modern JavaScript (ES6), use <code>0o</code> or <code>0O</code>.</p>
</li>
</ul>
<p>For example:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> hex = <span class="hljs-number">0x1A</span>;    <span class="hljs-comment">// Hexadecimal 1A -&gt; Decimal 26</span>
<span class="hljs-keyword">let</span> binary = <span class="hljs-number">0b1010</span>; <span class="hljs-comment">// Binary 1010 -&gt; Decimal 10</span>
<span class="hljs-keyword">let</span> octal = <span class="hljs-number">0o10</span>;    <span class="hljs-comment">// Octal 10 -&gt; Decimal 8</span>
</code></pre>
<h2 id="heading-how-parseint-handles-leading-zeros-in-javascript">How <code>parseInt</code> Handles Leading Zeros in JavaScript</h2>
<p>The <code>parseInt</code> function turns strings into numbers. It can take a second argument called the radix, which tells it what base to use.</p>
<p>Without the radix, <code>parseInt</code> might confuse you:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> number1 = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'010'</span>); <span class="hljs-comment">// Thinks it's octal -&gt; 8</span>
<span class="hljs-keyword">let</span> number2 = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'10'</span>);  <span class="hljs-comment">// Thinks it's decimal -&gt; 10</span>
</code></pre>
<p>Always give the radix to avoid confusion:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> number1 = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'010'</span>, <span class="hljs-number">10</span>); <span class="hljs-comment">// Parse as decimal -&gt; 10</span>
<span class="hljs-keyword">let</span> number2 = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'010'</span>, <span class="hljs-number">8</span>);  <span class="hljs-comment">// Parse as octal -&gt; 8</span>
</code></pre>
<h2 id="heading-best-practices-to-avoid-confusion-with-leading-zeros-in-javascript">Best Practices to Avoid Confusion with Leading Zeros in JavaScript</h2>
<ol>
<li><p><strong>Don't Use Leading Zeros</strong>: Don’t use leading zeros for decimal numbers. Use strings if you need to pad.</p>
<pre><code class="lang-javascript"> <span class="hljs-keyword">let</span> number = <span class="hljs-number">10</span>;       <span class="hljs-comment">// Correct</span>
 <span class="hljs-keyword">let</span> paddedNumber = <span class="hljs-string">'010'</span>; <span class="hljs-comment">// Use a string for padding</span>
</code></pre>
</li>
<li><p><strong>Use Clear Prefixes</strong>: Use <code>0o</code> for octal, <code>0b</code> for binary, and <code>0x</code> for hexadecimal.</p>
<pre><code class="lang-javascript"> <span class="hljs-keyword">let</span> octal = <span class="hljs-number">0o10</span>;    <span class="hljs-comment">// Clear octal</span>
 <span class="hljs-keyword">let</span> binary = <span class="hljs-number">0b1010</span>; <span class="hljs-comment">// Clear binary</span>
 <span class="hljs-keyword">let</span> hex = <span class="hljs-number">0x1A</span>;      <span class="hljs-comment">// Clear hexadecimal</span>
</code></pre>
</li>
<li><p><strong>Use Strict Mode</strong>: Turn on strict mode to stop using old octal numbers.</p>
<pre><code class="lang-javascript"><span class="hljs-meta"> 'use strict'</span>;
 <span class="hljs-keyword">let</span> number = <span class="hljs-number">010</span>; <span class="hljs-comment">// Error: Octal numbers not allowed in strict mode.</span>
</code></pre>
</li>
<li><p><strong>Specify Radix with</strong><code>parseInt</code>: Always give the radix when using <code>parseInt</code>.</p>
<pre><code class="lang-javascript"> <span class="hljs-keyword">let</span> decimal = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'10'</span>, <span class="hljs-number">10</span>); <span class="hljs-comment">// Clear decimal</span>
 <span class="hljs-keyword">let</span> octal = <span class="hljs-built_in">parseInt</span>(<span class="hljs-string">'10'</span>, <span class="hljs-number">8</span>);    <span class="hljs-comment">// Clear octal</span>
</code></pre>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Thanks to Lala Ji, we learned something cool about JavaScript. Knowing these quirks helps us write better code. Always be curious and keep learning!</p>
<p>Happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[Exploring NestJS Architecture: Understanding Modules, Controllers, and Providers]]></title><description><![CDATA[Introduction
NestJS, a framework built on top of Node.js, offers a robust and structured architecture for building scalable and maintainable applications. At its core are three fundamental concepts: Modules, Controllers, and Providers. In this compre...]]></description><link>https://blog.nirdeshpokhrel.com.np/exploring-nestjs-architecture-understanding-modules-controllers-and-providers-by-nirdesh-pokharel</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/exploring-nestjs-architecture-understanding-modules-controllers-and-providers-by-nirdesh-pokharel</guid><category><![CDATA[nestjs]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Wed, 20 Mar 2024 04:54:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1710910241436/186dcad3-0e34-4578-9f94-c0a3c129d49e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>NestJS, a framework built on top of Node.js, offers a robust and structured architecture for building scalable and maintainable applications. At its core are three fundamental concepts: Modules, Controllers, and Providers. In this comprehensive guide, we will delve into each of these components to gain a deep understanding of how they contribute to the overall architecture of a NestJS application.</p>
<h2 id="heading-1-understanding-nestjs-modules">1. Understanding NestJS Modules</h2>
<p>Modules are the cornerstone of NestJS applications, serving as containers for organizing related components. Here's a closer look at their key characteristics:</p>
<ul>
<li><strong>Modularity</strong>: Modules encapsulate a cohesive set of features, promoting code organization and maintainability.</li>
<li><strong>Dependency Management</strong>: NestJS manages dependencies between modules, ensuring that components can be easily reused and tested.</li>
<li><strong>Entry Point</strong>: Every NestJS application must have at least one module, known as the root module, which serves as the entry point for the application.</li>
<li><strong>Hierarchical Structure</strong>: Modules can import functionality from other modules, enabling the composition of complex applications from smaller, reusable modules.</li>
</ul>
<h2 id="heading-2-exploring-nestjs-controllers">2. Exploring NestJS Controllers</h2>
<p>Controllers are responsible for handling incoming requests and producing appropriate responses. Let's delve into their core functionalities:</p>
<ul>
<li><strong>Request Handling</strong>: Controllers define routes and their corresponding request handling methods.</li>
<li><strong>Decorators</strong>: Controllers are annotated with decorators such as <code>@Controller()</code> and HTTP method decorators (<code>@Get()</code>, <code>@Post()</code>, etc.) to define their scope and route mappings.</li>
<li><strong>Separation of Concerns</strong>: Controllers delegate the actual request processing to corresponding service classes, promoting the separation of concerns.</li>
</ul>
<h2 id="heading-3-dive-into-nestjs-providers">3. Dive into NestJS Providers</h2>
<p>Providers are injectable components responsible for encapsulating various functionalities. Here's what you need to know about them:</p>
<ul>
<li><strong>Injectable Components</strong>: Providers can be services, repositories, factories, or any other injectable component.</li>
<li><strong>Dependency Injection</strong>: NestJS leverages dependency injection to manage the lifecycle of providers and facilitate loose coupling between different components.</li>
<li><strong>Decorator</strong>: Providers are annotated with the <code>@Injectable()</code> decorator to indicate that they can be injected into other components.</li>
<li><strong>Seamless Integration</strong>: Providers can be injected into controllers, other providers, or even modules, enabling seamless integration and extensibility.</li>
</ul>
<h2 id="heading-4-module-organization-and-dependency-injection">4. Module Organization and Dependency Injection</h2>
<p>Proper organization of modules and effective use of dependency injection are crucial for building maintainable NestJS applications. Here are some best practices:</p>
<ul>
<li><strong>Single Responsibility Principle (SRP)</strong>: Design controllers and services with a single responsibility in mind, promoting code clarity and maintainability.</li>
<li><strong>Modular Design</strong>: Keep modules focused on specific functionalities to enhance modularity and reusability.</li>
<li><strong>Providers as Singletons</strong>: Providers declared within a module are automatically treated as singletons, ensuring that the same instance is reused throughout the module.</li>
</ul>
<h2 id="heading-5-best-practices-and-tips-for-nestjs-architecture">5. Best Practices and Tips for NestJS Architecture</h2>
<p>To build robust and scalable applications with NestJS, consider the following best practices:</p>
<ul>
<li><strong>Use Guards and Interceptors</strong>: Implement guards and interceptors to handle cross-cutting concerns such as authentication, authorization, and logging in a reusable and decoupled manner.</li>
<li><strong>Middleware Usage</strong>: Leverage middleware for request pre-processing and post-processing tasks, enhancing the flexibility and extensibility of your application.</li>
<li><strong>Regular Refactoring</strong>: Regularly review and refactor your application architecture to ensure scalability and maintainability as the application grows and evolves.</li>
<li><strong>Documentation and Testing</strong>: Document your code thoroughly and invest in comprehensive testing to ensure the reliability and robustness of your NestJS applications.</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Understanding the architecture of NestJS is essential for building scalable and maintainable Node.js applications. By mastering the concepts of modules, controllers, and providers, developers can design applications that are not only efficient and performant but also easy to manage and evolve over time. Embracing NestJS's modular architecture enables developers to create applications that meet the evolving needs of their users and stakeholders.</p>
]]></content:encoded></item><item><title><![CDATA[Mastering Guards and Custom Decorators in NestJS: A Comprehensive Guide]]></title><description><![CDATA[Introduction:
NestJS, with its modular architecture and robust features, empowers developers to build scalable and maintainable applications. Two essential features that contribute significantly to NestJS's versatility and security are Guards and Cus...]]></description><link>https://blog.nirdeshpokhrel.com.np/mastering-guards-and-custom-decorators-in-nestjs-a-comprehensive-guide</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/mastering-guards-and-custom-decorators-in-nestjs-a-comprehensive-guide</guid><category><![CDATA[nestjs]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Tue, 19 Mar 2024 15:49:56 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1710863515584/d97d0078-39de-4d64-84bd-3b794fa044a0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction:</h3>
<p>NestJS, with its modular architecture and robust features, empowers developers to build scalable and maintainable applications. Two essential features that contribute significantly to NestJS's versatility and security are Guards and Custom Decorators. In this comprehensive guide, we'll delve into the world of Guards and Custom Decorators in NestJS, exploring their functionalities, use cases, and best practices for mastering them.</p>
<h3 id="heading-understanding-guards">Understanding Guards:</h3>
<p>Guards in NestJS act as middleware components that intercept incoming requests before they reach route handlers. They allow developers to implement authentication, authorization, rate limiting, and other custom logic to control access to routes and resources within an application.</p>
<h3 id="heading-creating-custom-guards">Creating Custom Guards:</h3>
<p>To create custom guards in NestJS, developers can implement classes that adhere to the <code>CanActivate</code> interface for synchronous guards or the <code>CanActivate</code> interface for asynchronous guards. Within the guard class, they implement the <code>canActivate()</code> method, where they write the logic to determine whether the request should be allowed or denied.</p>
<p>Example of an Authentication Guard:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { Injectable, CanActivate, ExecutionContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'@nestjs/common'</span>;
<span class="hljs-keyword">import</span> { Observable } <span class="hljs-keyword">from</span> <span class="hljs-string">'rxjs'</span>;

<span class="hljs-meta">@Injectable</span>()
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> AuthGuard <span class="hljs-keyword">implements</span> CanActivate {
  canActivate(
    context: ExecutionContext,
  ): <span class="hljs-built_in">boolean</span> | <span class="hljs-built_in">Promise</span>&lt;<span class="hljs-built_in">boolean</span>&gt; | Observable&lt;<span class="hljs-built_in">boolean</span>&gt; {
    <span class="hljs-comment">// Implement authentication logic here</span>
    <span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>; <span class="hljs-comment">// or return false to deny access</span>
  }
}
</code></pre>
<h3 id="heading-using-guards-in-routes">Using Guards in Routes:</h3>
<p>To apply guards to specific routes in NestJS, developers use the <code>@UseGuards()</code> decorator at the controller or method level. This decorator accepts one or more guard classes as arguments, which will be executed in the order they are provided.</p>
<p>Example of Using Guards in a Controller:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { Controller, Get, UseGuards } <span class="hljs-keyword">from</span> <span class="hljs-string">'@nestjs/common'</span>;
<span class="hljs-keyword">import</span> { AuthGuard } <span class="hljs-keyword">from</span> <span class="hljs-string">'./auth.guard'</span>;

<span class="hljs-meta">@Controller</span>(<span class="hljs-string">'users'</span>)
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> UsersController {
  <span class="hljs-meta">@Get</span>()
  <span class="hljs-meta">@UseGuards</span>(AuthGuard)
  getUsers() {
    <span class="hljs-comment">// Route handler logic</span>
  }
}
</code></pre>
<h3 id="heading-understanding-custom-decorators">Understanding Custom Decorators:</h3>
<p>Custom Decorators in NestJS allow developers to extend the framework's functionality by adding custom metadata and behavior to classes, methods, properties, or parameters. They enhance code readability, promote code reuse, and enable a declarative programming style.</p>
<h3 id="heading-creating-custom-decorators">Creating Custom Decorators:</h3>
<p>To create a custom decorator in NestJS, developers define a function that returns a decorator function. This decorator function can then be applied to classes, methods, properties, or parameters using the <code>@</code> syntax.</p>
<p>Example of a Custom Decorator:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { createParamDecorator, ExecutionContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'@nestjs/common'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> CustomDecorator = createParamDecorator(
  <span class="hljs-function">(<span class="hljs-params">data: unknown, context: ExecutionContext</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> request = context.switchToHttp().getRequest();
    <span class="hljs-comment">// Custom logic here</span>
    <span class="hljs-keyword">return</span> request.customData;
  },
);
</code></pre>
<h3 id="heading-conclusion">Conclusion:</h3>
<p>Guards and Custom Decorators are powerful features in NestJS that enable developers to implement authentication, authorization, and custom behavior with ease. By mastering guards and custom decorators, developers can enhance the security, readability, and extensibility of their NestJS applications. Experiment with these features in your projects, and unlock their full potential to build scalable, secure, and maintainable applications with NestJS.</p>
]]></content:encoded></item><item><title><![CDATA[Nextjs : (window is not defined) react-apexcharts]]></title><description><![CDATA[Apex Charts tries to access the window object without checking it is available first, so it does not work in server contexts.The workaround is to ensure the library is only used in a browser context.
In NextJS, the usual method of ensuring a module o...]]></description><link>https://blog.nirdeshpokhrel.com.np/nextjs-window-is-not-defined-react-apexcharts</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/nextjs-window-is-not-defined-react-apexcharts</guid><category><![CDATA[Next.js]]></category><category><![CDATA[React]]></category><category><![CDATA[Nepal]]></category><category><![CDATA[apex-charts]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Tue, 31 Oct 2023 06:28:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698733579976/c7d9836c-a975-40d3-adbd-9cc8265192e6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Apex Charts tries to access the <code>window</code> object without checking it is available first, so it does not work in server contexts.<br />The workaround is to ensure the library is only used in a browser context.</p>
<p>In NextJS, the usual method of ensuring a module only renders on the client is to use <code>next/dyanamic</code> with SSR disabled, but this approach doesn't work in NextJS 13:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// nextjs13 - doesn't work - gives "window is not defined"</span>
<span class="hljs-string">"use client"</span>;
<span class="hljs-keyword">import</span> dynamic <span class="hljs-keyword">from</span> <span class="hljs-string">"next/dynamic"</span>;
<span class="hljs-keyword">const</span> Chart = dynamic(<span class="hljs-function">() =&gt;</span> <span class="hljs-keyword">import</span>(<span class="hljs-string">"react-apexcharts"</span>), { <span class="hljs-attr">ssr</span>: <span class="hljs-literal">false</span> });

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ApexChart</span>(<span class="hljs-params">props: any</span>) </span>{
  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Chart</span> {<span class="hljs-attr">...props</span>} /&gt;</span></span>;
}
</code></pre>
<p>My current workaround is to import <code>"react-apexcharts"</code> inside a useEffect to force NextJS to only import on the client side:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// nextjs13 - works</span>
<span class="hljs-string">"use client"</span>;
<span class="hljs-keyword">import</span> { useEffect, useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ApexChart</span>(<span class="hljs-params">props: any</span>) </span>{
  <span class="hljs-keyword">const</span> [Chart, setChart] = useState&lt;any&gt;();
  <span class="hljs-keyword">const</span> hasType = <span class="hljs-keyword">typeof</span> props?.type !== <span class="hljs-string">"undefined"</span>;

  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">import</span>(<span class="hljs-string">"react-apexcharts"</span>).then(<span class="hljs-function">(<span class="hljs-params">mod</span>) =&gt;</span> {
      setChart(<span class="hljs-function">() =&gt;</span> mod.default);
    });
  }, []);

  <span class="hljs-keyword">return</span> hasType &amp;&amp; Chart &amp;&amp; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Chart</span> {<span class="hljs-attr">...props</span>} /&gt;</span></span>;
}
</code></pre>
<p>But in my opinion, I feel this is unnecessary if the Apex Charts library would just check that the window object is available first before trying to access it.</p>
]]></content:encoded></item><item><title><![CDATA[Important Flutter Packages]]></title><description><![CDATA[In this blog post, we present a handpicked selection of essential packages to enhance your Flutter app development. Whether you're a seasoned developer or just starting, these packages offer a wide range of functionalities, from state management and ...]]></description><link>https://blog.nirdeshpokhrel.com.np/important-flutter-packages</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/important-flutter-packages</guid><category><![CDATA[Flutter]]></category><category><![CDATA[flutter packages]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Sun, 30 Jul 2023 02:47:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1690684935159/358a8d91-aa4c-4e2a-b60e-4de227ca34bb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this blog post, we present a handpicked selection of essential packages to enhance your Flutter app development. Whether you're a seasoned developer or just starting, these packages offer a wide range of functionalities, from state management and API calls to working with maps, internationalization, and user authentication. We'll explore how each package can revolutionize your app development process and equip your Flutter app with the tools it needs to provide users with a top-notch experience. With our curated list, you can easily supercharge your Flutter app and stand out in the competitive app market. Let's dive in and make your Flutter app development a breeze!</p>
<p>Here are some suggested packages that could be useful for your Flutter app development:</p>
<ol>
<li><p><strong>flutter_bloc</strong>: If you're seeking a reliable state management solution for your app, flutter_bloc is a great choice. It offers various tools to handle state changes and events effectively.</p>
</li>
<li><p><strong>provider</strong>: For a simpler way to manage the app state, you can opt for the lightweight package called provider, which can be quite helpful.</p>
</li>
<li><p><strong>dio</strong>: To handle API calls and HTTP requests with ease, consider using dio, a powerful package designed for this purpose.</p>
</li>
<li><p><strong>shared_preferences</strong>: If your app requires storing small amounts of data on the device, shared_preferences is a lightweight package that can fulfill this need.</p>
</li>
<li><p><strong>intl</strong>: When your app needs to support multiple languages or locales, intl provides essential tools for handling internationalization and localization.</p>
</li>
<li><p><strong>flutter_svg</strong>: To seamlessly work with SVG images, you can rely on flutter_svg, which enables you to render SVG images directly within your app.</p>
</li>
<li><p><strong>google_maps_flutter</strong>: For displaying maps and working with location data, google_maps_flutter is a valuable package to consider.</p>
</li>
<li><p><strong>url_launcher</strong>: If your app needs to open URLs or external links, the url_launcher package provides a simple solution for this functionality.</p>
</li>
<li><p><strong>cached_network_image</strong>: To optimize the loading of internet-based images, cached_network_image can help by caching images and improving loading speeds.</p>
</li>
<li><p><strong>HTTP</strong>: Another option for HTTP requests, HTTP provides basic functionality and serves as an alternative to dio.</p>
</li>
<li><p><strong>path_provider</strong>: When dealing with files or directories on the device, path_provider provides a set of tools to access common locations within the file system.</p>
</li>
<li><p><strong>flutter_html</strong>: For rendering HTML content, flutter_html is a useful package that allows you to display formatted text and images.</p>
</li>
<li><p><strong>flutter_spinkit</strong>: To showcase loading indicators or progress spinners, flutter_spinkit offers customizable widgets for this purpose.</p>
</li>
<li><p><strong>flutter_webview_plugin</strong>: If your app requires displaying web content or utilizing web views, flutter_webview_plugin enables you to embed web views directly in your app.</p>
</li>
<li><p><strong>firebase_core</strong>: For integrating Firebase services, firebase_core provides essential tools to initialize and configure Firebase within your app.</p>
</li>
<li><p><strong>firebase_auth</strong>: When your app needs to support user authentication, firebase_auth offers tools for working with Firebase authentication services.</p>
</li>
<li><p><strong>firebase_database</strong>: For real-time data management, firebase_database allows you to store and retrieve data in real-time using Firebase.</p>
</li>
<li><p><strong>firebase_storage</strong>: To work with file storage in the cloud, firebase_storage facilitates interaction with Firebase Storage.</p>
</li>
<li><p><strong>flutter_map</strong>: When displaying maps using providers like OpenStreetMap, flutter_map offers a customizable solution to render maps directly in your app.</p>
</li>
<li><p><strong>flutter_redux</strong>: If you prefer the Redux state management pattern for your app, flutter_redux provides a specific implementation tailored for Flutter.</p>
</li>
<li><p><strong>flutter_form_builder</strong>: To build forms with ease, flutter_form_builder offers a set of customizable widgets for collecting user input.</p>
</li>
<li><p><strong>flutter_icons</strong>: For displaying icons in your app, flutter_icons provides a range of customizable icon options.</p>
</li>
<li><p><strong>flutter_local_notifications</strong>: When your app requires sending notifications to users, flutter_local_notifications enables you to create and schedule local notifications directly within your app.</p>
</li>
<li><p><strong>flutter_secure_storage</strong>: For securely storing sensitive data, such as passwords or API keys, flutter_secure_storage ensures a safe approach on the device.</p>
</li>
<li><p><strong>flutter_reorderable_list</strong>: If you need to implement a feature that allows users to reorder items in a list, flutter_reorderable_list offers a set of widgets to enable drag-and-drop functionality for reordering.</p>
</li>
<li><p><strong>url_launcher</strong>: If your app needs to launch external apps or open links in the browser, url_launcher provides a simple way to achieve this functionality.</p>
</li>
<li><p><strong>flutter_keyboard_visibility</strong>: To respond to changes in keyboard visibility and adjust UI elements accordingly, flutter_keyboard_visibility provides a convenient way to listen to keyboard events.</p>
</li>
</ol>
<p>I hope this list assists you in finding the right packages to build your Flutter app effectively!</p>
]]></content:encoded></item><item><title><![CDATA[What is cybercrime? What is the system in Nepal to control it?]]></title><description><![CDATA[Illegal acts using computers, computer networks and devices are called cybercrime. This is an electronic crime committed through electronic media.
It is especially used on devices such as computers (laptops or desktops) and mobiles (smartphones or ta...]]></description><link>https://blog.nirdeshpokhrel.com.np/what-is-cybercrime-what-is-the-system-in-nepal-to-control-it</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/what-is-cybercrime-what-is-the-system-in-nepal-to-control-it</guid><category><![CDATA[#cybersecurity]]></category><category><![CDATA[news]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Thu, 24 Mar 2022 12:59:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/70Rir5vB96U/upload/v1648126931771/xUHnzlUy_.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Illegal acts using computers, computer networks and devices are called cybercrime. This is an electronic crime committed through electronic media.</p>
<p>It is especially used on devices such as computers (laptops or desktops) and mobiles (smartphones or tablets) with an Internet connection. Developed with the development of information technology, this crime is being used more and more through social media.</p>
<p>Social media including Facebook, Messenger, Tiktok, YouTube are being used as a form of imitation or imitation of videos, photos, the voice of a person against one's will, thus affecting one's value, dignity, reputation and honour. Provisions for Cyber ​​Crime Control in Nepal:</p>
<h2 id="heading-a-legal-system">A. legal system</h2>
<ul>
<li>Electronic Transactions Act - 2063</li>
<li>Electronic Business Rules - 2064</li>
<li>Information Technology Tribunal Rules-2064</li>
</ul>
<h2 id="heading-b-institutional-arrangements">B. Institutional arrangements</h2>
<ul>
<li>Establishment of Central Cyber ​​Bureau in Nepal Police to investigate and investigate cybercrime-related offences,</li>
<li>Establishment of Information Technology Tribunal to initiate and settle the case of misconduct related to electronic transactions, arrangement of Information Technology Appellate Tribunal to hear the appeal against its order or decision.</li>
</ul>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://loksewa.nirdeshpokhrel.com.np/">https://loksewa.nirdeshpokhrel.com.np/</a></div>
]]></content:encoded></item><item><title><![CDATA[10 Best CSS Frameworks You Should Know as a Web Developer.]]></title><description><![CDATA[Here is the list of 10 Best CSS Frameworks You Should Know as a Web Developer. You may need one for your next project.

Tailwind CSS
Bootstrap
Pure CSS
Bulma CSS
Foundation CSS
Skeleton CSS
Materialize CSS
Tachyons
Semantic UI
UIKit

Tailwind CSS
Tai...]]></description><link>https://blog.nirdeshpokhrel.com.np/10-best-css-frameworks-you-should-know-as-a-web-developer</link><guid isPermaLink="true">https://blog.nirdeshpokhrel.com.np/10-best-css-frameworks-you-should-know-as-a-web-developer</guid><category><![CDATA[CSS]]></category><category><![CDATA[CSS Frameworks]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Nirdesh pokharel]]></dc:creator><pubDate>Mon, 04 Jan 2021 18:15:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647913641880/SdaH4hvoS.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Here is the list of 10 Best CSS Frameworks You Should Know as a Web Developer. You may need one for your next project.</p>
<ol>
<li>Tailwind CSS</li>
<li>Bootstrap</li>
<li>Pure CSS</li>
<li>Bulma CSS</li>
<li>Foundation CSS</li>
<li>Skeleton CSS</li>
<li>Materialize CSS</li>
<li>Tachyons</li>
<li>Semantic UI</li>
<li>UIKit</li>
</ol>
<h1 id="heading-tailwind-css">Tailwind CSS</h1>
<p>Tailwind CSS is a utility-first CSS framework that is different from other best CSS frameworks like Bulma, Bootstrap where you get pre-designed components, which you can use as a base for further development.</p>
<h1 id="heading-bootstrap">Bootstrap</h1>
<p>Bootstrap is considered to be one of the best CSS frameworks due to its responsive design. It was developed by Twitter and released in the year 2011. HTML, SASS, and Javascript are all configured into the Bootstrap framework.</p>
<h1 id="heading-pure-css">Pure CSS</h1>
<p>Pure CSS is considered to be one of the best CSS frameworks. Pure CSS is built on Normalize.css and developed by Yahoo. It comprises a set of small, responsive CSS modules that you can use in every web project.</p>
<h1 id="heading-bulma-css">Bulma CSS</h1>
<p>Bulma is another best CSS Framework based on flexbox. It is a 100% responsive open-source CSS library and includes a variety of predefined components.</p>
<h1 id="heading-foundation-css">Foundation CSS</h1>
<p>Foundation is yet another one of the best CSS frameworks. It is a sophisticated frontend CSS framework that includes HTML, CSS, SASS, and Javascript.</p>
<h1 id="heading-skeleton-css">Skeleton CSS</h1>
<p>Skeleton is a super-light or boilerplate CSS framework designed for the development of responsive and mobile-friendly websites. Skeleton includes all of the standard components for responsive web design, such as the grid, aside from its small size.</p>
<h1 id="heading-materialize-css">Materialize CSS</h1>
<p>Materialize CSS also comes under the category of best CSS frameworks. It is a CSS UI component library developed by Google with CSS, Javascript and HTML. It is also known as Material Design.</p>
<h1 id="heading-tachyons">Tachyons</h1>
<p>Tachyons is considered among the best CSS frameworks. It is a lightweight, responsive CSS toolkit (utility first design) that claims to be ‘built for designing’. Going by the name ‘Tachyons’ means ‘a hypothetical particle that travels faster than light.</p>
<h1 id="heading-semantic-ui">Semantic UI</h1>
<p>Semantic UI is another one of the good CSS frameworks released in 2013 by Jack Lukic. It contains pre-built semantic components that are super helpful in creating a beautiful and responsive layout using human-friendly HTML syntax.</p>
<h1 id="heading-uikit">UIKit</h1>
<p>UIKit is regarded as one of the best CSS frameworks. It is a lightweight, open-source and modular front-end framework for developing fast and powerful web interfaces. UIKit framework is simple to learn and is used to build user interfaces for iOS and Android-based web.</p>
]]></content:encoded></item></channel></rss>