<?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[AI Engineering]]></title><description><![CDATA[Fostering AI Systems for Production]]></description><link>https://ai-eng.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 28 Oct 2026 22:03:29 GMT</lastBuildDate><atom:link href="https://ai-eng.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Is it possible to find an internship in China? My Journey About Internship]]></title><description><![CDATA[Discover how persistence and strategic optimization can lead to securing an internship in China amidst a competitive market]]></description><link>https://ai-eng.hashnode.dev/is-it-possible-to-find-an-internship-in-china-my-journey-about-internship</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/is-it-possible-to-find-an-internship-in-china-my-journey-about-internship</guid><category><![CDATA[internship]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[#AI #job-search]]></category><category><![CDATA[Job Hunting]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sat, 22 Mar 2025 09:26:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/FlPc9_VocJ4/upload/16f6ef16abd56d89cc7d801442ffbcf1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Finding an internship abroad can be a daunting challenge, especially when you’re targeting a highly competitive market like China. For anyone wondering whether it’s possible to land an internship in China as an international student, let me walk you through my personal journey — from sending out more than 200 applications to facing rejections for AI related positions, and ultimately landing an opportunity that aligned with my skills.</p>
<p>The Job Hunt Begins: Exploring Boss and LinkedIn</p>
<p>My search started on two of the most widely used platforms for job hunting: LinkedIn and Boss, a popular Chinese job application tool. On LinkedIn, I sent applications to over 200 internships, expecting that sheer numbers would help me land at least a few responses. But to my surprise, most of the responses I received were automated rejection messages, courtesy of an ATS (Applicant Tracking System). For some reason, recruiters had set up ATS systems even for internship positions, which felt somewhat off-putting, especially considering the job market. I did manage to get a few responses, mostly for coding assessments, but those were generic auto-replies everyone receives after applying.</p>
<p>Discovering Boss App’s Premium Features</p>
<p>Not one to give up easily, I turned to Boss App, which is specifically tailored for the Chinese job market. The app offered a premium feature that helped analyze job competition and gave you the ability to send out more than 50 resumes per day. I bought a one-month subscription and started sending out my applications. Initially, I didn’t optimize my online profile on the Boss platform, which led to only 25 recruiters viewing my resume. The results weren’t exactly promising.</p>
<p>However, I realized my mistake — I hadn’t taken the time to optimize my profile on Boss. Once I updated my details and made sure my skills were clearly highlighted, things began to change. Almost overnight, I started receiving invitations from recruiters daily — anywhere between 4 and 6 job offers, many from well-known companies. Even though some of these companies did not hire international students, I kept applying, knowing that rejection was a part of the process. After all, I had no industry experience and lacked referrals, so rejection was something I was bracing myself for.</p>
<p>The Interview Struggles: Rejection and Surprises</p>
<p>As expected, I faced plenty of rejection emails. One particular interview went really well, lasting almost an hour, and I felt confident that I had done a great job. But just one week later, I received an email saying that my skills didn’t match what they were looking for. I couldn’t help but laugh. It was disheartening, but I knew it was part of the process.</p>
<p>Additionally, many of the companies I applied to required fluency in Chinese, something I lacked. I was comfortable with basic Chinese, but fluency was still out of my reach. These roles were quickly ruled out, but I didn’t let it discourage me. I continued to push forward.</p>
<p>A Coincidence of Timing: Two Interviews, One Day</p>
<p>Finally, things took an interesting turn. I received two interview requests for the same day. At first, I was a bit overwhelmed by the coincidence, but I decided to go for both — one in the morning and the other in the afternoon. The first interview went smoothly, and after speaking with the CEO, I was introduced to the team, and he showed me some of the company’s exciting projects and mission. I was beyond thrilled and didn’t expect the process to move so quickly.</p>
<p>By the end of the day, I had an offer from the company, and it felt like all my hard work had finally paid off. Given how quickly things had progressed, I made the decision to cancel the second interview.</p>
<p>Conclusion: The Challenges Were Worth It</p>
<p>In summary, the journey to finding an internship in China wasn’t easy, but it was full of valuable lessons. I faced many challenges, from rejections and language barriers to the frustrations of automated responses. Yet, each obstacle helped me grow stronger and more resilient. Ultimately, my efforts paid off when I landed a position that was a perfect fit for my skills and interests.</p>
<p>For anyone considering applying for an internship in China, my advice is simple: keep pushing through the rejections, optimize your online profiles, and remain persistent. The journey may not be quick, but the rewards can be worth the effort.</p>
]]></content:encoded></item><item><title><![CDATA[Types of Approximation Algorithms]]></title><description><![CDATA[Approximation algorithms can be categorized based on their approximation ratios and the techniques they employ.]]></description><link>https://ai-eng.hashnode.dev/types-of-approximation-algorithms</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/types-of-approximation-algorithms</guid><category><![CDATA[approximation algorithms]]></category><category><![CDATA[ratio]]></category><category><![CDATA[algorithms]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sun, 17 Nov 2024 14:48:49 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ukzHlkoz1IE/upload/bbd412b18739bec7256613bcf76c9447.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The field of approximation algorithms is rich and diverse, designed to tackle optimization problems that are difficult or impossible to solve exactly in a reasonable amount of time—especially NP-hard problems. Approximation algorithms aim to find solutions close to the optimal one, and they are characterized by their <strong>approximation ratios</strong>.</p>
<h3 id="heading-understanding-approximation-ratios"><strong>Understanding Approximation Ratios</strong></h3>
<p>An <strong>approximation ratio</strong> quantifies how close the solution obtained by an approximation algorithm is to the optimal solution. It's defined differently for <strong>minimization</strong> and <strong>maximization</strong> problems:</p>
<ul>
<li><p><strong>Minimization Problems:</strong></p>
<p>  \( \text{Approximation Ratio } \rho = \frac{\text{Algorithm's Solution Cost}}{\text{Optimal Solution Cost}} \geq 1 \)</p>
</li>
<li><p><strong>Maximization Problems:</strong> \(\text{Approximation Ratio } \rho = \frac{\text{Optimal Solution Value}}{\text{Algorithm's Solution Value}} \geq 1 \)</p>
</li>
</ul>
<p>An algorithm with an approximation ratio \((\rho)\) guarantees that the solution it produces is within a factor of ( \(\rho\) ) of the optimal solution for any instance of the problem.</p>
<h3 id="heading-types-of-approximation-algorithms"><strong>Types of Approximation Algorithms</strong></h3>
<p>Approximation algorithms can be categorized based on their approximation ratios and the techniques they employ. Here's an overview of the different types:</p>
<hr />
<h4 id="heading-1-constant-factor-approximation-algorithms"><strong>1. Constant-Factor Approximation Algorithms</strong></h4>
<ul>
<li><p><strong>Definition:</strong> Algorithms that guarantee a solution within a constant factor of the optimal solution, regardless of the input size.</p>
</li>
<li><p><strong>Approximation Ratios:</strong> Fixed constants like \(\frac{1}{2} ), 2, ( \frac{3}{2}\), etc.</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>(</strong> \(\frac{1}{2} \) <strong>)-Approximation:</strong> The Extended Greedy Knapsack (ExtGreedyKS) algorithm for the 0-1 Knapsack problem guarantees at least half of the optimal value.</p>
</li>
<li><p><strong>2-Approximation:</strong> The Greedy Vertex Cover algorithm provides a vertex cover no more than twice the size of the optimal cover.</p>
</li>
<li><p><strong>(</strong> \(\frac{3}{2}\) <strong>)-Approximation:</strong> Christofides' algorithm for the Metric Traveling Salesman Problem (TSP) guarantees a tour no more than 1.5 times the optimal length.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Simplicity:</strong> Often based on greedy or straightforward heuristic methods.</p>
</li>
<li><p><strong>Efficiency:</strong> Typically run in polynomial time.</p>
</li>
<li><p><strong>Applicability:</strong> Useful when a reasonably good solution is acceptable, and computational resources are limited.</p>
</li>
</ul>
<hr />
<h4 id="heading-2-polynomial-time-approximation-schemes-ptas"><strong>2. Polynomial Time Approximation Schemes (PTAS)</strong></h4>
<ul>
<li><p><strong>Definition:</strong> A family of algorithms where, for any fixed \(\epsilon &gt; 0\), the algorithm produces a solution within a factor of \((1 + \epsilon)\) of the optimal solution in polynomial time.</p>
</li>
<li><p><strong>Approximation Ratios:</strong> Arbitrarily close to 1, depending on \( \epsilon\).</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>Knapsack Problem:</strong> Has a PTAS that provides solutions within any desired accuracy.</p>
</li>
<li><p><strong>Scheduling Problems:</strong> Some variants admit PTAS algorithms.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Trade-off:</strong> As \( \epsilon\) decreases (seeking a solution closer to optimal), the running time increases, often exponentially in \(\frac{1}{\epsilon}\).</p>
</li>
<li><p><strong>Flexibility:</strong> Users can choose \( \epsilon\) based on acceptable approximation and available computational resources.</p>
</li>
</ul>
<hr />
<h4 id="heading-3-fully-polynomial-time-approximation-schemes-fptas"><strong>3. Fully Polynomial Time Approximation Schemes (FPTAS)</strong></h4>
<ul>
<li><p><strong>Definition:</strong> A PTAS where the running time is polynomial both in the input size and \(( \frac{1}{\epsilon} )\).</p>
</li>
<li><p><strong>Approximation Ratios:</strong> Similar to PTAS, but more efficient for small \(( \epsilon )\).</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>Knapsack Problem:</strong> Also admits an FPTAS, making it possible to get very close to the optimal solution efficiently.</p>
</li>
<li><p><strong>Subset Sum Problem:</strong> Has an FPTAS.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Efficiency:</strong> More practical for small \(( \epsilon )\) compared to general PTAS algorithms.</p>
</li>
<li><p><strong>Applicability:</strong> Suitable for problems where even small deviations from the optimal solution are significant.</p>
</li>
</ul>
<hr />
<h4 id="heading-4-logarithmic-and-polylogarithmic-approximation-algorithms"><strong>4. Logarithmic and Polylogarithmic Approximation Algorithms</strong></h4>
<ul>
<li><p><strong>Definition:</strong> Algorithms where the approximation ratio grows logarithmically with the input size or some parameter of the input.</p>
</li>
<li><p><strong>Approximation Ratios:</strong> \(( \rho(n) = O(\log n) ) or ( \rho(n) = O((\log n)^k) )\).</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>Set Cover Problem:</strong> Has a \(( \ln n )\)-approximation algorithm.</p>
</li>
<li><p><strong>Facility Location Problems:</strong> Often admit logarithmic approximation ratios.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Scalability:</strong> Approximation ratio worsens slowly with increasing input size.</p>
</li>
<li><p><strong>Complexity:</strong> Typically more sophisticated algorithms, sometimes involving LP relaxation.</p>
</li>
</ul>
<hr />
<h4 id="heading-5-randomized-approximation-algorithms"><strong>5. Randomized Approximation Algorithms</strong></h4>
<ul>
<li><p><strong>Definition:</strong> Algorithms that use randomization to achieve a good expected approximation ratio or guarantee with high probability.</p>
</li>
<li><p><strong>Approximation Ratios:</strong> Vary based on the problem and randomization technique.</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>MAX 3-SAT Problem:</strong> Randomized algorithms can achieve a \(( \frac{7}{8} )\)-approximation.</p>
</li>
<li><p><strong>Load Balancing Problems:</strong> Randomized rounding can provide good approximations.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Expected Performance:</strong> Guarantees hold on average over multiple runs.</p>
</li>
<li><p><strong>Probabilistic Guarantees:</strong> May require running the algorithm multiple times to achieve high confidence.</p>
</li>
</ul>
<hr />
<h4 id="heading-6-problem-specific-approximation-algorithms"><strong>6. Problem-Specific Approximation Algorithms</strong></h4>
<ul>
<li><p><strong>Definition:</strong> Algorithms tailored to specific problems, exploiting unique properties to achieve better approximation ratios.</p>
</li>
<li><p><strong>Examples:</strong></p>
<ul>
<li><p><strong>Metric TSP:</strong> Specific algorithms like Christofides' algorithm achieve better ratios due to the triangle inequality.</p>
</li>
<li><p><strong>Scheduling Problems:</strong> Algorithms may achieve different approximation ratios based on constraints like precedence or resource limitations.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Characteristics:</strong></p>
<ul>
<li><p><strong>Customization:</strong> Designed for the nuances of a particular problem.</p>
</li>
<li><p><strong>Performance:</strong> Approximation ratios may vary widely.</p>
</li>
</ul>
<hr />
<h3 id="heading-approximation-ratios-in-context"><strong>Approximation Ratios in Context</strong></h3>
<p>The approximation ratio achievable often depends on the problem's complexity and structure:</p>
<ul>
<li><p><strong>Some problems have constant-factor approximations but cannot be approximated better unless P = NP.</strong></p>
<ul>
<li><strong>Vertex Cover:</strong> Best known approximation ratio is 2; improving this is a significant open problem.</li>
</ul>
</li>
<li><p><strong>Other problems admit PTAS or FPTAS.</strong></p>
<ul>
<li><strong>Knapsack Problem:</strong> Despite being NP-hard, it has an FPTAS.</li>
</ul>
</li>
<li><p><strong>Certain problems are hard to approximate within any reasonable factor.</strong></p>
<ul>
<li><strong>Clique Problem:</strong> No efficient approximation algorithm achieves a good approximation ratio unless P = NP.</li>
</ul>
</li>
</ul>
<h3 id="heading-how-many-types-are-there"><strong>How Many Types Are There?</strong></h3>
<p>There is an extensive variety of approximation algorithms, and they can be classified based on:</p>
<ul>
<li><p><strong>Approximation Ratio Achieved:</strong></p>
<ul>
<li><p>Exact \(( \rho = 1 )\)</p>
</li>
<li><p>Constant-factor (e.g., \(\rho = 2 ), ( \rho = \frac{3}{2} \) )</p>
</li>
<li><p>Logarithmic-factor \(( \rho = O(\log n) )\)</p>
</li>
<li><p>Arbitrarily close to 1 (PTAS and FPTAS)</p>
</li>
</ul>
</li>
<li><p><strong>Algorithmic Technique Used:</strong></p>
<ul>
<li><p>Greedy methods</p>
</li>
<li><p>Dynamic programming</p>
</li>
<li><p>Linear programming relaxation and rounding</p>
</li>
<li><p>Primal-dual methods</p>
</li>
<li><p>Randomized algorithms</p>
</li>
</ul>
</li>
<li><p><strong>Problem Characteristics:</strong></p>
<ul>
<li><p>Whether the problem is a maximization or minimization problem</p>
</li>
<li><p>Specific properties like submodularity, metric spaces, or graph structures</p>
</li>
</ul>
</li>
</ul>
<p><strong>In summary, there isn't a fixed number of types of approximation algorithms.</strong> Instead, the types are defined based on their approximation ratios and methods, which are often tailored to specific problems. The field is dynamic, with ongoing research discovering new algorithms and improving existing ones.</p>
<h3 id="heading-summary-of-common-approximation-ratios"><strong>Summary of Common Approximation Ratios</strong></h3>
<ul>
<li><p><strong>Exact Algorithms</strong> \(( \rho = 1 )\)<strong>:</strong></p>
<ul>
<li>Provide optimal solutions but are often impractical for NP-hard problems due to high computational complexity.</li>
</ul>
</li>
<li><p><strong>Constant-Factor Approximations:</strong></p>
<ul>
<li><p>\(\rho = \frac{1}{2}\)<strong>:</strong> Algorithms guarantee at least half the optimal value.</p>
</li>
<li><p>\(\rho = 2\)<strong>:</strong> Solutions are at most twice the optimal cost or size.</p>
</li>
</ul>
</li>
<li><p><strong>PTAS and FPTAS</strong> \(( \rho = 1 + \epsilon )\)<strong>:</strong></p>
<ul>
<li>Solutions can be made arbitrarily close to optimal by choosing a small ( \(\epsilon\) ).</li>
</ul>
</li>
<li><p><strong>Logarithmic Approximations</strong> \(( \rho = O(\log n) )\)<strong>:</strong></p>
<ul>
<li>Approximation ratio grows with the logarithm of the problem size.</li>
</ul>
</li>
</ul>
<h3 id="heading-conclusion"><strong>Conclusion</strong></h3>
<p>The field of approximation algorithms encompasses a wide range of algorithms with different approximation ratios, designed to tackle various optimization problems. The types and approximation ratios depend on:</p>
<ul>
<li><p>The specific problem and its computational complexity.</p>
</li>
<li><p>The algorithmic techniques applicable to the problem.</p>
</li>
<li><p>The desired balance between solution quality and computational efficiency.</p>
</li>
</ul>
<p><strong>Understanding these types helps in selecting appropriate algorithms for practical applications where exact solutions are unattainable due to time or resource constraints.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Key differences between 0-1 Knapsack Problem and Extended Greedy Knapsack (ExtGreedyKS) Algorithm]]></title><description><![CDATA[highlighting the differences between the 0-1 Knapsack Problem and the Extended Greedy Knapsack (ExtGreedyKS) Algorithm:]]></description><link>https://ai-eng.hashnode.dev/key-differences-between-0-1-knapsack-problem-and-extended-greedy-knapsack-extgreedyks-algorithm</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/key-differences-between-0-1-knapsack-problem-and-extended-greedy-knapsack-extgreedyks-algorithm</guid><category><![CDATA[ExtGreedyKS]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[knapsack]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sun, 17 Nov 2024 11:05:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/nuz3rK5iiKg/upload/1b4da80ae2b739f71abd0aec8a27496a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We are highlighting the differences between the <strong>0-1 Knapsack Problem</strong> and the <strong>Extended Greedy Knapsack (ExtGreedyKS) Algorithm</strong>:</p>
<hr />
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Aspect</strong></td><td><strong>0-1 Knapsack Problem</strong></td><td><strong>ExtGreedyKS Algorithm</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Definition</strong></td><td>An optimization problem where you select a subset of items, each with a weight and a value, to maximize total value without exceeding the knapsack's capacity. Each item can be taken either entirely or not at all (0 or 1).</td><td>A 1/2-approximation algorithm designed to solve the 0-1 Knapsack problem efficiently by combining a greedy approach with consideration of the single most valuable item.</td></tr>
<tr>
<td><strong>Objective</strong></td><td>Maximize the total value of the selected items without exceeding the knapsack's capacity.</td><td>Provide a solution with a total value that is at least half of the optimal value for the 0-1 Knapsack problem.</td></tr>
<tr>
<td><strong>Problem Type</strong></td><td><strong>Decision and Optimization Problem</strong>: Determines whether there's a subset of items fitting within capacity W with maximum total value.</td><td><strong>Algorithm/Approximation Method</strong>: An approach to find a near-optimal solution to the 0-1 Knapsack problem within a guaranteed approximation ratio.</td></tr>
<tr>
<td><strong>Item Selection</strong></td><td>Items are indivisible; you must decide to take an item entirely or leave it (binary choice).</td><td>Uses a combination of greedy selection based on value-to-weight ratio and consideration of the single item with the highest value that fits into the knapsack.</td></tr>
<tr>
<td><strong>Methodology</strong></td><td>Often solved using dynamic programming, backtracking, or branch and bound techniques to find the optimal solution.</td><td>Sorts items by value-to-weight ratio and builds two candidate solutions: one by greedily adding items, and another by selecting the single highest-value item that fits.</td></tr>
<tr>
<td><strong>Time Complexity</strong></td><td>Computationally intensive for large input sizes; the dynamic programming approach has <code>O(nW)</code> time complexity, where n is the number of items and W is capacity.</td><td>Runs in <code>O(nlog⁡n)</code> time due to sorting; efficient for larger input sizes compared to exact algorithms for the 0-1 Knapsack problem.</td></tr>
<tr>
<td><strong>Optimality</strong></td><td>Aims to find the exact optimal solution to maximizing total value within capacity constraints.</td><td>Provides a solution that is guaranteed to be at least 50% (1/2) of the optimal solution's total value; may not always find the exact optimal solution.</td></tr>
<tr>
<td><strong>Approach</strong></td><td>Evaluates all possible combinations (inherent in dynamic programming) to find the optimal subset of items.</td><td>Considers two options: (1) Greedy selection of items based on value-to-weight ratio, and (2) selecting the single most valuable item; choosing the better of the two.</td></tr>
<tr>
<td><strong>Use Cases</strong></td><td>Suitable when an exact solution is necessary, and the problem size is manageable; used in resource allocation, budgeting, and exact optimization scenarios.</td><td>Ideal for situations where a quick, reasonably good solution is acceptable; useful in large-scale problems where exact computation is impractical due to time constraints.</td></tr>
<tr>
<td><strong>Advantages</strong></td><td>- Finds the exact optimal solution.  </td></tr>
</tbody>
</table>
</div><p>- Comprehensive evaluation of possibilities ensures the best outcome. | - Faster than exact methods for large n.<br />- Simple to implement.<br />- Guarantees a solution within 50% of the optimal value. |
| <strong>Disadvantages</strong> | - Computationally expensive for large numbers of items or capacities.<br />- High memory usage in dynamic programming implementations. | - May not reach the optimal solution.<br />- Approximation ratio limited to 1/21/21/2; solutions can be significantly less than optimal in worst-case scenarios. |
| <strong>Example Scenario</strong> | Allocating a fixed budget across projects to maximize ROI when precise optimization is critical. | Quickly estimating the most valuable set of tasks to undertake when under time pressure and exact optimization is less critical. |</p>
<hr />
<p><strong>Explanation:</strong></p>
<ul>
<li><p><strong>0-1 Knapsack Problem:</strong></p>
<ul>
<li><p><strong>Nature of the Problem:</strong> A classic combinatorial optimization problem that's NP-hard.</p>
</li>
<li><p><strong>Solution Techniques:</strong> Typically involves dynamic programming for exact solutions, which can be time-consuming for large datasets.</p>
</li>
<li><p><strong>Optimal Solution:</strong> Guarantees the maximum possible total value without exceeding capacity, but computationally intensive.</p>
</li>
</ul>
</li>
<li><p><strong>ExtGreedyKS Algorithm:</strong></p>
<ul>
<li><p><strong>Purpose:</strong> Offers a practical solution when exact computation is infeasible.</p>
</li>
<li><p><strong>Mechanism:</strong></p>
<ul>
<li><p><strong>Greedy Approach:</strong> Prioritizes items with the highest value-to-weight ratio.</p>
</li>
<li><p><strong>Single Item Consideration:</strong> Ensures high-value items aren't overlooked due to their weight.</p>
</li>
</ul>
</li>
<li><p><strong>Performance Guarantee:</strong> Ensures the solution is at least half as good as the optimal one.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Key Differences Summarized:</strong></p>
<ul>
<li><p><strong>Exactness vs. Efficiency:</strong></p>
<ul>
<li><p>The 0-1 Knapsack problem seeks the exact optimal solution but may be inefficient for large inputs.</p>
</li>
<li><p>The ExtGreedyKS algorithm sacrifices exactness for efficiency, providing a solution quickly with a known approximation ratio.</p>
</li>
</ul>
</li>
<li><p><strong>Applicability:</strong></p>
<ul>
<li><p>Use the 0-1 Knapsack methods when the optimal solution is necessary, and computational resources are sufficient.</p>
</li>
<li><p>Apply the ExtGreedyKS algorithm when a good enough solution is acceptable, especially under time or resource constraints.</p>
</li>
</ul>
</li>
</ul>
<p><strong>Final Notes:</strong></p>
<ul>
<li><p>Understanding the trade-offs between the exact methods for the 0-1 Knapsack problem and the approximate nature of the ExtGreedyKS algorithm is crucial for selecting the appropriate approach based on the specific needs of a problem.</p>
</li>
<li><p>The ExtGreedyKS algorithm is especially valuable in real-world applications where decisions must be made rapidly, and an approximate solution is preferable to an exact one that requires excessive computation time.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Key differences between P, NP, NP-complete, and NP-hard]]></title><description><![CDATA[Problem Solving: P: Problems can be both solved and verified in polynomial time. NP: Problems may not be solved in polynomial time but can be verified in…]]></description><link>https://ai-eng.hashnode.dev/key-differences-between-p-np-np-complete-and-np-hard</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/key-differences-between-p-np-np-complete-and-np-hard</guid><category><![CDATA[polynominal time]]></category><category><![CDATA[np complete]]></category><category><![CDATA[NP-Hard]]></category><category><![CDATA[algorithm]]></category><category><![CDATA[design patterns]]></category><category><![CDATA[optimization]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sat, 16 Nov 2024 13:46:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/x8HupeZdK7Y/upload/ccad451d66914bda67f686ed3c0c9b79.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Category</strong></td><td><strong>P</strong></td><td><strong>NP</strong></td><td><strong>NP-complete</strong></td><td><strong>NP-hard</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Definition</strong></td><td>Problems that can be solved in polynomial time by a deterministic algorithm.</td><td>Problems whose solutions can be verified in polynomial time by a deterministic algorithm.</td><td>Problems that are both in NP and as hard as the hardest problems in NP (NP-hard and in NP).</td><td>Problems as hard as NP-complete problems but not necessarily in NP (not required to be verifiable in polynomial time).</td></tr>
<tr>
<td><strong>Key Characteristics</strong></td><td>Efficiently solvable in polynomial time.</td><td>Solution verification is efficient (polynomial time).</td><td>If any NP-complete problem is solved in polynomial time, all NP problems can be solved in polynomial time.</td><td>May not even be solvable or verifiable in polynomial time.</td></tr>
<tr>
<td></td><td>Verifiable and solvable in polynomial time.</td><td>Includes all problems in P.</td><td>Requires verification and reduction properties.</td><td>Includes optimization problems and undecidable problems.</td></tr>
<tr>
<td></td><td>A subset of NP problems.</td><td>May not be efficiently solvable.</td><td>Solving one in polynomial time solves all NP problems in polynomial time.</td><td>Not necessarily solvable or verifiable in polynomial time.</td></tr>
<tr>
<td><strong>Examples</strong></td><td>Sorting (e.g., Merge Sort), Searching</td><td>Boolean Satisfiability (SAT), Graph Coloring</td><td>3-SAT, Traveling Salesman (decision version)</td><td>Halting Problem, Bin Packing Problem</td></tr>
</tbody>
</table>
</div><h3 id="heading-key-differences">Key Differences:</h3>
<ol>
<li><p><strong>Problem Solving:</strong></p>
<ul>
<li><p><strong>P:</strong> Problems can be both solved and verified in polynomial time.</p>
</li>
<li><p><strong>NP:</strong> Problems may not be solved in polynomial time but can be verified in polynomial time.</p>
</li>
<li><p><strong>NP-complete:</strong> Problems are the hardest in NP and are solvable if any NP problem is solved in polynomial time.</p>
</li>
<li><p><strong>NP-hard:</strong> Problems are as hard as NP-complete but not necessarily in NP (i.e., they might not even have a verifiable solution in polynomial time).</p>
</li>
</ul>
</li>
<li><p><strong>Inclusion:</strong></p>
<ul>
<li><p><strong>P:</strong> Subset of NP.</p>
</li>
<li><p><strong>NP-complete:</strong> Subset of NP-hard.</p>
</li>
<li><p><strong>NP-hard:</strong> Not necessarily a subset of NP.</p>
</li>
</ul>
</li>
<li><p><strong>Implication:</strong></p>
<ul>
<li><p>Solving any <strong>NP-complete</strong> problem in polynomial time implies P=NP.</p>
</li>
<li><p>Solving an <strong>NP-hard</strong> problem does not necessarily affect P=NP, as NP-hard problems might not be verifiable.</p>
</li>
</ul>
</li>
</ol>
<h3 id="heading-math-relationship">Math Relationship:</h3>
<ul>
<li><p><strong>P ⊆ NP.</strong></p>
</li>
<li><p><strong>NP-complete ⊆ NP.</strong></p>
</li>
<li><p><strong>NP-complete ⊆ NP-hard.</strong></p>
</li>
<li><p><strong>NP-hard</strong> includes problems that might not belong to NP.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Key differences between the Knapsack Problem and the Bin Packing Problem]]></title><description><![CDATA[Objective Maximize the total value of items packed into a single knapsack. Minimize the number of bins needed to pack all items. Number of Containers Only…]]></description><link>https://ai-eng.hashnode.dev/key-differences-between-the-knapsack-problem-and-the-bin-packing-problem</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/key-differences-between-the-knapsack-problem-and-the-bin-packing-problem</guid><category><![CDATA[knapsak]]></category><category><![CDATA[bin packing]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[Algorithm Design]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Fri, 15 Nov 2024 18:36:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/jLwVAUtLOAQ/upload/19d766bd1286236c4eb3ec1fef999314.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="hn-table">
<table>
<thead>
<tr>
<td>Feature</td><td>Knapsack Problem</td><td>Bin Packing Problem</td></tr>
</thead>
<tbody>
<tr>
<td></td></tr>
</tbody>
</table>
</div><table><tbody><tr><td><p><strong>Objective</strong></p></td><td><p>Maximize the total value of items packed into a single knapsack.</p></td><td><p>Minimize the number of bins needed to pack all items.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Number of Containers</strong></p></td><td><p>Only one knapsack (container) is available.</p></td><td><p>Multiple bins (containers) are available.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Capacity Constraint</strong></p></td><td><p>The knapsack has a fixed capacity that cannot be exceeded.</p></td><td><p>Each bin has a fixed capacity, but you can use as many bins as needed.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Item Selection</strong></p></td><td><p>Not all items have to be packed; select a subset that maximizes value within the capacity.</p></td><td><p>All items must be packed into the bins.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Focus</strong></p></td><td><p>Choosing items with the highest value-to-weight ratio.</p></td><td><p>Efficiently packing all items to minimize the number of bins used.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Item Value</strong></p></td><td><p>Each item has an associated weight and value.</p></td><td><p>Items have only weight; no value is associated with them.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Type of Problem</strong></p></td><td><p>Optimization problem (maximization).</p></td><td><p>Combinatorial problem (minimization).</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Typical Approach</strong></p></td><td><p>Use dynamic programming or greedy algorithms to maximize value.</p></td><td><p>Use greedy or heuristic algorithms to minimize bin usage.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Example</strong></p></td><td><p>Packing a backpack with the most valuable items without exceeding weight.</p></td><td><p>Packing boxes in a truck, minimizing the number of trips required.</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Common Variants</strong></p></td><td><p>0/1 Knapsack, Fractional Knapsack, Multi-dimensional Knapsack</p></td><td><p>One-dimensional Bin Packing, Two-dimensional Packing</p></td></tr></tbody></table>

<table><tbody><tr><td><p><strong>Complexity</strong></p></td><td><p>NP-complete for 0/1 Knapsack and bin packing.</p></td><td><p>NP-complete, especially for the one-dimensional bin packing problem.</p></td></tr></tbody></table>]]></content:encoded></item><item><title><![CDATA[Comparison between Model-Based Q-Learning Vs. Model-Free Q-Learning]]></title><description><![CDATA[A comparison table between Model-Based Q-Learning and Model-Free Q-Learning: Model-Based Q-Learning requires a model of the environment (transition and…]]></description><link>https://ai-eng.hashnode.dev/comparison-between-model-based-q-learning-vs-model-free-q-learning</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/comparison-between-model-based-q-learning-vs-model-free-q-learning</guid><category><![CDATA[reinforment]]></category><category><![CDATA[qlearning]]></category><category><![CDATA[Temporal Difference Learning]]></category><category><![CDATA[Monte Carlo Learning]]></category><category><![CDATA[RL]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Thu, 14 Nov 2024 10:40:44 GMT</pubDate><content:encoded><![CDATA[<p>A comparison table between <strong>Model-Based Q-Learning</strong> and <strong>Model-Free Q-Learning</strong>:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Aspect</strong></td><td><strong>Model-Based Q-Learning</strong></td><td><strong>Model-Free Q-Learning</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Definition</strong></td><td>Uses a model of the environment (transition and reward functions) to make decisions.</td><td>Learns directly from interactions with the environment, without using a model.</td></tr>
<tr>
<td><strong>Environment Knowledge</strong></td><td>Requires a model of the environment, which includes the transition probabilities and reward functions.</td><td>Does not require a model. It learns from trial and error, interacting with the environment.</td></tr>
<tr>
<td><strong>Learning Process</strong></td><td>Learns a model (transition and reward functions) first, then plans using the model to select actions.</td><td>Directly learns Q-values through trial-and-error interaction with the environment.</td></tr>
<tr>
<td><strong>Exploration</strong></td><td>Can use the model to simulate actions and explore potential states before actually taking actions.</td><td>Requires exploration (typically through epsilon-greedy or other policies) to update Q-values.</td></tr>
<tr>
<td><strong>Efficiency</strong></td><td>More efficient if the model is accurate, as planning with a model can reduce the number of real-world interactions needed.</td><td>Typically requires more interactions with the environment to converge to optimal policies.</td></tr>
<tr>
<td><strong>Real-World Interaction</strong></td><td>Fewer real-world interactions may be required after learning the model, as the agent can simulate outcomes.</td><td>Requires many real-world interactions for learning, as it only uses actual experiences.</td></tr>
<tr>
<td><strong>Memory Requirements</strong></td><td>Requires storing the model of the environment (transition probabilities, reward functions).</td><td>Requires storing Q-values for each state-action pair (less complex in terms of memory).</td></tr>
<tr>
<td><strong>Computation Cost</strong></td><td>Potentially high due to the need to maintain and update the model, especially for complex environments.</td><td>Generally has lower computation cost, as it only needs to update Q-values based on observed rewards.</td></tr>
<tr>
<td><strong>Accuracy</strong></td><td>Accuracy depends on the quality of the learned model (if the model is inaccurate, the agent may make suboptimal decisions).</td><td>The agent directly learns from experience, so the accuracy depends on sufficient exploration and sufficient learning over time.</td></tr>
<tr>
<td><strong>Adaptability</strong></td><td>Can adapt quickly if the model is able to capture changes in the environment (model can be updated).</td><td>May take longer to adapt, as learning is based solely on the observed interactions with the environment.</td></tr>
<tr>
<td><strong>Example Algorithms</strong></td><td>Dyna-Q, Monte Carlo Tree Search (MCTS), Value Iteration, Dynamic Programming.</td><td>Standard Q-Learning, SARSA, Deep Q-Network (DQN), Double Q-Learning.</td></tr>
<tr>
<td><strong>Suitability for Complex Environments</strong></td><td>Better suited for environments where the transition dynamics and rewards are difficult to learn purely from experience (e.g., planning in a simulated environment).</td><td>More suitable for environments where the model is unknown and can only be learned from interaction, such as large state-action spaces or real-time applications.</td></tr>
</tbody>
</table>
</div><h3 id="heading-key-differences">Key Differences:</h3>
<ol>
<li><p><strong>Model-Based Q-Learning</strong> requires a model of the environment (transition and reward functions) and can plan based on that model. It tries to predict outcomes and optimize decisions before actually interacting with the environment.</p>
</li>
<li><p><strong>Model-Free Q-Learning</strong> directly learns from interactions with the environment. It updates its Q-values through experience without relying on a pre-defined model of the environment.</p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[🚀 Exploring the Differential Transformer: A New Milestone in AI Architecture]]></title><description><![CDATA[The evolution of transformer models continues with the introduction of the Differential Transformer, designed to optimize long-context learning and…]]></description><link>https://ai-eng.hashnode.dev/exploring-the-differential-transformer-a-new-milestone-in-ai-architecture</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/exploring-the-differential-transformer-a-new-milestone-in-ai-architecture</guid><category><![CDATA[AI]]></category><category><![CDATA[nlp]]></category><category><![CDATA[transformers]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sat, 26 Oct 2024 14:02:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1729951183677/a6dcd1d7-5db2-488d-a938-ef0142099128.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The evolution of transformer models continues with the introduction of the <strong>Differential Transformer</strong>, designed to optimize long-context learning and minimize noise in multi-head attention mechanisms.</p>
<h3 id="heading-key-innovations">Key Innovations:</h3>
<ol>
<li><p><strong>Multi-Head Differential Attention</strong>: Enhances focus on relevant data, reducing noise and improving model accuracy.</p>
</li>
<li><p><strong>SwiGLU Activation</strong>: A novel feed-forward module that improves in-context learning by adjusting input flow dynamically.</p>
</li>
<li><p><strong>Layer Efficiency</strong>: Implements RMSNorm and learnable matrices for better parameter optimization.</p>
<p> This architecture significantly enhances language model performance, showing promising results in tasks like text summarization and question answering by minimizing common issues like hallucinations.</p>
<p> With applications in large-scale NLP tasks and beyond, the Differential Transformer is a cutting-edge contribution to AI research.</p>
<p> For more details, check out the full paper here: <a target="_blank" href="https://arxiv.org/pdf/2410.05258">arXiv:2410.05258</a></p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[What is UTXO in Blockchain?]]></title><description><![CDATA[In the blockchain world, specifically in cryptocurrencies like Bitcoin, UTXO stands for Unspent Transaction Output. Here's a simplified explanation…]]></description><link>https://ai-eng.hashnode.dev/what-is-utxo-in-blockchain</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/what-is-utxo-in-blockchain</guid><category><![CDATA[Bitcoin]]></category><category><![CDATA[Blockchain]]></category><category><![CDATA[Smart Contracts]]></category><category><![CDATA[UTXO]]></category><category><![CDATA[transactions]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Thu, 18 Apr 2024 14:15:30 GMT</pubDate><content:encoded><![CDATA[<p>In the blockchain world, specifically in cryptocurrencies like Bitcoin, UTXO stands for Unspent Transaction Output. Here's a simplified explanation:</p>
<p>Imagine you have a piggy bank full of coins (these represent the UTXOs). Each coin has a value, like 1 dollar, 5 dollars, etc. When you want to buy a candy bar, you smash open the piggy bank, take out enough coins to pay for it, and hand them over. The shopkeeper takes the coins, gives you the candy, and also gives you back some change if you paid too much.</p>
<p>In blockchain terms:</p>
<ul>
<li><p>Smashing the piggy bank = Choosing which UTXOs to use for a transaction.</p>
</li>
<li><p>Coins you hand over to the shopkeeper = Inputs of the transaction.</p>
</li>
<li><p>Change you receive back = New UTXOs created by the transaction.</p>
</li>
</ul>
<p>So, a UTXO is basically digital currency that hasn't been spent yet. Each UTXO represents a chunk of cryptocurrency that can be used in a future transaction. The blockchain keeps track of all UTXOs, which together form the total balance of a cryptocurrency wallet. When you make a transaction, you essentially "spend" some UTXOs by inputting them into the transaction, and "receive" change in the form of new UTXOs to your wallet. It's a way to keep track of who owns what without having a central record-keeper like a bank.</p>
]]></content:encoded></item><item><title><![CDATA[How to get exact Object typeof in JavaScript/JS]]></title><description><![CDATA[The built-in method in JavaScript will help you get the exact object data type extracted for validation or type checking.]]></description><link>https://ai-eng.hashnode.dev/how-to-get-exact-object-typeof-in-javascriptjs</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/how-to-get-exact-object-typeof-in-javascriptjs</guid><category><![CDATA[js advance]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[javascript framework]]></category><category><![CDATA[tips]]></category><category><![CDATA[js]]></category><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Thu, 29 Feb 2024 18:15:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1709230161314/2ab7dd6a-be86-48a9-a5dc-b0587505478d.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In these tips, I will share a built-in method in JavaScript that will help you get exact object data type extract for validation or type checking.</p>
<h2 id="heading-problem-raised">Problem Raised:</h2>
<p>So, let's start as you can see below picture where I use type for data type checking but when we want to check between the Array and Object it will show the same output object data type because JavaScript is treated as the object but as a human, we see different data type.</p>
<p><a target="_blank" href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Ifwr-fp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gqf9pwwfwusgdw2gk6w.png"><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Ifwr-fp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gqf9pwwfwusgdw2gk6w.png" alt="using typeof for object data type checking" /></a></p>
<h2 id="heading-solution">Solution</h2>
<p>Now we can handle this data type checking using the getPrototypeOf method and its constructor property. Below the picture, you can see the different types of data shown in the output Object is return true and Array is return false. Keep in mind it is very useful when you need exactly object and array type checking.</p>
<p><a target="_blank" href="https://res.cloudinary.com/practicaldev/image/fetch/s--SF6H0hmT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m6uek04vmyy9j0r563p.png"><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SF6H0hmT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m6uek04vmyy9j0r563p.png" alt="using constructor method for object data type checking" /></a></p>
<h2 id="heading-are-you-thinking-of-a-real-life-use-case">Are you thinking of a real-life use case?</h2>
<p>Well, let's see the use case suppose you have an API endpoint you don't know after fetching the data will show in an array or object. Or you have an endpoint but the endpoint randomly gives data using sometimes object and sometimes an array, now you need to ensure which type of data comes each time.</p>
<p>Below the image, I demonstrate using a fake API that gives random output in array and object. I check if the data type array just simply passes it to another function for the next task. Else if the condition checks the exact object data type and spreads that object then wraps it in the array.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> getProducts =<span class="hljs-function">()=&gt;</span>{
<span class="hljs-comment">//hit the apt endpotnt using queryfetch(</span>
fetch(<span class="hljs-string">`https://api.ecommerce.com/random-products`</span>)
.then(<span class="hljs-function">(<span class="hljs-params">res</span>)=&gt;</span> res.json( ))
.then(<span class="hljs-function">(<span class="hljs-params">data</span>)=&gt;</span> {<span class="hljs-keyword">if</span>(data <span class="hljs-keyword">instanceof</span> <span class="hljs-built_in">Array</span>)
{<span class="hljs-comment">//checking the response if data is array</span>
<span class="hljs-built_in">console</span>.log(data);
}
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(<span class="hljs-number">0</span>bject.getPrototype0f(data).constructor === <span class="hljs-number">0</span>bject){
<span class="hljs-comment">//checking strictly get object data type</span>
<span class="hljs-keyword">const</span> createArray =[{...data }];<span class="hljs-comment">//spread the objects value and key</span>
<span class="hljs-built_in">console</span>.log(createArray);
};
getProducts();<span class="hljs-comment">//invoking the function</span>
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Integrate Contentful with React JS for the blog post]]></title><description><![CDATA[Why is Array also treated as an Object type in JavaScript/JS?]]></description><link>https://ai-eng.hashnode.dev/integrate-contentful-with-react-js-for-the-blog-post</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/integrate-contentful-with-react-js-for-the-blog-post</guid><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Thu, 29 Feb 2024 17:52:45 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1709229143955/96bedb72-9f0a-4de6-8992-ab9d2c752624.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Why is Array also treated as an Object type in JavaScript/JS?</p>
]]></content:encoded></item><item><title><![CDATA[How to use HTML form.checkValidity() || how is chekValidity() method works]]></title><description><![CDATA[checkValidity() is a HTML5 method and When the checkValidity() method is invoked, if the element is a candidate for constraint validation and does not…]]></description><link>https://ai-eng.hashnode.dev/how-to-use-html-formcheckvalidity-how-is-chekvalidity-method-works</link><guid isPermaLink="true">https://ai-eng.hashnode.dev/how-to-use-html-formcheckvalidity-how-is-chekvalidity-method-works</guid><dc:creator><![CDATA[Rasel Mahmud]]></dc:creator><pubDate>Sat, 03 Feb 2024 17:07:47 GMT</pubDate><content:encoded><![CDATA[<p><code>checkValidity()</code> is a HTML5 method and</p>
<blockquote>
<p>When the checkValidity() method is invoked, if the element is a candidate for constraint validation and does not satisfy its constraints, the user agent must fire a simple event named invalid that is cancelable (but in this case has no default action) at the element and return false. Otherwise, it must only return true without doing anything else.</p>
</blockquote>
]]></content:encoded></item></channel></rss>