teleren/devto huggingface dataset:
Need help in SvelteKit query based tab navigation.
Tags: javascript, beginners, webdev, help
Published: 2024-05-31 07:50:29

Trying to create tab based navigation in sveltekit which loads data from `+page.server.js` based on what tab is selected. the active tab is selected from the url query `?mode=tabname` . Below is the snippet taken from a large project but I narrowed the issue down to this boilerplate code.

`+page.svelte`

```svelte
<script>
    import { page } from "$app/stores";

    export let data;

    $: mode = $page.url.searchParams.get("mode");
</script>

<section>
    <nav>
        <a href="?mode=list">list</a>
        <a href="?mode=add">add</a>
    </nav>
    {#if mode == "list"}
        <table>
            <tr>
                <th>id</th>
                <th>name</th>
            </tr>
            {#each data.list as l (l.id)}
                <tr>
                    <td>{l.id}</td>
                    <td>{l.name}</td>
                </tr>
            {/each}
        </table>
    {:else if mode == "add"}
        <form action="">
            <input type="text" name="name" />
            <button type="submit">save</button>
        </form>
    {:else}
        <b>Select an option from above</b>
    {/if}
</section>
```

`+page.server.js`

```js
export const load = async ({ url }) => {
    // maybe needed in both tabs.
    const info = {
        appname: "demo",
    };
    // only needed in "list" tab.
    const list = [
        { id: 1, name: "test one" },
        { id: 2, name: "test two" },
        { id: 3, name: "test three" },
    ];

    // Previously, I was returning all the data
    // without detecting any tab.
    // There was no problem with it apart from
    // performance issues
    // return {
    //     info,
    //     list,
    // };

    // seperating the returned data based on tab name
    // that's when the issue arise
    const mode = url.searchParams.get("mode");
    if (mode == "list") {
        return {
            info,
            list,
        };
    } else if (mode == "add") {
        return {
            info,
        };
    }};
```

After navigation from 'list' to 'add' tab, this error is thrown in chrome console:

```console
chunk-ERBBMTET.js?v=7f9a88c7:2609 Uncaught (in promise) Error: {#each} only works with iterable values.
    at ensure_array_like_dev (chunk-ERBBMTET.js?v=7f9a88c7:2609:11)
    at Object.update [as p] (+page.svelte:18:29)
    at Object.update [as p] (+page.svelte:12:35)
    at update (chunk-ERBBMTET.js?v=7f9a88c7:1351:32)
    at flush (chunk-ERBBMTET.js?v=7f9a88c7:1317:9)
```
Looks like it's complaining about `data.list` even after navigation to the tab which does not even need `data.list`. returning both `info` and `list` object for every tab solves the issue and also wrapping the `#each` block in `#if` block does the trick eg:

```svelte
{#if data.list}
    {#each data.list as l (l.id)}
      <tr>
        <td>{l.id}</td>
        <td>{l.name}</td>
      </tr>
    {/each}
{/if}
```
Given that I'm not very experienced in SvelteKit, I not sure what am I doing wrong. Any help is appriciated. Thanks
What was your win this week? 🙌
Tags: discuss, weeklyretro
Published: 2024-05-31 07:47:00

Heyo! 👋

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Cookin' up a delicious meal for a loved one 🥘


![A tiny cute hamster laying rolling up in a blanket and eating a carrot. It's holding the carrot with its cute little hands and looking directly into the camera as it munches away contently.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzg696q2zxki9sk0jr4w.gif)
The Ultimate Guide to Dog Breeds, Health, and Care: Your Furry Friend's Well-Being A to Z
Tags: mdogsw
Published: 2024-05-31 07:45:28

Dogs are truly amazing creatures – loyal companions, playful pals, and sometimes even our emotional support systems.  But with hundreds of dog breeds, each with unique traits and needs, navigating the world of dog ownership can be a bit overwhelming. This guide is designed to help you make informed decisions about your furry friend's breed, health, and overall well-being.

## Choosing the Right Breed:

Size and Energy Level: Do you live in a small apartment or have a sprawling yard? Are you an active runner or more of a couch potato? Your lifestyle will largely dictate what size and energy level of dog will thrive in your home.
Temperament: Do you want a cuddly lapdog or a high-energy working breed? Research breed temperaments carefully to ensure a good fit for your personality and household.
Grooming Needs: Some breeds require daily brushing, frequent haircuts, or even professional grooming. Be realistic about the time you can commit to grooming.
Purpose: Were you looking for a family dog, a guard dog, or a hunting companion? Breeds have been developed for specific purposes, so consider your needs.

## Essential Dog Health Care:

Nutrition: High-quality dog food appropriate for your dog's age, breed, and activity level is crucial. Consult your veterinarian for specific recommendations.
Exercise: Regular exercise is essential for physical and mental well-being. The amount and type of exercise will vary depending on your dog's breed and age.
Veterinary Care: Schedule regular checkups, vaccinations, and preventative care to keep your dog in top shape.
Dental Care: Brush your dog's teeth regularly to prevent dental disease, a common issue in dogs.

## Common Health Issues in Dogs:

Breed-Specific Conditions: Many breeds are prone to certain health conditions, such as hip dysplasia, eye problems, or heart disease. Research your breed's potential issues so you can be proactive about care.
Parasites: Fleas, ticks, and heartworms can cause serious health problems. Regular preventative medications are essential.
Obesity: Overweight dogs are at risk for a variety of health issues. Maintain a healthy weight through diet and exercise.

## Dog Care Tips:

Training: Training isn't just about obedience; it's about communication and bonding with your dog. Start early and use positive reinforcement methods.
Socialization: Expose your dog to different people, animals, and environments to help them become well-adjusted.
Grooming: Regular grooming helps keep your dog's coat healthy and prevents matting.
Mental Stimulation: Provide toys, puzzles, and games to keep your dog mentally engaged and prevent boredom.

## Conclusion:

Owning a dog is a joy, but it's also a responsibility.  By understanding your dog's breed, providing proper care, and addressing potential health issues, you can ensure that your furry friend lives a happy, healthy, and fulfilling life by your side. You can refer to the information for free [https://mdogsw.com/dog-nutrition/freeze-fresh-dog-food/](https://mdogsw.com/dog-nutrition/freeze-fresh-dog-food/)
Mastering the FNP Certification: Guide to the Ultimate Review Book
Published: 2024-05-31 07:25:07

Preparing for the Family Nurse Practitioner (FNP) certification exam requires comprehensive review and practice. An essential resource in this endeavor is a high-quality [FNP review book](https://www.npcourses.com/product/barkleys-curriculum-review-for-family-nurse-practitioners/). Such a book serves as a study guide and a critical tool in bridging the gap between nursing knowledge and clinical application.

## Choosing the Right FNP Review Book
A top-tier [FNP review book](https://www.npcourses.com/product/barkleys-curriculum-review-for-family-nurse-practitioners/) encompasses various topics crucial for exam preparation, including patient assessment, diagnosis, pharmacology, and management across multiple conditions and age groups. It offers an in-depth look at adult and pediatric care, ensuring practitioners are well-prepared for the broad spectrum of family practice.

The ideal FNP review book blends theoretical knowledge and practical application, emphasizing evidence-based practices. It includes numerous practice questions, mirroring the format of the certification exam, to test comprehension and readiness. Moreover, explanations for correct and incorrect answers are invaluable for understanding complex concepts and improving critical thinking skills.

## A Guide to Enhanced Learning
Additionally, a well-structured review book is organized by body systems or practice areas, providing a sense of security to readers. This structure makes it easier to focus on specific topics or identify areas where further study is needed, reassuring nurses about their exam readiness. This organization aids in efficient study sessions and enhances retention.

Accessibility and clarity are also key features of a practical FNP review book. It should be written in clear, concise language that is easy to understand, with key points highlighted for quick review. Resources such as charts, tables, and bullet points can facilitate learning and memorization.

Ultimately, the best FNP review book is one that supports nurses in their journey to becoming certified family nurse practitioners. It not only aids in passing the certification exam but also in reinforcing a strong clinical foundation for future practice. With the right review book, FNPs can approach their exams with a sense of accomplishment, knowing they are well-prepared to deliver high-quality patient care.
ED Problem Solution In Men| Sildalist Strong 140mg Firstchoicemedss
Tags: firstchoicemedss, men, health
Published: 2024-05-31 07:38:05

Diet is one of the important factors that is responsible for ED problems in Men. [Buy Sildalist Strong 140mg form Firstchoicesmedss](https://www.firstchoicemedss.com/sildalist-strong-140mg.html
) a powerful medicine to treat ED problems in men. Many factors are the main cause of this problem. A poor diet high in processed food, unhealthy fats, and sugar causes high blood pressure, obesity, and other health issues that cause Erectile Dysfunction. A healthy diet that includes fruits, green vegetables, milk, and lean protein is good for dealing with any health problem in the body.
Unlocking Savings and Convenience: Your Guide to Mercy Smart Square
Published: 2024-05-31 07:37:05

**Introduction:
**Welcome to Mercy Smart Square – your gateway to a world of savings and convenience! In this comprehensive guide, we'll delve into everything you need to know about Mercy Smart Square, from its array of services to tips on maximizing your experience. Whether you're a visitor or a regular, get ready to discover how Mercy Smart Square can streamline your healthcare journey while saving you time and money.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j9udtwvs3vuhtwo1go59.jpg)

**What is Mercy Smart Square?**
Mercy Smart Square is more than just a traditional healthcare facility – it's a revolutionary platform designed to enhance your healthcare experience. From online appointment scheduling to prescription refills, Mercy Smart Square puts the power of healthcare management directly into your hands.

**Key Features and Services:
**
1) Online Appointment Scheduling: Say goodbye to long wait times on the phone. With Mercy Smart Square, you can conveniently schedule appointments online, anytime, anywhere.
Prescription Refills: Running low on medication? Simply request a refill through Mercy Smart Square's easy-to-use platform and pick it up at your convenience.

2) Health Records Access: 
Access your health records securely from the comfort of your own home. Mercy Smart Square allows you to view test results, medication history, and more with just a few clicks.

3) Virtual Visits: Need medical advice but can't make it to the office? Mercy Smart Square offers virtual visits, allowing you to consult with a healthcare provider from your smartphone or computer.

**How to Get Started:
**
Getting started with Mercy Smart Square is quick and easy.
 Simply visit [mercysmartsquare.com](https://mercysmartsquare.com/) 
to explore the full range of services available. From there, create an account to access exclusive features and start managing your healthcare on your terms.

**Why Choose Mercy Smart Square?
**
1) Convenience: With Mercy Smart Square, you can manage your healthcare needs on your schedule, without the hassle of traditional methods.
2) Savings: Save time and money with features like online appointment scheduling and prescription refills, allowing you to focus on what matters most – your health.
3) Peace of Mind: Rest easy knowing that your healthcare information is secure and easily accessible whenever you need it.

**Conclusion:
**Mercy Smart Square is revolutionizing the way you manage your healthcare. Explore our website, sign up for an account, and discover the countless benefits that await you. Your journey to better health starts here at Mercy Smart Square.
Cara Beli Game di Steam, Bayar dengan DANA
Tags: dana, steam, gameandroid
Published: 2024-05-31 07:12:50

Bermain game lewat PC bisa jadi salah satu opsi untuk mengusir rasa bosan atau mengisi waktu luang saat istirahat. Tapi download permainan di PC tidak sama seperti lewat HP. Kalau ada permainan berbayar, kamu bisa download dengan cara beli game di Steam yang harganya terjangkau.

Steam merupakan platform online yang menyediakan ribuan game PC, baik yang gratis maupun berbayar. Kamu dapat ...more https://www.dumados.com/2024/05/cara-beli-game-di-steam-bayar-dengan.html
Bit Treasury - Enhancing User Security
Published: 2024-05-31 07:12:28

Bit Treasury is an American decentralized exchange headquartered in Albany (the capital of New York State). In 2020, Bit Treasury announced that it would no longer recognize Albany as their headquarters, but declared that it would adopt a remote working model, so employees are distributed in offices around the world, and there is no so-called "headquarters" concept.

Bit Treasury was founded in September 2012 and launched services for trading Bitcoin in April 2013. In 2015, Bit Treasury decided to expand the range of cryptocurrencies it could trade, so it established a separate cryptocurrency exchange to meet investors' trading needs. Obtained New York State Bitcoin trading license on March 26, 2018. Today, Bit Treasury has approximately 48 million verified users, 8,000 institutions and 134,000 ecosystem partners in more than 100 countries.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apwccezcex3f484m8lsh.jpg)

The main features of Bit Treasury exchange:
·The seventh Bitcoin exchange in the United States to hold a formal license
·Bit Treasury Exchange has purchased insurance to provide investors with certain asset protection
· Supports fiat currency purchases of Bitcoin, with an extensive network of banking partners, and can transact via EFT payments, ACH/SWIFT/SEPA transfers, and credit cards and PayPal
·The transaction fee is between 0% and 0.5%, which is determined by the pending order and non-pending order transactions, as well as the size of the transaction amount. And using competitive charging, users’ fees are tiered based on their position size and transaction frequency.
·The institutional account trading channel with the lowest asset threshold

Who is the founder of Bit Treasury exchange:
Andrew Norton, founder and CEO of Bit Treasury Exchange, is a former high-frequency trading software developer of Goldman Sachs Group.
As the world's leading cryptocurrency exchange, Bit Treasury not only provides users with a choice of low-threshold institutional account trading types for cryptocurrency, but also spans the entire ecosystem.

Is Bit Treasury exchange safe?
Bit Treasury is considered a relatively safe cryptocurrency exchange with robust systems in place to ensure the security of customer accounts, including the use of 2FA verification, FDIC-insured USD balances, device management, address whitelisting, and cold storage setup.
In addition, Bit Treasury adopts a threshold signature scheme to ensure the security of user funds, which is an encryption protocol for distributed key generation and signatures. It allows the construction of signatures distributed among different parties, with each user receiving a copy of the private signing key. For example, if there are three users, at least two of them need to join in order to sign the transaction.
In addition to depositing funds at centralized cryptocurrency exchanges, users can also choose to transfer funds to reputable wallets.
Cara Beli Paket Extra Kuota Telkomsel Via Website Resmi
Tags: telkomsel, tsel
Published: 2024-05-31 07:10:20

Kuota internet habis tapi masa aktifnya masih panjang? Coba deh tambah kuotanya dengan cara beli Paket Extra Kuota Telkomsel. Paket data internet ini dapat dibeli oleh semua pengguna Telkomsel dengan beberapa syarat dan ketentuan pastinya.

Telkomsel memang jadi salah satu provider yang menyediakan ragam paket data internet. Salah satunya... more https://www.dumados.com/2024/05/cara-beli-paket-extra-kuota-telkomsel.html
About SELENIUM
Published: 2024-05-28 18:31:11

- Selenium is the framework, helps to test the web application in various browsers like fire fox, chrome,opera. 
- It's an open source automated testing tool.
- Its also supports the all the operating systems like windows,Linux, internet explorer,MS edge.
- In selenium test can be coded in many languages like Java, python,perl,PHP and Ruby.
- It's easy to use, primarily developed in Java script.

**Advantages **

1. Time efficiency, when it's comes to manual, each and every test cases we need to check manually, and we need to submit it, it consumes more time and manpower too.
2. Open source availability - biblically can available, multiple browser support.
3. Easy for implementation, reuse ability and integration 
4. Flexibility, more efficient with selenium features 
5. Reduce the duplicates, minimize the complications
6. Easy to learn and use
7. Parallel test execution, multiple files execution

**Selenium for automation**

1. Selenium (IDE)
2. Selenium (RC)
3. Selenium WebDriver
4. Selenium Grid 

**Selenium (IDE)**

- Selenium Integrated Development Environment .
- Simplest framework, not required any code.
- it is an easy-to-use interface that records the user interactions to build automated test scripts. 
- It was mainly developed to speed up the creation of automation scripts.

**Selenium (RC)**

- Selenium Remote Control.
- It is supports only the language selenium remote control. 
- This is the 1st automated web testing tool, where we can write the code using programming language.
- Here will just write the code using selenium, here only we can able to write the code only, it will not support anything apart from that other functionality like API and SQL. 

**Selenium WebDriver**

- It will be better than other components like Selenium (IDE),Selenium (RC)and Selenium Grid.
- It will support all the web driver actions and automation tool.
- Here we are the client & server, is the one where we are accessing the data.
- Its the 1st cross platform testing framework.
- It served as a programming interface to create and run test cases.

**Selenium Grid **

- It was developed to minimize the execution time of selenium automation testing.
- It allows parallel execution with different browsers & different operating systems.
- It Provide an easy way to run tests on multiple machines
Bếp chiên công nghiệp chất lượng cao, chính hãng, giá tốt
Published: 2024-05-31 07:01:47

https://bepchienthucpham.com/ NEWSUN chuyên phân phối các loại bếp chiên công nghiệp, bếp chiên nhúng, bếp chiên điện ✔️Chính hãng ✔️Bảo hành lâu dài ✔️tiết kiệm 📞0961.65.2266 t.vấn miễn phí
28 Ng. 168 Đ. Nguyễn Xiển, Hạ Đình, Thanh Xuân, Hà Nội 10000
0961.65.2266
#bepchien #bepchiencongnghiep #benchiennhung #bepchiendien
https://bepchienthucpham.zohosites.com
https://hashnode.com/@bepchienthucpham
https://hackmd.io/@bepchienthucpham
GitHub Education (Free Access) Recommended for Students
Tags: github, engineer, developer, resource
Published: 2024-05-31 06:54:48

## Did you know GitHub offers a student plan for free?
I regret not joining GitHub Education since when I was a freshman. I wish I had known about this much earlier so wanted to share this valuable resource with current students. Here's everything you need to know about GitHub Education and how to join.

## What is GitHub Education?
GitHub Education is a program designed to support students, educators, and schools with free access to GitHub's premium features and numerous other developer tools and resources. The program's goal is to provide students with the best possible tools and resources to enhance their learning and prepare them for their future careers in technology.

## Benefits of GitHub Education for Students
GitHub Education offers the following benefits to students:

**1. GitHub Student Developer Pack:**
This pack includes free access to the best developer tools such as cloud services, coding tools, and courses.

**2. GitHub Pro:**
Students get free access to GitHub Pro, which includes advanced collaboration tools, unlimited private repositories, and a customizable GitHub profile.

**3. Free domains and hosting:**
Through partners, students can get free domains and web hosting services to deploy their projects.

**4. Learning resources:**
Access to courses and learning resources from platforms like LinkedIn Learning, Educative, and more.

**5. Collaboration tools:**
Use of advanced GitHub features like pull requests, code reviews, project management tools, and team collaboration features.

## Steps to Join GitHub Education
Joining GitHub Education is simple. Follow these steps to get started:

**1. Create a GitHub Account:**
If you don't already have a GitHub account, sign up at [GitHub](https://github.com/). You'll need a valid email address to create an account.

**2. Verify Your Student Status:**
Go to the [GitHub Education page](https://github.com/edu/), and then click on "Join GitHub Education" to start the application process. 
![GitHub Education1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gnf32i3f3j471izrgxw.png) Fill out the application form with the necessary details, including a school-issued email address, a student ID card, or other official documentation from your institution, to verify your student status. 
![GitHub Education2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64y9ss320u5ufncrc5rz.png)

**3. Wait for Approval:**
GitHub will review your application and verify your student status. In my case, this process took almost 3 days. Once approved, you'll receive an email confirming your access to the GitHub Student Developer Pack and other GitHub Education benefits. 
![GitHub Education3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0yynlzdawjq16999sfql.png)


If you're a student, leveraging the GitHub Education plan can significantly enhance your learning experience and provide you with the tools and resources needed to excel in your studies and future career. Don't miss out on this opportunity!