teleren/devto huggingface dataset:
How to bind text in Vue.js?
Tags: vue
Published: 2023-02-28 18:23:44

Normally we know inside of a sfc file there are three high level portions. 

1. tempalte as html
2. script as js
3. style as css

Binding means creating a relation between teamplate and script's data property. You may ask what is data property? Data properties are a list of property of an object which is returned by a method called data.

There are two ways to bind text in Vue.js 
1.using mustache syntax
2.using special html propery that start with prefix v-text

Here mustache syntax can be used multiple times inside of a html tag where v-text html attribute is used for a completely blank html tag. because v-text will override the inner html of a particular tag.

A short example is given below:

```
<script>
  export default {
    data(){
      return{
        message: "A dynamic Message",
        lorem: `Lorem, ipsum dolor sit amet consectetur adipisicing elit. Veniam quod repellat vel. Aut fuga, nobis voluptate, labore culpa sint repellendus qui asperiores praesentium optio, delectus error nam porro nesciunt iste?`
      }
    }
  }
</script> 

<template>
  <h1>{{ message }}</h1>
  <p v-text="lorem"></p>
</template>

<style>

</style>

```
Can Anyone solve my Google App script function?
Published: 2023-02-28 18:17:59

I'm trying to extract the trending searches from Google Trends. The first column is working well. But the second and third columns are not providing outputs into Google Sheets.

function extractTrendingSearches() {
  // 1. Visit this url: https://trends.google.com/trends/trendingsearches/daily/rss?geo=US
  const url = "https://trends.google.com/trends/trendingsearches/daily/rss?geo=US";


  // Fetch the RSS feed
  const response = UrlFetchApp.fetch(url);
  const feed = XmlService.parse(response.getContentText());
  const items = feed.getRootElement().getChildren("channel")[0].getChildren("item");


  // Get the sheet to store the data
  const sheetName = "Trends";
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName) || SpreadsheetApp.getActiveSpreadsheet().insertSheet(sheetName);


  // Get the existing data in the sheet
  const dataRange = sheet.getDataRange();
  const dataValues = dataRange.getValues();


  // Extract unique titles from existing data
  const existingTitles = new Set();
  dataValues.forEach(row => {
    const title = row[0];
    if (title) existingTitles.add(title);
  });


  // Clear only the first three columns
  sheet.getRange(1, 1, dataValues.length, 3).clearContent();


  // Add headers to the sheet if the first row is empty
  if (sheet.getRange("A1").getValue() === "") {
    const headers = ["Title", "News Item Title", "News Item URL"];
    sheet.appendRow(headers);
  }


  // Extract the data from each item and add it to the sheet if it is not already in the sheet
  let count = 0;
  for (let i = 0; i < items.length; i++) {
    const item = items[i];
    const title = item.getChild("title").getText();
    if (!existingTitles.has(title)) {
      const newsItem = item.getChild("ht:news_item", XmlService.getNamespace("ht"));
      const newsItemTitle = newsItem ? newsItem.getChild("ht:news_item_title", XmlService.getNamespace("ht")).getText() : "";
      const newsItemUrl = newsItem ? newsItem.getChild("ht:news_item_url", XmlService.getNamespace("ht")).getText() : "";


      const row = [title, newsItemTitle, newsItemUrl];
      sheet.appendRow(row);


      count++;
      if (count === 10) break; // Stop after extracting 10 items
    }
  }
}
5 cool things you should try with Copilot right now
Tags: githubcopilot, github, ai, beginners
Published: 2023-02-28 18:17:14

It's rare that a new coding tool comes along and truly revolutionizes developer productivity. That's why I've been so excited about GitHub Copilot; I honestly can't imagine coding without it anymore. 

GitHub Copilot is your own personal AI pair programmer, designed to suggest code straight from your editor. The coolest thing about it is that it learns from the code that you write, so the suggestions get even better over time. It's like you have somebody coding right along with you, but they can read your mind and there's no heavy breathing down your neck.

Everyday I feel like I discover something new that Copilot helps with, so let’s take a look at 5 things that you probably didn't know Copilot could do. 

## 1. Explaining Code
Ever read code and have no idea what the heck is going on? Same! Let Copilot do the explaining for you. 

{% embed https://www.youtube.com/embed/IETnIoz-jFQ %}

## 2. Remembering Syntax
There are certain things in coding, that no matter how many times you do them, you just can’t remember the syntax (I’m looking at you, centered div). Well, you don’t have to remember, because Copilot is right there to tell you. 

{% embed https://youtube.com/embed/o3qURBllpGM %}

## 3. Writing Regex
Speaking of syntax that I can never remember: regex. You’re lying if you say you’ve never googled the proper regex for whatever pattern you’re trying to match. But now, you can just get Copilot to generate it. 

{% embed https://youtube.com/embed/dTAZui3k4LU %} 

## 4. Adding Comments
Commenting code – the bane of a developer’s existence. My most common comment used to be `// TODO: add comment`. Not anymore! Copilot’s got me covered. 

{% embed https://youtube.com/embed/txCmSlNvCuw %}

## 5. Answering Questions
And finally, sometimes you just want to get a bit more conversational. Did you know that you can actually ask Copilot questions? 

{% embed https://youtube.com/embed/gRNo_JOl-9g %}

## Try It Out
The beauty of GitHub Copilot is not that it does all your development for you, but that it increases your productivity by suggesting relevant code. This means less time writing boilerplate code and more time problem solving. [Try it for yourself](https://aka.ms/get-copilot) and see what else Copilot can do!
22 Valuable Lessons From Decade of Software Engineering
Tags: beginners, programming, codenewbie, tutorial
Published: 2023-02-28 18:16:46

![Programming life lesson](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a38vnj1ee3zriw4fz8lm.png)

Career of a software developer is a journey of life long learning. So, I took sometime off to lookback and reflect. 

In this article, I have documented my learnings in 22 lessons that will guide those who are starting or early in their tech career. 

Let's go! 🚀

1. Start applying for interviews before you think you are ready. 

2. The tech world moves quickly. Make learning a habit.

3. Consistency and patience will help your career more than any technology.

4. Train your mind to see failure as feedback.
 
5. Building in public is the cheat code to new opportunities.

6. Getting a job with your network >>> Sending resumes.

7. Doing tutorials hide knowledge gaps. Building projects expose them. 
![coding cat](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNDIyNThjMjc3Njg3OTgzNThmYmY1YzAyMWY2N2NiOTM3NjIzZjcwYiZjdD1n/scZPhLqaVOM1qG4lT9/giphy.gif)

8. Working on a project that you are passionate about will 10x your learning.

9. Your time estimations will be way off. Underpromise and over-deliver.

10. Be comfortable with not knowing everything. Be confident that you will figure it out. 

11. Career growth without acquiring soft skills can be hard.

12. Learning to ask for help is an underrated skill.

13. Learn googling. You don’t need to build what you can search for. 

14. Don’t fear mistakes. Fear not trying.![we can code this](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYmNiYzZjMmJiMGQ0Mjc5NjQ3M2QzZTRjOWVlYTYwOWI5MzAxYTdiNiZjdD1n/fwbZnTftCXVocKzfxR/giphy.gif)

15. Avoid over-engineering as much. It will distract you from the main task.

16. You don’t need more courses. You need to build projects. 

17. You can only improve what you measure.

18. Make time to unwind and recharge.

19. A good portfolio brings contacts, clients and potential employers. 

20. Knowing how to code is not enough. You need to create something.

21. You learn by *finishing* projects, not by starting them.

22. Working on an exciting project is a form of self-care. 

That's it!

![That's it](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYWUwY2IzMjQwNmY5NDM1OWFiOTIxNjc3ZWJjNDA2YWJjNmYyNDA2YiZjdD1n/KfwyWfTwMu1FG0XhO8/giphy.gif)

I hope you found these lessons helpful.

Give me a follow for more of these. 😊

If you personally had contrary experience, I would love to know about that. Share in comments. 💬
Stay sharp, Stay Ahead
Published: 2023-02-28 18:10:43

Are you keeping up with the latest technology trends? With technology advancing at an unprecedented rate, it's important to stay up-to-date with the latest developments. From artificial intelligence and machine learning to blockchain and the Internet of Things (IoT), the possibilities are endless.

Embracing the latest technology can help your business stay competitive, improve efficiency, and enhance customer experiences. It can also provide exciting new opportunities for innovation and growth.

So, take a moment to explore the latest technology trends and see how they can benefit you and your business. Whether it's through automation, data analytics, or cloud computing, there's always something new to discover in the world of technology.
Flowchart editor dgrm.net / announcement / copy function
Tags: webdev, javascript, programming, opensource
Published: 2023-02-28 18:04:48

[dgrm.net](https://dgrm.net/) | [GitHub](https://github.com/AlexeyBoiko/DgrmJS)


![Copy button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4rx3k4829lf904gn0na.png)

Dgrm.net now support copy function.
Hotkeys Ctrl+C Ctrl+V coming soon.

Give a star on [GitHub](https://github.com/AlexeyBoiko/DgrmJS) to support the project.
Azure Fundamentals Exam Questions - Open Source Repository
Tags: webdev, azure, nextjs, opensource
Published: 2023-02-28 17:44:19

I recently created a NextJS quiz app containing practice questions for the Microsoft Azure Fundamentals (AZ-900) exam, and I wanted to share it with the community. 
The project aims to help individuals prepare for the exam by providing a set of questions and answers that cover the key concepts and topics. 
The project is deployed on Microsoft Azure and uses Azure Cosmos DB as the database to store all the questions.
I hope that this project will be helpful for those preparing for the Azure Fundamentals exam, and I welcome any contributions or feedback from the community. 

You can find the repository [here](https://github.com/eduardconstantin/azure-fundamentals) and the live app [here.](nice-sky-0509a9903.2.azurestaticapps.net)
How to use different environment variables for development and production in Node.js
Tags: node, javascript
Published: 2023-02-28 17:36:23


Some information in our project is secret (like API keys, secrets, etc.), so we cannot use them directly, so we store them in a .env file and push the code to .gitignore the file thus keeping our sensitive information safe.
And we might have separate sets of environment variables for development and production. For example, when working with payment gateways, we might have a sandbox or development token for development and another for use in production.


One way to deal with this is to keep separate .env files for development and production environment and load them dynamically.


We will require the `dotenv` package for loading .env files
```
yarn add dotenv
```
Let's say we have `.env.dev` and `.env.prod` two different files.



`const dotenv = require('dotenv')


dotenv.config({path : `env.${process.env.NODE_ENV}`})


const Config = {
NODE_ENV : process.end.NODE_ENV
}
`


and update the script section in package.json and add `NODE_ENV` environment manually.

`"scripts" : {
"dev" : "NODE_ENV=dev npx nodemon",
"start" : "NODE_ENV=prod node dist/index.js"
}
`


Your scripts section may look different based on your project,  you just have to prefix the command with `NODE_ENV=dev` and `NODE_ENV=prod`
Why You Should Try Rust: A Beginner's Perspective
Tags: rust, beginners, programming
Published: 2023-02-28 17:35:41

As a developer who has primarily worked with Java and JavaScript, I was intrigued when I first heard about Rust. It's a relatively new programming language that has been gaining popularity among developers due to its safety features and high performance. I decided to take the plunge and start learning Rust, and I'm glad I did.

## 
**A Gentle Introduction to Rust**
My initial impression of Rust was that it wasn't too challenging in terms of basic concepts like data types and loops. However, it did have a completely new set of types like u32 and i32 that took some time to get used to. But once I understood them, I realized that they actually made Rust more powerful and flexible than other languages I had used before.

## Learning Resources
One of the things I found helpful when learning Rust was the official documentation. It was well-written and easy to follow, and I was able to find answers to most of my questions. I also came across a great YouTube playlist that provided a beginner-friendly introduction to Rust (you can find the link in the description below).

## Why Rust Stands Out
As I continue to learn Rust, I'm impressed by how much it has to offer. Its safety features make it ideal for systems programming, and its performance is on par with C++. Rust also has a thriving community and a growing number of libraries and frameworks that make it a viable choice for web development and other areas.

## Final Thoughts
If you're a developer who's looking for a new challenge or just wants to explore a new language, I highly recommend giving Rust a try. It may seem daunting at first, but with some patience and persistence, you'll find that it's a powerful and rewarding language to work with.

In conclusion, Rust is an exciting programming language that offers safety, performance, and flexibility. While it may take some time to get used to its unique concepts, it's well worth the effort for developers who want to expand their skills and explore new possibilities. If you want to learn more about Rust, check out the resources I mentioned in this article, and feel free to take a look at my Rust repository https://github.com/JoelJaison394/Rust-Beginner-Guide.git. It contains code snippets and examples that I'm adding as I continue to learn Rust.

Further Resources
If you want to learn more about Rust, check out the resources below:

Official Rust documentation: https://doc.rust-lang.org/
Rust programming tutorial playlist on YouTube: https://youtube.com/playlist?list=PLVvjrrRCBy2JSHf9tGxGKJ-bYAN_uDCUL
Rust programming language website: https://www.rust-lang.org/
Moonly weekly progress update #38
Tags: javascript, blockchain, crypto, nft
Published: 2023-02-28 17:14:34


![](https://cdn-images-1.medium.com/max/3200/1*MZSOLDED7feDQM_om3cetQ.png)

Hello guys, here is another weekly progress update. Staking as a service and holder verification bot are at their final stage.
A lot of testing has been done and very soon you will be able to check them on Moonly and give us your feedback!

**Weekly devs progress:**

* Made UI changes on the submit-NFT page

* Reproduced the error for the NFT page form

* Working on removing duplicate issues of moonly’s live feed

* Debug and fix Moonly being overloaded by unoptimized DB queries

* Fixed a wallet issue through the quick-node endpoint

* Improved NFT suggestion feature for all chains

* Fixed import issue and sorting issue

* Investigated and solved subscription errors on the sales bot feature

**Holder Verification Bot (HVB):**

* Fixed unique trait type and value combination issues on HVB

* Implemented basic logging on moonly-bot codebase

* Added logger in more areas of the codebase of moonly-bot

* Handled no-NFT edge case on front-end

* Implemented two dropdown approaches

* Implemented APIs and modified existing codebase

**Work on the Ethereum collections market data:**

* Refactored frontend UI & backend Gql resolver

* Researched the filter by slug feature & created an issue with it

* Deploy eth scraper to simulated production

* Added blockchain filter select component

* Fixed the scraper's ETH production build problem

* Fixed the blockchain slug issue

**Staking (Locking):**

* Fixed two bugs related to batchClaim

* Finished server-side redirection when the user is not logged in

* Merged staging into feat/stake and resolved conflicts

* Migrated Transaction-Validation To Graphql-Resolver

* Fixed a bug of batch staking

* Researched and Tested query optimization

* Re-Implemented backend resolver for fetching trait and value

* Re-Structured frontend stake managing for backend changes

* Investigating “on-day reward” calculation logic

* Working on allowing Nft to un-stake when the collection is inactive

* Updated UI and MultiSelect for inactive collection un-stake

Upcoming NFT projects to mint:

[https://moon.ly/nft/solcasinoio](https://moon.ly/nft/solcasinoio)

[https://moon.ly/nft/the-bastards](https://moon.ly/nft/the-bastards)

[https://moon.ly/nft/mad-lads](https://moon.ly/nft/mad-lads)

[https://moon.ly/nft/sandbar](https://moon.ly/nft/sandbar)

Minted projects worth mentioning:

[https://moon.ly/nft/claynosaurz](https://moon.ly/nft/claynosaurz)

[https://moon.ly/nft/okay-bears](https://moon.ly/nft/okay-bears)

[https://moon.ly/nft/degods](https://moon.ly/nft/degods)

[https://moon.ly/nft/abc-470](https://moon.ly/nft/abc-470)

Check out our latest blog post: Coinbase Plans to Suspend BUSD Trading

[https://moon.ly/blog/coinbase-plans-to-stop-busd-trading/](https://moon.ly/blog/coinbase-plans-to-stop-busd-trading/)
A New Developer in the Field
Published: 2023-02-28 02:08:38

- What is confusing about platforms?

The most confusing thing about platforms is the various different performance they have and the features they provide. React for example, due to React itself. It is causing significant cut in senior competences in the general industry because there are too many who only knows react and nothing else related to web development. React is a popular platform and is used globally. However, due to lacking any significance in web development with its performance and features, it is confusing to wonder how even with this. React is not worth investing more people to learn and rather learn something else.

- How could web components and VanillaJS standards be taught in a way that is more approachable?

Web components and VanillaJS standards can taught in a way that is more approachable compare to React by making them more accessible then React. React is simple and can be easily learn by many and can be pick up easy. By giving more support and help in learning web components and VanillaJS standard can they become more approachable. Web components and VanillaJS standard as well need to be more expose to the public like React, where it still now is being exposed by many to others. Web components and VanillaJS standard need to do this as well in order for it to be more approachable.

- What did you find easiest to work with on 1st stab? (You don't have to say web components, this is an honest take, if it was Vue cool, but justify it)

The easiest to work with on the 1st stab was Angular. The reason for this is because compare to React and Vue. In Angular, I simply copy and pasted all my HTML and CSS and it just works compare to Vue and React where I had to edit my HTML and CSS in order for them to work properly.

- Think back on the tooling. What parts were confusing? What clicked with you immediately?

The parts that were confusing to me was mostly everything, there was not really anything that clicked to me immediately at the time. However, the more I start to work on it more and more. I start to understand more of it bit by bit.

- What additional readings did you have to do in order to make sense of things.

The additional reading which help me make sense of things was looking through stack overflow, other github posts, and videos which were all very useful in helping me make more sense of things
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2023-02-28 17:08:28

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: top7
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkihck6o31qzhnx5u7lm.jpg
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## SvelteKit 1.0 - Building a personal blog, that shows your DEV posts 🦄

Let’s take a tour of the latest version of SvelteKit with @lissy93. Here, you’ll build a developer portfolio and blog website that fetches data from your RSS feed, as well as the GitHub API.

{% embed https://dev.to/lissy93/sveltekit-10-build-an-blog-fetching-posts-from-your-dev-profile-29f %}


## All about Promises in JavaScript

A promise in JavaScript is an object that represents a value that may not be available yet, but will be in the future. Learn more about JS promises with @codeofrelevancy. 

{% embed https://dev.to/codeofrelevancy/all-about-promises-in-javascript-39lj %}


## Kubernetes 101, Part I, the Fundamentals

Kubernetes is an open-source system for automating and managing containerized applications. In short, it’s all about containers. Here, @leandronsp demonstrates the problem that K8s tries to solve. 

{% embed https://dev.to/leandronsp/kubernetes-101-part-i-the-fundamentals-23a1 %}


## Thoughts on Dev Rel in the post-Twitter era

@andypiper discusses how DevRel has evolved beyond relying on Twitter as the primary platform to connect with developer communities. Though it requires more effort, DevRel is adapting to how communities and technologies are changing.

{% embed https://dev.to/andypiper/thoughts-on-dev-rel-in-the-post-twitter-era-2k8a %}


## Coding your own AI in 2023 with FastAI

In this guide, @vincenius covers how to set up the ecosystem for developing an AI, create and train the model with FastAI, then deploy the model and use it in your own project. 

{% embed https://dev.to/vincenius/coding-your-own-ai-in-2023-with-fastai-2pbk %}


## Announcing MiniBASIC

MiniBASIC is a clean, powerful new implementation of the classic 1980s BASIC programming language. Download @joestrout’s project on itch.io or fork the repo on GitHub!

{% embed https://dev.to/joestrout/announcing-minibasic-1i6f %}


## Debugging JavaScript Like a Pro: Tools and Techniques for Finding and Fixing Bugs

Here, @iayeshasahar shares some tools and techniques that can help you debug JavaScript like a pro so that you can live a bug-free life.

{% embed https://dev.to/iayeshasahar/debugging-javascript-like-a-pro-tools-and-techniques-for-finding-and-fixing-bugs-2lf5
 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_
GitHub CoPilot now also generates tests for functions
Tags: github
Published: 2023-02-28 17:06:17

---
title: GitHub CoPilot now also generates tests for functions
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-28 17:04 +0000
---

Want to automatically generate tests for your JS/TS functions? GitHub CoPilot now does that.
GitHubNext added a [TestPilot experiment](https://githubnext.com/projects/testpilot/) that can generate tests for a function by analysing it and scanning the docs and comments.

![Animation showing how to create a test for a function by highlighting it](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6y5ld8s8mhjr1ukn74cr.gif)