teleren/devto huggingface dataset:
A simple setup to simplify your Style File Imports into your Angular app
Tags: angular, webdev, beginners, frontend
Published: 2023-04-19 00:20:35

Hi guys, how are you?!

Have you ever wanted to simplify importing **style files** into your app, component, or whatever?!

Today I would like to share a simple, but maybe not well known configuration of `angular.json` and with that we can simplify the way of importing the **style files**!
___

For example, to import the `theme-tokens.scss` file in your `home.component.ts` you should write:

``` sass
@import "src/resources/sass/frontend/theme-tokens.scss";
```

Soo long, right?! Imagine writing this whole line in several components.

Buuut relaaax, the awesome **Angular** and with **Sass** give us `includePaths` feature for component and global styles, and with that we can set up extra base path for your app and no longer write long imports lines!

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

So, let's see how to make this!!!
___

### ✅ Implementing the configuration:

In your `angular.json` file, include the `stylePreprocessorOptions` with the `includePaths` property and your extra path, as below:

```json
{
  ...
  "projects": {
    "your-app": {
      "architect": {
        ...
        "build": {
          ...
          "stylePreprocessorOptions": {
            "includePaths": [
              "src/resources/sass"
            ]
          },
          ...
        },
        ...
      },
      ...
    }
  }
 }
}
```

Annd now you can just import your **style file** more easily and simpler in your `component.scss` or something else, take a look:

```sass
⛔️ Old Way:
@import "src/resources/sass/frontend/theme-tokens.scss";
```

```sass
🔥 New Way:
@import "frontend/theme-tokens.scss";
```

Awesome, right?! 

A simple configuration and with that we can improve our development time and simplify and standardize our structure! 

If you want, you can see the Angular documentation [here!](https://angular.io/guide/workspace-config#style-preprocessor-options)
___

That's all guys, I hope you like it and if any questions, suggestions or other topics, please comment!

See you later ✌🏼
DoControl - Discover, understand, and protect data in SaaS applications
Tags: saas
Published: 2023-04-19 00:12:37

DoControl provides a unified, automated, and 'risk-aware' Saas security platform that secures business-critical applications and data, drives operational efficiencies, and enables business productivity. DoControl's core competency is focused on protecting business-critical SaaS applications and data through automated remediation. This is achieved through preventative data access controls, SaaS service misconfiguration detection, service mesh discovery, and shadow application prevention. The DoControl Platform is built upon three foundational tenants which include: Discovery and Visibility, Monitor and Control, and Automated Remediation. DoControl provides SaaS data protection that works for the modern business, so they can drive their business forward in a secure way.

[https://www.docontrol.io](https://www.docontrol.io)
Updates on the Contractr Project: Tackling Challenges with the Chat Function and Making Progress on the Matching Feature
Tags: webdev, javascript, programming, react
Published: 2023-04-19 00:06:39

Hello everyone,

It's been a busy week of coding, and I'm excited to share my progress with you all. On Day 78 of my #100DaysOfCode challenge, I continued working on the Contractr project, which aims to connect freelancers with potential clients.

One of the major challenges I encountered was related to the chat function. Specifically, I was having trouble displaying the chat history and finding the logged-in user's name and profile pic to display in the chat header. After some debugging, I discovered that the server wasn't sending the necessary information to the frontend. I suspect that there may be an issue with Axios, but I'm confident that I'll be able to figure it out and get the chat function up and running smoothly.

In addition to working on the chat function, I also made progress on the matching feature. As I've mentioned before, this feature is crucial for ensuring that clients can easily find freelancers that meet their needs. I'm pleased with the progress I've made so far, but there's still work to be done.

Overall, the Contractr project has proven to be slightly more complex than I initially anticipated, but I'm up for the challenge. I'm excited to continue working on this app and making it the best it can be.

Thanks for reading, and stay tuned for more updates on the Contractr project.
How To Recover Scammed Bitcoin
Tags: bitcoin, beginners, webdev, productivity
Published: 2023-04-18 23:31:25

Hello Everyone,
I invested a lot of money to earn profits trading on BTC and lost my investments to a scam company. I have now had all my investment capital returned by a recovery commando. They helped me recover my lost money from the scam company and I now have a proper BTC investment plan with them. I urge your prompt access to them so that you can get back your stolen funds.

Email: spyware@cybergal.com or contact@cybegal.com
Text/WhatsApp: +19892640381

Marjory.
Engenharia de software?
Tags: braziliandevs, softwareengineer, softwaredeveloper
Published: 2023-04-18 23:08:58


Meu eu de hoje diz ao seu eu de agora,

Único conselho que eu daria a qualquer um que esteja começando como engenheiro(a) de software é compreender mais do que entender que a carreira é desafiadora, mas recompensadora. 

Como em qualquer outra profissão, há muitas coisas que pode fazer para ter sucesso como engenheiro(a) de software. No entanto, se eu pudesse dar apenas um conselho a alguém que está começando seria: não se preocupe apenas em codificar, mas em **resolver problemas**.

Nossos trabalho é transformar problemas em grandes soluções. Embora escrever código seja uma grande parte do trabalho, o objetivo final é criar soluções para os problemas dos usuários e da empresa. Portanto, é importante desenvolver habilidades para identificar e entender problemas complexos e encontrar soluções eficaz.


**Aprendendo a resolver problemas como um engenheiro de software:**


- Compreenda o contexto: antes de começar a escrever código é preciso entender o contexto e o problema que está tentando resolver. Isso pode envolver a compreensão do cenário de negócios, as necessidades do usuário e os requisitos técnicos.

- Abordar o problema de forma sistemática: a resolução de problemas requer uma abordagem estruturada e sistemática, começar dividindo o problema em partes menores e, em seguida, resolver cada um deles separadamente, faz da medida que avança ser possível reunir as partes em uma solução mais completa.

- Teste soluções: a solução de problemas é um processo iterativo, ao tempo que desenvolve soluções é importante testá-las para verificar se elas funcionam corretamente, se a solução não funcionar, revise e tente novamente.

- Aprenda com erros: resolução de problemas é um processo de aprendizagem contínua, não tenha medo de cometer erros, eles são uma oportunidade de aprender e melhorar. 



> Focar em escrever código é importante, mas não é o objetivo final. Desenvolva habilidades afim de entender e resolver problemas complexos, eles trarão um caminho certo para o sucesso como engenheiro de software.
Day 738 : Collapse
Tags: hiphop, code, coding, lifelongdev
Published: 2023-04-18 22:52:21

_liner notes_:
- Professional : Got stuff done today. Cleaned up my proof of concept project and add a way to link to the console of the hosting site. Tested it out and everything still works. So not a total collapse! haha

- Personal : Last night I went through some tracks for the radio show this week. Then I refactored my side project code some more. I ran into a weird issue where the data I fetched had an apostrophe and it messed stuff up. Took some time to figure it out, but I did. Glad I ran into it now and not later. Ended the night watching "Vinland Saga" and "Demon Slayer".

![San Francisco Bay, CA, USA looks like it covered in a sea of clouds with a few trees poking though at sunset.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9sp81huanagf27nu4ur2.jpg)

Got a little later off work than normal since I was finalizing some code. Going to go through a few more tracks for the start of the radio show. I want to have those selected tonight. I'll probably also start picking out clothes for my trip. Do some more refactoring of my side project. Didn't get to watch "Dr. Stone" last night. Looking to end my night with that.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube lh-QYPq6Oys %}
Just launched in Product Hunt. Any support? Feedback? advice?
Tags: producthunt, feedback, support
Published: 2023-04-18 22:47:36

Hey guys!

At Slash we launched for the first time ever and well, it would be awesome to have your support and feedback.
We make it easier for businesses to start receiving cryptocurrency payments.

Please take a look at our Product hunt and show us your support 🫶 

🔗link :https://www.producthunt.com/posts/slash-ef4d9b89-cee0-4cde-a987-5ceed9041688

Reach out if you have any collaboration request, questions or anything in general.

Thank you so much!!🇯🇵
How to Make a Great Pull Request and Some Other Things I Learned This Week
Tags: codenewbie, beginners, programming
Published: 2023-04-18 22:21:17

Hey there! Welcome to this week's edition of What I Learned. After a week of delving into new coding topics and reading your articles over on the [#codenewbie](https://dev.to/t/codenewbie) tag, I'm excited to share some of my favorite finds with you. 

If you aren't exploring or posting over on the #codenewbie tag, find the tag here!

{% embed https://dev.to/t/codenewbie %}

***

## Here's what I discovered this week (there has been no rhyme or reason this week, just a few scattered things I learned!):

If you don’t know me, you should know that I REALLY love production line organization and documentation. I love to document different changes in my graphic design progress so I can feel my successes more and communicate with my team better. As I try to better understand our engineering team’s workflow, I have found articles like these pivotal in understanding documentation! If you need a Pull Request crash course, this is it.

{% embed https://dev.to/opensauced/how-to-create-a-good-pull-request-template-and-why-you-should-add-gifs-4i0l %}

@bekahhw states, “The great things about Pull Requests are that they allow for collaboration between contributors and maintainers, offer an opportunity to communicate changes that have been made and why they are important, and the ability for maintainers to provide feedback.”

@bekahhw also made this other article for @opensauced, further explaining Pull Requests!

{% embed https://dev.to/opensauced/writing-your-first-pull-request-tips-best-practices-and-ai-powered-tools-for-success-3bg9 %}

Spoiler: I am a huge fan of recommending that people do online courses and a huge hypocrite who has never done one (related to coding at least). But I can tell you for sure, articles like this one from @javinpaul help me motivate that part of my brain that I know will do one *one day.*

{% embed https://dev.to/javinpaul/my-favorite-courses-to-learn-microservices-in-depth-35ce %}

When coming up with portfolio ideas in the past, I know I have sometimes pulled out my hair trying to come up with something with that good balance between sophistication, effortlessness, and uniqueness. If you need some more inspiration to get you through that hurdle, check out this article from @rammcodes

{% embed https://dev.to/rammcodes/5-amazing-project-ideas-to-get-hired-as-a-full-stack-developer-5lg#comments-container %}

And— last but not least, if you haven’t engaged in any discussions today, here is one @ben posted today!

{% embed https://dev.to/codenewbieteam/coding-heroes-who-inspires-and-motivates-you-2mhd
 %}

***


Thank you thank you for tuning in, have a great rest of your day y’all!

**(PS: What random things are you learning this week???)**
[Tiny] Nice Way to Build Strings in Kotlin
Tags: kotlin, beginners, tiny
Published: 2023-04-18 21:40:57

One nice way to build a `String` in Kotlin is the `buildString()` top-level function. It takes a lambda as an argument, and within that lambda, you can use various append methods on a `StringBuilder` instance to construct a string. 

Once the lambda is executed, the resulting `StringBuilder` object is converted to a regular `String` object.

Here is a sample:

```kotlin
private const val AGE_LENGTH = 4
private const val NAME_LENGTH = 14
private const val TABLE_LENGTH = 40

data class Person(val name: String, val age: Int, val motherland: String)

fun generateReport(people: List<Person>) = buildString {
    appendLine("Report:")
    appendLine("".padEnd(TABLE_LENGTH, '-'))

    appendLine("${"Name".padEnd(NAME_LENGTH)} | ${"Age".padEnd(AGE_LENGTH)} | Motherland")
    appendLine("".padEnd(TABLE_LENGTH, '-'))

    people.forEach {
        appendLine("${it.name.padEnd(NAME_LENGTH)} | ${it.age.toString().padEnd(AGE_LENGTH)} | ${it.motherland}")
    }
    appendLine("".padEnd(TABLE_LENGTH, '-'))
}

fun main() {
    val people = listOf(
        Person("Frodo Baggins", 33, "The Shire"),
        Person("Gandalf", 2019, "Middle-earth"),
        Person("Aragorn", 87, "Gondor"),
        Person("Legolas", 2931, "Woodland Realm"),
        Person("Gimli", 139, "Lonely Mountain"),
    )

    val report = generateReport(people)
    println(report)
}
```

The output of the above code will be:

```
Report:
----------------------------------------
Name           | Age  | Motherland
----------------------------------------
Frodo Baggins  | 33   | The Shire
Gandalf        | 2019 | Middle-earth
Aragorn        | 87   | Gondor
Legolas        | 2931 | Woodland Realm
Gimli          | 139  | Lonely Mountain
----------------------------------------
```

---

_Dream your code, code your dream._
I built an AI-powered code explainer
Tags: programming, chatgpt, webdev, beginners
Published: 2023-04-18 21:32:44

Hello everyone! 👋

I'm excited to share with you my latest project, [Virtuo](https://virtuo.simplef.net/)! It's an AI-powered Chrome extension that makes accessing ChatGPT a breeze - no more switching between different tabs! And for all you programmers out there, I've added a new feature that allows you to easily get explanations of any code in a friendly and easy-to-understand tone.

I recently tweeted about Virtuo, and you can check it out here: [https://twitter.com/tanzirul_huda/status/1648401244074164224?s=20](https://twitter.com/tanzirul_huda/status/1648401244074164224?s=20)

I know, you could always just copy the code and ask ChatGPT, but I wanted to make it even easier for you. With [Virtuo](https://virtuo.simplef.net/), you don't have to switch between tabs or ask with proper prompts. You can get the answers you need right from the tab you're browsing! ⚡
VMClarity: What Happens During a Scan?
Tags: sbom, opensource, appsec
Published: 2023-04-18 21:09:59

I recently posted on the [VMClarity open source project](https://github.com/openclarity/vmclarity) and a couple of quick videos on what the project is about and how you can get started. If you missed that post, check it out here: [VMClarity: Virtual Machine Security](https://dev.to/ciscoemerge/vmclarity-virtual-machine-security-5e8g) 

## A Reminder of how VMClarity Works
In the previous videos, I walked through the basics of how VMClarity works and the major components. As you recall, today, VMClarity is deployed in an AWS VPC. In that VPC, the VMClarity server is deployed as an AWS EC2 instance. You then configure VMClarity to scan specific 'scopes' inside of AWS. You can scan for all AWS EC2 instances your AWS account has access to or filter down that scope (recommended). The scan scope can filter on:

- All AWS regions
- AWS region
- AWS region + VPC
- AWS region + VPC + security group(s)
- AWS region + instance tags (or within a specific VPC)

Once a VMClarity scan identifies the target assets (instances), it triggers an AWS snapshot of those assets, launches a new AWS EC2 instance, and attaches the snapshot to that instance. VMClarity then configures the scanner types (e.g., exploits, misconfigurations, malware, etc..) based on the scanner types you configured in the scanner configuration.

## Behind the Scenes

In this post, I am sharing more information about what happens behind the scenes when VMClarity scans a 'target' asset (e.g., an AWS EC2 instance).

Here is a quick demo of accessing the VMClarity server instance and checking the real-time scanner virtual machine.

{% embed https://youtu.be/kSHnMl1rrG8 %}

---

## Learn More & Join the Community!

Learn more about VMClarity and join the community! https://github.com/openclarity/vmclarity

I will be back with more posts on understanding how VMClarity works, and how you can contribute to it!

You can also learn more about the other Clarity projects, such as (API security) and KubeClarity (K8s SBOM/Supply chain security) here:

- https://github.com/openclarity/apiclarity

- https://github.com/openclarity/kubeclarity

And several blogs about both projects are here:
https://techblog.cisco.com/

---

Shannon McFarland is a Distinguished Engineer and open source advocate in Cisco’s Emerging Technology & Incubation organization. You can follow him on Twitter @eyepv6.
A Step-by-Step Guide to Database Backup and Restoration
Published: 2023-04-21 20:28:16

---
title: A Step-by-Step Guide to Database Backup and Restoration
published: true
date: 2023-04-18 20:09:54 UTC
tags: 
canonical_url: https://harshmange.hashnode.dev/a-step-by-step-guide-to-database-backup-and-restoration
---

To backup and restore a database, you can follow the following steps:

## Backup

1. Choose a backup method: There are two types of backup methods: Full backup and Incremental backup. Full backup includes all the data in the database, while incremental backup only backs up the changes made since the last backup.

2. Choose a backup location: You should store backups in a secure location. A good option is to store them on an external hard drive or in a cloud-based storage service.

3. Backup the database: The method of backing up a database depends on the database management system you're using.

4. Verify the backup: After the backup is complete, verify that it was successful by opening the backup file and checking that it contains the data you need.

```
    mysql -u username -p database_name < backup_file.sql



    Here, replace "username" with your MySQL username, "database_name" with the name of the database you want to restore, and "backup_file.sql" with the name of the backup file you want to restore from.

```

It's important to note that the backup and restore process may differ depending on the database management system you're using, as well as the backup and restore methods you choose. Always refer to the documentation of your specific database management system for detailed instructions on how to backup and restore your database.
#DEVDiscuss: Documentation Workflows
Tags: devdiscuss, documentation
Published: 2023-04-18 20:00:00

*image created by [Margaux Peltat](https://www.patreon.com/margauxpeltat) for the [Chilled Cow YouTube channel](https://www.youtube.com/watch?v=lTRiuFIWV54)*

Time for #DEVDiscuss — right here on DEV 😎

Inspired by @tyagi_data_wizard's [Top 7 post](https://dev.to/devteam/top-7-featured-dev-posts-from-the-past-week-4o7a), tonight’s topic is...**documentation workflows** ✍️🗄️

{% embed https://dev.to/tyagi_data_wizard/document-or-die-the-importance-of-writing-things-down-in-tech-4je1 %}


---
Questions:
- **What documentation processes, workflows, or "hacks" have helped you or your team?**
- **What docs processes, workflows, or "hacks" have failed you spectacularly?**
- **Which tools do you use for documentation?**
- **How do you combat sprawl and duplicates in your documentation efforts?**
- **Any triumphs, fails, or other stories you'd like to share on this topic?**
Aplicando Path Mapping no React Native
Tags: react, reactnative, programming
Published: 2023-04-18 19:56:10

Path mapping é uma técnica utilizada em projetos React Native para facilitar a resolução de caminhos relativos aos arquivos e componentes do projeto. Essa técnica pode ser particularmente útil em projetos maiores, com uma grande quantidade de arquivos e pastas, e que precisam ser compartilhados entre diferentes partes do projeto.

Para entender melhor como o path mapping funciona, imagine que você tenha um projeto React Native com a seguinte estrutura de pastas:

```
./src
   /components
      /Button.js
      /Header.js
   /screens
      /HomeScreen.js
      /ProfileScreen.js
   /utils
      /api.js
   /index.js
```
Para importar o componente Button.js dentro do arquivo HomeScreen.js, você precisaria escrever o seguinte código:

```
import Button from '../../components/Button';
```

Isso funciona bem quando o projeto é pequeno, mas pode se tornar confuso e difícil de gerenciar em projetos maiores. É aí que entra o path mapping.

O path mapping permite criar um alias para um caminho específico, o que significa que você pode importar arquivos usando um caminho mais simples e fácil de lembrar. Por exemplo, você pode criar o seguinte alias para a pasta ./src:

```
{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      "@components/*": ["./components/*"],
      "@screens/*": ["./screens/*"],
      "@utils/*": ["./utils/*"]
    }
  }
}
```
Com esse alias, você pode importar o componente Button.js dentro do arquivo HomeScreen.js usando o seguinte código:

```
import Button from '@components/Button';
```

Isso torna o código mais legível e fácil de gerenciar em projetos maiores. Além disso, se você precisar mover arquivos ou pastas em seu projeto, o path mapping torna mais fácil atualizar os caminhos em todo o projeto.

É importante notar que o path mapping só funciona se você estiver usando um transpilador TypeScript ou Babel. Se você estiver usando o Metro como seu bundler, é necessário instalar o pacote metro-resolver e adicionar uma configuração no arquivo metro.config.js, como mostrado abaixo:

```
const { getDefaultConfig } = require('metro-config');

module.exports = (async () => {
  const defaultConfig = await getDefaultConfig();
  return {
    ...defaultConfig,
    resolver: {
      ...defaultConfig.resolver,
      extraNodeModules: {
        '@components': `${__dirname}/src/components`,
        '@screens': `${__dirname}/src/screens`,
        '@utils': `${__dirname}/src/utils`
      }
    }
  };
})();
```
Com isso, o Metro irá resolver os aliases criados no arquivo metro.config.js e você poderá usar o path mapping em seu projeto React Native.

Em resumo, o Path Mapping é uma técnica útil para simplificar o gerenciamento de caminhos em projetos React Native. Com a criação de aliases para pastas e arquivos específicos, você pode importar componentes e outros arquivos usando caminhos mais simples e legíveis. Se você estiver trabalhando em um projeto grande, o path mapping irá reduzir as importações e facilitar a manutenção do código, o deixando mais legível.
Artificial Intelligence vs Machine learning vs Deep Learning vs Generative AI
Tags: machinelearning, ai, deeplearning, generativeai
Published: 2023-04-18 19:56:06

Let's know which model does what:

- **Artificial Intelligence** imitates human behavior by relying on machines to learn and execute tasks without explicit directions on what to output.

- **Machine learning** models take in data like weather conditions and fit the data to an algorithm, to make predictions like how much money a store might make in a given day.

- **Deep learning models** use layers of algorithms in the form of artificial neural networks to return results for more complex use cases. Azure AI services are built on deep learning models. You can check out this article to learn more about the difference between machine learning and deep learning.

- **Generative AI models** are a subset of deep learning models that can produce new content based on what is described in the input. 


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